text:
[2.7.0-beta.2] _interopRequireDefault3 is not a function

Describe the bug
I attempted to update from vite 2.6.x to 2.7.0 beta, and my tests began to fail with:
TypeError: _interopRequireDefault3 is not a function
        at node_modules/@testing-library/jest-dom/dist/utils.js (node_modules/.cache/vite/@testing-library_jest-dom.js:3794:19)
        at __require2 (node_modules/.cache/vite/chunk-UC7LELEO.js:48:44)
        at node_modules/@testing-library/jest-dom/dist/to-be-in-the-dom.js (node_modules/.cache/vite/@testing-library_jest-dom.js:3971:18)
        at __require2 (node_modules/.cache/vite/chunk-UC7LELEO.js:48:44)
        at node_modules/@testing-library/jest-dom/dist/matchers.js (node_modules/.cache/vite/@testing-library_jest-dom.js:15699:25)
        at __require2 (node_modules/.cache/vite/chunk-UC7LELEO.js:48:44)
        at node_modules/@testing-library/jest-dom/dist/extend-expect.js (node_modules/.cache/vite/@testing-library_jest-dom.js:15730:46)
        at __require2 (node_modules/.cache/vite/chunk-UC7LELEO.js:48:44)
        at node_modules/@testing-library/jest-dom/dist/index.js (node_modules/.cache/vite/@testing-library_jest-dom.js:15777:5)
        at __require2 (node_modules/.cache/vite/chunk-UC7LELEO.js:48:44)

I traced this down to starting in beta.2.
Reproduction
https://stackblitz.com/edit/vite-a7kdqq?file=package.json
Note, you'll get an error in the console.  If you change vite to use 2.7.0-beta.1 and re-install / restart, the app will load up as normal.
System Info
System:
    OS: macOS 11.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 2.74 GB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.4.0 - ~/.nvm/versions/node/v16.4.0/bin/node
    Yarn: 1.22.15 - ~/.yarn/bin/yarn
    npm: 8.1.3 - ~/.nvm/versions/node/v16.4.0/bin/npm
  Browsers:
    Brave Browser: 95.1.31.91
    Firefox: 94.0.1
    Safari: 15.0
  npmPackages:
    @vitejs/plugin-react: ^1.1.0 => 1.1.0
    vite: ^2.7.0-beta.2 => 2.7.0-beta.2

Used Package Manager
npm
Logs
❯ npm run dev -- --debug
$ vite --debug
  vite:config bundled config file loaded in 233.10ms +0ms
  vite:config using resolved config: {
  vite:config   optimizeDeps: {
  vite:config     include: [ '@testing-library/jest-dom', 'expect' ],
  vite:config     esbuildOptions: { keepNames: undefined, preserveSymlinks: undefined }
  vite:config   },
  vite:config   define: {
  vite:config     'process.env': {
  vite:config       COLORTERM: 'truecolor',
  vite:config       TERM: 'xterm-256color',
  vite:config       LSCOLORS: 'ExGxBxDxCxEgEdxbxgExEx',
  vite:config       PATH: '/home/projects/vite-a7kdqq/node_modules/.bin:/home/projects/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/bin:/usr/bin:/usr/local/bin',
  vite:config       HOME: '/home',
  vite:config       SHELL: '/bin/jsh',
  vite:config       HISTFILE: '/home/.jsh_history',
  vite:config       TMPDIR: '/tmp',
  vite:config       CHROME_BIN: '/usr/local/bin/google-chrome',
  vite:config       NEXT_TELEMETRY_DISABLED: '1',
  vite:config       ESBUILD_WORKER_THREADS: '0',
  vite:config       PKG_MANAGER: 'npm',
  vite:config       DEBUG: 'vite:*'
  vite:config     }
  vite:config   },
  vite:config   server: { fs: { strict: true, allow: [Array], deny: [Array] } },
  vite:config   configFile: '/home/projects/vite-a7kdqq/vite.config.js',
  vite:config   configFileDependencies: [ 'vite.config.js' ],
  vite:config   inlineConfig: {
  vite:config     root: undefined,
  vite:config     base: undefined,
  vite:config     mode: undefined,
  vite:config     configFile: undefined,
  vite:config     logLevel: undefined,
  vite:config     clearScreen: undefined,
  vite:config     server: { fs: [Object] }
  vite:config   },
  vite:config   root: '/home/projects/vite-a7kdqq',
  vite:config   base: '/',
  vite:config   resolve: { dedupe: undefined, alias: [ [Object], [Object] ] },
  vite:config   publicDir: '/home/projects/vite-a7kdqq/public',
  vite:config   cacheDir: '/home/projects/vite-a7kdqq/node_modules/.vite',
  vite:config   command: 'serve',
  vite:config   mode: 'development',
  vite:config   isProduction: false,
  vite:config   plugins: [
  vite:config     'vite:pre-alias',
  vite:config     'alias',
  vite:config     'vite:modulepreload-polyfill',
  vite:config     'vite:resolve',
  vite:config     'vite:html-inline-script-proxy',
  vite:config     'vite:css',
  vite:config     'vite:esbuild',
  vite:config     'vite:json',
  vite:config     'vite:wasm',
  vite:config     'vite:worker',
  vite:config     'vite:asset',
  vite:config     'vite:define',
  vite:config     'vite:css-post',
  vite:config     'vite:client-inject',
  vite:config     'vite:import-analysis'
  vite:config   ],
  vite:config   build: {
  vite:config     target: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
  vite:config     polyfillModulePreload: true,
  vite:config     outDir: 'dist',
  vite:config     assetsDir: 'assets',
  vite:config     assetsInlineLimit: 4096,
  vite:config     cssCodeSplit: true,
  vite:config     cssTarget: [ 'es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1' ],
  vite:config     sourcemap: false,
  vite:config     rollupOptions: {},
  vite:config     minify: 'esbuild',
  vite:config     terserOptions: {},
  vite:config     write: true,
  vite:config     emptyOutDir: null,
  vite:config     manifest: false,
  vite:config     lib: false,
  vite:config     ssr: false,
  vite:config     ssrManifest: false,
  vite:config     reportCompressedSize: true,
  vite:config     chunkSizeWarningLimit: 500,
  vite:config     watch: null,
  vite:config     commonjsOptions: { include: [Array], extensions: [Array] },
  vite:config     dynamicImportVarsOptions: { warnOnError: true, exclude: [Array] }
  vite:config   },
  vite:config   preview: {
  vite:config     port: undefined,
  vite:config     strictPort: undefined,
  vite:config     host: undefined,
  vite:config     https: undefined,
  vite:config     open: undefined,
  vite:config     proxy: undefined,
  vite:config     cors: undefined
  vite:config   },
  vite:config   env: { BASE_URL: '/', MODE: 'development', DEV: true, PROD: false },
  vite:config   assetsInclude: [Function: assetsInclude],
  vite:config   logger: {
  vite:config     hasWarned: false,
  vite:config     info: [Function: info],
  vite:config     warn: [Function: warn],
  vite:config     warnOnce: [Function: warnOnce],
  vite:config     error: [Function: error],
  vite:config     clearScreen: [Function: clearScreen],
  vite:config     hasErrorLogged: [Function: hasErrorLogged]
  vite:config   },
  vite:config   createResolver: [Function: createResolver]
  vite:config } +5ms
  vite:deps Hash is consistent. Skipping. Use --force to override. +0ms

  vite v2.7.0-beta.2 dev server running at:

  > Local: http://localhost:3000/
  > Network: use `--host` to expose

  ready in 444ms.

  vite:spa-fallback Not rewriting GET / because the client did not send an HTTP accept header. +0ms
  vite:time 2.70ms / +0ms
  vite:spa-fallback Rewriting GET / to /index.html +429ms
  vite:time 21.50ms /index.html +449ms
  vite:resolve 3.00ms /@vite/client -> /home/projects/vite-a7kdqq/node_modules/vite/dist/client/client.mjs +0ms
  vite:resolve 0.70ms /main.js -> /home/projects/vite-a7kdqq/main.js +6ms
  vite:load 1.40ms [fs] /main.js +0ms
  vite:load 7.30ms [fs] /@vite/client +1ms
  vite:resolve 1.00ms ./expect-setup -> /home/projects/vite-a7kdqq/expect-setup.js +11ms
  vite:resolve 3.40ms /expect-setup.js -> /home/projects/vite-a7kdqq/expect-setup.js +3ms
  vite:resolve 0.00ms @testing-library/jest-dom -> /home/projects/vite-a7kdqq/node_modules/.vite/@testing-library_jest-dom.js?v=173e7619&es-interop +2ms
  vite:resolve 2.50ms @vite/env -> /home/projects/vite-a7kdqq/node_modules/vite/dist/client/env.mjs +0ms
  vite:resolve 1.00ms /node_modules/.vite/@testing-library_jest-dom.js?v=173e7619&es-interop -> /home/projects/vite-a7kdqq/node_modules/.vite/@testing-library_jest-dom.js?v=173e7619&es-interop +1ms
  vite:resolve 1.20ms /node_modules/vite/dist/client/env.mjs -> /home/projects/vite-a7kdqq/node_modules/vite/dist/client/env.mjs +1ms
  vite:resolve 1.00ms ./style.css -> /home/projects/vite-a7kdqq/style.css +3ms
  vite:import-analysis 10.20ms [1 imports rewritten] node_modules/vite/dist/client/client.mjs +0ms
  vite:resolve 0.90ms /style.css -> /home/projects/vite-a7kdqq/style.css +1ms
  vite:transform 13.10ms /@vite/client +0ms
  vite:time 47.60ms /@vite/client +63ms
  vite:resolve 0.50ms /node_modules/.vite/@testing-library_jest-dom.js?v=173e7619 -> /home/projects/vite-a7kdqq/node_modules/.vite/@testing-library_jest-dom.js?v=173e7619 +21ms
  vite:import-analysis 35.90ms [3 imports rewritten] main.js +24ms
  vite:transform 40.90ms /main.js +22ms
  vite:time 47.80ms /main.js +9ms
  vite:load 9.80ms [fs] /node_modules/vite/dist/client/env.mjs +50ms
  vite:load 4.50ms [fs] /expect-setup.js +0ms
  vite:load 4.80ms [fs] /style.css +0ms
  vite:import-analysis 1.30ms [no imports] node_modules/vite/dist/client/env.mjs +14ms
  vite:resolve 0.10ms expect -> /home/projects/vite-a7kdqq/node_modules/.vite/expect.js?v=173e7619&es-interop +16ms
  vite:transform 4.50ms /node_modules/vite/dist/client/env.mjs +15ms
  vite:resolve 0.50ms /node_modules/.vite/expect.js?v=173e7619&es-interop -> /home/projects/vite-a7kdqq/node_modules/.vite/expect.js?v=173e7619&es-interop +2ms
  vite:resolve 0.60ms /node_modules/.vite/expect.js?v=173e7619 -> /home/projects/vite-a7kdqq/node_modules/.vite/expect.js?v=173e7619 +2ms
  vite:import-analysis 5.60ms [1 imports rewritten] expect-setup.js +4ms
  vite:transform 8.50ms /expect-setup.js +4ms
  vite:load 19.40ms [fs] /node_modules/.vite/@testing-library_jest-dom.js?v=173e7619 +15ms
  vite:resolve 0.40ms ./chunk-XMM2ENDR.js -> /home/projects/vite-a7kdqq/node_modules/.vite/chunk-XMM2ENDR.js +20ms
  vite:resolve 0.50ms /node_modules/.vite/chunk-XMM2ENDR.js?v=173e7619 -> /home/projects/vite-a7kdqq/node_modules/.vite/chunk-XMM2ENDR.js?v=173e7619 +2ms
  vite:import-analysis 13.60ms [1 imports rewritten] node_modules/.vite/@testing-library_jest-dom.js?v=173e7619 +27ms
  vite:transform 14.50ms /node_modules/.vite/@testing-library_jest-dom.js?v=173e7619 +27ms
  vite:load 3.30ms [fs] /node_modules/.vite/chunk-XMM2ENDR.js?v=173e7619 +50ms
  vite:import-analysis 0.60ms [no imports] node_modules/.vite/chunk-XMM2ENDR.js?v=173e7619 +31ms
  vite:transform 1.40ms /node_modules/.vite/chunk-XMM2ENDR.js?v=173e7619 +30ms
  vite:hmr [self-accepts] style.css +0ms
  vite:import-analysis 0.50ms [0 imports rewritten] style.css +9ms
  vite:transform 75.00ms /style.css +9ms
  vite:load 65.70ms [fs] /node_modules/.vite/expect.js?v=173e7619 +13ms
  vite:import-analysis 10.20ms [1 imports rewritten] node_modules/.vite/expect.js?v=173e7619 +21ms
  vite:transform 10.90ms /node_modules/.vite/expect.js?v=173e7619 +22ms
  vite:cache [memory] /node_modules/.vite/chunk-XMM2ENDR.js?v=173e7619 +0ms
  vite:cache [memory] /node_modules/vite/dist/client/env.mjs +2ms
  vite:time 1.70ms /node_modules/vite/dist/client/env.mjs +129ms
  vite:cache [memory] /expect-setup.js +6ms
  vite:cache [memory] /node_modules/.vite/@testing-library_jest-dom.js?v=173e7619 +0ms
  vite:cache [memory] /style.css +0ms
  vite:time 3.60ms /expect-setup.js +5ms
  vite:time 68.90ms /node_modules/.vite/@testing-library_jest-dom.js?v=173e7619 +67ms
  vite:time 147.50ms /style.css +79ms
  vite:cache [memory] /node_modules/.vite/expect.js?v=173e7619 +158ms
  vite:time 54.80ms /node_modules/.vite/expect.js?v=173e7619 +66ms
  vite:cache [memory] /node_modules/.vite/chunk-XMM2ENDR.js?v=173e7619 +243ms
  vite:time 5.30ms /node_modules/.vite/chunk-XMM2ENDR.js?v=173e7619 +193ms

### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitejs/vite/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitejs.dev/guide).
- [X] Check that there isn't [already an issue](https://github.com/vitejs/vite/issues) that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vitejs.dev/).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

@sodatea I tracked the regression to https://github.com/vitejs/vite/pull/5510. Looks like without this change, @testing-library/jest-dom/dist/utils.js interop is using commonjs helpers, and with it, it switches to broken esm helpers.
I see that this PR removed the use of requireOptions here. Maybe the logic to compute the options isn't right?

@patak-js fixed in https://github.com/vitejs/vite/pull/5872

authors: IanVS patak-js sodatea


text:
fix(npmrc): remove a extra setting

Description

In the version of pnpm currently in use, The default setting of strict-peer-dependencies was false.
Therefore, this setting is no longer necessary.
I would like to see the configuration sorted out and a little performance improvement.
Additional context

What is the purpose of this pull request?

[ ] Bug fix
[ ] New Feature
[ ] Documentation update
[X] Other

Before submitting the PR, please make sure you do the following

[X] Read the Contributing Guidelines, especially the Pull Request Guidelines.
[X] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[X] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
[X] Update the corresponding documentation if needed.
[ X Ideally, include relevant tests that fail without this PR but pass with it.

The port that my PR was going to use is occupied by other PRs...
Is this understanding correct?
⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  playground/ssr/__tests__/ssr.spec.ts > should restart ssr
AssertionError: expected [ …(3) ] to not deeply equal ArrayContaining{ …(3) }

- Expected
+ Received

- ArrayContaining [
-   StringMatching /error/,
+ Array [
+   "playground-temp/ssr/vite.config.ts changed, restarting server...",
+   "server restarted.",
+   "WebSocket server error: Port is already in use",
  ]

 ❯ playground/ssr/__tests__/ssr.spec.ts:27:28
     25|       expect.arrayContaining([expect.stringMatching('server restarted'…
     26|     )
     27|     expect(serverLogs).not.toEqual(
       |                            ^
     28|       expect.arrayContaining([expect.stringMatching('error')]),
     29|     )
 ❯ Module.withRetry playground/test-utils.ts:232:9
 ❯ playground/ssr/__tests__/ssr.spec.ts:23:3

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯

source: gharchive/pull-request

repo: vitejs/vite

license: MIT

license_type: permissive

license_source: github-api


text:
Typescript build failes due to chai default export

Describe the bug
When running tsc, the build fails due to the typing issue inside Vitest:
node_modules/vitest/dist/index.d.ts:5:18 - error TS2305: Module '"chai"' has no exported member 'default'.

5 export { assert, default as chai, should } from 'chai';

Reproduction
Repo: https://github.com/Destiner/vitest-ts
Action run result: https://github.com/Destiner/vitest-ts/runs/4895155132
System Info
System:
    OS: macOS 11.6
    CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
    Memory: 53.82 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.11.1 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 8.0.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 97.0.4692.99
    Firefox: 95.0.2
    Safari: 15.0

Used Package Manager
npm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

I know there was another issue related to that (#510), I'm opening a new one since the old one was closed by the author, and I believe the issue still persists.

I have debugged a similar issue and it seems that it only fails for the first time, and works with subsequent runs.
The reason is that at first run of tests, Vite discovers new node_modules (chai, etc) and starts bundling them, but for some reason tests still get executed with unconverted packages to es6 modules.
Workaround is to tell Vite to pre-bundle test packages:
  optimizeDeps: {
    include: isTest ? ['@testing-library/svelte', 'chai', 'sinon', 'sinon-chai'] : undefined
  },

Then tests work also on the first run

Fixed by upgrading to 0.3.4 and setting compilerOptions.esModuleInterop to true in tsconfig.json.

I'm still getting this

Try passing "--skipLibCheck" to tsc

source: gharchive/issue

authors: Destiner cbxp o-az sheremet-va

repo: vitest-dev/vitest


text:
How can I create a unique constraint on a skeleton over multiple bones?

I have these bones in a Skeleton:

name = StringBone(
)

module = SelectBone(
    values=lambda: {name: name for name in ModuleConf.MODULES},
)

Now I want to ensure there's at least one skeleton per permutation of the values:
for example
{name: "foo", module: "file", other_bone:"abc"}  # id: 1
{name: "bar", module: "file", other_bone:"456"}  # id: 2
{name: "foo", module: "user", other_bone:"abc"}  # id: 3
{name: "bar", module: "user", other_bone:"abc"}  # id: 4

can exist together.
But you should not able to add
{name: "foo", module: "file", other_bone: "def"}  # id: 5

because there's already an entry (ìd: 1) with {name: "foo", module: "file"}.
I tried to create a composition of these bones with a compute bone.
    unique_lock = StringBone(
        compute=Compute(lambda skel: f'{skel["module"]}_{skel["name"]}',
                        interval=ComputeInterval(ComputeMethod.OnWrite)),
        visible=False,
        unique=UniqueValue(UniqueLockMethod.SameValue, False, "Value already taken"),
    )

But this doesn't cause a client-error in fromClient and fails only in the skeleton toDB transaction:
  File "/.../lib/python3.11/site-packages/viur/core/skeleton.py", line 1029, in __txn_update
    raise ValueError(
ValueError: The unique value 'file_foo' of bone 'unique_lock' has been recently claimed!

Does anyone has an idea how I can simplify this / enforce a client error?

Maybe we can check this in getUniquePropertyIndexValues like:
    def getUniquePropertyIndexValues(self, skel: 'viur.core.skeleton.SkeletonInstance', name: str) -> list[str]:
        val = skel[name]
        if self.compute:
            match self.compute.interval.method:
                case ComputeMethod.OnWrite:
                    val = self._compute(skel, name)

                case ComputeMethod.Lifetime:
                    now = utils.utcNow()

                    last_update = \
                        skel.accessedValues.get(f"_viur_compute_{name}_") \
                        or skel.dbEntity.get(f"_viur_compute_{name}_")

                    if not last_update or last_update + self.compute.interval.lifetime < now:
                        val = self._compute(skel, name)

                case ComputeMethod.Once:
                    if name not in skel.dbEntity:
                        val = self._compute(skel, name)

        if val is None:
            return []
        return self._hashValueForUniquePropertyIndex(val)

authors: ArneGudermann sveneberth

repo: viur-framework/viur-core


text:
Unable to make gym environment

Hi,
I am receiving an error when I try to make your gym environment in gym-0.10.9.  Any ideas how I can fix this?
[GCC 8.2.1 20180831] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gym
>>> import snake_gym
>>> env = gym.make('snake-v0')
/usr/lib/python3.6/site-packages/gym/envs/registration.py:14: PkgResourcesDeprecationWarning: Parameters to load are deprecated.  Call .resolve and .require separately.
  result = entry_point.load(False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/gym/envs/registration.py", line 167, in make
    return registry.make(id)
  File "/usr/lib/python3.6/site-packages/gym/envs/registration.py", line 119, in make
    env = spec.make()
  File "/usr/lib/python3.6/site-packages/gym/envs/registration.py", line 85, in make
    cls = load(self._entry_point)
  File "/usr/lib/python3.6/site-packages/gym/envs/registration.py", line 14, in load
    result = entry_point.load(False)
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2346, in load
    return self.resolve()
  File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2352, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'snake_gym.envs'

I believe I fixed it, try it now!

I have the same problem

authors: ForrestCKoch JaQtae vivek3141


text:
Stable layout

I added a maximum height for the class of file-or-directory.

Thanks for this! However, as I worked through some other styling issues, I realized that setting the height like this not ideal, because then the height does not flow naturally from the content, which I would prefer it did so that we can get things like padding more consistent.
If you don't mind, can you please try working towards a solution that modifies the style of the input field?
This state is fine and can remain the same:

This is the state we need to work on:

It shouold be possible to fix it with only CSS changes that apply to the input field. You may want to disable the rename functionality for testing, so that you can get the input field to appear and not go away as you tweak the CSS. Good luck!

authors: CJary curran

repo: vizhub-core/vzcode


text:
Color rework

This makes the old Color functions constants and adds the simple Material Colors from https://materialui.co/colors/ (simple = except A***)

This is not really the way I'd like to go with vizia for now, but I think material colors could be added through a trait as a separate crate on top of vizia.

repo: vizia/vizia


text:
Обновление версии pydantic для vkbottle

Описание
В одном из моих проектов, используется одновременно 2 фреймворка которые требуют pydantic, однако тут возникает конфликт версий между ними, я бы хотел поинтересоваться, планируется ли переход на новые версии pydantic (2.4.2+) если да, то можно ли помочь отправив ПР, если нет то почему?
Заранее спасибо за ответ
Пример кода
No response

#758

repo: vkbottle/vkbottle


text:
[CLOSES #285][CLOSES #286]

It is now possible to use insertRow/insertColumn on empty matrices.
It is now possible to use insertRow/insertColumn to add row/column at the end of matrices.

Any more remarks?

LGTM! Thanks @csavelief!

authors: csavelief vkostyukov

license_source: bigquery


text:
X64

http://www.c-jump.com/CIS77/CPU/x86/lecture.html#X77_0010_real_encoding
https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2a-manual.pdf
В руководстве Intel опкоды инструкций в этом разделе:
APPENDIX B: INSTRUCTION FORMATS AND ENCODINGS
B.2 GENERAL-PURPOSE INSTRUCTION FORMATS AND ENCODINGS FOR NON-64-BIT MODES
А проверяем правильность кодировки здесь:
https://defuse.ca/online-x86-assembler.htm#disassembly

Table 2-2. 32-Bit Addressing Forms with the ModR/M Byte


text:
Project failing to build as soon as implementation("com.vladmihalcea:hibernate-types-60:2.21.1") is added

hello,
I have need to parse json and I as soon as I have put the implementation("com.vladmihalcea:hibernate-types-60:2.21.1") in my dependencies:
dependencies {
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
implementation("org.postgresql:postgresql:42.7.2")
implementation("com.vladmihalcea:hibernate-types-60:2.21.1")
implementation("javax.xml.bind:jaxb-api:2.3.0")
}
I receive the following error message:
 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is java.lang.IllegalArgumentException: Expecting BasicPluralJavaType for array class `[Ljava.lang.String;`, but got `com.vladmihalcea.hibernate.type.array.internal.StringArrayTypeDescriptor@574f9e36`
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1773)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:521)

You need to migrate to version 3, as explained in the README.

Thanks it helped building with success, however now I am facing another issue, I have created a simpler version of my problem which I explain here:
my entity class is as follows:
@Entity
@Table(name = "WM")
data class WMEntity(
  @Id
  @Column(name = "id")
  val id: Int?,

  @Type(JsonType::class)
  @Column(name = "js", columnDefinition = "jsonb")
  val wm: WM?
)
{
  constructor() : this(0,null)
}

which represents the table in database that I have and the WM data class simply looks like:
data class WM(
  val js: Map<String, Int>
): Serializable

however when querying this I get:
Caused by: java.lang.IllegalArgumentException: The given string value: {"str": 1} cannot be transformed to Json object

however, if I replace the WM? type with Any?in the entity class it will work. but in my scenario cant do this because I have nested types to query. any ideas on what am I missing?

The project is not tested with Kotlin, so there's no guarantee it will work. If it does work, it's by  chance.
The project integration tests will show you the mappings and data access logic you can use, with Java, of course.

authors: BardiaRo vladmihalcea

repo: vladmihalcea/hypersistence-utils


text:
VLS crashes vscode on creating new line

System Information
V doctor
OS: linux, Ubuntu 20.04.3 LTS (WSL 2)
Processor: 16 cpus, 64bit, little endian, AMD Ryzen 7 5800X 8-Core Processor
CC version: cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

getwd: /mnt/c/Users/user/AppData/Local/Programs/Microsoft VS Code
vmodules: /home/user/.vmodules
vroot: /home/user/testing/v
vexe: /home/user/testing/v/v
vexe mtime: 2022-04-15 19:57:39
is vroot writable: true
is vmodules writable: true
V full version: V 0.2.4 4a71b27

Git version: git version 2.25.1
Git vroot status: weekly.2022.15-58-g4a71b27c
.git/config present: true
thirdparty/tcc status: thirdparty-linux-amd64 3654d6a8

VLS info
vls version: 0.0.1.
vls server arguments: --child --timeout 15

Problem Description
When starting the VLS server it runs normaly. However, when I start ending a source file, add a newline, enter, write code. I get the following error.
Expected Output
VLS runs without crashing.
Actual Output
signal 11: segmentation fault
| 0x55e0311af62e | /home/user/.vls/bin/vls(+0x7162e)
| 0x55e03119cba4 | /home/user/.vls/bin/vls(+0x5eba4)
| 0x55e03117b441 | /home/user/.vls/bin/vls(+0x3d441)
| 0x55e0311746f6 | /home/user/.vls/bin/vls(+0x366f6)
| 0x55e0311dac52 | /home/user/.vls/bin/vls(+0x9cc52)
| 0x7fab9114a609 | /lib/x86_64-linux-gnu/libpthread.so.0(+0x9609)
| 0x7fab91071293 | /lib/x86_64-linux-gnu/libc.so.6(clone+0x43)

Steps to Reproduce
I am using ubuntu on  WSL2 on windows 11 PRO build Version 10.0.22000 Build 22000
Last Recorded LSP Requests
Request
[2022-04-15 20:52:40] {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":3574,"clientInfo":{"name":"Visual Studio Code","version":"1.66.2"},"locale":"en","rootPath":"/home/user/testing/v-testing","rootUri":"file:///home/user/testing/v-testing","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"changeAnnotationSupport":{"groupsOnLabel":true}},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"codeLens":{"refreshSupport":true},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true,"semanticTokens":{"refreshSupport":true},"fileOperations":{"dynamicRegistration":true,"didCreate":true,"didRename":true,"didDelete":true,"willCreate":true,"willRename":true,"willDelete":true}},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]},"codeDescriptionSupport":true,"dataSupport":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"insertTextModeSupport":{"valueSet":[1,2]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true},"activeParameterSupport":true},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true,"tagSupport":{"valueSet":[1]},"labelSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"disabledSupport":true,"dataSupport":true,"resolveSupport":{"properties":["edit"]},"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"honorsChangeAnnotations":false},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1,"honorsChangeAnnotations":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":["relative"],"requests":{"range":true,"full":{"delta":true}},"multilineTokenSupport":false,"overlappingTokenSupport":false},"linkedEditingRange":{"dynamicRegistration":true}},"window":{"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"showDocument":{"support":true},"workDoneProgress":true},"general":{"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"markdown":{"parser":"marked","version":"1.1.0"}}},"trace":"off","workspaceFolders":[{"uri":"file:///home/user/testing/v-testing","name":"v-testing"}]}}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","method":"initialized","params":{}}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/user/testing/v-testing/blog/blog.v","languageId":"v","version":457,"text":"module main\n\nimport vweb\nimport time\n\nstruct App {\n\tvweb.Context\n}\n\nfn main() {\n\n\tapp := App{}\n\n\tvweb.run(app, 8081)\n}\n\npub fn (mut app App) index() vweb.Result {\n\tmessage := \"Hello, worlf from vWeb !\"\n\treturn $vweb.html()\n\t\n}\n\nfn (mut app App) time() vweb.Result {\n\treturn app.text(time.now().format())\n}"}}}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///home/user/testing/v-testing/experiments/experiments.v","languageId":"v","version":169,"text":"module main\n\nfn main() {\n\tnums := [1, 2, 3]\n\n\tnums.\n}\n"}}}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","id":1,"method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/user/testing/v-testing/experiments/experiments.v"}}}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","id":2,"method":"textDocument/foldingRange","params":{"textDocument":{"uri":"file:///home/user/testing/v-testing/experiments/experiments.v"}}}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","id":3,"method":"textDocument/codeLens","params":{"textDocument":{"uri":"file:///home/user/testing/v-testing/experiments/experiments.v"}}}

[2022-04-15 20:52:49] {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///home/user/testing/v-testing/experiments/experiments.v","version":170},"contentChanges":[{"range":{"start":{"line":6,"character":1},"end":{"line":7,"character":0}},"rangeLength":1,"text":""}]}}

Response
[2022-04-15 20:52:40] {"jsonrpc":"2.0","method":"window/showMessage","params":{"type":2,"message":"VLS is a work-in-progress, pre-alpha language server. It may not be guaranteed to work reliably due to memory issues and other related factors. We encourage you to submit an issue if you encounter any problems."}}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"VLS Version: 0.0.1., OS: linux 64"}}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"VLS executable path: /home/user/.vls/bin/vls"}}Content-Length: 103

{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"VLS build with V 4a71b27"}}Content-Length: 133

{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"Client / Editor: Visual Studio Code 1.66.2 (PID: 3574)"}}Content-Length: 124

{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":3,"message":"Using V path (VROOT): /home/user/testing/v"}}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":2,"hoverProvider":true,"completionProvider":{"resolveProvider":false,"triggerCharacters":["=",".",":","{",",","("," "]},"signatureHelpProvider":{"triggerCharacters":["("],"retriggerCharacters":[","," "]},"definitionProvider":true,"typeDefinitionProvider":false,"implementationProvider":true,"referencesProvider":false,"documentHightlightProvider":false,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeActionProvider":false,"codeLensProvider":{"resolveProvider":false},"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"","moreTriggerCharacter":[]},"renameProvider":false,"documentLinkProvider":false,"colorProvider":false,"declarationProvider":false,"executeCommandProvider":"","foldingRangeProvider":true,"experimental":{}}}}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/user/testing/v-testing/blog/blog.v","diagnostics":[]}}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/user/testing/v-testing/experiments/experiments.v","diagnostics":[]}}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/user/testing/v-testing/experiments/experiments.v","diagnostics":[{"range":{"start":{"line":6,"character":0},"end":{"line":6,"character":0}},"severity":1,"code":"","source":"","message":"unexpected token `}`, expecting name","relatedInformation":[]},{"range":{"start":{"line":7,"character":0},"end":{"line":7,"character":0}},"severity":1,"code":"","source":"","message":"unexpected eof, expecting `}`","relatedInformation":[]},{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":1}},"severity":1,"code":"","source":"","message":"`[]int` has no property ``","relatedInformation":[]}]}}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","id":1,"result":[{"name":"main","kind":12,"deprecated":false,"location":{"uri":"file:///home/user/testing/v-testing/experiments/experiments.v","range":{"start":{"line":2,"character":3},"end":{"line":2,"character":7}}},"containerName":""}]}

