D1_ERROR: not authorized

Hello! First off, thanks a lot for the repo!
It would definitely help in my use case.
I unfortunately don't really understand where I went wrong.
My DB are bound and are recognized by the application (staging and production)

The API Call to https://mydomain.com/db/production/__data.json?x-sveltekit-invalidated=110
returns:
{
    "type": "data",
    "nodes": [
        {
            "type": "data",
            "data": [
                {
                    "dbms": 1
                },
                [
                    2,
                    3
                ],
                "production",
                "staging"
            ],
            "uses": {}
        },
        {
            "type": "data",
            "data": [
                {
                    "db": 1
                },
                {
                    "error": 2
                },
                {
                    "message": 3,
                    "cause": 4
                },
                "D1_ERROR: not authorized",
                "not authorized"
            ],
            "uses": {
                "params": [
                    "database"
                ]
            }
        },
        {
            "type": "skip"
        }
    ]
}

The API payload you provided is generated by SvelteKit and some detailed information may not available on the client-side.
Would you like to provide some server-side log by using wrangler pages deployment tail --project-name <your-project>?
Like this: https://github.com/JacobLinCool/d1-manager/blob/5a63eb8c816cd3237caea8f5127a9aad8bcefe46/package.json#L21

Thanks for your answer!
This is the tail log for the same SELECT query:
Connected to deployment xxxxx, waiting for logs...
POST https://d1.autodepo.cc/api/db/production/exec - Ok @ 10/24/2023, 8:30:09 AM
GET https://d1.autodepo.cc/db/production/__data.json?x-sveltekit-invalidated=110 - Ok @ 10/24/2023, 8:30:10 AM

Both of them are 200.
Not much luck neither on the detailed "Real-time Logs" stream in CloudFlare dashboard.
I'm adding the build log - maybe I missed somethigng there:
17:22:36.378 | Cloning repository...
-- | --
17:22:37.675 | From https://github.com/autodepo/d1-manager
17:22:37.675 | * branch            5a63eb8c816cd3237caea8f5127a9aad8bcefe46 -> FETCH_HEAD
17:22:37.675 |
17:22:37.738 | HEAD is now at 5a63eb8 ci: remove e2e test
17:22:37.738 |
17:22:37.834 |
17:22:37.862 | Success: Finished cloning repository files
17:22:38.524 | Restoring from dependencies cache
17:22:38.543 | Restoring from build output cache
17:22:40.811 | Success: Dependencies restored from build cache.
17:22:40.894 | Detected the following tools from environment<EMAIL_ADDRESS><EMAIL_ADDRESS>17:22:42.280 | Installing project dependencies: pnpm install
17:22:43.029 | Lockfile is up to date, resolution step is skipped
17:22:43.073 | Progress: resolved 1, reused 0, downloaded 0, added 0
17:22:43.195 | Packages: +675
17:22:43.195 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17:22:43.415 | Packages are hard linked from the content-addressable store to the virtual store.
17:22:43.416 | Content-addressable store is at: /opt/buildhome/.pnpm-store/v3
17:22:43.416 | Virtual store is at:             node_modules/.pnpm
17:22:44.075 | Progress: resolved 675, reused 356, downloaded 0, added 348
17:22:45.078 | Progress: resolved 675, reused 675, downloaded 0, added 675, done
17:22:47.251 |
17:22:47.251 | devDependencies:
17:22:47.252 | + @changesets/changelog-github 0.4.8
17:22:47.252 | + @changesets/cli 2.26.1
17:22:47.252 | + @cloudflare/workers-types 4.20230518.0
17:22:47.252 | + @iconify/svelte 3.1.4
17:22:47.252 | + @playwright/test 1.35.1
17:22:47.252 | + @sveltejs/adapter-cloudflare 2.3.0
17:22:47.252 | + @sveltejs/kit 1.20.4
17:22:47.252 | + @tailwindcss/typography 0.5.9
17:22:47.252 | + @trivago/prettier-plugin-sort-imports 4.1.1
17:22:47.253 | + @typescript-eslint/eslint-plugin 5.59.11
17:22:47.253 | + @typescript-eslint/parser 5.59.11
17:22:47.253 | + autoprefixer 10.4.14
17:22:47.253 | + csv-parse 5.4.0
17:22:47.253 | + csv-stringify 6.4.0
17:22:47.253 | + daisyui 3.1.1
17:22:47.253 | + eslint 8.43.0
17:22:47.253 | + eslint-config-prettier 8.8.0
17:22:47.253 | + eslint-plugin-svelte3 4.0.0
17:22:47.254 | + husky 8.0.3
17:22:47.254 | + lint-staged 13.2.2
17:22:47.254 | + openai 3.3.0
17:22:47.254 | + postcss 8.4.24
17:22:47.254 | + prettier 2.8.8
17:22:47.254 | + prettier-plugin-svelte 2.10.1
17:22:47.254 | + prettier-plugin-tailwindcss 0.3.0
17:22:47.254 | + svelte 3.59.1
17:22:47.254 | + svelte-check 3.4.3
17:22:47.254 | + svelte-i18n 3.6.0
17:22:47.255 | + tailwindcss 3.3.2
17:22:47.255 | + theme-change 2.5.0
17:22:47.255 | + tslib 2.5.3
17:22:47.255 | + typescript 4.9.5
17:22:47.255 | + vite 4.3.9
17:22:47.255 | + vitest 0.28.5
17:22:47.255 | + wrangler 3.1.0
17:22:47.255 | + zod 3.21.4
17:22:47.255 |
17:22:47.255 |
17:22:47.256 | ><EMAIL_ADDRESS>prepare /opt/buildhome/repo
17:22:47.256 | > husky install
17:22:47.256 |
17:22:47.362 | husky - Git hooks installed
17:22:47.371 | Done in 4.7s
17:22:47.395 | Executing user command: npm run build
17:22:48.278 |
17:22:48.278 | ><EMAIL_ADDRESS>build
17:22:48.278 | > vite build
17:22:48.278 |
17:22:48.525 | ▲ [WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json]
17:22:48.525 |
17:22:48.525 | tsconfig.json:2:12:
17:22:48.526 | 2 │   "extends": "./.svelte-kit/tsconfig.json",
17:22:48.526 | ╵              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17:22:48.526 |
17:22:49.180 |
17:22:49.181 | vite v4.3.9 building SSR bundle for production...
17:22:49.218 | transforming...
17:22:50.204 | Browserslist: caniuse-lite is outdated. Please run:
17:22:50.205 | npx update-browserslist-db@latest
17:22:50.205 | Why you should do it regularly: https://github.com/browserslist/update-db#readme
17:22:50.492 |
17:22:50.492 | 🌼 daisyUI 3.1.1 https://daisyui.com
17:22:50.600 | ╰╮
17:22:50.601 | ╰─ ✔ [ 2 ] themes are enabled. You can add more themes or make your own theme:
17:22:50.601 | https://daisyui.com/docs/themes
17:22:50.601 |
17:22:50.601 | ❤ Support daisyUI: https://opencollective.com/daisyui
17:22:50.601 |
17:22:51.209 | ✓ 117 modules transformed.
17:22:51.290 | rendering chunks...
17:22:52.188 |
17:22:52.189 | vite v4.3.9 building for production...
17:22:52.198 | transforming...
17:22:54.009 | ✓ 93 modules transformed.
17:22:54.015 | Generated an empty chunk: "4".
17:22:54.092 | rendering chunks...
17:22:54.163 | computing gzip size...
17:22:54.183 | .svelte-kit/output/client/_app/version.json                                  0.03 kB │ gzip:  0.05 kB
17:22:54.183 | .svelte-kit/output/client/vite-manifest.json                                 8.19 kB │ gzip:  1.12 kB
17:22:54.184 | .svelte-kit/output/client/_app/immutable/assets/0.dfb76616.css              60.59 kB │ gzip:  9.48 kB
17:22:54.184 | .svelte-kit/output/client/_app/immutable/chunks/4.4ed993c7.js                0.00 kB │ gzip:  0.02 kB
17:22:54.184 | .svelte-kit/output/client/_app/immutable/chunks/navigation.f4508800.js       0.14 kB │ gzip:  0.13 kB
17:22:54.184 | .svelte-kit/output/client/_app/immutable/chunks/stores.bb3f5fb0.js           0.24 kB │ gzip:  0.17 kB
17:22:54.184 | .svelte-kit/output/client/_app/immutable/chunks/sql.b1c11cc9.js              0.28 kB │ gzip:  0.19 kB
17:22:54.184 | .svelte-kit/output/client/_app/immutable/chunks/csv.f64eaf54.js              0.42 kB │ gzip:  0.32 kB
17:22:54.185 | .svelte-kit/output/client/_app/immutable/chunks/preload-helper.41c905a7.js   0.76 kB │ gzip:  0.48 kB
17:22:54.185 | .svelte-kit/output/client/_app/immutable/nodes/1.0aee202e.js                 0.80 kB │ gzip:  0.50 kB
17:22:54.185 | .svelte-kit/output/client/_app/immutable/chunks/index.1a6ef7e1.js            0.82 kB │ gzip:  0.50 kB
17:22:54.185 | .svelte-kit/output/client/_app/immutable/chunks/zh-CN.27964a96.js            1.98 kB │ gzip:  1.45 kB
17:22:54.185 | .svelte-kit/output/client/_app/immutable/chunks/zh-TW.61a2fbf9.js            1.98 kB │ gzip:  1.49 kB
17:22:54.185 | .svelte-kit/output/client/_app/immutable/chunks/singletons.59085b4c.js       2.51 kB │ gzip:  1.28 kB
17:22:54.185 | .svelte-kit/output/client/_app/immutable/chunks/en.f39cf32e.js               2.68 kB │ gzip:  1.19 kB
17:22:54.185 | .svelte-kit/output/client/_app/immutable/nodes/2.144eee94.js                 3.14 kB │ gzip:  1.42 kB
17:22:54.186 | .svelte-kit/output/client/_app/immutable/chunks/index.3ab7a084.js            3.85 kB │ gzip:  0.94 kB
17:22:54.186 | .svelte-kit/output/client/_app/immutable/nodes/0.2108bfb6.js                 4.14 kB │ gzip:  2.03 kB
17:22:54.186 | .svelte-kit/output/client/_app/immutable/nodes/3.02b1b197.js                 5.55 kB │ gzip:  2.44 kB
17:22:54.186 | .svelte-kit/output/client/_app/immutable/chunks/RunQuery.dd0c8020.js         7.69 kB │ gzip:  3.10 kB
17:22:54.186 | .svelte-kit/output/client/_app/immutable/entry/app.a2661512.js               8.00 kB │ gzip:  2.28 kB
17:22:54.186 | .svelte-kit/output/client/_app/immutable/nodes/5.4890fd9e.js                 8.44 kB │ gzip:  3.58 kB
17:22:54.186 | .svelte-kit/output/client/_app/immutable/chunks/CSV.1da4fdb9.js              9.22 kB │ gzip:  3.72 kB
17:22:54.187 | .svelte-kit/output/client/_app/immutable/chunks/SemanticQuery.96423097.js   10.19 kB │ gzip:  3.84 kB
17:22:54.187 | .svelte-kit/output/client/_app/immutable/chunks/index.f9793f1d.js           11.71 kB │ gzip:  4.93 kB
17:22:54.187 | .svelte-kit/output/client/_app/immutable/nodes/6.5b9a8094.js                12.13 kB │ gzip:  4.73 kB
17:22:54.187 | .svelte-kit/output/client/_app/immutable/entry/start.fcd18861.js            23.98 kB │ gzip:  9.51 kB
17:22:54.187 | .svelte-kit/output/client/_app/immutable/chunks/sync.1fbb3c01.js            31.40 kB │ gzip:  9.68 kB
17:22:54.187 | .svelte-kit/output/client/_app/immutable/chunks/TableBrowser.0d8d0cd4.js    34.55 kB │ gzip: 12.51 kB
17:22:54.188 | .svelte-kit/output/client/_app/immutable/chunks/runtime.esm.fe56b148.js     47.66 kB │ gzip: 14.17 kB
17:22:54.188 | .svelte-kit/output/client/_app/immutable/chunks/sync.5ece7da5.js            48.89 kB │ gzip: 13.32 kB
17:22:54.188 | .svelte-kit/output/client/_app/immutable/chunks/AddRecord.519bc4e8.js       61.06 kB │ gzip: 15.62 kB
17:22:54.188 | ✓ built in 2.00s
17:22:54.958 | .svelte-kit/output/server/vite-manifest.json                                                   8.13 kB
17:22:54.959 | .svelte-kit/output/server/_app/immutable/assets/_layout.32e095f0.css                          60.58 kB
17:22:54.959 | .svelte-kit/output/server/entries/pages/db/_page.server.ts.js                                  0.14 kB
17:22:54.959 | .svelte-kit/output/server/entries/pages/_layout.server.ts.js                                   0.14 kB
17:22:54.960 | .svelte-kit/output/server/entries/endpoints/api/db/_server.ts.js                               0.17 kB
17:22:54.960 | .svelte-kit/output/server/entries/pages/db/_database_/_layout.server.ts.js                     0.17 kB
17:22:54.960 | .svelte-kit/output/server/internal.js                                                          0.19 kB
17:22:54.960 | .svelte-kit/output/server/entries/endpoints/api/db/_database_/dump/_server.ts.js               0.21 kB
17:22:54.960 | .svelte-kit/output/server/chunks/sql.js                                                        0.28 kB
17:22:54.960 | .svelte-kit/output/server/entries/pages/_layout.ts.js                                          0.38 kB
17:22:54.960 | .svelte-kit/output/server/entries/fallbacks/error.svelte.js                                    0.47 kB
17:22:54.961 | .svelte-kit/output/server/chunks/stores.js                                                     0.53 kB
17:22:54.961 | .svelte-kit/output/server/entries/endpoints/api/db/_database_/dump/_filename_/_server.ts.js    0.55 kB
17:22:54.962 | .svelte-kit/output/server/entries/endpoints/api/db/_database_/exec/_server.ts.js               0.67 kB
17:22:54.962 | .svelte-kit/output/server/entries/endpoints/api/db/_database_/all/_server.ts.js                0.74 kB
17:22:54.962 | .svelte-kit/output/server/entries/endpoints/api/db/_database_/_table_/_server.ts.js            1.00 kB
17:22:54.962 | .svelte-kit/output/server/chunks/RunQuery.js                                                   1.16 kB
17:22:54.962 | .svelte-kit/output/server/entries/pages/_layout.svelte.js                                      1.36 kB
17:22:54.963 | .svelte-kit/output/server/entries/endpoints/api/plugin/semantic-query/_server.ts.js            1.46 kB
17:22:54.963 | .svelte-kit/output/server/entries/pages/db/_database_/_layout.svelte.js                        1.47 kB
17:22:54.963 | .svelte-kit/output/server/chunks/index.js                                                      2.09 kB
17:22:54.963 | .svelte-kit/output/server/chunks/CSV.js                                                        2.24 kB
17:22:54.963 | .svelte-kit/output/server/chunks/SemanticQuery.js                                              2.26 kB
17:22:54.963 | .svelte-kit/output/server/chunks/index2.js                                                     2.36 kB
17:22:54.963 | .svelte-kit/output/server/entries/endpoints/api/db/_database_/_server.ts.js                    2.44 kB
17:22:54.963 | .svelte-kit/output/server/chunks/zh-CN.js                                                      2.49 kB
17:22:54.963 | .svelte-kit/output/server/chunks/zh-TW.js                                                      2.49 kB
17:22:54.964 | .svelte-kit/output/server/entries/pages/_page.svelte.js                                        2.66 kB
17:22:54.964 | .svelte-kit/output/server/entries/pages/db/_database_/_page.svelte.js                          2.83 kB
17:22:54.964 | .svelte-kit/output/server/entries/endpoints/api/db/_database_/_table_/data/_server.ts.js       3.18 kB
17:22:54.964 | .svelte-kit/output/server/chunks/en.js                                                         3.18 kB
17:22:54.964 | .svelte-kit/output/server/chunks/AddRecord.js                                                  3.18 kB
17:22:54.966 | .svelte-kit/output/server/entries/pages/db/_database_/_table_/_page.svelte.js                  3.19 kB
17:22:54.966 | .svelte-kit/output/server/chunks/hooks.server.js                                               5.76 kB
17:22:54.966 | .svelte-kit/output/server/chunks/internal.js                                                   6.43 kB
17:22:54.966 | .svelte-kit/output/server/chunks/index3.js                                                     7.63 kB
17:22:54.966 | .svelte-kit/output/server/chunks/TableBrowser.js                                              48.58 kB
17:22:54.966 | .svelte-kit/output/server/chunks/runtime.esm.js                                               90.92 kB
17:22:54.966 | .svelte-kit/output/server/index.js                                                           105.22 kB
17:22:54.967 |
17:22:54.967 | Run npm run preview to preview your production build locally.
17:22:54.973 |
17:22:54.974 | > Using @sveltejs/adapter-cloudflare
17:22:55.847 | ✔ done
17:22:55.847 | ✓ built in 6.66s
17:22:55.902 | Finished
17:22:55.902 | Found _worker.js in output directory. Uploading.
17:22:57.100 | ✨ Compiled Worker successfully
17:22:57.138 | Found _routes.json in output directory. Uploading.
17:22:57.151 | Validating asset output directory
17:22:57.897 | Deploying your site to Cloudflare's global network...
17:22:59.794 | Parsed 2 valid header rules.
17:23:00.968 | Uploading... (22/35)
17:23:01.598 | Uploading... (26/35)
17:23:01.728 | Uploading... (30/35)
17:23:02.025 | Uploading... (35/35)
17:23:02.025 | ✨ Success! Uploaded 13 files (22 already uploaded) (1.33 sec)
17:23:02.025 |
17:23:02.248 | ✨ Upload complete!
17:23:03.358 | Skipping build output cache as it's not supported for your project
17:23:04.492 | Success: Assets published!
17:23:06.576 | Success: Your site was deployed!

