Add Feature for blade @permission directive

Hi there,
i'm using this in my own project, which is currently not yet published. But I wanted to make this usable for everyone.
Feature
For Role there is a Blade directive, but for Permissions it is missing. Now you can use the following also for permissions:
@permission('create-post')
    {{ __('You can create a post') }}
@endpermission

I also added the appropriate Documentation to the README.md

just fyi. I just made this all via the Github web interface. But I have some other changes in the pipeline, which uses a bit more work, so i'll install it locally in the next few days.

Contributors
Thanks to @Houbsi  for your valuable contributions!


When using Log4j2 version 2.24.0, the values in MDC are ignored, and only the context from the Elastic APM agent remains in the logs.

When using Log4j2 version 2.24.0, the values in MDC are ignored, and only the context from the Elastic APM agent remains in the logs.
We are using MDC to log the execution context for additional logging on our server. However, after upgrading to Log4j2 version 2.24.0, all MDC values that were directly added on the server are removed during logging, and only transaction.id and trace.id are left in the logs. This issue occurs with all versions of the Elastic APM Java agent on servers using Log4j2 version 2.24.0.
When I added the code below
MDC.put("test", "context")
println("mdc ====> ${MDC.getCopyOfContextMap()}")
log.info("mdc with log")

It will be printed as follows:
mdc ====> {test=leijflsijf, http.request.method=GET, client.ip=0:0:0:0:0:0:0:1, event.id=66f34bf7592c9908063e98cc}
2024-09-25 08:32:08.027  INFO 2054 [...] ... | mdc with log | {trace.id=c061f5b6bec4a128ca74d4f8fef25abf, transaction.id=ff649430cb802078}

When the agent is not added, when using a version of Log4j2 prior to 2.23.1, or when using Log4j2 version 2.24.0 with the -Dlog4j2.garbagefreeThreadContextMap=true VM option, the MDC is logged correctly as expected.
mdc ====> {test=leijflsijf, http.request.method=GET, client.ip=0:0:0:0:0:0:0:1, event.id=66f34bf7592c9908063e98cc}
2024-09-25 08:32:08.027  INFO 2054 [...] ... | mdc with log | {test=context, http.request.method=GET, client.ip=0:0:0:0:0:0:0:1, event.id=66f34bf7592c9908063e98cc, trace.id=1b9b28c6a255639c5b24d768cd1cc3ff, transaction.id=f48a0a6f189902b3}

My log4j2 config file is as follows
<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
    <Properties>
        <Property name="LOG_PATTERN">%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} %highlight{${LOG_LEVEL_PATTERN:-%5p}}{FATAL=red blink, ERROR=red, WARN=yellow bold, INFO=green, DEBUG=blue bold, TRACE=blue} %style{${sys:PID}}{magenta} [%15.15t] %style{%-40.40c{1.}}{cyan} | %m | %clr{%X}{faint} %n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}</Property>
    </Properties>

    <Appenders>
        <Console name="Console" target="SYSTEM_OUT">
            <PatternLayout pattern="${LOG_PATTERN}"/>
        </Console>
    </Appenders>

    <Loggers>
        <AsyncRoot level="INFO">
            <AppenderRef ref="Console"/>
        </AsyncRoot>
    </Loggers>
</Configuration>

It seems to have been a bug in log4j2 2.24.0.
After changing to version 2.24.1, it works without any problems.

It seems to have been a bug in log4j2 2.24.0. After changing to version 2.24.1, it works without any problems.


feature: Implemented string guarantee for String::numeric()

More work on #233

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (d11f90f) 98.78% compared to head (ac47db7) 98.82%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #335      +/-   ##
==========================================
+ Coverage   98.78%   98.82%   +0.03%
==========================================
  Files          47       47
  Lines        3046     3143      +97
==========================================
+ Hits         3009     3106      +97
  Misses         37       37

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Added details to find the current version

@JohanFreelancer9 Copy editing is needed for this PR. Thanks.

@efrene PR has been copyedited and is ready for final review, could you please check and merge? Thanks!


[General] Docker build with WSL2

Briefly summarize the issue being raised
I am about to create a docker image to build my Makefile project that consumes AFR.
I receive the following error message because of the line ending difference.
/project/freertos/vendors/espressif/esp-idf/install.sh: line 2: $'\r': command not found

Describe the desired outcome
I am able to build a Makefile project that consumes AFR with a Docker image.
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE="freertos/tools/cmake/toolchains/xtensa-esp32.cmake" -GNinja

Just like I can build an ESP-IDF project with espressif/idf:release-v4.2 image from the Docker hub.
System information

Hardware board: ESP32
IDE used: WSL2
Operating System:  Windows
Code version: 20210526_Archive-139-gb7151fe03

Code/Steps to reproduce the current status
Following the Getting Started guide I am consuming AFR in my Makefile project.
Questions
Do you have any best practices?
I am wondering if *.sh text eol=lf would be beneficial in the .gitattributes?

It looks your install.sh line ending character is messed up. It most likly your file is either ever opened or stored in windows environments and has a windows/DOS style of ending character (CR LF). You need convert if to Unix style ending character then I beleve the error will gone. Try the tool dos2unix. Here are some more details: https://stackoverflow.com/questions/11616835/r-command-not-found-bashrc-bash-profile/32912867

Hi  @mingyue86010,
Thank you for your answer.
I have windows 10 and my aim is to be able to build with docker.
The target is the same as with the ESP-IDF here, but doing it in the AFR way explained here at the "Using FreeRTOS in your own CMake project for ESP32" section.
The problem is that if I use AFR in the explained way in the Getting Started Guide, then the included ESP-IDF under /freertos/vendors/espressif/esp-idf is part of the project. So the line ending in the project build files and in the executables won't be correct.
Ideally, we have a docker image that is able to build an AFR project, similarly to the Espressif docker build solution:
docker run --rm -v $PWD:/project -w /project aws/afr-idf:release-v4.0 cmake -S . -B build-directory -DCMAKE_TOOLCHAIN_FILE=freertos/tools/cmake/toolchains/xtensa-esp32.cmake -GNinja

Do you have any docker image that is able to build a project which consumes AFR?

Hi @laszlopataki ,
Currently we do not provide a docker image to build the AFR project.
I get the code from 20210526_Archive can it look the install.sh has no problem running on Unix envirnoment. Regarding of your issue, it probably the git auto line ending conversion at checkout cause your problem. See https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings . Our project has a similar .gitattributes file, which set the "text=auto". So when you checkout the code by git in Windows environment, it will convert the file with your native line ending (CR LF). However when you build the code in Unix environment which by your docker.
So you can just simply set "text=false" to prevent the conversion. More details can be found here:https://stackoverflow.com/questions/21822650/disable-git-eol-conversions
Hopfully this can resolve your problem.
Regards,
Ming

Hi,
Thank you for your answer.
I just wanted to share a dockerfile that I could use to build an AFR project.
It is based on the docker image in the IDF project.
I have tested it on Windows, but it should work on Linux as well.
As a result of this, you are able to build with the same docker image on your local Windows/Linux PC and on the build server.
docker build --rm --no-cache -t "john/afr-builder:v1" .

docker run --rm -v $PWD:/project -v /project/freertos -w /project john/aft-builder:v1 cmake -S .
# To build the image with a specific commit ID of IDF, pass --build-arg IDF_CHECKOUT_REF=commit-id.
# It is possibe to combine both, e.g.:
#   IDF_CLONE_BRANCH_OR_TAG=release/vX.Y
#   IDF_CHECKOUT_REF=<some commit on release/vX.Y branch>.

# Set IDF_PATH to the installer IDF for the time of install
ENV IDF_PATH=/opt/esp/idf
RUN $IDF_INSTALL_PATH/tools/idf_tools.py --non-interactive install required \
  && $IDF_INSTALL_PATH/tools/idf_tools.py --non-interactive install cmake \
  && $IDF_INSTALL_PATH/tools/idf_tools.py --non-interactive install-python-env

# Set IDF_PATH to the build esp-afr-sdk
ENV IDF_PATH=$AFR_PATH/vendors/espressif/esp-idf

# Clean up
RUN rm -rf $IDF_INSTALL_PATH \
 && rm -rf $IDF_TOOLS_PATH/dist

# Ccache is installed, enable it by default
ENV IDF_CCACHE_ENABLE=1

COPY entrypoint.sh /opt/esp/entrypoint.sh

ENTRYPOINT [ "/opt/esp/entrypoint.sh" ]
CMD [ "/bin/bash" ]

Regards,
Laszlo


pnpm dev:generate-types generates different types from upstream + crashes

Link to reproduction
No response
Describe the Bug
When I run pnpm dev:generate-types, it generates a payload-types.ts different from upstream, and crashes.
❯ pnpm dev:generate-types

><EMAIL_ADDRESS>dev:generate-types /Users/tyteen4a03/Documents/CodeProjects/test/payload
> ts-node -T ./test/generateTypes.ts

