[bug] Window maximized tauri config option not working

Describe the bug
When the maximized setting in the tauri.conf.json file is set to true, the window is not maximized when the application first starts.
When the maximized value is set to true, it does seem to change from one large size to a smaller size very rapidly. So it seems to be maximized at first for a split second, but then gets changed to the default size of 1000 x 1000 that I have set in the tauri.conf.json file.
If I set the maximized value to false, this quick size change glitch does not occur.

[!Note]
I am not using the Window State or Window Customization plugins in my application.

tauri.conf.json

{
    "$schema"<EMAIL_ADDRESS>    "productName": "smart-desk",
    "version": "1.0.0-preview.7",
    "identifier": "com.engaged-agility.dev",
    "build": {
        "beforeBuildCommand": "pnpm run build-ui",
        "beforeDevCommand": "pnpm run dev-front-end",
        "frontendDist": "../out",
        "devUrl": "http://localhost:3000"
    },
    "bundle": {
        "active": true,
        "category": "Business",
        "copyright": "2024",
        "targets": [
            "app",
            "appimage",
            "deb",
            "dmg",
            "nsis"
        ],
        "externalBin": [],
        "icon": [
            "icons/32x32.png",
            "icons/128x128.png",
<EMAIL_ADDRESS>            "icons/icon.icns",
            "icons/icon.ico"
        ],
        "windows": {
            "certificateThumbprint": null,
            "digestAlgorithm": "sha256",
            "timestampUrl": ""
        },
        "longDescription": "(S)cheduling (M)anagment (A)dmin (R)eporting (T)ool",
        "macOS": {
            "entitlements": null,
            "exceptionDomain": "",
            "frameworks": [],
            "providerShortName": null,
            "signingIdentity": null
        },
        "resources": [],
        "shortDescription": "Admin Tool",
        "linux": {
            "deb": {
                "depends": []
            }
        },
        "createUpdaterArtifacts": true
    },
    "plugins": {
        "updater": {
            "pubkey": "redacted",
            "endpoints": [
                "https://localhost:8000/latest-release-meta-data"
            ]
        }
    },
    "app": {
        "withGlobalTauri": true,
        "windows": [
            {
                "title": "SMART Desk",
                "center": true,
                "fullscreen": false,
                "resizable": true,
                "maximized": false,
                "width": 1000,
                "height": 1000
            }
        ],
        "security": {
            "csp": null,
            "capabilities": [
                "main-capability"
            ]
        }
    }
}

Reproduction

Set at least 1 window object in the tauri.conf.json file to have a maximized setting to a value of true."app": {
    "withGlobalTauri": true,
    "windows": [
        {
            "title": "SMART Desk",
            "center": true,
            "fullscreen": false,
            "resizable": true,
            "maximized": true, // SET THIS TO TRUE
            "width": 1000,
            "height": 1000
        }
    ]
}

Set the size to a relative small value to make sure that it is obvious that the window is not maximized.
Do not use the Window State or Window Customization plugins with any custom code to interfere with the setting.
Run the application with pnpm tauri dev or equivalent.
Observe that the window is not maximized.

Expected behavior
With the maximized setting set to a value of true in the tauri.conf.json file, I expected the window to be maximized upon startup.
Full tauri info output
[✔] Environment
    - OS: Windows 10.0.22631 x86_64 (X64)
    ✔ WebView2: 130.0.2849.56
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.82.0 (f6e511eec 2024-10-15)
    ✔ cargo: 1.82.0 (8f40fc59f 2024-08-21)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 20.15.0
    - pnpm: 9.12.3
    - npm: 10.7.0

[-] Packages
    - tauri 🦀: 2.0.6
    - tauri-build 🦀: 2.0.2
    - wry 🦀: 0.46.2
    - tao 🦀: 0.30.3
    - @tauri-apps/api : 2.0.2 (outdated, latest: 2.0.3)
    - @tauri-apps/cli : 2.0.2 (outdated, latest: 2.0.4)

[-] Plugins
    - tauri-plugin-shell 🦀: 2.0.2
    - @tauri-apps/plugin-shell : 2.0.1
    - tauri-plugin-fs 🦀: 2.0.3
    - @tauri-apps/plugin-fs : 2.0.1
    - tauri-plugin-store 🦀: 2.1.0
    - @tauri-apps/plugin-store : 2.1.0
    - tauri-plugin-updater 🦀: 2.0.2
    - @tauri-apps/plugin-updater : 2.0.0
    - tauri-plugin-process 🦀: 2.0.1
    - @tauri-apps/plugin-process : 2.0.0

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../out
    - devUrl: http://localhost:3000/
    - framework: React (Next.js)
    - bundler: Vite

Stack trace
N/A

Additional context
No response

I wasn't able to reproduce this issue, please try again with latest tauri release, if the issue still happens please ping me and provide a minimal repro.

I wasn't able to reproduce this issue, please try again with latest tauri release, if the issue still happens please ping me and provide a minimal repro.

Will do.  I plan on updating to the latest version of Tauri soon anyways.  Thanks!!

@amrbashir I wanted to update you on the situation.
I updated all of my Tauri dependencies to the latest version as of this morning, and when I set the 'maximized' value to true, the window is not maximized when the app first runs.

please provide a minimal repro as I can't reproduce at all, also make sure you're not using tauri-plugin-window-state which will unmaximize the window if it wasn't maximized in the saved state.

please provide a minimal repro as I can't reproduce at all, also make sure you're not using tauri-plugin-window-state which will unmaximize the window if it wasn't maximized in the saved state.

@amrbashir
I have taken the app and pushed it to this public repo. Since this is a client application, I have stripped everything away except for the login page.
I have also already set the maximized value to true.
I am also not using the tauri-plugin-window-state plugin.
Let me know if you need anything else.

@amrbashir
I noticed that this issue has been closed.  I was wondering if you were able to reproduce the issue with the public repository that I have created which you requested?

yeah, seems to be an issue when using center with maximized

looking at your reproduction, you are not using the latest<EMAIL_ADDRESS>updating to that, fixes the issue.


Bump the version of build_bazel_rules_apple.

Seems kokoro isn't happy with the latest bazel version. Abandoning this change.


Comment system

[ ] Show comment list on post detail
[ ] Visitor can post comment

[ ] Verify login using google account

For tech blog, maybe can using https://giscus.app/
It's just optional, so implement like plugin, we can choose comment system by config file


Create JAX Advanced Tutorials (section, move/create docs)

@jakevdp

@jakevdp PTAL

As we discussed, the structure of the left-nav dropdown is still not exactly how we'd like it, but we can land and iterate. Thanks for working on this!


Sanitize any strings injected as html into the DOM with DOM Purify

Need
We are now dangerouslySettingInnerHTML in the explorer app, and we need to make sure we sanitize (remove any code/script tags) that may be in the injected HTML. We are getting the HTML from dbGaP, so it "should"  be ok. But we need to sanitize to be on the safe side.  This is to help prevent XSS attacks where code form the injected HTML attempts to modify or extract secrets from the running application.
Approach
See this document here: https://blog.logrocket.com/using-dangerouslysetinnerhtml-in-a-react-application/
Seems a popular library for this is DOM Purify. There is also an experimental browser Sanitize API that does not seem to be widely implemented yet. I would like us to use DOM Purify to sanitize the dbGaP HTML string before we inject it.
We at least need to sanitize here:
https://github.com/clevercanary/data-browser/blob/2bae8be1b451e29557fc06e4e6c95c4328e39cf5/explorer/app/components/common/Markdown/markdown.tsx#L9
But also search the explorer codebase for any places where it should be used.

complete


Slow boot time on RetroStone 2 Pro

I have a quite fresh RetrOrangePi_v4.3_Armbian_Retrostone2_PRO_bionic_dev_5.3.13_desktop_v3 install without only few games and I just clockwatched the boot time:
51 seconds until RetrOrangePi 4.3 terminal motd
56 seconds until EmulationStation splash screen
1:06 minutes until ready to use.
Feels quite long time to wait every time when starting device. I noticed there's some python scripts in startup for example for music that I have disabled, does these slow it down? What other factors we have? Could this be improved?

The boot time from MY Retrostone 2 Pro (with same Image, 64GB SD Card, and 1900 Roms) until ready to use is approximately 40-45 seconds!
Unfortunately I cannot give you any tips on this, as I am very little familiar with it myself!
But maybe I could still help you a little with my boot time.


Transform copy/paste buttons

Pressing the C (Copy) button and the P next to the rotation part of a transforms does not work.
Ability to copy/paste the whole position or scale also does not work.

Unity: 2021.3.18f1
GUIUtils: both 2.4.0 and 2.5.0
Side note:
Copy Euler angles and quaternion options do work.

After a call with @GlennQuintyn, Copy and Pasting does work but it does not set any data to the OS/system clipboard. Unity's own implementation does this, but ours removes this feature. We will take this into account for a future release


Implement Redirects

If we realize there's a mistake in a molecule (e.g., two molecules are really identical) we need a redirect table:
Original InChI Key -> New InChI Key

Fixed with commit 9e018f7a178b8b49a6bac256f0dc4bbb7f63769e


Rclone.conf issue /w setup.sh

Hey madslundt. So when I was playing around with my fork I noticed that the rclone.conf was not properly setting the local-crypt and was missing the GD folder after the local-crypt even though it shows it in the template. I tried to look through to see how you set that, but didn't figure it out off hand. Want to take a look at that?
[local-crypt]
type = crypt
remote = /opt/cloud-media-scripts/.cloud-encrypt
filename_encryption = standard