The build settings:
Build command: npm run build
Build output directory: /.svelte-kit/cloudflare
Build system version: 2 (latest)
Root directory: /
Environment variables: None

The DB Bindings:

Variable name
D1 database

DB_production
autodepo

DB_staging
autodepo_staging

I am having the same issue

This issue might be related to the D1 shim used previously. I have updated the logic to fallback to the D1 shim if only a fetcher is provided. This was a problem in the past, but I'm not certain if Cloudflare has resolved it yet.
The original logic may be failed if the D1Database class is directly inherited from the Fetcher class, or has the fetch method.
https://github.com/JacobLinCool/d1-manager/commit/cd949901c4b83056a2daa9a8740c29977cf39fae

I believe I am running into this same issue

I believe I am getting this error as well
GET https://explorer.pages.dev/db/production/__data.json?x-sveltekit-invalidated=110
{"type":"data","nodes":[{"type":"data","data":[{"dbms":1},[2,3,4],"default","gateway","netutils_api_gateway"],"uses":{}},{"type":"data","data":[{"db":1},{"message":2},"Database not found"],"uses":{"params":["database"]}},{"type":"skip"}]}

GET https://explorer.pages.dev/api/db/gateway/requests
{
	"count": 2008
}

GET https://explorer.pages.dev/api/db/gateway/
{
	"error": {
		"message": "D1_ERROR: not authorized",
		"cause": "not authorized"
	}
}

GET https://explorer.pages.dev/api/db/
[
	"default",
	"gateway",
	"netutils_api_gateway"
]

Also having this issue

Fix is here. https://github.com/JacobLinCool/d1-manager/pull/33


feat: state in props