(node:32811) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Compiling TS types for Collections and Globals...
[16:48:21] INFO (payload): Types written to /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/versions/payload-types.ts
[16:48:21] INFO (payload): Starting Payload...
Error: Cannot find module '../../../packages/payload/errors'
Require stack:
- /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/plugin-stripe/webhooks/subscriptionCreatedOrUpdated.ts
- /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/plugin-stripe/config.ts
- /Users/tyteen4a03/Documents/CodeProjects/test/payload/packages/payload/src/config/load.ts
- /Users/tyteen4a03/Documents/CodeProjects/test/payload/packages/payload/src/bin/generateTypes.ts
- /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/generateTypes.ts
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/tyteen4a03/Documents/CodeProjects/test/payload/node_modules/.pnpm/@cspotcode+source-map-support@0.8.1/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._load (node:internal/modules/cjs/loader:975:27)
    at Module.require (node:internal/modules/cjs/loader:1225:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/Users/tyteen4a03/Documents/CodeProjects/test/payload/test/plugin-stripe/webhooks/subscriptionCreatedOrUpdated.ts:11:17)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module.m._compile (/Users/tyteen4a03/Documents/CodeProjects/test/payload/node_modules/.pnpm/ts-node@10.9.1_@swc+core@1.3.76_@types+node@20.5.7_typescript@5.2.2/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Object.require.extensions.<computed> [as .ts] (/Users/tyteen4a03/Documents/CodeProjects/test/payload/node_modules/.pnpm/ts-node@10.9.1_@swc+core@1.3.76_@types+node@20.5.7_typescript@5.2.2/node_modules/ts-node/src/index.ts:1621:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/tyteen4a03/Documents/CodeProjects/test/payload/test/plugin-stripe/webhooks/subscriptionCreatedOrUpdated.ts',
    '/Users/tyteen4a03/Documents/CodeProjects/test/payload/test/plugin-stripe/config.ts',
    '/Users/tyteen4a03/Documents/CodeProjects/test/payload/packages/payload/src/config/load.ts',
    '/Users/tyteen4a03/Documents/CodeProjects/test/payload/packages/payload/src/bin/generateTypes.ts',
    '/Users/tyteen4a03/Documents/CodeProjects/test/payload/test/generateTypes.ts'
  ]
}
 ELIFECYCLE  Command failed with exit code 1.

To Reproduce

Clone the payload repo.
Run pnpm install, then pnpm dev::generate-types

Payload Version
2.8.2
Adapters and Plugins
No response

It does:
❯ pnpm dev:generate-types plugin-stripe

><EMAIL_ADDRESS>dev:generate-types /Users/tyteen4a03/Documents/CodeProjects/test/payload
> ts-node -T ./test/generateTypes.ts "plugin-stripe"

Error: Cannot find module '../../../packages/payload/errors'
Require stack:
- /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/plugin-stripe/webhooks/subscriptionCreatedOrUpdated.ts
- /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/plugin-stripe/config.ts
- /Users/tyteen4a03/Documents/CodeProjects/test/payload/packages/payload/src/config/load.ts
- /Users/tyteen4a03/Documents/CodeProjects/test/payload/packages/payload/src/bin/generateTypes.ts
- /Users/tyteen4a03/Documents/CodeProjects/test/payload/test/generateTypes.ts
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1134:15)
    at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/Users/tyteen4a03/Documents/CodeProjects/test/payload/node_modules/.pnpm/@cspotcode+source-map-support@0.8.1/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
    at Function.Module._load (node:internal/modules/cjs/loader:975:27)
    at Module.require (node:internal/modules/cjs/loader:1225:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/Users/tyteen4a03/Documents/CodeProjects/test/payload/test/plugin-stripe/webhooks/subscriptionCreatedOrUpdated.ts:11:17)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module.m._compile (/Users/tyteen4a03/Documents/CodeProjects/test/payload/node_modules/.pnpm/ts-node@10.9.1_@swc+core@1.3.76_@types+node@20.5.7_typescript@5.2.2/node_modules/ts-node/src/index.ts:1618:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Object.require.extensions.<computed> [as .ts] (/Users/tyteen4a03/Documents/CodeProjects/test/payload/node_modules/.pnpm/ts-node@10.9.1_@swc+core@1.3.76_@types+node@20.5.7_typescript@5.2.2/node_modules/ts-node/src/index.ts:1621:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/tyteen4a03/Documents/CodeProjects/test/payload/test/plugin-stripe/webhooks/subscriptionCreatedOrUpdated.ts',
    '/Users/tyteen4a03/Documents/CodeProjects/test/payload/test/plugin-stripe/config.ts',
    '/Users/tyteen4a03/Documents/CodeProjects/test/payload/packages/payload/src/config/load.ts',
    '/Users/tyteen4a03/Documents/CodeProjects/test/payload/packages/payload/src/bin/generateTypes.ts',
    '/Users/tyteen4a03/Documents/CodeProjects/test/payload/test/generateTypes.ts'
  ]
}
 ELIFECYCLE  Command failed with exit code 1.

Also to note that it also generated a different upstream payload-types files (sorry I forgot to add it to the initial issue):
diff --git a/test/versions/payload-types.ts b/test/versions/payload-types.ts
index 2a7c29f38..09ab2e331 100644
--- a/test/versions/payload-types.ts
+++ b/test/versions/payload-types.ts
@@ -1,4 +1,5 @@
 /* tslint:disable */
