text:
v-slot syntax not working with pug

[x] Read the docs.
[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] This is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.

Describe the bug
v-slot syntax is not working in combination with pug
Reproduction
https://github.com/Shinigami92/vite-pug-error-repro
System Info

vite version: 2.0.5
Operating System: arch linux
Node version: 15
Package manager (npm/yarn/pnpm) and version: yarn 1

Logs (Optional if provided reproduction)

Run vite or vite build with the --debug flag.
Provide the error log here.

 ~/OpenSource/vite-pug-error-repro  main  yarn build --debug                                                                                 ✔  18:01:47
yarn run v1.22.10
$ vite build --debug
  vite:config bundled config file loaded in 189ms +0ms
  vite:config using resolved config: {
  vite:config   plugins: [
  vite:config     'alias',
  vite:config     'vite:dynamic-import-polyfill',
  vite:config     'vite:resolve',
  vite:config     'vite:html',
  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-plugin-vue2',
  vite:config     'vite:define',
  vite:config     'vite:css-post',
  vite:config     'vite:build-html',
  vite:config     'commonjs',
  vite:config     'vite:data-uri',
  vite:config     'rollup-plugin-dynamic-import-variables',
  vite:config     'vite:import-analysis',
  vite:config     'vite:esbuild-transpile',
  vite:config     'vite:terser',
  vite:config     'vite:reporter'
  vite:config   ],
  vite:config   resolve: { dedupe: undefined, alias: [ [Object], [Object] ] },
  vite:config   build: {
  vite:config     target: [ 'es2019', 'edge16', 'firefox60', 'chrome61', 'safari11' ],
  vite:config     polyfillDynamicImport: true,
  vite:config     outDir: 'dist',
  vite:config     assetsDir: 'assets',
  vite:config     assetsInlineLimit: 4096,
  vite:config     cssCodeSplit: true,
  vite:config     sourcemap: false,
  vite:config     rollupOptions: {},
  vite:config     commonjsOptions: { include: [Array], extensions: [Array] },
  vite:config     minify: 'terser',
  vite:config     terserOptions: {},
  vite:config     cleanCssOptions: {},
  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     brotliSize: true,
  vite:config     chunkSizeWarningLimit: 500
  vite:config   },
  vite:config   configFile: '/home/shinigami/OpenSource/vite-pug-error-repro/vite.config.ts',
  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     build: {}
  vite:config   },
  vite:config   root: '/home/shinigami/OpenSource/vite-pug-error-repro',
  vite:config   base: '/',
  vite:config   publicDir: '/home/shinigami/OpenSource/vite-pug-error-repro/public',
  vite:config   command: 'build',
  vite:config   mode: 'production',
  vite:config   isProduction: true,
  vite:config   optimizeCacheDir: '/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/.vite',
  vite:config   server: {},
  vite:config   env: { BASE_URL: '/', MODE: 'production', DEV: false, PROD: true },
  vite:config   assetsInclude: [Function: assetsInclude],
  vite:config   logger: {
  vite:config     hasWarned: false,
  vite:config     info: [Function: info],
  vite:config     warn: [Function: warn],
  vite:config     error: [Function: error],
  vite:config     clearScreen: [Function: clearScreen]
  vite:config   },
  vite:config   createResolver: [Function: createResolver]
  vite:config } +3ms
vite v2.0.5 building for production...
✓ 5 modules transformed.
[vite-plugin-vue2] Unexpected token (1:247)
file: /home/shinigami/OpenSource/vite-pug-error-repro/src/App.pug?vue&type=template&src&lang.js:1:247
error during build:
SyntaxError: Unexpected token (1:247)
    at Parser.pp$4.raise (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:2757:13)
    at Parser.pp.unexpected (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:647:8)
    at Parser.pp.expect (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:641:26)
    at Parser.pp$2.parseBindingList (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:1694:19)
    at Parser.pp$1.parseFunctionParams (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:1231:22)
    at Parser.pp$1.parseFunction (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:1218:8)
    at Parser.pp$3.parseExprAtom (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:2184:17)
    at Parser.<anonymous> (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:6003:24)
    at Parser.parseExprAtom (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:6129:31)
    at Parser.pp$3.parseExprSubscripts (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:2047:19)
    at Parser.pp$3.parseMaybeUnary (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:2024:17)
    at Parser.pp$3.parseExprOps (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:1966:19)
    at Parser.pp$3.parseMaybeConditional (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:1949:19)
    at Parser.pp$3.parseMaybeAssign (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:1925:19)
    at Parser.pp$3.parsePropertyValue (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:2443:87)
    at Parser.pp$3.parseProperty (/home/shinigami/OpenSource/vite-pug-error-repro/node_modules/vue-template-es2015-compiler/buble.js:2434:8)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Note that this is working fine in a Vue 3 project generated with Vite create-app so it's probably a problem specific to Vue 2 template.

Note that this is working fine in a Vue 3 project generated with Vite create-app so it's probably a problem specific to Vue 2 template.

So you mean it could be a bug from vite-plugin-vue2?
Do you have a repro vue 3 + vite + pug using v-slot that you can link here?
Otherwise I could try setup a repro tomorrow.

So you mean it could be a bug from vite-plugin-vue2?

Yes, probably (since this is the only thing different between your setup and mine).

Do you have a repro vue 3 + vite + pug using v-slot that you can link here?

I don't have a small enough repro to share right now, sorry.

@underfin I can confirm vite-plugin-vue2 v1.4 now works 🎉 👍


text:
fix: prevent dev server crashing on malformed URI (fix #6300)

Description

Additional context

What is the purpose of this pull request?

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

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

[x] Read the Contributing Guidelines.
[x] Read the Pull Request Guidelines and follow the Commit Convention.
[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).
[ ] Ideally, include relevant tests that fail without this PR but pass with it.

when there is URIError, the dev server will crash because it didn't catch the error
reprodution : open url like  http://localhost:3000/a%a

would it be better to first try with decodeURI and then without?
decodeURI change was introduced in https://github.com/vitejs/vite/pull/4728

I think that makes sense too. Like some sort of tryDecodeURI utility. The only other place I found which might hit the decode error was viteServeStaticMiddleware, but that middleware is instantiated after viteTransformMiddleware (where this PR fixes), so this PR would indirectly cover viteServeStaticMiddleware too

i just found that there's already a errorMiddleware which can handle the error and prevent crash🤣, whether in transformMiddleware or serveStaticMiddleware, looks like this:

so i correct the return with  next(e) , so the error can be passed to the errorMiddleware to handle it:

@bluwy @patak-dev what do you think is best fallback or showing error message?

Looking back now, I think showing an error message may be safer, since having a fallback might imply that we support it, which we might not. So using next(e) looks good to me. Neat solution too.
@toSayNothing  Re viteServeStaticMiddleware, I'm taking back what I said 😅 viteTransformMiddleware can be skipped, so we need to handle decodeURI for viteServeStaticMiddleware too:
https://github.com/vitejs/vite/blob/8bdb1848dd777f8de9f63b27a7746cec65db5b70/packages/vite/src/node/server/middlewares/static.ts#L71

🤣i have debugged and found that :
connect can handle the Synchronization function 's error , but not the Asynchronous function .
viteServeStaticMiddleware is sync, so it can handle by the connect itself(call try catch)
but the async viteTransformMiddleware will crash the server if not handly by catch(e){return next(e)}

Nice observation @toSayNothing. That's an interesting behaviour from connect. It would sure be nice if it handles promises too, but for now this looks good to me.

source: gharchive/pull-request

authors: Niputi bluwy toSayNothing

repo: vitejs/vite

license: MIT

license_type: permissive

license_source: github-api


text:
fix: make globEntries() implementation more robust

This fixes a bug occurring in vite-plugin-ssr's test suite.
I skipped the PR template, but let me know if I should stick to the PR template even for small changes like this.

@bluwy
Yes that's actually the root cause in my reproduction but I'm not sure why config.optimizeDeps.entries contains an undefined value; vite-plugin-ssr does not define any undefined value on config.optimizeDeps.entries.
I'm happy to further dig this but my thinking is that, regarless of the root cause, a more robust globEntries() implementation is always a good thing.

@bluwy Makes sense, I'll further dig.


text:
Import fails on node 14.16.0, works on node 14.17.0

Describe the bug
On Node.js 14.16.0 some of our tests fail with something similar to:
Error: Failed to load url ./path/to.js (resolved id: ./path/to.js) in /home/runner/work/edge-bundler/edge-bundler/node/stage_2.test.ts. Does the file exist?

Is vitest/vite not working on 14.16.0? If so should we update the engines field in the next 0.x version? Or should this work?
Failing (14.16.0):
https://github.com/netlify/edge-bundler/actions/runs/4324526320/jobs/7549469085
Working (14.17.0):
https://github.com/netlify/edge-bundler/actions/runs/4324542665/jobs/7549507918
Reproduction
https://github.com/danez-labs/vitest-node-14
nvm install 14.16.0 && npm i && npm test
System Info
gitpod /workspace/vitest-node-14 (main) $ npx envinfo --system --npmPackages '{vitest,@vitest/*,vite,@vitejs/*}' --binaries --browsers
npx: installed 1 in 1.117s

  System:
    OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa)
    CPU: (16) x64 AMD EPYC 7B13
    Memory: 10.97 GB / 62.80 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 14.16.0 - ~/.nvm/versions/node/v14.16.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.19.0/bin/yarn
    npm: 6.14.11 - ~/.nvm/versions/node/v14.16.0/bin/npm
  npmPackages:
    vite: 4.1.4 => 4.1.4
    vitest: 0.29.2 => 0.29.2

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.

Personally, I don't think the version should matter here. Looks like a bug or regression.

All I found so far is that on 14.16.0 the id that vitest/vite is trying to resolve is  ./format/javascript.ts whereas on node 14.17.0+ this is /src/format/javascript.ts. So to me it seems that the transform does something different on these node versions? Is there a transform happening for the imports?

All I found so far is that on 14.16.0 the id that vitest/vite is trying to resolve is ./format/javascript.ts whereas on node 14.17.0+ this is /src/format/javascript.ts. So to me it seems that the code transforms do something different on these node versions? Is there a transform happening for the imports?

Yes, Vite preprocesses all files and changes file paths.

source: gharchive/issue

authors: danez sheremet-va

repo: vitest-dev/vitest


text:
fix(coverage): update istanbul-lib-instrument to v6 to fix vulnerable dependency

Update @vitest/coverage-istanbul package's dependency range for istanbul-lib-instrument so that new major is allowed. This requires releasing new version of @vitest/coverage-istanbul.