remote = <ENCRYPTED_FOLDER>/**<GOOGLE_DRIVE_MEDIA_DIRECTORY>**
FYI, my googledrive in config is Media.

I just tried on the latest version and it sets the remote correct.
Do you have the latest setup.sh and rclone.template.conf?

So odd, I ran it again and it worked this time. I know it was same commands. Can't repeat so closing.


New Plugin Configuration steps

Hi Team,
Kindly share configuration documents with steps to configure the new Plugin which will be useful to configure and test the new plugin.
We implemented a new plugin but we are not able to integrate it with kobs. Maybe we are missing some configuration ?.Please share detailed configuration steps.
Thanks,
Harry

Hi @nshvr, information about how to develop a plugin can be found in the following file develop-a-plugin.md.
To integrate your plugin you can use the kobsio/app template. More information on how to add a plugin there can be found here: https://kobs.io/contributing/using-the-kobsio-app/
I also create a plugin, to rework these parts of the documentation, please let me know what is still missing so I can add the missing parts in #208.

@ricoberger It seems something is missing in the document after adding in index.tsx and in plugins.GO we are getting the below error:

package plugins

import (
	"net/http"

	"github.com/kobsio/kobs/pkg/api/clusters"
	"github.com/kobsio/kobs/pkg/api/plugins/plugin"

	"github.com/go-chi/chi/v5"
	"github.com/go-chi/render"

	// Import all plugins, which should be used with the kobs instance. By default this are all first party plugins from
	// the plugins folder.
	//"github.com/kobsio/kobs/plugins/applications"
	//"github.com/kobsio/kobs/plugins/clickhouse"
	//"github.com/kobsio/kobs/plugins/dashboards"
	//"github.com/kobsio/kobs/plugins/elasticsearch"
	//"github.com/kobsio/kobs/plugins/flux"
	//"github.com/kobsio/kobs/plugins/jaeger"
	//"github.com/kobsio/kobs/plugins/kiali"
	//"github.com/kobsio/kobs/plugins/markdown"
	//"github.com/kobsio/kobs/plugins/opsgenie"
	//"github.com/kobsio/kobs/plugins/prometheus"
	//"github.com/kobsio/kobs/plugins/resources"
	//"github.com/kobsio/kobs/plugins/rss"
	//"github.com/kobsio/kobs/plugins/sql"
	//"github.com/kobsio/kobs/plugins/teams"
	//"github.com/kobsio/kobs/plugins/users"
	"github.com/kobsio/app/pkg/plugins/helloworld"
        "github.com/AkshayDubey29/plugin-splunk/app/pkg/splunk"
)

// Config holds the configuration for all plugins. We have to add the configuration for all the imported plugins.
type Config struct {
	//Applications  applications.Config  `json:"applications"`
	//Clickhouse    clickhouse.Config    `json:"clickhouse"`
	//Dashboards    dashboards.Config    `json:"dashboards"`
	//Elasticsearch elasticsearch.Config `json:"elasticsearch"`
	//Flux          flux.Config          `json:"flux"`
	//Jaeger        jaeger.Config        `json:"jaeger"`
	//Kiali         kiali.Config         `json:"kiali"`
	//Markdown      markdown.Config      `json:"markdown"`
	//Opsgenie      opsgenie.Config      `json:"opsgenie"`
	//Prometheus    prometheus.Config    `json:"prometheus"`
	//Resources     resources.Config     `json:"resources"`
	//RSS           rss.Config           `json:"rss"`
	//SQL           sql.Config           `json:"sql"`
	//Teams         teams.Config         `json:"teams"`
	//Users         users.Config         `json:"users"`
        splunkPlugin    splunk.Config        `json:"splunk"`

	HelloWorld helloworld.Config `json:"helloworld"`
}

// Router implements the router for the plugins package. This only registeres one route which is used to return all the
// configured plugins.
type Router struct {
	*chi.Mux
	plugins *plugin.Plugins
}

// getPlugins returns all registered plugin instances.
func (router *Router) getPlugins(w http.ResponseWriter, r *http.Request) {
	render.JSON(w, r, router.plugins)
}

// Register is used to register all api routes for plugins.
func Register(clusters *clusters.Clusters, config Config) chi.Router {
	router := Router{
		chi.NewRouter(),
		&plugin.Plugins{},
	}

	router.Get("/", router.getPlugins)

	// Register all plugins
	//router.Mount(resources.Route, resources.Register(clusters, router.plugins, config.Resources))
	//router.Mount(applications.Route, applications.Register(clusters, router.plugins, config.Applications))
	//router.Mount(teams.Route, teams.Register(clusters, router.plugins, config.Teams))
	//router.Mount(users.Route, users.Register(clusters, router.plugins, config.Users))
	//router.Mount(dashboards.Route, dashboards.Register(clusters, router.plugins, config.Dashboards))
	//router.Mount(prometheus.Route, prometheus.Register(clusters, router.plugins, config.Prometheus))
	//router.Mount(elasticsearch.Route, elasticsearch.Register(clusters, router.plugins, config.Elasticsearch))
	//router.Mount(jaeger.Route, jaeger.Register(clusters, router.plugins, config.Jaeger))
	//router.Mount(kiali.Route, kiali.Register(clusters, router.plugins, config.Kiali))
	//router.Mount(flux.Route, flux.Register(clusters, router.plugins, config.Flux))
	//router.Mount(opsgenie.Route, opsgenie.Register(clusters, router.plugins, config.Opsgenie))
	//router.Mount(clickhouse.Route, clickhouse.Register(clusters, router.plugins, config.Clickhouse))
	//router.Mount(sql.Route, sql.Register(clusters, router.plugins, config.SQL))
	//router.Mount(markdown.Route, markdown.Register(clusters, router.plugins, config.Markdown))
	//router.Mount(rss.Route, rss.Register(clusters, router.plugins, config.RSS))
        router.Mount(splunk.Route, splunk.Register(clusters, router.plugins, config.Splunk))
	router.Mount(helloworld.Route, helloworld.Register(clusters, router.plugins, config.HelloWorld))

	return router
}

```tsx
import React from 'react';
import ReactDOM from 'react-dom';

import './index.css';

import { App } from '@kobsio/plugin-core';

import helloWorldPlugin from './plugins/helloworld';
import splunkPlugin from './plugins/splunk';

ReactDOM.render(
  <React.StrictMode>
    <App plugins={{
      ...resourcesPlugin,
      ...teamsPlugin,
      ...usersPlugin,
      ...applicationsPlugin,
      ...dashboardsPlugin,
      ...prometheusPlugin,
      ...elasticsearchPlugin,
      ...jaegerPlugin,
      ...kialiPlugin,
      ...fluxPlugin,
      ...opsgeniePlugin,
      ...markdownPlugin,
      ...rssPlugin,
      ...clickhousePlugin,
      ...sqlPlugin,
      ...helloWorldPlugin,
      ...splunkPlugin,
    }} />
  </React.StrictMode>,
  document.getElementById('root')
);

Tried to add explicitly but didn't work, is there anything needs to be added?

Hi @AkshayDubey29, I think the import path in the plugins.go is wrong, can you try the following please:

In cmd/kobs/plugins/plugins.go use github.com/kobsio/app/pkg/plugins/splunk as import.
In pkg/plugins/splunk/splunk.go use github.com/kobsio/app/pkg/plugins/splunk/pkg/instance as import.

Do you know why are we getting this error now?
16:40:47 $ react-scripts build
16:40:50 Creating an optimized production build...
16:43:29 Failed to compile.
16:43:29
16:43:29 /kobs/app/src/plugins/splunk/components/page/PageToolbar.tsx
16:43:29 TypeScript error in /kobs/app/src/plugins/splunk/components/page/PageToolbar.tsx(63,9):
16:43:29 Property 'time' is missing in type '{ timeEnd: number; timeStart: number; }' but required in type 'IPluginTimes'.  TS2741
16:43:29
16:43:29     61 |         ...tmpData,
16:43:29     62 |         fields: fields,
16:43:29   > 63 |         times: { timeEnd: timeEnd, timeStart: timeStart },
16:43:29        |         ^
16:43:29     64 |       });
16:43:29     65 |     }
16:43:29     66 |
16:43:29

There was a breaking change introduced in https://github.com/kobsio/kobs/pull/181, which isn't released yet.
To fix this issue you can add the time property or you can wait for the next release v0.7.0 where this property is removed.
I'm currently working on another plugin, after that I can trigger a new release. Maybe I can get this done today in the afternoon.

I release v0.7.0 and updated the kobsio/app template. So if you update all your packages to v0.7.0 the times property shouldn't be required anymore.

Thank you :)
I tried but got the below error, might be I am missing some config

Did you run go mod tidy in the root of your repository?
If you can provide me a link to your repository I can also have a detailed look if you want.

I sincerely apologize @ricoberger  But we are building this to internal network which I suppose you cannot access :(
We are trying to build the whole application internal to our network, but facing issues

@ricoberger Any idea why are we getting this error, we have copied this folder https://github.com/kobsio/kobs/tree/main/plugins/core to https://github.com/kobsio/app/tree/main/app/src/plugins to build our own version of kobs:

I think it would be better to move the content from the https://github.com/kobsio/kobs/tree/main/plugins/core/src folder to a folder named https://github.com/kobsio/app/tree/main/app/src/plugins/core. So that the https://github.com/kobsio/kobs/blob/main/plugins/core/src/index.ts file is then at https://github.com/kobsio/app/blob/main/app/src/plugins/core/index.ts.
Then you can import everything from the core package via import { <COMPONENT> } from './plugins/core';.
Please keep in mind that you also have to add all the dependencies from https://github.com/kobsio/kobs/blob/main/plugins/core/package.json to your package.json.

You mean to ay in this package.json https://github.com/kobsio/app/blob/main/app/package.json right?

Might be this is happening because of dependency only:

We have put the version which we want to build, can you have a look and let us know what are we missing?
https://github.com/AkshayDubey29/internal-kobs

Any Missing Part, trying to build istio plugin.

You mean to say in this package.json https://github.com/kobsio/app/blob/main/app/package.json right?

Yes correct.

Might be this is happening because of dependency only

This looks like, you also have to create a typings.d.ts file in the https://github.com/kobsio/app/blob/main/app/src folder, with the content of the following file https://github.com/kobsio/kobs/blob/main/typings.d.ts. (When you created this file the https://github.com/kobsio/app/blob/main/app/typings.d.ts file can/must be deleted).
This should also fix the cytoscape-node-html-label is not a module error.

Thanks @ricoberger , let me check

Hi @ricoberger Do you know which component I am missing

If you will see in above image cluster ID is getting populated but when I pulled internal image, Cluster ID and namespace is not getting populated.

Hi @AkshayDubey29 the cluster and namespace is coming from the ClustersContextProvider component. Which is set in the following file https://github.com/kobsio/kobs/blob/main/plugins/core/src/components/app/App.tsx

Even If I am going inside I am seeing Plugin not found but I have added the same:

@ricoberger Can you tell me where exactly we need to copy tsconfig.json and tsconfig.esm.json in https://github.com/kobsio/app/app/src/plugin/ or in https://github.com/kobsio/app/pkg/plugin/
So for example for the Prometheus plugin if we will take in from default that case where do we need to put https://github.com/kobsio/kobs/blob/main/plugins/prometheus/tsconfig.json
As I am noticing we are unable to read https://github.com/kobsio/kobs/blob/main/plugins/core/src/components/app/App.tsx and that is happening because of tsconfig.json and tsconfig.esm.json

@AkshayDubey29 the tsconfig.json and tsconfig.esm.json file for each plugin can be deleted, when you copy the whole code of a plugin.
For the Prometheus example it should be enough if you copy the content from https://github.com/kobsio/kobs/tree/main/plugins/prometheus/src into https://github.com/kobsio/app/tree/main/app/src/plugins/prometheus and add the dependencies from https://github.com/kobsio/kobs/blob/main/plugins/prometheus/package.json to your package.json.
For the Go part you can then prometheus.go file and the pkg/instance folder into a new folder https://github.com/kobsio/app/tree/main/pkg/plugins/prometheus
It is possible that you have to adjust some of the import paths in the plugin yourself.
I'm not sure how good this will work, because it might be possible that there are dependencies between plugin and the case of copying the whole code of plugins is not really covered/intended. A better way would be to add the plugins via the NPM packages and for Go via Git like it is done in the kobsio/app example.

Even If I am going inside I am seeing Plugin not found but I have added the same:

For this error, can you check if the /api/plugins and /api/clusters does return some data, maybe the problem is within your modification of the Go code and not within the frontend.

@ricoberger  /api/plugins and /api/clusters both are returning correct values.

@ricoberger Where should we put https://github.com/kobsio/kobs/tree/main/pkg/api

@ricoberger Where should we put https://github.com/kobsio/kobs/tree/main/pkg/api

This shouldn't be necessary, the package is imported by https://github.com/kobsio/app/blob/main/cmd/kobs/kobs.go. If you want to copy it you can place it in https://github.com/kobsio/app/tree/main/pkg and adjust the imports in the kobs.go file.
I'm still not really sure, what you try to achieve, but it sounds like your are copying a lot of code from the kobsio/kobs to kobsio/app. Maybe for this case it is better to use a fork of https://github.com/kobsio/kobs.
https://github.com/kobsio/app is only intended to add custom plugins and not to modify the core code of kobs or core plugins.
Might this be an option for you or can you explain your requirements a bit more?

I would close the issue for now. If you still have issues please let me know.

Thank you for your support
On Fri, Dec 24, 2021, 3:16 PM Rico Berger @.***> wrote:

Closed #207 https://github.com/kobsio/kobs/issues/207.
—
Reply to this email directly, view it on GitHub
https://github.com/kobsio/kobs/issues/207#event-5813175888, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AJIC54CHAO334ONKAO2JWQTUSQ6Q5ANCNFSM5IJ2NHXQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID:
@.***>


Error: Cannot find module 'xxx'

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

[ ] 1. The issue provides a reproduction available on
Github,
Stackblitz
or
CodeSandbox

Make sure to fork this template and run yarn generate in the terminal.
Please make sure Mesh package versions under package.json matches yours.

[ ] 2. A failing test has been provided
[ ] 3. A local solution has been provided
[ ] 4. A pull request is pending review

Describe the bug
 Error: Cannot find module '@graphql-mesh/cache-localforage'
      at <unknown> (graphcommerce/examples/magento-graphcms/.next/server/chunks/6807.js:1:118)
      at async T (graphcommerce/examples/magento-graphcms/.next/server/chunks/6807.js:1:1749) {
    code: 'MODULE_NOT_FOUND'
  }

It definitely is installed and we don't have any nested node_modules, cleared the yarn.lock and the node_modules directories. It seems the mesh build works but when using it inside next.js it is failing.
If we comment out the cache-localforage in the .mesh.ts it breaks on the next import. We can consistently reproduce it on multiple deveices and multiple node versions.

To Reproduce Steps to reproduce the behavior:
Import the .mesh in a nextjs project and try to load a page it will throw the error.

Expected behavior

If we replace the occurences of
await defaultImportFn(moduleName)`

with
await import(moduleName).then((m) => m.default || m)

everything works as expected and it builds. Maybe something changed in the latest release?
Environment:

OS: MacOS
@graphql-mesh/...: latest
NodeJS: 18 / 20

Additional context
If I go to a release before this commit https://github.com/ardatan/graphql-mesh/commit/93fb3643d90c52084725d79b586ace8ecd570911 it starts working again.

@ardatan Thanks a lot! ❤


Number of Groups a user member of

In this article it was mentioned, user can be member of 1000 groups. However the below article says a user can be part of any number of groups. Which one is correct?
https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#active-directory-limits

Hello @GaneshPrabuBaburaj! Thank you for the feedback. Can you please tell us to which article(s) your question applies? This will help us route the issue to the correct writer/team.

Hi @denisebmsft , The question is belong to the below article
https://docs.microsoft.com/en-us/microsoft-365/admin/create-groups/office-365-groups?view=o365-worldwide#group-limits

Hi @denisebmsft , Hope you are in track of this question.

Hi @yogkumgit , Hope we are in track of this question. Could you please update, which article is correct?

Closing via #2382


Missing Triangles with Packed Arrays on 4.16

Maybe a dumb question as this is still listed as a 4.15 plugin, but I wanted to know if this is a known issue atm., or if I should dig into the problem further...
I am using the latest branch, and creating packed arrays from data that previously worked with ProceduralMeshComponents.
The resultant mesh renders ok, but is missing a number of triangles, in a fairly regular pattern.
I am basically pumping the vertex data into an array like this, in a loop..
            Vertices.Add(                          FRuntimeMeshVertexSimple(                                                   m_vNode[j].m_vPosition,                                                   m_vNode[j].m_vNormal,                                                   FRuntimeMeshTangent(0,0,1),                                                   FColor(0,0,0),                                                   m_vNode[j].m_fTexCoord                                                   ));         }
Previously I was pushing the same vertex data to individual arrays thus..
                for (unsigned int j=0; j<count; j++) {                     Vertices.Add(m_vNode[j].m_vPosition);                     Normals.Add(m_vNode[j].m_vNormal);                     UV0.Add(m_vNode[j].m_fTexCoord);                 }
The index data has not changed.

Well that's new..  Any chance you'd show the rest of how you're building both vertices and indices?   Since it's just an array and the RMC just copies it around internally and never alters it I'm not sure why that would change anything.

Thanks for your reply. And also, thanks for the work you have done on RMC.
The creation of the vertex data and the indices is not trivial, so probably not easy to share a good example here. It's some code of mine that's about 10 years old, and has moved from OpenGL on a Mac, through iOS and now into UE4. It's for procedural terrain generation. That being said, having been through porting this to UE4 and fixing winding orders and so on I am pretty sure the generation side is solid.
I was more concerned that some MACRO magic might be borking the copy operations with the Vertex format. I've noticed your other conversations here about custom vertex structures and being on discord. I was trying to simplify this over the weekend and ran into similar issues with custom vertex structures as MJLaukala. So some of your comments to him were helpful.
My question here was more about asking if there was a known issue on 4.16, which it seems there isn't.  ;)

I wont lie, that generic vertex is a cluster ****.   It's kind of morphed over time from something far simpler to that mess of templates/macros it is now.   The one I built for the new version is almost entirely macros, so while it's still pretty nasty, it at least generates a simple struct with no inheritance or templates or anything else so intellisense works far better with it, debugging is far easier (try to look at the position component of one of those in the debugger some time lol )
Your example for building the vertices there is basically the same setup I've used time and again. So unless one of the utilities is breaking it somehow if you're using any of them, the RMC shouldn't be changing that when it passes through to the GPU.

Seems this was a driver bug on my development machine. I have a somewhat "non-standard" dev machine for.. reasons. ;) But I was under the impression the Graphics drivers were stable. On a PC and a different Mac this issue doesn't present. Sorry for the confusion from my side.


How Wireframe models work? (not a bug, just question)

When i was trying to export cyclops as .gltf i made a mistake and exported it through godot's export scene menu. In resulted file, for every block, there was a wireframe model that was pure-white. later a found that exporting as .gltf was actually supposed to be done through cyclop's menu but at that point i wondered how wireframe was made. So thats the question.
i tried making wireframe model in blender but in godot it didnt have material variable i could pass shader to and it generally didnt show up(it might be because model didn't have any faces).
Is model being array mesh type is recuired? And should it be generated through code?
I dont have trouble with that but it seems kinda weird to me. I couldn't find any quick way to make wireframe models in godot so thats why i'm asking here, sorry if thats shouldn't be here.

ArrayMesh is the best way to make meshes at runtime.  It produces the most optimized and flexible models.  It also lets you make things like wireframes and point clouds.  If you want to use the 1.0.2 development version of Cyclops, I've added a command to the menu that lets you export the blocks without including the wireframe.  There isn't really a way to do that using Godot's built in exporter.

ArrayMesh is the best way to make meshes at runtime. It produces the most optimized and flexible models. It also lets you make things like wireframes and point clouds. If you want to use the 1.0.2 development version of Cyclops, I've added a command to the menu that lets you export the blocks without including the wireframe. There isn't really a way to do that using Godot's built in exporter.

Export command through menu is great, it doesnt have wireframes for everything. but it also doesn't have any collision shapes and occluder nodes which is a big downside of using this way.

Why would you want those in the export?  Unless you mean from other nodes?


Add service discovery via promregator

To support usage of Promregator with this module we need to support service discovery via the discovery URL in Promregator.
To enable this, we can use file_sd in Prometheus to update the available endpoints to be scrapped.
file_sd does not support a http source and can only read from local disk. So, we need to be able to source the SD file from http location at startup and periodically update it and save it to a file within the Thanos app so it can be read.
This should be done in a generic way where you simply set the URL and it downloads the file_sd file from it. It is then not tied to Promregator and simply expects a Prometheus file_sd formatted file to live at the URL.
Probably need 2 settings, the URL and an update frequency in seconds.
This could be added as an extra supervisord process to be executed and turned on one when the URL is set.
Once we have this we need to add the file_sd config to the prometheus config so that it will read the file and update the config.

This would be a nice way to add external service discovery yes, nice!!

Started #16 to implement this

Tested and working! 🎉


Fix Matrix rain character load bug

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

Project coverage is 98.00%. Comparing base (44ad1f7) to head (528fa34).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #227   +/-   ##
=======================================
  Coverage   98.00%   98.00%
=======================================
  Files          21       21
  Lines         200      200
  Branches       58       60    +2
=======================================
  Hits          196      196
  Misses          4        4

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


use tdlib for join chats

I wanted to know if it is possible to join private and secrets chats?
get chat with chat id is not working I get response with status code 400 "chat not found"
there is any way that allowing joining to chat by id?
i tried addChatMember and joinChat
Thanks.

You can't join a chat just by ID.

so what is the logic for joining secret and private chats?
how can I join, for example how telegram x allow joining chats via a button

You need first to find the chat, before you can join it.

getChat
returning chat not found because it's a private or secret, how can I find it before?

In the same way you would do this through an app.


Create new documentation

This is a big one, will require a separate site pretty much

Very excited to see the outcome of this.

Very excited to see the outcome of this.

Adding on that the site is in the works and the code is on yayuyokitano/lastfm-typed-docs
Havent been able to do as much work on it as I would've liked to recently, but it is starting to approach completion.
Hope to have it completed by the start of my next semester in early October.
Have basically used it as a massive excuse to learn react+routing lmao


Relationship entities cannot be loaded with depth = -1 (unlimited)

Using depth=-1 with relationship entity class results in
org.neo4j.ogm.exception.core.InvalidDepthException: Cannot load a relationship entity with depth 0 i.e. no start or end node

	at org.neo4j.ogm.session.request.strategy.impl.RelationshipQueryStatements.findByType(RelationshipQueryStatements.java:120)
	at org.neo4j.ogm.session.delegates.LoadByTypeDelegate.loadAll(LoadByTypeDelegate.java:64)
	at org.neo4j.ogm.session.delegates.LoadByTypeDelegate.loadAll(LoadByTypeDelegate.java:94)
	at org.neo4j.ogm.session.Neo4jSession.loadAll(Neo4jSession.java:183)

Expected Behavior
Should issue query with unlimited paths.
Steps to Reproduce (for bugs)
See test case
Context
We should provide consistency across Session.load methods.
Your Environment

OGM Version used: all maintained versions

Reworking the schema based loading and using list comprehensions for relationships here as well, would mean a significant new feature, which we are not gonna tackle at this point in time.
Apart from that, we are trying to encourage people not using relationship entities as entry point to queries.
Thanks for your understanding.


Add mention of UTF-8 meta tag to Overview docs.

This PR should help others avoid running into #42.

Thanks!


Collect max_connections metric

This will further allow us to expose this metric to users

FYI, there are tests you can run locally in case you didn't know. See test_runner/regress/test_compute_metrics.py. There is both a smoke and e2e test for sql_exporter metrics.


python3Packages.rich: 10.4.0 -> 10.7.0

Motivation for this change
Routine bump
Tested the vast majority of rebuilds through nixpkgs-review, except on nixos I wasn't going to sit around and watch emojis re-compress themselves, and on macos where around 5% of packages have always caused my machine to grind to a halt.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[x] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

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

[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 133308 at 43d83eae run on aarch64-linux 1

12 packages marked as broken and skipped:

python38Packages.datashader
python38Packages.ignite
python38Packages.spacy
python38Packages.spacy-transformers
python38Packages.textacy
python38Packages.thinc
python39Packages.datashader
python39Packages.ignite
python39Packages.spacy
python39Packages.spacy-transformers
python39Packages.textacy
python39Packages.thinc

24 packages failed to build:

checkov
python38Packages.apache-airflow
python38Packages.censys
python38Packages.cirq-core
python38Packages.cirq-google
python38Packages.gradient
python38Packages.gradient-utils
python38Packages.pymatgen-lammps
python38Packages.toggl-cli
python38Packages.tokenizers
python38Packages.transformers
python38Packages.tvdb_api
python39Packages.apache-airflow
python39Packages.censys
python39Packages.cirq-core
python39Packages.cirq-google
python39Packages.gradient
python39Packages.gradient-utils
python39Packages.pymatgen-lammps
python39Packages.toggl-cli
python39Packages.tokenizers
python39Packages.transformers
python39Packages.tvdb_api
theharvester

40 packages skipped due to time constraints:

apache-airflow
apio
deja-dup
home-assistant
noto-fonts-emoji
plex-mpv-shim
python38Packages.angrop
python38Packages.cirq
python38Packages.dipy
python38Packages.graphtage
...

169 packages built successfully:

aiodnsbrute
ansible-lint (python39Packages.ansible-lint)
backblaze-b2
calibre-web
check_systemd
conan
cryptop
dpt-rp1-py
duplicity
duply
evdevremapkeys
evillimiter
ffmpeg-normalize
gdown (python39Packages.gdown)
gnome-keysign
jellyfin-mpv-shim
kaggle (python39Packages.kaggle)
keepkey_agent (python39Packages.keepkey_agent)
ldeep
ledger_agent (python39Packages.ledger_agent)
lieer
luigi
magic-wormhole (python39Packages.magic-wormhole)
manim
mathlibtools (python39Packages.mathlibtools)
mnamer
mnemosyne
ocrmypdf
papis (python39Packages.papis)
past-time
pferd
piston-cli
python38Packages.afdko
python38Packages.aiosmb
python38Packages.ansible-kernel
python38Packages.ansible-lint
python38Packages.ansible-runner
python38Packages.b2sdk
python38Packages.baselines
python38Packages.castepxbin
python38Packages.cve-bin-tool
python38Packages.datasets
python38Packages.dnachisel
python38Packages.enrich
python38Packages.ffmpeg-progress-yield
python38Packages.gdown
python38Packages.genome-collector
python38Packages.gtts
python38Packages.habanero
python38Packages.holoviews
python38Packages.huggingface-hub
python38Packages.hvplot
python38Packages.hyperopt
python38Packages.internetarchive
python38Packages.kaggle
python38Packages.keepkey_agent
python38Packages.ledger_agent
python38Packages.libagent
python38Packages.lsassy
python38Packages.magic-wormhole
python38Packages.mathlibtools
python38Packages.mesa
python38Packages.monty
python38Packages.moviepy
python38Packages.msldap
python38Packages.myfitnesspal
python38Packages.nagiosplugin
python38Packages.nbsmoke
python38Packages.ndjson
python38Packages.nltk
python38Packages.nototools
python38Packages.opensimplex
python38Packages.panel
python38Packages.papermill
python38Packages.papis
python38Packages.parfive
python38Packages.perfplot
python38Packages.pipdate
python38Packages.plexapi
python38Packages.proglog
python38Packages.pymatgen
python38Packages.pypdf3
python38Packages.pypiserver
python38Packages.pyppeteer
python38Packages.pypykatz
python38Packages.pysychonaut
python38Packages.python-daemon
python38Packages.python-miio
python38Packages.python-mpv-jsonipc
python38Packages.rbtools
python38Packages.requests-cache
python38Packages.rich
python38Packages.sacremoses
python38Packages.salmon-mail
python38Packages.surepy
python38Packages.tqdm
python38Packages.trezor_agent
python38Packages.tubeup
python38Packages.twine
python39Packages.afdko
python39Packages.aiosmb
python39Packages.ansible-kernel
python39Packages.ansible-runner
python39Packages.b2sdk
python39Packages.baselines
python39Packages.castepxbin
python39Packages.cve-bin-tool
python39Packages.datasets
python39Packages.dnachisel
python39Packages.enrich
python39Packages.ffmpeg-progress-yield
python39Packages.genome-collector
python39Packages.gtts
python39Packages.habanero
python39Packages.holoviews
python39Packages.huggingface-hub
python39Packages.hvplot
python39Packages.hyperopt
python39Packages.intake
python39Packages.internetarchive
python39Packages.libagent
python39Packages.lsassy
python39Packages.mesa
python39Packages.monty
python39Packages.moviepy
python39Packages.msldap
python39Packages.myfitnesspal
python39Packages.nagiosplugin
python39Packages.nbsmoke
python39Packages.ndjson
python39Packages.nltk
python39Packages.nototools
python39Packages.opensimplex
python39Packages.panel
python39Packages.papermill
python39Packages.parfive
python39Packages.perfplot
python39Packages.pipdate
python39Packages.plexapi
python39Packages.proglog
python39Packages.pymatgen
python39Packages.pypdf3
python39Packages.pypiserver
python39Packages.pyppeteer
python39Packages.pypykatz
python39Packages.pysychonaut
python39Packages.python-daemon
python39Packages.python-miio
python39Packages.python-mpv-jsonipc
python39Packages.rbtools
python39Packages.requests-cache
python39Packages.rich
python39Packages.sacremoses
python39Packages.salmon-mail
python39Packages.surepy
python39Packages.tqdm
trezor_agent (python39Packages.trezor_agent)
python39Packages.tubeup
twine (python39Packages.twine)
r128gain
sacad
spotdl
tahoe-lafs
tartube
tinyprog
tockloader
urlwatch
wlc
ytmdl

Note that build failures may predate this PR, and could be nondeterministic or hardware dependent.
Please exercise your independent judgement. Does something look off? Please file an issue or reach out on IRC.

I think tockloader might be the only genuine breakage there.

Oh actually that does seem to be an unrelated momentary failure that is fixed now.

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
Result of nixpkgs-review pr 133308 run on x86_64-linux 1

14 packages marked as broken and skipped:

python38Packages.optuna
python38Packages.pymatgen-lammps
python38Packages.pymc3
python38Packages.pywick
python38Packages.shap
python38Packages.skorch
python38Packages.tvdb_api
python39Packages.optuna
python39Packages.pymatgen-lammps
python39Packages.pymc3
python39Packages.pywick
python39Packages.shap
python39Packages.skorch
python39Packages.tvdb_api

31 packages failed to build and already failed to build on hydra master:

apache-airflow: log was empty
checkov: log was empty
python38Packages.apache-airflow: log was empty
python38Packages.censys: log was empty
python38Packages.gradient: log was empty
python38Packages.gradient-utils: log was empty
python38Packages.pytorch-metric-learning: log was empty
python38Packages.scancode-toolkit: log was empty
python38Packages.spacy: log was empty
python38Packages.spacy-transformers: log was empty
python38Packages.sunpy: log was empty
python38Packages.textacy: log was empty
python38Packages.toggl-cli: log was empty
python38Packages.tokenizers: log was empty
python38Packages.transformers: log was empty
python39Packages.apache-airflow: log was empty
python39Packages.censys: log was empty
python39Packages.datashader: log was empty
python39Packages.gradient: log was empty
python39Packages.gradient-utils: log was empty
python39Packages.pytorch-metric-learning: log was empty
python39Packages.scancode-toolkit: log was empty
python39Packages.spacy: log was empty
python39Packages.spacy-transformers: log was empty
python39Packages.sunpy: log was empty
python39Packages.textacy: log was empty
python39Packages.toggl-cli: log was empty
python39Packages.tokenizers: log was empty
python39Packages.transformers: log was empty
theharvester: log was empty
tts: log was empty

1 package failed to build and are new build failure:

home-assistant: log was empty

200 packages built:

aiodnsbrute
ansible-lint (python39Packages.ansible-lint)
apio
backblaze-b2
calibre-web
check_systemd
conan
cryptop
deja-dup
dpt-rp1-py
duplicity
duply
evdevremapkeys
evillimiter
ffmpeg-normalize
gdown (python39Packages.gdown)
gnome-keysign
jellyfin-mpv-shim
kaggle (python39Packages.kaggle)
keepkey_agent (python39Packages.keepkey_agent)
ldeep
ledger_agent (python39Packages.ledger_agent)
lieer
luigi
magic-wormhole (python39Packages.magic-wormhole)
manim
mathlibtools (python39Packages.mathlibtools)
mnamer
mnemosyne
noto-fonts-emoji
ocrmypdf
papis (python39Packages.papis)
past-time
pferd
piston-cli
plex-mpv-shim
python38Packages.afdko
python38Packages.aiosmb
python38Packages.angrop
python38Packages.ansible-kernel
python38Packages.ansible-lint
python38Packages.ansible-runner
python38Packages.b2sdk
python38Packages.baselines
python38Packages.castepxbin
python38Packages.cirq
python38Packages.cirq-core
python38Packages.cirq-google
python38Packages.cve-bin-tool
python38Packages.datasets
python38Packages.datashader
python38Packages.dipy
python38Packages.dnachisel
python38Packages.enrich
python38Packages.ffmpeg-progress-yield
python38Packages.gdown
python38Packages.genome-collector
python38Packages.graphtage
python38Packages.gtts
python38Packages.habanero
python38Packages.holoviews
python38Packages.huggingface-hub
python38Packages.hvplot
python38Packages.hyperopt
python38Packages.ignite
python38Packages.intake
python38Packages.internetarchive
python38Packages.kaggle
python38Packages.keepkey_agent
python38Packages.ledger_agent
python38Packages.libagent
python38Packages.lsassy
python38Packages.magic-wormhole
python38Packages.mathlibtools
python38Packages.mesa
python38Packages.monty
python38Packages.moviepy
python38Packages.msldap
python38Packages.myfitnesspal
python38Packages.nagiosplugin
python38Packages.nbsmoke
python38Packages.ndjson
python38Packages.nltk
python38Packages.nototools
python38Packages.opensimplex
python38Packages.panel
python38Packages.papermill
python38Packages.papis
python38Packages.parfive
python38Packages.perfplot
python38Packages.pipdate
python38Packages.plexapi
python38Packages.proglog
python38Packages.pymatgen
python38Packages.pypdf3
python38Packages.pypiserver
python38Packages.pyppeteer
python38Packages.pypykatz
python38Packages.pyro-ppl
python38Packages.pysychonaut
python38Packages.python-daemon
python38Packages.python-miio
python38Packages.python-mpv-jsonipc
python38Packages.pytorch-lightning
python38Packages.rbtools
python38Packages.requests-cache
python38Packages.rich
python38Packages.rising
python38Packages.sacremoses
python38Packages.salmon-mail
python38Packages.sumo
python38Packages.surepy
python38Packages.thinc
python38Packages.tqdm
python38Packages.trezor_agent
python38Packages.tubeup
python38Packages.twine
python39Packages.afdko
python39Packages.aiosmb
python39Packages.angrop
python39Packages.ansible-kernel
python39Packages.ansible-runner
python39Packages.b2sdk
python39Packages.baselines
python39Packages.castepxbin
python39Packages.cirq
python39Packages.cirq-core
python39Packages.cirq-google
python39Packages.cve-bin-tool
python39Packages.datasets
python39Packages.dipy
python39Packages.dnachisel
python39Packages.enrich
python39Packages.ffmpeg-progress-yield
python39Packages.genome-collector
python39Packages.graphtage
python39Packages.gtts
python39Packages.habanero
python39Packages.holoviews
python39Packages.huggingface-hub
python39Packages.hvplot
python39Packages.hyperopt
python39Packages.ignite
python39Packages.intake
python39Packages.internetarchive
python39Packages.libagent
python39Packages.lsassy
python39Packages.mesa
python39Packages.monty
python39Packages.moviepy
python39Packages.msldap
python39Packages.myfitnesspal
python39Packages.nagiosplugin
python39Packages.nbsmoke
python39Packages.ndjson
python39Packages.nltk
python39Packages.nototools
python39Packages.opensimplex
python39Packages.panel
python39Packages.papermill
python39Packages.parfive
python39Packages.perfplot
python39Packages.pipdate
python39Packages.plexapi
python39Packages.proglog
python39Packages.pymatgen
python39Packages.pypdf3
python39Packages.pypiserver
python39Packages.pyppeteer
python39Packages.pypykatz
python39Packages.pyro-ppl
python39Packages.pysychonaut
python39Packages.python-daemon
python39Packages.python-miio
python39Packages.python-mpv-jsonipc
python39Packages.pytorch-lightning
python39Packages.rbtools
python39Packages.requests-cache
python39Packages.rich
python39Packages.rising
python39Packages.sacremoses
python39Packages.salmon-mail
python39Packages.sumo
python39Packages.surepy
python39Packages.thinc
python39Packages.tqdm
trezor_agent (python39Packages.trezor_agent)
python39Packages.tubeup
twine (python39Packages.twine)
r128gain
sacad
spotdl
tahoe-lafs
tartube
tinyprog
tockloader
twitter-color-emoji
urlwatch
wlc
ytmdl

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
Result of nixpkgs-review pr 133308 run on x86_64-linux 1

1 package built:

home-assistant


Custom vis-lan dataset - RuntimeError: stack expects each tensor to be equal size, but got [3, 256, 256] at entry 0 and [3, 320, 390] at entry 2

Thank you for your amazing work.
When I use your code to pretrain the model, I got a runtime error as follows:
Traceback (most recent call last):
File "../../train.py", line 528, in
cli_main()
File "../../train.py", line 521, in cli_main
distributed_utils.call_main(cfg, main)
File "/home/test/ofa/fairseq/fairseq/distributed/utils.py", line 374, in call_main
distributed_main(cfg.distributed_training.device_id, main, cfg, kwargs)
File "/home/test/ofa/fairseq/fairseq/distributed/utils.py", line 348, in distributed_main
main(cfg, **kwargs)
File "../../train.py", line 161, in main
disable_iterator_cache=True,
File "/home/test/ofa/utils/checkpoint_utils.py", line 288, in load_checkpoint
epoch=1, load_dataset=True, **passthrough_args
File "/home/test/ofa/trainer.py", line 666, in get_train_iterator
self.reset_dummy_batch(batch_iterator.first_batch)
File "/home/test/ofa/fairseq/fairseq/data/iterators.py", line 322, in first_batch
return self.collate_fn([self.dataset[i] for i in self.frozen_batches[0]])
File "/home/test/ofa/data/pretrain_data/unify_dataset.py", line 636, in collater
res_v2 = collate(samples_v2, pad_idx=self.src_dict.pad(), eos_idx=self.eos)
File "/home/test/ofa/data/pretrain_data/unify_dataset.py", line 70, in collate
patch_images = torch.stack([sample['patch_image'] for sample in samples], dim=0)
RuntimeError: stack expects each tensor to be equal size, but got [3, 256, 256] at entry 0 and [3, 320, 390] at entry 2
The mismatch size would also be [3, 320, 320] sometimes. I tried to use different datasets, but I got the same error, and this error only happens when I use my customized visualization_language.tsv. I followed readme to create the .tsv file as follows:

unique_id
image (base64 string)
caption
question
answer
ground_truth objects
dataset name
task type

The base64 string is generated by your provided code as show in other issues.
 However, according to issue 106, you state that
The resizing from the raw size to the specified resolution is done on the fly during training and inference in the getitem method of pytorch dataset.
I think you mean that I do not need to resize image, and your code will help me do it. Could you clarify this issue? I appreciate your help, thank you!

Hi, could you please provide more details about your experimental setting? I guess you are trying to perform OFA pretraining. For pretraining, according to the readme, the data files vision_language_examples.tsv (for multi-modal pretraining tasks), text_examples.tsv (for text-only pretraining tasks), image_examples.tsv (for image-only pretraining tasks) and detection_examples.tsv (for detection pretraining tasks) should be prepared to facilitate our multitask pretraining. These files have different schema as mentioned in the readme. (The schema you provide is for vision_language_examples.tsv.) Have you prepared all these files or just some of them? The error is most likely to be related to image_examples.tsv rather than vision_language_examples.tsv which should contain images with their VQ-GAN codes. For this pretraining task, the images should be pre-resized into 256*256 and fed into the VQ-GAN to obtain the image code. For other pretraining tasks and for fine-tuning, as mentioned in #106 (which is related to image captioning finetuning), the resize will be done on-the-fly.

Hi,
Yes, I am trying to perform pretraining. I created 4 corresponding files with my own data according to readme. (I does not pre-resize images before feeding into VQ-GAN).  However, I didn't see error when loading other files rather than vision_language tsv. That's why I think error is most likely to be related to vision_language_examples.tsv. The details are shown in following (I ignore some unnecessary contents).
2022-06-15 13:01:03 - ofa_task.py[line:102] - INFO: source dictionary: 59457 types
2022-06-15 13:01:03 - ofa_task.py[line:103] - INFO: target dictionary: 59457 types
local datafile /data/omnimed/processed_data/text/text_example.tsv slice_id 0 begin to initialize row_count and line_idx-to-offset mapping
local datafile /data/omnimed/processed_data/text/text_example.tsv slice_id 0 finished initializing row_count and line_idx-to-offset mapping
file /data/omnimed/processed_data/text/text_example.tsv slice_id 0 row count 2000 total row count 2000
local datafile /data/omnimed/processed_data/image/chexpert.tsv slice_id 0 begin to initialize row_count and line_idx-to-offset mapping
local datafile /data/omnimed/processed_data/image/chexpert.tsv slice_id 0 finished initializing row_count and line_idx-to-offset mapping
file /data/omnimed/processed_data/image/chexpert.tsv slice_id 0 row count 223414 total row count 223414
local datafile /data/omnimed/processed_data/detection/deep_lesion.tsv slice_id 0 begin to initialize row_count and line_idx-to-offset mapping
local datafile /data/omnimed/processed_data/detection/deep_lesion.tsv slice_id 0 finished initializing row_count and line_idx-to-offset mapping
file /data/omnimed/processed_data/detection/deep_lesion.tsv slice_id 0 row count 9624 total row count 9624
/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/site-packages/torch/functional.py:568: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at  /opt/conda/conda-bld/pytorch_1646755953518/work/aten/src/ATen/native/TensorShape.cpp:2228.)
return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
2022-06-15 13:01:17 - train.py[line:101] - INFO: OFAModel(
.........
2022-06-15 13:01:17 - train.py[line:102] - INFO: task: UnifyTask
2022-06-15 13:01:17 - train.py[line:103] - INFO: model: OFAModel
2022-06-15 13:01:17 - train.py[line:104] - INFO: criterion: AdjustLabelSmoothedCrossEntropyCriterion
2022-06-15 13:01:17 - train.py[line:108] - INFO: num. shared model params: 182,238,536 (num. trained: 182,238,536)
2022-06-15 13:01:17 - train.py[line:115] - INFO: num. expert model params: 0 (num. trained: 0)
local datafile /data/omnimed/processed_data/vis_lan/peir_gross.tsv slice_id 0 begin to initialize row_count and line_idx-to-offset mapping
local datafile /data/omnimed/processed_data/vis_lan/peir_gross.tsv slice_id 0 finished initializing row_count and line_idx-to-offset mapping
file /data/omnimed/processed_data/vis_lan/peir_gross.tsv slice_id 0 row count 7443 total row count 7443
2022-06-15 13:01:18 - trainer.py[line:124] - INFO: detected shared parameter: encoder.embed_tokens.weight <- decoder.embed_tokens.weight
2022-06-15 13:01:18 - trainer.py[line:124] - INFO: detected shared parameter: encoder.embed_tokens.weight <- decoder.output_projection.weight
2022-06-15 13:01:18 - trainer.py[line:124] - INFO: detected shared parameter: encoder.embed_images.conv1.bias <- encoder.embed_images.layer1.0.conv1.bias
2022-06-15 13:01:18 - trainer.py[line:124] - INFO: detected shared parameter: encoder.embed_images.conv1.bias <- encoder.embed_images.layer1.0.conv2.bias
2022-06-15 13:01:18 - trainer.py[line:124] - INFO: detected shared parameter: encoder.embed_images.conv1.bias <- encoder.embed_images.layer1.0.conv3.bias
2022-06-15 13:01:18 - trainer.py[line:124] - INFO: detected shared parameter: encoder.embed_images.conv1.bias <- encoder.embed_images.layer1.0.downsample.0.bias
.........
2022-06-15 13:01:18 - utils.py[line:759] - INFO: CUDA enviroments for all 1 workers
2022-06-15 13:01:18 - utils.py[line:765] - INFO: rank   0: capabilities =  8.6  ; total memory = 23.688 GB ; name = NVIDIA RTX A5000
2022-06-15 13:01:18 - utils.py[line:767] - INFO: CUDA enviroments for all 1 workers
2022-06-15 13:01:18 - train.py[line:145] - INFO: training on 1 devices (GPUs/TPUs)
2022-06-15 13:01:18 - train.py[line:151] - INFO: max tokens per device = None and max sentences per device = 4
2022-06-15 13:01:18 - trainer.py[line:458] - INFO: Preparing to load checkpoint ../../checkpoints/ofa_base.pt
2022-06-15 13:01:20 - trainer.py[line:619] - INFO: Loaded checkpoint ../../checkpoints/ofa_base.pt (epoch 48 @ 0 updates)
2022-06-15 13:01:20 - trainer.py[line:639] - INFO: loading train data for epoch 1
local datafile /data/omnimed/processed_data/vis_lan/peir_gross.tsv slice_id 0 begin to initialize row_count and line_idx-to-offset mapping
local datafile /data/omnimed/processed_data/vis_lan/peir_gross.tsv slice_id 0 finished initializing row_count and line_idx-to-offset mapping
file /data/omnimed/processed_data/vis_lan/peir_gross.tsv slice_id 0 row count 7443 total row count 7443
/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/site-packages/torchvision/transforms/functional.py:424: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.
"Argument interpolation should be of type InterpolationMode instead of int. "
Traceback (most recent call last):
File "../../train.py", line 528, in
cli_main()
File "../../train.py", line 521, in cli_main
distributed_utils.call_main(cfg, main)
File "/home/kaz321/omnimed/fairseq/fairseq/distributed/utils.py", line 374, in call_main
distributed_main(cfg.distributed_training.device_id, main, cfg, kwargs)
File "/home/kaz321/omnimed/fairseq/fairseq/distributed/utils.py", line 348, in distributed_main
main(cfg, **kwargs)
File "../../train.py", line 161, in main
disable_iterator_cache=True,
File "/home/kaz321/omnimed/utils/checkpoint_utils.py", line 288, in load_checkpoint
epoch=1, load_dataset=True, **passthrough_args
File "/home/kaz321/omnimed/trainer.py", line 666, in get_train_iterator
self.reset_dummy_batch(batch_iterator.first_batch)
File "/home/kaz321/omnimed/fairseq/fairseq/data/iterators.py", line 322, in first_batch
return self.collate_fn([self.dataset[i] for i in self.frozen_batches[0]])
File "/home/kaz321/omnimed/data/pretrain_data/unify_dataset.py", line 636, in collater
res_v2 = collate(samples_v2, pad_idx=self.src_dict.pad(), eos_idx=self.eos)
File "/home/kaz321/omnimed/data/pretrain_data/unify_dataset.py", line 70, in collate
patch_images = torch.stack([sample['patch_image'] for sample in samples], dim=0)
RuntimeError: stack expects each tensor to be equal size, but got [3, 256, 256] at entry 0 and [3, 320, 320] at entry 2
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 3059480) of binary: /home/kaz321/anaconda3/envs/omnimed/bin/python3
Traceback (most recent call last):
File "/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/site-packages/torch/distributed/launch.py", line 193, in
main()
File "/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/site-packages/torch/distributed/launch.py", line 189, in main
launch(args)
File "/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/site-packages/torch/distributed/launch.py", line 174, in launch
run(args)
File "/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/site-packages/torch/distributed/run.py", line 718, in run
)(*cmd_args)
File "/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/site-packages/torch/distributed/launcher/api.py", line 131, in call
return launch_agent(self._config, self._entrypoint, list(args))
File "/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/site-packages/torch/distributed/launcher/api.py", line 247, in launch_agent
failures=result.failures,
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:

Thank you SO MUCH for your reply, I've resize images before feeding into VQ-GAN for image_examples.tsv and it solves my previous problem. However, I encounter the other error -- it seems that the input sequence is longer than the maximum input sequence length (1024).
Traceback (most recent call last):
File "../../train.py", line 528, in
cli_main()
File "../../train.py", line 521, in cli_main
distributed_utils.call_main(cfg, main)
File "/home/kaz321/omnimed/fairseq/fairseq/distributed/utils.py", line 374, in call_main
distributed_main(cfg.distributed_training.device_id, main, cfg, kwargs)
File "/home/kaz321/omnimed/fairseq/fairseq/distributed/utils.py", line 348, in distributed_main
main(cfg, **kwargs)
File "../../train.py", line 190, in main
valid_losses, should_stop = train(cfg, trainer, task, epoch_itr)
File "/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/contextlib.py", line 74, in inner
return func(*args, **kwds)
File "../../train.py", line 301, in train
log_output = trainer.train_step(samples)
File "/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/contextlib.py", line 74, in inner
return func(*args, **kwds)
File "/home/kaz321/omnimed/trainer.py", line 806, in train_step
raise e
File "/home/kaz321/omnimed/trainer.py", line 780, in train_step
**extra_kwargs,
File "/home/kaz321/omnimed/tasks/ofa_task.py", line 318, in train_step
loss, sample_size, logging_output = criterion(model, sample, update_num=update_num)
File "/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/kaz321/omnimed/criterions/label_smoothed_cross_entropy.py", line 180, in forward
loss_v2, sample_size_v2, logging_output_v2 = self.forward(model, sample[1], update_num, reduce)
File "/home/kaz321/omnimed/criterions/label_smoothed_cross_entropy.py", line 199, in forward
net_output = model(**sample["net_input"])
File "/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/kaz321/omnimed/models/ofa/ofa.py", line 107, in forward
return_all_hiddens=return_all_hiddens,
File "/home/kaz321/anaconda3/envs/omnimed/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/home/kaz321/omnimed/models/ofa/unify_transformer.py", line 1169, in forward
alignment_heads=alignment_heads,
File "/home/kaz321/omnimed/models/ofa/unify_transformer.py", line 1193, in extract_features
alignment_heads,
File "/home/kaz321/omnimed/models/ofa/unify_transformer.py", line 1316, in extract_features_scriptable
self_attn_bias[~code_masks] += self.get_rel_pos_bias(all_prev_output_tokens, idx).unsqueeze(0)
RuntimeError: The size of tensor a (1025) must match the size of tensor b (1024) at non-singleton dimension 3

Thanks for pointing this out! After the image is resized to 256256, you also need to crop the middle 128128 part and feed it to VQ-GAN. Image Infilling is actually restoring the middle part of the image. We will update Readme later.

Hi, I've followed your instructions, 1) resize original images to be 256 * 256 and generated their base64 string -- image_string.tsv; 2) crop middle part and generate its base64 string mid_image_string.tsv; 3) use the base64 string of middle part and VQ-GAN to generate the image code mid_image_code.tsv; 4) combine base64 string of 256256 image and code of 128128 as input image_examples.tsv.
But I still have the RuntimeError: The size of tensor a (1025) must match the size of tensor b (1024) at non-singleton dimension 3 as described previously. I think the input format of my customized data is correct. My preprocess codes are as follows:
ext = ('.jpg')
parser = argparse.ArgumentParser()
parser.add_argument('--mode', type=int, default=0, help='0: resize to (256*256), or 1: capture middle part (128*128) string, or 2: base64 string, or 3: combine image-code via vq-gan')
args = parser.parse_args()

if args.mode == 0:
    count = 0
    path_of_the_directory = '../a_dataset/image/train'
    save_path_of_the_directory = '../a_dataset/image/train_resize'
    for path, dirc, files in os.walk(path_of_the_directory):
        for name in files:
            if name.endswith(ext):
                count += 1

                file_directory = os.path.join(path, name)
                try:
                    # using OpenCV
                    img = cv2.imread(file_directory)
                    # resize to be (256, 256)
                    img = cv2.resize(img, (256, 256), interpolation=cv2.INTER_CUBIC)
                    # save images
                    name = name[:-4] + '_' + str(count) + '.jpg'
                    save_name = os.path.join(save_path_of_the_directory, name)
                    cv2.imwrite(save_name , img)

                except Exception as e:
                    pass
                if count % 1000 == 0:
                    print("processed", count, "images!")
                continue
    print("compeleted! # of total instances:", count)

if args.mode == 1:
    # used to be fed into VQ-GAN
    path_of_the_directory = '../a_dataset/image/train_resize'
    count = 0
    with open("../a_dataset/mid_image_string.tsv", 'w') as out_file:
        for path, dirc, files in os.walk(path_of_the_directory):
            for name in files:
                if name.endswith(ext):
                    count += 1
                    file_directory = os.path.join(path, name)
                    # crop middle part (128*128)
                    frac = 0.50
                    left = img.size[0]*((1-frac)/2)
                    upper = img.size[1]*((1-frac)/2)
                    right = img.size[0]-((1-frac)/2)*img.size[0]
                    bottom = img.size[1]-((1-frac)/2)*img.size[1]
                    cropped_img = img.crop((left, upper, right, bottom))

                    img_buffer = BytesIO()
                    cropped_img.save(img_buffer, format=img.format)
                    byte_data = img_buffer.getvalue()
                    base64_str = base64.b64encode(byte_data)
                    base64_str = base64_str.decode("utf-8")
                    out_file.write('1_' + str(count) + '\t' + base64_str + '\n')
                    if count % 1000 == 0:
                        print("processed", count, "images!")
    print("compeleted! # of total instances:", count)

if args.mode == 2:
    path_of_the_directory = '../a_dataset/CheXpert-v1.0-small/train_resize'
    count = 0
    with open("../a_dataset/image_string.tsv", 'w') as out_file:
        for path, dirc, files in os.walk(path_of_the_directory):
            for name in files:
                if name.endswith(ext):
                    count += 1
                    file_directory = os.path.join(path, name)
                    try:
                        img = Image.open(file_directory)
                        img_buffer = BytesIO()
                        img.save(img_buffer, format=img.format)
                        byte_data = img_buffer.getvalue()
                        base64_str = base64.b64encode(byte_data)
                        base64_str = base64_str.decode("utf-8")
                        out_file.write('1_' + str(count) + '\t' + base64_str + '\n')
                    except Exception as e:
                        pass
                    if count % 1000 == 0:
                        print("processed", count, "images!")
                    continue
    print("compeleted! # of total instances:", count)

if args.mode == 3:
    count = 0
    with open("../a_dataset/image_string.tsv", 'r') as f1, open("../a_dataset/mid_image_code.tsv", 'r') as f2:
        with open("../a_dataset/image_examples.tsv", 'w') as out:
            for x,y in zip(csv.reader(f1, delimiter='\t'),csv.reader(f2, delimiter='\t')):
                out.write(x[0] + '\t' + x[1] + '\t' + y[1] + '\n')
                count += 1
                if count % 1000 == 0:
                    print("processed", count, "images!")
    print("compeleted! # of total instances:", count)

Thanks!

According to the VQ-GAN code, the code_image_size is 256, but I got 1024. I am figuring out what's going on.

@taokz Hi, I think you should set --code_image_size=128

Thanks, it works!


RectIntersection is not working with draggable items inside a scrollable container

The draggable items that are scrolled are not calculating the intersectionRatio correctly.
Please, see this code sandbox for an example: https://codesandbox.io/s/react-dnd-grid-0ylzl?file=/src/App.js
NOTE: Try dragging the last draggable item into one droppable area.

Hey @jeserodz, seems like a legit bug, thanks for the report!

Hey @jeserodz, seems like a legit bug, thanks for the report!

For the time being, you can use the closestCenter or closestCorners collision detection algorithms as a workaround, as this is a bug that will take a bit of time to fix.

For the time being, you can use the closestCenter or closestCorners collision detection algorithms as a workaround, as this is a bug that will take a bit of time to fix.

For the time being, you can use the closestCenter or closestCorners collision detection algorithms as a workaround, as this is a bug that will take a bit of time to fix.

In my issue (#73 you closed for duplicate), FYI, I do reproduce the bug even with others collisions algorithm. closestCorners / closestCenter are doing the same.

For the time being, you can use the closestCenter or closestCorners collision detection algorithms as a workaround, as this is a bug that will take a bit of time to fix.

In my issue (#73 you closed for duplicate), FYI, I do reproduce the bug even with others collisions algorithm. closestCorners / closestCenter are doing the same.

is the https://github.com/clauderic/dnd-kit/pull/54 usable ? i have the same king of bug after scrolling a long list

First of all thanks for building such a developer friendly DnD library @clauderic
We are building a kanban board and our first choice naturally went towards using react-beautiful-dnd and after trying out that, we end up facing this issue https://github.com/atlassian/react-beautiful-dnd/issues/131 and then we have to remove the package as it is not gonna be solved anytime soon.
After searching for other libraries, we found dnd-kit to be promising. Especially after seeing this example.  So we replaced react-beautiful-dnd with dnd-kit and things were going great until we hit this issue https://github.com/clauderic/dnd-kit/issues/73
I saw you are working on https://github.com/clauderic/dnd-kit/pull/54 Will this solve this issue?
I am open to discuss this and support it further with your help and guidance.

Hey @Shajansheriff , that example only works because height is fixed right?

+1
Having a huge pain trying to find a workaround for this bug. Here's the video example, sorta duplicating the initial record, but you may find a couple of additional things.
As a solution, (or at least a temporary solution), it'd be just awesome to be able to remove certain scrollable ancestors from position calculation. Obviously, intersection is calculated using a concatenation of body scrollTop and the left panel scrollable block scrollTop. I don't need left scrollable block to be scrolled at all here, would be great to just remove it from either calculations, and scrollable items as well
https://user-images.githubusercontent.com/71796791/123527550-5f540d00-d6e9-11eb-97f0-8e6ae5e6c8e3.mp4

+1
@clauderic Thank you for this incredible library!
I'm facing this exact bug today with the virtualized scrollable container using react-window library. Just informing this bug also occurs in the virtualized containers.
For now, the workaround I could think of is locating the x and y of my Droppable and act accordingly when I pull the DragOverlay element. Not really an efficient workaround, but will update if it works 🤞🏼

@clauderic like others have said, thank you for making this amazing dnd library!
We're running into this issue, are there any updates on PR 54 or any accepted workarounds in the meantime? Thank you!

Thanks for your great Lib,
I have the same problem and this is strange for me how this example Link is working.

Thanks for your great Lib, I have the same problem and this is strange for me how this example Link is working.

Probably cause it's not using the default collision detection https://github.com/clauderic/dnd-kit/issues/43#issuecomment-757338784.

Hi all,
We are building an application with two lists and are wrapping each of them with a virtual list.
I was having the same issue and tried to use closestCenter or closestCorners collision detection algorithms but got the same results.
@robstarbuck's comment helped me to find a workaround that worked perfectly for my use case:

Set a ref on the draggable element (rendered inside <DragOverlay>).
Wrap the closestCenter or closestCorners with a callback, e.g.:

(entries: RectEntry[], target: ViewRect) => {
  // Use the default dnd-kit callback when ref doesn't exist.
  if (!draggableElement?.current) return closestCenter(entries, target);

  // Use all values from `getBoundingClientRect` and pass them into a new object as type `ViewRect`.
  const { width, height, left, right, top, bottom, x, y } = draggableElement?.current?.getBoundingClientRect();
  const domRectTarget = { width, height, left, right, top, bottom, offsetLeft: x, offsetTop: y };

  // Use new collision detection algrorithm.
  return rectIntersection(entries, domRectTarget);
}

Use the following as the helper functions used in the example above (derived from dnd-kit rectIntersection.ts and modified to accommodate our implementation):

import type { LayoutRect, UniqueIdentifier, RectEntry, ViewRect } from '@dnd-kit/core';

/**
 * Returns the intersecting rectangle area between two rectangles
 */