+/* eslint-disable */
 /**
  * This file was automatically generated by Payload.
  * DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,
@@ -7,59 +8,139 @@

 export interface Config {
   collections: {
-    'autosave-posts': AutosavePost
-    'draft-posts': DraftPost
-    'version-posts': VersionPost
-    users: User
-  }
+    'disable-publish': DisablePublish;
+    posts: Post;
+    'autosave-posts': AutosavePost;
+    'draft-posts': DraftPost;
+    'version-posts': VersionPost;
+    'custom-ids': CustomId;
+    users: User;
+    'payload-preferences': PayloadPreference;
+    'payload-migrations': PayloadMigration;
+  };
   globals: {
-    'autosave-global': AutosaveGlobal
-    'draft-global': DraftGlobal
-  }
+    'autosave-global': AutosaveGlobal;
+    'draft-global': DraftGlobal;
+    'disable-publish-global': DisablePublishGlobal;
+  };
+}
+export interface DisablePublish {
+  id: string;

Sorry, I'm still not able to recreate this. Closing for now.


Memory leak when starting IMU

When starting the IMU with
_device.StartImu();
the memory consumption increases steadily. As soon as I stop the imu with
_device.StopImu();
the memory consumption does not increase anymore.
Expected behavior
Starting the Imu should not create a memory leak.
Desktop:

OS with Version: Windows 1903
SDK Version:  1.4.0
Firmware version:
RGB camera firmware:      1.6.98
Depth camera firmware:    1.6.70
Depth config file:        6109.7
Audio firmware:           1.6.14

Could you please provide more precise repro steps? Is this C/C++ or C#?
Are you running one of the samples?
What tool are you using to monitor memory leakage?
Did you wait long enough for queue stabilization (wait beyond 15 seconds)?

Steps to reproduce:

checkout https://github.com/microsoft/Azure-Kinect-Samples/tree/master/body-tracking-samples/csharp_3d_viewer
add device.StartImu(); after line 26 in Program.cs
run the program in VS 2019 and monitor the memory in VS. The memory increases over time (I tried for 10 minutes and it is still increasing)

Same issue on my side

The issue is also occurring in C# and Unity3D. You can reproduce it easily:
Unity3D

Start any Kinect Unity application.
Open the Profiler.
Select Memory.
Take a sample.

The ManagedHeap.UsedSize reaches 1 GB within a few seconds and keeps growing.
Also, you'll notice that the Task Manager's memory consumption is increasing.

I discovered this issue too, with nuget package Microsoft.Azure.Kinect.Sensor 1.4.1. Are there going to be an update in the future?


Help with SPIFFS_NOT_A_FS, SPIFFS_ERR_DELETED errors in test program

Hi spiffs, I'm having trouble with my spiffs test program, and I'm hoping someone can help.
Here's my configuration:

8MB of flash, Macronix MX25R6435F
(chip is a Silicon Labs EFR32)
#define SPIFFS_USE_MAGIC                (1)
#define SPIFFS_USE_MAGIC_LENGTH         (1)
#define SPIFFS_SINGLETON 1
#define SPIFFS_CFG_PHYS_SZ(ignore)        (2 * 1024 * 1024) // only using 2MB of 8MB for my test
#define SPIFFS_CFG_PHYS_ERASE_SZ(ignore)  (4*1024) // the flash supports 32k and 64k erase commands, but we want to use 4k
#define SPIFFS_CFG_PHYS_ADDR(ignore)      (0)
#define SPIFFS_CFG_LOG_PAGE_SZ(ignore)    (256) // Flash page size
#define SPIFFS_CFG_LOG_BLOCK_SZ(ignore)   (4*1024)

I am trying to mimic the "hello world" example on the "Using Spiffs" wiki page, but I don't get far:

In a separate test program, I erase the flash. Then...
Mount fails as expected
Unmount is ok
Format is ok
Trying to mount again fails with the error SPIFFS_NOT_A_FS

If I set SPIFFS_USE_MAGIC to 0 (to see what will happen), I get farther:

In a separate test program, I erase the flash again. Then...
Mount fails as expected
Unmount is ok
Format is ok
Re-mount is ok
I can open my_file (with flags SPIFFS_CREAT | SPIFFS_TRUNC | SPIFFS_RDWR)
I can write to and close "my_file" with "Hello world" in it
I can re-open the file (with flags SPIFFS_RDWR), but...
I cannot re-read from the file: SPIFFS_read fails with SPIFFS_ERR_DELETED

If I try to run the test program again (withOUT erasing flash, just running the program again), it fails at the first SPIFFS_open call (with the flags SPIFFS_CREAT | SPIFFS_TRUNC | SPIFFS_RDWR), again with the SPIFFS_ERR_DELETED error.
FWIW, I have tried that test program both with and without calling SPIFFS_fflush before calling SPIFFS_close, and it did not help.
So, I am hoping someone has a suggestion about what might be wrong.
Full disclosure -- I've also been working with littlefs and have had problems there, too, so that tells me something very basic is wrong, but I can't figure it out. I can run a test program where I erase/write/re-read the flash directly through our flash driver, and that works.
Any help is appreciated! I am new to firmware development and have not worked with flash before, so no suggestion is too simple. For example, at the flash driver level, I do check the Write In Progress bit before returning to the caller, but I did not at first, so asking me if I had would have been reasonable!

Hi, we've been having same issues like you've reported. Getting SPIFFS_NOT_A_FS after mounting, getting SPIFFS_ERR_DELETED when opening a file.
Were u able to solve this, and how?


Depends for behaviors

I want to be able to specify dependency list in Behavior - inherited class, so at first it will look from the
declared behaviors, and if no match found it will attach unnamed behavior. Second - I will sure that behaviors will be initialized in proper sequence, so one behavior can rely on dependent behaviour features which was properly initialized before. Normally behavior has required params, and I should be able to specify desired configuration in the dependency list. So I will have ability to reuse code of behaviors from other behaviors without need to duplicate code.
An example:
class Product has behaviors:
CleanRelated:  'managedRelations' => ['productTranslations', 'tags', 'options', 'prices']
it will automatically cleanup all relations specified with public property
Localized: 'localizedRelations' => [['productTranslations' => 'i18n'],]
it will genereate virtual relation 'i18n' which will select one record from productTranslations based on language.
Sluggable => [sluggableAttribute: productTranslations.name]
it will take attribute from the config and generate slug based on field 'name' from productTranslations relation. It will also provide virtual Relation called 'slugs' and link it with 'manageRelations' relations list: $owner->manageRelations[]= 'slugs'. To make it possible need to ensure that CleanRelated attached before Sluggable.
It will also add 'slugs' to localizedRelations by $owner->localizedRelations[]=['slugs'=>'slug_i18n'], so we need to ensure that Localized relation will be attached if it's not in the list, and will generated in proper sequence so we don't need to care about sequence.
I think adding this feature will thremendously extend Behavior driven metaprogramming capabilities of the YII2 framework.

Are you adding behaviors dynamically?

Behaviors are ment to be independent, and should not have a coupling between each other.
Code duplication can be reduced using regular class extending or traits.
Since behavior usually have some configuation parameters, creating dependency between them will go nowhere: how correspondence of the parameters should be maintained then?


Update http4s-circe, http4s-client, ... to 1.0.0-M30

Updates

org.http4s:http4s-circe
org.http4s:http4s-client
org.http4s:http4s-core

from 1.0.0-M23 to 1.0.0-M30.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.http4s" } ]

labels: library-update, early-semver-pre-release, semver-spec-pre-release, commit-count:1

Superseded by #79.


Istioctl has unexpected gateway conformance test pflags after bumping dependency

What happened:
Right now, after bumping gateway dependency https://github.com/istio/istio/pull/49637, new istioctl has pflags like:

The old api version works fine. It looks like https://github.com/kubernetes-sigs/gateway-api/pull/2801/files adds the flag package to the suite.
What you expected to happen:
No gateway test flag exists in istioctl's pflags.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:

/cc @frankbu @mlavacca


Stars chart for embed no longer working

Bug report
Charts can be embedded via the following url for example:
repository.surf/supabase/supabase/embed?chart=stars
Think the stars chart is broken due to the changes we've done for star retrieval. Will need to bring the changes over from index.js to embed.js.

@ykdojo might need your help on this - we'll just need to pull the star history for a specified repo

@ykdojo might need your help on this - we'll just need to pull the star history for a specified repo

@joshenlim ok I'll take a look. thanks for letting me know!

@joshenlim ok I'll take a look. thanks for letting me know!

@joshenlim Just checked this page. It looks like it's working?

@joshenlim Just checked this page. It looks like it's working?


Fix documentation for loading yaml

I was trying to get YAML loading working and ended up having to find elsewhere that the #[cfg(feature = "yaml")] flag was needed. Updated the documentation to include said flag :)

This change is

Coverage increased (+0.01%) to 92.226% when pulling 61bd931198a14ffa27d020430694effe4d052e59 on watzon:master into 1ef6e62e1e05f3a1c5dee4d946eb85c9778e4065 on kbknapp:master.

That shouldn't be required in user code :worried: However you should compile clap with the "yaml" feature (such as clap = { version = "2.26.0", features = ["yaml"] } in ones Cargo.toml).
Am I misunderstanding the issue though? I wouldn't be the first time :stuck_out_tongue_winking_eye:

Nope, I figured that out later. This can be closed.


Pass in parameters to the workbook

We are using the Tableau Server Client python API, works really well, we are able to export the workbook to pdf.
One question though, some of our workbooks do take the parameter, we can hit them from browser and pass in the parameter, but I did not find a way to pass workbook parameter from python API.
Can you please help?

I feel this is a very basic requirement to pass the parameter to workbook and populate the pdf, unfortunately it does not support?

You should be able to pass a parameter just like you would any other filter.
pdf_req_option = TSC.PDFRequestOptions(page_type=TSC.PDFRequestOptions.PageType.Letter,
orientation=TSC.PDFRequestOptions.Orientation.Landscape)
pdf_req_option.vf(nameOfParameter,parameterValue)
I have this currently working in my use case.

When I do that, I am getting empty PDFs (no data, just column names and the parameter name does no change from the default one). This piece of code works for filters but not parameter views.
`pdf_req_option = TSC.PDFRequestOptions(
page_type=TSC.PDFRequestOptions.PageType.A4,
orientation=TSC.PDFRequestOptions.Orientation.Landscape)
pdf_req_option.vf("Country", "DE")
print(pdf_req_option)
        server.views.populate_pdf(view, pdf_req_option)`

@lucical I can't speak to your use case, but I can confirm I'm able to pass values into a parameter with my above code.
In my use case I have a parameter called "Vendor Selection", a calculated field called "Vendor Filter", and a dimension called "Vendor". The "Vendor Filter" calculated field assesses whether or not the "Vendor" dimension matches the "Vendor Selection" parameter, and I have this calculated field as a filter on my worksheet, keeping only the TRUE results.
My request options filter code looks like:
pdf_req_option.vf('VendorSelection',vendorList[i])
where I am iterating through a list of vendors.
I also ensured I do not have a dimension/measure with the same name as my parameter, as I'm not sure how the API would parse that.

@kevinwpeters-thd
I also ensured I do not have a dimension/measure with the same name as my parameter, as I'm not sure how the API would parse that.
This is something that helped me solve the issue! The parameter name and the parameter title were different hence I was getting empty PDFs.
Thanks!

Feel free to reopen the issue if you think that the issue is not solved

I am having this same issue where I am passing, in my case, into the filter ('SiteP', site[i]) where I am iterating over the site.
However I am only ever able to see one view, I get the last site loaded onto the tableau server, and applying the filter changes nothing in the output files. How can I force setting this as a parameter?


Bower dependency on angular: "~1.2.14"

Thank you for ng-scope, it's really made some of our developers happy.
We have a niggle, however, and that is every time a new version of angular is released, our CI breaks because manual intervention is required to chose between angular 1.2.14 and the latest 1.5.x angular. In our limited testing so far, it seems okay with 1.5
Can you update the bower definition to be less version specific.

@ml-workshare Thanks. Released as 0.1.3.


Fix samples/ path

Thanks for catching this!
Did you found this by trying it on a non-Windows system? Did everything else work fine? I actually only ever tested it on Windows (also the reason for the spelling mistake...).

Yup, on Linux Ubuntu 21.10
The pre-buld "./system" doesn;t work
Trying to build it manually rn...

Thanks for catching this! Did you found this by trying it on a non-Windows system? Did everything else work fine? I actually only ever tested it on Windows (also the reason for the spelling mistake...).

The basic sample worked fine!
Which made me want to test the advanced one :-)

Ouch
$ ls system
include  lib  system.bc
$ make -j 8 -f wajic.mk ./system/system.bc
wajic.mk:90: *** No source files found for build.  Stop.

Is that expected @schellingb ?

Yup, on Linux Ubuntu 21.10 The pre-built "./system" didn't work for me Trying to build it manually rn...

Actually I failed building "system/" manually..
See issue https://github.com/schellingb/wajic/issues/1

Hey there
I don't think issue #1 is about system.bc but thank you for posting the error you get in there.
I just committed 3f4de6b which should hopefully fix the issues for you.
Please check it out and report back. Thanks.

Hey there I don't think issue #1 is about system.bc but thank you for posting the error you get in there. I just committed 3f4de6b which should hopefully fix the issues for you. Please check it out and report back. Thanks.

Yes, it fixed the error, thanks! But then I get another error; I created issue #3 and cleaned up issue #1


How to set max_compositions

Hi Chen, do you know how to set the max_compositions/steps param? The default at https://github.com/lxuechen/private-transformers/blob/684e27fcd9978539fbabc357c7ea506c0353c771/private_transformers/privacy_utils/privacy_engine.py#L148
is 0 but would raise an error
private-transformers/private_transformers/privacy_utils/accounting/gdp_accounting.py:33: RuntimeWarning: invalid value encountered in double_scalars return norm.cdf(-eps / mu + mu / 2) - np.exp(eps) * norm.cdf(-eps / mu - mu / 2)
rv_accountant/accountant.py:55: RuntimeWarning: divide by zero encountered in double_scalars mesh_size = 2*eps_error / np.sqrt(2*max_compositions*np.log(2/eta0))

Great point. Ideally, we'd only call the privacy accounting function after we've done a gradient update, in which case we'd get strictly positive self.steps (note self.steps is updated in the step function).
My code runs a prelim. eval. before any parameter update just to check the initial performance model of the model. This produces a warning you'd get, since the privacy accounting code is also ran. This doesn't really affect the correctness however.

By the way, self.steps is not the max composition steps, but rather the current number of updates ran by the model.

Thanks Chen for the explanation! I set the dataset size too small when debugging so self.steps didn't get updated as gradient_accumulation_steps was never reached.


Content for the About Us page

📝 Description
Issue:
The content for About Us page is not there
Proposal:
I would like to add the content
🖼 Screenshots
No response
📋 Additional Information
No response

Can I work on this issue?

Yes sure


Evaluate downloading binary vs providing binary

With the list of Selenium releases on http://selenium-release.storage.googleapis.com/index.html it is possible to automate downloading the Selenium server standalone binary at composer install.
Pros saved bandwidth for maintainers and the repository itself and a potential higher security for end users in case the repository gets compromised. Cons would be more complex logic inside this repository, the loss of ability to cache the package through composer mirrors like Satis.
What do you think @asgrim?

It does indeed reduce maintenance burden; though the version matching kinda goes out the window; or would you download the version that matches whatever is checked out, and automate the releases or something?

To clarify further, I think there's another option:

Continue manually releasing & verifying (potential for human error eventually)
Automate downloading the latest version (versions requested in consumer composer.json becomes irrelevant, the next would basically be "the last" release, unless something needed to change)
Use Ocramius/PackageVersions to find out what version of Selenium is requested, and download that. We'd have to automate releases; pick up on a feed of releases, automatically create and push the tag etc. each time somehow. Not too difficult, but I think this is a nice option...


fix: background gradient in samples

Should add the property 'fill' to display the gradient background

Thank you, @howard-tzw


bug: robots api is broken

The robots API hasn't been working since a few hours ago.
I think after Steven worked on the Gnosis Offramp eure bot script, API appears to have been broken. (Gnosis bot was not shown in the API)

The FE code that was used to create the first new bot is here https://github.com/VolumeFi/palomabot/tree/feat/gnosis-bot

fixed https://service.palomabot.ai/robots
https://github.com/VolumeFi/bot-info-api/commit/6841a94a9c65627a76467b5ec599626cb96026a0

https://discord.com/channels/987730379182051408/1065140873811218532/1172228583004057610


Allow REST Port Listener to be Configurable

Right now, the Daemon port automatically binds the REST Port to localhost. This is a good idea for security, however it's a non-starter when the Daemon is in a container cluster and must be communicated with by other containers.
We should add an --expose-rest-port flag that will optionally bind the REST Port to <IP_ADDRESS> to enable this use-case.
cc @figitaki @Schmavery @bkase

p.s. this currently blocks the Faucet bot as I would like to use the docker container architecture I mentioned for this purpose

https://github.com/CodaProtocol/coda/pull/2942 does this, argument is named -insecure-rest-server


Inline chat applies changes to the whole file and ignores my selection.

Type: Bug
Select a few lines of code and ask the inline chat to change something in the selection. The request will always apply changes to the whole file instead of only applying it to the selected code. This makes the inline chat completely useless, it messes up my whole file. As a user I need to be able to define the scope to be changed.
 The request will always apply changes to the whole file instead of only applying it to the selected code.

This should really not happen. I trust you but I also know it works well for me. We can move forward with your issue you can share a more concrete sample. E.g the code you have, what your selection and your prompt is. Have a case like that will allow us to nail down bugs and fix them. Thanks


Assisted Installer - API V1 removal

Bug description
Hi folks, Assisted Installer team from this side...
We have deprecated API V1 some time ago and have already removed it in a master branch of assisted-service repository (https://github.com/openshift/assisted-service). I have noticed that you are still referencing v1 endpoints in this repo here, so please be aware this is going to stop working soon.
E.g. in https://github.com/redhat-partner-solutions/crucible/blob/main/playbooks/deploy_assisted_installer_onprem.yml#L26 there is url: "http://{{ ansible_host }}:8090/api/assisted-install/v1/clusters" which is not valid in the master branch anymore.
OpenShift version
other (provide in the description)
Assisted Installer version
other (provide in the description)
Relevant log output
No response
Inventory file
No response
Required statements

[X] I have removed all sensitive details from the attached logs and inventory files.
[X] I acknowledge that Red Hat does not provide commercial support for the content of this repository.
[X] I acknowledge that any assistance is offered purely on a best-effort basis, as resource permits.

We're working on it, the branch can be found here. https://github.com/nocturnalastro/crucible/tree/apiV2 unfortunately work got delayed. It will be here soon.

Sorry about that we're working to get the v2 branch out soon :) Apologies for the inconvenience.


2.5.1 doesn't depend on functools32 under python2.7

Installing 2.5.1 from scratch under python 2.7.3 works goes fine, but then explodes on a missing import (functools32) when trying to import.
Python 2.7.3 (default, Mar 13 2014, 11:03:55)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jsonschema
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/jsonschema/__init__.py", line 12, in <module>
    from jsonschema.exceptions import (
  File "/usr/local/lib/python2.7/dist-packages/jsonschema/exceptions.py", line 6, in <module>
    from jsonschema import _utils
  File "/usr/local/lib/python2.7/dist-packages/jsonschema/_utils.py", line 6, in <module>
    from jsonschema.compat import str_types, MutableMapping, urlsplit
  File "/usr/local/lib/python2.7/dist-packages/jsonschema/compat.py", line 39, in <module>
    from functools32 import lru_cache
ImportError: No module named functools32

But on python 2.7.9 everything is fine
Python 2.7.9 (default, Mar  1 2015, 12:57:24)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jsonschema
>>>

My test environments are docker containers running debian wheezy and debian jessie.

Duplicate of #233

Yeah, thanks!
I'm still undecided on whether it's appropriate to fix or just leave it at "you'll need a recent version of pip". There are ways to support older versions (twine does them), but it's additional effort.


RFC: embedded string interpolations

This issue is a follow-up from https://github.com/http4s/http4s/issues/3433.
I've struggled with this a bit and think it's quite problematic to embed string interpolations to uri"" and path"" of http4s (actually, it's so for every interpolated macros based on literally):

At the moment, compilation fails if invalid strings have been passed (underlying validate is calling at compile time).
Say

val foo = "/foo/bar"
val someuri = uri"https://example.com$foo"

means that we should check the value of foo at the runtime (generally, foo could be some computation, not a constant value). So bringing embedded string interpolations means we should proceed with runtime values at compile time (because of 1). I'm not that much a Scala macros astronaut, but am feeling it's probably impossible.
UPD: speaking more accurately, compile-time checking is only possible for the literal part of the passed string.
If anyone has insights about that, please share them here.

Yes, that's correct. It's possible to support interpolation of constant values at compile time, but not possible to use non-constant values. Doing so would require changing the macro to return an Either[String, Uri] when there are one or more non-constant parts and Uri otherwise. This type switching would require a white box macro in Scala 2 and transparent inline in Scala 3.
To support interpolation of constant values, we could do something like this:

trait Literally[A]:
  type Quotes = scala.quoted.Quotes
  type Expr[A] = scala.quoted.Expr[A]
  val Expr = scala.quoted.Expr

  def validate(s: String)(using Quotes): Either[String, Expr[A]]

  def apply(strCtxExpr: Expr[StringContext], argsExpr: Expr[Seq[String]])(using Quotes): Expr[A] =
    apply(strCtxExpr.valueOrAbort.parts, argsExpr.valueOrAbort)

  private def apply(parts: Seq[String], args: Seq[String])(using Quotes): Expr[A] =
    val str = parts.zipAll(args, "", "").map(t => t(0) + t(1)).mkString("", "", "")
    validate(str) match
      case Left(err) =>
        quotes.reflect.report.error(err)
        ???
      case Right(a) =>
        a

Usage:
scala> inline val x = "4"

scala> val y = port"1${x}2"
val y: org.typelevel.literally.examples.Port = Port(142)

This is too limited though as it requires the args list to be strings. It would be nicer to support arbitrary types there. Overall, I don't think the complexity is worth it.


[ENHANCEMENT STYLING] Improve UI of the all doctors card

Description
Currently the all the doctors card looks too colourful and does not match the theme of the rest of the website .
So I want to improve the UI of those cards.
Expected Behavior
Doctors card should match the theme of the website .
Screenshots (if applicable)
Actual:

Expected :
Will update after making new UI but it will follow the rest of the websites theme .

@itsmohit097 please assign this issue to me, I want to work on this issue

@pspriyanshu601 assigned
Can you complete it by today?

yes , I will send the pr by today evening .
Thanks for assigning 😊.

Hey @itsmohit097 , can you please review the pr I made , and suggest changes if any .
Thanks in advanced.


feat(ctl): add bench command

What's changed and what's your intention?
This bench command is very simple now. We can use risectl to connect to an existing cluster and bench on an existing table. In the future, we can mock some workloads like join, agg, etc. to know more about the system performance.
Generally, this should be used like:

Start a cluster and create materialized view, use data source to ingest real data.
Run risectl on existing data to do benchmarks.

Checklist

[x] I have written necessary docs and comments
[x] I have added necessary unit tests and integration tests
[x] All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

LGTM now.
Should we extend sqllogictest to support benchmark extension later?

Not sure :(


Difference between express reload and static reload

What are the differences between the express reload and the static reload, apart from the fact that the express reload uses express
EDIT: Differences about the end result, not how it works

Not sure what your question is

If I understand the loosely worded question like I think I do : The difference in end result is none, they are one in the same. Express has static as a dependency, essentially express runs on static. The reload package, during command line execution only, actually uses express's version of static as seen here : reload-static-invoke
Perhaps that is what is being asked? I also do not exactly know what is meant by "express reload" and "static reload". In my fork of ack-reload, I removed the dependency of express by only depending on express's static package dependency.


[Dev] Improves the VS Code default settings,

recommends some extensions which cover the features of the codebase

Summary
Improves the default experience when using vscode in the codebase, @thymikee am I missing anything interesting?
Test plan
I used it. 👯♂ 👯

We could add prettier options!

Ah yeah! Good thinking


output of solve

Currently the output of solve can produce a dictionary where the keys are stringified symbols. This seems unnecessary and cumbersome when trying to "plug" back in. Why not keep the keys symbolic?

This is a bit tricky, as getindex may not identify two seemingly equivalent symbols. So extracting pieces from the dictionary are harder, whereas using strings for keys makes passing the dictionary onto functions like subs harder. Maybe a keyword to select the behaviour?

Closed with 53b5a8d. The change is done. The technical part of using symbolic keys was solved by using PyCall's hash function.

There is still a decision to be made here: Should the output always be an array? Now if the answer is just one solution and is a dict, a dict is returned, otherwise an array of dicts is returned. I don't like the unpredictability (and types instability), but the dict is more convenient.

solveset is SymPy's attempt to avoid Dicts for output. Going to leave this as is for convenience.


Java examples

Added examples in Java

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Config validation fixups

With this fix, the config validation now properly detects the dupe that was
fixed earlier in commit a8c7f00 (which it failed to detect before).
With that commit reverted, the failure looks like this:

=== RUN   TestConfigs
config_test.go:47: main+4.13 combined config failed validation: errors: ; warnings: config entry [[rpm.containernetworking-plugins.ignore]].error=ErrGoMissingTag.files contains a redundant path "/usr/libexec/cni/dummy", overlapped by "/usr/libexec/cni"
--- FAIL: TestConfigs (0.00s)

/lgtm


Issue 1367 - first-class clojure support in all Fractl tools.

This PR is a WIP

A different approach (letting fractl run a "calibrated" runtime) is needed to solve this issue. Will be tracked in a new PR.


BIP-X: Remove Withdrawal Limit - Retarget test

https://github.com/BeanstalkFarms/Beanstalk/pull/172/commits
except merging into sunrise bip branch, which is already under audit.
test

Closed in favor of https://github.com/BeanstalkFarms/Beanstalk/pull/410. (Grown Stalk Per BDV)


core: Increase the default timeout for worker connections to 30s

This is a further attempt to avoid ETIMEOUT errors when running on GH actions and connecting to real testbots.
Change-type: patch
Signed-off-by: Kyle Harding<EMAIL_ADDRESS>See: https://github.com/balena-os/leviathan/issues/792

@balena-ci I self-certify!


Change ticks-values positioning by using bottom instead of top

Currently, top: Xpx is used for horizontal sliders, but it would be better to use bottom so the alignement remains the same for different font sizes.

also interested in this

Hi can I take this up @ValentinH ?

Sure! Do you know from where to start?

No , I am quite new to OS projetcs

For this issue, you only need to update the rzslider.less file. Before starting, you should read the CONTRIBUTING.md one.

The goal is to get the exact same rendering than the current version. So while developing the change, you should compare with the demo website: http://angular-slider.github.io/angularjs-slider/

ok , thanks @ValentinH , will start now

Then to display your changes, you need to open the demo/index.html file in a browser.

Finally, when submitting the pull request, please provide a JSFiddle running your fork version that show that everything works.
You can fork this one: http://jsfiddle.net/cwhgLcjv/ and update the library import:
<script src="https://rawgit.com/rzajac/angularjs-slider/master/dist/rzslider.js"></script>

by replacing rzajac by your username.

Basically like it was done in #505

Cool @ValentinH

Hello @ValentinH,
I see this issue is still open, can I take it up?

Yes sure :)


open tab immediately on query request

Issue Type: Feature Request
When I right click on a table in the servers list and select "Select Top 1000" or "Edit Data", please open a window immediately.
I believe what is happening behind the scenes is that once I click on one of those options, ADS needs to query the server to find the columns of the table. While this query is happening (can be a couple of seconds with a remote server), no tab is opened. In fact, ADS just sits there as if nothing was happening. I have to guess that it did take my command.
I would like to see a tab opened immediately and where the query text should be, there should be a spinner. This spinner should spin until the query string is available to be displayed. Then the spinner can be replaced with the query string.
Without this change, the product is just super frustrating to use with a remote server. Please don't say this is a performance problem because there are always going to be situations where the latency from my machine to the server is long enough that some sort of spinner is needed. Give me some indication that something is happening. If I see that something is happening, the my blood pressure will go down and I will just be happy waiting for it to finish.
Azure Data Studio version: azuredatastudio 1.15.1 (83544eba2504f564d785534cc780d2073feec2cc, 2020-02-15T05:03:16.545Z)
OS version: Windows_NT x64 10.0.18363

dupe #8926


Better backup parent snapshot search. Part of #513

I look for the newest snapshot that contains all supplied paths to backup.
This fixes the finding of good parent if 1) there are a different number of paths supplied, but contained in a snapshot, and 2) if cmdline paths are not given in alphabetical order.

Thanks for your contribution! However, this does not work as advertised, this returns true:
samePaths([]string{"foo", "bar"}, []string{"bar", "foo", "baz"})

The code tests if expected is a subset of actual. Was that your intention?

Ah, testing for subset is actually better than before. I like this.


Creating a File should be enhanced to add Batches if Batches are included.

What were you trying to do?
Create an ACH File with Batches
What did you expect to see?
After creating the file, when getting batches for the file I expected to see the batches.  Without having to add batches to a file.
What did you see?
Empty Batches
How can we reproduce the problem?
Using POSTMAN Create an ACH File where id: ""
https://api.moov.io/v1/ach/files/create
{
	"fileHeader": {
		"immediateOrigin": "121042882",
		"immediateOriginName": "Origin Bank",
		"immediateDestination": "231380104",
		"immediateDestinationName": "Destination Bank",
		"fileCreationDate": "2018-12-12T00:00:00Z",
		"fileCreationTime": "2018-12-12T11:39:05Z",
		"fileIDModifier": "A"
	},
	"id": "",
	"batches": [
		{
		"batchHeader": {
			"serviceClassCode": 220,
			"companyIdentification": "121042882",
			"companyName": "Company Name",
			"ODFIIdentification": "121042882",
			"id": "",
			"companyDiscretionaryData": "",
			"standardEntryClassCode": "PPD",
			"companyEntryDescription": "PAYROLL",
			"companyDescriptiveDate": "122018",
			"effectiveEntryDate": "2018-12-12T00:00:00Z",
			"originatorStatusCode": 1,
			"batchNumber": 1
		},
		"entryDetails": [
			{
			"id": "",
			"transactionCode": 22,
			"RDFIIdentification": "23138010",
			"checkDigit": "4",
			"DFIAccountNumber": "123456789",
			"amount": 200000,
			"individualName": "Edward James",
			"identificationNumber": "26",
			"discretionaryData": "",
			"addendaRecordIndicator": 0,
			"traceNumber": "",
			"addenda02": null,
			"addenda05": [
				{
				"paymentRelatedInformation": "December Payroll"
				}
			],
			"addenda98": null,
			"addenda99": null,
			"category": "Forward"
			}
		]
	}
	]
}

Using POSTMAN get the batches on a file passing the file_id from the file created above
https://api.moov.io/v1/ach/files/{file_id}/batches
The result is
{
    "batches": [],
    "error": null
}

Adam and Brooke conversation:  - if there's no file id we should still create the file but generate a random id


Remove package-lock from node

According to the npm docs:

This file is intended to be committed into source repositories, and serves various purposes:

This repo use template from dvcs/gitignore.
This file has been ignored by dvcs/gitignore@d487ea2bc0c66ca2b88b9ba4795978deb9258a9d .
I've told them in dvcs/gitignore#45 . And I've sent PR dvcs/gitignore#48 to fix this.
I've been waiting it to be merged. 🙄

@gluons Sorry, I should have checked dependencies first. Great work thanks!

@joeblau yarn.lock and package-lock.json still appear in gitignore.io.

It's gone now.  I updated the production app this morning.

I also created #364 to script updates so they push all the way to prod automatically, when a template is updated that way I just have to review the template and once it's approved, it goes live after build/test/integ.


feat(blog): add article on writing label operator

Hello! I would like to submit an article to the Kubernetes blog.
This article walks the reader through writing a simple Kubernetes ~operator~ controller that adds a pod-name label to Pods with a specific annotation. It turns out that a Kubernetes ~operator~ controller is the only way to do this.
The goal of the article is for the reader to understand the inner workings of a basic ~operator~ controller, as a first step towards writing their own.
Any feedback on the article is welcome 🙂

Hi @sftim & @onlydole 👋
What are the next steps regarding this article? Is there anything I can do to help?

@kbarnard10 – is this good to go?

Hi, @busser. Nice blog post. I highlighted some style issues and made suggestions that I think will be helpful for our readers. In many cases, I provided explanations or cited the style guide. Please feel free to ask me any questions here or on Slack at @rolfedh.

@rolfedh I've applied all the changes that have been requested 👍
Is the article now ready for publishing? What are the next steps?

@busser if it's OK with you we'll push a commit to your fork with a revised date, and then get this merged.

@sftim This sounds good to me! Let me know if I can help with anything 🙂

@lavalamp Thank you for your feedback! I've made changes to the article to take them into account.
There are two threads above that are left unresolved, but I believe they do not require changes to the article as is. Correct me if I am mistaken.
@sftim Do you see any further changes that need to be made?

@busser, could you squash the commits for this one and bump it to a future, weekday date? I think it's looking good and I'll try to rally some folks to get it reviewed from a blog editorial standpoint.

@busser, could you squash the commits for this one and bump it to a future, weekday date? I think it's looking good and I'll try to rally some folks to get it reviewed from a blog editorial standpoint.

@sftim Done 👍 I've set the date to Monday June 21st 2021.

/remove-label tide/merge-method-squash

@lavalamp are you happy to give this a final technical check? If so, please add /lgtm

BTW you might need to pull this locally to preview it. I think the navigation might have a bug if a draft article is much newer than the most recent non-draft article.

/retitle Add blog article on writing labelling controller

Sorry, I am strapped for time and won't be able to make another pass any
time soon, you might want to find another technical reviewer.
On Fri, Jun 11, 2021 at 5:46 AM Tim Bannister @.***>
wrote:

@lavalamp https://github.com/lavalamp are you happy to give this a
final technical check? If so, please add /lgtm
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes/website/pull/27010#issuecomment-859556291,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAE6BFWADLPAO7MHWUZHTXDTSIARLANCNFSM4ZAXREKA
.

Didn't find another technical reviewer, but this was previously reviewed and feedback was addressed. None of that feedback seemed to be about outright technical correctness.
I'd like to see this published.
/hold cancel
/lgtm


arrays not allowed in class constants

For php versions below 5.6 the array of available versions in  app\code\community\Leytech\PrototypeUpdate\Helper\Data.php  causes the fatal error.
Arrays are not allowed in class constants in
app\code\community\Leytech\PrototypeUpdate\Helper\Data.php on line 15
As the CONSTANT appears to only be used in the same script in the isVersionValid function, replacing this with a simple
public $validVersions =['<IP_ADDRESS>', '<IP_ADDRESS>', '<IP_ADDRESS>'];
and then
public function isVersionValid($version) {
    if (in_array($version, $this->validVersions)) {
        return true;
    }
    return false;
}

seems to do the trick

It is 2019. You should not be using an PHP version prior to 7.1 let alone prior to 5.6!
https://php.net/supported-versions.php

As an aside, it is declared as a const for good reason, and if you do insist on replacing it with a property then at least make the property private and not public!

Try running that version of Magento in php 7.1+ - other than that I agree----- Original Message -----From: "leytech/Leytech_PrototypeUpdate" reply@reply.github.comTo:"leytech/Leytech_PrototypeUpdate" Leytech_PrototypeUpdate@noreply.github.comCc:"bassmo"<EMAIL_ADDRESS>"Author" author@noreply.github.comSent:Tue, 11 Jun 2019 12:41:30 -0700Subject:Re: [leytech/Leytech_PrototypeUpdate] arrays not allowed in class constants (#5)It is 2019. You should not be using an PHP version prior to 7.1 let alone prior to 5.6!
https://php.net/supported-versions.php
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

There is official PHP 7.2 support for all Magento 1 versions going back to <IP_ADDRESS>
https://magento.com/tech-resources/download#download2240
If you're running an older version of Magento than 1.9.2 then you should seriously consider upgrading. 1.9.2 was released 4 years ago.

Yer we have 3 sites remaining on 1.9.1 - working on Magento 2 at the moment. Used your module to allow feefo reviews on them though - so still worked, thanks.----- Original Message -----From: "leytech/Leytech_PrototypeUpdate" reply@reply.github.comTo:"leytech/Leytech_PrototypeUpdate" Leytech_PrototypeUpdate@noreply.github.comCc:"bassmo"<EMAIL_ADDRESS>"Author" author@noreply.github.comSent:Wed, 12 Jun 2019 12:00:58 -0700Subject:Re: [leytech/Leytech_PrototypeUpdate] arrays not allowed in class constants (#5)There is official PHP 7.2 support for all Magento 1 versions going back to <IP_ADDRESS>
https://magento.com/tech-resources/download#download2240
If you're running an older version of Magento than 1.9.2 then you should seriously consider upgrading. 1.9.2 was released 4 years ago.
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

Glad it worked. I have found it works nicely but doesn't play well with some third-party extensions, notably Idev_OneStepCheckout.


React flow types are undefined

It all started when I noticed the message in the console: "flow-runtime: Could not reference the given type, try t.typeOf(value) instead. (got undefined)".

After some search i found out the reason - type definitions in App.js container. React.Node is undefined, same for other types described in flow docs.

Does anyone know how to solve this? I mean, the main problem here is not the message itself, but undefined react type definitions.

@amilajack I have found the problem. React types are defined by flow and flow-runtime can't access them. To solve this flow-runtime has a cli tool, which resolves types from flow-typed directory and exports them to a file which should be imported to your project. I tried this myself, but i get a generic error and don't really understand how to solve this.

Another thing is that flow-typed directory doesn't contain any react definitions. I have found something like this here, but haven't tried them at the moment.

Okay. Please PR if you find a solution for this

@eunikitin - Any hope on this? I pulled down the repo and tried getting started today...and got jammed up, dead in my tracks, over this exact issue.
Any clues?

@armenr, @amilajack actually I gave up to solve this. The problem comes from flow-runtime. The idea of the library is very cool, but it has limited flow support and huge problems with external type definitions, especially with react. I'm not so experienced with flow, actually I'm a newbie, but as I understand, it stores its type definitions in flow-typed directory and resolves them from there when running (Now, I talk about flow which is analyzes types statically, not flow-runtime, it's important). Flow-runtime has no default access to them, so you must import external types in your code by yourself. It uses babel plugin to transpile flow-like syntax to ordinary functions which execute in runtime and generate exceptions for you when something goes wrong. You can check it here.
So the first thought I had - was to import react type definitions myself, and thats where the first real pain began - flow-runtime don't understand "declare" syntax of flow. "Ok", said I, found react type definitions, which was another challenging quest and started to rewrite them without declare statements, at some point I thought I succeeded but after some tests I found some strange behavior I cannot understand and describe clearly, I can only assume what is happening.
The code had a lot of generic types magic. And everything breaks when flow-runtime checks this:

I have a thought that ElementType is not a valid type, but flow-runtime internal function, like one of this which define types in runtime.

Also I had another idea - as I wrote earlier I tried to use cli tool but it's buggy and doesn't work:C So I've spent about a week trying to fix this, but failed and took a break when I'll have more free time.

Also, I have opened a ticket in flow-runtime repo, but it has no replies:( https://github.com/codemix/flow-runtime/issues/198

// @flow
import * as React from 'react';
import type {Node} from 'react';
type Props <Node> = {
children: Node
};

@kwdata Node in Props definition is not an imported one. It's a generic, so when you use your Props somewhere, you will need to write something like this:
class Example extends Component<Props<SomeNodeDefinition>> {}
It's just a variable type, you should specify later. Try to console.log your own type and types you've imported from react and you'll notice that your types are functions but imported are undefined.


Infinite loop with incorrect image name

Expected
When I provide an image to swarmkit that is an incorrect image, I should get an error indicating that this image doesn't exist.
Actual
Swarmkit ends up in an endless loop of errors and retries
Steps:
Create a service with an image name typo: (notice an ID is generate)
$ swarmctl service create --name redis --image redi
a2ffgwgdu88ntjqtu9bjt5izv

Try to look at the service ls: (notice empty replicas)
$ swarmctl service ls
ID                         Name   Image  Replicas
--                         ----   -----  --------
a2ffgwgdu88ntjqtu9bjt5izv  redis  redi   0/1

Look at tasks:
$ swarmctl task ls
ID                         Service  Desired State  Last State              Node
--                         -------  -------------  ----------              ----
edcqq2a5auf14fhrz2dp07ugn  redis.1  ACCEPTED       ACCEPTED 2 seconds ago  node-1

$ swarmctl task ls
ID                         Service  Desired State  Last State               Node
--                         -------  -------------  ----------               ----
5mmmtytjd5v7x8ireaskilgqn  redis.1  RUNNING        PREPARING 6 seconds ago  node-1

Look at your logs:
ERRO[0236] pulling image failed                          error=Error: image library/redi:latest not found module=taskmanager task.id=4pxjrqr74x4cezumz9nwlu91e
ERRO[0236] fatal task error                              error=Error: No such image: redi module=taskmanager task.id=4pxjrqr74x4cezumz9nwlu91e
WARN[0236] task updates not yet supported                module=taskmanager task.id=4pxjrqr74x4cezumz9nwlu91e
INFO[0238] grpc: Server.Serve failed to complete security handshake from "<IP_ADDRESS>:55361": remote error: bad certificate
WARN[0241] task updates not yet supported                module=taskmanager task.id=17g2jti8kmn56wowfhld644wu
ERRO[0243] pulling image failed                          error=Error: image library/redi:latest not found module=taskmanager task.id=17g2jti8kmn56wowfhld644wu
ERRO[0243] fatal task error                              error=Error: No such image: redi module=taskmanager task.id=17g2jti8kmn56wowfhld644wu
WARN[0243] task updates not yet supported                module=taskmanager task.id=17g2jti8kmn56wowfhld644wu
INFO[0246] grpc: Server.Serve failed to complete security handshake from "<IP_ADDRESS>:55371": remote error: bad certificate
WARN[0248] task updates not yet supported                module=taskmanager task.id=2um3ezqmqnre2f5k710rcrkvl
ERRO[0250] pulling image failed                          error=Error: image library/redi:latest not found module=taskmanager task.id=2um3ezqmqnre2f5k710rcrkvl
ERRO[0250] fatal task error                              error=Error: No such image: redi module=taskmanager task.id=2um3ezqmqnre2f5k710rcrkvl
WARN[0250] task updates not yet supported                module=taskmanager task.id=2um3ezqmqnre2f5k710rcrkvl
....

@FrenchBen this is the right behavior. Inspect one of the rejected tasks to see the error.

Error:
$ swarmctl task inspect redis
Error: task redis not found
$ swarmctl task inspect edcqq2a5auf14fhrz2dp07ugn
Error: task edcqq2a5auf14fhrz2dp07ugn not found

Is this the expected output?

It looks like the task ID keeps rotating on the endless loop, which means that I'll get the above error if I don't inspect at the right time.

Each time, a new task gets dispatched.
To investigate this, I usually inspect the task, then find the task that existed before it, but we should automate this.
It looks like we need a UX for aggregating service errors. Something like swarmctl service errors <service>.

It looks like we need a UX for aggregating service errors. Something like swarmctl service errors .

Yes please!

@nathanleclaire docker/docker#23706 is where we're tracking this same issue on docker/docker, and according to the meeting we had yesterday, a general and sustainable solution is planned.

@FrenchBen @nathanleclaire I think this was fixed in 1.12 with the enhanced docker service ps output. Can you confirm?

I'm still not persuaded that retrying forever is the right thing to do, but yes it's much easier to detect the service create is failing due to wrong image in the docker service ps output 👍


Update guide on working with pipelines to remove collection references

fixed in https://github.com/kabanero-io/guide-working-with-pipelines/pull/17


[WIP] Added total level filtering to clan chat plugin

Added to existing Clan Chat plugin allowing for a minimum total level to be required by an account for the message to be shown.
Each account filtered is stored temporarily, until the plugin is disabled or the total level minimum variable in the config is changed.
Looking for way to not show message at all instead of altering it to say "FILTERED".

Closing this pull request due to hotfix released by Jagex May 14th 2018.
http://services.runescape.com/m=news/clan-chat-restrictions?oldschool=1


continuous-mode.ino works in Arduino IDE but not in PlatformIO.

Prerequisites
Can you reproduce the problem reliably? Yes.
Did you check current release notes for known issues? Saw nothing about PlatformIO.
If this is not the latest release, have you checked newer releases? PlatformIO updates automatically.
Description:
See title.
Steps to Reproduce:

Copy and paste program into PlatformIO.

Use this platform.ini file:
[env:esp32dev]
platform = espressif32
board = upesy_wroom
framework = arduino
monitor_speed = 115200
lib_ldf_mode = deep+
lib_deps =
https://github.com/Infineon/arduino-pas-co2-sensor

Upload to uPesy ESP32 Wroom DevKit.

Expected Result:
co2 ppm value : 500
Actual Result:
get co2 error: 1
co2 ppm value : 0
pressure reference error: 1
Frequency (1/1, 1/50, 1/100):
I2C 100kHz
Build/Commit:
idk
Target:
uPesy ESP32 Wroom DevKit
Host OS and Version:
Windows
Compiler:
idk
Environment
PlatformIO
THANKS!

Hi, devs. Any updates on this? Are there known issues with PlatformIO compatibility for this library?


Use KEY_RESIZE and improve display updating precision

Normally, I don't like using global, but this is the simplest way I can do it without editing a lot.

About time.sleep(1)
Which plus getch() timeout is 1.03 seconds and also need to add the elapsed time of each iteration, so it's actually 1.03+ seconds. It's a design flaw, and you will see seconds display sometime skipping one second, though it's not actually skipping per se. Anyway, it's a flaw, and I have fixed it in the second commit.
We don't really need the getch timeout, only need the non-blocking, see timeout(3), so I reduced it to 0.

I tried to keep with PEP8, but I didn't modify the code near my modifications. It might not be the style it's coded in here, although I don't see absolutely consistent style, so I just used PEP8.

Far better resize handling kudos.

Was using sleep as a simple hacky way to cut down on cpu use, this method is alot better and seems to even improve on cpu usage. Completely solves the second skiping issue. Love this thanks mate.

As far as pep8... the code is ugly I admit. Eventually I'll clean it up, and fix things. I admit I'm terrible with cleaning things properly.

But thanks, merging this all in. Great work.


Adds a tooltip title prop to the diagram node.

This PR adds a tooltipTitle prop to the diagram node, so that the azdataGraph library can use that rather than manipulating the subtext information to extract a title for tooltips.

@Charles-Gagnon, it is just setting the tooltip title

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 48.283%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
14819

Relevant Lines:
29135

💛  - Coveralls


Empty response if result is null

Why the following returns an empty response? null is a valid json value.
const config = require('./package.json');

const http = require('http');
const koa = require('koa');
const cors = require('kcors');
const compress = require('koa-compress')
const noTrailingSlash = require('koa-no-trailing-slash');
const json = require('koa-json');
const body = require('koa-body');
const send = require('koa-send');
const router = require('koa-router')();

const app = new koa();

app.use(cors());
app.use(compress());
app.use(noTrailingSlash());
app.use(json({ pretty: true, spaces: 4 }));
app.use(body({ formLimit: '5mb', jsonLimit: '5mb', strict: false, multipart: true }));

app.use(async (ctx, next) => {
    try {
        await next();
    }
    catch(error) {
        ctx.status = 400;
        ctx.body = error.message || error;
    }
});

router.all('/ciao', async ctx => {
    ctx.body = null;
});

app.use(router.routes());
http.createServer(app.callback()).listen(8080);

Reponse is empty:
macbook:react-app damiano$ curl -v localhost:8080/ciao
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> GET /ciao HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.51.0
> Accept: */*
>
< HTTP/1.1 204 No Content
< Vary: Origin, Accept-Encoding
< Date: Fri, 09 Jun 2017 14:17:57 GMT
< Connection: keep-alive
<
* Curl_http_done: called premature == 0
* Connection #0 to host localhost left intact
macbook:react-app damiano$