Standing on the shoulders of giants here.
supersedes: https://github.com/denoland/fresh/pull/1145 & https://github.com/denoland/fresh/pull/833
closes: https://github.com/denoland/fresh/issues/1128, closes https://github.com/denoland/fresh/issues/663
Now that AppProps extends PageProps (thanks to https://github.com/denoland/fresh/pull/1229), there seems to be some duplication of issues and PRs. https://github.com/denoland/fresh/issues/663 (state in _app) is a special case of https://github.com/denoland/fresh/issues/1128 (state in props). Likewise, https://github.com/denoland/fresh/pull/833 (add state to AppProps) is a special case of https://github.com/denoland/fresh/pull/1145 (add state to PageProps).
Both the PRs were incredibly instructive to me, but both seemed to get stuck at that classic last hurdle: tests and docs. I've tried my hand at modifying the docs to reference state being available (I think this is ok) and at writing tests (not so sure about this part). Of course I'm happy to receive feedback on all parts (especially including the right way to dust off someone's old PR for something I'm interested in moving forward).

Thanks Lino. If I'm honest, the thing I'm most excited for here is that it closes two issues and we can close another PR as no longer necessary 😅

Glad my PR was helpful to you! Thanks for carrying this through to the end! :heart:


ZW090 Z-Stick Gen5 EU (AEON Labs) led does not turn off

Version
Build/Run method

[robertslando/zwave2mqtt:latest ] Docker

Zwave2Mqtt version: 2.1.1
Openzwave Version: ? the one in the docker I guess
Describe the bug
I have a "ZW090 Z-Stick Gen5 EU (AEON Labs)" as zwave controller.
It has a LED that is blinking constantly like crazy in red, orange, blue.
What I understant, this is correct behavour for this device, unless explicitly turned off.
In the configuration for the controller, there is a "LED indicator configuration" [enable/Disable]
If I change it to [Disable] and press the blue arrow next to the value, I get a response saying "Successfully call api setValue"
Problem is LED is still blinking and if I refresh the page, value has changed to [Enable]
To Reproduce
Try and set the [Disable] value, then refresh the page and visually look at the LED.
Expected behavior
LED should stop blinking

I suggest you to use this command to turn off led blink:
echo -e '\x01\x08\x00\xF2\x51\x01\x00\x05\x01\x51'|cu -l /dev/ttyACM0 -s 115200
Remember to replace /dev/ttyACM0 with your device path


Redone FindMono.cmake and draft of get_virtual_method

FindMono now defines also MONO_LIBRARY_DIRS to find .lib files needed for compilation.

Also fixed (at least on my WIN10 computer) inabity of cmake to find_path of mono root folder.

Added draft of monobind::object.get_virtual_method(name,baseClass).
(Not quite sure about the need to specify the base class of a method. Other solution would require iterating over all parents/interfaces and checking if they have the virtual method, which is cumbersome.)

Thanks for PR. I decided that get_method should handle virtual methods, so now it searches for method in whole class hierarchy


Broken in at least python 3.9

import fractions from gcd was deprecated in python 3.6 and doesn't work in python 3.9 anymore.
The fix is to import math and exchange gcd by math.gcd. There are only two ocurences in server.py. I don't know how to incomporate this into the project without breaking it for older python installations though.

Python 3.7.3 from raspbian repository also shows warning like this:
/opt/pi-mqtt-gpio/lib/python3.7/site-packages/pi_mqtt_gpio-0.5.2-py3.7.egg/pi_mqtt_gpio/server.py:730: DeprecationWarning: fractions.gcd() is deprecated. Use math.gcd() instead.
  cycle_time = reduce(lambda x, y: gcd(x, y), arr

The problem can be solved just by replacing string "from fractions import gcd" to string "from math import gcd" in the begginig of server.py file.

Python 3.7.3 from raspbian repository also shows warning like this:
/opt/pi-mqtt-gpio/lib/python3.7/site-packages/pi_mqtt_gpio-0.5.2-py3.7.egg/pi_mqtt_gpio/server.py:730: DeprecationWarning: fractions.gcd() is deprecated. Use math.gcd() instead.
  cycle_time = reduce(lambda x, y: gcd(x, y), arr

The problem can be solved just by replacing string "from fractions import gcd" to string "from math import gcd" in the begginig of server.py file.

I've added a backwards-compatible import to the develop branch, thanks. It'll be in the next release :+1:

I've added a backwards-compatible import to the develop branch, thanks. It'll be in the next release :+1:


'timestamp granularity', new featured added to AudioAPI Feb 9th not accessible

Confirm this is an issue with the Python library and not an underlying OpenAI API

[X] This is an issue with the Python library

Describe the bug
audio.transcriptions.create() parameter 'timestamp_granularities' not recognized.
As per API changelog, parameter added to API Feb 9th:
https://platform.openai.com/docs/changelog
To Reproduce
passing timestamp_granularities=["word"] to audio.transcriptions.create() results in
TypeError: Transcriptions.create() got an unexpected keyword argument 'timestamp_granularities'
Code snippets
---> 19 transcript = client.audio.transcriptions.create( #openai.audio.transcriptions.create(
     20   file=wavfile,
     21   model="whisper-1",
     22   response_format="verbose_json",
     23   timestamp_granularities=["word"]
     24 )

TypeError: Transcriptions.create() got an unexpected keyword argument 'timestamp_granularities'

OS
All
Python version
3.11.4
Library version
openai-1.12.0

Documented parameter under Timestamps heading on this page:
https://platform.openai.com/docs/guides/speech-to-text/supported-languages

Thanks for raising this. I'm checking with the appropriate team what the correct course of action is.

ah, this is in the latest release; you just need to upgrade your package.


Changed gif handler to mpv and removed redundant webm entry in mailcap

Gifs were previously handled by feh which can only display the first frame.

Thanks!


Layer updated event never stops being launched.

Has started to happen with the latest code in master
Take any example and add:
layer.on('updated', ()=> {       console.log('updated');     });
The updated event never stops being launched.
This is very important for us because we use this event to get the features that are on the screen every time the map changes.

As we have talked, it has already being solved in https://github.com/CartoDB/carto-vl/pull/836. Thanks for reporting the error! :)


Onboarding: Provide explicit feedback on what escalation path is and how to implement it + temporarily address in the Onboarding Checklist

Currently, this item is in the onboarding checklist:
Update project CoC reporting methods to include OpenJS Foundation escalation path

In investigating this for a currently incubating project, I've personally found it excessively difficult both to fully understand what the escalation path actually is since it seems to currently be not explicitly defined and have not found any official guidance on what implementing this for a project means - both in the sense of what kind of things a project can expect if the escalation path is used and what that path even looks like.
For context, one assertion that was made to me was that CoC violations in given projects can be escalated through this path and reviewed by the body they're escalated to - this is extremely concerning to me given the possibility of the escalation resulting in a turnover and a project being forced to allow someone to continue participating. This is an extremely concerning prospect, as it puts project membership in danger and it creates an extremely toxic power dynamic both between project members and the violator and between the OpenJS CPC group and projects.
Given the above concerns, I'd also like to recommend that we either temporarily address this for onboarding projects by either striking it from the onboarding checklist until the CoC WG can provide a more explicit checklist item that's well documented, defined, and positive for the projects or provide official temporary guidance to projects that are going through the onboarding process on how to address this point with absolute guarantees about how their community safety structures will not be overturned.

This is the doc https://github.com/openjs-foundation/cross-project-council/blob/master/CODE_OF_CONDUCT.md#escalation for escalation.
I do see the link was broken when files were moved to the CoC repo.  This is the section which describes escalation in more detail: https://github.com/openjs-foundation/cross-project-council/blob/master/FOUNDATION_CODE_OF_CONDUCT_REQUIREMENTS.md#escalation

Given the documentation above I don't quite understand actually is since it seems to currently be not explicitly defined and have not found any official guidance on what implementing this for a project means - both in the sense of what kind of things a project can expect if the escalation path is used and what that path even looks like.
Can you list out what needs to be documented?
The concern about having an escalation path is a separate discussion.  This came about because of the complaints in the past that there was no escalation path once a decision had been made by the project.  In that case the argument was that it was needed to protect contributors.
If the Foundation has a stake in ensuring CoC's are enforced across the Foundation members then there needs to be a path for escalation to the Foundation. In this case (hopefully rare), there can be disagreement between the Foundation's opinion and a project, in which case the two would need to work through how to close that gap or in the worst case the project leaving the Foundation.
The alternate approach is to say that the Foundation's role is advisory/supporting only and that the Foundation will not get involved if there is a disagreement over how a CoC report was handled by a project. In that case any complaints directed to the Foundation should simply be re-directed to the project (if you are not going to do that, then you need an escalation path).

One more approach is that the Foundation would only get involved on "request" from a project. In that case it would still really be in the "advisory/support" role so there would be no escalation path from the reporter, instead there would be a process for a project asking for help.

Can you list out what needs to be documented?

In my own looking and talking with Foundation staff, I was not able to locate this documentation. What I was looking for does seem to exist, and is completely different than how it was described to me. Without and documentation I was unable to have a concrete foundation to understand that 😅
There does seem to be some knowledge that you have that does not come across in the document. Specifically,

This came about because of the complaints in the past that there was no escalation path once a decision had been made by the project. In that case the argument was that it was needed to protect contributors.

How is this meaningfully addressed in the current setup?

If the Foundation has a stake in ensuring CoC's are enforced across the Foundation members then there needs to be a path for escalation to the Foundation.

I’m not entirely sure what this means, but I think I get the idea. This idea is rather ominous and undefined - I understand the concept but the implications are uncertain. It also does not come across explicitly in the aforementioned documents to me.

In this case (hopefully rare), there can be disagreement between the Foundation's opinion and a project, in which case the two would need to work through how to close that gap or in the worst case the project leaving the Foundation.

This is an extremely strong power dynamic between the Foundation and projects that should be excessively defined in a way it is currently not at all... at least not in the aforementioned documentation. I would honestly argue that we should likely pause the onboarding checklist item as a requirement until this is well defined.

The alternate approach is to say that the Foundation's role is advisory/supporting only and that the Foundation will not get involved if there is a disagreement over how a CoC report was handled by a project. In that case any complaints directed to the Foundation should simply be re-directed to the project (if you are not going to do that, then you need an escalation path).

Is this an alternative currently available to projects or an alternate proposal for how this would be handled?

How is this meaningfully addressed in the current setup?
It's addressed by having an escalation path, and a defined makeup of the CoCP panel who were intended to be individuals who could be trusted to handle escalations.

Is this an alternative currently available to projects or an alternate proposal for how this would be handled?

I was trying to outline different ways that the the Foundation/CPC could choose to operate, particularly if an escalation path is not in place. As currently written there is an escalation path and it is not optional but the CPC can choose to change that.

@bnb I suggest you bring this up at the next CPC meeting. Despite the review/discussion of the documents during the proposal process it seems there is still a lot of confusion.
Fundamentally it comes down to whether the Foundation has any requirement on projects with respect to the CoC beyond having one. (for example, what happens if a project has one as required, but completely ignores or just rejects all reports).


bug: server only built-ins polyfilled in client bundle

Hi, I've been unable to update @azure/msal-node library since version 1.12.1 due to the introduction of the loopback listener which imports createServer from the http builtin as per below.
import http, { createServer } from 'http';

From what I can tell from the error message it is trying to resolve from the rollup http polyfill plugin that doesn't implement this method. I tried adding the library to serverDependenciesToBundle but that didn't seem to solve anything and if I edit the imported file in node_modules to just import http from 'http'; everything builds and runs as expected.
Appreciate any help or direction to getting this resolved. Thanks.

I've updated the example test to highlight what I believe to be a wider issue with the polyfill approach in the code splitting and tree shaking.
You can see in the test that by importing from a built in directly in a route and using that in the loader only (no need to polyfill) you end up with the entire polyfill in the client bundle for that route.

Closed by #5274


Show function prototype for imported functions on hovering

BN shows function preview when hovering on function names. But when hovering on a function that is imported from another library, BN shows hex dump of the import table, I guess.
Wouldn't be better if BN preview function prototype in this example?

Duplicate of: #1175


Work In Progress: Update dependencies and Dart SDK in workflows

Testing Dart CI workflow by triggering it through this pull request

Description
Updated dependencies in response to OverReact upgrade to version 4.2.6.
scadnano workflows will now use Dart SDK 2.13 instead of 2.9 because Dart SDK 2.9 is no longer supported by OverReact. Dart SDK 2.13 is the newest SDK supported by OverReact because newer versions rely on analyzer 1.x, which OverReact does not support as noted in the OverReact workflow file.
react_components_test_template.html has been updated in response to upgrading test_html_builder from version 1 to version 2.
Lastly, to ensure that our developers are working on the app with the exact same versions, I committed the pubspec.lock file. This is recommended for application packages, as noted in the Dart documentation.
Related Issue
#706
How Has This Been Tested?

[x] Ran unit tests locally
[x] Run Dart CI workflow
[ ] Run github-pages-dev workflow on fork
[ ] Run github-pages workflow on fork
[ ] Have @dave-doty test out the changes by pulling this branch and see if he can still run webdev serve and unit tests.

Do you think we should change this line:
environment:
  sdk: '>=2.9.0 <3.0.0'

to
environment:
  sdk: '>=2.11.0 <3.0.0'

Since OverReact is going to require >=2.11 anyway?

I am able to rub locally after running
pub get

then
webdev serve

It's annoying that we still get the analyzer warning:

But it appears that OverReact is still requiring the old version of analyzer:
https://github.com/Workiva/over_react/blob/7ee4fc2c07761a02d0f0a9577c4296b7a10e41a9/pubspec.yaml#L8-L13

@dave-doty Updated SDK requirement in pubspec.yaml and fixed and tested the Github workflows, as indicated above. Ready to merge as soon as changes are approved.


Documentation cleanup/renaming effort

Change Summary
Just wanted to clean up and rearrange some docs, and add a link to the new NASA TOPS open science 101 course. I'd appreciate any notes on naming changes or locations.
Overview

Renamed a few top level files to be more specific, and moved files that I thought made more sense in different areas. With :ref: this didn't make much difference in the actual contents of the files, although I did tidy up a few index.rst files.
Text changes

top level index.rst file
code-documentation/tools/cdf-global-attrs

Just added a few sentences here, mostly wanted to add it so I can start fleshing this out in a later PR

It can be hard to figure out the changes in the github view so here's the renaming:
Big name changes:
reference is renamed to code-documentation
development is renamed to development-guide
Created external-tools
Moves:
moved CDF and poetry docs to external-tools
Moved xarray to cdf and xtce documentation into code-documentation/tools
So, the main top-level directories are now:
code-documentation
development-guide
external-tools
project-mangement (unchanged in this PR)
Which I feel makes it more clear to external users what the documentation groups contain and make it easier to dig down and find what you're looking for.

@all-contributors please add @maxinelasp for maintenance


Avoid/reduce pyramid of doom where possible (use promises?)

Not really needed, solved with async...


Putting open parenthesis '(' next to an at symbol '@' crashes visual studio

This issue has been moved from a ticket on Developer Community.

Like the title says visual studio completely crashes when I put these symbols together '@(' I am working in a .razor file.

Original Comments
dalankelsch on 5/30/2019, 09:38 AM:
I took a windows update an it fixed this problem
Visual Studio Feedback System on 5/30/2019, 08:32 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
dalankelsch on 5/31/2019, 10:33 AM:
The issue came back even though I had taken that update, so I don't know why it went away for a little bit there.
Visual Studio Feedback System on 7/19/2019, 00:11 AM:
Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2017#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.

Original Solutions
(no solutions)

Thanks for contacting us.
In order for us to investigate this issue, could you please provide a minimalistic repro project that illustrates the problem? Ideally also indicate at what line and column to insert the characters to trigger the VS crash.
@NTaylorMullen the internal ticket has attachments with additional information that will likely help you troubleshoot the issue. I can assist a bit if you need help into looking at it.

I can't repo with VS community 20019 Version 16.3.9
(@page
(@model PrivacyModel
@{
    ViewData["Title"] = "Privacy Policy";
}

(@ViewData["Title"]

 (@__o) Use this page to detail your site's privacy policy.

I believe this was fixed because I can no longer reproduce either


Add blt_export_tpl_targets macro

RTD's here: https://llnl-blt.readthedocs.io/en/feature-export-macro/api/target.html#blt-export-tpl-targets

Almost forgot.. can you update RELEASE-NOTES.md?

Almost forgot.. can you update RELEASE-NOTES.md?

No...... okay fine. 😄


fix plugin only reporting true for isNativeSupport

First off: love the plugin. I've been looking for something like this for a while now.
However: it doesn't work in IE11 without setting skipSupportedBrowsers to false (due to the isNativeSupport always being true if window or window.CSS or window.CSS.supports are undefined). This PR should fix it.

added tests to prove it was doing what it should be doing
IE11 (and JSDOM) have window.CSS === undefined
when its undefined, the code never ran the supports check
so the flag was always true
you had to force it to run in all browsers to make it run in IE11
this fixes that

Haii! @kaiyote Thank you for this update! 🙏
I originally added the  window === 'undefined' guards for server-side rendering.
Assuming we still need the check for window, what do you think about this change?
// Detects native CSS varialble support
// https://github.com/jhildenbiddle/css-vars-ponyfill/blob/master/src/index.js
let isNativeSupport = false

if (window !== 'undefined') {
	isNativeSupport = window?.CSS?.supports?.('(--a: 0)');
}

Man, I'd really hoped the ?. transpilation would've handled that case, but apparently not. Pushed a fix for that, tho. Should take care of it

@kaiyote Released your update in v1.0.6
https://github.com/ItsJonQ/stylis-plugin-css-variables/releases/tag/v1.0.6


Inline responses

This is really important for performance

There2 is the inlined version of Json

Json and XML are now inlined with #19

Responses have been inlined. Further testing is required


Address Span Issues

[X ] This contribution adheres to CONTRIBUTING.md.

TODO: Check the above box with an 'x' indicating you've read and followed CONTRIBUTING.md.
What does this Pull Request accomplish?

Updates Time span to check using millisecond timer for improved performance
Updates Time span to set start time at the trigger change if file was already opened
Computes estimated file size based on data being written to TDMS file rather than using the Get File Size.vi

Why should this Pull Request be merged?

#20 is addressed

What testing has been done?
Validated locally on Windows PC for performance across multiple file sizes with varying number of groups. Ensured Missed Packets did not grow.

[X]  Delete Convert Span Size to Time.vi. It is not used anywhere. Remove the corresponding diagram disable structure and related code for getting the engine rate in Initialize Logging Data.vi.
[X]  Revert Sample File Data.vi and Set Data in Group Buffer.vi. There are no actual changes to these VIs.
[X]  Asynchronous Logging Loop.vi and Update Log Start Time in New Trigger.vi need to have source separated.
[X]  test Log Span Size.vi fails. The TDMS file has more in it than just the raw data that is written, so the file size will not be exactly 1000000 bytes. Revert the test VI to test the original file size that was there. This value accounts for the size of the metadata.
[X]  test Log Span Size.vi has a 6 minute wait. With the performance improvements, it only takes about 30 seconds for the file to span. Instead of waiting for some period of time, put in a check for the number of TDMS files in the directory and when there are multiple files, check the size of the oldest. Also make sure to have something like a 1 minute timeout in case spanning actually does fail. This will greatly speed up this test.

Not a huge deal, but just wanted to verify: Using the millisecond timer limits us to about 50 days of logging for a single file (whereas the timestamp has no limitation). This is probably ok, but I just wanted to make sure we don't have a use case that might require longer time before spanning. Is this limitation acceptable?

All the requests should have been addressed in my latest commits. As for the limitation. I have no problem with this. I don't expect anyone to want to log to a single file for 50 days. For our use case, 1 day max would be expected.

[X]  @niphilj would like to have the time span implementation using the Timestamp instead of millisecond timer so we don't have any artificial restrictions on duration. I like the changes you have for encapsulating the time span, so this is just replacing the U32 in your implementation with the Timestamp.
[X]  In Embedded Data Logger Windows System Tests.lvclass:Wait for Files.vi, remove the last case structure and just use the JKI failIf.vi. This gives you the same behavior, but makes the diagram more readable.

After these changes, this should be ready to go.

This should be addressed in the latest commit.

[X]  test Log Span Time.vi is failing because it is logging for 30 seconds instead of 20.

I had forgotten to remove the conversion from ms to s.


make an event active by clicked on the event

hi,
I want to collapse or expand my event message section when clicked on the the event.It that any possible way to do that?
I already check the code and document, i found that the main difference between an collapse or expand event is whether there is a "active" in the classname. It's any way i am change the status of an event?

@pkdyc At the moment, the title and subTitle cannot be collapsed; only the titleDetails can be collapsed. If you want the same click behavior for the title and subtitle, it's not currently possible. Please note that the "active" only refers to the currently selected timeline item and does not affect the collapse function.

ty, i will implement this by myself, thx for your quick reply again

ty, i will implement this by myself, thx for your quick reply again

ty, i will implement this by myself, thx for your quick reply again

@pkdyc You might want to have a look at the "rendering custom content" section on this link.


Fix extended tests

Regression test suite updated to work with 2MB blocks.

Just wondering what's wrong with good old fashioned cherry-picks?

My apologies.
Since commit 7ebe4208ddfd293611ff9e4f58ec274df8520ce2 is based on branch 11 and we are working in branch 12, merges were needed.  In addition, changes were made for the new height parameter and a fix with the setup_chain initialization.  I decided to roll these into one commit since they all dealt with the CLTV tests.
Please let me know if there is a more proper way to do this.

and a fix with the setup_chain initialization

Yes it looks like 069602f4d909b2deac0550dd9e80a9ce30f688ac was also incorporated (but one of the files is missing).  It would be best to merge the cherry-picks and then add your own stuff in another commit.

First of all, thanks for working on this!
I would agree with dgenr8, its very important to keep the origins of the code accountable and apart from  proper attribution, I'd like to see that when you cherry-pick something that the input and output are expected. And for that to happen, you'd have to keep the original cherry-picks in tact.
I know that for your translation patches I did a squash, and so I violated this rule. But I do think that strings on screen and text files have a different weight to them than code that makes up unit tests and the like.

Thank you for the feedback.  I have updated the commits to include cherry-picking commits and  moved my changes into one last commit.
Also thanks @dgenr8 for pointing out  bitcoinxt/bitcoinxt@069602f , I previously missed the fix to forknotify.

I like this change, but I can't claim to understand it.
@gavinandresen or @jgarzik may be able to pitch in on correctness.

Code reviewed and tested on my OSX development machine, merge it!


Fix metric service cannot start

Description
https://github.com/apache/iotdb/pull/10429 removed some netty dependencies. However, some of them are necessary for metrics module. When open the PROMETHEUS reporter, the confignode cannot start.

Therefore, this PR is recovering the necessary dependencies.

coverage: 47.921% (+0.002%) from 47.919% when pulling aa890fb482cf919d207174ca9e024a5f51ec5d8f on fix_metrics into 8b6d018bb339da070dc919925effb5fb6aded579 on master.


Question - What does red mean?

For some reason, one of the topics shows up as red.

I think this might be a bug in kafka-manager since this topic isn't currently marked for deletion or anything.
What causes a topic to be marked red?

A topic is marked red if it is marked for deletion in Zookeeper.  I have seen cases where if you create a topic and then delete it and attempt to create a topic with the same name, it fails to create properly and just gets marked as deleted by Kafka controller in <IP_ADDRESS>.  I will try to validate this tomorrow in my dev environment.

That actually is what happened. I deleted the topic 'ndstreamer' and stopped everything from pushing to that topic for a day so it would have time to purge out.
I then made a new topic with the same name and started pushing to it again. Everything seemed fine for a day until it abruptly showed up red after the weekend.
Is there a way to 'unmark' a topic for deletion

Figured it out by looking at the source. When kafka marks a topic for deletion, it calls the ZkUtils.scala class and adds to zookeeper the following entry: /admin/delete_topics
https://github.com/apache/kafka/blob/5f3eb1cafaecee746641fa43945cc0762635a0bd/core/src/main/scala/kafka/utils/ZkUtils.scala#L46
I assume that if a topic appears in both kafka/admin/delete_topics and kafka/config/toipcs then it is marked for deletion. If the topic is in only one or the other then the topic is valid or deleted.
I worked around the issue by removing the topic from the delete_topics directory in zookeeper


issue #SB-356 feat: create announcement validation fix

@kochhar The unit test cases are not written for most of the functionalities
cc: @gsbajaj72 @vrayulu


Immuable collection IDs

Hey! We've been evaluating Falcor for use with an "AP" database, and have run into a problem when looking up a collection of refs.
Our data is currently kept as a map of objects, with unique keys (UUIDs, truncated for this example):
"tree": {
  "ea13b99f": { "name": "leaf 1" },
  "a2c9d75d": { "name": "leaf 2" },
  "d36395c5": { "name": "leaf 3" },

  "9e0e5531": {
    "name": "branch - list",
    "children": [
      {
        "$type": "ref",
        "value": [ "tree", "ea13b99f" ]
      },
      {
        "$type": "ref",
        "value": [ "tree", "a2c9d75d" ]
      },
      {
        "$type": "ref",
        "value": [ "tree", "d36395c5" ]
      }
    ]
  },

  "zb3749bd": {
    "name": "branch - map",
    "children": {
      "ea13b99f": {
        "$type": "ref",
        "value": [ "tree", "ea13b99f" ]
      },
      "a2c9d75d": {
        "$type": "ref",
        "value": [ "tree", "a2c9d75d" ]
      },
      "d36395c5": {
        "$type": "ref",
        "value": [ "tree", "d36395c5" ]
      }
    }
  }
}

Running this works fine:
model.get(
  [ 'tree', '9e0e5531', 'name' ],
  [ 'tree', '9e0e5531', 'children', { to: 10 } ]
)

But there's a problem with our use-case. We require idempotent operations, and as such we'd like children to be a map (a collection of explicit unique keys), instead of an array (a collection of implicit numerical keys).
In the undesired scenario, if two users were to attempt to delete tree.zb3749bd.children.0, tree.zb3749bd.children.length = 1.
In the desired scenario, if two users were to attempt to delete tree.9e0e5531.children.ea13b99f, tree.9e0e5531.children.length = 2.
Is it possible to run something like this? The range operation would get the first 10 keys from children (sorted by key) and return pretty much the same thing as the get operation above.
model.get(
  [ 'tree', 'zb3749bd', 'name' ],
  [ 'tree', 'zb3749bd', 'children', { to: 10 } ]
)

Otherwise, is there some other way to perform idempotent operations on lists?

@neftaly glad to hear you were evaluating falcor :)
if you don't prefer numeric key ranges, you can always use explicit string keys as follows:
model.get(
  [ 'tree', 'zb3749bd', 'name' ],
  [ 'tree', 'zb3749bd', 'children', [ 'ea13b99f', 'dju47fu2', 'kloiu89f' ] ]
)

Does that answer your question?

@asyncanup Looks so, thanks for your help!


azure extension: add delete, check_exist and list_all methods

@narrieta This PR supports more extension operations like list, delete, exists. Do you have a chance to try? Thank you.

@squirrelsc our automation does not use the LISA feature, so I have no way to try it. Maybe you can modify https://github.com/microsoft/lisa/blob/main/microsoft/testsuites/vm_extensions/waagent.py and run it on your side?

@squirrelsc our automation does not use the LISA feature, so I have no way to try it. Maybe you can modify https://github.com/microsoft/lisa/blob/main/microsoft/testsuites/vm_extensions/waagent.py and run it on your side?

I see. I will get this PR merged first.

@squirrelsc our automation does not use the LISA feature, so I have no way to try it. Maybe you can modify https://github.com/microsoft/lisa/blob/main/microsoft/testsuites/vm_extensions/waagent.py and run it on your side?

I see. I will get this PR merged first.

I have tried it by updating code in verify_vm_agent.


gtop shortcut

gtop shortcut

Can you merge this with #199 so that it's bundled together? Doesn't really work without #199 changes.

Merged #198 and #199, looks good. Thanks!


Cannot remove objects in dependent charts by setting values to null

We're seeing that we cannot remove objects in dependent charts by setting the values to null , they will still get included in the result.
This used to work before, and this is causing apps deployed using ArgoCD to fail on probes getting introduced incorrectly (as they are defined in the dependent charts and cannot be nulled out).
This works well in ArgoCD 2.9.1, bot not in 2.9.2 which upgraded helm from 3.12.1 to 3.13.2, so the issue got introduced between those versions. I suspect this has to do something with this PR. The default template ProcessDependencies() got replaced with ProcessDependenciesWithMerge(), which ultimately does not remove null keys.
Related issues:

https://github.com/helm/helm/issues/12637
https://github.com/helm/helm/issues/12741
https://github.com/argoproj/argo-cd/issues/16312

Issue
After running helm template . -f values.yaml in helm-issue (see setup below) and values.yaml:
helm-dep:
  port: null

Got:

...
 spec:
      containers:
        - image: nginx:alpine
          name: nginx
          resources: {}
          ports:
            - containerPort: 80
              protocol: TCP
              name: http

Want:

...
 spec:
      containers:
        - image: nginx:alpine
          name: nginx
          resources: {}

Please ignore that this is not functional this way, this is just to demonstrate the issue. In our real use case, this is causing probes getting incorrectly introduced, failing deployments in newer ArgoCD versions.

Note: we get the correct result if we do
helm-dep:
  port: ""

Minimal setup:

helm-issue/Chart.yaml:

---
apiVersion: v2
appVersion: "0.1.27"
description: A Helm chart that demonstrates nulling issue
name: helm-issue
version: "0.1.0"
dependencies:
  - name: helm-dep
    version: "0.1.0"
    repository: "file://../helm-dep"

helm-issue/values.yaml:

helm-dep:
  port: null

helm-dep/templates/deployment.yaml:

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: helmtest
  name: {{ .Release.Name }}
  namespace: {{ .Release.Namespace }}
spec:
  replicas: 1
  selector:
    matchLabels:
      app: helmtest
  template:
    metadata:
      labels:
        app: helmtest
    spec:
      containers:
        - image: nginx:alpine
          name: nginx
          resources: {}
          {{- with .Values.port }}
          ports:
              - containerPort: {{ .containerPort }}
                protocol: TCP
                name: {{ .name }}
          {{- end }}

helm-dep/Chart.yaml:

---
apiVersion: v2
appVersion: "0.1.27"
description: A Helm subchart that demonstrates nulling issue
name: helm-dep
version: "0.1.0"

helm-dep/values.yaml:

port:
  containerPort: 80
  name: http

(Of course, helm dependency update has to be run)

I have the same issue with Helm v3.14.4, while it was working some time ago. Will try to get my hands on older releases and check if those are working...


Fix ABI conformance of IMap::Remove, add TryRemove

single_threaded_map()'s IMap::Remove did not throw hresult_out_of_range on attempts to remove a nonexistent key. Now it throws.
Note that this is a breaking change. Code that assumed nonexistent objects could be harmlessly removed will encounter exceptions when run against C++/WinRT implementations when they hadn't before this change. This was, however, a pre-existing bug, because implementations from other projections (C#, C++/CX, WRL) always throw under those conditions.
Added a TryRemove() method for people who want the nonthrowing version.
Note that fixing the ABI conformance is required in order for TryRemove to return the correct result, because TryRemove relies on the call to Remove failing if the key doesn't exist.
(JavaScript doesn't project objects as maps, so there is nothing to validate there.)
Tightened the behavior of TryLookup and TryRemove so they propagate RPC failures. Because the inability to remove the item could be due to the server being unavailable, and that's not the same as the item not existing in the collection. Previous code treated loss of server the same as "The item doesn't exist", which is not true: The item could exist, we just were unable to contact the server to find out.
Failure to remove a nonexistent key no longer invalidates iterators, because nothing actually changed. This brings the map implementation in line with the implementations in C# and WRL. (C++/CX invalidates prematurely. JavaScript never invalidates iterators.)

/azp run

/azp run


Add support for DieselNewType from diesel-derive-newtype

Hello, I'm submitting this pull request to support the derive of DieselNewType from diesel-derive-newtype.
I tried to add everything that seemed necessary but tell me if I missed something.

@SpartanPlume
Sorry I was out for almost 2 weeks.
Thank you very much for the pull request!
Adding support for ORMs (diesel, sqlx, seaorm) is something I had in mind.
It's not gonna go into 0.4.1, but your PR will be definitely very useful.

@SpartanPlume If I understood it right simply  DieselNewType does not respect the sanitization and validation rules?
Unfortunately it's not the way I want to go.
My vision is, I want to make fail is database serves data which violates the validation rules.

Closing the PR since there was no reply so far.


Adding Scaling Strategy for ScaledJob

I talked with Several Customers of the ScaledJob. The use case is totally different, and the request for the Scaling Logic is also different. Also I found some limitation for many scalers. For considering, all of these, I'd like to introduce new scale logic.
Probably, we can discuss the custom scale logic that I talk you later.
What do we need to know?
1. ScaledJob scaling expectation
HPA scaler is about Scale-In, and Scale-Out, however, ScaledJob has no Scale-In/Out  If new messages arrives in the queue, it should create new jobs until it reaches maxReplicaCount.
2. Limitation of the queueLength implementation
Scalers use various SDKs. The behavior is different. If we fetch the queueLength, it usually includes locked message and there is no way to fetch the number of message that not locked.
The ideal metric is the number of message that is not locked. Why? The ideal number of the scale will be newly arrived messages. There are several jobs running, however, we can ignore it until it reaches MaxReplicaCount. That is the ideal behavior. For getting newly arrived message, it should not includes  the number of locked message that means, messages that is already consumed by jobs. However, a lot of implementation of SDKs includes the locked messages as a number of  queueLength. That causes an issue for ScaledJob.
The kind of scalers
a. Some of them can fetch the queueLength as the number of  all messages - locked messages. ideal metrics e.g. Azure Storage Queue.
b. Some of them is not. e.g. Azure Service Bus. It will return queueLength as the number of all messages
We need to adjust two use cases. In case of a, Things is easy, it is ideal metric. We can have one firm scale logic for Scaled Job.
However, in case of b. We need to compromise the scale logic. And it might be very different for each use cases.
I introduce three scaling strategy default, custom , accurate.  For the a. I provide accurate.  For the b. I provide default and custom. If you don't specify anything, it will be default
The logic of three strategies

queueLength: the length of messages on a queue
runningJobCount: the number of running jobs

default
The original logic of ScaledJob. It is default to protect from a breaking change.
queueLength - runingJobCount

custom
You can configure customScalingQueueLengthDeduction and customScalingRunningJobPercentage on the ScaledJob definition. Users can change the parameter based on the default logic.
queueLength - customScalingQueueLengthDeduction - (runningJobCount * customScalingRunningJobPercentage)

However, it doesn't exceed MaxReplicaCount.
accurate
If the scaler returns ideal metrics or, customer delete a message once consumed it, it will be the ideal number of the queue then you can use this strategy.
	if (maxScale + runningJobCount) > maxReplicaCount {
		return maxReplicaCount - runningJobCount
	}
	return queueLength

Example Configuration
apiVersion: keda.sh/v1alpha1
kind: ScaledJob
metadata:
  name: azure-servicebus-queue-consumer
  namespace: default
spec:
  jobTargetRef:
    template:
      spec:
        containers:
        - name: azure-servicebus-queue-receive
          image: tsuyoshiushio/azure-servicebus-queue-client:dev
          imagePullPolicy: Always
          command: ["receive"]
          envFrom:
            - secretRef:
                name: azure-servicebus-queue-secret
        restartPolicy: Never
    backoffLimit: 4
  pollingInterval: 5   # Optional. Default: 30 seconds
  cooldownPeriod: 30   # Optional. Default: 300 seconds
  maxReplicaCount: 100  # Optional. Default: 100
  successfulJobsHistoryLimit: 5
  failedJobsHistoryLimit: 5
  scalingStrategy: "custom"
  customScalingQueueLengthDeduction: 1
  customScalingRunningJobPercentage: "0.5"

Checklist

[x] Commits are signed with Developer Certificate of Origin (DCO)
[x] Tests have been added
[x] A PR is opened to update the documentation on https://github.com/kedacore/keda-docs
[ ] Changelog has been updated

Fixes #
https://github.com/kedacore/keda/discussions/1186
https://github.com/kedacore/keda/discussions/1207
Documentation
https://github.com/kedacore/keda-docs/pull/279

Hi @zroubalik
I accept all your advice.

Hey,
I tried using "accurate" strategy, but because it takes pods lots of time to actually get started and consume the message, every polling_time, the trigger is creating new pods for messages that pods were already created for.
In our case, we use cluster auto scaler and we start with 0 nodes what will make the first few pods to wait a few minutes before even starting and consuming the message but I think there are lots of other situations where pods won't necessarily get started between each poll. Some cap on the number of running pods for example would cause the same issue.
Is that the expected behaviour? Am I missing something here?
If that's the way it works, distinguishing between runningJobs and waitingJobs somehow could help calculating the right amount of new pods to schedule.

@TsuyoshiUshio PTAL

Hi @orsher
The accurate strategy assume that the number of the queue length doesn't include the running job.
It depends on a scaler you choose and the implementation of the job.
For example, some customer using this strategy with ServiceBus. The service bus scaler queue length includes running jobs.
However the customer's job is once consume a message, it will delete from the queue immediately. That is why the expected scale will be queue length. The queue length doesn't include running jobs.
Which scaler do you use? If your scaler's queue length include the number of running jobs, and your job consume a message then do something, after finishing the job, the message is deleted from queue, then you can use default strategy.
If it is not the either case you can use custom strategy.
However, we need to learn more use case, If your use case is not I described, could you share which scaler, and how is your job's message consuming strategy? I'd happy to hear that and reflect it to keda.

Hey @TsuyoshiUshio ,
Sure,
We're using rabbitmq and we're deleting the message right after the message is consumed and only after processing the task itself.
So, according to the docs and what you just described, at least if I got it right, the accurate strategy should be a good fit here.
I'll try to describe our use case and what we are experiencing using an example.
time 0 - a producer sends x messages to rabbitmq
time 1 - KEDA rabbitmq trigger for the first time and schedule x jobs
time 2 - Jobs are waiting for scheduling by Kubernetes, might task some time depending on the current available resources
time 3 - KEDA rabbitmq trigger for the second time and schedule again x jobs because non of the current submitted jobs got schedule and consumed a message
We get much more jobs sent than what we need and it will keep sending some more jobs until there will be available resources for the jobs to actually start running, consume and ack the messages.
I hope that this flow is clear.
Am I missing something here?

I think there is a typo in this documentation that has been confusing me substantially.
in
if (maxScale + runningJobCount) > maxReplicaCount {
	return maxReplicaCount - runningJobCount
}
return queueLength

maxScale and queueLength should be the same thing.
@orsher my plan to deal with that was to increase the poll interval, and write my consumers to shut themselves down if there is no message to consumer. But i agree, it should take into account not-yet-started jobs when calculating the new scale, probably something like
if ((queueLength - scheduledJobCount) + runningJobCount) > maxReplicaCount {
	return maxReplicaCount - runningJobCount
}
return (queueLength - scheduledJobCount)

I see the exact same problem as @orsher using Azure Storage Queues. It is kind of independent of the queue type and strategy used right now, as it is a problem with an inner fast control loop scaling up the number of jobs a lot faster than our outer control loops making resources available (scaling out virtual machines/nodes in our case).
We have already made our jobs do some queue message polling 10 times, then shut down if there are no messages, so the extra jobs are not a big problem from that standpoint.
But since some of our jobs are very resource intensive and long running (which is kinda the point of using Jobs instead of Deployments for us), we have to put some high resource.request values for memory and CPU on our jobs, which in turn makes our nodes exhausted quickly and then requires the cluster autoscaler to respond by starting new machines (may take a minute or two). This in turn makes KEDA scale up more jobs (since the queue is still not drained within our poll interval), which in turn schedules more high-demand jobs, which in turn requests more nodes. At the end, in the worst cases, we have spun up a lot of new nodes that end up running some very simple "poll 10 times thend shut down" job (since there are a lot more jobs than queue messages). So we are starting and stopping a lot of machines as it is now. Also, we then get the problem of scaling down nodes when some of them are doing long running jobs.
There are of course a lot of variables we can tweak, like the polling interval, but we would like to start our long running jobs as fast as possible (i.e. having a short poll interval), and have a design that allows some slower startup only when we have bursty requests.
Taking scheduledJobCount into account would probably solve most of this for us.

Sorry for the inconvenience. I'll have a look However, we should talk in #1323 rather than merged PR.

Hi @orsher
The accurate strategy assume that the number of the queue length doesn't include the running job.
It depends on a scaler you choose and the implementation of the job.
For example, some customer using this strategy with ServiceBus. The service bus scaler queue length includes running jobs.
However the customer's job is once consume a message, it will delete from the queue immediately. That is why the expected scale will be queue length. The queue length doesn't include running jobs.
Which scaler do you use? If your scaler's queue length include the number of running jobs, and your job consume a message then do something, after finishing the job, the message is deleted from queue, then you can use default strategy.
If it is not the either case you can use custom strategy.
However, we need to learn more use case, If your use case is not I described, could you share which scaler, and how is your job's message consuming strategy? I'd happy to hear that and reflect it to keda.

Hey @TsuyoshiUshio,
I am using Azure Queue Storage and from what I understand it gives the count of all messages (invisible/running and visible/non-running). You have mentioned that in such cases we should use 'default' strategy, but the official doc recommends the use of 'accurate' strategy for Azure Queue Storage.
Can you please clarify.


Parse start time from twitch url

@cookpete - Can this PR be merged? It's super simple the changes and its something we really need

Apologies for the delay 👍


[stable/metricbeat] Add required clusterrole permission for kubelet auth

What this PR does / why we need it:
Fixes forbidden issue with kubelet /metrics endpoint (cf. #10000 ):
[root@ip-10-1-6-197 metricbeat]# curl -k -H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" -L https://localhost:10250/metrics
Forbidden (user=system:serviceaccount:kube-system:metricbeat, verb=get, resource=nodes, subresource=metrics)

The error occurred in a daemonSet which is running on an Amazon EKS cluster.
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md

/assign @mumoshu

/assign @at-k

/ok-to-test

/lgtm


Changing default localization give issue

Version information

Laravel: v7.9.2
Voyager: v1.4
PHP: 7.4
Database: Postgresql 12

Description
After changing the language in the multilingual -> default cell in the configurations voyager.php file, the tabs for switching the language stop working correctly when adding and when viewing data in CRUD table.
Steps To Reproduce
Steps to reproduce the behavior:

Add some data on few different language in table which support and realise multilanguage trait.
Check it it work correct.
Go to voyager.php config file and change default language in multilingual field.
Go back in crud table view and try to change language between supported languages this will not work, although the data was entered correctly before.

Additional context
You can watch on video the issue.
https://youtu.be/FJv0HDW4pj8.

It's not a bug it's just how translations work in Voyager.
Let's say you have a BREAD posts with title translatable, default language RU is saved in posts.title while for translation a row in translations is created/updated with table_name posts, locale ru etc.
When you change default to EN you are telling Voyager that what is in posts.title is EN and needs to find RU translation in translations table.
Since there is no translation EN it will fallback to default RU so even when you switch language you will always see RU.
You can verify that is still working going on edit and setting the missing translation.
TLDR
Do not change default language after you already inserted your translations.


Support custom publication types

Hi. How are you inteding to deal with https://github.com/sourcethemes/academic-admin/blob/master/academic/cli.py#L115?
I can try to help!

The publication types have been implemented and just pushed to GitHub and new version released :)
There is still lots of room for improvements, such as with generating the TOML for publication.

Would it make sense to be able to overwrite this behaviour by having, for example, some tag with the publication type in the bibtex?
I have a custom publication type "workshop paper", which cannot be distinguish by checking the ENTRYTYPE.

For custom types, we could consider something like you suggested. For example supporting an optional key-value pair, where academic_item_type is the key, to the BibTeX notes field (appears in Zotero as Extras).
It would be good to get more feedback on this...

Closing this as the issue has gone stale without any contributions. Feel free to contribute a PR that implements your proposal.


asyncqt broken on Python 3.8 + Windows

It seems that asyncqt is not working properly on Python 3.8 + Windows.

I have just been running asyncqt on Python 3.8 + Windows and it seems to work for me.

Could you elaborate on what the issues are? I was hoping to use Python 3.8 and it would be nice to know what the challenges will be.

Works for me with Python 3.8 (Windows version, x64) and Wine 5.21.


Swagger API definition

Hi!
Is it possible to generate and publish Swagger API definition for wix-restaurants-api?
Thanks!

Unfortunately we don't have this at the moment.
We are in the process of creating a much better developer experience for the Wix Restaurants API, and Swagger definitions may be part of it.
We'll keep this issue open for now.

@dleshem Are there any plans to add swagger definition anytime soon?

I'm not sure as I no longer work at Wix, but @alexgask might be able to help.


Can we get documentation on sub-application support in .net core?

It seems that deploying  sub-applications in IIS, with .net core 1.0 are not documented.
Sub-apps are referenced elsewhere in other issues:
https://github.com/aspnet/IISIntegration/issues/190
There's no full working example and no IIS configuration and example code or docs for it yet.  Or if there is, my google-fu is failing me.

Here's where I think that docs might have existed:
https://docs.asp.net/en/latest/publishing/iis.html

Good idea for the sample, and I'll put this on my list for the next Publishing to IIS doc update, which is coming soon.

This issue was moved to aspnet/Docs#1764


"Confirm replace project" dialog has no headings

Bug Description
The dialog you get when opening an example has a header but no h1 / h2 headings which means a screen reader user can't skip to the title with header navigation.

[edit: confusing typo heading/header]

This is likely systemic for dialogs with only one heading and we should look to fix everywhere.


[Bug] Metronome Stops when Scroll on long Notes [0.2.0]

Hello @curtgrimes !!!!
Nice to meet you !
I just wanna introduce myself and say thank you for creating this. A metronome in Obsidian is soothing that I have been dreaming since I start using Obsdian.
When I saw your repo I could believe that it is happening :)
I'm not a musician or anything related but I like to listen to metronome when I want to concentrate for reading, writing, doing math and thinking about something important. Forgive if I say something dumb or if I made a FR that is not fit into your plugin :)

I'm just trying to use metronome into all my Obsidian workflows

Thanks again for making this amazing plugin !!!!!!!!!
My Bug Report
I think I found a minor bug. When I have a note that is long (300/500 lines) the metronome stops working when I scroll to the end of the note.
When I go back to the top (which the metronome is located) its working again :)
Thanks for reading this!
Have a great day!

Hi @FelipeRearden! I'm glad you are enjoying this plugin so far.
You are correct -- this is a bug. This is a consequence of how the metronome timer works, where it only ticks in response to the animationiteration event when the CSS animation does a cycle. If the element isn't visible on the screen, the CSS animation apparently isn't running.  I believe I can fix this by switching to use a more typical setInterval instead. I'll fix this in the next release.

Hello @curtgrimes !!!!
Thanks for the reply :)
Okay! Thanks for trying to "fix" this behavior! I wish the best luck 🍀 🍀 🍀
Have a great day!!!!!!

Hello @curtgrimes !!!!!
Thank you very much !!!!!!!!
Working perfect on version 0.3.0  Obsidian 0.13.14
Have a great day!!!!!


PHP 7.2 - Cannot use 'Object' as class name as it is reserved

PHP 7.2 uses "Object" as typehint (https://wiki.php.net/rfc/object-typehint).

Might as well get rid of the Common namespace since we kinda have to bump the major versiob anyway if we rename the basest of base classes. Everything in Common could be moved to other existing namespaces.

Fixed by #4


Feat toggle

BEGINRELEASENOTES

A toggle switch has been added to switch between a particle's PDG or name
If activated, every loaded particle image is updated using updateTexImg function from js/object.js/InfoBox class.
Then the canvas is re-drawn with the updated particles using drawAll function from js/main.js

ENDRELEASENOTES
This work is related to #11. PR #11 should be merged first. I had to start from there to prevent some merge conflicts.

This looks nice :)
Can you add label text next to the toggle itself?

I have also enabled the possibility to easily rebase this onto the master branch for the repository.

Can you add label text next to the toggle itself?

Sure, I'm going to add this.

The initial label is "Names" but after toggling on/off it is "Name".
I would prefer to have this constant, something like: Show PDG IDs


Fetch and stream 3-phase voltage

Fetch and stream the phase-to-neutral voltage from a source component.
Each phase of the phase-to-neutral voltage is fetched from the source component individually and then streamed as a 3-phase sample.
It was agreed to not use the formula engine to get voltage metrics as resampling is not needed for voltage and voltage is one fetched from only one source component.
Also the phase-to-phase 3-phase voltage is not implemented as in the future the microgrid API will expose that data. The user can still perform a simple calculation to get phase-to-phase voltage given phase-to-neutral voltage.
Fixes #783

The voltage metrics are now retrieved using the resampling actor rather than the data sourcing actor.
Also initial comments from Luca have been addressed

Updated find_first_descendant_component() based on suggestions from Luca:

Documentation updated to explain in more details what the function does and its constrains
Added unit tests
Remove default values

It might be good if @shsms can have a quick look too.

@llucax or @shsms would you mind to re-approve it? The approval is gone as I updated one line in the documentation of a function


tests/intel_adsp/smoke: Revert WAIT_FOR breakage

The evolution of the original WAIT_FOR trick in this test, first to
move it to a generic spot and then to make it take a delay
paramatrization, have had the unfortunate side effect of breaking the
original usage.
And... it's really not following the design intent anyway.  The idea
here was to spin hard waiting on external hardware (a python script
running on the host) to deliver an interrupt.  Both of the new tricks
(suspending the thread with a sleep and hammering the HDA wall clock
for time) can affect interrupt delivery.
Just restore the original implementation (albeit with a new name,
"AWAIT", since the original was stolen) until someone has a chance to
make this work properly with the new API.  There's no reason it can't,
it just doesn't yet.
Fixes #43828
Signed-off-by: Andy Ross<EMAIL_ADDRESS>

This addresses the issue for me, though I'll note that the original bug reported sporadic failures (whereas the version post-regression fails reliably), so it's possible there are other cpu power management timing issues that lurk.  But we should merge this first to be able to see them.
Also note that I'm about to (at least temporarily) lose access to the hardware needed to debug the cAVS platforms.  And even then, my TGL board (a Asus Chromebook) seems reliable for me.

Seems fine to me


add LARGE_BINARY and LARGE_STRING

add LARGE_BINARY and LARGE_STRING to variable sized binary layout, the dispatch and factory functions

Done in #312


Out of the box, be useful without any tooling.

For 0.6.0, I feel users should be able to get started within 30s of downloading us. This means:

The boilerplate will work for basic use-cases without needing any tools at all
We'll ship pre-minified CSS and JS for our new component library. The boilerplate will reference them and you won't need to use tools to generate em.
We'll offer a new browser-based customisation tool letting you theme the components without needing tools at all.
If you absolutely do not want to use tooling, we'll give you an easy way to optimise your assets online using PageSpeed's new images/CSS/JS online optimiser tool.
Sass will be available, but as with other tooling, you'll need to npm install to get it working. However, this won't gate you on building a site with WSK.

In short, I think we need to shift our priority to the non-tooling use case (Bootstrap does this exceptionally well) and nail the first-run experience for everyone :)
More context
The typical life-cycle for new users is that they must install and use the tooling before they can get started with WSK. This was a decision we intentionally made around 0.5.0, but imo it was a poor call given we're targeting the long tail.
Based on experience in the field, requiring tooling installation is resulting in a large number of users getting stuck debugging issues with npm dependencies for ~60m before getting it right (literally getting emails everyday about this).
I wish I could say this was just beginners, but several users who are comfortable using npm for JS-only projects have also been reporting issues w/setup including:

node-sass exceptions on their platform of choice (some tackled by the V3 alpha). This means they can't even 'serve' to get started.
Can't build/serve as imageoptim fails them on Linux. They end up having to switch to older binaries and lots of getting in the weeds.
npm versioning - I've had to tell many to use npm@next rather than stable for reasons too long to go into here.

cc @google/web-starter-kit in case I'm way off base here.

This. Thank you!
On Sat, 21 Mar 2015 17:24 Addy Osmani<EMAIL_ADDRESS>wrote:

The typical life-cycle for new users is that they must install and use the
tooling before they can get started with WSK. This was a decision we
intentionally made around 0.5.0, but imo it was a poor call given we're
targeting the long tail.
Based on experience in the field, requiring tooling installation is
resulting in a large number of users getting stuck debugging issues with
npm dependencies for ~60m before getting it right (literally getting emails
everyday about this).
I wish I could say this was just beginners, but several users who are
comfortable using npm for JS-only projects have also been reporting issues
w/setup including:

node-sass exceptions on their platform of choice (some tackled by
the V3 alpha). This means they can't even 'serve' to get started.
Can't build/serve as imageoptim fails them on Linux. They end up
having to switch to older binaries and lots of getting in the weeds.
npm versioning - I've had to tell many to use npm@next rather than
stable for reasons too long to go into here.

For 0.6.0, WSK users should be able to get started within 30s of
downloading the kit. This means:

The boilerplate will work for basic use-cases without needing any
tools at all
We'll ship pre-minified CSS and JS for our new component library.
The boilerplate will reference them and you won't need to use tools to
generate em.
We'll offer a new browser-based customisation tool letting you theme
the components without needing tools at all.
If you absolutely do not want to use tooling, we'll give you an easy
way to optimise your assets online using PageSpeed's new images/CSS/JS
online optimiser tool.
Sass will be available, but as with other tooling, you'll need to npm
install to get it working. However, this won't gate you on building a
site with WSK.

In short, I think we need to shift our priority to the non-tooling use
case (Bootstrap does this exceptionally well) and nail the first-run
experience for everyone.
—
Reply to this email directly or view it on GitHub
https://github.com/google/web-starter-kit/issues/660.

+1 for OOB Support ... Having a default build is a great way to support those who want to get up and running with a vanilla GWS install.
Though off-topic, in comparison, the Spring Team launched Spring Boot to address this very concern and realized a huge increase at the entry-level adoption rate...

Sounds awesome

+1

:+1:

I'm on board but I also think you can end up overcorrecting.
We don't want to lose these users to the old ways completely, so lets be mindful of how we can slowly and iteratively evolve their setup to introduce tools when possible. Using the online PSI optimizer tool is a good example, and I wonder where else we can have lure users with this sorta feeling: "Getting tired doing ____ each and every time? Try out ___".
I'm not sure how that manifests but we should consider how to onramp them after they've already missed the exit. :)

I wish I could :-1: this, but it's very true.
The main problem is broken tools and broken systems. npm has been unstable as long as I can remember and with all the promise of the new versions I still keep getting more and more issues on my repos about npm install problems. Node-sass breaks a lot, both for being a native dependency (so if prebuilt binaries aren't available it requires compiling and the required tools for doing so), and for being buggy. When new Node/io versions comes out there's a good chance they'll need to create new pre-built node-sass binaries for all the platforms, this takes time, which makes it break for early adopters. Imagemin also requires compiling if the pre-built binaries doesn't work, which happens a lot on Linux where it's close to impossible to make an universally usable pre-compiled binary. That's the main reason for it failing. But the biggest problem tbh is user systems. Most users never upgrade anything, leaving them with old and buggy npm (and node) versions which constantly corrupts the cache and the installed modules. There's also the fact that a lot of users have broken their systems by having screwed up their permissions.
This creates a bad experience for both the developer and the users. No clear path to resolve this though...

:+1: Maybe we could split this one into two. One is vanilla and the other is with tooling and using the vanilla as template.

:+1:  especially for people "testing" wsk. better first impression overall

As of master, you can now just cd into the app directory and run any server to preview the local version of WSK without any tooling.


Does metric have to return bool?

I am thinking about writing a program for a "batch processing" task, i.e., each call to the program, there will be a list of inputs, and the output is a corresponding list for the inputs. To optimize such a program, a natural metric would be something like "out of the 20 inputs, how many of them are correctly answered?".
I think in this case, I probably need a numerical metric instead of bool metric. Is that right? If so, do you think it is good to extend metric for this?
Thanks!

I was reading https://github.com/stanfordnlp/dspy/blob/main/dspy/teleprompt/bootstrap.py#L145 and it seems to suggest that the metric is treated as a bool anyway. Did I miss anything?
Thanks!

Yeah this only affects how few shot examples are created. It doesn’t affect anything else!

@okhat  can you elaborate a bit on this please? "Yeah this only affects how few shot examples are created. "
Let's say I have a metric that returns values from 1 to 10. 1 being low similarity and 10 being high.
Can I incorporate this somehow as a metric? or do I need to threshold my score somehow and return a bool ?

Sorry I'm adding material about this to the docs.
There's a couple of examples of this, here's one: https://github.com/stanfordnlp/dspy/blob/main/examples/tweets/tweet_metric.py
def metric(gold, pred, trace=None):
    question, answer, tweet = gold.question, gold.answer, pred.output
    context = retrieve(question).passages

    engaging = "Does the assessed text make for a self-contained, engaging tweet?"
    faithful = "Is the assessed text grounded in the context? Say no if it includes significant facts not in the context."
    correct = f"The text above is should answer `{question}`. The gold answer is `{answer}`."
    correct = f"{correct} Does the assessed text above contain the gold answer?"

    with dspy.context(lm=gpt4T):
        faithful = dspy.Predict(Assess)(context=context, assessed_text=tweet, assessment_question=faithful)
        correct =  dspy.Predict(Assess)(context='N/A', assessed_text=tweet, assessment_question=correct)
        engaging = dspy.Predict(Assess)(context='N/A', assessed_text=tweet, assessment_question=engaging)

    correct, engaging, faithful = [m.assessment_answer.lower() == 'yes' for m in [correct, engaging, faithful]]
    score = (correct + engaging + faithful) if correct and (len(tweet) <= 280) else 0

    if trace is not None: return score >= 3
    return score / 3.0

The last two lines are what matters.
Basically:

If trace is None (i.e., if we're not creating few-shot examples), it returns a float, in this case score / 3.0. It doesn't have to be out between 0.0 and 1.0 but it's nice for your own sanity. This is a float because, during optimization or evaluation, we want to find the average score overall.
Otherwise (i.e., if we are creating few-shot examples), it returns a bool with a threshold (score >= 3). This is a bool because we need to know whether or not this example is, ultimately, worthy of using as a demonstration.

Does this make sense?

Thanks for the quick and detailed reply!
It doesn't make complete sense to me yet, but I think I get the essence of it.
I just have to get comfortable with the library and the paradigm a bit more. Thank you so much for the great work!
This library is really what I was looking for.


Do not call free lpszText immediately since it is refered asynchronously

Codecov Report

Merging #3725 into master will decrease coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3725      +/-   ##
==========================================
- Coverage   78.23%   78.23%   -0.01%
==========================================
  Files         101      101
  Lines      141009   141009
==========================================
- Hits       110324   110315       -9
- Misses      30685    30694       +9

Impacted Files
Coverage Δ

src/gui_gtk_x11.c
48.28% <0%> (-0.3%)
:arrow_down:

src/gui.c
57.83% <0%> (-0.26%)
:arrow_down:

src/ui.c
47.29% <0%> (-0.08%)
:arrow_down:

src/terminal.c
74.36% <0%> (-0.05%)
:arrow_down:

src/channel.c
83.28% <0%> (+0.07%)
:arrow_up:

src/if_xcmdsrv.c
84.17% <0%> (+0.35%)
:arrow_up:

Continue to review full report at Codecov.

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