[2022-04-15 20:52:40] {"jsonrpc":"2.0","id":2,"result":[{"startLine":0,"startCharacter":0,"endLine":0,"endCharacter":11,"kind":"region"},{"startLine":0,"startCharacter":2,"endLine":6,"endCharacter":1,"kind":"region"}]}

[2022-04-15 20:52:49] {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///home/user/testing/v-testing/experiments/experiments.v","diagnostics":[]}}

@djboboch Hi! Just a followup, have you tried updating VLS? If not, you may download the prebuilt binaries here and follow these steps. Thanks 🙂

Closed. It should be fixed in the later versions of VLS.

authors: djboboch nedpals

repo: vlang/vls


text:
[Bug]: The following fields were present in the request but ignored: {'schema'}

Your current environment

The output of `python collect_env.py`
Collecting environment information...
PyTorch version: 2.5.1+cu124
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.3 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.35

Python version: 3.12.8 (main, Dec  4 2024, 08:54:12) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.8.0-51-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA A30
GPU 1: NVIDIA A30

Nvidia driver version: 550.120
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                         x86_64
CPU op-mode(s):                       32-bit, 64-bit
Address sizes:                        46 bits physical, 57 bits virtual
Byte Order:                           Little Endian
CPU(s):                               144
On-line CPU(s) list:                  0-143
Vendor ID:                            GenuineIntel
Model name:                           Intel(R) Xeon(R) Platinum 8452Y
CPU family:                           6
Model:                                143
Thread(s) per core:                   2
Core(s) per socket:                   36
Socket(s):                            2
Stepping:                             8
CPU max MHz:                          3200.0000
CPU min MHz:                          800.0000
BogoMIPS:                             4000.00
Flags:                                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hfi vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Virtualization:                       VT-x
L1d cache:                            3.4 MiB (72 instances)
L1i cache:                            2.3 MiB (72 instances)
L2 cache:                             144 MiB (72 instances)
L3 cache:                             135 MiB (2 instances)
NUMA node(s):                         2
NUMA node0 CPU(s):                    0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,142
NUMA node1 CPU(s):                    1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143
Vulnerability Gather data sampling:   Not affected
Vulnerability Itlb multihit:          Not affected
Vulnerability L1tf:                   Not affected
Vulnerability Mds:                    Not affected
Vulnerability Meltdown:               Not affected
Vulnerability Mmio stale data:        Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed:               Not affected
Vulnerability Spec rstack overflow:   Not affected
Vulnerability Spec store bypass:      Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:             Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:             Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds:                  Not affected
Vulnerability Tsx async abort:        Not affected

Versions of relevant libraries:
[pip3] flashinfer==0.1.6+cu121torch2.4
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu12==12.4.5.8
[pip3] nvidia-cuda-cupti-cu12==12.4.127
[pip3] nvidia-cuda-nvrtc-cu12==12.4.127
[pip3] nvidia-cuda-runtime-cu12==12.4.127
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cufft-cu12==11.2.1.3
[pip3] nvidia-curand-cu12==10.3.5.147
[pip3] nvidia-cusolver-cu12==11.6.1.9
[pip3] nvidia-cusparse-cu12==12.3.1.170
[pip3] nvidia-ml-py==12.560.30
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] pyzmq==26.2.0
[pip3] torch==2.5.1
[pip3] torchvision==0.20.1
[pip3] transformers==4.47.1
[pip3] triton==3.1.0
[conda] Could not collect
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.6.5
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0    GPU1    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NODE    1,3,5,7,9,11    1               N/A
GPU1    NODE     X      1,3,5,7,9,11    1               N/A

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

