MM-22038: removing deactivate users from open private channels without private messages with me

Summary
Removing deactivate users from open private channels when the users are deactivated users and we don't have a private channel between us.
This is because only makes sense to open a private message with a deactivated user to read a previous conversation.
Ticket Link
MM-22038

I decided to push this to v5.21 because this is not a new regression and I don't how risky this is. Let me know if this is a more urgent issue,

Creating a new SpinWick test server using Mattermost Cloud.

Mattermost test server created! :tada:
Access here: https://mattermost-webapp-pr-4843.test.mattermost.cloud

Account Type
Username
Password

Admin
sysadmin
Sys@dmin123

User
user-1
User-1@123

/update-branch

New commit detected. SpinWick will upgrade if the updated docker image is available.

Mattermost test server updated with git commit 77e78d5124730d1d2b682d8d0ec278edb43ac98d.
Access here: https://mattermost-webapp-pr-4843.test.mattermost.cloud

Test server destroyed

@jespino
Error trying doing the automated Cherry picking. Please do this manually
+++ Updating remotes...
Fetching upstream
Fetching origin
+++ Updating remotes done...
!!! 'upstream/release-5.21' not found. The second argument should be something like upstream/release-0.21.
    (In particular, it needs to be a valid, existing remote branch that I can 'git checkout'.)

/cherry-pick release-5.21


Smart Editing - Disabled Editable Fields

Widget
Smart Editor
Version of widget
1.0 Alpha
Bug or Enhancement
Enhancement
Repo Steps or Enhancement details
Currently, if you turn off editing on a field, it is visible.  Should we remove it?  Also if you set it up for a preset, the value is applied and you cannot change it.  What should we do here?
@allisonmuise @camtran @previnWong

IMO, preset values should be editable if the field is editable in the popup settings.
For reporter, manager, and polling we only show editable fields in editing mode.

The field is not editable according to the widget config, hence be disabled in the attribute inspector.
Option 1:
Leave as is, non editable fields can be preset using the preset values
Option 2:
Hide non editable fields, still calculated if set to preset
Option 3:
Hide non editable fields, they are not preset
Option 4??

IMO, the field should NOT be available as a preset in settings, so no preset ability.  It should remain in the attribute inspector table but field should be disabled.  We should not hide it because a user might need to know the value of it for entry into another editable field. (in edit feature case, and new feature case if it has a default value)


Portal redirection appending notification query string in wrong manner.

Describe the bug
When an index URL is supplied when requesting a workshop session via the REST API, ultimately redirection is triggered from the training portal by doing:
        if index_url:
            return redirect(index_url + "?notification=session-invalid")

This is wrong and causes unexpected behaviour when the index URL itself included query string parameters.
For example, if the index URL was:
http://files-educates-cli-w40-s003.educates-local-dev.test/htdocs/javascript-redirect.html?target=http://files-educates-cli-w40-s003.educates-local-dev.test/htdocs/root-of-web-site.html

The result of blindly appending ?notification=session-invalid is that the notification query string parameter gets appended to the the URL being passed as the target query string parameter, rather than being a parameter to the actual URL.
What the code should have done is parse the index URL and separate out the set of query string parameters. The notification parameter should then be added to that set, and the URL reconstructed to include it.
The implications of this is that if supplying an index URL which in turn triggers a redirection to a subsequent URL, eg., via target parameter, the notification parameter is passed to the wrong URL handler. In the worst case, if the index URL handler was being passed other query string parameters and it wasn't a URL that was passed as last parameter, the notification param and message would get appended to the value of whatever was the last parameter, which could interfere with the operation of the URL handler.
Additional information
No response

Fixed in 2.7.4 and 3.0.0.alpha.18.


Add linters to golint CI run

Summary
Add gofmt linter to CI run. Previously, only limited amount of linters were enabled. Closes #819.
Also, fixing all previous lint errors.

checks all passed


[ru] Switch liveness image to multi-arch agnhost container image

ru equivalent for https://github.com/kubernetes/website/pull/45837

/retitle [ru] Switch liveness image to multi-arch agnhost container image

/hold
Wait until the equivalent English PR https://github.com/kubernetes/website/pull/45837 has been merged first.

/unhold
Referenced PR https://github.com/kubernetes/website/pull/45837 has now been merged

Thank you!
/lgtm
/approve


optimize makefile

What is the purpose of the change
XXXXX
Brief changelog
update makefile

make help

manifests           Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
generate            Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
dubbo-admin-swagger  Generate dubbo-admin swagger docs.
fmt                  Run go fmt against code.
vet                 Run go vet against code.
lint                Run golang lint against code
test               Run all tests.
test-dubboctl    Run tests for dubboctl
test-admin       Run tests for admin
test-authority   Run tests for authority
build            Build binary with the dubbo admin, authority, and dubboctl
build-admin      Build binary with the dubbo admin.
build-authority  Build binary with the dubbo authority.
build-dubboctl   Build binary with the dubbo dubboctl.
build-ui         Build  the distribution of the admin ui pages.
image            Build docker image with the dubbo admin, authority and admin-ui
image-admin      Build docker image with the dubbo admin.
image-authority  Build docker image with the dubbo authority.
image-ui         Build docker image with the dubbo admin ui.
buildx           Build and push docker cross-platform image for the dubbo admin and authority
buildx-admin     Build and push docker image with the dubbo admin for cross-platform support
buildx-authority  Build and push docker image with the dubbo authority for cross-platform support
buildx-dubboctl  Build the dubboctl distribution for cross-platform support
push-image-admin  Push admin images.
push-image-authority  Push authority images.
push-image-ui    Push admin ui images.
kustomize        Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.
controller-gen   Download controller-gen locally if necessary. If wrong version is installed, it will be overwritten.
swagger-install  Download swagger locally if necessary.
golangci-lint-install  Download golangci lint locally if necessary.

make buildx-dubboctl  generate cross-platform as follow in bin/dubboctl directory