https://github.com/istanbuljs/istanbuljs/releases/tag/istanbul-lib-instrument-v6.0.0

Also updates istanbul-lib-report to new patch version. This does not require releasing as semver range already allows end users to update their transitive dependencies.

https://github.com/istanbuljs/istanbuljs/releases/tag/istanbul-lib-report-v3.0.1

Ref. https://github.com/vitest-dev/vitest/discussions/3786

The failing test-browser-windows (edge, webkit) seems unrelated.


text:
fix(config): type issue of pool and poolMatchGlobs in defineConfig

Description

Fixed a type issue in the config file, where pool and poolMatchGlob should use Exclude<T> to exclude type "browser" instead of Omit<T>.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

[ ] It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
[ ] Ideally, include a test that fails without this PR but passes with it.
[x] Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

[x] Run the tests with pnpm test:ci.

Documentation

[ ] If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

[x] Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

I wonder why isBrowserEnabled even checks for it. 🤔

It was allowed at the time the function was written. Now the check can be removed.

Great finding @InfiniteXyy - I think I've mixed the Omit and Exclude couple of times before.
The CI error on packages/vitest/src/node/config.ts seems valid. poolMatchGlobs does not allow browser so I wonder why isBrowserEnabled even checks for it. 🤔

Thank you! I removed this check, but I'm not sure if it will affect some exsiting codebase.

authors: InfiniteXyy sheremet-va


text:
rancher

Hi Vito
short question ; do you run rancher on your own cluster?
I followed your instructions (here https://github.com/vitobotta/hetzner-k3s/issues/13) to install it, but can't get it to work properly.

I get a 404 error

is there anything missing from the instructions? Which helm values are you using?
I don't think it has anything to do with creating the cluster, if you might have some time for it, I'll be very grateful!
status of the deployment, seems to be OK:
PS D:\kluster> kubectl -n cattle-system rollout status deploy/rancher
deployment "rancher" successfully rolled out

the deployments:
PS D:\kluster> kubectl get deployments -n cattle-system

NAME              READY   UP-TO-DATE   AVAILABLE   AGE
rancher           3/3     3            3           10m
rancher-webhook   1/1     1            1           9m13s

the ingress:
PS D:\kluster> kubectl get ingress -n cattle-system

NAME                        CLASS    HOSTS                ADDRESS   PORTS     AGE
cm-acme-http-solver-bwjcq   <none>   rancher.mydomain.com             80        10m
rancher                     <none>   rancher.mydomain.com             80, 443   10m

certificate and ingress seems to be OK:
PS D:\kluster> kubectl describe ingress -n cattle-system

Name:             cm-acme-http-solver-bwjcq
Namespace:        cattle-system
Address:
Default backend:  default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
Rules:
  Host                Path  Backends
  ----                ----  --------
  rancher.mydomain.com
                      /.well-known/acme-challenge/YrJZvovWuc7sAMX0UDoDU5iCKRix3nsIOE6dBndGlvU   cm-acme-http-solver-gk64f:8
089 (10.244.2.223:8089)
Annotations:          nginx.ingress.kubernetes.io/whitelist-source-range: 0.0.0.0/0,::/0
Events:               <none>

Name:             rancher
Namespace:        cattle-system
Address:
Default backend:  default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
TLS:
  tls-rancher-ingress terminates rancher.mydomain.com
Rules:
  Host                Path  Backends
  ----                ----  --------
  rancher.mydomain.com
                         rancher:80 (10.244.1.245:80,10.244.2.221:80,10.244.2.222:80)
Annotations:          cert-manager.io/issuer: rancher
                      cert-manager.io/issuer-kind: Issuer
                      meta.helm.sh/release-name: rancher
                      meta.helm.sh/release-namespace: cattle-system
                      nginx.ingress.kubernetes.io/proxy-connect-timeout: 30
                      nginx.ingress.kubernetes.io/proxy-read-timeout: 1800
                      nginx.ingress.kubernetes.io/proxy-send-timeout: 1800
Events:
  Type    Reason             Age   From          Message
  ----    ------             ----  ----          -------
  Normal  CreateCertificate  11m   cert-manager  Successfully created Certificate "tls-rancher-ingress"

Certificate:
PS D:\kluster> kubectl get certificate -n cattle-system

NAME                  READY   SECRET                AGE
tls-rancher-ingress   True    tls-rancher-ingress   12m

all seems to be OK so I dont get it.sign

OK one day of troubleshooting, I get it up and running
seems like Helm does not remove completely everthing when doing an uninstall...


text:
Use default values when no config is specified

It would be easier to deploy cottontail from the release-tarball if no config value would simply result in the default config being taken. In most cases, users will anyway take the default config provided on the repo.

This is not possible at the moment because there is no "default config".  While there are default values for most fields, there is the (required) path to the data folder that does not have a default value.
Furthermore, as with any DBMS, there are values in the config that require fine tuning in an actual setup. So I'm not sure at this point, if not requiring a config-file is a sensible thing to do. But let's assume it was, here are the options I see:

We simply assume a data folder (e.g., relative to cottontail). Since Cottontail DB is a multi-platform application, we can't just go for, let's say, /etc/cottontaildb/data
Data folder can / must be provided via program argument

I presume that with a Docker deployment im mind, option 1 is not optimal since in fact the path to the data folder should be specifiable. Which leaves option 2.
But then again, both add some complexity to the startup procedure with very little obvious gain because one may simply provide a default config with the deployment.

I am not aware of any of the 'big' DBMS that would require you to specify the path where it is supposed to store things to disk during setup. For some of them, it's actually not trivial to change where and how they do so. I'd therefore suggest to use ./data as a reasonable default.

I am not aware of any of the 'big' DBMS that would require you to specify the path where it is supposed to store things to disk during setup. For some of them, it's actually not trivial to change where and how they do so. I'd therefore suggest to use ./data as a reasonable default.

I was merely referring to the other types of settings and I'm not talking about 'required to' but 'having the ability to' .  But that's beside the point. What I'm questioning here, is the advantage of having an implicit 'default config' (in memory) as opposed to an explicit default config that is stored somewhere physically.
But I guess we can settle for this:

If no config file is specified upon startup, Cottontail DB will resort to ./config.json. This is already the case!
New: If there is no configuration file exists under the specified path, Cottontail DB will just go ahead and create one.
New: Default value for the data folder would then be ./data

Would that solve the complications for deployment?

Specifically for Docker usage, I added a little config lookup logic a while ago.
I very much like the two new points @ppanopticon suggested:

New: If there is no configuration file exists under the specified path, Cottontail DB will just go ahead and create one.
New: Default value for the data folder would then be ./data

Specifically for Docker usage, I added a little config lookup logic a while ago.
I very much like the two new points @ppanopticon suggested:

New: If there is no configuration file exists under the specified path, Cottontail DB will just go ahead and create one.
New: Default value for the data folder would then be ./data

Indeed! Thanks @sauterl for weighing in. And maybe to clarify:  Cottontail DB's resorting to ./config.json only happens if all the other options didn't yield a result. Hence, one can actually influence the path to the configuration file via environment variable.
The proposed solution with creating a default config should be fully compatible to all of this.

I would like the functionality of it explicitly creating its config file if none is found. It appears to me as the most intuitive solution.

Then this shall be shipped with the next release, if Silvan agrees as well :-)

Sure, works for me

This has been addressed with the 0.14.0 release.

authors: lucaro ppanopticon sauterl silvanheller

repo: vitrivr/cottontaildb


text:
Open shortcut links in new tab.

Those shortcuts most likely are collection of external URL's. It is very frustrating to navigate web and especially documentations when external sites opens in current tab and location is lost.
P.S. rel=noopener makes it faster and secure. I always use it when linking outside current site.

Thanks

authors: Pilskalns vjeantet

repo: vjeantet/hugo-theme-docdock

license: mit

license_source: bigquery


text:
テンプレートロードのログを減らしたい。

TemplateLoaderで現状コピーごとにログを出力しているが、テンプレートが複雑になるとログが大量に出るので一括して出力することでログ数を減らしたい。

ロードの処理フェーズごとにログをまとめた。
デバッグを楽にするためログにアセットのGUIDとMoveAsset時の結果ログを新たに追加した。

repo: vkettools/VitDeck


text:
Add gt validations to size

param :name, validate: {size: {gte: 3}}

It's a nice alternative to {size: (3..Float32::INFINITY)}.

TIL
macro ∞
  Float64::INFINITY
end

pp! (1..∞)
# (1..(∞)) # => 1..Infinity

I cannot see a usecase for infinite numbers in web endpoints, closing then.

repo: vladfaust/prism


text:
[minidlna] bridge mode / host mode

Can't make work network dlna server discovering with bridge mode.
Also (need to add UPD port to readme?), https://help.ubuntu.com/community/MiniDLNA :
OPEN_TCP="8200"
OPEN_UDP="1900"

It seems, issue related to different networks 172.17.0.0 (container) and 192.1.0.0 (local).  Can you please add to the readme working bridge mode configuration?
ps. host mode works fine.

You need to run the container in host mode for it to be able to receive UPnP broadcast packets. Bridge mode will not work because it separates the container and local network.

So, we need to add --net=host to Readme?

UP. So, we need to remove -p parameter from the readme ?
https://docs.docker.com/network/host/

Note: Given that the container does not have its own IP-address when using host mode networking, port-mapping does not take effect, and the -p, --publish, -P, and --publish-all option are ignored

That sounds like a good idea. I'll update the README and also add a note about the host mode.
Thanks.

I have a question here: why does it not work?

I have a question here: why does it not work?

https://github.com/moby/libnetwork/issues/2397#issuecomment-935029813

authors: LennyLip NelsonVides vladgh


text:
Request for new pip package release version 0.1.8

Is there a timeline for the release of version 0.1.8?
The current version, 0.1.7, does not have support for quantization (AWQ)

it will be 0.2.0, it should happen very soon, since: https://github.com/vllm-project/vllm/issues/1089

@Isydmr Please close this ticket, it has been answered. Thanks.

@Isydmr Sorry for the delay. We will release a new version in a day. Please stay tuned.

authors: Isydmr WoosukKwon sprezz-arthur viktor-ferenczi

repo: vllm-project/vllm


text:
[Bug]: Server crash for bloom-3b while use prefix_caching, AssertionError assert Lk in {16, 32, 64, 128}

Your current environment
vllm v0.4.0.post1 CUDA 12.2