NVIDIA_VISIBLE_DEVICES=all
NVIDIA_REQUIRE_CUDA=cuda>=12.1 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471 brand=tesla,driver>=525,driver<526 brand=unknown,driver>=525,driver<526 brand=nvidia,driver>=525,driver<526 brand=nvidiartx,driver>=525,driver<526 brand=geforce,driver>=525,driver<526 brand=geforcertx,driver>=525,driver<526 brand=quadro,driver>=525,driver<526 brand=quadrortx,driver>=525,driver<526 brand=titan,driver>=525,driver<526 brand=titanrtx,driver>=525,driver<526
NVIDIA_DRIVER_CAPABILITIES=compute,utility
VLLM_USAGE_SOURCE=production-docker-image
CUDA_VERSION=12.1.0
LD_LIBRARY_PATH=/usr/local/lib/python3.12/dist-packages/cv2/../../lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
CUDA_MODULE_LOADING=LAZY```

</details>

### Model Input Dumps

_No response_

### 🐛 Describe the bug

```python
completion = client.chat.completions.create(
        model="gpt-4o",
        messages=[
            {"role": "user", "content": prompt.format(string=s)}
        ],
        temperature=0.0,
        seed=42,
        max_tokens=512,
        # response_format=Schema
        response_format={
            "type": "json_schema",
            "json_schema": {
                "name": Schema.__name__,
                "schema": Schema.model_json_schema()
            }
        },
        extra_body={
            "guided_decoding_backend": "outlines"
        }
    )

content = completion.choices[0].message.content

In the log, it shows that:
WARNING 12-20 00:18:08 protocol.py:51] The following fields were present in the request but ignored: {'schema'}

This warning never happened in the previous version. Am I doing anything wrong since there is no document that show how to use response_format with vllm correctly
Before submitting a new issue...