.
├── darwin
│   ├── amd64
│   │   └── dubboctl
│   └── arm64
│       └── dubboctl
├── dubboctl-1.0.0-linux-amd64.tar.gz
├── dubboctl-1.0.0-linux-arm64.tar.gz
├── dubboctl-1.0.0-osx-arm64.tar.gz
├── dubboctl-1.0.0-osx.tar.gz
├── dubboctl-1.0.0-win.zip
├── linux
│   ├── amd64
│   │   └── dubboctl
│   └── arm64
│       └── dubboctl
└── windows
    └── amd64
        └── dubboctl.exe

Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[ ] Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist.
[ ] Run `mvn clean compile --batch-mode -DskipTests=false -Dcheckstyle.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true to make sure basic checks pass.

Codecov Report

Merging #1145 (19e3bcf) into refactor-with-go (e631dc2) will not change coverage.
The diff coverage is n/a.

@@                Coverage Diff                @@
##           refactor-with-go    #1145   +/-   ##
=================================================
  Coverage             50.51%   50.51%
=================================================
  Files                    99       99
  Lines                  4989     4989
  Branches                 41       41
=================================================
  Hits                   2520     2520
  Misses                 2210     2210
  Partials                259      259

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Send Acknowledgment BTN not gracefully handling errors

If an unhandled error occurs when sending an email acknowledgement from an Opportunity the cNotSent variable is not being set and is resulting in an error on the Visualforce page.
"The value 'null' is not valid for operator '>'
Error is in expression '{!cNotSent > 0}' in component apex:outputPanel in page npsp:opp_sendacknowledgmentbtn" since the cNotSent variable is never being set.
Steps to replicate:
Activate the Opportunity Email Acknowledgment
Create a Validation Rule on the Opportunity that will fire
Go to an Opportunity with a Primary Contact and click the Send Email Acknowledgement button

**lurch: add

Tracking W-018517

Included in beta release 3.99 (Beta 1)

Included in production release rel/3.99


Feature: document/add support for mounting in an express app

It would be great if Rogue could be used as part of a larger Express app. Thanks for considering!

Documentation has been added https://github.com/alidcastano/rogue.js/tree/master/packages/rogue-app#custom-server
I don't have time to add examples for every use-case myself but feel free to open new issue if you run into any problems.
If you need a complete example to get started, I'd use the Nextjs/Nuxtjs repo examples as starting
points


gsl is reported to have version 7.1 by cmake

Describe the bug
CMake is reporting that gsl have "7.1" version instead of "2.7.1", that does not happen in other platforms
Environment

OS: Windows
Compiler: MSVC 2022
cmake: cmake version 3.21.21080301-MSVC_2

To Reproduce
A simple cmake project with find_package(GSL)
cmake_minimum_required(VERSION 3.16)
project( foo CXX )
find_package( GSL REQUIRED )

Expected behavior
Report version to be 2.7.1
Failure logs
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19044.
-- The CXX compiler identification is MSVC 19.30.30706.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.30.30705/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found GSL: D:/dev/vcpkg/installed/x64-windows/include (found version "7.1")
-- Configuring done
-- Generating done
-- Build files have been written to: D:/dev/Bugs/cmake_code/build

Additional context

According to the FindGSL.cmake which provided by cmake:
# If we didn't use PkgConfig, try to find the version via gsl-config or by
# reading gsl_version.h.
if( NOT GSL_VERSION )
  # 1. If gsl-config exists, query for the version.
  find_program( GSL_CONFIG_EXECUTABLE
    NAMES gsl-config
    HINTS "${GSL_ROOT_DIR}/bin"
    )
  if( EXISTS "${GSL_CONFIG_EXECUTABLE}" )
    execute_process(
      COMMAND "${GSL_CONFIG_EXECUTABLE}" --version
      OUTPUT_VARIABLE GSL_VERSION
      OUTPUT_STRIP_TRAILING_WHITESPACE )
  endif()

  # 2. If gsl-config is not available, try looking in gsl/gsl_version.h
  if( NOT GSL_VERSION AND EXISTS "${GSL_INCLUDE_DIRS}/gsl/gsl_version.h" )
    file( STRINGS "${GSL_INCLUDE_DIRS}/gsl/gsl_version.h" gsl_version_h_contents REGEX "define GSL_VERSION" )
    string( REGEX REPLACE ".*([0-9]\\.[0-9][0-9]?).*" "\\1" GSL_VERSION ${gsl_version_h_contents} )
  endif()

  # might also try scraping the directory name for a regex match "gsl-X.X"
endif()

I think this is a cmake issue.
So please report this to cmake: https://gitlab.kitware.com/cmake/cmake/-/issues
Thanks.

reported upstream https://gitlab.kitware.com/cmake/cmake/-/issues/23017


Timeout when executing ReadAttribute to bridged device on arm 32 bit

Problem
Using bridge wrapper to registers bridge devices, i am able to run OnOff and LevelControl clusters without issue running on x86_64. The problem is on the arm 32 bit build. I am using Chip-tool to send commands to the bridged devices.
The problem appears, when the device sends ReportAttribute. Then, the chip-tool ReadAttribute starts to fail with Timeout error.
I can send many ReadAttribute and InvokeCommand requests from the chip-tool, and everytime when InvokeCommand was sent, the device sends ReportAttribute, which is not causing an issue. But when the device sends ReportAttribute and previously InvokeCommand was not invoked, then the ReadAttribute stops working.
Using  MatterReportingAttributeChangeCallback(iEndpointId, iClusterId, iAttributeId); to handle the attribute change.
I am able to send only one ReportAttribute from the device and the next triggers ReadAttribute timeouts.
Based on the log debug, i see that, my readAttribute handler is never invoked from this point.
SubscribeAttribute is not working as well.
- expected behavior
ReadAttribute to return response
- actual behavior
ReadAttribute fails with timeout: CHIP:TOO: Error: ../../../examples/chip-tool/third_party/connectedhomeip/src/app/ReadClient.cpp:553: CHIP Error 0x00000032: Timeout
InvokeCommand - continue working
- steps to reproduce
Compile and run Bridge and Chip-tool for 32 bit arm
Register Bridge device
Pair to bridged device
execute ReadAttribute - ok
send ReportAttribute from device
execute ReadAttribute - ok
send ReportAttribute from device
every next execution of ReadAttribute - timeout
- system configuration
CPU armv7l Cortex-A8 single core
- logs

Log Bridge

[1649683027.712700][25526:25526] CHIP:DIS: Directly sending mDns reply to peer xxx.xxx.xxx.xxx on port 51829
[1649683027.716572][25526:25526] CHIP:DIS: Directly sending mDns reply to peer xxx.xxx.xxx.xxx on port 60812
[1649683027.920389][25526:25526] CHIP:EM: Received message of type 0x30 with protocolId (0, 0) and MessageCounter:2663365113 on exchange 62800r
[1649683027.920555][25526:25526] CHIP:EM: Handling via exchange: 62800r, Delegate: 0x5f04bc
[1649683027.920695][25526:25526] CHIP:IN: CASE Server received Sigma1 message. Starting handshake. EC 0x5f0c08
[1649683027.920748][25526:25526] CHIP:DIS: CASE handshake initiated, closing all BLE Connections
[1649683027.921231][25526:25526] CHIP:SC: Waiting for Sigma1 msg
[1649683027.921298][25526:25526] CHIP:IN: CASE Server disabling CASE session setups
[1649683027.921355][25526:25526] CHIP:SC: Received Sigma1 msg
[1649683027.921491][25526:25526] CHIP:SC: Found MRP parameters in the message
[1649683027.921560][25526:25526] CHIP:SC: Peer assigned session key ID 42245
[1649683027.923736][25526:25526] CHIP:SC: CASE matched destination ID: fabricIndex 1, NodeID 0x0000000000001111
[1649683027.934887][25526:25526] CHIP:SC: Including MRP parameters
[1649683027.935584][25526:25526] CHIP:EM: Piggybacking Ack for MessageCounter:2663365113 on exchange: 62800r
[1649683027.935969][25526:25526] CHIP:IN: Prepared unauthenticated message 0x5f09a4 to 0x0000000000000000 (0)  of type 0x31 and protocolId (0, 0) on exchange 62800r with MessageCounter:3105686542.
[1649683027.936341][25526:25526] CHIP:IN: Sending unauthenticated msg 0x5f09a4 with MessageCounter:3105686542 to 0x0000000000000000 at monotonic time:<PHONE_NUMBER>E08880 msec
[1649683027.945547][25526:25526] CHIP:SC: Sent Sigma2 msg
[1649683027.975420][25526:25526] CHIP:EM: Received message of type 0x32 with protocolId (0, 0) and MessageCounter:2663365114 on exchange 62800r
[1649683027.975553][25526:25526] CHIP:EM: Found matching exchange: 62800r, Delegate: 0x5f04c8
[1649683027.975776][25526:25526] CHIP:EM: Rxd Ack; Removing MessageCounter:3105686542 from Retrans Table on exchange 62800r
[1649683027.975832][25526:25526] CHIP:EM: Removed CHIP MessageCounter:3105686542 from RetransTable on exchange 62800r
[1649683027.975974][25526:25526] CHIP:SC: Received Sigma3 msg
[1649683027.976438][25526:25526] CHIP:SC: The device does not support GetClock_RealTimeMS() API. This will eventually result in CASE session setup failures.
[1649683028.002335][25526:25526] CHIP:SC: Sending status report. Protocol code 0, exchange 62800
[1649683028.002947][25526:25526] CHIP:EM: Piggybacking Ack for MessageCounter:2663365114 on exchange: 62800r
[1649683028.003301][25526:25526] CHIP:IN: Prepared unauthenticated message 0x5f09a4 to 0x0000000000000000 (0)  of type 0x40 and protocolId (0, 0) on exchange 62800r with MessageCounter:3105686543.
[1649683028.004017][25526:25526] CHIP:IN: Sending unauthenticated msg 0x5f09a4 with MessageCounter:3105686543 to 0x0000000000000000 at monotonic time:<PHONE_NUMBER>E088C3 msec
[1649683028.010006][25526:25526] CHIP:IN: CASE Session established. Setting up the secure channel.
[1649683028.010496][25526:25526] CHIP:IN: New secure session created for device 0x000000000001B669, LSID:33907 PSID:42245!
[1649683028.011043][25526:25526] CHIP:IN: CASE secure channel is available now.
[1649683028.011326][25526:25526] CHIP:IN: CASE Server enabling CASE session setups
[1649683028.012060][25526:25526] CHIP:EM: Received message of type 0x2 with protocolId (0, 1) and MessageCounter:9252335 on exchange 62801r
[1649683028.012451][25526:25526] CHIP:EM: Handling via exchange: 62801r, Delegate: 0x5ec318
[1649683028.013094][25526:25526] CHIP:IM: Received Read request
[1649683028.013546][25526:25526] CHIP:DMG: ReadRequestMessage =
[1649683028.013832][25526:25526] CHIP:DMG: {
[1649683028.014047][25526:25526] CHIP:DMG: 	AttributePathIBs =
[1649683028.014267][25526:25526] CHIP:DMG: 	[
[1649683028.015626][25526:25526] CHIP:DMG: 		AttributePathIB =
[1649683028.016804][25526:25526] CHIP:DMG: 		{
[1649683028.017275][25526:25526] CHIP:DMG: 			Endpoint = 0x2,
[1649683028.017709][25526:25526] CHIP:DMG: 			Cluster = 0x6,
[1649683028.018399][25526:25526] CHIP:DMG: 			Attribute = 0x0000_0000,
[1649683028.018861][25526:25526] CHIP:DMG: 		}
[1649683028.019310][25526:25526] CHIP:DMG:
[1649683028.019710][25526:25526] CHIP:DMG: 	],
[1649683028.020153][25526:25526] CHIP:DMG:
[1649683028.020576][25526:25526] CHIP:DMG: 	isFabricFiltered = true,
[1649683028.020985][25526:25526] CHIP:DMG: 	InteractionModelRevision = 1
[1649683028.021368][25526:25526] CHIP:DMG: },
[1649683028.022143][25526:25526] CHIP:DMG: IM RH moving to [GeneratingReports]
[1649683028.023356][25526:25526] CHIP:EM: Received message of type 0x10 with protocolId (0, 0) and MessageCounter:2663365115 on exchange 62800r
[1649683028.023962][25526:25526] CHIP:EM: Found matching exchange: 62800r, Delegate: (nil)
[1649683028.025246][25526:25526] CHIP:EM: Rxd Ack; Removing MessageCounter:3105686543 from Retrans Table on exchange 62800r
[1649683028.025859][25526:25526] CHIP:EM: Removed CHIP MessageCounter:3105686543 from RetransTable on exchange 62800r
[1649683028.213026][25526:25526] CHIP:EM: Sending Standalone Ack for MessageCounter:9252335 on exchange 62801r
[1649683028.214120][25526:25526] CHIP:IN: Prepared secure message 0xbe84a7c4 to 0x000000000001B669 (1)  of type 0x10 and protocolId (0, 0) on exchange 62801r with MessageCounter:2469759.
[1649683028.214957][25526:25526] CHIP:IN: Sending encrypted msg 0xbe84a7c4 with MessageCounter:2469759 to 0x000000000001B669 (1) at monotonic time:<PHONE_NUMBER>E08996 msec

Log Chip-tool

./chip-tool onoff read on-off 0x1111 2
[1649683027.489577][7169:7169] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs
[1649683027.493899][7169:7169] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_factory.ini
[1649683027.497831][7169:7169] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_config.ini
[1649683027.498820][7169:7169] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_counters.ini
[1649683027.500256][7169:7169] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-sLLnij)
[1649683027.501202][7169:7169] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini)
[1649683027.501633][7169:7169] CHIP:DL: NVS set: chip-counters/reboot-count = 36 (0x24)
[1649683027.503280][7169:7169] CHIP:DL: Got Ethernet interface: eth0
[1649683027.504155][7169:7169] CHIP:DL: Found the primary Ethernet interface:eth0
[1649683027.505139][7169:7169] CHIP:DL: Failed to get WiFi interface
[1649683027.505684][7169:7169] CHIP:DL: Failed to reset WiFi statistic counts
[1649683027.506247][7169:7169] CHIP:IN: UDP::Init bind&listen port=0
[1649683027.506817][7169:7169] CHIP:IN: UDP::Init bound to port=44827
[1649683027.507114][7169:7169] CHIP:IN: UDP::Init bind&listen port=0
[1649683027.507430][7169:7169] CHIP:IN: UDP::Init bound to port=34778
[1649683027.507665][7169:7169] CHIP:IN: BLEBase::Init - setting/overriding transport
[1649683027.507870][7169:7169] CHIP:IN: TransportMgr initialized
[1649683027.508145][7169:7169] CHIP:DIS: Init fabric pairing table with server storage
[1649683027.509104][7169:7169] CHIP:IN: Loading from storage for fabric index 1
[1649683027.522124][7169:7169] CHIP:IN: Loading from storage for fabric index 2
[1649683027.526213][7169:7169] CHIP:IN: Loading from storage for fabric index 3
[1649683027.530067][7169:7169] CHIP:DIS: Add fabric pairing table delegate
[1649683027.531018][7169:7169] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-ytwN9h)
[1649683027.531834][7169:7169] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini)
[1649683027.532249][7169:7169] CHIP:DL: NVS set: chip-counters/GlobalMCTR = 36000 (0x8CA0)
[1649683027.536582][7169:7169] CHIP:ZCL: Using ZAP configuration...
[1649683027.539218][7169:7169] CHIP:CTL: System State Initialized...
[1649683027.539869][7169:7169] CHIP:CTL: Setting attestation nonce to random value
[1649683027.540296][7169:7169] CHIP:CTL: Setting CSR nonce to random value
[1649683027.540799][7169:7169] CHIP:IN: UDP::Init bind&listen port=5550
[1649683027.541189][7169:7169] CHIP:IN: UDP::Init bound to port=5550
[1649683027.541458][7169:7169] CHIP:IN: UDP::Init bind&listen port=5550
[1649683027.541763][7169:7169] CHIP:IN: UDP::Init bound to port=5550
[1649683027.541990][7169:7169] CHIP:IN: TransportMgr initialized
[1649683027.542752][7169:7169] CHIP:CTL: Setting attestation nonce to random value
[1649683027.543197][7169:7169] CHIP:CTL: Setting CSR nonce to random value
[1649683027.550185][7169:7169] CHIP:CTL: Generating NOC
[1649683027.557356][7169:7169] CHIP:DIS: Verifying the received credentials
[1649683027.574013][7169:7169] CHIP:DIS: Added new fabric at index: 1, Initialized: 1
[1649683027.574621][7169:7169] CHIP:DIS: Assigned compressed fabric ID: 0x3536437DF3E1883C, node ID: 0x000000000001B669
[1649683027.574911][7169:7169] CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x3536437DF3E1883C
[1649683027.575284][7169:7169] CHIP:IN: UDP::Init bind&listen port=5550
[1649683027.575944][7169:7169] CHIP:IN: UDP::Init bound to port=5550
[1649683027.576262][7169:7169] CHIP:IN: UDP::Init bind&listen port=5550
[1649683027.576574][7169:7169] CHIP:IN: UDP::Init bound to port=5550
[1649683027.576804][7169:7169] CHIP:IN: TransportMgr initialized
[1649683027.577379][7169:7169] CHIP:CTL: Setting attestation nonce to random value
[1649683027.577818][7169:7169] CHIP:CTL: Setting CSR nonce to random value
[1649683027.584579][7169:7169] CHIP:CTL: Generating NOC
[1649683027.591552][7169:7169] CHIP:DIS: Verifying the received credentials
[1649683027.609223][7169:7169] CHIP:DIS: Added new fabric at index: 2, Initialized: 1
[1649683027.609765][7169:7169] CHIP:DIS: Assigned compressed fabric ID: 0xC8EA88F1924F2D8C, node ID: 0x000000000001B669
[1649683027.610048][7169:7169] CHIP:CTL: Joined the fabric at index 2. Compressed fabric ID is: 0xC8EA88F1924F2D8C
[1649683027.610424][7169:7169] CHIP:IN: UDP::Init bind&listen port=5550
[1649683027.610819][7169:7169] CHIP:IN: UDP::Init bound to port=5550
[1649683027.611091][7169:7169] CHIP:IN: UDP::Init bind&listen port=5550
[1649683027.611382][7169:7169] CHIP:IN: UDP::Init bound to port=5550
[1649683027.611605][7169:7169] CHIP:IN: TransportMgr initialized
[1649683027.612418][7169:7169] CHIP:CTL: Setting attestation nonce to random value
[1649683027.612902][7169:7169] CHIP:CTL: Setting CSR nonce to random value
[1649683027.619508][7169:7169] CHIP:CTL: Generating NOC
[1649683027.627322][7169:7169] CHIP:DIS: Verifying the received credentials
[1649683027.644438][7169:7169] CHIP:DIS: Added new fabric at index: 3, Initialized: 1
[1649683027.644962][7169:7169] CHIP:DIS: Assigned compressed fabric ID: 0x6F1AA2C3B26A9905, node ID: 0x000000000001B669
[1649683027.645249][7169:7169] CHIP:CTL: Joined the fabric at index 3. Compressed fabric ID is: 0x6F1AA2C3B26A9905
[1649683027.645622][7169:7169] CHIP:IN: UDP::Init bind&listen port=5550
[1649683027.646257][7169:7169] CHIP:IN: UDP::Init bound to port=5550
[1649683027.646573][7169:7169] CHIP:IN: UDP::Init bind&listen port=5550
[1649683027.646883][7169:7169] CHIP:IN: UDP::Init bound to port=5550
[1649683027.647108][7169:7169] CHIP:IN: TransportMgr initialized
[1649683027.708474][7169:7174] CHIP:DL: CHIP task running
[1649683027.709232][7169:7174] CHIP:TOO: Sending command to node 0x1111
[1649683027.709590][7169:7174] CHIP:CSM: FindOrEstablishSession: PeerId = 3536437DF3E1883C:0000000000001111, NodeIdWasResolved = 0
[1649683027.709865][7169:7174] CHIP:CSM: FindOrEstablishSession: No existing session found
[1649683027.717987][7169:7174] CHIP:DIS: Node ID resolved for 3536437DF3E1883C:0000000000001111
[1649683027.719233][7169:7174] CHIP:DIS:     Addr 0: [xxx.xxx.xxx.xxx]:5540
[1649683027.719634][7169:7174] CHIP:DIS:     Addr 1: [xxx.xxx.xxx.xxx]:5540
[1649683027.719882][7169:7174] CHIP:DIS:     Addr 2: [xxx.xxx.xxx.xxx]:5540
[1649683027.720562][7169:7174] CHIP:DIS: UDP:[xxx.xxx.xxx.xxx]:5540: new best score: 3
[1649683027.720987][7169:7174] CHIP:DIS: UDP:xxx.xxx.xxx.xxx:5540: score has not improved: 2
[1649683027.721308][7169:7174] CHIP:DIS: UDP:xxx.xxx.xxx.xxx:5540: score has not improved: 2
[1649683027.721557][7169:7174] CHIP:DIS: Checking node lookup status after 12 ms
[1649683027.721766][7169:7174] CHIP:DIS: Keeping DNSSD lookup active
[1649683027.722564][7169:7174] CHIP:DIS: Discovered node without a pending query
[1649683027.722873][7169:7174] CHIP:DIS: Node ID resolved for 3536437DF3E1883C:0000000000001111
[1649683027.723328][7169:7174] CHIP:DIS:     Addr 0: [xxx.xxx.xxx.xxx]:5540
[1649683027.723593][7169:7174] CHIP:DIS:     Addr 1: [xxx.xxx.xxx.xxx]:5540
[1649683027.723805][7169:7174] CHIP:DIS:     Addr 2: [xxx.xxx.xxx.xxx]:5540
[1649683027.724162][7169:7174] CHIP:DIS: UDP:[xxx.xxx.xxx.xxx]:5540: score has not improved: 3
[1649683027.724595][7169:7174] CHIP:DIS: UDP:xxx.xxx.xxx.xxx:5540: score has not improved: 2
[1649683027.724911][7169:7174] CHIP:DIS: UDP:xxx.xxx.xxx.xxx:5540: score has not improved: 2
[1649683027.725156][7169:7174] CHIP:DIS: Checking node lookup status after 15 ms
[1649683027.725361][7169:7174] CHIP:DIS: Keeping DNSSD lookup active
[1649683027.910172][7169:7174] CHIP:DIS: Checking node lookup status after 200 ms
[1649683027.910899][7169:7174] CHIP:CTL: Updating device address to UDP:[xxx.xxx.xxx.xxx]:5540 while in state 1
[1649683027.911237][7169:7174] CHIP:CTL: OperationalDeviceProxy[3536437DF3E1883C:0000000000001111]: State change 1 --> 2
[1649683027.912055][7169:7174] CHIP:SC: Establishing CASE session to UDP:[xxx.xxx.xxx.xxx]:5540
[1649683027.916369][7169:7174] CHIP:SC: RecoverInitiatorIpk: GroupDataProvider 0x198bbe8, Got IPK for FabricIndex 1
[1649683027.916894][7169:7174] CHIP:SC: 0x5c, 0xb0, 0x7e, 0xa0, 0xef, 0xdb, 0xe1, 0x07,
[1649683027.917165][7169:7174] CHIP:SC: 0xe0, 0xd5, 0xba, 0x4d, 0xa5, 0x1e, 0x21, 0x76,
[1649683027.917946][7169:7174] CHIP:SC: Including MRP parameters
[1649683027.918880][7169:7174] CHIP:IN: Prepared unauthenticated message 0x1e94b7c to 0x0000000000000000 (0)  of type 0x30 and protocolId (0, 0) on exchange 62800i with MessageCounter:2663365113.
[1649683027.919355][7169:7174] CHIP:IN: Sending unauthenticated msg 0x1e94b7c with MessageCounter:2663365113 to 0x0000000000000000 at monotonic time:<PHONE_NUMBER>E0886F msec
[1649683027.925418][7169:7174] CHIP:SC: Sent Sigma1 msg
[1649683027.925840][7169:7174] CHIP:CTL: OperationalDeviceProxy[3536437DF3E1883C:0000000000001111]: State change 2 --> 3
[1649683027.926142][7169:7174] CHIP:DIS: Discovery does not require any more timeouts
[1649683027.937439][7169:7174] CHIP:EM: Received message of type 0x31 with protocolId (0, 0) and MessageCounter:3105686542 on exchange 62800i
[1649683027.937576][7169:7174] CHIP:EM: Found matching exchange: 62800i, Delegate: 0xb4e07a88
[1649683027.937708][7169:7174] CHIP:EM: Rxd Ack; Removing MessageCounter:2663365113 from Retrans Table on exchange 62800i
[1649683027.937757][7169:7174] CHIP:EM: Removed CHIP MessageCounter:2663365113 from RetransTable on exchange 62800i
[1649683027.937874][7169:7174] CHIP:SC: Received Sigma2 msg
[1649683027.937965][7169:7174] CHIP:SC: Peer assigned session session ID 33907
[1649683027.942529][7169:7174] CHIP:SC: The device does not support GetClock_RealTimeMS() API. This will eventually result in CASE session setup failures.
[1649683027.969649][7169:7174] CHIP:SC: Found MRP parameters in the message
[1649683027.970277][7169:7174] CHIP:SC: Sending Sigma3
[1649683027.973052][7169:7174] CHIP:EM: Piggybacking Ack for MessageCounter:3105686542 on exchange: 62800i
[1649683027.973642][7169:7174] CHIP:IN: Prepared unauthenticated message 0x1e94b7c to 0x0000000000000000 (0)  of type 0x32 and protocolId (0, 0) on exchange 62800i with MessageCounter:2663365114.
[1649683027.974313][7169:7174] CHIP:IN: Sending unauthenticated msg 0x1e94b7c with MessageCounter:2663365114 to 0x0000000000000000 at monotonic time:<PHONE_NUMBER>E088A5 msec
[1649683027.981100][7169:7174] CHIP:SC: Sent Sigma3 msg
[1649683028.005118][7169:7174] CHIP:EM: Received message of type 0x40 with protocolId (0, 0) and MessageCounter:3105686543 on exchange 62800i
[1649683028.005251][7169:7174] CHIP:EM: Found matching exchange: 62800i, Delegate: 0xb4e07a88
[1649683028.005391][7169:7174] CHIP:EM: Rxd Ack; Removing MessageCounter:2663365114 from Retrans Table on exchange 62800i
[1649683028.005443][7169:7174] CHIP:EM: Removed CHIP MessageCounter:2663365114 from RetransTable on exchange 62800i
[1649683028.005569][7169:7174] CHIP:SC: Success status report received. Session was established
[1649683028.005633][7169:7174] CHIP:IN: New secure session created for device 0x0000000000001111, LSID:42245 PSID:33907!
[1649683028.005917][7169:7174] CHIP:CTL: OperationalDeviceProxy[3536437DF3E1883C:0000000000001111]: State change 3 --> 4
[1649683028.006129][7169:7174] CHIP:TOO: Sending ReadAttribute to:
[1649683028.006535][7169:7174] CHIP:TOO: 	cluster 0x0000_0006, attribute: 0x0000_0000, endpoint 2
[1649683028.006635][7169:7174] CHIP:DMG: SendReadRequest ReadClient[0xb4e0b640]: Sending Read Request
[1649683028.007119][7169:7174] CHIP:IN: Prepared secure message 0x1e94b7c to 0x0000000000001111 (1)  of type 0x2 and protocolId (0, 1) on exchange 62801i with MessageCounter:9252335.
[1649683028.007264][7169:7174] CHIP:IN: Sending encrypted msg 0x1e94b7c with MessageCounter:9252335 to 0x0000000000001111 (1) at monotonic time:<PHONE_NUMBER>E088C6 msec
[1649683028.007821][7169:7174] CHIP:DMG: MoveToState ReadClient[0xb4e0b640]: Moving to [AwaitingIn]
[1649683028.007948][7169:7174] CHIP:EM: Sending Standalone Ack for MessageCounter:3105686543 on exchange 62800i
[1649683028.008074][7169:7174] CHIP:IN: Prepared unauthenticated message 0xb3dfc3c4 to 0x0000000000000000 (0)  of type 0x10 and protocolId (0, 0) on exchange 62800i with MessageCounter:2663365115.
[1649683028.008188][7169:7174] CHIP:IN: Sending unauthenticated msg 0xb3dfc3c4 with MessageCounter:2663365115 to 0x0000000000000000 at monotonic time:<PHONE_NUMBER>E088C7 msec
[1649683028.008435][7169:7174] CHIP:EM: Flushed pending ack for MessageCounter:3105686543 on exchange 62800i
[1649683028.216696][7169:7174] CHIP:EM: Received message of type 0x10 with protocolId (0, 0) and MessageCounter:2469759 on exchange 62801i
[1649683028.216904][7169:7174] CHIP:EM: Found matching exchange: 62801i, Delegate: 0xb4e0b640
[1649683028.217124][7169:7174] CHIP:EM: Rxd Ack; Removing MessageCounter:9252335 from Retrans Table on exchange 62801i
[1649683028.217216][7169:7174] CHIP:EM: Removed CHIP MessageCounter:9252335 from RetransTable on exchange 62801i
[1649683040.007720][7169:7174] CHIP:DMG: Time out! failed to receive report data from Exchange: 62801i
[1649683040.007943][7169:7174] CHIP:DMG: mResubscribePolicy is null
[1649683040.008076][7169:7174] CHIP:TOO: Error: ../../../examples/chip-tool/third_party/connectedhomeip/src/app/ReadClient.cpp:553: CHIP Error 0x00000032: Timeout
[1649683040.010985][7169:7169] CHIP:CTL: Shutting down the commissioner
[1649683040.011465][7169:7169] CHIP:CTL: Shutting down the controller
[1649683040.011610][7169:7169] CHIP:CTL: Shutting down the commissioner
[1649683040.011854][7169:7169] CHIP:CTL: Shutting down the controller
[1649683040.012001][7169:7169] CHIP:IN: Expiring all connections for fabric 1!!
[1649683040.012286][7169:7169] CHIP:CTL: Shutting down the commissioner
[1649683040.012550][7169:7169] CHIP:CTL: Shutting down the controller
[1649683040.012633][7169:7169] CHIP:IN: Expiring all connections for fabric 2!!
[1649683040.012828][7169:7169] CHIP:CTL: Shutting down the commissioner
[1649683040.013072][7169:7169] CHIP:CTL: Shutting down the controller
[1649683040.013152][7169:7169] CHIP:IN: Expiring all connections for fabric 3!!
[1649683040.013322][7169:7169] CHIP:CTL: Shutting down the System State, this will teardown the CHIP Stack
[1649683040.013752][7169:7169] CHIP:DMG: IM WH moving to [Uninitialized]
[1649683040.013840][7169:7169] CHIP:DMG: IM WH moving to [Uninitialized]
[1649683040.013904][7169:7169] CHIP:DMG: IM WH moving to [Uninitialized]
[1649683040.013964][7169:7169] CHIP:DMG: IM WH moving to [Uninitialized]
[1649683040.014033][7169:7169] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet
[1649683040.014284][7169:7169] CHIP:BLE: BleConnectionDelegate::CancelConnection is not implemented.
[1649683040.025201][7169:7169] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-zT11qh)
[1649683040.026616][7169:7169] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini)
[1649683040.027309][7169:7169] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0)
[1649683040.027855][7169:7169] CHIP:DL: Inet Layer shutdown
[1649683040.028271][7169:7169] CHIP:DL: BLE shutdown
[1649683040.029001][7169:7169] CHIP:DL: System Layer shutdown
[1649683040.029914][7169:7169] CHIP:TOO: Run command failure: ../../../examples/chip-tool/third_party/connectedhomeip/src/app/ReadClient.cpp:553: CHIP Error 0x00000032: Timeout
root@shc01009b:/data/matter#

From my debugging, i see that if i comment the // InteractionModelEngine::GetInstance()→GetReportingEngine().SetDirty(info);  in  ember-compatibility-functions.cpp
the ReatAttribute starts to work normally, but the SubscribeAttribute still not works.

Hi,
I think i found solution for this. Currently is tested with [a8d12af4be0cbf26f3f1352a5562eb7856ca8651]
With recent commits, the problem can be reproduce on Linux amd64. Looking into implementation, there is assertion for locking the stack by current thread. Now this generates errors in some cases:
    // Attribute writes have asserted this already, but this assert should catch     // applications notifying about changes from their end.     assertChipStackLockedByCurrentThread();
Locking the stack
chip::DeviceLayer::StackLock stack;
before invoking the MatterReportingAttributeChangeCallback solves the problem. Similar to this: #21708


Worldpop count update

Merge in update to worldpop pop count scripts to use dataset class. Includes an update to the dataset class logging function to fix existing functionality and add task args to logging. Primary fix was related to error handling and incorrect expansion of result items when provided columns names to use for expansion.

Thanks for catching that bug in the logging function!


Adds Jest tests for PageBlocks LWC Component

What does this PR do?
Adds tests for the PageBlocks LWC
The PR fulfills these requirements:
[x] Tests for the proposed changes have been added/updated.
[x] Code linting and formatting was performed.
Functionality After

@pozil tests removed. please reeval


signalbackup-tools: 20240406 -> 20240412-2

Description of changes
Update to latest version. No changes that effect build.
Diff: https://github.com/bepaald/signalbackup-tools/compare/20240406...20240412-2
Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.


404 Page not found is thrown if using ISR in route with slug

Describe the bug
I have the following page structure: /Transfers/From-[from]/To-[to]/By-[by]
Under the page folder By-[by] I added a +page.server.js with ISR enabled:
export const config = {
  isr: {
    expiration: false,
    bypassToken: BYPASS_TOKEN,
    allowQuery: []
  }
};

When I run the application locally with npm run dev or npm run preview the page is found and rendered correctly. But when deploying to Vercel a 404 error is thrown.
Reproduction
Visit https://sveltekit-isr-demo.vercel.app/Transfers/From-Krabi-sss/To-Samui/By-Train
Github: https://github.com/tonprince/sveltekit-isr-demo
Logs
No response
System Info
System:
    OS: macOS 13.2.1
    CPU: (8) arm64 Apple M2
    Memory: 144.55 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.13.0 - ~/.nvm/versions/node/v18.13.0/bin/node
    npm: 8.19.3 - ~/.nvm/versions/node/v18.13.0/bin/npm
  Browsers:
    Chrome: 111.0.5563.64
    Firefox: 111.0
    Safari: 16.3
  npmPackages:
    @sveltejs/adapter-vercel: ^2.4.0 => 2.4.0
    @sveltejs/kit: ^1.12.0 => 1.12.0
    svelte: ^3.57.0 => 3.57.0
    vite: ^4.2.1 => 4.2.1

Severity
blocking all usage of SvelteKit
Additional Information
No response

When I use the [...slug] syntax it seems to work but there is another issue when trying to read the slug and use it to load a firestore document. It strangely contains the '/__data.json' suffix when I click on a link which points to this ISR route.
As a workaround I just remove this suffix in order to get the url.
export const load = async ({ params }) => {
    let url = `/Transfers/${params.slug}`;
    url = url.replace("/__data.json", "");
    ...
    // load data from firestore with url
})

When looking at what the SvelteKit runtime is invoked with it's /Transfers/Krabi-sss/Samui/Train - the static parts of the route segments are missing.


Open AI API 401 error code: incorrect api key

bug is only in browsers.
Here is my code with correct request structure. If i post it by Postman App then 200 code and response from GPT, if i post from localhost:3000, then the error(
cache of the browser i did clean and also tried in other browser, the same(

To Reproduce
firstly from redux state thubk function takes the text with structure {role: string, content: string} and pushes in array with the 1st element of system message. then axios post
Code snippets
No response
OS
Windows  10
Node version
17 4 0
Library version

Based on your screenshot, this doesn't look like a bug with this library. For further help, try asking in community.openapi.com
Note also that OpenAI does not recommend using your API Key in a browser: https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety


Fix : Cannot fetch multiple aggregate keys?

The API does not seem to allow fetching multiple keys for an AGGREGATE message. However, fetching a single works fine. This PR replaces the keys: string[] parameter with a key: string (singular) to match the API.

This is a valid concern. I just tested it and it indeed does not work.


build: fix cares with latest automake on OS X

The current homebrew version of automake on OS X is 1.16 and it fails to build c-ares due to newlines that are introduced into CFLAGS in cares.sh. This change converts the newlines to spaces.
Risk Level: Low - minor build change
Testing: existing tests are sufficient
Release Notes: N/A
Signed-off-by: Stephan Zuercher<EMAIL_ADDRESS>

Thanks for the fix @zuercher!


Upgrade embedded vulnerable C library lz4 to patch version.

Hi, @sboikov , @agoncharuk , I'd like to report a vulnerable dependency issue in org.apache.ignite:ignite-compress:2.12.0.
Issue Description
I noticed that org.apache.ignite:ignite-compress:2.12.0 directly depends on org.lz4:lz4-java:1.5.0. However, as shown in the following dependency graph, org.lz4:lz4-java:1.5.0 sufferes from the vulnerabilities which the C library lz4(version:1.8.3) exposed, containing 2 CVEs: CVE-2021-3520,CVE-2019-17543.
Dependency Graph between Java and Shared Libraries

Furthermore, the vulnerable methods in the vulnerable shared libraries can be actually invoked by Java code. For instance, the following LZ4-JNI interfaces(Java code): LZ4JNIFastDecompressor::decompress(), LZ4JNISafeDecompressor::decompress(), LZ4JNICompressor::compress()  can reach the vulnerable method(C code)  LZ4_write32() reported by CVE-2019-17543.
call chain----
LZ4JNISafeDecompressor::decompress() -> LZ4_decompress_safe() -> LZ4_decompress_generic() -> LZ4_write32()
LZ4JNIFastDecompressor::decompress() -> LZ4_decompress_fast() -> LZ4_decompress_generic() -> LZ4_write32()
LZ4JNICompressor::compress() -> LZ4_compress_limitedOutput() -> LZ4_compress_default -> LZ4_compress_fast -> LZ4_compress_fast_extState() -> LZ4_compress_generic() -> LZ4_write32()

Suggested Vulnerability Patch Versions
org.lz4:lz4-java:1.7.0 (>=1.7.0) has upgraded this vulnerable C library lz4 to the patch version 1.9.2.
Java build tools cannot report vulnerable C libraries, which may induce potential security issues to many downstream Java projects. Could you please upgrade this vulnerable dependency?
Thanks for your help~
Best regards,
Helen Parr

@NSAmelchev Hi, im create and fix  issue IGNITE-16888


In Transparent Mode, How to Redirect to Charles or Fiddler?

I want to inspect HTTP(S) API calls. I have transparent mode working fine on OS/X. Is it possible to redirect HTTP(S) to Charles or Fiddler reverse proxies. I see there are some switches on mitmproxy that suggest to me that this can be done.

I see that Transparent mode is incompatible with -R and -U. However, just using -R specifying the ip:port of the Charles or Fiddler proxy system works for HTTP, not HTTPS. I'm assuming there's no solution for HTTPS.

If you want to redirect some parts of the traffic to a reverse proxy, just adjust the hostname in an inline script. Apart from that take a look at https://mitmproxy.org/doc/modes.html, that may clarify your thoughts.


[NEW] Add Sentry bug tracking. Create installation bash script.

Resolves #115
Here's my proposed implementation for integrating Sentry into ADS. As suggested, it's based off of SCT's implementation.

Installation is now done using install_ads script (run with the command: ./install_ads), which asks the users permission to track bugs.

This will need to be updated in ReadTheDocs as well if merged.

All ADS modules now import a new module, AxonDeepSeg.ads_util, which initiates the Sentry bug tracking.
The Sentry DSN is saved locally in the file axondeepseg/bin/ads_sentry, and the new folder bin is ignored by git.

I couldn't think of a better folder/filename location for it, but open to suggestions.

The one thing I couldn't get to work like SCT is the printed message to the user (when an error is sent to Sentry) that they can opt out by deleting the DSN file, as coded in this block here (which is effectively identical to the SCT implementation):
https://github.com/neuropoly/axondeepseg/blob/e10fc9067eca6a500198bb0e1a7a3a41d02bffee/AxonDeepSeg/ads_utils.py#L48-L67
I tried several different things (e.g. current implementation, calling ads.init_ads() at the __main__ level of segment.py, with/without a server_log_handler function like SCT that imports  SentryHandler from raven (which is currently omitted in the first commit as ADS had no loggin implemented)), but could not get the message to print (raven is never in the listed exit handlers), even though I can see it for SCT by creating some fake bugs.
@zougloub do you have any insight on how you got this feature working for SCT, and how it could be implemented here for ADS?

sorry @mathieuboudreau i didn't fully read your PR description (where the Sentry notice to user is mentioned). I tried debugging, and even though no module is found on this line of code (hence sent_something keeps being False), something is actually sent to Sentry (I checked on the website). So a quick workaround would be to simply get rid of the if statement for now (until we figure out what's the proper way of doing it) and always display what's in there. Sorry this is not super helpful...

@zougloub thanks you very much for the advice w.r.t. the Sentry opt-out warning message and for your thorough code-review 👍
I'll clean up the specific code-review suggestions you made, and will explore an alternate way to display the Sentry opt-out warning as you suggested.

@jcohenadad No worries! I'll tinker around with the strategy to display that message a little bit more, and maybe post an issue on their github repo to see if they have a recommended way about it.

Following today's ADS meeting where we decided to include Sentry tracking by default (but keep the warning on how they can opt-out) so that it's included in the pip installation of ADS, it looks like I can resolve @zougloub unhandled question even better by simply going away with the ./install_ads and bin/ads_sentry files altogether, and hardcode the Sentry code here ads_util.py (where users will be indicated to go to remove it for opt-outs). This way I don't need to deal with environment variables either.

Hi ! The idea is to have a configuration file on the user's home with the user configuration if he decided to opt-out/opt-in for sentry. I recently added code to save and load configuration file from user's home for the sct_dbtool, the code is in this file.

Thanks @perone ! Is there an advantage of doing it that way instead of notifying the user that they can simply change a bool flag in the code, like I've just implemented here:
https://github.com/neuropoly/axondeepseg/blob/565bfd10695298d5912a56845535c797aa17e678/AxonDeepSeg/ads_utils.py#L6-L12
https://github.com/neuropoly/axondeepseg/blob/565bfd10695298d5912a56845535c797aa17e678/AxonDeepSeg/ads_utils.py#L49-L51
I'm just wondering if it's worth creating an entirely new config file just this one setting in our case – the way above seems simpler, but maybe yours is cleaner?

Or is your idea that the first time they run an ADS script, that setup will appear?

i guess the nice thing with the config file is that if people reinstall ADS, or do updates, the desired configuration will not change. Also, if people work with a git version of ADS and modify the code, there will be merge conflicts in case there are future modifications of ads_utils.py file.
also, a config file might be useful in the future?

@jcohenadad Ahh those arguments all make sense to me now - I'll explore that then.

Besides what Julien commented, there is also the issue of the setup.py, I don't know if its possible to ask a question on the setup.py, so if we decide to stick with the script installation, we'll lose the pip install axondeepseg installation procedure.

@jcohenadad Ok, so I got the opt-out message to work cleanly on the user-side, but using a somewhat dirty trick on the code-side, so if this is not ok I'm completely fine with reverting 56dc600 and exploring other options.
Basically this implementation overrides the raven function that prints the "Sentry is attempting to send 1 pending error messages" message, by creating a dummy copy of that function, adding the opt-out message print statement after the one shown above, and then assigning it to the already imported raven module's function.

https://github.com/neuropoly/axondeepseg/blob/56dc6004d88f952e3d989cd648c3ba6f666be5e7/AxonDeepSeg/ads_utils.py#L9-L59

A caveat to this solution is that if ever there are changes in the original raven function, these would also have to be hardcoded in ads_util.py. However, it seems like it's a function with fairly low activity (as of today, the last change was made in Nov 2017), so as long as we fix the raven version requirement to 6.8.0 (which I did) and don't frequently upgrade it, I think we'll be ok.
Bug test output if user opted in:

(ads_venv) mathieuboudreau@brassens:~/neuropoly/github/axondeepseg$ axondeepseg -i test.png -t SEM
WARNING:tensorflow:From /Users/mathieuboudreau/anaconda3/envs/ads_venv/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.
Instructions for updating:
Use the retry module or similar alternatives.
AxonDeepSeg v.0.5
The path test.png does not exist.
Traceback (most recent call last):
  File "/Users/mathieuboudreau/anaconda3/envs/ads_venv/bin/axondeepseg", line 11, in <module>
    load_entry_point('AxonDeepSeg', 'console_scripts', 'axondeepseg')()
  File "/Users/mathieuboudreau/neuropoly/github/axondeepseg/AxonDeepSeg/segment.py", line 293, in main
    verbosity_level=verbosity_level)
  File "/Users/mathieuboudreau/neuropoly/github/axondeepseg/AxonDeepSeg/segment.py", line 94, in segment_image
    fp.close()
UnboundLocalError: local variable 'fp' referenced before assignment
Sentry is attempting to send 1 pending error messages
Waiting up to 10 seconds
Press Ctrl-C to quit
Note: you can opt out of Sentry reporting by changing the value of bugTracking to 0 in the file AxonDeepSeg/.adsconfig
(ads_venv) mathieuboudreau@brassens:~/neuropoly/github/axondeepseg$

Bug test output if user opted in:

(ads_venv) mathieuboudreau@brassens:~/neuropoly/github/axondeepseg$ axondeepseg -i test.png -t SEM
WARNING:tensorflow:From /Users/mathieuboudreau/anaconda3/envs/ads_venv/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/base.py:198: retry (from tensorflow.contrib.learn.python.learn.datasets.base) is deprecated and will be removed in a future version.
Instructions for updating:
Use the retry module or similar alternatives.
AxonDeepSeg v.0.5
The path test.png does not exist.
Traceback (most recent call last):
  File "/Users/mathieuboudreau/anaconda3/envs/ads_venv/bin/axondeepseg", line 11, in <module>
    load_entry_point('AxonDeepSeg', 'console_scripts', 'axondeepseg')()
  File "/Users/mathieuboudreau/neuropoly/github/axondeepseg/AxonDeepSeg/segment.py", line 293, in main
    verbosity_level=verbosity_level)
  File "/Users/mathieuboudreau/neuropoly/github/axondeepseg/AxonDeepSeg/segment.py", line 94, in segment_image
    fp.close()
UnboundLocalError: local variable 'fp' referenced before assignment
(ads_venv) mathieuboudreau@brassens:~/neuropoly/github/axondeepseg$

As for the config-side, that was setup in b5877cf and slightly fixed in 9183a6b. Now, if the config file (AxonDeepSeg/.adsconfig) does not exist when an ADS function is run, the user will be prompted to answer if they want to opt-in or out, and save their answer to that created file. Thanks @perone for the template code for this!

@jcohenadad Ok thanks! If you're ok with this latest implementation, please make a final "approved review" so that I can go ahead and merge.


feat: Add GitHub Action to push Docker image to GitHub Container Registry

This uses the macbre/push-to-ghcr Action to build and push on commits to main or numbered releases.
One open question, I'm not sure if this should be folded into the existing build-docker.yml workflow or if that's referenced/used separately.
Addresses #239

For more details, open the Copilot Workspace session.

Superceded


src/operator/rnn.cc:254:30: error: ‘kCuDNNDropoutDesc’ is not a member of ‘mxnet::ResourceRequest’

CentOS 7
CUDA8.0 + CUDNN6.0.21
when I run 'make -j16', then got the current error and I cannot find anything about it.
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -DNDEBUG=1 -I/disk2/dongsq/asr/mxnet/3rdparty/mshadow/ -I/disk2/dongsq/asr/mxnet/3rdparty/dmlc-core/include -fPIC -I/disk2/dongsq/asr/mxnet/3rdparty/tvm/nnvm/include -I/disk2/dongsq/asr/mxnet/3rdparty/dlpack/include -I/disk2/dongsq/asr/mxnet/3rdparty/tvm/include -Iinclude -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -mf16c -I/usr/local/cuda/include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -I/disk2/dongsq/asr/mxnet/3rdparty/mkldnn/build/install/include -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_MKLDNN=1 -DUSE_MKL=1 -I/disk2/dongsq/asr/mxnet/src/operator/nn/mkldnn/ -I/disk2/dongsq/asr/mxnet/3rdparty/mkldnn/build/install/include -DMXNET_USE_OPENCV=1 -I/disk2/dongsq/environments/OpenCV-3.4.6/include/opencv -I/disk2/dongsq/environments/OpenCV-3.4.6/include   -fopenmp -DMXNET_USE_OPERATOR_TUNING=1 -DMXNET_USE_LAPACK -DMSHADOW_USE_CUDNN=1  -I/disk2/dongsq/asr/mxnet/3rdparty/nvidia_cub -DMXNET_ENABLE_CUDA_RTC=1 -DMXNET_USE_NCCL=0 -DMXNET_USE_LIBJPEG_TURBO=0 -MMD -c src/operator/convolution_v1.cc -o build/src/operator/convolution_v1.o
g++ -std=c++11 -c -DMSHADOW_FORCE_STREAM -Wall -Wsign-compare -O3 -DNDEBUG=1 -I/disk2/dongsq/asr/mxnet/3rdparty/mshadow/ -I/disk2/dongsq/asr/mxnet/3rdparty/dmlc-core/include -fPIC -I/disk2/dongsq/asr/mxnet/3rdparty/tvm/nnvm/include -I/disk2/dongsq/asr/mxnet/3rdparty/dlpack/include -I/disk2/dongsq/asr/mxnet/3rdparty/tvm/include -Iinclude -funroll-loops -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-local-typedefs -msse3 -mf16c -I/usr/local/cuda/include -DMSHADOW_USE_CBLAS=1 -DMSHADOW_USE_MKL=0 -I/disk2/dongsq/asr/mxnet/3rdparty/mkldnn/build/install/include -DMSHADOW_RABIT_PS=0 -DMSHADOW_DIST_PS=0 -DMSHADOW_USE_PASCAL=0 -DMXNET_USE_MKLDNN=1 -DUSE_MKL=1 -I/disk2/dongsq/asr/mxnet/src/operator/nn/mkldnn/ -I/disk2/dongsq/asr/mxnet/3rdparty/mkldnn/build/install/include -DMXNET_USE_OPENCV=1 -I/disk2/dongsq/environments/OpenCV-3.4.6/include/opencv -I/disk2/dongsq/environments/OpenCV-3.4.6/include   -fopenmp -DMXNET_USE_OPERATOR_TUNING=1 -DMXNET_USE_LAPACK -DMSHADOW_USE_CUDNN=1  -I/disk2/dongsq/asr/mxnet/3rdparty/nvidia_cub -DMXNET_ENABLE_CUDA_RTC=1 -DMXNET_USE_NCCL=0 -DMXNET_USE_LIBJPEG_TURBO=0 -MMD -c src/operator/spatial_transformer.cc -o build/src/operator/spatial_transformer.o
src/operator/rnn.cc: In lambda function:
src/operator/rnn.cc:254:30: error: ‘kCuDNNDropoutDesc’ is not a member of ‘mxnet::ResourceRequest’
request.emplace_back(ResourceRequest::kCuDNNDropoutDesc);
^

After checking the (source code)[https://github.com/apache/incubator-mxnet/blob/master/include/mxnet/resource.h#L47], it seems that the master branch of MxNet only supports CuDNN>=7. Is there such problem? @szha

@Marcovaldong yes, prior versions of cudnn don't support restoring dropout state from a used dropout state space.

@Marcovaldong we can fix this at the cost of high overhead as we did before, which is by creating dropout descriptor per forward run. However, for the best performance I'd still recommend that you upgrade to cudnn 7 to benefit from the shared dropout state refactor. Being able to reuse the dropout state would save you non-trivial amount of time.

@mxnet-label-bot add [question, build, cuda]

@szha It needs time to upgrade cuda and cudnn, I will do it when I am leisure. I git clone wource code frm v1.1.0 branch and I installed it successfully. Thanks for your reply.


[WIP] UT for support pkg

For #4142
Signed-off-by: KMAnju-2021<EMAIL_ADDRESS>

@KMAnju-2021  please make sure you updates you local main branch before you create any new branch. Your based codes are quite old. You probably even works on out-of-date codes.

@KMAnju-2021 please make sure you updates you local main branch before you create any new branch. Your base codes are quite old. You probably even works on out-of-date codes.

I will take care of that, thanks!


Create an interactive WYSIWYG editor for posting threads

WYSIWYG editor are used all over in blogs and forums with different formatting options. We should have one for CAT-Forum too. Looking for possible solutions for this feature

Try out the wysiwyg-rails gem for the WYSIWYG editor


TVPaint integration

I have worked on the TVPaint-integration. So far I have the workfiles-tool working.
It took me a while to find an approach that was stable and not too difficult :-).
The working is based on a python-wrapper around the tvpaint-app that uses the socketserver-module(py).
With tvp-plugins that are made with the TVPaint-SDK, it is possible to talk to the pythonwrapper.
The wrapper starts tvpaint in a subprocess and keeps listening for commands(like "open the workfile gui"), until the shutdown command is given from tvpaint when it closes..
The whole module(called "python-tvpaint") that contains the wrapper/launcher, also has functions to talk back to tvpaint. (but for now, only when the given plugin is listening..)
It is possible to keep tvpaint accepting commands in a separate thread, but this can crash tvpaint very easily. I have to explore this some more..
Demo of using the workfiles-tool from within TVPaint:

Now proceeding with Load & Creation-functionality,
to be continued...

Exciting stuff!
Took me a couple of views to notice the Avalon panel from where you launched the workfiles app.
So to clarify the communication workflow:

Avalon Launcher launches a Python subprocess
Python subprocess launches TVPaint
Python subprocess listens with stdout for commands from TVPaint

What does a command look like?
This interprocess communication sounds a lot like how pyblish-qml works.

Hi Toke,
all communication goes via sockets. I started using this method because I wanted the communication to go both ways.
Also TVPaint can now receive errormessages from python side.. if necessary.
A command, for now, is just a simple string that gets compared by the pythonside or tvpaint-side,
like "OPEN workfiles", or "OPEN creator"..
.. after that, for example: Avalons workio-module, can then use the a TVP-wrapper-method like 'execTVPcommand' as follows:
import pytvpaint.functions as tvp
tvp.execTVPcommand("tv_saveProject /path/to/savinglocation/test.tvpp")

@kguyaux have you gotten anywhere further with the TV Paint integration? We'll be interested in implementing TV in avalon very soon probably, though we could put our heads together and pool resources to push it a bit.

Hi @mkolar,
I did not have enough time to work on it, unfortunately ..and the current crisis is not helping either :-) I have put this on my list and will contact you as soon as when I have put my head back into it..

I did not have time to work on the tvpaint-integration, But I did manage to upload the tvpaint-part to github:
https://github.com/kguyaux/tvpaint-avalon
I'll now work on publishing the avalon-core part..
..to be continued

..and I forked avalon-core, and added the tvpaint-branch

@kguyaux great news. We'll have a look at the code with pype.club team to see if we could help somehow.


Broken link in HED resources.

There is a broken link in the HED resources. In the section on Creating a new library schema in the following sentence:
"You should also read the HED schema development guide to get an overview of the development process."
The link to the HED schema development guide does not work.

Fixed by PR https://github.com/hed-standard/hed-examples/pull/336... Thx


Issue on grad

File "/home/phu/Desktop/gatedtabtransformer/sophia_custom.py", line 46, in step     hessian_estimate = self.hutchinson(p, grad)   File "/home/phu/Desktop/gatedtabtransformer/sophia_custom.py", line 61, in hutchinson     hessian_vector_product = torch.autograd.grad(grad.dot(u), p, retain_graph=True)[0]   File "/home/phu/miniconda3/envs/ner-py38-conda-env/lib/python3.8/site-packages/torch/autograd/__init__.py", line 303, in grad     return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
I also tried to use torch.sum(grad * u) but it did not work!

Exactly the same error.
This is how I solved it.
In case you use Sophia optimizer with Hutchinson Estimtor.
Change
https://github.com/kyegomez/Sophia/blob/34d905de2f3d628c4c40414923144a3b0a1df8a7/Sophia/Sophia.py#L50
to
hessian_estimate = self.hutchinson(p, p.grad)
Also, in your training loop, change
loss.backward()
to
loss.backward(create_graph=True)
Hope this helps.

Experiencing the same issue using current main version git+https://github.com/kyegomez/Sophia.git@a4db3506fffdab3a06cd4dd07ff54fb311450980

I meet the same question in Megatron when training distributed model...

I solved this issue by changing
def hutchinson(self, p, grad):
    u = torch.randn_like(grad)

to
def hutchinson(self, p, grad):
    u = torch.randn_like(grad, requires_grad=True)


Complete TODO tests inside SubmissionControllerTest

There are a bunch of left over TODOs inside the SubmissionControllerTest
* TODO Figure out how to remove fixture_file_upload
* TODO figure out how to test this test into the one above
* TODO Figure out how to remove fixture_file_upload
* TODO: Test that a student can't replace file if out of sync
* TODO: Test that a student can't replace a file if the new file has a different name
* TODO: TEST REPO BROWSER HERE
* TODO:
* Test whether or not an Instructor can release/unrelease results correctly
* Test whether or not an Instructor can download files from student repos

Is there still a need to remove fixture_file_upload calls? Why is leaking memory such a big issue if the test suite just rans once and the code terminates?


Support DEPRECATED: global use of must_equal from ... Use _(obj).must_equal instead. This will fail in Minitest 6.

Is your feature request related to a problem? Please describe.
While I'm working on https://github.com/googleapis/google-cloud-ruby/pull/4884 , I've found minitest that to prepare Ruby 3 keyword arguments support will require https://github.com/seattlerb/minitest/pull/824 , I think it would mean the newer version of minitest supports Ruby 3.
Gems under google-cloud-ruby repository lock the minitest version to use 5.11 or lower because minitest 5.12 shows DEPRECATED: global use of must_equal from must_equal.rb:28. Use _(obj).must_equal instead. This will fail in Minitest 6. https://github.com/seattlerb/minitest/blob/master/History.rdoc#label-5.12.0+-2F+2019-09-22
I'm looking for some way to address this warning automatically.
Describe the solution you'd like
It would be appreciated rubocop-minitest gem auto-corrects this warning.
Describe alternatives you've considered
Rewrite the test code by myself.
Additional context
Here are the steps to reproduce.

must_equal.rb

# frozen_string_literal: true

require 'bundler/inline'

gemfile(true) do
  source 'https://rubygems.org'
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
  gem 'minitest'
end

# Avoid `Style/Documentation: Missing top-level class documentation comment.`
class Greeting
  def say_hello
    'Hello, World!'
  end

  def say_nothing; end
end

require 'minitest/autorun'
describe Greeting do
  before do
    @foo = Greeting.new
  end

  it 'must say hello world with a warning' do
    # Bad
    @foo.say_hello.must_equal 'Hello, World!'
  end

  it 'must say hello world without warning' do
    # Good
    _(@foo.say_hello).must_equal 'Hello, World!'
  end
end

Result showing DEPRECATED: global use of must_equal from must_equal.rb:28. Use _(obj).must_equal instead. This will fail in Minitest 6.

% ruby must_equal.rb
Fetching gem metadata from https://rubygems.org/..................
Resolving dependencies...
Using bundler 2.1.2
Using minitest 5.14.0
Run options: --seed 34922

# Running:

DEPRECATED: global use of must_equal from must_equal.rb:28. Use _(obj).must_equal instead. This will fail in Minitest 6.
..

Finished in 0.000651s, 3072.1966 runs/s, 3072.1966 assertions/s.

2 runs, 2 assertions, 0 failures, 0 errors, 0 skips
% ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-darwin19]
%

I think it is reasonable to respond to official warnings.


HHP unlock

Added the prerequisites needed for HHP to be available to play

Lucas edited this info in already -- but thank you nonetheless!


Replace problamatic CharField GFKs with PositiveInterField fields.

Hi,
I just noticed an error that when you try to use any Django feature that joins GFK enabled models with other models (e.g. having GenericRelation defined on that model with some related_query_name), it produces an SQL error (PostgreSQL).
Let's take this example model:
class Post(models.Model):
    content = models.TextField(blank=True, null=True)
    position = models.PositiveSmallIntegerField(default=0, blank=True, editable=False)
    action_set = GenericRelation('actstream.Action', object_id_field='action_object_object_id', content_type_field='action_object_content_type', related_query_name='post')

We are using https://docs.djangoproject.com/en/1.8/ref/contrib/contenttypes/#reverse-generic-relations here with a related_query_name defined to help sorting/filtering activity streams based on this generic related model (Post) attributes. At this point, a query like below would produce some SQL error:
target_stream(another_object).order_by('post__position')

The error produced, in particular by PostgreSQL backend is:
operator does not exist: character varying = integer

Further investigation reveals that because you are using CharField for GenericForeignKey's PK/ID part, and because by convention other Django models use PositiveIntegerField for their primary keys, Django's SQL compiler is NOT type casting the JOIN clause. Thus, the JOIN is failing from SQL backend due to an attempt to JOIN by (varchar == int) clause.
I have successfully mitigated this issue by replacing your CharField definitions with PositiveIntegerField definitions. So, please have a look at my commit and let's discuss if there's any compelling reason to stick to CharFields.
Thanks,
Shanto

Please note, I discarded my previous pull request on the same topic which was not complete. Please ignore that one and consider this one here. Thanks.

Coverage decreased (-64.35%) to 0.0% when pulling f4050fce5eba25b51040702715b56127075af89c on Shanto:master into 18622828a8d225e9a1130d3de91a21db6e0d7488 on justquick:master.

this was to fix #40 and have the maximum possible compatibility with other apps that could use any of int/char/uuid fields. i tried to make it 80% compatible with existing apps but you have hit the missing %20 with the post__position ordering clause. i bet there's a way to fix this using raw sql but since it's such a specific use case i dont see how it could be made generic enough to be included here. thoughts?

Sorry that I didn't take into account your compatibility considerations in rush. Now I realize that this change is no longer needed or relevant– in fact, it would create more issues than fixing.
The source of problem is elsewhere. Seems like it can be fixed by either 1) having Django [contenttypes] developers fix it, or 2) until then work around with some custom PostgreSQL operator [on a project by project basis].

Just an update! I did some research and it seems like having Django ORM fixed for this particular issue is not an easy or quick job. See https://code.djangoproject.com/ticket/20271#comment:7
Until it's fixed by Django team, do you see any easy and clean workaround?

Even if Django team fixes this in far future, typecasting on PostgreSQL is an expensive operation for large dataset. Developers are aware of this and might not agree to compromise on performance. So, ultimately the recommendation would be to match object_id/fk types.
Changing app models' PK to char/text type fields [to match actstream model definitions] would affect working codes elsewhere [including performance issues]. Moreover, for foreign apps, this not even an option without maintaining my own forks.
I am holding from adding custom operators on PostgreSQL due to the same reasons.

See http://dba.stackexchange.com/questions/82511/how-to-enable-implicit-casts-in-postgresql-9-2#comment148718_82511 and http://grokbase.com/t/postgresql/pgsql-general/08adfz9c9v/bug-4078-error-operator-does-not-exist-numeric-character-varying#20081014hdv7hrlqfngjpimyinv3chuqrm.

Hi, would you be open to deciding on these fields at runtime– based on some settings key? E.g. if some key is set, then we could override things, otherwise keep using CharFields? Thus, 100% of your users will have both options open. Let me know and I will prepare a push request. Thanks.

runtime options make it hell for things like migrations and the extra code to support both types

@Shanto im open to it so give it a try here and ill review

This problem appeared to me today. I've migrated from SQLITE to PostgreSQL and then development environment crashed.
I could only fix everything by - applying your patch and recreating tables of activity stream (I had this convenience that my application is new and does not contain any data yet).
It would be awesome if it could be somehow merged.

This is really weird - its still happening with postgres and django 1.11. Someone should fix this soon :-( please

I am having same issue but with uuid field as primary key. (postgres 9.6.3 and django 1.11).

@slurms do you have any insight to fix this ?

We applied @Shanto s patch on a fork, and you have it here - https://github.com/3YOURMIND/django-activity-stream

@auvipy I can't think of anything off-hand that might fix it easily. The only thing that might be useful for this (and possibly other things) is allowing the model to be swappable and doing something similar to a custom user model: we supply an abstract base class to inherit from, and have a default implementation that covers most use cases, but allows others to customize it in their own apps to their liking. This would include things like having the activity items stick around after object deletions (#346), customising the way the data field is constructed, etc.

that should be the move then, I will start work on achieving the initial goals

:+1: let me know if you'd like some help, i can probably spare some time to help fix this

I have started work on abstract base model and swappable model settings based on an old abandoned pr https://github.com/justquick/django-activity-stream/pull/309. feel free to review and put your inputs there #387


INVALID CODE OR EXPRESSION ENTERED

Hi,
I not sure if this is a bug or just mistake in query (misusing - I am not familiar with the DS).
When I try:
raw1 = DWE.fetch(['POEURSP'], freq='D')

raw2 = DWE.fetch(['POLZLSF'], freq='D')

Both requests work.
But
raw_m = DWE.fetch(['POEURSP', 'POLZLSF'], freq='D')

raises exception:
pydatastream.pydatastream.DatastreamException: Failure (error 2): $$"ER", E100, INVALID CODE OR EXPRESSION ENTERED, POLZLSF(P) --> "POEURSP,POLZLSF~D"

Same result for
raw_m = DWE.request('POEURSP,POLZLSF~D')

In R below code returns (not sure if it is equivalent) data without problem:
dat <- ds(user, c("POEURSP", "POLZLSF"), period = "D")

Hello,
I would rather be surprised that the first two queries work. Your tickers (POEURSP and POLZLSF) are exchange rates and Datastream does not have the "closing price" field (P) for them - only bid, offer and mid prices (EB, EO, ER). When you provide these specific fields - everything will be fine:
raw1 = DWE.fetch(['POEURSP'], freq='D')
raw2 = DWE.fetch(['POLZLSF'], freq='D')
print raw1.head()
print raw2.head()

raw_m = DWE.fetch(['POEURSP', 'POLZLSF'], fields=['ER','EB','EO'], freq='D')
print raw_m['ER'].head()
print raw_m['EB'].head()
print raw_m['EO'].head()

Eventually (from the output) it returns the mid-rate (ER) by default for single ticker if no fields are provided. But for some reason for multiple tickers it tries to retrieve the field P, which does not exist (thus it returns an error: "INVALID CODE OR EXPRESSION ENTERED, POLZLSF(P)").
I don't remember the implementation of the RDatastream, but possibly it retrieves all tickers one-by-one, and thus does not have this issue.
You could check all available fields for each ticker on the Datastream web-portal. The login is the same as you provide for the library, but without DS: prefix, password is the same. Once you're in - search for ticker and under the plot you will see some buttons with mnemonics and button ">>" which opens a list of all available mnemonics for a given ticker.

Best
Vladimir


Add support for emscripten 1.38.46 and begin WASI support.

Signed-off-by: John Plevyak<EMAIL_ADDRESS>

Feel free to ignore STANDALONE_WASM=1 request (I filed #212 for it).

Ah, 1.38.46 requires env.___wasi_fd_write, so please ignore my request to split this as well.


Fix ips endpoint

Fix ips endpoint
I did a test proxying a call to mockbin with kong and it's not returning the Kong IP as body.
So I've checked the Express docs then modified the /ips route to return req.ips instead of req. forwarded.ips

:+1:


Feature/nimble user args

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.3 out of 13 committers have signed the CLA.:white_check_mark: xentec:white_check_mark: h2zero:white_check_mark: marcogmaia:x: copercini:x: prasad-alatkar:x: dhrishi:x: sjanc:x: rymanluk:x: andrzej-kaczmarek:x: zacwbond:x: yang325:x: michal-narajowski:x: redradistYou have signed the CLA already but the status is still pending? Let us recheck it.

Hi @redradist , most of the changes look specific to upstream NimBLE. It would be really great if you raise PR on mynewt NimBLE first here: https://github.com/apache/mynewt-nimble/pulls

Hi @redradist , most of the changes look specific to upstream NimBLE. It would be really great if you raise PR on mynewt NimBLE first here: https://github.com/apache/mynewt-nimble/pulls

@prasad-alatkar I've tired first it already https://github.com/apache/mynewt-nimble/pull/697
... But they decided that it is not needed and not useful at that moment


Save new order of a simple list.

I'm submitting a ...
[ ] bug report
[x ] feature request
[ ] question about the decisions made in the repository

Do you want to request a feature or report a bug?
Probably this is already available; but I want to "save" the new order of my list...

What is the current behavior?
I tried something with dragData, but I'm not sure which event of property to call.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar.

What is the expected behavior?

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Angular version: 2.X.X
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

i put my item id in an hidden input field, and i get the new order with this
private getFlowOrder(): number[] {
  let t = document.querySelectorAll('#mySortableList #itemId');
  let newOrder: number[] = [];
  for (let i = 0; i <= t.length; i++) {
    if (t.item(i) !== null)
      newOrder.push((t.item(i) as any).value);
  }
  return newOrder;
}

i put my item id in an hidden input field, and i get the new order with this
private getFlowOrder(): number[] {
  let t = document.querySelectorAll('#mySortableList #itemId');
  let newOrder: number[] = [];
  for (let i = 0; i <= t.length; i++) {
    if (t.item(i) !== null)
      newOrder.push((t.item(i) as any).value);
  }
  return newOrder;
}

@ildoc I have this same issue, would it be possible to show an example of this?  I have something like this:
<ul *ngIf="taskItems" class="tasks" dnd-sortable-container [sortableData]="taskItems">
        <li *ngFor="let task of taskItems; let i = index" dnd-sortable [sortableIndex]="i" (onDropSuccess)="dropSuccess($item)">
          <task-item
            class="task-item"
            [task]="task"
            (remove)="removeTaskItem.emit(task)"
            (update)="updateTaskItem.emit({task: task, changes: $event})">
          </task-item>
        </li>
      </ul>

Where each task object has a "sortedIndex" value that I'd like to update and keep in sync with whatever list position it's in.

Any supported solution for this issue?

UP


Worker/bucket Access Control

I hav the r2-explorer all configured and working properly. however I want to set up access control allow user1 to have access to 'bucket1', but not have access to 'bucket2'. Additionally, user2 has access to 'bucket2', but not 'bucket1'. How might I go about doing this?
Secondly, I want to only be able access my worker page through Cloudflare access portal and not publicly.

Hey @npullen2000 currently there are no permission configuration available in r2-explorer, maybe in the future that would be something to consider.
I think the best approach for this would be for you to deploy 2 different r2-explorer workers, where you have bucket1 configured in the first and bucket2 in the second.
Regarding the Cloudflare access, you can learn how to configure it in this page here

@G4brym I tried the repo yesterday and it looks promising! I used R2 to store my deepzoom images, which contain thousands of small images and it is impossible to upload via R2 Web UI, but this app handles it pretty well, though I have to split the uploading into multiple times.
It would be best to have an upload progress to know how many files were uploaded and were not to retry


Proc.new is deprecated; use &block instead

Ruby 2.7 issues warnings for Proc.new without a block:
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/formatters/base_formatter.rb:113: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/inspector.rb:63: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/formatters/base_formatter.rb:113: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/inspector.rb:63: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/formatters/base_formatter.rb:113: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/inspector.rb:63: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/formatters/base_formatter.rb:113: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/inspector.rb:63: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/formatters/base_formatter.rb:113: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/inspector.rb:63: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/formatters/base_formatter.rb:113: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/inspector.rb:63: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/formatters/base_formatter.rb:113: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/inspector.rb:63: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/formatters/base_formatter.rb:113: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead
/Users/alec/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_print-1.8.0/lib/awesome_print/inspector.rb:63: warning: Capturing the given block using Proc.new is deprecated; use `&block` instead

Same problem here with ruby 2.7.1p83 on Linux and macOS. It may seem like an minor issue, but it is hugely annoying in day to day operations.

You could consider switching to https://github.com/amazing-print/amazing_print which is maintained fork. The substitution is trivial.

it very easy to fix
  # awesome_print-1.8.0/lib/awesome_print/formatters/base_formatter.rb # 113
  def indented(&block)
    inspector.increase_indentation(&block)
  end

  # awesome_print-1.8.0/lib/awesome_print/inspector.rb # 63
  def increase_indentation(&block)
    indentator.indent(&block)
  end

but look like this repo is stop update ...

@csalvato prepared a PR (#392) that should solve this problem.

@csalvato prepared a PR (#392) that should solve this problem.

Fixed with latest PR

Fixed with latest PR

@BryanH Very good! When will this be release on RubyGems.org?

@BryanH Very good! When will this be release on RubyGems.org?

@tbsvttr Working on it - Travis is being very slow today; I have to wait for it to finish before I can cut an new release. Stay tuned!

@tbsvttr Working on it - Travis is being very slow today; I have to wait for it to finish before I can cut an new release. Stay tuned!


Sorting rows

Your plugin converts to display:block - even tr row.
Here is workaroud:
tr.as-sortable-item, tr.as-sortable-placeholder {
    display: table-row;
}

@piernik : thanks for the workaround, works fine for me.
Dear @a5hik,
Thanks for the great ng-sortable! Just started using it.
Many people seems to have to the problem with tables rows, because of the "display:block"
https://github.com/a5hik/ng-sortable/issues/21 (you say it was removed)
https://github.com/a5hik/ng-sortable/issues/84 (you say you can remove it)
yet...current release 1.3.0  https://github.com/a5hik/ng-sortable/blob/master/dist/ng-sortable.css
The display block is there, at line 5 to 7.
I am a bit confused.
Phil
Phil
Unless I am confused

Hi actually this style is required and this is placed back via #112

this is fixed in #237


Cannot find module '../introspection/ts-ast'

Description
Getting this error because the folder introspection is completely missing in the npm package.
Versions

graphqlgen: 0.2.13
OS name and version: 10.14.1

Should be fixed in 0.2.14


insertWithRelated should rollback when error on child insert

Hello,
Currently, insertWithRelated does not rollback data when there is an error on child insert (e.g. missing required field) what leads to invalid state of a database. Shouldn't this rollback by default (or at least have an option for that)? Right now, I'm forced to make a transaction out of it what makes it more complex
Best,
Rafal

Hi,
While you almost always should perform an insertWithRelated operation in a transaction, I don't think it's a good idea for objection to start a transaction implicitly behind the scenes. This is because you may want to control the transaction parameters (like isolation) and add other queries to it besides the insert.
Transactions are the only rational way to performa a rollback, so doing a non-database rollback doesn't make sense. So, just use a transaction 😄

Ok, it makes sense. I was thinking about insertWithRelated as an isolated block of tasks, but you're right with other queries :)


Foppish Physician

Summary
Due to the files being in the wrong folder, the Foppish Physician doesn't get removed properly using the script. The current files need to go into models/workshop_partner/player/items/medic/tw_coat/, not models/player/items/medic/.

Both the Distinguished Rogue (#15) and the Foppish Physician seem to be working normally on my end, the two styles get deleted/added depending on the flag (KEEP/REMOVE) used. I don't understand why it's not the case on your end. Could you send me the config file you used?

Here you go! config.txt
I've tried using just tw_coat_medic.vtx, but that only removes the style Epaulettes. tw_coat_medic_necktie.vtx removes the style Tie. I've gone ahead and attached screenshots in this Imgur album: https://imgur.com/a/GVO2QqQ

Ye here it be: database.txt
It's outdated by a few days now, but no changes have been made to touch the Foppish Physician or Distinguished Rogue, so it should still persist through to the latest version.

Gotcha. I'll keep this issue open for the time being, then. Otherwise, I'm running Fedora 36 KDE at the moment.


Add Input component

Creates new Input component
Extracts shared size-based configuration into getSizeStyles for consistency across components
Tweaks styles for Buttons rendered without children

lgtm!


elasticsearch ping caused variable view to disappear

Reproduction
use this command
es_conn <- elastic::connect(host = 'db', port = 9200, errors = "complete")
es_conn$ping()

where db is the service name of an elasticsearch container elasticsearch:7.8.1
i.e. (untested minimum working example docker-compose):
version: "3.8"
services:
    app:
        image: rocker/r-ver:4.0.0
        depends_on:
            - db
    db:
        image: elasticsearch:7.8.1
        environment: # environment variable inside container
            # elasticsearch single-node mode:
            - discovery.type=single-node
        volumes:
            - data:/usr/share/elasticsearch/data
            - 9200
volumes:
    data:
        driver: local

Effect
variables disappear from viewer in the left panel, but they are still accessible from the debugger console

On my machine this usecase seemed to work fine.
Were you able to reproduce the issue or should i close this?


Fix bug

Pull Request Test Coverage Report for Build<PHONE_NUMBER>6
Details

1 of 21 (4.76%)  changed or added relevant lines in 1 file are covered.
621 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-7.3%) to 6.438%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/lib.rs
1
21
4.76%

Files with Coverage Reduction
New Missed Lines
%

src/macros.rs
22
0.0%

src/lib.rs
599
4.28%

Totals

Change from base Build<PHONE_NUMBER>:
-7.3%

Covered Lines:
62

Relevant Lines:
963

💛  - Coveralls


stub_status counter leak when killing old workers

Environment
Include the result of the following commands:

nginx -V

nginx version: nginx/1.27.1
built by gcc 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
built with OpenSSL 3.0.2 15 Mar 2022
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_v3_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -ffile-prefix-map=/data/builder/debuild/nginx-1.27.1/debian/debuild-base/nginx-1.27.1=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'

uname -a

Linux lb 5.15.0-100-generic #110-Ubuntu SMP Wed Feb 7 13:27:48 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Description
Describe the bug in full detail including expected and actual behavior.
Specify conditions that caused it. Provide the relevant part of nginx
configuration and debug log.

[x] The bug is reproducible with the latest version of nginx
[x] The nginx configuration is minimized to the smallest possible
to reproduce the issue and doesn't contain third-party modules

Hello,
we've started killing (sending SIGTERM) "old" nginx workers (nginx: worker process is shutting down) as we have regular configuration changes and a lot of websocket connections.
Since we do this, the counters from stub_status are incorrect.
nginx status
> curl localhost/nginx_status
Active connections: 65369
server accepts handled requests
<PHONE_NUMBER><PHONE_NUMBER><PHONE_NUMBER>
Reading: 0 Writing: 31968 Waiting: 5356

Adding up Writing and Waiting it's just 37324 instead of the 65369 "active connections". But even 37324 is too high. The correct number should be around this:
> ss | grep https | wc -l
7327

It's reproducable e.g. using echo.websocket.org:
nginx configuration
map $http_upgrade $connection_upgrade {
	default upgrade;
	''      close;
}

server {
	listen 1234;
	location / {
		proxy_set_header  Host echo.websocket.org;
		proxy_ssl_server_name on;
		proxy_ssl_name echo.websocket.org;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection $connection_upgrade;

		proxy_pass https://echo.websocket.org:443;
	}
	location = /basic_status {
		    stub_status;
	}
}

Test
Open 2 tabs in the browser with the URL: http://localhost:1234/.ws
Now there are 3 active connection (one connection is the request to /basic_status):
# curl localhost:1234/basic_status
Active connections: 3
server accepts handled requests
 4 4 4
Reading: 0 Writing: 3 Waiting: 0

After that, reload the nginx process and you can see a nginx: worker process is shutting down process:
# systemctl reload nginx

# ps aux | grep [n]ginx
root     2233850  0.0  0.0  55372  5652 ?        Ss   22:29   0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 2233851  0.0  0.0  55896  6044 ?        S    22:29   0:00 nginx: worker process is shutting down
nginx 2233940  0.0  0.0  55868  5400 ?        S    22:30   0:00 nginx: worker process
nginx 2233941  0.0  0.0  55868  5240 ?        S    22:30   0:00 nginx: worker process

# kill 2233851

After we've killed the old process the websocket client in the browser will reconnect. After that we get two additional connection from stub_status even as the old connections are gone:
# curl localhost:1234/basic_status
Active connections: 5
server accepts handled requests
 7 7 7
Reading: 0 Writing: 5 Waiting: 0

Thank you for the feedback. According to the documentation I thought it would be ok:

Individual worker processes can be controlled with signals as well, though it is not required. The supported signals are:
TERM, INT |	fast shutdown
[...]

I assumed sending a TERM will behave similar as when the worker shutdown timeout happens.


chore: automated PR to update ReleaseNotes for 202310.19.2 VHD

This is an automated PR to bump ReleaseNotes for the VHD release with image version 202310.19.2

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 79.007%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2243

Relevant Lines:
2839

💛  - Coveralls

empty comment is for re-triggering stuck Github action


Feature list

A list of features such as a table of features here would be useful for the community so we can contribute in making UX components.
I personally will start creating ux components at the start of December, as right now I have something else to do, but others and I would probably love such a table table, allowing us to make this ux quicker than angular material 2, simply because of our strong community.

We're planning to start putting this together soon :) Thanks for the feedback.

Here's the start: https://github.com/aurelia/ux/wiki/Feature-List
We'll expand this list over time of course.


⚠ Bofrost.de has degraded performance

In 3009b37, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 928 ms

Resolved: Bofrost.de performance has improved in db02d25 after 305 days, 20 hours, 29 minutes.


URI encode strings passed into Email Alert API URLs

Trello: https://trello.com/c/koo6gJov/355-increase-visibility-of-sentry-alerts-for-email-apps-and-services
We see errors in Sentry 1 where clients are requesting information from
Email Alert Frontend with dubious strings that are then passed onto
email Alert API raw. To resolve this I've applied the uri_encode
function to all of the parameters that are used in Email Alert API URIs,
this will filter out any characters that should not be in a URL
including hacking attempts. The alternative to this would be to filter
characters in Email Alert Frontend before sending the data to Email
Alert API, this was rejected as it meant duplicating Email Alert API
logic in Email Alert Frontend.
In applying this I decided that this should be done on all URIs for
Email Alert API and not just particular exposed ones, this is because
this repo should not have any knowledge over how these endpoints are
used. Thus, if we consider one exposed to user input we should consider
them all the same.
Ideally this uri encoding would be done implicitly rather than needing
explicit definitions for each uri. It seemed a rather bold thing to
define at this point in the project but something like
put_json("unsubscribe/:id", params: { id: "test" }) would be preferable.
A pain point revealed by the explicit need was deciding what level of
testing to do. Testing every method felt a bit over-the-top, but that's
the approach I ended up taking since there I felt that it should be
tested and no method should seem special.

Thanks for the review @cbaines. You're right that both uuid and integer ids shouldn't need uri-encoding. The same situation also applies to slugs where, if they're formatted as per email-alert-api rules they also shouldn't need uri-encoding.
The problem lies in that none of these apply any pre-condition that the type is a particular format, nor is there convention for applications to apply pre-conditions to input before injecting it into gds-api-adapters. So bad input can equal invalid uris. Doing the uri encoding means that even bad input can form a request and the service can reject with a 404 or 400 if necessary.
It doesn't feel the worlds nicest practice but it is with precedence. Whereas setting up a pre-condition assertion before making a request would be a brand new approach to either GDS API or a client application.

Thanks for the review @cbaines. You're right that both uuid and integer ids shouldn't need uri-encoding. The same situation also applies to slugs where, if they're formatted as per email-alert-api rules they also shouldn't need uri-encoding.
The problem lies in that none of these apply any pre-condition that the type is a particular format, nor is there convention for applications to apply pre-conditions to input before injecting it into gds-api-adapters. So bad input can equal invalid uris. Doing the uri encoding means that even bad input can form a request and the service can reject with a 404 or 400 if necessary.

Right, I should have probably put more effort in to reading your commit message.
Adding route constraints in to apps or additional form validation is potentially useful as well, but I understand the motivation for some "defence in depth".

It doesn't feel the worlds nicest practice but it is with precedence. Whereas setting up a pre-condition assertion before making a request would be a brand new approach to either GDS API or a client application.

Yeah, and renaming GDS API Adapters variables uuid -> hopefully_a_uuid probably isn't helpful either...

Thanks @cbaines 👍