Cannot pairing chip device by chip-tool or chip-device-ctrl because of "GDBus.Error:org.bluez.Error.Failed: Input/output error"

Problem
<what's wrong or missing, please include any applicable:

expected behavior: chip-tool or chip-device-ctrl and connect and pair chip device
actual behavior: chip-tool and chip-device-ctrl connot throw error "GDBus.Error:org.bluez.Error.Failed: Input/output error"
steps to reproduce
system configuration: Raspberry Pi 4b
screenshots, images, logs, etc.

ubuntu@ubuntu:~/connectedhomeip$ sudo chip-device-ctrl
CHIP:IN: TransportMgr initialized
CHIP:IN: local node id is<PHONE_NUMBER>8248704968
CHIP:DL: CHIP task running
Chip Device Controller Shell
chip-device-ctrl > set-pairing-thread-credential 11 1234<PHONE_NUMBER>6677889900aabbccddeeff
Thread credential set
chip-device-ctrl > connect -ble 3840 12345678 1234
Device is assigned with nodeid = 1234
CHIP:DL: TRACE: Bluez mainloop starting Thread
CHIP:DL: TRACE: Bus acquired for name C-0808
CHIP:DL: PlatformBlueZInit init success
CHIP:BLE: BLE scanning through known devices.
CHIP:BLE: Device 00:0B:57:A8:FC:81 does not look like a CHIP device.
CHIP:BLE: BLE initiating scan.
CHIP:BLE: Device 00:17:DD:08:F7:6D does not look like a CHIP device.
CHIP:BLE: Device 00:17:DD:08:2A:F0 does not look like a CHIP device.
CHIP:BLE: Device 68:0A:E2:38:6A:E5 does not look like a CHIP device.
CHIP:BLE: Device 00:17:DD:08:38:B0 does not look like a CHIP device.
CHIP:BLE: Device 00:17:DD:08:1C:E7 does not look like a CHIP device.

CHIP:BLE: Device 3C:6A:9D:04:41:0D does not look like a CHIP device.
CHIP:BLE: Device 51:2B:E3:E6:84:3A does not look like a CHIP device.
CHIP:BLE: Device 00:17:DD:08:30:03 does not look like a CHIP device.
CHIP:BLE: Device 77:13:1A:76:DF:B8 does not look like a CHIP device.
CHIP:BLE: Device 00:17:DD:08:87:55 does not look like a CHIP device.
CHIP:BLE: Device F5:93:8D:2D:59:00 does not look like a CHIP device.
CHIP:BLE: Device 00:17:DD:08:1C:EE does not look like a CHIP device.
CHIP:BLE: Device 78:75:4E:D2:B3:9B does not look like a CHIP device.
CHIP:BLE: Device 00:17:DD:08:F7:6D does not look like a CHIP device.
CHIP:BLE: Device 60:34:D3:FF:3A:D3 does not look like a CHIP device.
CHIP:BLE: Device 5B:55:CA:3E:F4:33 does not look like a CHIP device.
CHIP:BLE: Device 72:B4:8D:FC:F9:92 does not look like a CHIP device.
CHIP:BLE: Device 61:90:A0:AC:46:6D does not look like a CHIP device.
CHIP:BLE: Device E4:6C:99:18:E2:F3 does not look like a CHIP device.
CHIP:BLE: Device 00:17:DD:08:0B:05 does not look like a CHIP device.
CHIP:BLE: Device 3C:6A:9D:04:41:0D does not look like a CHIP device.
CHIP:BLE: Device 7C:0F:27:B8:83:0A does not look like a CHIP device.
CHIP:BLE: New device scanned: 00:0B:57:A8:FC:81
CHIP:BLE: Device discriminator match. Attempting to connect.
CHIP:BLE: Scan complete notification without an active scan.
CHIP:DL: FAIL: ConnectDevice : GDBus.Error:org.bluez.Error.Failed: Input/output error
It seems like the bluez module on my Raspberry Pi has some problem, does anyone met this issue? How to fix it?
Thanks
Proposed Solution
<suggested fix, suggested enhancement>