[X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Please take a look at this guide.

@DarkLight1337 Thank you for your response. The guiding usage hasn't been consistent through many releases and my code has worked well with all versions from 0.6.1. It's a little bit annoying to find out changes without any clear announcement. Another point is that my code can help me switch easily between frameworks, such as vllm, sglang or even llamacpp without much changes.

cc @mgoin regarding this

@Quang-elec44 I'm sorry if your usage of vLLM structured outputs has been disrupted between releases - there should have been no changes to the OpenAI API in recent releases. Our goal has been to improve backend performance without changing the user interface.
Are there any reproducible usage examples you can share that regressed for you? With respect to the interface, we are working towards 100% compliance with the OpenAI Structured Outputs API.

@mgoin Thank you for your support! There are a lot of bugs related to JSON-output but I don't have time to open issues. Some of them are:

The server will crash under high load (32 or 64 concurrent requests).
vllm returns the status 500 Internal Server Error without any error message even when I set all required ENV variables.
For an empty list, the current version outputs a list with an empty string instead, which is not preferable.

repo: vllm-project/vllm


text:
Batching inference outputs are not the same

If I call the llm.generate with same prompt batch and greedy search, the output of each batch is not the same. Is this right?

Hi @gesanqiu, I believe this should not be the case. Could you share a reproducible example?

@WoosukKwon Sorry for made a mistake, this issue is tested on #1508, vLLM main branch doesn't have this issue. Need to check the dev branch.

#1546 fixed this issue.

I use the latest 0.5.4 version and found this problem is still existed. The decoding results of using batchsize=10 and 1 is different for some sentences.(Not all)
I guess it may be caused by the left padding. Some short sentences will be padded at the left. I wonder whether the vllm model will add special mask to remove the left-pading when perform self-attention? These should cause some differences if not

authors: WoosukKwon gesanqiu microhu


text:
Bump pydantic version from 1.10.13 to >= 1.9.0, < 3

Updating pydantic version from 1.10.13 to >= 1.9.0, < 3. The version was originally pinned due to a dependency on the OpenAI python library. OpenAI has since updated their version requirements for pydantic. See OpenAI docs for the version change: pyproject.toml.
Pydantic V1 is no longer supported, and suggests migration to V2 (Migration Guide).

bumping this! currently blocking our deployment of vllm, which has to integrate with other pydantic ecosystem packages
looks like you need to format the code @kmcleste to pass checks, yapf -r vllm tests should do the trick

Bumping this as well, as we also need this to support Pydantic 2.x in our integrations.

Thank you for your contribution. I will close this in favor of #2531

authors: jvmncs kmcleste saattrupdan simon-mo


text:
[misc][plugin] add plugin system implementation

follows https://github.com/vllm-project/vllm/issues/7131

@DarkLight1337 nice catch! added file in ae533fe

it would be nice if we could avoid the huge file in tests/dummy_opt

I tried to avoid it, but then we need to download it every time, and have some code to read & modify config.json, which I find more complicated.

it would be nice if we could avoid the huge file in tests/dummy_opt

I tried to avoid it, but then we need to download it every time, and have some code to read & modify config.json, which I find more complicated.

Hmm... if all you're doing is changing the model, perhaps #7438 would help with this.

Also i do find the term general to be not very informative. just call it VLLM_PLUGINS is good enough

@simon-mo changed in b03ab18

A very quick README in vllm/plugins will be useful.

doc change will come later.

Unsubscribe
On Wed, 14 Aug, 2024, 4:19 am youkaichao, @.***> wrote:

A very quick README in vllm/plugins will be useful.
doc change will come later.
—
Reply to this email directly, view it on GitHub
https://github.com/vllm-project/vllm/pull/7426#issuecomment-2287309111,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BCU643VUQYGOS53JUTWTPMDZRKEQ7AVCNFSM6AAAAABMMSSDJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBXGMYDSMJRGE
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

fixes https://github.com/vllm-project/vllm/issues/5657

authors: DarkLight1337 Pinkypoopoo youkaichao


text:
[Misc][OpenAI] deprecate max_tokens in favor of new max_completion_tokens field for chat completion endpoint

OpenAI deprecated the max_tokens field in favor of the new max_completion_tokens field for its create chat completion request.
Libraries like Microsoft Semantic-kernel are using the new max_completion_tokens field in their create chat request, leading to a pydantic validation error.
{"object":"error","message":"[{'type': 'extra_forbidden', 'loc': ('body', 'max_completion_tokens'), 'msg': 'Extra inputs are not permitted', 'input': 4096}]","type":"BadRequestError","param":null,"code":400}

This PR marks the max_tokens field as deprecated in the ChatCompletionRequest model (but still supports it) and add the support for the newly max_completion_tokens field, which takes precedence over max_tokens if present in the request.
Tests leveraging create_chat_completion requests have been updated to use the new field.
BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE

 PR Checklist (Click to Expand)
Thank you for your contribution to vLLM! Before submitting the pull request, please ensure the PR meets the following criteria. This helps vLLM maintain the code quality and improve the efficiency of the review process.
PR Title and Classification
Only specific types of PRs will be reviewed. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:

[Bugfix] for bug fixes.
[CI/Build] for build or continuous integration improvements.
[Doc] for documentation fixes and improvements.
[Model] for adding a new model or improving an existing model. Model name should appear in the title.
[Frontend] For changes on the vLLM frontend (e.g., OpenAI API server, LLM class, etc.)
[Kernel] for changes affecting CUDA kernels or other compute kernels.
[Core] for changes in the core vLLM logic (e.g., LLMEngine, AsyncLLMEngine, Scheduler, etc.)
[Hardware][Vendor] for hardware-specific changes. Vendor name should appear in the prefix (e.g., [Hardware][AMD]).
[Misc] for PRs that do not fit the above categories. Please use this sparingly.

Note: If the PR spans more than one category, please include all relevant prefixes.
Code Quality
The PR need to meet the following code quality standards:

We adhere to Google Python style guide and Google C++ style guide.
Pass all linter checks. Please use format.sh to format your code.
The code need to be well-documented to ensure future contributors can easily understand the code.
Include sufficient tests to ensure the project to stay correct and robust. This includes both unit tests and integration tests.
Please add documentation to docs/source/ if the PR modifies the user-facing behaviors of vLLM. It helps vLLM user understand and utilize the new features or changes.

Adding or changing kernels
Each custom kernel needs a schema and one or more implementations to be registered with PyTorch.

Make sure custom ops are registered following PyTorch guidelines: Custom C++ and CUDA Operators and The Custom Operators Manual
Custom operations that return Tensors require meta-functions. Meta-functions should be implemented and registered in python so that dynamic dims can be handled automatically. See above documents for a description of meta-functions.
Use torch.libary.opcheck() to test the function registration and meta-function for any registered ops.  See tests/kernels for examples.
When changing the C++ signature of an existing op, the schema must be updated to reflect the changes.
If a new custom type is needed, see the following document: Custom Class Support in PT2.

Notes for Large Changes
Please keep the changes as concise as possible. For major architectural changes (>500 LOC excluding kernel/data/config/test), we would expect a GitHub issue (RFC) discussing the technical design and justification. Otherwise, we will tag it with rfc-required and might not go through the PR.
What to Expect for the Reviews
The goal of the vLLM team is to be a transparent reviewing machine. We would like to make the review process transparent and efficient and make sure no contributor feel confused or frustrated. However, the vLLM team is small, so we need to prioritize some PRs over others. Here is what you can expect from the review process:

 After the PR is submitted, the PR will be assigned to a reviewer. Every reviewer will pick up the PRs based on their expertise and availability.
 After the PR is assigned, the reviewer will provide status update every 2-3 days. If the PR is not reviewed within 7 days, please feel free to ping the reviewer or the vLLM team.
 After the review, the reviewer will put an  action-required label on the PR if there are changes required. The contributor should address the comments and ping the reviewer to re-review the PR.
 Please respond to all comments within a reasonable time frame. If a comment isn't clear or you disagree with a suggestion, feel free to ask for clarification or discuss the suggestion.

Thank You
 Finally, thank you for taking the time to read these guidelines and for your interest in contributing to vLLM. Your contributions make vLLM a great tool for everyone!

Thanks for updating this, what is the minimum openai-python version that is required to use max_completion_tokens?

@DarkLight1337 good catch!
They added the change with version v1.45.0 when they introduced support for the o1 models.
I have added the bump of the openai version to 1.45.0 in the dependencies


text:
RouteUnusedSegments facts caused by an excursion along the route

The RouteUnusedSegments fact for this route seems to be caused by the side loop.
On the ground the route is continous for the hiker: the signs are put up nicely to guide the hiker through the loop automatically; no user choice involved. From an informational standpoint it is correct to add the common segment twice to the relation, so ideally it shouldn't raise a 'fact'.
Could this be done without additional tagging? If not:

I thought about adding forward and backward roles to the common segment, but that would not be compatible with backward and forward roles in (mostly) cycling routes.

Possible solution: we could give the side loop members the role "excursion". This role is designed and approved for this situation. However, the excursion should remain included in the route display, distance count, analysis of the segments etc. The role just needs to suppress the error.

Last saturday I introduced an additional artificial node to cover a similar situation:
Route 79-79 was split in two:
*-79
79-*
This should be a temporay solution / workarround only.
The better solution will be that the knooppuntnet logic does not try to be too smart: when it finds that start and end node are nicely connected by the ways in the relation in the order in which they are in the relation, than it should think no further, stop further analysis and consider the route to be ok as is.
Additional tagging will not make it any easier for the mapper or the knooppuntnet logic I think.
See also: #2 (2017!)

The better solution will be that the knooppuntnet logic does not try to be too smart: when it finds that start and end node are nicely connected by the ways in the relation in the order in which they are in the relation, than it should think no further, stop further analysis and consider the route to be ok as is.

Agreed! Can't wait! 👍

authors: pelderson vmarc

repo: vmarc/knooppuntnet


text:
Check broken links in markdown files

What this PR does / why we need it:
Now that BYOH is open-sourced, it will be good to check broken links in markdown files to avoid blocking developers and users to try and experiment with BYOH.
Fixes https://github.com/vmware-tanzu/cluster-api-provider-bringyourownhost/issues/228
Additional information
Uses https://github.com/marketplace/actions/markdown-link-check Github Action for checking broken links.
Tested with https://github.com/nektos/act.
$ act -j markdown-link-check
[Check Markdown links/Broken Links] 🚀  Start image=catthehacker/ubuntu:act-latest
[Check Markdown links/Broken Links]   🐳  docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Check Markdown links/Broken Links]   🐳  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root
[Check Markdown links/Broken Links]   🐳  docker cp src=/Users/shamshera/Projects/cluster-api-provider-bringyourownhost/. dst=/Users/shamshera/Projects/cluster-api-provider-bringyourownhost
[Check Markdown links/Broken Links]   🐳  docker exec cmd=[mkdir -p /Users/shamshera/Projects/cluster-api-provider-bringyourownhost] user=
[Check Markdown links/Broken Links] ⭐  Run actions/checkout@master
[Check Markdown links/Broken Links]   ✅  Success - actions/checkout@master
[Check Markdown links/Broken Links] ⭐  Run gaurav-nelson/github-action-markdown-link-check@v1
INFO[0006]   ☁  git clone 'https://github.com/gaurav-nelson/github-action-markdown-link-check' # ref=v1
[Check Markdown links/Broken Links]   🐳  docker run image=act-gaurav-nelson-github-action-markdown-link-check-v1:latest platform= entrypoint=[] cmd=["yes" "yes" ".github/workflows/markdown.links.config.json" "." "-1" "no" "master" ".md" ""]

| added 65 packages, and audited 66 packages in 28s
|
| found 0 vulnerabilities
| Using markdown-link-check configuration file: .github/workflows/markdown.links.config.json
| USE_QUIET_MODE: yes
| USE_VERBOSE_MODE: yes
| FOLDER_PATH: .
| MAX_DEPTH: -1
| CHECK_MODIFIED_FILES: no
| FILE_EXTENSION: .md
| FILE_PATH:
| + find . -name '*.md' -not -path './node_modules/*' -exec markdown-link-check '{}' --config .github/workflows/markdown.links.config.json -q -v ';'
| + set +x
| =========================> MARKDOWN LINK CHECK <=========================
|
| [✔] All links are good!
|
| =========================================================================
[Check Markdown links/Broken Links]   ✅  Success - gaurav-nelson/github-action-markdown-link-check@v1

Special notes for your reviewer

@shamsher31, I was looking at the custom variables documentation for this GH action linter. Do you think it's better to set the below variables?
max-depth: 1
check-modified-files-only: yes
base-branch: main

@dharmjit Good catch. I will add  base-branch as we use main as a base branch. I'm not sure about the other 2 options because of the following reason.

max-depth: 1 will only look into one directory down from the root. if we have .md files inside say e2e test directory to explain to users how to run the e2e test, and some links are broken there, then this tool will skip it. The default is -1 which will look into all the nested directories.
check-modified-files-only will only scan .md files that are in PR. If we have some docs which are not regularly updated and have some broken links, then this tool will ignore it. So better to scan all .md files?

I will add base-branch as we use main as a base branch.

I believe this variable is only used with combination to check-modified-files-only