Nobody experiencing this?! :|

null body meaning no content on koa https://github.com/koajs/koa/blob/master/lib/response.js#L139

@fengmk2 that's not good: what about an API endpoint returning "null" as data?
Shouldn't koa allow some kind of config about it?
null is a valid json value but returning a 204 will trigger problems front-end side.
We cannot assume everybody is enclosing result in an object.

Just my opinion but personally I most people expect an object or array with json these days, apis returning primitives is a little weird, even if it's technically fine

@tj I agree, but in some cases it may be needed and returning a 204 could be unexpected.
Do you think koa team will consider this or will this be ignored assuming everybody must envelop
the data?
Because in the latter I'll just close the issue (even if I don't agree much) :)

I don't have a super strong opinion there, I guess maybe ideally the client requesting stuff treats 204 as null but it's definitely easier to assume it's always JSON, though that's sort of the same weirdness as doing { "error": MESSAGE } instead of a 4xx or 5xx with MESSAGE as the body which is maybe a bit more correct

it makes way more sense to me to return 204 or an error instead of null. i find anything but an array or object being returned from an API weird.
is there absolutely no way you can change the FE code? this would be a breaking change

@jonathanong if this would cause a breaking change then let's just leave it like this but I'm not sure pretending "always enveloped results" is right.
My 2 cent: could koa check if request header is application/json and if so just encode null instead of returning 204 empty content?