function getIntersectionRatio(entry: LayoutRect, target: ViewRect): number {
  const top = Math.max(target.top, entry.offsetTop);
  const left = Math.max(target.left, entry.offsetLeft);
  const right = Math.min(target.left + target.width, entry.offsetLeft + entry.width);
  const bottom = Math.min(target.top + target.height, entry.offsetTop + entry.height);
  const width = right - left;
  const height = bottom - top;

  if (left < right && top < bottom) {
    const targetArea = target.width * target.height;
    const entryArea = entry.width * entry.height;
    const intersectionArea = width * height;
    const intersectionRatio = intersectionArea / (targetArea + entryArea - intersectionArea);

    return Number(intersectionRatio.toFixed(4));
  }

  // Rectangles do not overlap, or overlap has an area of zero (edge/corner overlap)
  return 0;
}

/**
 * Returns the rectangle that has the greatest intersection area with a given
 * rectangle in an array of rectangles.
 */
export const rectIntersection = (droppableContainers: RectEntry[], collisionRect: ViewRect) => {
  let maxIntersectionRatio = 0;
  let maxIntersectingDroppableContainer: UniqueIdentifier | null = null;

  for (const droppableContainer of droppableContainers) {
    const [id, rect] = droppableContainer;

    if (rect) {
      const intersectionRatio = getIntersectionRatio(rect, collisionRect);

      if (intersectionRatio > maxIntersectionRatio) {
        maxIntersectionRatio = intersectionRatio;
        maxIntersectingDroppableContainer = id;
      }
    }
  }

  return maxIntersectingDroppableContainer;
};