🐛 Describe the bug
[2024-04-17 20:07:13,727] [ERROR] [MainThread] [asyncio] >>>   File "/usr/local/lib/python3.10/dist-packages/vllm/attention/ops/paged_attn.py", line 178, in forward_prefix
[2024-04-17 20:07:13,727] [ERROR] [MainThread] [asyncio] >>>     context_attention_fwd(
[2024-04-17 20:07:13,727] [ERROR] [MainThread] [asyncio] >>>   File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
[2024-04-17 20:07:13,727] [ERROR] [MainThread] [asyncio] >>>     return func(*args, **kwargs)
[2024-04-17 20:07:13,727] [ERROR] [MainThread] [asyncio] >>>   File "/usr/local/lib/python3.10/dist-packages/vllm/attention/ops/prefix_prefill.py", line 639, in context_attention_fwd
[2024-04-17 20:07:13,727] [ERROR] [MainThread] [asyncio] >>>     assert Lk in {16, 32, 64, 128}
[2024-04-17 20:07:13,727] [ERROR] [MainThread] [asyncio] >>> AssertionError
[2024-04-17 20:07:13,727] [ERROR] [MainThread] [asyncio] >>>
[2024-04-17 20:07:13

"n_head": 32

Hey, I had a similar problem and solved it by changing the enable_prefix_caching to False while initalizing the model
Hope it will help

I believe this is because the context attention triton kernel does not support the attention key size in bloom-3b (which is 80). This should be able to be solved once we fully port flashattention kernels or flashinfer kernels. (#4353)

@zhouyuan this pr https://github.com/vllm-project/vllm/pull/4128/files seems solve non-power-of-two head sizes in prefix prefill, but also add an assert while alibi slopes is not None, bloom-3b use alibi and then hit this assert.

@youkaichao i have make a fix to this issue, allow non-power-of-two head sizes in prefix prefill with alibi, this is a small fix based on https://github.com/vllm-project/vllm/pull/4128.

Do you mention the wrong person? It is @zhuohan123 above, but you mentioned @zhouyuan .

Do you mention the wrong person? It is @zhuohan123 above, but you mentioned @zhouyuan .

oh, sorry ~

authors: DefTruth Guy-Shapira youkaichao zhuohan123


text:
[Bug]: Phi-3 vision crash: TypeError: only integer tensors of a single element can be converted to an index

Your current environment
vllm version:
e9de9dd551ac595a9f3825fcd1507deceef4f332

Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.4 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.10.14 (main, May  6 2024, 19:42:50) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-6.5.0-1018-oracle-x86_64-with-glibc2.35
Is CUDA available: N/A
CUDA runtime version: 12.4.99
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration:
GPU 0: NVIDIA H100 80GB HBM3
GPU 1: NVIDIA H100 80GB HBM3
GPU 2: NVIDIA H100 80GB HBM3
GPU 3: NVIDIA H100 80GB HBM3
GPU 4: NVIDIA H100 80GB HBM3
GPU 5: NVIDIA H100 80GB HBM3
GPU 6: NVIDIA H100 80GB HBM3
GPU 7: NVIDIA H100 80GB HBM3

Nvidia driver version: 535.161.07
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.7
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.7
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

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):                             224
On-line CPU(s) list:                0-111
Off-line CPU(s) list:               112-223
Vendor ID:                          GenuineIntel
Model name:                         Intel(R) Xeon(R) Platinum 8480+
CPU family:                         6
Model:                              143
Thread(s) per core:                 1
Core(s) per socket:                 56
Socket(s):                          2
Stepping:                           8
CPU max MHz:                        3800.0000
CPU min MHz:                        0.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 invpcid_single intel_ppin 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 avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req 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:                          5.3 MiB (112 instances)
L1i cache:                          3.5 MiB (112 instances)
L2 cache:                           224 MiB (112 instances)
L3 cache:                           210 MiB (2 instances)
NUMA node(s):                       2
NUMA node0 CPU(s):                  0-55
NUMA node1 CPU(s):                  56-111
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 Retbleed:             Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass:    Vulnerable
Vulnerability Spectre v1:           Vulnerable: __user pointer sanitization and usercopy barriers only; no swapgs barriers
Vulnerability Spectre v2:           Vulnerable, IBPB: disabled, STIBP: disabled, PBRSB-eIBRS: Vulnerable
Vulnerability Srbds:                Not affected
Vulnerability Tsx async abort:      Not affected

Versions of relevant libraries:
[pip3] No relevant packages
[conda] No relevant packages
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: N/A
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0    GPU1    GPU2    GPU3    GPU4    GPU5    GPU6    GPU7    NIC0    NIC1    NIC2    NIC3    NIC4    NIC5    NIC6    NIC7    NIC8    NIC9    NIC10   NIC11   NIC12   NIC13   NIC14   NIC15   NIC16   NIC17   CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NV18    NV18    NV18    NV18    NV18    NV18    NV18    PXB     PXB     NODE    NODE    NODE    NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     0-55    0               N/A
GPU1    NV18     X      NV18    NV18    NV18    NV18    NV18    NV18    NODE    NODE    NODE    PXB     PXB     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     0-55    0               N/A
GPU2    NV18    NV18     X      NV18    NV18    NV18    NV18    NV18    NODE    NODE    NODE    NODE    NODE    PXB     PXB     NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     0-55    0               N/A
GPU3    NV18    NV18    NV18     X      NV18    NV18    NV18    NV18    NODE    NODE    NODE    NODE    NODE    NODE    NODE    PXB     PXB     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     0-55    0               N/A
GPU4    NV18    NV18    NV18    NV18     X      NV18    NV18    NV18    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     PXB     PXB     NODE    NODE    NODE    NODE    NODE    NODE    NODE    56-111  1               N/A
GPU5    NV18    NV18    NV18    NV18    NV18     X      NV18    NV18    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    PXB     PXB     NODE    NODE    NODE    NODE    56-111  1               N/A
GPU6    NV18    NV18    NV18    NV18    NV18    NV18     X      NV18    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    NODE    PXB     PXB     NODE    NODE    56-111  1               N/A
GPU7    NV18    NV18    NV18    NV18    NV18    NV18    NV18     X      SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    NODE    NODE    NODE    PXB     PXB     56-111  1               N/A
NIC0    PXB     NODE    NODE    NODE    SYS     SYS     SYS     SYS      X      PIX     NODE    NODE    NODE    NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS
NIC1    PXB     NODE    NODE    NODE    SYS     SYS     SYS     SYS     PIX      X      NODE    NODE    NODE    NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS
NIC2    NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE     X      NODE    NODE    NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS
NIC3    NODE    PXB     NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE    NODE     X      PIX     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS
NIC4    NODE    PXB     NODE    NODE    SYS     SYS     SYS     SYS     NODE    NODE    NODE    PIX      X      NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS
NIC5    NODE    NODE    PXB     NODE    SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    NODE     X      PIX     NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS
NIC6    NODE    NODE    PXB     NODE    SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    NODE    PIX      X      NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS
NIC7    NODE    NODE    NODE    PXB     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    NODE    NODE    NODE     X      PIX     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS
NIC8    NODE    NODE    NODE    PXB     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    NODE    NODE    NODE    PIX      X      SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS
NIC9    SYS     SYS     SYS     SYS     PXB     NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS      X      PIX     NODE    NODE    NODE    NODE    NODE    NODE    NODE
NIC10   SYS     SYS     SYS     SYS     PXB     NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     PIX      X      NODE    NODE    NODE    NODE    NODE    NODE    NODE
NIC11   SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE     X      NODE    NODE    NODE    NODE    NODE    NODE
NIC12   SYS     SYS     SYS     SYS     NODE    PXB     NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE     X      PIX     NODE    NODE    NODE    NODE
NIC13   SYS     SYS     SYS     SYS     NODE    PXB     NODE    NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    PIX      X      NODE    NODE    NODE    NODE
NIC14   SYS     SYS     SYS     SYS     NODE    NODE    PXB     NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    NODE     X      PIX     NODE    NODE
NIC15   SYS     SYS     SYS     SYS     NODE    NODE    PXB     NODE    SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    NODE    PIX      X      NODE    NODE
NIC16   SYS     SYS     SYS     SYS     NODE    NODE    NODE    PXB     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    NODE    NODE    NODE     X      PIX
NIC17   SYS     SYS     SYS     SYS     NODE    NODE    NODE    PXB     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     SYS     NODE    NODE    NODE    NODE    NODE    NODE    NODE    PIX      X

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

NIC Legend:

  NIC0: mlx5_0
  NIC1: mlx5_1
  NIC2: mlx5_2
  NIC3: mlx5_3
  NIC4: mlx5_4
  NIC5: mlx5_5
  NIC6: mlx5_6
  NIC7: mlx5_7
  NIC8: mlx5_8
  NIC9: mlx5_9
  NIC10: mlx5_10
  NIC11: mlx5_11
  NIC12: mlx5_12
  NIC13: mlx5_13
  NIC14: mlx5_14
  NIC15: mlx5_15
  NIC16: mlx5_16
  NIC17: mlx5_17
(base) ubuntu@compute-permanent-node-406:~/vllm$

Build:
git clone https://github.com/vllm-project/vllm.git
cd ~/vllm
conda create -n vllm -y
conda activate vllm
conda install python=3.10 -y
pip install -e .
pip install hf_transfer
pip install torchvision

Ran:
cd ~/vllm/

# https://github.com/vllm-project/vllm/blob/afed90a0344b1b0ce6aae46efc630adb489ec769/examples/phi3v_example.py#L15
export NCCL_IGNORE_DISABLED_P2P=1
export CUDA_VISIBLE_DEVICES=5
python -m vllm.entrypoints.openai.api_server --port=5063 \
      --host=0.0.0.0 --model microsoft/Phi-3-vision-128k-instruct \
      --tensor-parallel-size=1 --seed 1234 \
      --trust-remote-code \
      --tensor-parallel-size=1 \
      --max-num-batched-tokens=131072 --max-log-len=100 \
      --image-input-type=pixel_values \
      --image-token-id=32044 \
      --image-input-shape="1,3,1008,1344" \
      --image-feature-size=1921 \
      --download-dir=$HOME/.cache/huggingface/hub &> vllm_phi3_vision.log &
disown %1

🐛 Describe the bug
WARNING 06-28 17:03:32 phi3v.py:322] Dynamic image shape is currently not supported. Resizing input image to (1344, 1008).
WARNING 06-28 17:03:32 phi3v.py:322] Dynamic image shape is currently not supported. Resizing input image to (1344, 1008).
ERROR 06-28 17:03:32 async_llm_engine.py:53] Engine background task failed
ERROR 06-28 17:03:32 async_llm_engine.py:53] Traceback (most recent call last):
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/vllm/vllm/engine/async_llm_engine.py", line 43, in _log_task_completion
ERROR 06-28 17:03:32 async_llm_engine.py:53]     return_value = task.result()
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/vllm/vllm/engine/async_llm_engine.py", line 550, in run_engine_loop
ERROR 06-28 17:03:32 async_llm_engine.py:53]     has_requests_in_progress = await self.engine_step()
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/vllm/vllm/engine/async_llm_engine.py", line 523, in engine_step
ERROR 06-28 17:03:32 async_llm_engine.py:53]     request_outputs = await self.engine.step_async()
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/vllm/vllm/engine/async_llm_engine.py", line 236, in step_async
ERROR 06-28 17:03:32 async_llm_engine.py:53]     output = await self.model_executor.execute_model_async(
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/vllm/vllm/executor/gpu_executor.py", line 121, in execute_model_async
ERROR 06-28 17:03:32 async_llm_engine.py:53]     output = await make_async(self.driver_worker.execute_model
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/miniconda3/envs/vllm/lib/python3.10/concurrent/futures/thread.py", line 58, in run
ERROR 06-28 17:03:32 async_llm_engine.py:53]     result = self.fn(*self.args, **self.kwargs)
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/miniconda3/envs/vllm/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
ERROR 06-28 17:03:32 async_llm_engine.py:53]     return func(*args, **kwargs)
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/vllm/vllm/worker/worker.py", line 290, in execute_model
ERROR 06-28 17:03:32 async_llm_engine.py:53]     output = self.model_runner.execute_model(seq_group_metadata_list,
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/miniconda3/envs/vllm/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
ERROR 06-28 17:03:32 async_llm_engine.py:53]     return func(*args, **kwargs)
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/vllm/vllm/worker/model_runner.py", line 753, in execute_model
ERROR 06-28 17:03:32 async_llm_engine.py:53]     hidden_states = model_executable(
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/miniconda3/envs/vllm/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
ERROR 06-28 17:03:32 async_llm_engine.py:53]     return self._call_impl(*args, **kwargs)
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/miniconda3/envs/vllm/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
ERROR 06-28 17:03:32 async_llm_engine.py:53]     return forward_call(*args, **kwargs)
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/vllm/vllm/model_executor/models/phi3v.py", line 376, in forward
ERROR 06-28 17:03:32 async_llm_engine.py:53]     inputs_embeds = self.vision_embed_tokens(
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/miniconda3/envs/vllm/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
ERROR 06-28 17:03:32 async_llm_engine.py:53]     return self._call_impl(*args, **kwargs)
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/miniconda3/envs/vllm/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
ERROR 06-28 17:03:32 async_llm_engine.py:53]     return forward_call(*args, **kwargs)
ERROR 06-28 17:03:32 async_llm_engine.py:53]   File "/home/ubuntu/vllm/vllm/model_executor/models/phi3v.py", line 220, in forward
ERROR 06-28 17:03:32 async_llm_engine.py:53]     sub_img = sub_img[:B_]
ERROR 06-28 17:03:32 async_llm_engine.py:53] TypeError: only integer tensors of a single element can be converted to an index