what do you think about it @tj? Could koa check if request header is application/json and if so just encode null instead of returning 204 empty content? I think it's the correct behaviour

Sounds reasonable, my main fear there is that it gets (even more) magical when it starts doing multiple things

@tj @jonathanong please let me know on this: if you think this is never going to be implemented I'll just close the issue.
Thanks guys for your efforts!

@tj @jonathanong time to close this? Did you take time to think if it's worthful or not?

Could koa check if request header is application/json and if so just encode null instead of returning 204 empty content? I think it's the correct behaviour

that sounds like a good behavior to have. if a content type is set, then the developer intends to set a body.
my only concern is whether this would be a breaking change, which it probably will be for a few people

Below is my case:
request(options, function(error, response, body){
    //...
    ctx.status = response.statusCode; //500
    ctx.body = body; //undefined
    console.log(ctx.status); //204， it confused me
    //...
});

if ctx.body == null and ctx.status is 2XX or not set, we can set ctx.status to 204, otherwise it's better do nothing.

After more than 2 years here I am again xD
I'm trying to return in the json body null but I see koa returning 204.
@lichangwei how did you solve this?

I'm willing to provide a PR. I saw this in the 3.0 roadmap initial issue #1114 as a breaking change.
Instead of breaking the current behaviour I'd suggest that to be a config option one can set when creating the koa app. That way it would not break old clients and clients that need it can enabled it via emptyBodyAs204=false (default is true). Coming up with a good config name was difficult (as naming often is) then I thought maybe one could register