Hi I wonder if there's an update on this ticket? The branch at #54 seems to have gone stale. I have a workaround with a different collision detector which uses the current active item rather than the collisionRect which seems to work for the meantime. Obviously not something we want to keep in our codebase however. Thanks.
import {
  Active,
  CollisionDetection,
  LayoutRect,
  UniqueIdentifier,
} from "@dnd-kit/core";

/**
 * Returns the intersecting rectangle area between two rectangles
 */
function getIntersectionRatio(entry: LayoutRect, active: Active): number {
  const {
    top: currentTop = 0,
    left: currentLeft = 0,
    width: currentWidth = 0,
    height: currentHeight = 0,
  } = active.rect.current.translated ?? {};

  const top = Math.max(currentTop, entry.offsetTop);
  const left = Math.max(currentLeft, entry.offsetLeft);
  const right = Math.min(
    currentLeft + currentWidth,
    entry.offsetLeft + entry.width
  );
  const bottom = Math.min(
    currentTop + currentHeight,
    entry.offsetTop + entry.height
  );
  const width = right - left;
  const height = bottom - top;

  if (left < right && top < bottom) {
    const targetArea = currentWidth * currentHeight;
    const entryArea = entry.width * entry.height;
    const intersectionArea = width * height;
    const intersectionRatio =
      intersectionArea / (targetArea + entryArea - intersectionArea);

    return Number(intersectionRatio.toFixed(4));
  }

  // Rectangles do not overlap, or overlap has an area of zero (edge/corner overlap)
  return 0;
}