Ran fine for few days, then hit this.  Unclear exactly what triggered.

I shared my sha: e9de9dd551ac595a9f3825fcd1507deceef4f332
I'm trying latest main now and will see.  If you think it's already fixed, then should be able to close this issue.

@pseudotensor Sounds good - I'm going to close this issue now, but please report back if you find the issue persist!


text:
Working with color image data

Hey, thank you so much for your awesome implementation! I have one problem that I could use some help with. How would you get this to work with color images, such as STL-10?
In the paper I see that they mention "concatenating HOG feature and a 8-by-8 color map to use as input to all algorithms." Unfortunately, I'm finding the original code a bit difficult to sift through...
Do you have any recommendations on how to proceed?

For what it's worth, I decided to move forward using a pre-trained ResNet as my feature extraction method. But, I would still like to hear your comments on it @vlukiyanov

Hey, apologies for the delayed reply. Unfortunately its been quite a while since I last looked into this so wouldn't be able to say; if you do manage to make this work would be great to get a PR as an example, since as you mentioned their original code is a bit hard to grasp when studying this method.

authors: ArminBaz vlukiyanov

repo: vlukiyanov/pt-dec


text:
Refactor agent interfaces to support GroupMember in appliedToGroups

This PR aims to solve the usecase raised by #1753. It fully supports GroupMember in appliedToGroups by making the following changes:

cniserver will notify controller about Pod updates through a EntityReference channel instead of PodReference.
interfaceStore exposes a new GetContainerInterfacesByEntity method instead of GetContainerInterfacesByPod to make it more extensible.
agent reconciler will call GetContainerInterfacesByEntity for each type of GroupMember.

Codecov Report

Merging #1775 (3f2e46a) into master (9d3d10b) will decrease coverage by 20.54%.
The diff coverage is 34.96%.

@@             Coverage Diff             @@
##           master    #1775       +/-   ##
===========================================
- Coverage   63.31%   42.77%   -20.55%
===========================================
  Files         170      108       -62
  Lines       14250    13577      -673
===========================================
- Hits         9023     5807     -3216
- Misses       4292     7283     +2991
+ Partials      935      487      -448

Flag
Coverage Δ

kind-e2e-tests
?