After I run "systemctl restart bluetooth*" command, bluetooth module work fine, but I still has some problem when try to pair chip device (lighting-app run on EFR32MG12), chip device show "InvalidState" during commission process:
00>  [DL] Thread joiner timer running
00>  [DL] Request Thread joiner start
00>  [DL] Joiner Discerner: 3840
00>  [DL] Joiner PSKd: 012345678
00>  [DL] Joiner start: No Error
00>  [DL] _OnPlatformEvent default:  event->Type = 32778
00>  [DL] OpenThread State Changed (Flags: 0x0800800b)
00>  [DL]    Network Name: OpenThread
00>  [DL]    PAN Id: 0x64F4
00>  [DL]    Extended PAN Id: 0xDEAD00BEEF00CAFE
00>  [DL]    Channel: 11
00>  [DL]    Mesh Prefix: FDDE:AD00:BEEF::/64
00>  [DL]    Thread Unicast Addresses:
00>  [DL]         FE80::30A6:2A3:55C0:7189/64 valid preferred
00>  [DL] LwIP Thread interface addresses updated
00>  [DL]    FE80::30A6:2A3:55C0:7189 IPv6 link-local address, preferred)
00>  [DL] Connect Event for handle : 1
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 9)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [BLE] local and remote recv window sizes = 3
00>  [BLE] selected BTP version 3
00>  [BLE] using BTP fragment sizes rx 128 / tx 20.
00>  [DL] CHIPoBLE subscribe received
00>  [DL] _OnPlatformEvent kCHIPoBLESubscribe
00>  [DL] _OnPlatformEvent default:  event->Type = 32777
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 67)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [BLE] Received pairing message for lu
00>  [BLE] Received PBKDF param request
00>  [BLE] Sent PBKDF param response
00>  [DL] Long dispatch time: 135 ms
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 100)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [BLE] Received pairing message for lu
00>  [BLE] Received spake2p msg1
00>  [BLE] Sent spake2p msg2
00>  [DL] Long dispatch time: 306 ms
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 66)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [BLE] Received pairing message for lu
00>  [BLE] Received spake2p msg3
00>  [BLE] Missing node id in rendezvous parameters. Node ID is required until opcerts are implemented
00>  [IN] New pairing for device lu, key 536911952!!
00>  [SVR] Received a new connection.
00>  [SVR] Device completed SPAKE2+ handshake
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 121)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [BLE] Received rendezvous message for lu
00>  [BLE] Received rendezvous message from lu
00>  [NP] Received kThreadAssociationRequest
00>  [DL] Join Thread network: NotFound
00>  [SVR] Device was assigned network credentials
00>  [DIS] mDNS advertising not available. mDNS start disabled.
00>  [SVR] Failed to start mDNS advertisement
00>  [SVR] Device completed Rendezvous process
00>  [SVR] Failed to store the connection state
00>  [DIS] Device not fully provisioned. Node ID unknown.
00>  [DIS] mDNS advertising not available. Operational Advertisement failed.
00>  [DIS] Failed to start advertising operational state at rendezvous completion time.
00>  [DL] _OnPlatformEvent default:  event->Type = 32773
00>  [DL] _OnPlatformEvent default:  event->Type = 32778
00>  [DL] OpenThread State Changed (Flags: 0x1904f11f)
00>  [DL]    Device Role: DETACHED
00>  [DL]    Network Name: OpenThread
00>  [DL]    PAN Id: 0x1234
00>  [DL]    Extended PAN Id: 0xDEAD00BEEF00CAFE
00>  [DL]    Channel: 11
00>  [DL]    Mesh Prefix: FDDE:AD00:BEEF::/64
00>  [DL]    Thread Unicast Addresses:
00>  [DL]         FDDE:AD00:BEEF:0:58EF:B718:FF5B:28B5/64 valid preferred
00>  [DL]         FE80::DCED:67DD:B431:3F00/64 valid preferred
00>  [DL] LwIP Thread interface addresses updated
00>  [DL]    FE80::DCED:67DD:B431:3F00 IPv6 link-local address, preferred)
00>  [DL]    FDDE:AD00:BEEF:0:58EF:B718:FF5B:28B5 Thread mesh-local address, prefer [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Thread joiner timer running
00>  [DL] Request Thread joiner start
00>  [DL] Joiner start: OpenThread Error 9000013 (0x0089544D): InvalidState
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Thread joiner timer running
00>  [DL] Request Thread joiner start
00>  [DL] Joiner start: OpenThread Error 9000013 (0x0089544D): InvalidState
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm
00>  [DL] Char Write Req, char : 26
00>  [DL] Write request/command received for CHIPoBLE RX characteristic (con 1, len 3)
00>  [DL] _OnPlatformEvent kCHIPoBLEWriteReceived
00>  [DL] Tx Confirmation received
00>  [DL]  stop soft timer
00>  [DL] _OnPlatformEvent kCHIPoBLEIndicateConfirm

I have the same problem，Do you fix it?

Given this is an old issue, is this still present? If so, please re-open, thanks!


geopmpy.launcher improperly selects OMP num thread count

geopmpy.launcher selects more OMP threads than can be used when application ranks are isolated to their own physical cores (with hyper threading enabled).

At the very least we should warn if OMP_NUM_THREADS is not set by the user.

https://github.com/geopm/geopm/commit/ca374e0a3ccbfb70351524af10db65e1da6878de


docs: bring inline with ngrok-go documentation

This kinda creeped into a couple of breaking api changes:

cert_pem and key_pem are now a single termination to match ngrok-go
Dropped the _string suffix from the cidr methods, since there are no alternatives

Current dependencies on/for this PR:

main

PR #63   👈

This comment was auto-generated by Graphite.

Funny, most of those were typos from the doc comments in ngrok-go :grin:


Question - Policy modification clarification

Let us know the feedback or general question
Following on from #859, I've had a look at the documentation, but I have a number of questions and clarifications.
Context
My use case is changing a policy (or short while) from DENY to AUDIT, but I want all changes made through version control; I don't want any manual changes made through, for example, the Azure portal or CLI.
I've run the Bicep Accelerator (new version) which has set up a new repository called "alz-mgmt" in my Azure DevOps project.
That repository contains CI/CD pipelines and configuration files:
alz-mgmt
├── .pipelines/
├── accelerator/
├── config/
├── parameters.json
└── README.md

My plan is as follows:

Add the existing DENY policy to the parExcludedPolicyAssignments parameter to exclude the policy from being assigned.
Create and assign the new policy, taking a copy of the existing policy and changing the effect from "deny" to "audit".

Ideal Solution
As the "alz-mgmt" repository created by the Accelerator is a configuration repository, the ideal solution would be to expose another set of configuration to override existing policies. This would meet my use case perfectly.
For use cases around adding new policies, perhaps offer an empty directory structure that users can just drop in new policies that will be automatically picked up by the pipelines.
However, I don't think either is supported currently, which leads me onto the existing solutions.
Existing Solutions (and questions about them)
The main question I have is that it looks like all the steps are executed within the ALZ-Bicep repository, but that's not a repository I own or maintain; that's the "alz-mgmt" repository.
It might become clearer if I run through option 1 and make comments under each step.
Option 1

Extend the ALZ Default Policy Assignments module from ALZ-Bicep

(optional) Adding additional assignments as a .json file to the lib and add additional variables like varPolicyAssignmentDenyIPForwarding etc.

Can use Invoke-PolicyToBicep.ps1 script as explained in How Does ALZ-Bicep Implement Azure Policies? to generate variables for assignments once assignment .json file in the lib.

Steps:

Navigate to the Policy Assignments lib directory: infra-as-code\bicep\modules\policy\assignments\lib\policy_assignments

Ok, so this is definitely to be performed within the ALZ-Bicep repository. So I've cloned the repository onto my machine and I navigate to the location.

Copy/clone an existing .json file and rename it to something appropriate

Try to copy a policy with the same effect as the policy you are wanting to add
Important: The file name of the .json file is not important. It can be anything you like as long as it ends .json

Now this is a bit weird because I'm being asked to change code within a repository that I don't manage or maintain, but fine, I'll go with it.

Amend contents of new file to values for the new policy assignment
Common properties to change: name, displayName, description, metadata, parameters, policyDefinitionId, enforcementMode, identity

I change the name, description, displayName and effect from "deny" to "audit".

Run the Invoke-PolicyToBicep.ps1 script to update the _policyAssignmentsBicepInput.txt file in the lib folder
i. Copy the entire contents of the relevant _policyAssignmentsBicepInput.txt file and replace the variables for the policy assignments metadata (lines 78 to 202 today in the alzDefaultPolicyAssignments.bicep module)

Again, strange that I'm being asked to modify code in a repository I don't own or maintain.
Also, note that the indentation in the _policyAssignmentsBicepInput.txt file is tabs, not spaces, and that the order doesn't seem to be maintained across runs because a git diff showed many more changes than just the addition of my new policy.

Define a new module declaration using the Policy Assignments module in the alzDefaultPolicyAssignments.bicep module

You could also copy an existing alzDefaultPolicyAssignments.bicep module policy assignment module declaration that uses the same effect as you require in your new assignment

DeployIfNotExists effect example - Deploy-MDFC-Config policy assignment - modPolicyAssignmentIntRootDeployMDFCConfig (lines 242 to 269)

Note the use of parPolicyAssignmentParameterOverrides

Deny effect example - Deny-Subnet-Without-Nsg policy assignment - modPolicyAssignmentIdentDenySubnetWithoutNSG (lines 445 to 458)

Change the parameter input values to the desired values to assign your new policy

Refer to the Policy Assignments module documentation for parameter information
These can be "hardcoded" or from the associated .json file in the lib, referenced via a variable generated in step 4, that you have created in the previous steps

I added a new module declaration.
I also needed to update varModuleDeploymentNames with a new entry, but this isn't stated in the docs for option 1.

Redeploy the updated ALZ Default Policy Assignments module via your configured method (locally via Azure CLI or PowerShell or via Azure DevOps pipeline or GitHub action)

Redeploy how?
All these code changes are in the "ALZ-Bicep" repository and my pipelines are in the "alz-mgmt" repository.
I think @oZakari's comment suggests the solution:

You can override the templateFilePath directory property within the bicep-templates.yaml file for the ALZ Default Policy Assignments module with a custom module as well as a custom lib directory as well.

So I've got to copy the alzDefaultPolicyAssignments.bicep module over to my "alz-mgmt" repository.
I've copied it over to the same location as @oZakari states: config/custom-modules/policy/assignments/alzDefaults/alzDefaultPolicyAssignments.bicep.
I then need to copy over the new policy json to my "alz-mgmt" repository. I've chosen the following location mirroring the ALZ-Bicep repository: config/custom-modules/policy/assignments/lib/policy_assignments
However, as a result, none of the relative paths work in the alzDefaultPolicyAssignments.bicep module, so I need to update all the relative paths.
I tried updating them to point to the ALZ-Bicep files cloned as part of the pipelines e.g. ../../../policy/assignments/lib/policy_assignments/policy_assignment_es_audit_appgw_waf.tmpl.json => ../../../../../infra-as-code/bicep/modules/policy/assignments/lib/policy_assignments/policy_assignment_es_audit_appgw_waf.tmpl.json. However, this fails the now activated "Bicep Build & Lint All Custom Modules" step in the ci-template.yaml file because that job doesn't clone the ALZ-Bicep repository.
What should I do now?
I could either copy the entire "policy" directory, including the module and json files, over to the "alz-mgmt" repository or update the ci-template.yaml to clone the ALZ-Bicep repository. Which is better?
I've then got to keep all this in sync with any upstream changes to the alzDefaultPolicyAssignments.bicep module and policy assignment changes in the ALZ-Bicep repository.
This is a lot of manual work and ongoing maintenance for a relatively simple use case.
Am I doing things as expected or am I completely off track?
Please advise.
Code of Conduct

[X] I agree to follow this project's Code of Conduct

I could either copy the entire "policy" directory, including the module and json files, over to the "alz-mgmt" repository or update the ci-template.yaml to clone the ALZ-Bicep repository. Which is better?

I've tried going down the pipeline modification route, but it's proving very awkward.
I've updated the ci-template.yaml file in my PR, but because the templates are tied to main, the updated template isn't used so the pipeline always fails.
I've tried adding a ref such that it uses the current branch, but now there's a "Required YAML template" check that's failing on the sc-alz-mgmt-plan service connection because it requires the ref to be main.
I'm doubting that this is a good path to go down.
I can obviously work around this by first merging the update to the template and then re-running the CI pipeline on the original PR, but there's no way to test pipeline template changes then.

Ok, I've got it working by updating the ci-template.yaml file in a separate PR, merging that, rebasing my original PR and then it passes.
The change I made to the ci-template.yaml file is as follows:
diff --git a/.pipelines/ci-template.yaml b/.pipelines/ci-template.yaml
index 6075158..53f6162 100644
--- a/.pipelines/ci-template.yaml
+++ b/.pipelines/ci-template.yaml
@@ -20,6 +20,18 @@ stages:
             parameters:
               serviceConnection: 'sc-alz-mgmt-plan'

+          - template: helpers/bicep-variables.yaml
+            parameters:
+              parametersFileName: $(parametersFileName)
+
+          - template: helpers/bicep-on-demand-folder.yaml
+            parameters:
+              repository: "https://github.com/Azure/ALZ-Bicep"
+              releaseArtifactName: "accelerator.zip"
+              releaseVersion: "$(RELEASE_VERSION)"
+              sourcePath: "infra-as-code"
+              targetPath: "infra-as-code"
+
           - pwsh: |
               if (Test-Path -Path ./custom-modules/*)
               {

I'm still not sure if this is a good solution though?

Hi @cspring86, I see your concerns. Let me work through this tomorrow a bit more and get back to you to see if there are any other potential solutions. We are working on refactoring ALZ-Bicep, so the Accelerator should be a bit more flexible in the future. Will get back to you 👍🏼

Thanks @oZakari !
No rush though. This solution, although the initial changes were a bit painful and have ended up with me modifying the ci-template.yaml file (owned by you guys and may be overwritten every time I re-run the Accelerator), does make modifying existing policies or adding new policies pretty simple now and has kept the amount of copying from the ALZ-Bicep module down to a minimum.
For completion, the solution I've gone with for now is to copy the Bicep module across (to config/custom-modules/policy/assignments/alzDefaults/alzDefaultPolicyAssignments.bicep) and to update it's file paths to reference the ALZ-Bicep files when fetched within the pipeline. This means I don't have to copy across potentially hundreds of files from the ALZ-Bicep repo, but has resulted in an update to the ci-template.yaml file such that it also fetches the ALZ-Bicep files like the other pipeline jobs. Any policies I need to modify or add new can then be placed into config/custom-modules/policy/assignments/lib/policy_assignments with the Bicep module updated to reference my policy, not the ALZ-Bicep policy. Keeping in sync with upstream changes will be a pain, mainly around the Bicep module tbh, but it's working well for now.
As stated, the ideal solution would be to expose configuration in the "alz-mgmt" repository to achieve the same effect i.e. an "overrides" section for policies where you can override any part of a policies parameters as well as a known directory in "alz-mgmt" where additional policies can be included.

Ok, thank you @cspring86 for letting me know your solution is working for you at the moment. Appreciate the feedback and will get back to you soon.


DBZ-4637 Redis Sink - change records should be streamed in batches

This PR includes @gunnarmorling's comments of the previous PR opened and already merged.

Hey @spicy-sauce, could you rebase this one and squash it into one single commit?


about the hyperparameters

Dear author, thanks for publishing the code. I try to reproduce the exp results in the paper, but  fail to get the accuracy reported in the paper. I wonder if you can tell me the hyperparameters in training transformer. It seems there is only configuration for one dataset ag_news.

Hi! Thank you for your interest in our work! This repository mostly aims to provide a simple identifiable variant of transformers and easy comparison between identifiable and standard transformer variants (for the same set of hyperparameters). In the paper, our aim was not to achieve SOTA but to provide an identifiable variant. There, we might have used a slightly different set of hyperparameters as compared to this repository (which still requires hyperparameter search).
I will be happy to share the exact set of hyperparameters we used in the paper :).
please contact me at<EMAIL_ADDRESS>

Thanks a lot! I have sent you an email. Looking forward to your reply.

Hi!
Rishabh Bhardwaj
On Fri, Oct 1, 2021 at 10:41 PM WJX @.***> wrote:

Thanks a lot! I have sent you an email. Looking forward to your reply.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/declare-lab/identifiable-transformers/issues/2#issuecomment-932290438,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH2TKC2PLIDQCJLSQSW75WDUEXCBHANCNFSM5E7GKIWA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Sorry, I am unable to find your email. Could you please try again?

sorry for replying late, I sent you an email again :)


Warnings when parsing hash:  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#size defined in Hash. This can cause unexpected behavior when acces sing the key via as a property. You can still access the key via the #[] method.

Many warnings are being outputed when initializing a mash with the following code:
url = 'http://www.zoover.nl/api/fetch-entities;entities=%5B%7B%22resource%22%3A%22review_view%22%2C%22dataType%22%3A%22accommodationReviews%22%2C%22params%22%3A%7B%22query%22%3A%22parents.id%3A%5C%2249ba3bb1-c82d-45cf-87d0-014890eb182b%5C%22%22%2C%22sort%22%3A%22entryDate%3Adesc%22%2C%22details%22%3A1%2C%22size%22%3A10%2C%22offset%22%3A0%7D%7D%5D?returnMeta=true'
Hashie::Mash.new JSON.parse http.get(page_url).body

This is by design. The size value conflicts with the built-in Hash#size method so it won't show what you're expecting. The warning is there to protect you from that.
If you don't care about the conflict, you can disable warnings in subclasses of Mash:
class Response < Hashie::Mash
  disable_warnings
end

Thanks!

After revisiting this, I think this warning should only be shown during manual set of built-in keys and not from initialization.

I disagree. Having keys set that conflict with built-in methods is the number one reported issue we have. This feature helps people realize that they may experience behavior that is unexpected and encourages them toward a better API design or forces them to disable warnings within a specific context.


glTF model references separate files but no resourceDirectory is supplied Error when upgrading legacy 3d tiles

Command: 3d-tiles-tools upgrade -i ./tiles/tileset.json -o output -f
Error:  ERROR (upgrade): Failed to upgrade Tile_+000_+000_+000_L20_00000.b3dm: RuntimeError: glTF model references separate files but no resourceDirectory is supplied
test tiles
I tried to read the source code and found out the error is thrown by gltf-pipeline code. The options param doesn't have a resourceDirectory field so the program don't know where to find the separated shader and image files. I don't know how to fix it though.

@javagl is it possible for 3d-tiles-tools to internally pass through resourceDirectory to gltf-pipeline?

@lilleyse It does pass through the resourceDirectory (or rather: all options) for the standard upgrade command. That was point 1. from the answer above, and this should already solve the main part of this issue.
It does not (yet?) pass it through when the targetVersion=1.1 is set, because it takes a different path there - roughly: migrating instead of (only) upgrading. There, it handles the case of glTF 1.0 only with a "last minute" call to the gltf-pipeline (just before obtaining the glTF-Transform Document). So the resourceDirectory could be passed through there as well. It wouldn't be sooo nice, because it's either these (untyped) options:any or the hard-to-explain resourceDirectory:string that has to be passed through several methods, but I'll have another look at how this could be done.

EDIT: Maybe I misunderstood this. Maybe you meant to always pass the resourceDirectory to gltf-pipeline, regardless of whether it was given at the command line? That could be doable as well, with some care about input/output being 3DTILES/3TZ and such. I can have another look...

Yes, that's what I was suggesting

Yeah, this might be doable, but ... may be a bit awkward, and often not make sense. Literally none of the code works with "files". It obtains a Buffer from a TilesetSource (based on a URI string), does something, and writes it back to a TilesetTarget. Passing a "file path" along would not work when the input is a 3DTILES or 3TZ file.
(We might consider changing the resourceDirectory of gltf-piepline to a function (p: string) => Buffer as a similar generalization, but maybe that's out of scope).
So .... it might be technically possible, for the case of input files .... the question is then rather: Can it be implemented in a form that isn't toooo ugly.

A few first analysis steps:
1. The error message is indeed coming from gltf-pipeline. The B3DM files of the input contain to glTF 1.0 (GLB) files. The gltf-pipeline is used to update these to glTF 2.0 (involving some guesses and best-effort steps...). Now, the structure of the tileset here is a bit unusual: The GLB files refer to external textures (which are given as JPG files). Usually, these should be contained in the GLB itself.
However, this can be solved by passing in the resourceDirectory to the upgrade command. (The options are untyped and not documented extensively, but ... you know, JavaScript, you can throw in whatever you want). So it should be possible to perform the upgrade with a call like this: 3d-tiles-tools upgrade -i ./input/tileset.json -o ./output/tileset.json -f --options --resourceDirectory ./input/ (Note the --resourceDirectory ... part that basically points to the place where the JPG files can be found)
2.. But...
There seems to be something wrong with one of the input B3DMs. All of them seem to use a really old legacy version of B3DM. And that's ... "ok-ish". The upgrade should be capable of handling exactly that. But the Tile_+000_+000_+000.b3dm file seems to be "invalid/broken" in some way (even for the legacy format). I have not yet analyzed this in detail. It does not seem to be used in the tileset.json after all - maybe it can just be deleted? Otherwise, I'd have to dive into that, and see whether its contents could be salvaged...
3. The bounding volume is waaay off
Loading the original (legacy) tileset in CesiumJS and showing the bounding volume gives this:

The fact that the content is not contained in the bounding volume will cause all sorts of rendering glitches, eventually. And ... this is not fixed via the upgrade process either.
There are some potential options for fixing the bounding volumes. But for now, this would only be a quick workaround for something that could/should be addressed more holistically via something like #106

Thank you so much for the details! I'll try it out on Monday when I have access to my work computer with other models.
We have very old and off-specification 3d tiles and people who write the generators didn't try to upgrade them. Sigh. I'll inform them about the bounding volume bug.
It's a relief the tool works on our model (I tested it on the test tiles I uploaded). I appreciate you guys' work.

If there are any problems with the other/full models (beyond the root B3DM file, which apparently is ~"broken"), then just drop a note here, preferably with further infos and maybe example data.
Even when the upgrade command cannot handle a certain unusual, obscure legacy input, there is a good chance that a few lines of custom code could make it work. And depending on what the input is, it might even make sense to handle this sort of input in the upgrade command in the future. For example, the B3DM with external JPG are something that should probably be handled (and I'll either leave this issue open, or track this in a new issue...).

@javagl I tried the workaround with a full 3d tiles model, and sadly, that didn't work.
The --resourceDirectory approach seems only works when all the b3dm are directly in the "resource directory", not in any subdirectories.
a minimal test model
I have to pass --resourceDirectory ./Tile_+006_+003 to make the upgrade work, but there are other subtrees.

And depending on what the input is, it might even make sense to handle this sort of input in the upgrade command in the future. For example, the B3DM with external JPG are something that should probably be handled

I seems like this kind of problem can only be solved by the 3d-tiles-tools side to provide resource directories relative to the b3dm files to gltf-pipeline.

I see. When there are multiple B3DM files in different subdirectories, and each of them would require a different resourceDirectory, then passing a single, "global" resourceDirectory as an option to the gltf-pipeline won't be sufficient.
(I'm more and more strongly considering to just open a PR into gltf-pipeline to optionally pass in some resourceResolver: (p: string) => Promise<Buffer>, but there are some aspects that have to be sorted out for that...)
I'll have a close look at the example that you attached ASAP, and ...

will try to see if this can easily be handled with a small, custom ("workaround") upgrade script
or there is a way to transparently pass the "proper" resource directories to the gltf-pipeline calls (but that may require a bit more though)

I had a short look at the latest attachment. It still seems to have a structure that could be processed with the resourceDirectory parameter (because the paths to the shaders are stored as starting with ../Shaders). But I think that I understood the problem in general - namely, potentially having to define multiple resourceDirectory values, one for each B3DM file.
I therefore tried to create a test data set, based on the initial one, where I just moved two of the tiles into TileA and TileB subdirectories. I hope this matches the structure of the actual data. I'll attach it here for reference:
manual-input-2024-03-25.zip

Now, as I said, it should be possble to do the update manually, with a small workaround script. Based on the current state of the 3d-tiles-tools repo, it should be possible to put the following into the root directory of the project, and execute it with
npx ts-node ManualUpgradeIssue109.ts
It essentially does what is usually done by the upgrade command under the hood. (Some parts are omitted. For example, it does not handle I3DM files. If the real input involves I3DM files, some aspects may have to be tweaked here).
The upgrade of the tileset.json is done as it was done originally, as part of the upgrade.
The upgrade of the B3DM files is "carved out",  into a processEntry function (and I added a few comments there). This function will now determine the resourceDirectory that has to be used, for each B3DM, and pass this to the actual upgrade function as part of the options for gltf-pipeline.
(Note: Adjust the sourceDirectoryRoot and targetDirectoryRoot in the code according to your input/output directories, respectively)
import path from "path";

import { ContentDataTypes } from "./src/base";
import { Tileset } from "./src/structure";
import { Schema } from "./src/structure";
import { TilesetEntry } from "./src/tilesets";
import { BasicTilesetProcessor } from "./src/tools/tilesetProcessing/BasicTilesetProcessor";
import { TilesetObjectUpgrader } from "./src/tools/tilesetProcessing/upgrade/TilesetObjectUpgrader";
import { TilesetUpgradeOptions } from "./src/tools/tilesetProcessing/upgrade/TilesetUpgradeOptions";
import { ContentUpgrades } from "./src/tools/contentProcessing/ContentUpgrades";

const sourceDirectoryRoot = "D:/manual/";
const targetDirectoryRoot = "D:/manual-out/";

const sourceName = path.resolve(sourceDirectoryRoot, "tileset.json");
const targetName = path.resolve(targetDirectoryRoot, "tileset.json");

// Process a single entry of the input. This is called for all files
// of the input tileset that appear as content URI.
//
// The 'sourceEntry' a structure with these properties:
// - key: string   // The name of the content, like "/example/tile.b3dm"
// - value: Buffer // The content of that file, as a buffer
//
// The 'type' is one of the strings defined in 'ContentDataTypes'.
//
// The function returns a 'target entry', which contains
// - key: string   // The same as the source entry key
// - value: Buffer // The upgraded file contents
//
// For most file types, the target entry will be the same as the
// source entry. ONLY for B3DM files, the target entry value
// will be a buffer that contains the upgraded B3DM data.
//
const processEntry = async (
  sourceEntry: TilesetEntry,
  type: string | undefined
) => {
  // All files except for B3DM files remain unmodified
  if (type !== ContentDataTypes.CONTENT_TYPE_B3DM) {
    return sourceEntry;
  }

  // For B3DM files, determine the 'resourceDirectory' for
  // the gltf-pipeline, based on the source root directory
  // and the (relative) path that of the URI that points
  // to the B3DM
  const b3dmPath = path.resolve(sourceDirectoryRoot, sourceEntry.key);
  const b3dmDir = path.dirname(b3dmPath);
  const gltfUpgradeOptions = {
    resourceDirectory: b3dmDir,
  };
  console.log(
    "Upgrade " + sourceEntry.key + " with resource directory " + b3dmDir
  );
  const targetValue = await ContentUpgrades.upgradeB3dmGltf1ToGltf2(
    sourceEntry.value,
    gltfUpgradeOptions
  );
  return {
    key: sourceEntry.key,
    value: targetValue,
  };
};

async function run(tilesetSourceName: string, tilesetTargetName: string) {
  const overwrite = true;
  const processExternalTilesets = true;
  const tilesetProcessor = new BasicTilesetProcessor(processExternalTilesets);
  await tilesetProcessor.begin(tilesetSourceName, tilesetTargetName, overwrite);

  // The default options for the upgrade. (These mainly
  // refer to the tileset JSON upgrades)
  const upgradeOptions: TilesetUpgradeOptions = {
    upgradeExternalTilesets: true,

    upgradedAssetVersionNumber: "1.0",
    upgradeRefineCase: true,
    upgradeContentUrlToUri: true,
    upgradeEmptyChildrenToUndefined: true,

    upgradeContentGltfExtensionDeclarations: false,

    upgradeB3dmGltf1ToGltf2: true,
    upgradeI3dmGltf1ToGltf2: true,

    upgradePntsToGlb: false,
    upgradeB3dmToGlb: false,
    upgradeI3dmToGlb: false,
  };

  // Perform theu upgrade of the tileset JSON with the default options
  await tilesetProcessor.forTileset(
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    async (tileset: Tileset, schema: Schema | undefined) => {
      const tilesetObjectUpgrader = new TilesetObjectUpgrader(upgradeOptions);
      await tilesetObjectUpgrader.upgradeTilesetObject(tileset);
      return tileset;
    }
  );

  // Process all entries (files) in the input that are
  // considered to be "tile content". In "processEntry",
  // only B3DM files will be considered
  await tilesetProcessor.processTileContentEntries(
    (uri: string) => uri,
    processEntry
  );

  await tilesetProcessor.end();
}

run(sourceName, targetName);

When running this locally, based on the test data, then the output is something like
Upgrade TileA/Tile_+000_+000_+000_L16_0.b3dm with resource directory D:\manual\TileA
Upgrade TileB/Tile_+000_+000_+000_L17_00.b3dm with resource directory D:\manual\TileB

showing that it seems to pick up the right resourceDirectory for each of the B3DMs.
So if this works in principle, we can think about how to make this part of the standard upgrade command.
(Technically, this should be easy, but this snippet uses the global sourceDirectoryRoot variable to determine the full resourceDirectory, and ... we'll have to find a nice way to do this without this global variable...)

I run the script and an The "path" argument must be of type string. Received undefined error was thrown.
I set the  sourceDirectoryRoot and targetDirectoryRoot variables back and uses the model you attached, and it works fine.
I'll have a deeper look at the error and send you a feedback tomorrow.

From the message, a first debugging step could be to either insert a log like
console.log("Resolving " + sourceEntry.key + " against " + sourceDirectoryRoot);
const b3dmPath = path.resolve(sourceDirectoryRoot, sourceEntry.key);

or run it in a debugger. (If you can share data where the error happens, I can have another look as well)

Sorry for the late reply. I was quite busy yesterday.
I found out the error occured because of const sourceContentUri = content.uri in line 426 of BasicTilesetProcessor.ts, the content object has a url field rather than uri. I replaced it with const sourceContentUri = content.uri || content.url and the upgrading succeeded.
Thanks a lot for the help.

That's a bit surprising: There is a flag for that, upgradeContentUrlToUri in the upgradeOptions. So upgrading the content.url to content.uri should actually be done by the TilesetObjectUpgrader. And this change should then already be picked up during the content upgrades. I'll try to reproduce this locally, maybe I can figure out why that happened.

As I said above: The cases where a content uses a (legacy) url property instead of a uri property should already be handled by the upgrade.
Two steps for analyzing that further could be:
One could add
Loggers.get("upgrade").level = 'trace';
at the top of that workaround script, to set the log level for the "upgrade" part to trace. I tried this out with a tileset where I manually changed the uri to url, and it caused the expected messages to be printed:
DEBUG (upgrade): Upgrading content.url to content.uri
TRACE (upgrade):   Renaming 'url' property for content TileA/Tile_+000_+000_+000_L16_0.b3dm to 'uri'
TRACE (upgrade):   Renaming 'url' property for content TileB/Tile_+000_+000_+000_L17_00.b3dm to 'uri'

(I have to check whether this might not work as expected in the case of external tilesets. These should just undergo the same upgrade process, but maybe there's a corner case that is not considered)
The other step (already mentioned above) would be to add the log statement at
console.log("Resolving " + sourceEntry.key + " against " + sourceDirectoryRoot);
const b3dmPath = path.resolve(sourceDirectoryRoot, sourceEntry.key);

and if this receives undefined, one could try to figure out where this undefined comes from (with a breakpoint/debugger run).


[Bug]: Getting NPE for a simple test with the Dead Code Elimination

Description
Getting the following error when running a simple test assertion with string includes API.
This is found while checking url module with dead code elimination(Related task - https://github.com/ballerina-platform/ballerina-library/issues/7339)
[2024-11-06 13:02:06,298] SEVERE {b7a.log.crash} - Cannot invoke "io.ballerina.runtime.internal.values.FPValue.getFunction()" because "<local1>" is null
java.lang.NullPointerException: Cannot invoke "io.ballerina.runtime.internal.values.FPValue.getFunction()" because "<local1>" is null
        at tharmigan.package$test.0.tests.test.test(tests/test.bal:6)
        at tharmigan.package$test.0.lambdas.$_generated1tests.test_execute-generated_1.test$lambda0$(tests/test_execute-generated_1.bal:4)
        at io.ballerina.runtime.internal.scheduling.SchedulerItem.execute(SchedulerItem.java:54)
        at io.ballerina.runtime.internal.scheduling.Scheduler.run(Scheduler.java:324)
        at io.ballerina.runtime.internal.scheduling.Scheduler.runSafely(Scheduler.java:291)
        at java.base/java.lang.Thread.run(Thread.java:840)

Steps to Reproduce
Try to run the following test with dead code elimination feature:
import ballerina/test;

@test:Config
function test() {
    string result = "a";
    test:assertTrue(result.includes(" "));
}

Compiling source
        tharmigan/package:0.1.0
Duration for unused BIR node analysis : 1ms
    tharmigan/package:0.1.0 : 1ms

Running Tests

        package
[2024-11-06 13:02:06,298] SEVERE {b7a.log.crash} - Cannot invoke "io.ballerina.runtime.internal.values.FPValue.getFunction()" because "<local1>" is null
java.lang.NullPointerException: Cannot invoke "io.ballerina.runtime.internal.values.FPValue.getFunction()" because "<local1>" is null
        at tharmigan.package$test.0.tests.test.test(tests/test.bal:6)
        at tharmigan.package$test.0.lambdas.$_generated1tests.test_execute-generated_1.test$lambda0$(tests/test_execute-generated_1.bal:4)
        at io.ballerina.runtime.internal.scheduling.SchedulerItem.execute(SchedulerItem.java:54)
        at io.ballerina.runtime.internal.scheduling.Scheduler.run(Scheduler.java:324)
        at io.ballerina.runtime.internal.scheduling.Scheduler.runSafely(Scheduler.java:291)
        at java.base/java.lang.Thread.run(Thread.java:840)

        test has failed.

                [fail] test:

                    error("java.lang.NullPointerException: Cannot invoke "io.ballerina.runtime.internal.values.FPValue.getFunction()" because "<local1>" is null")
                                callableName: test moduleName: tharmigan.package$test.0.tests.test fileName: tests/test.bal lineNumber: 6
                                callableName: test$lambda0$ moduleName: tharmigan.package$test.0.tests.test_execute-generated_1 fileName: tests/test_execute-generated_1.bal lineNumber: 4

                0 passing
                1 failing
                0 skipped

                Test execution time : 0.048s
error: there are test failures

Affected Version(s)
Ballerina SwanLake Update 11(2201.11.x)
OS, DB, other environment details and versions
No response
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response

Seems to be happening with langlib function calls.
Reproducible when the function is in the source too, rather than tests.
Source
public function includesFn(string a, string b) returns boolean {
    return a.includes(b);
}

Tests
import ballerina/test;

@test:Config
function test() {
    boolean res = includesFn("foo", "bar");
    test:assertFalse(res);
}

Issue could be related to io.ballerina.projects.UsedBIRNodeAnalyzer.InvocationData#registerNodes since the function pool is not populated for langlibs.

Seems like the error goes away when the start index is provided.
E.g.,
return a.includes(b, 4);

We've added some fixes which are available with 2201.11.0-20241111-101700-af28a18f, can you please check with this version?


Vineyard as XCom backend: issue w serialization?

Describe your problem
On Airflow, switching a DAG to Vineyard XCom I got an error bout data types:
Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/task/task_runner/standard_task_runner.py", line 85, in _start_by_fork
    args.func(args, dag=self.dag)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/cli/cli_parser.py", line 48, in command
    return func(*args, **kwargs)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/utils/cli.py", line 92, in wrapper
    return f(*args, **kwargs)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/cli/commands/task_command.py", line 292, in task_run
    _run_task_by_selected_method(args, dag, ti)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/cli/commands/task_command.py", line 107, in _run_task_by_selected_method
    _run_raw_task(args, ti)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/cli/commands/task_command.py", line 184, in _run_raw_task
    error_file=args.error_file,
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/utils/session.py", line 70, in wrapper
    return func(*args, session=session, **kwargs)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 1332, in _run_raw_task
    self._execute_task_with_callbacks(context)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 1422, in _execute_task_with_callbacks
    RenderedTaskInstanceFields.write(RenderedTaskInstanceFields(ti=self, render_templates=False))
  File "<string>", line 4, in __init__
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/state.py", line 433, in _initialize_instance
    manager.dispatch.init_failure(self, args, kwargs)
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__
    with_traceback=exc_tb,
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/orm/state.py", line 430, in _initialize_instance
    return manager.original_init(*mixed[1:], **kwargs)
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/models/renderedtifields.py", line 58, in __init__
    field: serialize_template_field(getattr(self.task, field)) for field in self.task.template_fields
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/models/renderedtifields.py", line 58, in <dictcomp>
    field: serialize_template_field(getattr(self.task, field)) for field in self.task.template_fields
  File "/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/helpers.py", line 41, in serialize_template_field
    return str(template_field)
  File "/home/airflow/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 1002, in __repr__
    show_dimensions=show_dimensions,
  File "/home/airflow/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 1129, in to_string
    decimal=decimal,
  File "/home/airflow/.local/lib/python3.7/site-packages/pandas/io/formats/format.py", line 533, in __init__
    self.truncate()
  File "/home/airflow/.local/lib/python3.7/site-packages/pandas/io/formats/format.py", line 722, in truncate
    self._truncate_vertically()
  File "/home/airflow/.local/lib/python3.7/site-packages/pandas/io/formats/format.py", line 762, in _truncate_vertically
    self.tr_frame = concat((head, tail))
  File "/home/airflow/.local/lib/python3.7/site-packages/pandas/util/_decorators.py", line 311, in wrapper
    return func(*args, **kwargs)
  File "/home/airflow/.local/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 307, in concat
    return op.get_result()
  File "/home/airflow/.local/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 533, in get_result
    mgrs_indexers, self.new_axes, concat_axis=self.bm_axis, copy=self.copy
  File "/home/airflow/.local/lib/python3.7/site-packages/pandas/core/internals/concat.py", line 230, in concatenate_managers
    b = blk.make_block_same_class(values, placement=placement)
  File "/home/airflow/.local/lib/python3.7/site-packages/pandas/core/internals/blocks.py", line 274, in make_block_same_class
    return type(self)(values, placement=placement, ndim=self.ndim)
TypeError: Argument 'values' has incorrect type (expected numpy.ndarray, got DatetimeArray)

I can confirm that this is a bug, as the datetime type has been tested yet.

Will be fixed ASAP.

can you also please update the package in pip? Thank you so much for all the effort!

can you also please update the package in pip? Thank you so much for all the effort!

I will cut a new release before this Friday.

can you also please update the package in pip? Thank you so much for all the effort!

I will cut a new release before this Friday.

v0.3.7 has been uploaded to pypi. Thanks for your patience!


Elaborate How to install and run this project

read me file should be updated
The Read ME File doesn't Expain Well
It just says u have to use node version 14 while .
It should be more precise cause I have to spent a lot of time figuring out.
I am a gssoc contributor.
i would like to update the readme file so that it would make it easier and precise on how to run this project locally saving others time.

I would like to solve this issue. Please assign this to me.

@Sooraj002 Are u sure you have gone through readme before opening this issue? The installation guide is https://github.com/HITK-TECH-Community/Community-Website?tab=readme-ov-file#setup-the-repository-to-your-local-environment

Yes, I did went through those many times still it took me alot of time (Days) in configuring node 14 and its npm pakage. As the people who are contributing are students , So  I think it should be specified how to use nvm to get node 14 and then how to install npm to install npm .So i thought we should add 2-3 steps which include installing nvm then installing node 14 then installing npm version 6

@Sooraj002  if you are gonna add nvm and steps to get the node version mentioned in the readme, i would be happy to accept this issue. the issue title was misleading


add discovery util

add discovery util
Description & motivation

Checklist

[ ] I have verified that these changes work locally
[ ] I have updated the README.md (if applicable)
[ ] I have verified that existing unit tests pass (may need to run dbt seed first)
[ ] I have added a unit test for each new macro I created and I have verifed that these new unit tests pass.

lgtm!


A simple vector with warnings does not highlight the node

Discord username
No response
What type of issue is this?
Permanent – Occurring repeatably
Is this issue blocking you from using Enso?

[ ] Yes, I can't use Enso because of this issue.

Is this a regression?

[ ] Yes, previous version of Enso did not have this issue.

What issue are you facing?

The above screenshot visualizes warnings, not data. So they clearly are there.
Expected behaviour
Should be wrapped in orange, similar to our regular warnings.

How we can reproduce it?
No response
Screenshots or screencasts
No response
Enso Version
develop
Browser or standalone distribution
Chrome
Browser Version or standalone distribution
110.0.5481.100
Operating System
Linux
Operating System Version
No response
Hardware you are using
No response

More surprisingly, when using the value it will display orange warning when CB is open (it will disappear afterwards.

In CLI, it works as expected. The following snippet produces "[bla]":
from Standard.Base import all

main =
    vec = [Warning.attach "bla" 1]
    IO.println <| Warning.get_all vec . map (_.value)

In other words, having any element in a vector with a warning attached also attaches the warning to the whole vector. So, the issue is probably on the IDE side, how the IDE visualizes that?

Update
Seems most likely related to language-server and that language-server in its expressionUpdates message does not fill in the payload.warnings parameter correctly for, e.g., [Warning.attach "foo" 1].

I think the problem is in ProgramExecutionSupport:354 - it checks for WithWarnings, but Vector isn't being wrapped by that class, it has withWarnings field. We should be using WarningsLibrary instead.


language packs support

Describe the solution you'd like
Need funcional to add language pack files for translating interface. I imagine as a folder in which there will be many files with different languages. Anyone will be able to create their own file and translate the default file with an English translation into their native language. Then select the language in the site menu, and the interface will be translated according to the translation in the file corresponding to the language.

news?

Since #5760 has been merged, it's possible to add new languages and change few translations in the UI.
Take a look at https://github.com/DefectDojo/django-DefectDojo/tree/dev/dojo/locale/en/LC_MESSAGES

You could integrate crowdin.com with the product to facilitate translation into different languages.
They have a version for opensource tools to facilitate the languages to other users.


How to get the best parameters for a new dataset?

Hi,
It is very nice of you to provide the best parameters for the datasets you used.
An important question is how to get them, especially for another new dataset. How to get the file "cora_graph_2_logits.pkl under the path "data/edge_probabilities"".

Hi, i think those were generated with VGAE (included under vgae/)

I see, let my try.
Thank you!


How to wait for OnInitializedAsync with HttpClient?

thanks for great library first of all.
I still cannot figure out how to unit test a page/component which has HttpClient injection and call the service in component lifecycle such as OnInitializedAsync.
Any sample or advice?

Hi @kenakamu, thanks for the kind words.
As for your question, without more information, it's a little hard to help. Can you provide a (simple) sample of the component you are trying to test, and the test you are trying to write, then I will be happy to assist.

@kenakamu I think you mean this:
If you have a component which takes an injected interface as dependency, you can just mock this dependency and setup your test to use this mock.
private readonly Mock<IHttpClient> _httpClientMock;

and then setup:
Services.AddSingleton(_stringLocalizerMock.Object);

For an example which uses an injected IStringLocalizer, see:
https://github.com/Blazored/FormExtensions/blob/master/tests/Blazored.FormExtensions.Tests/LabelTextIntegrationTests.cs#L22
And you can use your mocking framework of your own choice.

I could mock the HttpClient by looking into old commit. The issue is I don't know how to "wait" for the http call to be completed. I am adding unit test for following sample code which comes from blazor workshop.
@page "/"
@inject HttpClient HttpClient

        @if (specials != null)
        {
            @foreach (var special in specials)
            {

                        <span<EMAIL_ADDRESS>                        @special.Description
                        @special.GetFormattedBasePrice()

            }
        }

@code {
    List<PizzaSpecial> specials;

    protected override async Task OnInitializedAsync()
    {
        specials = await HttpClient.GetFromJsonAsync<List<PizzaSpecial>>("specials");
    }
}

When I render index page, the body doesn't have  as expected, now I dont know how to wait OnInitilizeAsync complete so that I can assert generated li.

ahh, in that case you should look to the methods WaitForState or WaitForAssertion, e.g.:
[Fact]
public void Test()
{
    var pizzaSpecials = ...
    var mockHttpClient = ...
    Services.AddSingleton<HttpClient>(mockHttpClient);

    var cut = RenderComponent<ComponentName>();
    mockHttpClient.SetResponse(pizzaSpecials);

    cut.WaitForState(() => cut.FindAll(".pizza-cards > li").Count > 0); // blocks until the predicate passes or the timeout is passed (default 1 sec).

   cut.WaitForAssertion(() => Assert.Equal(pizzaSpecials.Count, cut.FindAll(".pizza-cards > li").Count)); // blocks until the assertion doesn't throw, i.e. passes.
}

Ps. if you want to avoid that null check in your component, you can use Array.Empty<PizzaSpecial>, e.g.:
@page "/"
@inject HttpClient HttpClient

            @foreach (var special in specials)
            {

                        <span<EMAIL_ADDRESS>                        @special.Description
                        @special.GetFormattedBasePrice()

            }

@code {
    ICollection<PizzaSpecial> specials = Array.Empty<PizzaSpecial>();

    protected override async Task OnInitializedAsync()
    {
        specials = await HttpClient.GetFromJsonAsync<List<PizzaSpecial>>("specials");
    }
}

Here is a related issue on mocking http client: https://github.com/egil/bunit/issues/56

Okay, I missed
 mockHttpClient.SetResponse(pizzaSpecials); // e.g. do what

Thanks a lot


Bracket missing at FlagMessage Command

Bracket missing at the 10th line of Flag Message Command

Nice catch, thanks!


Full static typing

I'd like to try fully type hinting this package, but there's a few design questions that I'm not sure about:
Should this have a dependency on typing_extensions, or should it avoid that like trio does? Using it means code can be simpler and more things would be valid to do at runtime, but I can prevent those imports to make it still work without the dependency.
ResultCapture itself I don't think can be typed correctly, due to the way *args/**kwargs are accepted in two different methods. ParamSpec requires those to always occur together with each other, to ensure that all combinations of positional/keyword args can be passed validly. So I think manually constructing ResultCapture wouldn't be able to check positional arguments are passed correctly, though we could still check the return type. Regardless, ResultCapture.start_soon() would be fully checkable by using TypeVarTuple scoped just to the classmethod.
The _aio module is going to very much confuse type checkers, but what we can do is use if TYPE_CHECKING to treat Nursery/Event/SendChannel as protocols, that just require objects with the methods we use. That would work fine since none of the public APIs return one of those, we only consume them. Alternatively we could just let the type checker produce warnings about missing imports if trio/anyio is not installed.

Exciting! 😀
I have no objections to a dependency on typing_extensions. But then I only heard of it today! You're very much the expert on typing here, so if you think it's a good idea then go for it.
It's a pity if not everything can be typed correctly but I'm not totally surprised. Does it help if we assume **kwargs passed to run can only ever be task_status=... (or empty)?
Protocols (now that I've just googled them) sounds perfect for the types in _aio.py. Why not just use them unconditionally? The exception is I like how the current scheme looks in the docs but it would be easy to arrange to use that when generating docs (and the docs generation can assume trio and anyone are both installed).


Exclude certain kinds of dictionary tables from being interpreted as tables

This PR will:

Restore behaviour broken by Tables 1.8 by explicitly excluding the following objects from the ScientificTypes.jl definition of "table":

Abstract dicts with String keys
Abstract vectors of abstract dicts with String keys

Improve the scitype docstring (#185)

According to local testing, this PR will resolve https://github.com/JuliaAI/MLJText.jl/issues/25 .

@bkamins Be great if you could have a look at this, thanks.

Codecov Report

Merging #189 (124681f) into dev (6ab77cf) will decrease coverage by 0.18%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev     #189      +/-   ##
==========================================
- Coverage   93.50%   93.31%   -0.19%
==========================================
  Files           6        6
  Lines         431      434       +3
==========================================
+ Hits          403      405       +2
- Misses         28       29       +1

Impacted Files
Coverage Δ

src/ScientificTypes.jl
100.00% <100.00%> (ø)

src/convention/scitype.jl
93.18% <100.00%> (ø)

src/schema.jl
89.42% <0.00%> (-0.97%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Apart from a comment related to https://github.com/JuliaData/Tables.jl/issues/309 I have a general design question that I think would be worth discussing.
The issue is that Tables.istable is only a one-way promise:

Check if an object has specifically defined that it is a table. Note that not all valid tables will return true, since it's possible to satisfy the Tables.jl interface at "run-time", e.g. a Generator of NamedTuples iterates NamedTuples, which satisfies the AbstractRow interface, but there's no static way of knowing that the generator is a table.

This means that is we see true we know that something is a table, but when we see false it does not mean it is not a table. This is indeed unfortunate.
The problem is that some MLJ.jl users can use a table for which Tables.istable returns false. Then they have a problem because your current mechanisms will not let them such a table be treated as a table, but rather it will get :other treatment.
You know the MLJ.jl ecosystem much better than me 😄, so I do not feel qualified to give informed proposals what to do with this, but clearly the sentence:

any table type T supported by Tables.jl

is not true currently. It probably should be made more precise (if nothing is changed) to saying that table is only considered something for which Tables.istable returns true except these two excluded cases. The other solution could be that a separate method would be for something that user explicitly wants to be considered as table, and separate for things not to be considered tables (but I am not sure if this is feasible or convinient, it also might be breaking; so to do not treat this suggestion as something strong).

Given the discussion in https://github.com/JuliaData/Tables.jl/issues/309 and Tables.jl 1.10.0 release the PR should be updated to AbstractString.

@bkamins Thanks for the review and comments. I have now updated the excluded key type from String to AbstractString.

It probably should be made more precise (if nothing is changed) to saying that table is only considered something for which Tables.istable returns true except these two excluded cases.

I have clarified the ScientificTypes.jl documentation to that effect, and raised an issue to do the same in MLJ docs.
As far as allowing tables in MLJ for which Tables.istable is false, I can't think of anything better than adding a wrapper for objects to declare them as bona fide tables, with Tables.jl methods passing through, which I guess is what you are suggesting.  I suppose the main use case in ML for these tables would come from tabular data not fitting into memory. MLJ hasn't really been designed to train using out-of-memory datasets, so this probably fit's into the broader design discussion at, e.g., https://github.com/JuliaML/MLUtils.jl/issues/61 .


services/horizon: Liquidity Pool reserves reported on trade effects are current, not historical

What did you do?
Visit: https://horizon.stellar.org/operations/163710954889203714/effects
Observe the liquidity pool reserves on the last effect. Those are the current liquidity pool reserves, not the ones when the trade was made. If the liquidity pool is removed, it might not even find the pool? Not sure.
What did you expect to see?
The historical reserves before (after?) the trade. (or nothing)
With the dust trade filtering we will be storing the liquidity pool reserves on each trade,so we could show those.
What did you see instead?
The current reserves.

Was looking at the wrong place in the code, I think.

The reserves are chucked into the jsonb history_effects.details column
https://github.com/stellar/go/blob/a947f2f1850618bc02f900c302fa1fb86d8a4371/services/horizon/internal/ingest/processors/effects_processor.go#L1319


Vim swap file conflict not handled gracefully

Category

[ ] fzf binary
[ ] fzf-tmux script
[ ] Key bindings
[ ] Completion
[x] Vim
[ ] Neovim
[ ] Etc.

OS

[ ] Linux
[ ] Mac OS X
[ ] Windows
[ ] Windows Subsystem for Linux
[ ] Etc.

Shell

[ ] bash
[ ] zsh
[ ] fish

When using fzf to open a file, if Vim warns about an existing swap file and you choose to Abort, an error is displayed.
Steps to repro:

create and open a file in Vim

touch foo && vim -u NONE foo

put Vim in background (Ctrl-Z)
start a second Vim instance using fzf

vim -u NONE +'source fzf/plugin/fzf.vim' +'FZF'

select foo
when Vim warns about an existing swap file, hit A to abort

Displayed error:
Error detected while processing function <SNR>1_cmd[15]..fzf#run[69]..<SNR>1_callback:
line   33:
Vim:Interrupt

The swap file warning is described under :help E325, and I see a corresponding catch that I guess in meant to suppress the error I'm seeing, but is not matching it:
catch
  if stridx(v:exception, ':E325:') < 0
    echoerr v:exception
  endif
endtry

fzf version: 0.17.3
Vim version 8.0.1605

Works great, thanks for the fix!


DNS keep retrying different qtypes on hard error(s) from DNS server

Is there an existing issue for this?

[X] I have searched the existing issues

Kong version ($ kong version)
Version 3.0.2
Current Behavior
By looking at the source code and also the end behavior, when DNS server is hard down, settings like RES_OPTIONS      = "timeout:1 attempts:2" fail the request after 4s instead of 2s. This is because you try SRV first, that fails, and then you try A and that fails but each of these take 2s to fails, so total of 4s.
Expected Behavior
I would expect that if you get a hard error from DNS during SRV resolution, you should stop right there because even if the A query succeeds, you are actually doing the wrong thing because we want the SRV to be respected first. The A record will not work as intended and if you were to cache and try to serve that, you will be returning different type of errors that will be hard to debug.
Steps To Reproduce
No response
Anything else?
No response

Thank you!

Please let us know if the fix is OK.


Implement pipenv, and write documentation.

This bot should be using the excellent pipenv instead of requirements.txt, but because the former is less known than the latter, it is important that we also write documentation explaining exactly how to get this project set up.
This issue asks that you create a pipfile, then write the documentation in this repos wiki to explain what pipenv is, and how to use it for this project. The article should include the exact commands the user has to run.
Once this is done, CONTRIBUTING.md should be updated with a link to the wiki article.
Please wait for #2 to be merged before attempting this issue. First to claim the issue gets dibs on the pull request.

I'll give this a whirl.
Which version of Python should be required for hacktoberbot? 3.6 or 3.7?

I can't edit this project's wiki so I've added a draft to my fork for review:
https://github.com/sco1/hacktoberbot/wiki/Hacktoberbot-and-Pipenv


Standardize error print and logging

What this PR does / why we need it: This is to achieve Istio security production readiness for V0.3.
Release note:

@myidpt: Adding do-not-merge/release-note-label-needed because the release note process has not been followed.

One of the following labels is required "release-note", "release-note-action-required", or "release-note-none".
Please see: https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#write-release-notes-if-needed.
Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.


Fix component prop type validation to use elementType

Fix #320.

Hi @cheets , I think that @youf-olivier fixed it also in https://github.com/AxaGuilDEv/react-oidc/pull/314
but I do not know why, he do not merge it.

Hi, yeah I see he did some changes, the commit name was a bit misleading there so couldn't find it at first. I would still recommend using elementType instead of oneOfType([PropTypes.node, PropTypes.func]) if you take a look behind the reasoning in prop-types repository PR.
Also at least OidcRoutes.js isn't fixed in #314.

I just merged It, but I just wanted to fixed errors for pure Components. Youre solution seems better :)
I Think it's a Good PR, you just have to fix these conflicts.


Example of how to send metrics to the log.

This adds an example of how to create a MeterRegistryFactory that
emits metrics to the log. In this example the metrics are emitted to
the process log every 1 minute using the logger name LoggingMeterRegistry.

I'm torn on whether or not we should merge this. The IT doesn't really test anything, it uses MAC to generate the log entries. Maybe there is a better place to put this? Maybe we just mark the test as Disabled so that it doesn't increase the build times?

I've been working on a Prometheus example for metrics that will live in accumulo-examples.  I could expand that to also demo the LoggingMetrics.  That way it would exist, but not be part of the code base.

Ok, I'm fine with parking this here for now until we have somewhere to put it.

Suggestion from @ctubbsii is to make this the reference implementation, but disabled by default.

Closing in favor of #4459


Move billing code from zilencer to corporate

Great! Will need Tim's review, but we can start building on top of this PR for all the other billing stuff.

Merged all but the last commit (the one with the migration), to make it easier to continue working on billing stuff. Will definitely want a post-merge review by Tim (as well as merging the migration).

oh wow, git automatically moved all my changes into corporate on rebase. :100:

Looks great; rebased, updated the migration numbering, and merged, thanks @hackerkid and @rishig!


Speed up HashCode's equals check via specialization and hashCode guard

Speed improvements:

Ad-hoc perf test for up-to-date assemble on largeJavaMultiProject with local build cache enabled (parallel true)
The solution is similar to how UUID stores the 128 bit id.

The link above was to a different adhoc test, so I ran the one you wanted. The results were inconclusive (only 90% confidence) and the CPU profile does not show HashCode.equals at all (neither before or after).

This PR has gone stale and didn't show conclusive performance improvements in our performance suite.


The ability for oneshot to print/return information about the GET request (for oidc flows)

When doing development / debug / testing of oauth/openid flows - the interactive web browser portion finishes with a redirect to a URL that is meant to receive the authorisation code in a URL param (at which point it will go and do some code exchanges).
Scripting testing of this in something like bash is painful - but I think oneshot with very minimal additions could help out.
As a proof of concept - I used oneshot like this
 oneshot -D -S 'echo "$QUERY_STRING"'

and set up my oauth redirect to http://<IP_ADDRESS>:8080.
I initiated my oauth flow in bash, launched a browser to do the login portion, and see that the page then redirects to oneshot with a GET of
http://<IP_ADDRESS>:8080?code=ABCDEFGH&state=XYZ
(i.e. the browser shows the output of the shell/CGI and then exits .. code=ABCDEFGH&state=XYZ)
However, I have no way of getting that information out of the invocation of oneshot in my bash script. I was thinking of a series of command line flags that would instruct oneshot to print this information on the end of the request.
So something like
--echo-from-client query_string
where the sky is the limit for what details of the client could be shown. I'd possibly start with any of the variables that are in the environment of the CGI launch.
query_string
http_user_agent
remote_host
http_accept

So the expected invocation pattern would be
QUERY=$(oneshot -q -D -S 'echo "Thanks"' --echo-from-client query_string)
I realise this is a bit outside the box from what oneshot was intended for - but does fall into the category of things that I need a http server that only responds once for!

I realise this is a bit outside the box from what oneshot was intended for ...

Not at all. I think of oneshot as not just a file transfer utility but also as a tool for developers to use in their workflows; makes sense to me to include this.
I like the idea of exposing several parts of the incoming request; the entire query string, the url params, headers, etc...
Basically this struct: https://pkg.go.dev/net/http#Request
However, I'm not sure how the output should be formatted; I'm thinking adding a --json-output flag and possibly even a --template-output flag (for user defined templated output using tfortools) might be a good solution. So by default the user would get the same human-readable output that oneshot currently spits out, but if the user wants to use oneshot in pipeline/workflow they could then opt for machine-readable output. Your thoughts on this would be appreciated if you would care to share them :slightly_smiling_face:

I think getting the info out at all was my first thought - and I hadn't really thought about the formatting.
Agree with you that there are probably two use cases - one for users by default that just displays something friendly.. and a machine readable output for pipeline/workflows. I think that sounds sensible to me.

If there is a flag that gets the entire incoming request structure to output as JSON - it is certainly trivial to process that with jq (etc) so that is a good solution for me


Deal with API.getDocument in LiveTextEditor

Since the refactor of the documents and blocks, the call to API.getDocument must be reviewed.

fixed by #c3953bc4f4c33d61923ce8f77e1203223f75723f

fixed by commit c3953bc4f4c33d61923ce8f77e1203223f75723f


included data serialized with DataArraySerializer, when ArraySerializer is specified

When I want to include some other Transformers, it seems that the included data is serialized with the default DataArraySerializer instead of the one I setup (in my case the ArraySerializer).
I have 2 entities, let's say "product" and "category". I want to parse a category, and a category can have multiple products.
I have setup it like this:
$manager = new Manager();
$manager->setSerializer(new ArraySerializer());

$category = Category::find(1);
$resource = new Item($category, new CategoryTransformer);

$data = $manager->createData($resource)->toArray();

The CategoryTransformer looks like:
class CategoryTransformer extends TransformerAbstract
{

    protected $availableIncludes = ['products'];
    protected $defaultIncludes = ['products'];

    public function transform(Category $category)
    {
        return [
            'id' => $category->id,
            'name' => $category->name
        ];
    }

    public function includeProducts(Category $category)
    {
        $products = $category->products;
        return $this->collection($products, new ProductTransformer());
    }

}

And ProductTransformer just returns the name of a product.
The result I get for the root object is as expected (without the data key), but the products key first has a data key like this:
{
  "id": "1",
  "name": "Category 1",
  "products": {
    "data": [
      {
        "name": "Article 1"
      },
      {
        "name": "Article 2"
      }
    ]
  }
}

The result I would expect is:
{
  "id": "1",
  "name": "Category 1",
  "products": [
      {
        "name": "Article 1"
      },
      {
        "name": "Article 2"
      }
    ]
}

Hi, you can create a serializer, in which you can transfer resourceKey = false in order to get rid of the "data" key
Serializer:
<?php

namespace App\Serializers;

use League\Fractal\Serializer\ArraySerializer;

class WithoutIncludeDataArraySerializer extends ArraySerializer
{

    public function collection($resourceKey, array $data)
    {
        if($resourceKey === false){
            return $data;
        }
        return [$resourceKey ?: 'data' => $data];
    }

}

and use:
$this->collection($products, new ProductTransformer(), false)

Oof, this is a long time ago. Looking at my description I already removed the $resourceKey with the ArraySerializer but it didn't removed it in the nested included transformers.
I'm not sure if this is stil happening, because it's been too long.
I'll close it for now.


Faker doesnt work with phone number implemented with phonelib gem

I am from Nigeria and phone numbers starts with specific numbers like 0817, 0905, 0802 and so on, but there is no one that started with 1234 or so, so if faker generates 11 digits, phone number would be invalid

We use 11 digits in Nigeria

Someone will have to add Nigerian phone number generator to faker if not
already added. Check the locale file for anything from Nigeria. I can try
if no ones done it.
On Sun, Dec 31, 2017 at 7:40 PM Ini Akinleye<EMAIL_ADDRESS>wrote:

I am from Nigeria and phone numbers starts with specific numbers like
0817, 0905, 0802 and so on, but there is no one that started with 1234 or
so, so if faker generates 11 digits, phone number would be invalid
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/stympy/faker/issues/1104, or mute the thread
https://github.com/notifications/unsubscribe-auth/AM4yfH4uRr3bTGtW9EOT1F25VeWnWkLsks5tGCl0gaJpZM4RP9oI
.

Thanks, I don't think it has been added yet

I can try and give it a shot this week. Just generating random Nigerian
style numbers shouldn’t be too hard.  Stay tuned, enjoy the new years!
On Sun, Dec 31, 2017 at 7:46 PM Ini Akinleye<EMAIL_ADDRESS>wrote:

Thanks, I don't think it has been added yet
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/stympy/faker/issues/1104#issuecomment-354630756, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AM4yfCUBlJdjQ9FLklc82r-V3jRvVduUks5tGCrfgaJpZM4RP9oI
.

Alright, Thank you Zane. Happy new year!

So i checked again and found out that someone already did it

The one there raises the same error 'phone number is invalid', so its still an issue

I’ll try and investigate it this week if no one else does
On Sun, Dec 31, 2017 at 9:08 PM Ini Akinleye<EMAIL_ADDRESS>wrote:

The one there raises the same error 'phone number is invalid', so its
still an issue
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/stympy/faker/issues/1104#issuecomment-354633209, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AM4yfJ9XP5LEIIFXJ9GudjgwPDb3KS4rks5tGD4wgaJpZM4RP9oI
.

@inioluwaa Use something like:
FactoryGirl.define do
  factory :phone_number do
    sequence(:number) { |n| "+1234567#{n.to_s.ljust(4, '0')}" }
  end
end

FactoryGirl.create(:phone_number).number

and you'd be fine.

@inioluwaa Use something like:
FactoryBot.define do
  factory :phone_number do
    sequence(:number) { |n| "+1234567#{n.to_s.ljust(4, '0')}" }
  end
end

FactoryBot.create(:phone_number).number

and you'd be fine.

@inioluwaa Use something like:
FactoryBot.define do
  factory :phone_number do
    sequence(:number) { |n| "+1234567#{n.to_s.ljust(4, '0')}" }
  end
end

FactoryBot.create(:phone_number).number

and you'd be fine. I understand that it's not the solution that you were looking for, although it has the same effect.

@inioluwaa You are right. Faker is not ready to work with phonelib. My solution was:
FactoryBot.define do
  factory :phone_number do
    sequence(:number) { |n| "+1234567#{n.to_s.ljust(4, '0')}" }
  end
end

FactoryBot.create(:phone_number).number

I understand that it's not the solution that you were looking for, although it has the same effect.


Optional Chaining has some bugs with array component. (on VSCode)

TypeScript Version:  3.7.3 (release ver)

Search Terms:
Code
interface ContactList {
  group: string,
  list?: {
    name: string,
    tel: string
  }[]
}

const myList: ContactList = {
  group: 'Friends',
  list: [{
    name: 'James',
    tel: '1234-5678'
  }]
}

// OK code
if (myList.list) {
  myList.list.push({name: 'Amy', tel: '2345-6789'}); // Ok.
  console.log(myList.list[0].name); // Ok.
}

// ERROR code
myList.list.push({name: 'Amy', tel: '2345-6789'}); // cause an error : Object is possibly 'undefined'
console.log(myList.list[0].name); // cause an error: Object is possibly 'undefined' (same as above)
console.log(myList.list?[0].name); // cause an error: Property 'name' does not exist on type 'number[]'

Expected behavior:
'OK code'
Actual behavior:
'Error code'
Didn't use optional chaining on first line of 'ERROR code', but myList has defined list so it is not error. Object is not possible 'undefined', but 'defined'.
Third line of 'ERROR code' shows myList.list is array of {name: string, tel: string} but TypeScript recognize it array of number.
Playground Link:
Related Issues:

You're not using optional chaining.  The syntax myList.list?[0].name is interpreted as the conditional operator, and [0] is a number[].  Also note that you get the error : expected after name
The optional chaining operator is alwyas ?., even before bracketed index access.   Try myList.list?.[0].name instead.  (See the tc39/proposal-optional-chaining FAQ.)

You're not using optional chaining. The syntax myList.list?[0].name is interpreted as the conditional operator, and [0] is a number[]. Also note that you get the error : expected after name
The optional chaining operator is alwyas ?., even before bracketed index access. Try myList.list?.[0].name instead. (See the tc39/proposal-optional-chaining FAQ.)

Thank you jcalz, myList.list?[0].name is my fault.
How about the first line of my Error code? I don't understand still yet.

It's working as designed.  myList is annotated as ContactList.  This is not a union type, so there is no control-flow analysis narrowing, #8010 upon initial assignment.  Thus myList is just seen as a ContactList, and its list property is possibly undefined.
Note that this is not a forum for getting help with bugs in your code; it's for reporting bugs in the compiler or making feature suggestions.  If you're doing either of those, you should fill out all the fields in the issue creation template.  "Search Terms", "Playground Link", and "Related Issues" have not been filled out above.  Please either do so or close this issue and consider asking questions elsewhere.  Good luck!

It's working as designed. myList is annotated as ContactList. This is not a union type, so there is no control-flow analysis narrowing, #8010 upon initial assignment. Thus myList is just seen as a ContactList, and its list property is possibly undefined.
Note that this is not a forum for getting help with bugs in your code; it's for reporting bugs in the compiler or making feature suggestions. If you're doing either of those, you should fill out all the fields in the issue creation template. "Search Terms", "Playground Link", and "Related Issues" have not been filled out above. Please either do so or close this issue and consider asking questions elsewhere. Good luck!

Thank you and sorry for my mistake.
I thought it wasn't an error for previous TypeScript version. Because I coded almost over 100k line, but it's the first time to get challenged like this error.
I'll bear your opinion in mind.

It was closed, but in my experience it is something weird.. so I tried code like below,
interface ContactList {
  group?: string,
  list?: {
    name: string,
    tel: string
  }[]
}

const myList: ContactList = {
  group: 'Friends',
}

myList.list = [{
  name: 'James',
  tel: '1234-5678'
}]

and call this line, it works well.
myList.list.push({name: 'Amy', tel: '2345-6789'}); // no error.

I think it is same that initializing and assigning, TS compiler recognize only assigning case to be defined. Is it intended behavior? Maybe so, compiler need to be smarter than now I think.

It is still working as designed.  myList is of a non-union type, but myList.list is a union-typed property.  Assigning to myList therefore does not do control-flow narrowing, but assigning to myList.list does.  It would be great if the compiler could do control-flow narrowing even in non-union types, but it might not be worth degrading compiler performance to do so.
This is possibly a duplicate of or related to #8513, especially this comment.

Got the control-flow narrowing, but still there's a point.
You said control-flow narrowing is only applied to union type except non-union type, and my point is why the compiler does not investigate inner non-union(myList) that has union property(myList.list). Maybe I'm wrong, but I know the compiler has already got the structure of non-union(myList) and there's a union property(myList.list).
If the performance is the problem, I can't understand why is so expensive because it costs only one check for myList.list in case the assigning at declaration. (compiler do not additionally investigate which property in myList is union, because already knows it). If that costs so high, this example(https://github.com/microsoft/TypeScript/issues/35830#issuecomment-568372460) also costs high.
And programmers maybe do like this(https://github.com/microsoft/TypeScript/issues/35830#issuecomment-568372460), then performance is same.
In conclusion, is the compiler costs really high to do the control-flow narrowing only the case for declaration of non-union type variables only that has union property?
PS. Sorry for my English. Not a native man. T.T

It is still working as designed. myList is of a non-union type, but myList.list is a union-typed property. Assigning to myList therefore does not do control-flow narrowing, but assigning to myList.list does. It would be great if the compiler could do control-flow narrowing even in non-union types, but it might not be worth degrading compiler performance to do so.
This is possibly a duplicate of or related to #8513, especially this comment.

At this point you're talking to only me, because the issue is closed.  If you want to reopen it, you should edit the initial post and complete the template.  Good luck.


Credentials.signToUint8List fails with RangeError

Hi there,
I'm looking to sign a message to create an AuthSig for LitProtocol. I've been testing the signToUint8List (and signPersonalMessageToUint8List) functions for that.
Unfortunately both of them fail with a Range error:
RangeError (RangeError (start): Invalid value: Not in inclusive range 0..32: -32)
Seems like some internal problem with the pointycastle/signers/ecdsa_signer.dart.
I've been generating my Wallet from a mnemonic like this:
// Function to handle mnemonic phrase creation
Future<String> createMnemonicPhrase() async {
  final mnemonic = bip39.generateMnemonic();
  return mnemonic;
}

// Function to handle the creation of an Ethereum wallet from a mnemonic phrase
Future<EthPrivateKey> createEthWalletFromMnemonic(String mnemonic) async {
  // Generate a seed from the mnemonic phrase
  final seedHex = bip39.mnemonicToSeedHex(mnemonic);

  // Create a new Ethereum wallet from the seed
  final EthPrivateKey credentials = EthPrivateKey.fromHex(seedHex);
  return credentials;
}

This yields a seemingly correct 64 byte private key, and normal looking address:
Eth Wallet Address: 0xe2895995b51f6509c4d1814e13bfc80925dc67ed
Then, to sign, I'm running this:
String message = "Hello World";
final messageBytes = ascii.encode(message);

// Sign the payload using the user's Ethereum wallet (credentials is type EthPrivateKey)
final signature = credentials.signPersonalMessageToUint8List(messageBytes);

This fails with the above mentioned error message.
I've also tried hashing the message to a 32 byte Uint8List using keccak256, that has yielded the same result:
// Convert the message to bytes
final messageBytes = ascii.encode(message);

// hash the payload using keccak256
final digest = KeccakDigest(256);
final payload = digest.process(messageBytes);

final signature = credentials.signPersonalMessageToUint8List(messageBytes);

Any ideas what might be wrong here? I'm a little out of my depth here 🙃

For some more context, this is a screenshot of the entire call stack for the error:

Found the Issue myself. It wasn't actually a problem with constructing the signature, the failure was with creating the Wallet from the mnemonic phrase. Here's the right way to do that.
// Function to handle the creation of an Ethereum wallet from a mnemonic phrase
Future<EthPrivateKey> createEthWalletFromMnemonic(String mnemonic) async {
  // Constants
  String hdPath = "m/44'/60'/0'/0";

  final isValidMnemonic = bip39.validateMnemonic(mnemonic);
  if (!isValidMnemonic) {
    throw 'Invalid mnemonic';
  }

  final seed = bip39.mnemonicToSeed(mnemonic);
  final root = bip32.BIP32.fromSeed(seed);

  const first = 0;
  final firstChild = root.derivePath("$hdPath/$first");
  final privateKey = HEX.encode(firstChild.privateKey as List<int>);

  // Create a new Ethereum wallet from the seed
  final EthPrivateKey credentials = EthPrivateKey.fromHex(privateKey);
  return credentials;
}


HCC-4807 add authorize ach method

Since the omnipay-cardconnect package is explicitly for card transactions, tweaks needed to be made to be able to authorize ach transactions


Restore the portal-level snapshot after procedure COMMIT/ROLLBACK.

COMMIT/ROLLBACK necessarily destroys all snapshots within the session. The original implementation of intra-procedure transactions just cavalierly did that, ignoring the fact that this left us executing in a rather different environment than normal.  In particular, it turns out that handling of toasted datums depends rather critically on there being an outer ActiveSnapshot: otherwise, when SPI or the core executor pop whatever snapshot they used and return, it's unsafe to dereference any toasted datums that may appear in the query result. It's possible to demonstrate "no known snapshots" and "missing chunk number N for toast value" errors as a result of this oversight.
Historically this outer snapshot has been held by the Portal code, and that seems like a good plan to preserve.  So add infrastructure to pquery.c to allow re-establishing the Portal-owned snapshot if it's not there anymore, and add enough bookkeeping support that we can tell whether it is or not.
We can't, however, just re-establish the Portal snapshot as part of COMMIT/ROLLBACK.  As in normal transaction start, acquiring the first snapshot should wait until after SET and LOCK commands.  Hence, teach spi.c about doing this at the right time.  (Note that this patch doesn't fix the problem for any PLs that try to run intra-procedure transactions without using SPI to execute SQL commands.)
This makes SPI's no_snapshots parameter rather a misnomer, so in HEAD, rename that to allow_nonatomic.
replication/logical/worker.c also needs some fixes, because it wasn't careful to hold a snapshot open around AFTER trigger execution. That code doesn't use a Portal, which I suspect someday we're gonna have to fix.  But for now, just rearrange the order of operations. This includes back-patching the recent addition of finish_estate() to centralize the cleanup logic there.
Discussion<EMAIL_ADDRESS>

#510
修改后，原测试用例正常执行未报错，结果符合预期


Limit travis and appveyor to building master branch and PR commits only.

Decrease travis utilization by 50%

2x reduction in utilization!


AppMaps are organized by workspace in tree view

Fixes #744
Using a workspace with both spring-petclinic and sample_app_6th_ed open:
Before:

After:

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

v0.94.0
GitHub release

Your semantic-release bot :package::rocket:


DBZ-3475 Support for v1beta2 version of Strimzi CRDs

https://issues.redhat.com/browse/DBZ-3475

@jcechace Applied, thanks!


Split coin feature not working.

When I use the split coin feature in my foundry game I get the following error.
lootsheetnpc5e.js:884 Uncaught TypeError: Cannot read property 'data' of undefined
at LootSheet5eNPC._hackydistributeCoins (lootsheetnpc5e.js:884)
at LootSheet5eNPC._distributeCoins (lootsheetnpc5e.js:824)
at HTMLButtonElement. (lootsheetnpc5e.js:198)
at HTMLButtonElement.dispatch (jquery.min.js:2)
at HTMLButtonElement.v.handle (jquery.min.js:2)
Otherwise, the module works great, just can't use this basic feature. Weirdly the issue is only in one of my servers, it works fine in another. I've disabled all modules, restarted the server, created a new loot npc. Nothing has worked. Any help is appreciated.

Same issue

Same issue as well. Some further context for the error. I have 5 users(not actors). When I transfer control of the offending actor from User 1(not working) to Users 2-5, the distribution works again. Any new users I create also duplicate the error. I have also tried rebuilding the sheet for the offending actor from scratch and it renders the same results.


Prometheus Monitoring

The error seems like some kind of connection error while installing torch
Is there a way to rerun the build?

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@c31eb69). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master      #32   +/-   ##
=========================================
  Coverage          ?   51.93%
=========================================
  Files             ?        8
  Lines             ?      466
  Branches          ?        0
=========================================
  Hits              ?      242
  Misses            ?      224
  Partials          ?        0

Impacted Files
Coverage Δ

pipert/core/component.py
94% <100%> (ø)

pipert/core/routine.py
97.6% <100%> (ø)

Continue to review full report at Codecov.

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

@rotemtzaban please resolve the conflicts.
Try to run the monitoring on the docker image of the pipe.

@ItayHoresh I've updated everything to work with compose.
Can you recheck it?