if we have .md files inside say e2e test directory to explain to users how to run the e2e test , and some links are broken there, then this tool will skip it.

No strong views on this. IMO, it will be skipped in that check but the linter will get to know it when checking that md file specifically. Am I missing something?

If we have some docs which are not regularly updated and have some broken links

Again no strong views, I understand that once the links are corrected initially on the local system, the only flow to check on code is via pull requests.

I will add base-branch as we use main as a base branch.

I believe this variable is only used with combination to check-modified-files-only

Gotcha, I think that's the caveat with this flag but we can add it and see how well it performs.

https://github.com/tcort/markdown-link-check Interesting tool ! @JitenPalaparthi built a url linter tool for TCE - https://github.com/JitenPalaparthi/urllinter . It would be an interesting experiment to dig in and see how they differ, I'll probably do it sometime later. I think I might choose https://github.com/JitenPalaparthi/urllinter just because it's in Golang 😅


text:
doc: add doc for vsphere version

Description
Need to call out that any vsphere edition that supports vSphere DRS is the actual requirement here:~
https://tanzucommunityedition.io/docs/latest/vsphere/
change:
 A vSphere 7, vSphere 6.7u3, VMware Cloud on AWS, or Azure VMware Solution account with:
 ] **vSphere 6.7**: an Enterprise Plus license
 ] **vSphere 7**

to
 A vSphere 7, vSphere 6.7u3, VMware Cloud on AWS, or Azure VMware Solution account with
any vSphere edition that supports vSphere DRS

Location

Additional Context

@kcoriordan After some additional commentary in Slack, I decided to run a few more experiments to confirm my understanding and it looks like vSphere DRS is NOT required. You can find the summarized findings on my blog https://williamlam.com/2021/10/minimum-vsphere-edition-features-for-tanzu-community-edition-tce.html
I think stating that vCenter and vSphere Essential and Standard can be used can be helpful to give them an idea of the low barrier to entry from a licensing/feature standpoint but really ultimately, TCE for vSphere just requires vCenter Server that is managing the ESXi host. If a user has that setup in their env which can also include the default 60 day eval, then they can use TCE
Hope this helps

authors: kcoriordan lamw

repo: vmware-tanzu/community-edition


text:
Update deps 1.11

update deps to main

Codecov Report

Merging #534 (ed12f17) into main (7973b80) will decrease coverage by 0.15%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #534      +/-   ##
==========================================
- Coverage   66.23%   66.08%   -0.15%
==========================================
  Files          38       38
  Lines        2079     2079
==========================================
- Hits         1377     1374       -3
- Misses        657      660       +3
  Partials       45       45

see 1 file with indirect coverage changes

repo: vmware-tanzu/sources-for-knative


text:
Inconsistent stacking of datagrid cell content

[ x] bug
[ ] feature request
[ ] enhancement
Expected behavior
Body cell content of data grid is consistently stacking when a single row action is present.
Actual behavior
Maybe root cause/related to issue #1986
Header Cells:
If single row actions are not included, the header row stacks.
If there is a single row action, header does not stack.

Body Cells:
If single row actions are included without *clrDgItems, content of cells stacks,
If there is no single row action or has a single action row but uses *clrDgItems the cell content does not stack.

Reproduction of behavior
https://plnkr.co/edit/wx89GcoHb1ZA27E0RlkP?p=preview
Environment
Angular version: 4.x.x
Clarity version: 0.10.x
OS and version: [Win10]
Browser: [all]

@hippee-lee : Could you get back with @xucito on this?

@xucito - thanks for reporting this. It looks like a duplicate of #1986 that was recently reported. I'm closing this based on that. Please subscribe to that issue for updates.

authors: hippee-lee mathisscott xucito

repo: vmware/clarity


text:
Core: remove global style references

Clean up global style references and any style APIs that would cause breaking changes after 3.0

[x] remove all component margins
[x] remove global styles for 3.0 (typography/layout)
[x] remove use of global css props internally with core components
[x] remove global prefix convention on host scoped styles

Margins
Ensure all core components have no specified :host margins. Margins on a host element make assumptions of the layout that is external to their responsibility. Using a design token system designers and developers should be able to layout components consistently and with specified intent and constraint. The design token values are still a wip but we want to remove margins before 3.0 to prevent future visual breaking changes.
Core will need to handle design tokens and variables slightly different than clr-ui/angular due to shadow dom and component composition but we should align the space values for the token to stay consistent.
Related issues/context:
https://github.com/vmware/clarity/issues/181
https://github.com/vmware/clarity/issues/4116
https://github.com/vmware/clarity/issues/3303
Layout & Typography
Both the layout/grid utilities and typography also suffer from inconsistent layout margins (not typographic whitespace) and spacing. For 3.0 we will omit these from the core global styles until they can be addressed. Also defining non global explicit utils will allow possible migration strategies with scoped utils.
Global CSS Properties
Core Components should not reference global CSS custom properties as this creates a secondary way to theme components and creates twice the API surface area. Our clr-ui dark theme follows a similar pattern and only changes the local component scoped variables leaving global values unchanged. For core components to share values such as spacing and color they internally should use private sass variables and not global CSS Custom Properties.
Global Prefixing
Public API surface for component styling should not use the global prefixing convention. This is necessary for micro frontends where a component may need to be aliased due to app embedding. This prevents version collisions and dependencies form having to share the same global values.
cwc-badge {
  --color: red;
  --background: blue;
}

Teams can prefix their own core components to share and embed with other products without the risk of a host app breaking their product specific styles.
<style>
  cwc-badge {
   --color: green;
  }
</style>
<cwc-badge></cwc-badge> <!-- only host application badges are changed -->

<product-cwc-badge></product-cwc-badge> <!-- embedded product styles are preserved -->

In very rare cases a naming collision can occur with a local host var and global theming var breaking on the component (see example).
// global scope
:root {
  --primary-color: blue;
}

// component scope (:host)
button {
  // naming colision, due to global and local names
  // var cant resolve to global or local but refers to
  // its own redeclartion defaulting to initial.
  --primary-color: var(--primary-color);
  background: var(--primary-color);
}

Fixed with https://github.com/vmware/clarity/pull/4243


text:
[VCDA-3533] Delete the vApp if and only if rdeId (matches) present in the vApp

During delete cluster operation, delete the vApp if and only if vApp has the InfraId as metadata property.
Created a generic validation function in vApp.go to check whether a key-value pair is matched in vApp's metadata.
Test Done:

If vAppmetadataUpdated is true, deletion process will be in stuck.
In current version, vAppmetadataUpdate will not be reset until the deletion process is done.
If InfraId is mismatched, deletion process will be in stuck and customers could see error hint in logs.

To summarize, customers have choice to keep any component they want (vApp, VMs, load balance components).

This change is

controllers/vcdmachine_controller.go line 846 at r2 (raw file):

			return ctrl.Result{}, errors.Errorf("Error occurred during the machine deletion; Metadata not found in vApp")
		}
		metadataInfraId, err := vdcManager.GetMetadataByKey(vApp, CapvcdInfraId)

Check for
if err != nil {}

is missing here


text:
Unable to pull image from integrated Harbor via VCH.

This is found on .ova environment, when enabled project level content trust the Harbor keeps returning 412 to VCH.

Found root cause in vic engine, opened issue: https://github.com/vmware/vic/issues/5950

close it as fixed.

repo: vmware/harbor


text:
why the mysql table version is still v1.2 with image harbor-db:v1.4.0

I successfully deployed harbor v1.2.2  on  kubernetes  according  user guide (the link is
https://github.com/vmware/harbor/blob/release-1.2.0/docs/kubernetes_deployment.md)
Now,  I downloaded the harbor  release-1.4.0, and use all  v1.4.0 images to deploy harbor on k8s,  I  just changed  all  image name and version  in  *.rc.yaml.  After the mysql pod is started,   I found the table version is still v1.2.0 by reading  the  content of  table alembic_version in resigistry db.
Dose the image of mysql is wrong?
If you are reporting a problem, please make sure the following information are provided:
1)Version of docker engine and docker-compose.
2)Config files of harbor, you can get them by packaging "harbor.cfg" and files in the same directory, including subdirectory.
3)Log files, you can get them by package the /var/log/harbor/ .

https://github.com/vmware/harbor/blob/master/docs/migration_guide.md
But you need to figure out how to do it on kubernetes.

At first, I though I did't need to migrate the DB schema from 1.2 to 1.4 because I used the harbor-db:v1.4.0 to create the mysql pod directly.  After I tried 2 times,  the table version still v1.2, so I read the migration_guide. I don''t do the backup step because I don't  want  to save the data in db.   I  just do the upgrade step with the follow commad :
docker run -ti --rm -e DB_USR=root -e DB_PWD=root123 -v /tmp/database:/var/lib/mysql 172.16.111.103:5000/vmware/harbor-db-migrator:1.4 up head
Above command is ran on the  node which  the  db pod run on.  but it failed , the log is:
Please backup before upgrade.
Enter y to continue updating or n to abort:y
Trying to start mysql server...
Waiting for MySQL start...
2018-02-09  2:28:28 139765879289792 [Note] mysqld (mysqld 10.2.10-MariaDB) starting as process 6 ...
2018-02-09  2:28:28 139765879289792 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-02-09  2:28:28 139765879289792 [Note] InnoDB: Uses event mutexes
2018-02-09  2:28:28 139765879289792 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-02-09  2:28:28 139765879289792 [Note] InnoDB: Number of pools: 1
2018-02-09  2:28:28 139765879289792 [Note] InnoDB: Using SSE2 crc32 instructions
2018-02-09  2:28:28 139765879289792 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
Waiting for MySQL start...
2018-02-09  2:28:29 139765879289792 [Note] InnoDB: Completed initialization of buffer pool
2018-02-09  2:28:29 139764939978496 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-02-09  2:28:29 139765879289792 [Note] InnoDB: The first innodb_system data file 'ibdata1' did not exist. A new tablespace will be created!
2018-02-09  2:28:29 139765879289792 [Note] InnoDB: Setting file './ibdata1' size to 12 MB. Physically writing the file full; Please wait ...
2018-02-09  2:28:29 139765879289792 [Note] InnoDB: File './ibdata1' size is now 12 MB.
2018-02-09  2:28:29 139765879289792 [Note] InnoDB: Setting log file ./ib_logfile101 size to 50331648 bytes
2018-02-09  2:28:29 139765879289792 [Note] InnoDB: Setting log file ./ib_logfile1 size to 50331648 bytes
2018-02-09  2:28:29 139765879289792 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2018-02-09  2:28:29 139765879289792 [Note] InnoDB: New log files created, LSN=45790
2018-02-09  2:28:29 139765879289792 [Note] InnoDB: Doublewrite buffer not found: creating new
Waiting for MySQL start...
2018-02-09  2:28:30 139765879289792 [Note] InnoDB: Doublewrite buffer created
2018-02-09  2:28:30 139765879289792 [Note] InnoDB: 128 out of 128 rollback segments are active.
2018-02-09  2:28:30 139765879289792 [Note] InnoDB: Creating foreign key constraint system tables.
2018-02-09  2:28:30 139765879289792 [Note] InnoDB: Creating tablespace and datafile system tables.
2018-02-09  2:28:30 139765879289792 [Note] InnoDB: Creating sys_virtual system tables.
2018-02-09  2:28:30 139765879289792 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-02-09  2:28:30 139765879289792 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-02-09  2:28:30 139765879289792 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Waiting for MySQL start...
2018-02-09  2:28:31 139765879289792 [Note] InnoDB: Waiting for purge to start
2018-02-09  2:28:31 139765879289792 [Note] InnoDB: 5.7.20 started; log sequence number 0
2018-02-09  2:28:31 139765879289792 [Note] Plugin 'FEEDBACK' is disabled.
2018-02-09  2:28:31 139765879289792 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2018-02-09  2:28:31 139765879289792 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
2018-02-09  2:28:31 139765879289792 [Note] Server socket created on IP: '::'.
2018-02-09  2:28:31 139765879289792 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...
Waiting for MySQL start...