unit-tests
42.77% <34.96%> (+1.49%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/agent/agent.go
11.46% <0.00%> (-37.25%)
:arrow_down:

pkg/agent/agent_linux.go
0.00% <0.00%> (-100.00%)
:arrow_down:

...g/agent/cniserver/interface_configuration_linux.go
5.79% <0.00%> (-14.44%)
:arrow_down:

pkg/agent/cniserver/pod_configuration.go
34.52% <0.00%> (-19.24%)
:arrow_down:

pkg/agent/cniserver/server.go
49.67% <0.00%> (-18.71%)
:arrow_down:

pkg/agent/config/node_config.go
0.00% <0.00%> (-100.00%)
:arrow_down:

...gent/controller/noderoute/node_route_controller.go
32.57% <0.00%> (-13.90%)
:arrow_down:

pkg/agent/controller/traceflow/packetin.go
10.91% <0.00%> (-53.37%)
:arrow_down:

...agent/controller/traceflow/traceflow_controller.go
0.00% <0.00%> (-82.70%)
:arrow_down:

pkg/agent/flowexporter/connections/connections.go
66.15% <ø> (-15.40%)
:arrow_down:

... and 170 more

Codecov Report

Merging #1775 (3f2e46a) into master (9d3d10b) will decrease coverage by 20.54%.
The diff coverage is 34.96%.

@@             Coverage Diff             @@
##           master    #1775       +/-   ##
===========================================
- Coverage   63.31%   42.77%   -20.55%
===========================================
  Files         170      108       -62
  Lines       14250    13577      -673
===========================================
- Hits         9023     5807     -3216
- Misses       4292     7283     +2991
+ Partials      935      487      -448

Flag
Coverage Δ

kind-e2e-tests
?

unit-tests
42.77% <34.96%> (+1.49%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/agent/agent.go
11.46% <0.00%> (-37.25%)
:arrow_down:

pkg/agent/agent_linux.go
0.00% <0.00%> (-100.00%)
:arrow_down:

...g/agent/cniserver/interface_configuration_linux.go
5.79% <0.00%> (-14.44%)
:arrow_down:

pkg/agent/cniserver/pod_configuration.go
34.52% <0.00%> (-19.24%)
:arrow_down:

pkg/agent/cniserver/server.go
49.67% <0.00%> (-18.71%)
:arrow_down:

pkg/agent/config/node_config.go
0.00% <0.00%> (-100.00%)
:arrow_down:

...gent/controller/noderoute/node_route_controller.go
32.57% <0.00%> (-13.90%)
:arrow_down:

pkg/agent/controller/traceflow/packetin.go
10.91% <0.00%> (-53.37%)
:arrow_down:

...agent/controller/traceflow/traceflow_controller.go
0.00% <0.00%> (-82.70%)
:arrow_down:

pkg/agent/flowexporter/connections/connections.go
66.15% <ø> (-15.40%)
:arrow_down:

... and 170 more

It looks good to me conceptually. Though I lacked detailed knowledge to review exact changes. @tnqn and @jianjuns will take charge on this.
Thx for getting this out for review promptly.

It looks good to me conceptually. Though I lacked detailed knowledge to review exact changes. @tnqn and @jianjuns will take charge on this.
Thx for getting this out for review promptly.

/test-all

/test-all

/test-conformance

/test-conformance

/test-all

authors: Dyanngg codecov-io suwang48404

repo: vmware-tanzu/antrea


text:
Include default template rules for packaging resources

What this PR does / why we need it:
This PR include default templateRules for kapp-controller's packaging resources; PackageRepository, PackageInstall and App. Since kapp and kapp-controller are companions it seems helpful.
In particular, the following templateRules are added to the defaults:

PackageRepository (according to spec)

.spec.fetch.inline.pathsFrom[].secretRef
.spec.fetch.inline.pathsFrom[].configMapRef

PackageInstall (according to spec)

.spec.values[].secretRef
.spec.cluster.kubeconfigSecretRef

App (according to spec)

.spec.cluster.kubeconfigSecretRef
.spec.fetch[].inline.pathsFrom[].secretRef
.spec.fetch[].inline.pathsFrom[].configMapRef
.spec.fetch[].imgpkgBundle.secretRef
.spec.fetch[].http.secretRef
.spec.fetch[].git.secretRef
.spec.fetch[].helmChart.repository.secretRef
.spec.template[].ytt.inline.pathsFrom[].secretRef
.spec.template[].ytt.inline.pathsFrom[].configMapRef
.spec.template[].ytt.valuesFrom[].secretRef
.spec.template[].ytt.valuesFrom[].configMapRef
.spec.template[].helmTemplate.valuesFrom[].secretRef
.spec.template[].helmTemplate.valuesFrom[].configMapRef
.spec.template[].cue.valuesFrom[].secretRef
.spec.template[].sops.pgp.privateKeySecretRef

Which issue(s) this PR fixes:

Fixes #596
Does this PR introduce a user-facing change?

Include default template rules for _kapp-controller_'s `PackageRepository`, `PackageInstall` and `App` resources.

Questions for the maintainers:

Is this change wanted at all? From what I can tell, additional template rules are a non-invasive / non-breaking change. However, I can't intuit if this could have unwanted effects on kapp-controller.

After studying the code base, I think to understand that there are no (focused) tests for the default config in general and its template rules in particular. However, this change needs to be tested. Before I invest, I would love to know the maintainers recommendation for covering this. There are unit tests for versioned resources and e2e tests. I imagine tests for the default config to sit in between them, e.g. maybe a default_test.go which contains TestDefaultTemplateRules_{PackageRepository, PackageInstall, App}.
In the meantime, I have manually tested the new rules. See details in comment.

Additional Notes for your reviewer:
Review Checklist:

[ ] Follows the developer guidelines
[ ] Relevant tests are added or updated
[ ] Relevant docs in this repo added or updated
[ ] Relevant carvel.dev docs added or updated in a separate PR and there's
a link to that PR
[ ] Code is at least as readable and maintainable as it was before this
change

Additional documentation e.g., Proposal, usage docs, etc.:

(see PR description for Q about testing)
In the meantime, here's how I've manually tested this change so far.
#! test.yaml
---
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageRepository
metadata:
  name: test
spec:
  fetch:
    inline:
      pathsFrom:
        - secretRef:
            name: test-secret
        - configMapRef:
            name: test-configmap

---
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageInstall
metadata:
  name: test
spec:
  values:
    - secretRef:
        name: test-secret
  cluster:
    kubeconfigSecretRef:
      name: test-secret

---
apiVersion: kappctrl.k14s.io/v1alpha1
kind: App
metadata:
  name: test
spec:
  cluster:
    kubeconfigSecretRef:
      name: test-secret
  fetch:
    - inline:
        pathsFrom:
          - secretRef:
              name: test-secret
          - configMapRef:
              name: test-configmap
    - imgpkgBundle:
        secretRef:
          name: test-secret
    - http:
        secretRef:
          name: test-secret
    - git:
        secretRef:
          name: test-secret
    - helmChart:
        repository:
          secretRef:
            name: test-secret
  template:
    - ytt:
        inline:
          pathsFrom:
            - secretRef:
                name: test-secret
            - configMapRef:
                name: test-configmap
        valuesFrom:
          - secretRef:
              name: test-secret
          - configMapRef:
              name: test-configmap
    - helmTemplate:
        valuesFrom:
          - secretRef:
              name: test-secret
          - configMapRef:
              name: test-configmap
    - cue:
        valuesFrom:
          - secretRef:
              name: test-secret
          - configMapRef:
              name: test-configmap
    - sops:
        pgp:
          privateKeySecretRef:
            name: test-secret

---
apiVersion: v1
kind: Secret
metadata:
  name: test-secret
  annotations:
    kapp.k14s.io/versioned: ""
data:
  config.yml: ""

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: test-configmap
  annotations:
    kapp.k14s.io/versioned: ""
data:
  config.yml: ""

go run cmd/kapp/kapp.go deploy --app test --yes --diff-changes --diff-run --file test.yaml

Target cluster 'https://127.0.0.1:56481' (nodes: kind-control-plane)

@@ create secret/test-secret-ver-1 (v1) namespace: default @@
      0 + apiVersion: v1
      1 + data:
      2 +   config.yml: <-- value not shown (#1)
      3 + kind: Secret
      4 + metadata:
      5 +   annotations:
      6 +     kapp.k14s.io/versioned: ""
      7 +   labels:
      8 +     kapp.k14s.io/app: "1663512989648583000"
      9 +     kapp.k14s.io/association: v1.2af780e8ffab3a405b9c89686418b58a
     10 +   name: test-secret-ver-1
     11 +   namespace: default
     12 +
@@ create configmap/test-configmap-ver-1 (v1) namespace: default @@
      0 + apiVersion: v1
      1 + data:
      2 +   config.yml: ""
      3 + kind: ConfigMap
      4 + metadata:
      5 +   annotations:
      6 +     kapp.k14s.io/versioned: ""
      7 +   labels:
      8 +     kapp.k14s.io/app: "1663512989648583000"
      9 +     kapp.k14s.io/association: v1.3b489d168caf3f033eb1d98e482fc052
     10 +   name: test-configmap-ver-1
     11 +   namespace: default
     12 +
@@ create packagerepository/test (packaging.carvel.dev/v1alpha1) namespace: default @@
      0 + apiVersion: packaging.carvel.dev/v1alpha1
      1 + kind: PackageRepository
      2 + metadata:
      3 +   labels:
      4 +     kapp.k14s.io/app: "1663512989648583000"
      5 +     kapp.k14s.io/association: v1.1d9d3c5a5fa754c7715d4707b9774382
      6 +   name: test
      7 +   namespace: default
      8 + spec:
      9 +   fetch:
     10 +     inline:
     11 +       pathsFrom:
     12 +       - secretRef:
     13 +           name: test-secret-ver-1
     14 +       - configMapRef:
     15 +           name: test-configmap-ver-1
     16 +
@@ create packageinstall/test (packaging.carvel.dev/v1alpha1) namespace: default @@
      0 + apiVersion: packaging.carvel.dev/v1alpha1
      1 + kind: PackageInstall
      2 + metadata:
      3 +   labels:
      4 +     kapp.k14s.io/app: "1663512989648583000"
      5 +     kapp.k14s.io/association: v1.8da39a73cfc4136f8ac556df26e520ea
      6 +   name: test
      7 +   namespace: default
      8 + spec:
      9 +   cluster:
     10 +     kubeconfigSecretRef:
     11 +       name: test-secret-ver-1
     12 +   values:
     13 +   - secretRef:
     14 +       name: test-secret-ver-1
     15 +
@@ create app/test (kappctrl.k14s.io/v1alpha1) namespace: default @@
      0 + apiVersion: kappctrl.k14s.io/v1alpha1
      1 + kind: App
      2 + metadata:
      3 +   labels:
      4 +     kapp.k14s.io/app: "1663512989648583000"
      5 +     kapp.k14s.io/association: v1.93248f12c712bc5436fdd56b8be5641d
      6 +   name: test
      7 +   namespace: default
      8 + spec:
      9 +   cluster:
     10 +     kubeconfigSecretRef:
     11 +       name: test-secret-ver-1
     12 +   fetch:
     13 +   - inline:
     14 +       pathsFrom:
     15 +       - secretRef:
     16 +           name: test-secret-ver-1
     17 +       - configMapRef:
     18 +           name: test-configmap-ver-1
     19 +   - imgpkgBundle:
     20 +       secretRef:
     21 +         name: test-secret-ver-1
     22 +   - http:
     23 +       secretRef:
     24 +         name: test-secret-ver-1
     25 +   - git:
     26 +       secretRef:
     27 +         name: test-secret-ver-1
     28 +   - helmChart:
     29 +       repository:
     30 +         secretRef:
     31 +           name: test-secret-ver-1
     32 +   template:
     33 +   - ytt:
     34 +       inline:
     35 +         pathsFrom:
     36 +         - secretRef:
     37 +             name: test-secret-ver-1
     38 +         - configMapRef:
     39 +             name: test-configmap-ver-1
     40 +       valuesFrom:
     41 +       - secretRef:
     42 +           name: test-secret-ver-1
     43 +       - configMapRef:
     44 +           name: test-configmap-ver-1
     45 +   - helmTemplate:
     46 +       valuesFrom:
     47 +       - secretRef:
     48 +           name: test-secret-ver-1
     49 +       - configMapRef:
     50 +           name: test-configmap-ver-1
     51 +   - cue:
     52 +       valuesFrom:
     53 +       - secretRef:
     54 +           name: test-secret-ver-1
     55 +       - configMapRef:
     56 +           name: test-configmap-ver-1
     57 +   - sops:
     58 +       pgp:
     59 +         privateKeySecretRef:
     60 +           name: test-secret-ver-1
     61 +

Changes

Namespace  Name                  Kind               Age  Op      Op st.  Wait to    Rs  Ri
default    test                  App                -    create  -       reconcile  -   -
^          test                  PackageInstall     -    create  -       reconcile  -   -
^          test                  PackageRepository  -    create  -       reconcile  -   -
^          test-configmap-ver-1  ConfigMap          -    create  -       reconcile  -   -
^          test-secret-ver-1     Secret             -    create  -       reconcile  -   -

Op:      5 create, 0 delete, 0 update, 0 noop, 0 exists
Wait to: 5 reconcile, 0 delete, 0 noop

Succeeded

Thanks for the PR! Gonna take a closer look at this first thing Monday ❤

Hey @mamachanko ! So sorry I totally responded to this on my brain. I verified that all Secret and ConfigMap references.
Would you be open to adding a test for this? I will look up and drop links to similar tests if that helps!

I verified that all Secret and ConfigMap references.

Nice. Thanks for going over them!

Would you be open to adding a test for this?

Yes, I'd be happy to. I will test a few limited cases first and check in with you to vet the approach before going through the full lot.

@100mik I won't be able to add tests right away, because time and obligations. There's no rush here, is that right?
In the meantime, if you are able to point me at existing tests, that'd be helpful. However, as far as I can tell, no tests exercise the default configuration's templating rules yet.

Hey! Absolutely no rush from our side.
Today, the only test we have for template rules is an E2E test. I think the example you shared above is perfect ! It can be captured in an E2E test in a similar manner (like the existing one).
It might be cool to figure out if we can have tabular unit tests for template rules. But that would definitely be a separate PR altogether 🤔

@100mik

I think the example you shared above is perfect ! It can be captured in an E2E test in a similar manner (like the existing one)

To have an e2e test with example shared by @mamachanko will require installation and deletion of kapp-controller as well, as  CRDs of PackageInstall, App and PackageRepository will require to deploy these resources.  I think installation of kapp-controller  will be bit heavy in e2e test.
Alternative of this could be adding of  CRDs  of these resources in the manifest instead of using kapp-controller might be helpful.

Yep that makes sense, I think deploying the latest kapp-controller release while applying only CRDs using filters.
And we just need to check the diff, so we can set --wait=false while testing the template rules 🤔

@kumaritanushree @100mik Before committing to an E2E test scenario, I wanted to explore a more unit-style approach. After discovering all the required types and APIs I drafted a table-driven default_template_rules_test.go.

@mamachanko I was also thinking to have unit test instead of E2E for this scenario. For template rules we already have E2E test via versioned resources. I am fine fine with this. 👍

@kumaritanushree @100mik Before committing to an E2E test scenario, I wanted to explore a more unit-style approach. After discovering all the required types and APIs I drafted a table-driven default_template_rules_test.go.

@mamachanko I was also thinking to have unit test instead of E2E for this scenario. For template rules we already have E2E test via versioned resources. I am fine with this. 👍

Thank you!
default_template_rules_test.go now tests the newly added template rules for kapp-controller's resources.
The PR is ready for review. 🔍

default_template_rules_test.go now tests the newly added template rules for kapp-controller's resources.

@mamachanko  I think file name should be default_test.go so that if in future if required we can add test for other rules as well in the same file.
default_template_rules_test.go  sounds like this will have only test for template rules.

default_template_rules_test.go now tests the newly added template rules for kapp-controller's resources.

@mamachanko I think file name should be default_test.go so that if in future if required we can add test for other rules as well in the same file. default_template_rules_test.go sounds like this will have only test for template rules.

@kumaritanushree  Great point. Renamed the file. ✔

LGTM
@mamachanko just one unresolved comment.

authors: 100mik kumaritanushree mamachanko

repo: vmware-tanzu/carvel-kapp


text:
[wip] Clusterclass quickstart and cluster topology templates for vm and e2e

What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #574
Additional information
This PR is on hold until #573 gets merged
Special notes for your reviewer

Codecov Report

Merging #575 (499e22f) into main (8857aba) will decrease coverage by 0.21%.
The diff coverage is n/a.

:exclamation: Current head 499e22f differs from pull request most recent head 6522c5b. Consider uploading reports for the commit 6522c5b to get more accurate results

@@            Coverage Diff             @@
##             main     #575      +/-   ##
==========================================
- Coverage   67.81%   67.60%   -0.22%
==========================================
  Files          27       28       +1
  Lines        2399     2380      -19
==========================================
- Hits         1627     1609      -18
- Misses        664      667       +3
+ Partials      108      104       -4

Impacted Files
Coverage Δ

agent/main.go
19.55% <0.00%> (-1.29%)
:arrow_down:

agent/installer/bundle_downloader.go
71.87% <0.00%> (-0.76%)
:arrow_down:

...trollers/infrastructure/byoadmission_controller.go
81.48% <0.00%> (-0.34%)
:arrow_down:

agent/cloudinit/cloudinit.go
76.66% <0.00%> (ø)

apis/infrastructure/v1beta1/byocluster_webhook.go
88.88% <0.00%> (ø)

...ontrollers/infrastructure/byomachine_controller.go
65.63% <0.00%> (+0.07%)
:arrow_up:

agent/reconciler/host_reconciler.go
81.48% <0.00%> (+0.49%)
:arrow_up:

...frastructure/v1beta1/byoclustertemplate_webhook.go
89.47% <0.00%> (+7.65%)
:arrow_up:

agent/cloudinit/cmd_runner.go
100.00% <0.00%> (+37.50%)
:arrow_up:

LGTM.
Good to merge as #573 is also merged?

Thanks @shamsher31 . But currently I am doing testing for this PR on VMs, so once I will be done, then I will remove the [WIP] tag and could merge this.

Testing is done on VMs. PR is ready for review


text:
Add loadBalancerIP field in VirtualMachineService

Being able to statically assign IP addresses to LoadBalancer type VirtualMachineService is a very common ask from users;
Adding this field enables this functionality in the API implementation/Providers

@corrieb @sreyasn could you please take a look?

The LoadBalancerIP will be mutually exclusive with the ClusterIP right? If so, can you also update the comments for ClusterIP as well stating so.

@janitha thx for your response!
no, I don't think they're mutually exclusive. loadBalancerIP is used to specify the static IP for external LoadBalancer when Service is type LoadBalancer and the LB provider supports it.
ClusterIP is used to specify the service's internal Cluster IP, implemented by kube-proxy.
Actually, this field is yet another field we copied from the upstream corev1.Serivce.spec: https://github.com/kubernetes/api/blob/master/core/v1/types.go#L4124

@janitha thx a lot!
do you mind merging it? I don't seem to have the write access...

authors: janitha maplain

repo: vmware-tanzu/vm-operator-api


text:
Drag and drop on touch screens

Summary
Summary the request and address the questions as appropriate.

What is the change?

The clrDraggable functionality currently starts the drag action directly. This is not very intuitive on touch devices, especially as we use dnd in a tree view (which is scrollable). On touch the drag and drop action should first wait for a user to hold an item for an x amount of time. On normal mouse-based interaction the dnd action could still happen directly.
For as far as I can see touch events can easily be captured like:
touchstart
touchmove
touchend

Why should it go in Clarity?

To support touch-based devices in a better way.

Does this change impact existing behaviors? If so how?

No, because normal dnd could / should still happen instantly, without holding.

If this change introduces a new behavior, is this behavior accessible?
...

Use case
We have an application where we rely heavily on drag and drop (with the built in directives of Clarity). We know that 50% of our users will use the app on a touch device, and the current implementation of dnd interferes with what they know and like from interacting with these touch devices.
Examples
https://patrickhlauke.github.io/touch/
Workarounds
Implementing your own drag-and-drop system, which is not ideal.

Hi @skipgeldens , thanks for filing this issue. This is a known issue for me. In fact, I have started working to solve this issue. As you suggested, my plan is to offer an input property that defines the sensitivity/hold period of drag start. So keep an eye out for PRs for this issue :)

Hi @Shijir , has there been any progress to this issue? We really like the drag and drop implementation that is currently in Clarity, but fixing this issue would make it just perfect!

@skipgeldens I got back to this issue recently and actively working on it now.

authors: Shijir skipgeldens

repo: vmware/clarity


text:
[UI] clr- prefix for css classes

Using postcss to generate two versions of css files:

one where every classname is prefixed with clr-
one where old classname and prefixed version coexist to allow the client app to migrate at their own pace

Note that the script order in build:ui matters, since one of them change the css files in place as opposed to generating a new file.
Signed-off-by: Jeeyun Lim jeeyun.lim@gmail.com

Just to follow up, we discussed keeping this open until Matt has the other PRs ready so we can see them all together first, but otherwise this is good to me.

this solution is problematic. we are pushing past 1.0 to find a better way to do this.

authors: gnomeontherun jeeyun mathisscott


text:
prepare file didn't support python3.5+

Raised SyntaxError when I run sudo ./install.sh, my python version is 3.5, here is the error log:
[Step 1]: preparing environment ...
  File "./prepare", line 60
    os.makedirs(folder, mode=0600)
                                ^
SyntaxError: invalid token

Please fix this, thanks :)

@Folyd, thanks for pointing this issue.
The prepare is now only support Python2, appreciate if you can contribute a PR to fix it.

Hi @Folyd – happy to help walk you through the contribution process if you're interested. Else I'll keep this open and we'll do our best to get to it soon.

authors: Folyd clouderati wy65701436

repo: vmware/harbor


text:
vdk-core: Fix issue with serializing Decimal values during payload check

As part of the ingestion process, the payload passes a
check to verify it is JSON serializable. However,
json.dumps does not natively support serializing
Decimal objects, which leads to the check failing when
it should not. This change fixes this problem by amending
the JsonEncoder object to convert Decimals to floats
during the check.
Note that this does not affect the actual ingestion of
Decimal objects, merely the serialization check.
Testing done: TBD
Signed-off-by: Gabriel Georgiev gageorgiev@vmware.com

I know the PR is about decimal, but it might be a good moment to think about other common types - e.g. timestamps and such . If they'd break something.

authors: gageorgiev tozka

repo: vmware/versatile-data-kit


text:
Try to fix the problem #136 on Linux.

I feel sorry to remove your code, but this is my current answer to solve the problem of #136.
If you have any other good solution, please throw away this PR.
At least I believe the problem will be solved by this PR once, and you will also be able to try to reuse the past code again later.
In that meaning, this could be a workaround until finding a better solution in future.
Thanks in advance, and I really hope this great project will proceed well.

Yes, the code would solve the problem but it make c2m not x86-64 ABI compatible.  So I cannot accept this pull request.
My goal is to design MIR in such way that it permits to implement the current (and future) target call ABIs and still keep code generated for one target working on another target (in other words to keep MIR machine independent).
In LLVM IR it is solved by having structure types and passing values of them in calls.
I don't want complicate MIR by introducing aggregate types only for parameter passing.  Therefore to achieve my goals in this summer I added block args (and results) and va_stack_arg to read them as va args.  But your problem report reveals a case when it does not work (only for x86-64 target and structure args passed by regs).
c2m implementation in this case violates MIR semantics (va_stack_arg should read args passed as blocks but it passes them by parts as registers according to x86-64 C ABI). There is no way currently to know in the called functions how an va arg was passed by block or by parts through registers.
The problem is severe.  It will require changes of MIR design and generated MIR code by c2m.  I guess it will take sometime to solve this problem.  First I need to think what changes will be needed on MIR level for this and still keep my major design goals for MIR.

I see, I am sorry I didn't care about x86-64 ABI.
I understood your situation and understood it is a design issue for x86-64.
I hope you can find a good breakthrough.
Thanks for your long comment. I think I did understand all you want to say.
And thanks again for taking your time.

I should thank you that you found this issue before I started to work on the release.  I really appreciate this.
I have some ideas how to fix this.  I just need to do some research on the ABIs of the future targets.  I hope all ABI issues will be fixed during the next couple weeks.  It is now the most urgent MIR project work for me.

authors: Kray-G vnmakarov

repo: vnmakarov/mir


text:
希望VNConda增加离线登录功能

环境

操作系统: Windows 10
Anaconda版本: VNConda
vn.py版本: VNConda 2.0

Issue类型
三选一：Enhancement
预期程序行为
1，希望VNConda增加离线登录功能，成功登录一次，以后可以离线登录。原因在于防止 vnpy.com 出现异常无法登录的情况，用户的VNConda无法使用，造成不必要的资金损失。
2，VNStation的弹窗，增加最小化按钮。
实际程序行为
1，需要登录才能使用VNConda
2，VNStation弹窗无法最小化在后台
重现步骤
针对Bug类型Issue，请提供具体重现步骤以及报错截图

VNConda主要提供图形化启动vn.py交易程序的功能，vnpy.com连不上的情况下用户也可以通过脚本来启动vn.py
已经增加最小化到托盘的功能

authors: qzm vnpy

repo: vnpy/vnpy


text:
More intuitive UI: VOC2GUI 2.0

After the usage of VOC2GUI at 36c3, some valuable feedback was collected to improve the first UI version. The following mock-up represents an UI which aims to make VOC2GUI more intuitive to beginners while keeping flexibility for advanced users as well as preventing unlucky cuts even better.
Main features:

Preview: It's known what will go live, camera positions can be adjusted beforehand
Presets: Beginners may not have to deal with composition, "shortcut" for advanced users
Direct source selection (selection via video, not via composite buttons): More intuitive, space saving
Extension panel: Space for future extensions while keeping main elements (screens, source selection, composite, ...) always on screen
Tabs: Multiple UIs for different User Groups (Advanced/Beginner video mixers, Audio mixer, AV-Technicians, ...) possible
Green means "Live": Keeps red reserved for  warnings at special event (like "Slides changed, switch now")

I like several things about this UI concept.

showing the preview composite is what we want!
selecting source by clicking them instead of using extra buttons saves a lot space
having preset presets and custom presets is nice
preview of the presets is a good idea
if we manage to get those speaker photos somehow the caption (insertion) section is much better to use than the current one
the chat also looks great and useful

Many interesting ideas. thx Silvan

Looks nice.
But the Live/Offline needs much better visibility than just a small toggle in the upper right corner, imho.

@derchrisuk Thanks for your feedback! The video output feed has a red bar if the stream is offline and a green one if the output is live. How else could the visibility be improved? The toggle itself is meant to be so small since one doesn't need it most of the time

Looking at details the preset previews could be entitled too like Sources but with "Presets". Then you wouldn't have to add "Preset" to every name within the previews' titles. Instead you might add modifiers to the titles.
I also don't like the "Save Preset" button because I don't get what I could expect when I press it. I think we don't need it. Instead something like Ctrl+Mouse or Alt+Shit+# (like it says) would be much easier.

Will add the "Preset" header as you proposed. The "Preset"-suffix is thought to be a recommendation by the system, the admin can set any name he wants tho.
Modifiers like Edit buttons? Would give this option on a right click, since it is not really a common use case to edit the titles (the right click for more options / edit should be a pattern in the software).
Could there a better caption for the Save-Preset-Button? I'd rather add an explaining tooltip instead of removing the button, since there definitely are people who want to use a mouse instead of remembering short cuts. Maybe the Button could be in a group called "Preview" instead of "Presets" to make clear, that it saves a preview as preset?
In general, I believe, that the function of this button is easy enough to understand after a one-time-explanation (or tooltip)

For me this UI approach has some problems which you can find in many Video / VJ tools. There is no optical difference between UI elements that show the operator in an intuitive way how elements belong together and which are important and which not.

preview and pgm have the same size
channel previews and resulting compositions have the same size and same orientation / position in the UI
Buttons and elements that display things have the same color, design and layout
with the preview of the presets we have 4 layers of live image which is IMHO very un-inutive. You see the image coming from the source, the image of a possible composition, the image of the preview as selected and the live program on the other hand we miss the preview of the stream

Besides that the click / touch ways are very long as UX elements are distributed instead of grouped.
Until know we tried to reach for simplicity and intuitive in contrast to what most other tools provide. We inherited this from dvswitch which followed the same idea.
Needless to say that things like the preview are a wanted feature for a long time i strongly believe we need to keep the complexity low for the operator and we should include the preview in a way that is intuitive for the operator what he is looking at.

The discussion so far mixes new feature (preview etc) with design. We should separate that as all the feature ware already on the roadmap and are independent from a new design.

True, but we also need a UI concept that leads us somewhere (esp. the composition preview which changes the layout completely). But you're right: As we start to prototype or implement the underlying features, we have to separate them.

The discussion so far mixes new feature (preview etc) with design. We should separate that as all the feature ware already on the roadmap and are independent from a new design.

True, but we also need a UI concept that leads us somewhere (esp. the composition preview which changes the layout completely). But you're right: As we start to prototype or implement the underlying features, we have to separate them.

I would argue that we should define the "some where" before we put much work in it. But as usual: its just my opinion / experience and this is free software so it should not stop anybody from doing what they think is best.

@derpeter Thanks for the feedback!

preview and pgm have the same size color layout etc

Could you please clarify what the "pgm" is? How and why should the preview window be layouted / sized compared to the pgm, in your opinion?

Buttons and elements that display things have the same color, design and layout

Could you give an example for such a button and element? In which ways and why should buttons and "elements, that display things" differ from each other?

we miss the preview of the stream

The yellow themed preview window on the left shows what will go to the stream once "Cut" or "Transition" is clicked. What else do you mean with "preview of the stream"? The only thing I can think of at the moment that is NOT visible in the current UI is the output when the stream is offline (so one doesn't see the pause screen). This is because I think the video that will go live once the stream is online again is more relevant than the pause screen.

Besides that the click / touch ways are very long as UX elements are distributed instead of grouped.

This is a fair point! I tried to keep the distances in mind and make the movements feel somewhat balanced, but due to the direct source selection, the movements have to be larger. Though: Most Experts probably favor hotkeys and barely use the mouse. For Beginners on the other hand, the extra half second one needs for the mouse movement might mean to be able to think longer of the current step, which helps to reduce errors. Plus, some smart behaviour of the software and the Presets minimize mouse movements.

we should include the preview in a way that is intuitive for the operator what he is looking at

What is currently unintuitive about the preview (the big screen on the left)? How does the operator does not understand what he is looking at? How could the complexity be lowered?

channel previews and resulting compositions have the same size and same orientation / position in the UI

As stated earlier in this thread, I'd add another group title "Presets" above the Presets (like the one above sources). Is this sufficient? If not, how should it be done?

Hello,
a) PGM (Programm) is what in "professional" video mixers is the main out. In vocotomix it currently is one big preview image in center which goes out to the main mix and the stream mix.
b) In your screenshot (or mocup, i cant tell) e.g. video box borders, the gray boxes at the bottom and all buttons are flat design, same boarders same colors no highlight. It is (at least for me) not intuitive what is an element i can interact with and whats not.
c) by preview of the stream i mean a preview of the stream. Whats in you yellow box is the preview of what will be shown after a take / transition. This is usually called preview or prev. As voctomix is more than normal video mixers we produce a "second pgm" which is like the main pgm but e.g. is blinded in the breaks between the talks for the privacy of the people in the room. A preview for this second PGM seems to be missing. We didn't have the in the past but it turned out in the since we have it that it is very useful to assure a correct stream.
d) hotkeys a fine, we are also working to integrate hardware panel like elgato stream deck. But especial for that it very useful to have a somehow structed button box on the screen that can be aimed by the hardware / hotkeys. As our UI is dynamic with the number of sources and other options it es very helpfull for non professionals if layout is always more or less similar regarding the position of the buttons.
e) for me it es very unintutive to have same sized boxes with (the to video container at the top and the 8 at the bottom which only can be understood by the text above them. there is no clear Main or are recognizable order of the bottom ones. This is very similar to many "professionell" video mixer and one of the reasons (at least for me) to work on an alternative.
f) i dont understand the relation between the UI issue (which is the same as in e) ) and your question. Presets are fine can be useful but that has nothing todo with screen layouts.