OK , If ctx.body = null equals 204
middleware:

( async (ctx) => {

ctx.body = null;
ctx.body = 'have result'
return ctx;

})

it still return 204 , anyone have this issue ?

@samtsai15 I handle it something like this:
const statuses = require('statuses');

// ...

app.use(async (ctx, next) => {
  await next();

  if (ctx.fresh) {
    ctx.status = 304;
    ctx.body = null;
  } else if (statuses.empty[ctx.status]) {
    ctx.body = null;
  } else if (ctx.length && statuses.empty[ctx.status]) {
    ctx.status = 200;
  }
});

@tj are you willing to solve this issue? We have some microservices in GraphQL and null is a perfect return value when it fits the contract. Im now wrapping Koa results back myself, so not a real dealbreaker but its weird to see when explicitly returning null it magically disappears.

@maapteh after 4 years I gave up and came up with a https://www.npmjs.com/package/koa-better-json


[DO NOT MERGE, TESTING ONLY] Release Qualification

Trigger release qualification jobs
none

@chxchx: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/daily-release-qualification.sh
8a2516828ab37b185ac80555d0223d74596eef0e
link
/test daily-release-qualification

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


How to run DeepSpeed inside mpirun-ed singularity containers on multiple nodes

I'm trying to use DeepSpeed on our clusters, where singularity containers are run on each machine, with 8 cards installed. No Kubernetes are available. All containers are launched using mpirun. What's the proper way/cmd to use in order to run such a usecase?