Sorry, it my mistake.
Acctually, I used StorageClass  to provide pv for mysql and the backend storage provider is cinder.  After I  deleted the  ReplicationController mysql-rc ,  I just replaced the  image version of  mysql to harbor-db:v1.4.0  in  mysql.rc.yaml  and didn't delete the storage-pvc. Then create a new mysql-rc.
The reason may be:  The original dbs exists on the orignal PV(PVC), and the new version mysql container with not clear the dbs  on the orignal PV(PVC), so it uses the original db directly, and then the alembic_version in resigistry db will not change except doing upgrade.
Also, For upgrading the db in my case. I tried to ways:

Create  another storage-pvc, eg. storage-pvc-1,  and then create the mysql  pod  with this new clean
pvc.

Upgrade the database. Bellow is my step.
Note: I didn't do the data backup step for experiment

Find the attached path of the volume used by storage-pvc.
In my enviroment, the attached path is :
/var/lib/kubelet/plugins/kubernetes.io/cinder/mounts/07252db8-fd5b-45cb-9087-b987bc0b3fc9
Close the mysql process in container . ( I delete the mysql-rc directly)
Run the upgrade command provided by
https://github.com/vmware/harbor/blob/master/docs/migration_guide.md
In my enviroment , the command is:
docker run -ti --rm -e DB_USR=root -e DB_PWD=root123 -v
/var/lib/kubelet/plugins/kubernetes.io/cinder/mounts/07252db8-fd5b-45cb-9087-
b987bc0b3fc9:/var/lib/mysql 172.16.111.103:5000/vmware/harbor-db-migrator:1.4  up head

The upgrade command run sucessfully, and the output on terminal as follow:
Please backup before upgrade.
Enter y to continue updating or n to abort:y
Trying to start mysql server...
Waiting for MySQL start...
2018-02-09  7:07:32 140432232654784 [Note] mysqld (mysqld 10.2.10-MariaDB) starting as process 6 ...
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: Uses event mutexes
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: Number of pools: 1
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: Using SSE2 crc32 instructions
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: Completed initialization of buffer pool
2018-02-09  7:07:32 140431297431296 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: Highest supported file format is Barracuda.
Waiting for MySQL start...
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: 128 out of 128 rollback segments are active.
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: Waiting for purge to start
2018-02-09  7:07:32 140432232654784 [Note] InnoDB: 5.7.20 started; log sequence number 1779222
2018-02-09  7:07:32 140432232654784 [Note] Plugin 'FEEDBACK' is disabled.
2018-02-09  7:07:32 140431286920960 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2018-02-09  7:07:33 140431286920960 [Note] InnoDB: Buffer pool(s) load completed at 180209  7:07:33
2018-02-09  7:07:33 140432232654784 [Note] Server socket created on IP: '::'.
2018-02-09  7:07:33 140432232654784 [Note] Reading of all Master_info entries succeded
2018-02-09  7:07:33 140432232654784 [Note] Added new Master_info '' to hash table
2018-02-09  7:07:33 140432232654784 [Note] mysqld: ready for connections.
Version: '10.2.10-MariaDB'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Source distribution
Performing upgrade head...
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
1.2.0
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade 1.2.0 -> 1.3.0, 1.2.0 to 1.3.0
INFO  [alembic.runtime.migration] Running upgrade 1.3.0 -> 1.4.0, 1.3.0 to 1.4.0
INFO  [alembic.runtime.migration] Context impl MySQLImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
1.4.0 (head)
Upgrade performed.
0
Status information:
Current dir: /var/lib/mysql/
Running threads: 5  Cached threads: 1  Stack size: 299008
Key caches:
default
Buffer_size:     134217728
Block_size:           1024
Division_limit:        100
Age_threshold:         300
Partitions:              0
blocks used:             0
not flushed:             0
w_requests:              0
writes:                  0
r_requests:              0
reads:                   0
handler status:
read_key:            4
read_next:           0
read_rnd             0
read_first:          3
write:               3
delete               0
update:              2
Table status:
Opened tables:         37
Open tables:           18
Open files:            29
Open streams:           0
Alarm status:
Active alarms:   0
Max used alarms: 0
Next alarm time: 0
Memory status:
Non-mmapped space allocated from system: 31232000
Number of free chunks:                   111
Number of fastbin blocks:                6
Number of mmapped regions:               11
Space in mmapped regions:                377946112
Maximum total allocated space:           0
Space available in freed fastbin blocks: 288
Total allocated space:                   19087568
Total free space:                        12144432
Top-most, releasable space:              45232
Estimated memory (with thread stack):    410972160
Global memory allocated by server:       356674136
Memory allocated by threads:             120960
Events status:
LLA = Last Locked At  LUA = Last Unlocked At
WOC = Waiting On Condition  DL = Data Locked
Event scheduler status:
State      : INITIALIZED
Thread id  : 0
LLA        : n/a:0
LUA        : n/a:0
WOC        : NO
Workers    : 0
Executed   : 0
Data locked: NO
Event queue status:
Element count   : 0

Oh, my god.  I dug a hole for myself.

authors: reasonerjt rootdeep


text:
Upgrade issue

On my test server the upgrade from 140 to 150 ran fine.
On the production server I did the same steps, however after the upgrade I do not see any of the new features of 150 (eg labels, tiles for images). What I see is still the same as what I had in 140.
However, the About shows the following text: Version v1.5.0-d59c257e
What can I do to check this further out?

I decided not to wait and do a clean re-install and container image reload.
That means I cannot reproduce the issue anymore, I close it.


text:
Replicate project error message is not correct

Problem description:
when user try to new a replication rule, he need to input source project name.
In this case, if user input a project name not exist. The error message will be:"Please add a project name",
this is not accurate.
Fix:
Modify the error message to "This project is not exist".
Plus:Modify the error popup using standard tooltip component.

Pull Request Test Coverage Report for Build 7791

0 of 0   changed or added relevant lines in 0 files are covered.
9 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.05%) to 63.635%

Files with Coverage Reduction
New Missed Lines
%

src/common/scheduler/scheduler.go
2
81.29%

src/common/scheduler/policy/alternate_policy.go
3
80.29%

src/common/utils/utils.go
4
85.5%

Totals

Change from base Build 7790:
-0.05%

Covered Lines:
11908

Relevant Lines:
18713

💛  - Coveralls

authors: coveralls zhoumeina


text:
Update router.go

clarify project get method and project/{id} get method

Thanks！


text:
vdk-core: add more restrictive hooks to hookspec

Why?
The hooks that expose cursors end up in pluggy's LIFO buffer and execute every time. This is ok for things like lineague or metrics, but it breaks database plugins if they try to execute queries with the wrong cursor.
What?
Create more restrictive hooks to eventually replace the hooks that expose the DecorationCursor and Recovery cursor
How was this tested?
Functional tests
What kind of change is this?
Feature/non-breaking

I think we should not change the ManagedCursor, yet
What will happen now if a plugin has the old decoration hook, it will never be used on execute()?

Actually, I think all 3 should work together

So the idea here is that the new hooks will replace the hooks which use DecorationCursor and Recovery cursor(decorate and recover operations), but what about the other two hooks (for validate and execute)? Those operations are not to be available as new hooks?

So the idea here is that the new hooks will replace the hooks which use DecorationCursor and Recovery cursor(decorate and recover operations), but what about the other two hooks (for validate and execute)? Those operations are not to be available as new hooks?

We should remove the execute hook entirely. It makes zero sense to have it. We can keep the validate hook as is, or make it a connection-specific method. I lean to making it a connection-specific method, but we have to see where and how it's used.

@DeltaMichael I am fully fine with removing the validate and execute hooks and having more restriction but let's sync offline about this. I am on the behalf of only using the connection-specific methods as well

authors: DeltaMichael duyguHsnHsn

repo: vmware/versatile-data-kit


text:
Improve security of javascript execution

I'm no expert on NodeJs or security in general, but I wanted to start a discussion about eval_in_node. At the moment we are executing what is essetially arbitrary js in two different locations in the codebase. While it may be known what the scripts that are being fetched and executed do now, if they were to change in the future or the sites were to be compromised in some way, significant damage could be done since node is able to do pretty much anything the calling user is capable of.
Probably the only truely safe way to do this is using a container, but that would be a lot of overhead to fetch a cookie. Again I'll stress that I'm not sure what the proper solution would be, but perhaps vm2 would be a decent approach. vm2 blocks node's modules by default and allows whitelisting needed functionality. It looks like it would just take a small wrapper script to lock down the node process quite a bit. That way could still log the cookies but forbid the process from starting other processes or accessing the file system.
Any thoughts about this or other possible approaches to the issue? The only downside I see with vm2 would be the addition of another dependency to the project. If this seems like a good addittion to you, I can write up a pull request.