Hello again,
a) Thanks for the clarification of PGM. I can only assume that you wish the PGM to be bigger and more "in focus"? I would strongly not recommend such a layout, since, for the video mixer, it is more important to see what is about to go live than what is currently live. Layouting both equally is reasonable to me, plus it takes the fewest vertical space. At all, I'd make the preview even larger.
c) When it comes to the "real" PGM Preview, showing the second PGM if main PGM is not live, I am uncertain how important this is to the video mixer. Video mixers were never instructed to check the pause screen, so even if there were failures, video mixers would not have been trained to deal with them. To a video mixer, it is more important to know what is going to be live, something that is not shown by the current software at all.
Following compromise: The default displayed in when being "not live" is the main PGM (as mocked up above), but there is a button to toggle the "real" PGM (showing the second PGM). Alternatively, a Tab for people checking the real PGM could be implemented.
b) Isn't the current design flat as well? Also, flat design is now well adopted by every major software, because users have learned to deal with it. Why is this design suddenly problematic?
d) I didn't know about that use case, thanks for bringing it up! Requesting a button box would mean to disallow direct source selection, which is, to me, a major advantage of this UI. If it's just about the proper mapping of UI to Elgato stream deck, we could go with the current layout and check if people can handle it. Another solution were a Tab for people using stream decks (which then offers a completely different UI with such a button box).
e) I think we've come down to the underlying differences of our understandings of what is important for the video mixer. My understanding: Most important for the video mixer is what he can see. It's only secondary to know whether this is camera 2 or preset side-by-side. The mixer just has to see all the available options and select the best fitting one. That's why I never aimed to give the 8 boxes below a hierarchy.
That being said, I'd like to know what you think would be a proper order or hierarchy for all these boxes. Could you sketch out or describe a little example?