/**
 * Returns the rectangle that has the greatest intersection area with a given
 * rectangle in an array of rectangles.
 */
export const activeRectIntersection: CollisionDetection = ({
  active,
  droppableContainers,
}) => {
  let maxIntersectionRatio = 0;
  let maxIntersectingDroppableContainer: UniqueIdentifier | null = null;

  for (const droppableContainer of droppableContainers) {
    const {
      rect: { current: rect },
    } = droppableContainer;

    if (rect) {
      const intersectionRatio = getIntersectionRatio(rect, active);

      if (intersectionRatio > maxIntersectionRatio) {
        maxIntersectionRatio = intersectionRatio;
        maxIntersectingDroppableContainer = droppableContainer.id;
      }
    }
  }

  return maxIntersectingDroppableContainer;
};

Thanks!

Hi. I used @robstarbuck's algorithm but my active lost its offset in a long list while scrolling and then I did this :
 const activeRectIntersection = ({
    active,
    collisionRect,
    droppableContainers,
  }, scrollableContainersKeys) => {
    let maxIntersectionRatio = 0;
    let maxIntersectingDroppableContainer = null;
    for (const droppableContainer of droppableContainers) {
      const {
        rect: { current: rect },
      } = droppableContainer;

      if (rect) {
        let intersectionRatio = 0
        if(scrollableContainersKeys.includes(droppableContainer.id)) intersectionRatio = getIntersectionRatio(rect, active?.rect?.current?.translated || {})
        else  intersectionRatio = getIntersectionRatio(rect, collisionRect);
        if (intersectionRatio > maxIntersectionRatio) {
          maxIntersectionRatio = intersectionRatio;
          maxIntersectingDroppableContainer = droppableContainer.id;
        }
      }
    }
    return maxIntersectingDroppableContainer;
  };