@Oaklight, thanks for your question. Can you please try this guide?

Our HOSTFILE originally is in the following format, by default no slot info, because the entire node is allocated.
worker00
worker01
...

Here is what I have tried:

pad all lines with slots=8, and run following command:
mpirun --hostfile $HOSTFILE singularity run --nv -B mydir $CONTAINER $SCRIPT,
in the $SCRIPT file, I source activate the virtualenv, and then call ds_pretrain_gpt2.sh from https://github.com/microsoft/DeepSpeedExamples/tree/master/Megatron-LM-v1.1.5-ZeRO3
with run_cmd changed to:

python \
pretrain_gpt2.py ${full_options} \
--deepspeed_mpi $deepspeed_options

This results in multiple 8 singularity instances each machine, where only device-0 is oversubscribed, and deepspeed doesn't find other nodes

deepspeed directly doesn't work as all packages for deepspeeds are inside container, no bare metal installation

@Oaklight, thanks for your question. Can you please try this guide?

Hi @tjruwase , any updates? Do you need me to provide more context or scripts?


Add files via upload

Related Issue
Addition of new project(#1151 )
Description
THIS SHOPPING WEBSITE IS AN ONESTOP DESTINATION FOR LATEST TRENDS AND FASHION

Please review my PR request

hey, @prachisingh1008 you haven't followed our contributing guidelines. So Please check our contribution guidelines first. You must add the github repo link, not the whole code here.


themes negate transparency

affects linux
when changing theme to be anything other than classic, the transparency is not maintained

After looking this bug persists on all devices. A fix will be rolled out with a future update.

This has been fixed with 1.1.1


Bump webpki-roots to v0.25

https://github.com/rustls/webpki-roots/compare/v/0.24.0...5bc18e3fcf4299be2b88ca83c594e5eb85edcfc2

sorry
https://github.com/seanmonstar/reqwest/actions/runs/5749392035/job/15584160521

Oh weird, I'm guessing auto-merge merged before that CI check? No problem! Want to file a PR switching it back?

Sorry for the late reply. I think bumping the minimum version of rustls from 0.21.0 to 0.21.6 will fix it, but I'm not sure.


Make changes on site_data.py and load_site_data.py

Make changes on site_data.py and load_site_data.py to add the information of presentation_id

@penny9287 Can you run make format locally? It seems that the indent is not right.

I will check it.
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/acl-org/acl-2020-virtual-conference/pull/170#issuecomment-647915838",
"url": "https://github.com/acl-org/acl-2020-virtual-conference/pull/170#issuecomment-647915838",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]