Maybe #320 implements some of the requested changes (still no mix-preview though).

authors: Kunsi SilvanVerhoeven derchrisuk derpeter fightling

repo: voc/voctomix


text:
perftest: update dashboard (use also metrics with voedger prefix)

The metric names were updated. Please update perftest dashboards

See also: #892 (performance dashboard in GitHub)

Perftest dashboard updated. Now use "voedger" prefix.

authors: AlekseiPonomarev michael-say

repo: voedger/voedger


text:
$ is not a function, line: 22

Hello,
I was using plugin since 1.1.6 version, and everything was OK till version 0.2.3 where line 9 changed from "jquery" to "$".
Is it intended ?
Now I get error like in subject with standard jQuery (1.11.3) ready to run scripts: jQuery(function($) { /*...*/ }
Regards

Hey, can you please update? It should be fixed with the latest release. v0.2.4

v0.2.4 works good, thank You!

Sure, thanks for noticing, I added a test, so that this can not happen again. :)

authors: Naki lukasoppermann


text:
not able to filter data in tab

I want to show data in tabs just like customer and his orders.
In my case its employee and his bank details,in Employee grid when i set BankGrid.EmpId = (entity.EmpId).ToString();  this filters data but addEmployee button is not functionable.It shows error
TypeError: Cannot read property 'toString' of undefined.
and if i comment BankGrid.EmpId = (entity.EmpId).ToString(); then it doesn't filter bank data according to employee
Thanx in Advance...

Where are you writing this code? Your entity.EmpId is null. You should check for null before calling toString. Write such code in LoadEntity method.

In Employee Dialog
namespace Serene.Employees
{
using jQueryApi;
using Serene.Employees.Employees;
using Serenity;
using System.Collections.Generic;
[IdProperty(EmployeesRow.IdProperty), NameProperty(EmployeesRow.NameProperty)]
[FormKey("Employees.Employees"), LocalTextPrefix(EmployeesRow.LocalTextPrefix), Service(EmployeesService.BaseUrl)]
public class EmployeesDialog : EntityDialog<EmployeesRow>
{
    protected EmployeesForm form; //change in Exam master
    private EmployeesEmployeeBanksGrid BankGrid;
   // private ExamSectionDetailsGrid SectionDetailGrid;
  //  private ExamQuestionsGrid QuestionGrid;