I use active to calculate the intersection ratio with the scrollable container and the collisionRect with the other elements. This works for my use case. I hope it helps

I'm having the same issue. how can I fix drag issue on scrollable container?

I made it work with document.elementsFromPoint. It gets all nodes located on the mouse position and works within scrollable containers as well. Not sure if it's the best solution for anyone performance-wise, but worked for me.
I've added a common className and the id to each droppable zone to be able to find it in the results array.
import {
  // ...
  rectIntersection,
  CollisionDetection,
} from '@dnd-kit/core';

// ...

const MainComponent = () => {
  const mousePosition = useRef({x: 0, y: 0});

  useEffect(() => {
    const handleMouseMove = (event: MouseEvent) => {
      mousePosition.current = {x: event.clientX, y: event.clientY};
    };
    window.addEventListener('mousemove', handleMouseMove);
    return () => {
      window.removeEventListener('mousemove', handleMouseMove);
    };
  }, []);

  const collisionDetection: CollisionDetection = (args) => {
    const nodesAtPosition = document.elementsFromPoint(
      mousePosition.current.x,
      mousePosition.current.y,
    );

    const droppableId = nodesAtPosition.find((node) =>
      node.classList.contains('droppable-zone'),
    )?.id;

    if (droppableId) {
      return droppableId;
    }

    // fallback to default collision detection algorithm
    return rectIntersection(args);
  };

  return (
    <DndContext
      // ...
      collisionDetection={collisionDetection}
    >
      {/* ... */}
    </DndContext>
  )
};