@hao-fang I'm afriad I can't solve this issue. I always make mistakes in the "Format check" section.

@penny9287 no problem. I can take care of this.
You might need to follow https://github.com/acl-org/acl-2020-virtual-conference/blob/master/CONTRIBUTING-ACL2020.md to set up your local environment first next time.


WG conf file: incorrect AllowedIPs entry returned from VPN

A user reported error on subscription renewal: wg-quick@tunnelsatsv2 didn't start up as expected.
Investigating this by manually starting up wg-quick up tunnelsatsv2 pointed to the entry AllowedIPs which was filled incorrectly or probably clipped at by the frontend (before running setupv2.sh script):
AllowedIPs = <IP_ADDRESS>/0, ::/

expected outcome:
AllowedIPs = <IP_ADDRESS>/0, ::/0

VPN server in this case: de1.tunnelsats.com

Self-Test could not reproduce this issue. It was not cut off in browser data, download file or sent via email.


Tags may be duplicated when publishing

The publisher always adds the common tags for each measurement, but the measurement may have those same tag keys directly. In that case there are duplicate and possibly conflicting values for a given key.

The aggregator expects that metrics received from spectatord should not have duplicate tags.
Historically, we have advised that should you want to customize common tags for spectatord, you should unset the Netflix environment variables for those tags. We are leveraging this approach for the nf.container and nf.process tags when a spectatord instance will be shared in a multi-process and/or multi-container environment. When unsetting these tags, you then have the opportunity to provide them in the spectatord line protocol.
The clients which are commonly used to send line protocol messages to spectatord will deduplicate tags, as a result of using maps to track user tags. However, spectatord has a bug where it does not check the received line protocol for the presence of common tags and thus may duplicate common tags in the payloads that it sends to the Atlas aggregator service.
Thinking through this a bit, we think the following strategy should be viable:

The default spectatord that ships with the BaseOS should be as stable, predictable and locked as possible. The common tags (aside from nf.container and nf.process) should all be set for this process and these tags should not be modified. This is done because there are many things on the BaseOS, such as atlas-system-agent and various BaseOS monitoring scripts, which rely on common tags being provided by spectatord.
If there is a need to send Atlas metrics through spectatord which require a custom set of common tags that will be set through the line protocol, then a second instance of spectatord should be established for this use case. This second instance should listen on a different UDP port and should not listen on the domain socket. We will provide documentation for how to supply this custom configuration.

Separately, the following pull request was merged into Spectator to handle the case of duplicated tags on the backend:
https://github.com/Netflix/spectator/pull/975

The cause of the duplicate tags was providing a custom Registry configuration to spectator-py which set common_tags to an empty map. This strategy no longer works for the latest spectator-py version. In the code base where this was happening, two separate Registries were operated - one for standard metrics and one for metrics where common tags were overridden.


Saving from Document class

How can I save Document into file without assigning it to Scintilla component and reading from Scintilla.Text property?
I looked into Document class and it turned out that the class stores data in IntPtr Value which is unmanaged Document class data.
However I dived into Scintilla itself and found out that the unmanaged Document class has BufferPointer() method which returns pointer to char array.
Document -> CellBuffer -> SplitVector<char> -> char*

The document class is not meant to be handled outside of a Scintilla control. Trust me, I'm just as disappointed as you are. The benefits a document brings are that you can load data into it prior to assigning it to a control, you can use them to easily switch the contents of a control, but that's about it. For example, there is no function for modifying a document, saving a document, or doing things like formatting and highlighting of a document outside of a Scintilla control.

Then how people save all open documents without switching current open document? Do they just create an invisible new Scintilla and do all stuff on it?
Unfortunately, SciTE does not provide SaveAllBuffers, just opened one and uses SCI_GETCHARACTERPOINTER to read data.

That's a good point actually. I've never thought about it but you're right. A hidden control might be the way to go.
From the Scintilla documentation you can see that there is no other form of background saving. The document has to be attached to a control (which I would argue isn't background saving at all...).
http://www.scintilla.org/ScintillaDoc.html#BackgroundLoadSave

What about coding an extension(static) class which is fundamentally based on native Scintilla but implements only document related features such as content of document, whether document is dirty and so on. I mean should ignore unnecessary messages,  no need to store redundant data on memory only those for document.

Or something like this?
    public class CustomDocument
    {
        private static Scintilla HiddenScintilla = new Scintilla()
        {
            Visible = false
        };

        private Document doc;
        private void setDoc()
        {
            if (HiddenScintilla.Document == doc) return;
            HiddenScintilla.Document = doc;
            HiddenScintilla.ReleaseDocument(doc);
        }

        public CustomDocument(Document doc)
        {
            this.doc = doc;
        }
        public static explicit operator Document(CustomDocument custom)
        {
            return custom.doc;
        }

        public bool Modified
        {
            get
            {
                setDoc();
                return HiddenScintilla.Modified;
            }
        }
        public string Text
        {
            get
            {
                setDoc();
                return HiddenScintilla.Text;
            }
        }
        public void SaveToFile(string path, Encoding encoding, bool setSavePoint)
        {
            setDoc();
            File.WriteAllText(path, HiddenScintilla.Text, encoding);
            if (setSavePoint) HiddenScintilla.SetSavePoint();
        }
    }

The thought has actually crossed my mind, but the goal of ScintillaNET v3.x is to be as close to the original Scintilla API as possible. Feel free though to implement such a feature and provide it as a ScintillaNET extension.

P.S. Just a reminder that the general rule of working with any control is that it should always be done on the UI thread. So while this may give the appearance of document separation from the control, it would be of limited usefulness if it couldn't be run safely on a background thread. Just a thought...


inst -j

Please first make sure you have looked at:

Documentation: https://github.com/mkleehammer/pyodbc/wiki
Other issues

Environment
To diagnose, we usually need to know the following, including version numbers.  On Windows, be
sure to specify 32-bit Python or 64-bit:

Python:
pyodbc:
OS:
DB:
driver:

Issue
Often it is easiest to describe your issue as "expected behavior" and "observed behavior".

@karlmoad did you accidentally submit this issue when you were intending to type odbcinst -j in another window...?

yes my apologies
On Thu, May 21, 2020 at 10:41 AM v-chojas<EMAIL_ADDRESS>wrote:

@karlmoad https://github.com/karlmoad did you accidentally submit this
issue when you were intending to type odbcinst -j in another window...?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/mkleehammer/pyodbc/issues/761#issuecomment-632124474,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFINWSME5NEP544JA7H2LH3RSU4TNANCNFSM4NB5MHMQ
.

No worries, @karlmoad , these things happen.  But in that case, could you close this issue.  Many thanks!

Issue opened in error.


memory leak; crashes app

ran your app, but it uses a crazy about of memory. Not sure how to fix it. Any ideas?

@stanchiang Did you solved the crash?


0.7.0 release

I should make a new release with new Django versions support. To do it is necessary

change __version__
change history.md with the release notes
remake the 0.7.0 tag

Should we add 0.7.0 milestones tag to all the issues / PR's fixed from the previous release?

I don't know if has issues for the things done between 0.6.1 and 0.7.0. Create the missing issues isn't mandatory

ok lets go for the release :+1:

a10ff4637b56ad05583f4b0e25a0f00c11df1cb5 and 047ed08a8a01678a1ca133f5c5c66397a86ce2dc should be enough?


Unreadable text in a table in Nigth Mode

Describe the Issue
On the JavaScript Algorithms and Data Structures challlenge Escape Sequences in Strings
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings, a table doent display all the element in Nigth Mode.
Affected Page
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings
Your code

;
Expected behavior
;
Screenshots

System

Device: [e.g. iPhone 6, Laptop]
OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
Browser: [e.g. Chrome, Safari]
Version: [e.g. 22]

Additional context
No response

Hello Sir, I am Prajwal Rangari, i am very interested in contributing on this issue.
i saw this issue

and solved it as

so i request you to please assign this issue to me

so i request you to please assign this issue to me

Please stop and read our contributing guide.
https://contribute.freecodecamp.org/
This issue is not marked as ready for contributions or help wanted. Also, we do not assign issues.

I apologize for my previous request to assign the issue. I understand and respect the project's guidelines as outlined in the contributing guide. I'll refrain from requesting issue assignment and will focus on issues marked as 'ready for contributions' or help wanted.
Thank you for your guidance.

I don't like the markdown files having styles affected by bootstrap, I think it's best for the long run to delete the classes from these twelve files, this will fix the border as well

my least favorite approach is to add more properties in these selectors, it should solve the issue
https://github.com/freeCodeCamp/freeCodeCamp/blob/3d2746cdcfd546f2a3a0724729adf91bec140857/client/src/components/layouts/global.css#L501-L510C2

last option is to delete this selector .table-striped>tbody>tr:nth-of-type(odd) in bootstrap.min.css

I'm fine with deleting the bootstrap classes, but then we should implement our own. The striped table is a nice look and I'd like to preserve it.

if the classNames are deleted, adding the styles is a simple, it will be adding selector and property, I am okay with that.

If you would like to fix this issue, please make sure you read our guidelines for contributing, we prioritize contributors following the instructions in our guides. Join us in our chat room or the forum if you need help contributing, our prolific contributors will guide you through this.

Do we make all tables have a striped style by default or create a new class for it?

All tables in challenge instructions, until we have tailwind, or something a like in the code base, I prefer the fewer cases of unique styles