    public EmployeesDialog()
    {
        //form = new EmployeesForm(this.IdPrefix);
        BankGrid = new EmployeesEmployeeBanksGrid(this.ById("BankGrid"));
        BankGrid.Element.FlexHeightOnly();
        tabs.OnActivate += (e, i) => this.Arrange();

        //SectionDetailGrid = new ExamSectionDetailsGrid(this.ById("SectionDetailGrid"));
        //SectionDetailGrid.Element.FlexHeightOnly();
        //tabs.OnActivate += (e, i) => this.Arrange();

        //QuestionGrid = new ExamQuestionsGrid(this.ById("QuestionGrid"));
        //QuestionGrid.Element.FlexHeightOnly();
        //tabs.OnActivate += (e, i) => this.Arrange();
    }
    protected override void LoadEntity(EmployeesRow entity)
    {
        base.LoadEntity(entity);
       // tabs.SetDisabled("BankInfo", this.IsNewOrDeleted);
       BankGrid.EmpId = (entity.EmpId).ToString();

    }

}

}
In EmployeeEmployeeBanksGrid
using System;
using System.Collections.Generic;
using System.Text;
namespace Serene.Employees.Employees
{
using jQueryApi;
using Serene.Employees;
using Serene.Employees.Employees;
using Serenity;
[DialogType(typeof(EmployeesEmployeeBanksDialog))]

public class EmployeesEmployeeBanksGrid : EmployeeBanksGrid
{
public EmployeesEmployeeBanksGrid(jQueryObject container)
: base(container)
{
}
protected override void InitEntityDialog(string itemType, Widget dialog)
{
base.InitEntityDialog(itemType, dialog);
Serenity.SubDialogHelper.Cascade((EmployeeBanksDialog)dialog, this.Element.Closest(".ui-dialog"));
}
protected override void AddButtonClick()
{
EditItem(new EmployeeBanksRow
{
EmployeeId = int.Parse(employeeId)
});
}
    protected override string GetInitialTitle()
    {
        return null;
    }
    protected override void CreateToolbarExtensions()
    {
        base.CreateToolbarExtensions();

       // CustomerFilter.Element.Closest(".quick-filter-item").Remove();
    }

    protected override bool GetGridCanLoad()
    {
        return base.GetGridCanLoad();
    }

    private string employeeId;

    public string EmpId
    {
        get { return employeeId; }
        set
        {
            if (employeeId != value)
            {
                employeeId = value;
                SetEquality(EmployeeBanksRow.Fields.EmployeeId, EmpId);
                Refresh();
            }
        }
    }
}

}

BankGrid.EmpId = entity.EmpId == null ? null : entity.EmpId.ToString();

thanx, I have changed my code
BankGrid.EmpId = entity.EmpId == null ? null : entity.EmpId.ToString();
but when i click on new Employee it shows all records from EmployeeBanks
and also addEmployeeBanks is not functioning it is giving jquery error
Syntax error, unrecognized expression: #Serene_Employees_Employees_$EmployeesEmployeeBanksDialog70_Form

Please check sample again. Your GetGridCanLoad is empty.

great man,this solved my issue

Any Idea on jquery error,not able to add bank details...

I have no idea, wonder where does $ in this expression comes from:
#Serene_Employees_Employees_$EmployeesEmployeeBanksDialog70_Form

Hope you resolved issue

repo: volkanceylan/Serenity


text:
How to Hide Details Editor ?

Hello Everyone,
Details Query i here..
I have Cost Field in master Dialog,master dialog also contains list for Details.
I want To Show Details Editor if n only if Cost Of master is Loaded I.e Available..
Thank In Advance..
Aniket

the these utilities https://github.com/dfaruque/Serenity.Extra#to-hide-a-field-in-a-dialog

Thanx Buddy..@dfaruque

hey @dfaruque
giving error while using Extra package
#2960


text:
LookupEditor in XYZForm.cs

Hi,
I want to be able to call LookupEditor in the XYZForm.cs instead of the XYZRow.cs. This is because I have declared different Lookup scripts for various forms for the Same entity. After declaring it, the interface shows a textfield instead of a dropdown. Find the code and image below. The DrillType field is supposed to be a dropdown.
Please help
namespace MinRepExtension.Survey.Forms
{
    using Serenity;
    using Serenity.ComponentModel;
    using Serenity.Data;
    using System;
    using System.ComponentModel;
    using System.Collections.Generic;
    using System.IO;
    using Serenity.Data.Mapping;

    [FormScript("Survey.DrillRing")]
    [BasedOnRow(typeof(Entities.DrillRingRow), CheckNames = true)]
    public class SlotRingForm
    {
        public Int32 DrillPlanId { get; set; }
        [LookupEditor("LookUps.SlotNew")]
        public Int32 DrillTypeId { get; set; }
        public Int32 RingId { get; set; }
        public Decimal Metres { get; set; }
        public String DrillRingComments { get; set; }
    }
}

Could you please also post your lookup code here? then we can identify the problem

Hi @Nathan2020-0126 ,
Find below the lookup code.
using MinRepExtension.LookUps.Entities;
using Serenity.ComponentModel;
using Serenity.Data;
using Serenity.Web;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MinRepExtension.Modules.LookUps.UGLevel
{
    [LookupScript("LookUps.SlotNew", Permission ="?")]
    public class SlotNewLookup : RowLookupScript<DrillTypeRow>
    {
        public SlotNewLookup()
        {
            IdField = "DrillTypeId";
            TextField = "DrillTypeName";
        }

        protected override void PrepareQuery(SqlQuery query)
        {
            //base.PrepareQuery(query);
            var fld = DrillTypeRow.Fields.As("fld");

            query
                .Select(fld.DrillTypeId, fld.DrillTypeName)
                .From(fld)
                .Where(new Criteria(fld.DrillTypeName) == "Slot");
        }

        protected override void ApplyOrder(SqlQuery query)
        {
        }
    }
}


text:
Default client example not working.

Hi there!
When I try to use the default client example found on your GitHub page (https://github.com/voryx/Thruway), I get the following error:
PHP Catchable fatal error:  Argument 1 passed to Ratchet\Client\Factory::Ratchet\Client{closure}() must be an instance of React\Stream\DuplexStreamInterface, instance of React\Stream\Stream given, called in /home/zairc/triviabot-dev/vendor/react/promise/src/FulfilledPromise.php on line 25 and defined in /home/zairc/triviabot-dev/vendor/ratchet/pawl/src/Factory.php on line 48
I'm using PHP 5.5.9 on an Ubuntu 14.04 system.  I used Composer (as per instructions) to install Thruway.
Please advise.

@WesleyChannon Can you share your composer.lock file?

Appears as if I had an older install that was conflicting somehow. Deleted the entire install, and started from scratch. Resolved the issue.

authors: WesleyChannon davidwdan

repo: voryx/Thruway


text:
Help - Session storage for (de)authentication

I tried using the google group which is supposed to be a better fit, but I didn't get a reaction, so I'll try here. I apologize if I'm being just too impatient, but it seems activity is a bit higher here.
https://groups.google.com/forum/#!topic/thruway/ainEdP-yf3M
In short: I'm stuck trying to authenticate using information I only have during onHello(), while I'd need it during onAuthenticate(). I could pass it back to the client and have it resend it, but I don't want to trust my clients more than necessary. Please read the detailed description of my issue above.

@WGPSenshi The challenge details can be set by the onHello as the second return argument.
return [
    'CHALLENGE',
    (object)[
        'challenge' => 'my_challenge',
        'challenge_method' => 'some_method',
        '_some_arbitrary_property' => [ 'any', 'json_serializable', 'stuff' ]
    ]
];

The entire second element of the array is stored in the session and is available during onAuthenticate as $args[0]->extra (I think - I have not tried this - just reading through router source).
Here is where the AuthenticationManager sets up the stuff it sends to onAuthenticate: https://github.com/voryx/Thruway/blob/d7dcf4ea117df081fd0500c2234f63b45f7214ff/src/Authentication/AuthenticationManager.php#L419-L428
You can also authenticate sessions during the onHello by sending back NOCHALLENGE and setting the authid property on the second return argument.
If you need further help, it would be helpful to me if you posted some source code.

You are correct, that's how I could make it work. But: If I return the data from onHello, it is sent back to the client, which then sends it back to the server during onAuthenticate. That leaves an opening for the client to alter that data, which it should not be able to do. The client will never need and should never have that nugget of information.
The router uses the PHPSESSID cookie to look up if there in fact is an active phpsession with that id, and retrieves the associated userid if available. It also stores the trifecta of userid, websocket-sessionid and PHPSESSID internally, so I can later query and manipulate it (check if session still valid, or deauthenticate it if user logs out via REST).
At that point, I could already return SUCCESS, but I can't do that during onHello, so I'd need to send that info straight to onAuthenticate, without the "detour" via the client.
I'll see about providing a code sample tomorrow.

The extra information is not generated from the client, but is sent to the client. It is pulled back out of the session.

authors: WGPSenshi mbonneau


text:
Allow much larger ids in postgres db

Some VIP users generate ids for their data that are larger than Postgres's INTEGER type. This changes all id fields (and their references) to be BIGINTs to accommodate that.

Sweet. LGTM.

authors: bwreid tie-rack

repo: votinginfoproject/data-processor


text:
[FR] Add support for audio samples

Are there any plans to add audio support to this project?

Hey @lminer 👋
Can you share a bit more about what you’d like to do with audio? Your use case, what you do today, etc.
You can currently listen to audio when playing back video datasets in the App, and we’re also planning to add spectrograms.
In general, audio is something that comes up pretty often and supporting it is definitely plausible.

Sure thing! We work in audio source separation so spectrogram visualization with masks would be useful. I didn't realize you could play back audio already. That would also be very helpful.
Another basic use case that we have is that some of our data is poorly labeled. Basically, we could have a file that is labeled as a bass, when actually it is a bass vocalist, or a bass clarinet or a synthesizer, etc. It seems like voxel51 could be very helpful for this, although I imagine that the base model that you have for generating embeddings wouldn't transfer very well to audio spectrograms.

Any news on supporting audio samples?
It would be cool, if audio files can be labeled/viewed like in Raven Sound Analysis.

This would be awesome!

authors: LimitlessGreen brimoor jpaasen lminer