can't use "ImportBlocks" plugin

use the Full Offline Package.
neo-cli version : 3.0.0-preview1
system: ubuntu 16.06
show error info:
[ERROR][2/12/20 4:18:57 PM][Thread 0005][akka://NeoSystem/user/$d] One of the identified items was in an invalid format.
Cause: System.FormatException: One of the identified items was in an invalid format.
at Neo.Network.P2P.Payloads.BlockBase.Deserialize(BinaryReader reader)
at Neo.Network.P2P.Payloads.Block.Deserialize(BinaryReader reader)
at Neo.IO.Helper.ReadSerializable[T](BinaryReader reader)
at Neo.IO.Helper.AsSerializable[T](Byte[] value, Int32 start)
at Neo.Plugins.BlockImporter.GetBlocks(Stream stream, Boolean read_start)+MoveNext()
at Neo.Plugins.BlockImporter.GetBlocksFromFile()+MoveNext()
at Neo.Plugins.BlockImporter.OnReceive(Object message)
at Akka.Actor.UntypedActor.Receive(Object message)
at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
at Akka.Actor.ActorCell.ReceiveMessage(Object message)
at Akka.Actor.ActorCell.Invoke(Envelope envelope)

Are you using neo2 binaries?


[WIP] fix: Layout nested in vertical Layout

Blocking #255
The goal of this PR is to make the Layout component compliant with our other components:

Use styles prop instead of rootCSS, etc.
Use Layout.Area subcomponents instead of hard coded markup
Use display: flex instead of display: grid as this is a 2d layout component

The Layout and LayoutArea components should behave just like the rest of our components and should have the same features.

@levithomason trying to pick this up but merge is very difficult with all the updated; is it worth merging or better start over?

@Bugaa92 We are removing layout from our components and doing more investigation around the template prop and this PR is quite old / has conflicts.  I'm closing for housekeeping.


[WIP][Oppo-Mem-leak-test]2.5.10 patch 20230821

Fixes #issue
What type of PR is this:

[ ] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[x] Yes, this PR will result in a change in behavior.
[ ] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[ ] I have checked the version labels which the pr will be auto-backported to the target branch

[ ] 3.1
[ ] 3.0
[ ] 2.5
[ ] 2.4

[FE Incremental Coverage Report]
:heart_eyes: pass : 0 / 0 (0%)

[FE Incremental Coverage Report]
:heart_eyes: pass : 0 / 0 (0%)

[BE Incremental Coverage Report]
:disappointed: fail : 1 / 57 (01.75%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
src/exec/pipeline/scan/olap_scan_context.h
0
1
00.00%
[69]

:large_blue_circle:
src/exprs/table_function/java_udtf_function.cpp
0
6
00.00%
[127, 128, 129, 131, 132, 134]

:large_blue_circle:
src/exec/pipeline/pipeline_driver.cpp
0
2
00.00%
[656, 657]

:large_blue_circle:
src/runtime/query_statistics.cpp
0
1
00.00%
[45]

:large_blue_circle:
src/runtime/runtime_filter_worker.cpp
0
46
00.00%
[196, 263, 268, 269, 270, 271, 274, 275, 280, 281, 282, 283, 284, 285, 286, 298, 299, 300, 385, 428, 429, 603, 664, 665, 666, 736, 740, 752, 753, 771, 772, 773, 774, 791, 793, 794, 795, 796, 797, 798, 800, 801, 804, 853, 858, 859]

:large_blue_circle:
src/exec/pipeline/query_context.cpp
1
1
100.00%
[]


@conda-forge-admin,please add bot automerge

@conda-forge-admin,please add bot automerge

Hi! This is the friendly automated conda-forge-webservice.
I just wanted to let you know that I added bot automerge in conda-forge/simplemachinesforum-feedstock#2.


not working

its not working in react

What error are you getting?
What exactly is not working?
What have you tried?

Hello @Milankorangi
I have updated the package and elaborated more in the README on how to use the package properly. Hope it helps!

Hello @Milankorangi
I have updated the package and elaborated more in the README on how to use the package properly. Hope it helps!

Hello @Milankorangi
I have updated the package and elaborated more in the README on how to use the package properly. Hope it helps!

Hello @Milankorangi
I have updated the package and elaborated more in the README on how to use the package properly. Hope it helps!


Update SECURITY.md

grammar update, please point any other issues with the grammar of the policy.

nooooooooo


Fix for #5019

Please do not update the README or Change Log, we will do this when we merge your PR.
This PR (delete as applicable)

Fixes a bug

Describe the changes below:
On the issue #5019, I've asked about if we set only height, it's not doing anything. This might be a solution for that problem
var group = this.add.group({
    key: 'diamonds',
    frame: [ 0, 1, 2, 3, 4 ],
    frameQuantity: 20
});

Phaser.Actions.GridAlign(group.getChildren(), {
    width: 10,
    height: 5,
    cellWidth: 32,
    cellHeight: 32,
    x: 100,
    y: 100
});

Creates the result of

It stops when it hit's the height limit as futured on line
How ever if you only give height as 5 lets say
var group = this.add.group({
    key: 'diamonds',
    frame: [ 0, 1, 2, 3, 4 ],
    frameQuantity: 20
});

Phaser.Actions.GridAlign(group.getChildren(), {
    height: 5,
    cellWidth: 32,
    cellHeight: 32,
    x: 100,
    y: 100
});

The result shows as

👍


There is SQL blind injection at "Article search"(Column administrator authority)

First, we enter the background and use the column administrator admin1 we created:

We click in order and grab packets:

There is a SQL blind injection vulnerability in the location of name:

POC:/admin/admin.php?name=s%"+and+"sca%"="&cat=0&status=&action=cms&ctrl=lists&submit=%E6%9F%A5%E8%AF%A2

3.0.1 fixed, thanks for your contribution


Revert "Revert "Merge pull request #1851 from slashpai/metrics-server""

Fix is added in openshift/cluster-monitoring-operator#2334
SNO fix in https://github.com/openshift/cluster-monitoring-operator/pull/2337
This reverts commit a7a9d560d1005ecab50e393968df6a3e1ff226da.
Adding placeholder to add back the feature gate to default and testing payload jobs before merging
/hold
cc: @machine424 @jan--f

It looks like I cannot directly revert the change as there is package change after revert was merged

Once https://github.com/openshift/cluster-monitoring-operator/pull/2329 is merged will verify the payload jobs as mentioned in https://github.com/openshift/api/pull/1863

/retest

/retest

/retest

/payload-job periodic-ci-openshift-hypershift-release-4.16-periodics-e2e-aws-ovn-conformance

/payload-job periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node

SNO's fix is in https://amd64.ocp.releases.ci.openshift.org/releasestream/4.16.0-0.nightly/release/4.16.0-0.nightly-2024-05-14-095225
https://github.com/openshift/cluster-monitoring-operator/pull/2337

/payload-job periodic-ci-openshift-release-master-nightly-4.16-e2e-aws-ovn-single-node

/lgtm

QE already signed off on this, TRT reverted and requested HyperShift conformance on the un-revert, can see that's green here so happy to continue
/lgtm
/override ci/prow/verify

/hold cancel

/label qe-approved

/payload 4.16 nightly blocking

We already tested hypershift and sno payload test which were failing in previous attempt before fix
hypershift: https://github.com/openshift/api/pull/1865#issuecomment-2109372438
sno: https://github.com/openshift/api/pull/1865#issuecomment-2109970633
/label acknowledge-critical-fixes-only
cc: @jan--f @simonpasquier @machine424


Support Pull Request Reviews for GitHub Enterprise

Hello, haya14busa! Thanks for this great tool!
I can see in the code that reviewdog knows how to post comments in one big review but the behavior is disabled for Enterprise users. From what I can tell the Enterprise API now supports reviews. Can we get that feature enabled?

Do you know how to check the review API is available or version of GHE?
Or, maybe we can totally disable old way to post comments?
Do you know when did the review API become available and GHE policy or something about updating version?

It looks to me that the review api became available in GHE v2.9. I can't tell if there is a way in the API to check your version. One option might be to do a GET against the reviews endpoint for a known PR and see if it 404s.


Provide support to obscure passwords

Is your feature request related to a problem? Please describe.
So far I understood, all passwords for SFPT or FTP etc. have to be transformed by "rclone obscure password" before using in rclone.conf.
After installing the addon rclone is not availabe as Linux command line (bash) and also there is no way to use the addon itself for doing the job.
Describe the solution you'd like
Any way to run "rclone obscure password"

provided by the addon, or
provided by the linux command, or
provided by the documentation: how to run the command in the hassio linux environment (provide the path to the command)

Describe alternatives you've considered
No response
Additional context
No response

same problem  " couldn't decrypt password: input too short when revealing password - is it obscured?"   I have to run  the command rclone obscure   but it is not possible with hassio    Rgds

So, if I get this correctly, there is no way to use webdav with the password as we cannot use rclone obscure?