This is quite a major problem actually, you are completely right that it is a security issue. Can you please come back and work on this ;-;

authors: LiteracyFanatic MichaelDavidJohnson

repo: vn-ki/anime-downloader

license: Unlicense


text:
Players not docking in voctogui on ubuntu 20.10

On ubuntu 20.10 the video displays in the gui appear as seperate windows instead docked in UI.
This broken for x xv gl and vaapi surfaces.
To make this more fun the glade editor shipped with 20.04 crashes on the ui file.

This may be an issue with Wayland being the default on Ubuntu now. Voctomix is not yet compatible with wayland.

At least Glade no longer crashes under Wayland in 22.04 :)

Here is a proposal on how to do it with glimagesink: https://gist.github.com/jonasl/92c1ef32cfd87047e15f5ae24c6b510e. This needs to replace the self.imagesink.set_window_handle(self.xid) logic in òn_syncmsg` required for XEmbed. Requires refactoring into two classes with different embed strategies, and with an interchangeable imagesink.

authors: danimo derpeter

repo: voc/voctomix

license: mit


text:
excluded options block movement of enabled blocks to edges

excluded options can create a block at the end or start of the list. It's a weird behavior - one would expect to be able to drag enabled options to the end of the list even if there's a disabled option there. It gets weirder if you have an enabled option last, and you drag it to the center - then you can't take it back: demo
I tried fixing this by setting up a variable named allitems that includes all the children (including excluded ones) and applying the dragover, dragenter and drop events to those. The results were weird - enabled options that allow dragging through disabled options, but if placed become nested within it: demo.
Is there any good solution to this?

@yuvii I know it is a tiny bit on the late side, but is this still a problem and if so, I would very much welcome a PR.

authors: lukasoppermann yuvii


text:
Expose the AUX ?

Just wondering if you can expose the AUX setting for the Ecobee? I would like to be able to have a trigger to AUX function when I have a power outage and not use my heat pump. HomeKit does not show it.
Guess you would need to expose the HEAT, COOL, and AUTO as well even though HomeKit does.

Hello,
I'm not exactly sure what you mean by AUX setting for the ecobee. But I probably won't be able to get to it anytime soon. This is a hobby projects that I work on in my personal time.
So if you really need the feature, try to work on it yourself, I'll be happy to merge a PR.

In the Ecobee you can switch your system to heat, cool, auto and AUX.  Aux
is the backup heat source ( electric or gas) if you have a heat pump.
Switches on if it goes below 36 or so degrees Fahrenheit.
Ecobee does not present this function in the HomeKit, and does not plan
too.
I would like to switch to gas heat when there is a power outage and not use
the heat pump. My house has a battery back up but running the gas heat is
less drain on batteries.
Thanks for taking the time to respond.
Steve
Pardon the brevity, sent from a mobile device.
On Fri, Jan 5, 2024 at 12:01 PM Vojta Molda @.***>
wrote:

Hello,
I'm not exactly sure what you mean by AUX setting for the ecobee. But I
probably won't be able to get to it anytime soon. This is a hobby projects
that I work on in my personal time.
So if you really need the feature, try to work on it yourself, I'll be
happy to merge a PR.
—
Reply to this email directly, view it on GitHub
https://github.com/vojtamolda/homebridge-ecobee3-sensors/issues/50#issuecomment-1879193671,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APRMG4WSFLTM4PILBDSYQX3YNBLYTAVCNFSM6AAAAABBK3DUVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZZGE4TGNRXGE
.
You are receiving this because you were assigned.Message ID:
@.***>

Okay. That's really nice. Like I said have fun working on it yourself. I personally don't need, so it's very unlikely I'll spend time on it.


text:
Add support for SQLBoiler v4 and Go modules

Add support for SQLBoiler v4 by updating the following import paths
used by sqlboiler-sqlite3:
github.com/volatiletech/sqlboiler/drivers   => github.com/volatiletech/sqlboiler/v4/drivers
github.com/volatiletech/sqlboiler/importers => github.com/volatiletech/sqlboiler/v4/importers
github.com/volatiletech/sqlboiler/types     => github.com/volatiletech/sqlboiler/v4/types
github.com/volatiletech/null                => github.com/volatiletech/v8/null

With these changes sqlboiler-sqlite3 can be used inside a codebase
using v4 of github.com/volatiletech/sqlboiler.
Add a go.mod and go.sum file to make this repository a Go module.  The
README's installation instructions have been updated to take into
account the fact that this repository is now a Go module.
Note that go generate was not run since no templates were modified.
Closes #7.

Much appreciated. Thanks for the PR. Forgot about this guy!

@aarondl No problem, thanks for making SQLBoiler! :)

authors: aarondl nwidger


text:
Impove localization features

1. Diacritic displaying
Some diacritics in Vietnamese have been displayed not very clearly with the Open Sans font included in Serene. I tried to use Open Sans by Google webfont then it was much better.
Original font:

@*@Html.Stylesheet("~/Content/font-open-sans.css")*@
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=vietnamese" rel="stylesheet">

2. Searching without diacritics
This feature works well in Lookup Editor or in Column Picker dialog as diacritics has been removed before searching.
But the quick search feature in entity grid doesn't work the same way. I know it's a searching query to SQL so we can't do the samething like in Lookup Editor (client searching) or in Column Picker dialog (searching in C# code). But can we use collation _CI_AI so that SQL Server ignore diacritics in 'like' command as well?
This feature is very important in Vietnamese software as user don't want (or sometimes can't) type diacritics for searching.
3. Local text key fallback
In many entities I have some similar fields like Code, Name, DisplayOrder, IsActive... and I don't want to translate all those texts. And with one entity, Employee for example , i have to translate these resource strings: DB.HR.Employee, DB.HR.Employee.EntitySingular, DB.HR.Employee.EntityPlural, xxx.EmployeeId... while they are the same in Vietnamese.
So if we have some fallback for local text key, it'll save time and may be improve the performance as well (as we have less resource strings with shorter keys). For example:

if "DB.HR.Employee.EntitySingular" can't be found, then it looks up for "DB.HR.Employee"
if "DB.CRM.Task.EmployeeId" can't be found, then it looks up for "Employee"
if "DB.HR.Employee.Name" can't be found, then it looks up for "Name"
...
Then developer can put some common text in site.texts.xxx for using in all modules.
I've implemented (3), if you agree with that, it'll create a pull request

I don't want to use internet versions of fonts by default, this would be not ok for intranet apps. If font is somehow updated, we might update it from there and take a new local copy, but not a culture specific one. You are free to use any you like in your own apps though.

Entity grid uses the collation in your column. If you use X_CI_AI in your SQL column, it will use that. So you better change collation in database. It's also much better performance wise. We have similar requirement in Turkish_CI_AI etc and I can't imagine why would you want to use different collation for search, but if really need, that would require another attribute e.g. SearchCollationAttribute etc.

I would create a base class for 3, especially for shared fields. Anyway i understand there can be cases where it wouldn't solve all. I would implement that as a fake service wrapping ILocalTextRegistry, e.g.

Dependency.Register<ILocalTextRegistry>(new MySuperFallbackRegistry(Dependency.Resolve<ILocalTextRegistry>()));

I'd be happy with a pull request containing such a class, similar to LogicOperatorPermissionService.

Btw, as a side note, i think you are putting english texts on your texts. I would use Vietnamese texts on my rows, as for you Vietnamese is primary language. That way you would do translations for English texts.
Invariant language is language neutral to your application, e.g. default, its not English

I also don't want to use Internet version. I was just wondering why some Vietnamese diacritics looked like they are missing and not comfortable for reading. I thought that the local font hadn't Vietnamese subset and hoped that it would be included as most Vietnamese are Latin Extended, few characters are culture specific. OK I'll download and use my own fonts.
I didn't notice that we can change collation for columns in SQL Server. I changed the database collation to _CI_AI but all nvarchar columns remained old collation _CI_AS, so the quick search didn't work, then I thought about adding collation to the query... It works OK now
Base class is a good idea for shared fields. I added code to the TryGet method of LocalTextRegistry class directly. I'll look at LogicOperatorPermissionService to see how to implement a fake service

I understand you point on primary language. Our products must support both Vietnamese and English, and all tables and fields are in English, so the generated rows have English with quite good quality. So I don't want to modify display name in all rows to Vietnamese and then translate them back to English

Thanks for your pull request, a wiki entry later would be useful i think.

Dear @volkanceylan , I tried to use FallbackLocalTextRegistry for a sample in Serene and write a wiki.
However, it didn't work because:

The TryGet method of LocalTextRegistry never return a null string as it search in language fallbacks or default language.
The ILocalTextRegistry was casted to LocalTextRegistry serveral times in the code so it caused exceptions

I also tried to fix above issues by:

Adding parameter bool searchInFallbacks = true to TryGet method
Adding all methods to be called of LocalTextRegistry to ILocalTextRegistry, implementing them on FallbackLocalTextRegistry. Then I  removed all casting so I could register FallbackLocalTextRegistry instead of LocalTextRegistry.
then I could built and run the application without exceptions. However, for some reasons, it couldn't register texts (approvedTexts had no element) and Dynamic Script for Local Text didn't work.

I think that implement this feature as a fake service made it too complicated while a little modification to TryGet method of LocalTextRegistry would work fine. Key fallback should be implemented the same way as the language fallback be.

I understand that it didnt work like you hoped but i'm not sure this is a valid fallback mechanism. For example en-us might be a fallback for en-uk and if you prioritize key fallback, it might never hit en-us even if there is a translation there. You might subclass LocalTextRegistry and change interface implementation of TryGet.

You can also make private members of LocalTextRegistry protected and TryGet method virtual if needed.

Thanks for you suggestion. I also thought that subclass would be OK. I think language fallback should be prioritized except the default (invariant) one.
I'm going to reimplement this feature. If it fit my need then i think it may be useful for someones else. It should be optional and easy to switch to in Serene without modify Serenity Dlls.

authors: DucThanhNguyen volkanceylan

repo: volkanceylan/Serenity