--parallel Does not honor build dependencies

Describe the feature you'd like to request
In the canonical example, turbo run dev --parallel --no-cache is used for development.
However, --parallel will build dependent tasks in parallel too, even though those might need to be executed in dependency order.
Given a graph like: A -> B and A -> C
And a turborepo definition like:
    "turbo": {
        "pipeline": {
            "build": {
                "dependsOn": ["^build"]
            },
            "dev": {
                "dependsOn": ["build"]
                "cache": false
            }
        }
    }

Running turbo run dev --parallel --no-cache will break on the build step, because the builds of B and C depend on the build of A completing.
Describe the solution you'd like
One possible solution is to add a parameter like --parallel-depth=1 (default: Infinite), where only the dev commands are executed in parallel, but deeper dependent commands are not.
Describe alternatives you've considered
Removing build from dev: { dependsOn }, and executing 2 commands works:
turbo run build
turbo run dev --parallel --no-cache

https://turborepo.org/docs/reference/command-line-reference#--concurrency

We've also encountered this issue in https://github.com/discordjs/discord.js/pull/7175, where the packages/rest module doesn't await the building of packages/collection before starting its own, causing CI and local build errors. It seems that parallel doesn't account for the dependencies correctly (please correct me if wrong)
CI where it errors: https://github.com/discordjs/discord.js/runs/4674304974?check_suite_focus=true
After removing --parallel from all our scripts: https://github.com/discordjs/discord.js/runs/4674651684?check_suite_focus=true
Would love to help debug this further, let me know how I can help 🎉

@jaredpalmer I've created a repository to reproduce the issue: https://github.com/VanTanev/turborepo-reproduce-460
I would expect when running in parallel, the leafs are run in parallel, but they still honor their build deps;
Instead, leaf commands will execute in parallel with commands they depend on.

The docs do specifically say this ignores the dependency graph, but I'm struggling to see how this is useful?
In the meantime is there a workaround for local development where you build your dependencies with a tsc -w or similar? If you remove the parallel flag, as the processes never exit (watch mode) the build just hangs :(

Leafs automatically run in at max parallelism with turbo. It sounds like what you want is dev to depend on its dependencies being built? ^build

@jaredpalmer does that work when the "build" operation however is a watch and therefore never terminates? It seemed to hang when I tried it, which would make sense as if the process doesn't exit how does it know when to move on in the dependency graph?

So I just tested some more bits out... I've got a dev task defined as follows in turbo.json:
"dev": {
    "cache": false,
    "dependsOn": ["^dev"]
},

The dev task does different things:
"dev": "react-scripts start" // Apps
"dev": "tsc -w" // Libs

Here's the graph for context:

If I don't use the parallel flag (turbo run dev --no-cache --continue) then running things gets stuck:

09:44:47 - Starting compilation in watch mode...
@iw/title:dev:
@iw/title:dev:
@iw/title:dev: 09:44:49 - Found 0 errors. Watching for file changes.
@iw/log:dev:
@iw/log:dev: 09:44:49 - Found 0 errors. Watching for file changes.

If I add the parallel flag back in (turbo run dev --no-cache --parallel --continue) then things run, but I get those errors during the build process (which sometimes manifest in the web application too):

app2:dev:
@iw/log:dev:
@iw/log:dev: 09:57:44 - Found 0 errors. Watching for file changes.
@iw/title:dev:
@iw/title:dev: 09:57:44 - Found 0 errors. Watching for file changes.
@iw/button:dev: src/components/Button/Button.tsx(2,21): error TS2307: Cannot find module '@iw/log' or its corresponding type declarations.
@iw/button:dev:
@iw/button:dev: 09:57:45 - Found 1 error. Watching for file changes.
...
app:dev: TS2307: Cannot find module '@iw/button' or its corresponding type declarations.
app:dev:     2 | import logo from './logo.svg';
app:dev:     3 | import './App.css';
app:dev:   > 4 | import { Button } from '@iw/button';
app:dev:       |                        ^^^^^^^^^^^^
app:dev:     5 | import { Title } from '@iw/title';
app:dev:     6 |
app:dev:     7 | function App() {

(Note that this app is actually running correctly, and hot-reloading correctly. But always displays this error over the top).

Sounds like what you want to do isn't the parallel flag, but rather increase the allowed concurrency so that you are able to run through all build processes first, and then accumulate long running dev processes without running out of the 10 default go-routines.
So have dev depend on ^build, but then run with turbo run dev --concurrency=50

@jaredpalmer I just tried that, and unfortunately it doesn't work either (though I was using ^dev to keep the watch mode). The concurrency is going to max out at 2 at the start (due to the lowest level dependencies) and because they never finish it can't start the next tasks, regardless of the concurrency limit.

You're welcome to use https://github.com/IPWright83/pnpm-monorepo as another example if needed. Requires pnpm, but using pnpm run dev_ideal illustrates the issue. I've added a dev script that also does a build to workaround it for now... turbo run build --scope=@iw* --no-deps && turbo run dev --no-cache --parallel --continue

Yeah, would be great to have this fixed. Especially, if you want to execute a collection of applications during development, e.g 10-15 watchers

We have a similar use case, we have a monorepo of libraries (currently 9) and need to run all of them in watch mode. Libraries depend on each other and their dev process is defined as tsc --watch & esbuild ... --watch.  tsc only emits declaration files, and esbuild emits runtime code. Both watchers include initial build step.
Or dev task in turbo.json is: defined as:
"dev": {
   "cache": false
}

and we run it as yarn turbo run dev --parallel.
Our watchers do not hang, but once all watchers are started, package A that depends on package B doesn't not seem to be aware of changes in package B, even though the declaration file definitely exists on the filesystem.
packageA: src/file.ts: error TS7016: Could not find a declaration file for module 'packageB'. '/Users/users/monorepo/packages/packageB/lib/index.js' implicitly has an 'any' type.

We're currently using a workaround and running dev for specific package as:
yarn turbo run dev --scope=packageA --no-deps

which works fine for developing packageA + its dependencies, but not its dependents.

Since this feature is IMHO a very basic need, I don't understand how we can use Turborepo dev mode when some packages relies on others. Did someone found any workaround on this ?

My understanding is that this currently works /fine/.
You must not pass --parallel flag, because that breaks deps, but by default turbo runs with 10 concurrent tasks, and if you have tasks that "hang" and never exit like dev, those will work as long as they fit within the allotted concurrency slots.

dev cannot depend on a process that never exits, but it can depend on eg build of another package

I fixed by doing a build first (that does exit) followed by a build-watch. Then you know all the dependencies should be ready

this would still be a cool feature to have, pseudo parallel by topological order maybe with a configurable timeout when the dependencies dev commands are seen as "completed", or some other way to detect it's just in idle watching mode.
in some use cases this beats first running the build command to ensure the fresh dependencies are built.

Since dev is a non ending tasks, dependents tasks are not executed. Any thought ?

I also realized this, So I try to let the dev task to depend on ^build as the like whats said here.
https://github.com/vercel/turborepo/issues/460#issuecomment-1064161370
But if you have a dependency graph like A -> B. For example A is a typescript package, its build script is tsc.
If you are developing A and B at the same time which is a common case in monorepo. Once A has a type error during development, tsc will failed and exit then the whole turbo run dev exited.
Nx seems planing to support a long runing task as dependency. https://github.com/nrwl/nx/pull/10706
It would be nice if turborepo also supported this.

I have watch modes with incremental rebuilds for all packages as their dev task, one-off optimized builds as their build task.
Because I want to run all dev tasks in parallel and the incremental watch builds output to the same directories the one-off optimized builds would also output, I need to have all packages built before I start their dev modes. In the repo's root, I have turbo run dev --continue as my dev task at the root and this in my turbo.json:
"dev": {
  "dependsOn": ["^build"],
  "cache": false
}

This starts all builds and after they finish, starts all watch modes. So far, so good.
However, if application A depends on package B which in turn depends on package C, what I'd like to see when I save a file in package C is that C does an incremental rebuild, followed by an incremental rebuild of B, followed of an incremental rebuild of A, followed by a browser refresh (which is out of turborepo scope).
What happens instead is an incremental rebuild of package C. That's it. Is there any way to get what I want?

@codepunkt what tech are you using here, as this is working for me...

If I update @iw/log then @iw/title builds and app refreshes correctly, logging the new output. This is with create-react-app's all the way down.

How do you do this with filters? I have a monorepo set up with two different folders:

packages (typescript compiled libraries)
apps (individual sites/servers that depend on packages)

Every package and app has a dev script which in the case of packages runs a watched build, in the case of apps runs a dev server or whatever.
I want to work on one app at a time, so I want to run turbo run dev --filter=app. The problem is adding the filter means it won't run dev in my packages. I cant tell turborepo that dev depends on ^dev because dev commands never exit and it will  never run. I have tried turbo run dev --filter=...app but that does not run the dev scripts in my dependent packages either.
Is there really no inbuilt way of doing this without running ALL the dev scripts in my monorepo?

I ran into the same issue where package A depends on the build (and its type definitions) of package B. So I followed the advice given here and used:
"dev": {
  "dependsOn": ["^build"],
  "cache": false
}

and the script without the parallel flag:
"dev": "turbo run dev --continue",

So far everything seems to start and update accordingly.

@rwieruch I think you might end up with a race (if dependencies don't build in the correct order). That's why I've opted to do a pre-build before hand.

So if you ended here as me, let's reiterate how Turborepo dev works (and how not) because it's confusing.
The workflow a developer would expect is to install modules and then run the dev script, but that's now how Turborepo works. A dev task needs two things: generate code and run watchers. From Turborepo docs:
--parallel
Default false. Run commands in parallel across workspaces and ignore the dependency graph. This is useful for developing with live reloading.

It's confusing because Turborepo runs everything parallel, if possible. This configuration should be named --ignoreDependecyGraph
--parallel is required to run watchers, but before that, we need to build code in order so we can't use --parallel. It's a chicken-egg problem.
I bet many developers just run a dev task, then they see some errors, then they will rerun it, and then it magically works. That's not ideal.
Turborepo suggests that we should use dependsOn https://turborepo.org/docs/handbook/dev#running-tasks-before-dev, but it solves nothing, because --parallel is required for watchers and it actually --ignoreDependecyGraph
As I see it, there really have to be two tasks run separately from the command line. Something like buildForDev and then dev.

The title and description here describes the intended behavior of --parallel.
What's being described here is more like several feature requests put together. Something like --watch and some health checking across tasks. We have an issue that we're actively working on in #986 and have ideas about depending on long-running tasks.
I'm going to close this issue since it's describing the intended behavior - but rest assured that we hear the pains!


[AUTOPATCHER] Patches CVE-2021-20257 for qemu-kvm

        Patches CVE-2021-20257 for qemu-kvm.
        This patch and PR was automatically generated and needs human verification before merging.

Closing PR as this issue has already been resolved.


Option to run Smoke Detector chatless/metasmokeless/gitless

For testing, it would be beneficial if Smoke Detector could be run in a completely local mode, i.e. with output only to the console, and no connection to various back-end services which it normally communicates with.
Ideally, the services it uses should be individually selectable, but for a start, a way to disable them all would encourage experimentation and perhaps even allow more people to participate in its development because setting up a private instance is both less visible (and so less embarrassing if you make silly mistakes, or have weird experiments which would pollute the chat room inordinately) as well as less technically intimidating.

Obligatory sarcastic "edit your hosts file"...
But in seriousness, we're almost there already. Git and metasmoke are already entirely optional - just don't put them in config if you don't want them. Chat is less optional, but someone (Thomas) made a start on a no-chat mode that could be finished up.

I'm happy to try and build a chat-less mode, but it'll be a little tricky to build.  You can assign this to me in the mean time - we have such heavy chat integration for things, that I'll have to do some overhauling just to get this part working.  I also don't think I have any work on the no-chat mode, I only had fixes for 'failed to login to chat' issues.

Chatless is trivial in the NG PR with an empty rooms.yml.

The 'gitless' point (which I'm assuming means using git for read-only tasks) should be complete when #1280 is merged.

I'd say we're already decently Metasmoke-less as well


Removed bithound badges from readme solving #430

Removed bithound badges from readme solving #430

Coverage remained the same at 100.0% when pulling<PHONE_NUMBER>4307d0a7e31bd9361dacd49f8dba29 on waldekmastykarz:fix-readme-bithound into 413988dcaaee73aee1f15eb0096647c15ffbc280 on SharePoint:dev.

Merged manually


Cherry picking a couple of fixes from main to 068-stable branch to help fix issues in some brownfield applications

Summary
There are a couple of fixes in main branch which removes some of the issues faced in brownfield applications.
I plan to cherry-pick these fixes to 0.68-stable branch.

Changelog

https://github.com/facebook/react-native/pull/33952 - Added additional builder method receiving arguments for using jsc or hermes to correctly decide which DSO to load at app startup.
https://github.com/facebook/react-native/pull/33133 - Logging a soft error when ReactRootView has an id other than -1 instead of crashing the app in hybrid apps.

[CATEGORY] [TYPE] - Message
Test Plan

Tested locally on our app.

I don't think thats going to happen like this. If you want something picked, you should post the commit in the respective release discussion. For 0.68.3 it would be https://github.com/reactwg/react-native-releases/discussions/22

@danilobuerger I think it's ok in this scenario, this route should help ensure that conflicts during cherry pick are addressed - that said, we are still discussing within the release crew if a new patch release for 0.68 will happen.

(for future memory, in case you are seeing this:

it's just a GH bug in showing the visuals - Sparsha didn't do anything in RN core, it was on his fork - we are reporting this to GH)


Provide default value for requestForTestingPhrase

I configure my Jenkinses via a setup.groovy script and never visit the configuration page.
Builds are never run for people who are not on the white list and the admin is never asked to approve builds for them.
It turns out that the reason is that Jenkins is trying to use the requestForTesting phrase but that it has never been set, leading to a NullPointerException:
Unable to handle comment for PR# 1213, repo: git-workshop/git-workshop.<elided>
java.lang.NullPointerException
	at org.jenkinsci.plugins.ghprb.GhprbRepository.addComment(GhprbRepository.java:238)
	at org.jenkinsci.plugins.ghprb.GhprbRepository.addComment(GhprbRepository.java:234)
	at org.jenkinsci.plugins.ghprb.GhprbPullRequest.<init>(GhprbPullRequest.java:139)
	at org.jenkinsci.plugins.ghprb.GhprbRepository.getPullRequest(GhprbRepository.java:365)
	at org.jenkinsci.plugins.ghprb.GhprbRepository.onIssueCommentHook(GhprbRepository.java:345)
	at org.jenkinsci.plugins.ghprb.GhprbTrigger.handleComment(GhprbTrigger.java:611)
	at org.jenkinsci.plugins.ghprb.GhprbRootAction$1.run(GhprbRootAction.java:233)

I'm currently working around the issue like so:
// Set up the Github Pull Request Builder Plugin
//    https://gist.github.com/kpettijohn/e294c50e29ca4e8a329e
def ghprbDesc = Jenkins.instance.getDescriptorByType(org.jenkinsci.plugins.ghprb.GhprbTrigger.DescriptorImpl.class)

// [other settings elided]
// Set a value to use when Jenkins asks the admins if it's
// ok to run a build from a "stranger".  This field has no
// default value, so if it's not set here, Jenkins accesses a
// null pointer and becomes sad.
Field testPlease = ghprbDesc.class.getDeclaredField("requestForTestingPhrase")
testPlease.setAccessible(true)
testPlease.set(ghprbDesc, "Can one of the admins verify this patch?")

but it seems like it would be safer to provide it with a default value like you do for the other phrases.
Alternatively, org.jenkinsci.plugins.ghprb.GhprbRepository.addComment {sh,c}ould check that it's argument is not null before using it.  But, that wouldn't help the 'infrastructure as code' crowd as much as my proposed change.
It would be really nice if there were a programmatic way to configure the plugin.  The configure method is tied to a request, so it's not easily usable and using reflection to access the plugin's private bits seems icky.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Is there anything I can do to help move this along?


Added migration file and created GeneToGeneParalogy class

Initial work for importing Paralogy data type from neo4j to persistent store.

Also this PR needs to get rebased onto alpha.


162 update packages

I migrated to Gatsby v4 and updated some packages.
I also deleted some packages that weren't used anymore.
Gatsby v4 needs at least Node v14, so I updated that in the relevant parts (so this might also close #151 ) and noted that as well in the README.
Gatsby changed the order of execution in its build methods, so I had to move the createTypes call out of the schemaCustomization call, because it gets now called before the sourceNodes call.
This has the side effect that the languages var is not yet filled with the apparent languages in the turtle files.
To overcome this issue I just moved the createTypes method to the sourceNodes call. I think this is the biggest change here. Apart from that its mostly just updating packages and a few syntax changes, where packages changed something.
I also changed the informations in the package.json file since it was still the default values from the gatsby starter default.
EDIT: I suggest that we delete all the dependabot branches and Pull requests if this PR goes through.

Hey @literarymachine ,
thanks for trying out!
I can't reproduce your error. I did a fresh git clone of the repo switched to this branch and followed the instructions in the README:
git clone https://github.com/skohub-io/skohub-vocabs.git
cd skohub-vocabs/
git switch 162-update-packages
git status
nvm use 14
npm i
cp .env.example .env
cp test/data/systematik.ttl data/
npm run build

This built everything without an error. Maybe there was still some cache or anything somewhere? The GitHub Actions also went through without an error.
Regarding this warning:

warn Calling `createTypes` in the `sourceNodes` API is deprecated. Please use: `createSchemaCustomization`.

I noticed as well. And just like you I did not find any solution right now. What is your suggestion? Keep everything as is till we find one or update and live with the warning for now till we find a solution?

@literarymachine Will you be able to review this or should we just move forward with deploying this (after functional review of yourse)?

Thx @sroertgen ! ... and sorry for the late response
It's building fine here, too.
Reduces vulnerabilities from:

found 345 vulnerabilities (12 low, 225 moderate, 107 high, 1 critical)

to

30 vulnerabilities (12 moderate, 17 high, 1 critical)

As @acka47 noted in https://github.com/skohub-io/skohub.io/issues/16#issuecomment-1036083470 we are going to merge and deploy this. Will do this at Monday - for Murphy's Law and today's Friday.

Problem still here. Did a new fresh build exactly as noted by @sroertgen at https://github.com/skohub-io/skohub-vocabs/pull/163#issuecomment-981454997.
Has it something to do with the exact node and npm version? Mine are:

Now using node v14.17.6 (npm v7.0.15)

@sroertgen did what you said, same result. Also, did totally new clones like you mentioned before. Also used different node/npm versions. It's not working here. Curious why it works for you AND also for github. Cannot peek into github actions logs (not available atm).
Have you tried it yourself right from start cloning? What's your output for node --version; npm --version ?

Have you tried it yourself right from start cloning?

Yes, just before I wrote my last comment, I tested with a fresh clone. Just did it again today ^^
❯ node --version
v14.17.6
❯ npm --version
8.1.2

I added a commit to log the node and npm version on the github action. And now it also fails here. I guess I will have to take a  look into this again.

This is really strange, using https://github.com/nektos/act to test github actions locally, it also runs through, though it uses the same node and npm versions GitHub Actions does here.

 The error seems to be that sometimes (how weird is that?) the turtle files are not found. I added a log message to show found turtle files in the last commit.
Surprisingly now the GitHub Action went through again, though I just added a console.log(...). Now the Turtle file was found:
[
  {
    id: '4af430c2-28e5-590a-a7b1-c785242938d2',
    children: [],
    parent: null,
    internal: {
      contentDigest: '2de422071e0fbdd5208b7184ae0da40d',
      type: 'File',
      mediaType: 'text/turtle',
      description: 'File "data/systematik.ttl"',
      owner: 'gatsby-source-filesystem',
      counter: 37
    },
    sourceInstanceName: 'data',
    relativePath: 'systematik.ttl',
    extension: 'ttl',
    prettySize: '97 kB',
    modifiedTime: '2022-02-23T08:38:55.800Z',
    accessTime: '2022-02-23T08:38:55.800Z',
    changeTime: '2022-02-23T08:38:55.800Z',
    birthTime: '2022-02-23T08:38:55.800Z',
    root: '/',
    dir: '/home/runner/work/skohub-vocabs/skohub-vocabs/data',
    base: 'systematik.ttl',
    ext: '.ttl',
    name: 'systematik',
    absolutePath: '/home/runner/work/skohub-vocabs/skohub-vocabs/data/systematik.ttl',
    relativeDirectory: '',
    dev: 2049,
    mode: 33188,
    nlink: 1,
    uid: 1001,
    rdev: 0,
    blksize: 4096,
    ino: 1063432,
    size: 97012,
    blocks: [19](https://github.com/skohub-io/skohub-vocabs/runs/5300543154?check_suite_focus=true#step:9:19)2,
    atimeMs:<PHONE_NUMBER>799.883,
    mtimeMs:<PHONE_NUMBER>799.883,
    ctimeMs:<PHONE_NUMBER>799.883,
    birthtimeMs:<PHONE_NUMBER>799.883,
    atime: '[20](https://github.com/skohub-io/skohub-vocabs/runs/5300543154?check_suite_focus=true#step:9:20)[22](https://github.com/skohub-io/skohub-vocabs/runs/5300543154?check_suite_focus=true#step:9:22)-02-[23](https://github.com/skohub-io/skohub-vocabs/runs/5300543154?check_suite_focus=true#step:9:23)T08:[38](https://github.com/skohub-io/skohub-vocabs/runs/5300543154?check_suite_focus=true#step:9:38):[55](https://github.com/skohub-io/skohub-vocabs/runs/5300543154?check_suite_focus=true#step:9:55).800Z',
    mtime: '2022-02-23T08:38:55.800Z',
    ctime: '2022-02-23T08:38:55.800Z',
    birthtime: '2022-02-23T08:38:55.800Z'
  }
]

Will have to look at if there is something wrong with gatsby's gatsby-source-filesystem plugin. That will be fun...

Smells like some asynchronous (or not flushed) file writing - like trying to check them before they are really available in the fs.

Hey @dr0i,
would you mind checking again? The only way I was able to remove this issue, was to "outsource" the node creation to the onPreBootstrap API. Now I'm searching recursively all the ttl-files in the data folder using fs and creating nodes out of them. This way also all the languages are found, so the GraphQL type definitions can be build correctly.
This might not be the most gatsby-like way, but I was not able to figure out, why gatsby sometimes find the ttl-files and sometimes not.
Regarding the mentioned deprecation warning of the createTypes-action: I suggest we live with it for now. In the official documentation it is still mentioned to be ok to call this action during sourceNodes: https://www.gatsbyjs.com/docs/reference/config-files/actions/#createTypes
Sorry that this took so long. But it was a hell to debug this. Fingers crossed that it works on all machines now.

Thx @sroertgen , this time it's running fine - tested on two machines. So, @literarymachine you could review, if you have time?  @acka47 can you do funtional review?

I tried this out with my HCRT fork but it doesn't work. The SkoHub server responds with a 202 and a build URI but the build does not seem to really execute, see my last try at https://test.skohub.io/build/?id=7e6fc25d-8d0f-4258-99c6-f3e4ae0549e6

Had to add "nvm use $nodeversion" to make the start script using proper nvm version. Seems to work now.

Can confirm, see https://test.skohub.io/build/?id=0f71bfa3-ee55-402b-89c3-32f30ffcaa6c#. +1

Merged and deployed.
Great and many thx again @sroertgen !

This branch seems to bring up erratic problems reported in https://github.com/skohub-io/skohub-vocabs/issues/182#issuecomment-1106438520.


[FEAT] Quantize the model used at runtime

Hello, I was wondering if it is possible to quantize the trained GPT-2 model (from 32bit float to 8bit fixedpoint). I understand that this would reduce filesize and memory usage quite a bit. Tensorflow has some scripts that perform the conversion almost automatically. You would obviously train on the original model but release the quantized one for end users.

I've done some reading and it sounds like a 16-bit TensorFlow Lite model would suffer relatively little degradation in quality (<0.049% noise) while halving the model's size on disk and in memory and potentially improving GPU processing speed.  The reduced memory requirement would make the game playable on many consumer GPUs like my 1080 Ti. https://www.tensorflow.org/lite/performance/post_training_quantization
I've made a few clumsy attempts to introduce downsampling into my working copy but I'm not a Tensorflow user and had some trouble understanding how to access input/output tensor metadata in the checkpoint objects.  I'm also aware that TFLite has a different API for calculations, so some other changes in the generator might be necessary to run the model.
Someone in the Discord pointed to this blogpost about converting:  https://planb.nicecupoftea.org/2019/10/26/tensorflow-savemodel-for-tflite/

Ah, looks like somebody already implemented the quantization in a branch here:  https://github.com/cloveranon/Clover-Edition

This is a great idea. IMO we should still provide the current 32bit float model to give users options

I've tested Clover Edition now and it runs wonderfully on my 8GB consumer-grade GPU.  For some reason they distribute a 32-bit model and quantize it at runtime, which seems like a waste of disk and bandwidth...


Support native font picking with UIFontPickerController.

This would allow users to use a font they might have installed, or other system fonts:
https://dashboard.instabug.com/applications/swiftterm/beta/bugs/39

Fixed in upcoming release


[Bug]: listWithPrefix Error Occurred When Using Milvus Backup Check Or Create

Current Behavior
When I Run Check, An error occurred : storage: copier copy object The specified bucket does not exist
here is the execution log
bash-5.2# ./milvus-backup check
0.4.26 (Built on 2024-10-30T09:28:19Z from Git SHA dd4515017a2d2f7c9493070fe321156a6c9126d4)
config:backup.yaml
[2024/11/22 12:52:42.338 +08:00] [INFO] [logutil/logutil.go:165] ["Log directory"] [configDir=]
[2024/11/22 12:52:42.338 +08:00] [INFO] [logutil/logutil.go:166] ["Set log file to "] [path=logs/backup.log]
[2024/11/22 12:52:42.338 +08:00] [DEBUG] [core/backup_context.go:68] ["Start Milvus client"] [endpoint=milvus.copilot.svc.cluster.local:19530#:tcp://<IP_ADDRESS>:19530]
[2024/11/22 12:52:42.348 +08:00] [DEBUG] [core/backup_context.go:161] ["create milvus storage client"] [address=copilot-minio:9000] [bucket=milvus-bucket] [backupBucket=backup-bucket-1121]
[2024/11/22 12:52:42.365 +08:00] [INFO] [storage/minio_chunk_manager.go:144] ["minio chunk manager init success."] [bucketname=milvus-bucket] [root=file]
[2024/11/22 12:52:42.379 +08:00] [DEBUG] [core/backup_context.go:192] ["create backup storage client"] [address=<IP_ADDRESS>:80] [bucket=milvus-bucket] [backupBucket=backup-bucket-1121]
[2024/11/22 12:52:42.510 +08:00] [INFO] [storage/minio_chunk_manager.go:144] ["minio chunk manager init success."] [bucketname=backup-bucket-1121] [root=backup]
[2024/11/22 12:52:42.604 +08:00] [DEBUG] [core/backup_context.go:708] ["check copy"] [srcBucket=milvus-bucket] [destBucket=backup-bucket-1121] [key=file/milvus_backup_check_src_1732251162] [destKey=backup/milvus_backup_check_dst_1732251162]
[2024/11/22 12:52:42.615 +08:00] [DEBUG] [storage/copier.go:260] [copyRemote] [srcBucket=milvus-bucket] [destBucket=backup-bucket-1121] [key=file/milvus_backup_check_src_1732251162] [destKey=backup/milvus_backup_check_dst_1732251162]
[2024/11/22 12:52:42.659 +08:00] [WARN] [storage/minio_chunk_manager.go:425] ["failed to list with prefix"] [bucket=milvus-bucket] [prefix=file/milvus_backup_check_src_1732251162] [error="The specified bucket does not exist"]
[2024/11/22 12:52:42.659 +08:00] [WARN] [storage/minio_chunk_manager.go:437] ["listWithPrefix error"] [bucket=milvus-bucket] [prefix=file/milvus_backup_check_src_1732251162] [error="The specified bucket does not exist"]
Failed to copy file from milvus storage to backup storage
Milvus version: v2.4.6
Storage:
milvus-bucket: milvus-bucket
milvus-rootpath: file
backup-bucket: backup-bucket-1121
backup-rootpath: backup
storage: copier copy object The specified bucket does not exist

and i alao use "mc watch " at the same time, found out the the checkobject has successfully created.

here is part of my config
# Related configuration of minio, which is responsible for data persistence for Milvus.
minio:
  # Milvus storage configs, make them the same with milvus config
  storageType: "minio" # support storage type: local, minio, s3, aws, gcp, ali(aliyun), azure, tc(tencent)
  address: copilot-minio # Address of MinIO/S3
  port: 9000   # Port of MinIO/S3
  accessKeyID: minioadmin  # accessKeyID of MinIO/S3
  secretAccessKey: minioadmin # MinIO/S3 encryption string
  useSSL: false # Access to MinIO/S3 with SSL
  useIAM: false
  iamEndpoint: ""
  bucketName: "milvus-bucket" # Milvus Bucket name in MinIO/S3, make it the same as your milvus instance
  rootPath: "file" # Milvus storage root path in MinIO/S3, make it the same as your milvus instance

Expected Behavior
No response
Steps To Reproduce
No response
Environment
No response
Anything else?
No response

@freedomfee Well, the error message is clear. Does this the bucket exist?


[bug]: SIGABRT when colwidth > maxwidth

nvim crashes on startup if colwidth > maxwidth for a segment.
neovim/src/nvim/statusline.c:260: stl_fill_click_defs: Assertion 'len <= width' failed.

Crash should not be possible after https://github.com/neovim/neovim/pull/26891. Don't think there's anything to do about it here.


Fixed #315 for realz, actually allowing log on with email.

Some minor comments, but nothing impeding pushing it.

When a user logs in with an email address what do we store in the Identity (email or username)?

@osbornm It still returns a User, so that shouldn't change.

Yeah, the controller still users User.Username for the auth token.

@anglicangeek & @jeffhandley  in that case shouldn't everything expect login take only the username? If username is the "authoritative" field.

What why did the ChangeEmail thing change then?????

Yeah, actually, why would change password ever use email? It's always done with a user that's logged in.

We just need another method then, that doesn't fall back to email address.  I'll add that.

wait what? why does change password fail back to email address? login should set the user name and from then on out the whole site uses username not email?

Addressed here: https://github.com/NuGet/NuGetGallery/pull/356


⚠ Samsung has degraded performance

In 9f8a698, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2556 ms

Resolved: Samsung performance has improved in 63b4265.


fix(addon-editor): dropdown shouldn't visible outside of editor area

PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit message follows Conventional Commits
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Refactoring
[ ] Code style update
[ ] Build or CI related changes
[ ] Documentation content changes

What is the current behavior?
Part of #1302
Closes #Jira/UIKIT-5113
https://user-images.githubusercontent.com/12021443/174117814-3695e928-45d9-4427-9e1f-795861762fda.mov
What is the new behavior?
https://user-images.githubusercontent.com/12021443/174117929-076bb5f4-fa07-465f-92c9-f211046a3c8c.mov
Does this PR introduce a breaking change?

[ ] Yes
[x] No

@waterplea I tried to do it through the service, but I it doesn't work


az appconfig feature list broken 2.64.0 -> 2.65.0

Describe the bug
The Az CLI App Configuration command az appconfig feature list to list out feature flags broke after upgrading from version 2.64.0 to 2.65.0.
Worked previously for many months locally and in the Azure DevOps pipelines. After the upgrade in the pipelines and locally we noticed the following JSON decode error in the output:
WARNING: Invalid value. Unable to decode the following JSON value

I replicated this locally and in Azure Pipeline build agents.
Downgrading back to version 2.64.0 works successfully.
Related command
az appconfig feature list
Errors
WARNING: Invalid value. Unable to decode the following JSON value:
key:.appconfig.featureflag/xxx-BandwidthPolicyNewProps value:{"id": "xxx-BandwidthPolicyNewProps", "description": "Shows UI elements that control maximumConcurrentUploads, maximumConcurrentDownloads, disableSubscriptionNotifications, maximumUploadSpeed and maximumDownloadSpeed in CDM in the bandwidth policy.", "enabled": false, "display_name": null, "conditions": {"client_filters": null}}
Full exception:
'NoneType' object is not iterable
WARNING: Invalid value. Unable to decode the following JSON value:
key:.appconfig.featureflag/xxx-CleanupPolicyPage value:{"id": "xxx-CleanupPolicyPage", "description": "Allows users to decide how configure the way in which the app manages and cleans cache data.", "enabled": true, "display_name": null, "conditions": {"client_filters": null}}
Full exception:
'NoneType' object is not iterable
Issue script & Debug output

Expected behavior
Lists out feature flags from an App Configuration service without error.
Environment Summary
{
"azure-cli": "2.65.0",
"azure-cli-core": "2.65.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"azure-devops": "1.0.1",
"image-copy-extension": "0.2.13",
"maintenance": "1.7.0b1",
"storage-preview": "1.0.0b4"
}
}
Additional context
No response

Just chiming in to say I'm seeing the exact same issue - deployments failing due to a change in the behaviour of the output of the az appconfig feature list command.

Any news on a fix for this?


Update distribution.yaml

Please Add This Package to be indexed in the rosdistro.
humble
The source is here:
https://github.com/Tacha-S/sync_parameter_server
Checks

[ ] All packages have a declared license in the package.xml
[ ] This repository has a LICENSE file
[ ] This package is expected to build on the submitted rosdistro

Per https://www.ros.org/reps/rep-0144.html, I think that sync_parameter_server may be too generic without widespread community adoption.
Can you change the name to be more specific to your organization/application (for instance tacha_sync_parameter_server.

Since the name here is generic, we discussed it as a team. Since the name accurately reflects what you are doing in the package, and the package is generically useful, there is no need to do a renaming here.

Thank you for considering the package positively. Please feel free to contact me if there are any issues.


WIP: Add path tracking for better deserialization error messages.

Quick hack to show better path hints in checkpoint deserialization error messages.

Codecov Report

Merging #2623 (9f9097a) into main (722838c) will increase coverage by 0.04%.
The diff coverage is 86.36%.

@@            Coverage Diff             @@
##             main    #2623      +/-   ##
==========================================
+ Coverage   79.57%   79.62%   +0.04%
==========================================
  Files          50       50
  Lines        5313     5329      +16
==========================================
+ Hits         4228     4243      +15
- Misses       1085     1086       +1

Impacted Files
Coverage Δ

flax/core/frozen_dict.py
96.22% <ø> (ø)

flax/struct.py
78.46% <0.00%> (ø)

flax/serialization.py
71.27% <90.47%> (+2.17%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Closing this after merging #2632


Add IORING_OP_SENDMSG_ZC opcode support.

Adds support for the IORING_OP_SENDMSG_ZC opcode introduced in Linux 6.1.

Thank you!


Get default value of boolean from get()

It's more handy for boolean parameters with default values.
struct Options {
  bool foo = true;
  double bar = 1;
};
Options options = {};
cxxopts::Options parser("foobar");
parser.add_options()
  ("f,foo", "foo", cxxopts::value<bool>(options.foo))
  ("b,bar", "bar", cxxopts::value<double>(options.bar))
  ;

This change is

I'm not sure what problem this is trying to solve. Can you make a test case that illustrates the behaviour that this adds?

Closing as no activity. Please reopen and address comments if needed.


Final pass on learning objectives

Final pass and review of learning objectives following: https://www.bristol.ac.uk/academic-quality/approve/approvalguidance/intendedlearningoutcomes/

doesn't warrant a final pass?


How to Disconnect Client

I'm using nitox inside a loop, where in each run of the loop, I create a new connection.
loop {
  // create connection
  // do work
}

I tried creating my connection outside of the loop, but el compiler was complaining that NatsClient does not implement Copy.
Is there currently a way of disconnecting a client? My clients aren't getting disconnected after my loop completes, as a result I have a growing list of open connections showing on nats:8222/connz.

Disconnecting is currently not implemented because you can just drop the client.
Also, I don't really see why you would spawn futures in a synchronous loop?

@OtaK coincidentally I'm the guy who was asking about turning a database cursor into a stream, on gitter last night.
Re the loop, I missed out some detail.
I use the loop to 'run forever', but I actually do the below:
loop {
  let task = tokio::Interval::new(...).map(move |interval| {
    let nats_cn = NatsClient::from_options(...).wait().unwrap();

    let cursor_stream = get_stream_fn();
    cursor_stream.for_each(|doc| {
      nats_cn.publish(doc);
    })
  })
}

Unless my Interval stream fails, the loop has no impact (I think). So the problem's that my connection doesn't get dropped after I consume my cursor_stream.

Oh cool! Nice to see you around here.
Well I think you might have a misunderstanding of futures/streams in general; using wait is generally very bad practice as it nullifies the gains of async I/O, i.e it blocks the threads.
The following code would be more idiomatic:
NatsClient::from_options(...)
    .and_then(|client| client.connect())
    .and_then(|client| {
        get_stream_fn.for_each(|doc| {
            let pub_cmd = PubCommand::builder()
                .subject("my-queue")
                .payload(doc.into())
                .build()
                .unwrap();

            client.publish(pub_cmd)
        }).into_future()
    })
    .and_then(|_| {
        println!("Done");
    })

Thanks for helping @OtaK, I'm honestly not winning, the above hasn't helped me out, not an issue with nitox, but problem between me and Rust.
I'll reopen this issue if after my hurdle, the connection still doesn't get dropped.

Hi @OtaK this is still a problem, my connections aren't getting dropped/closed. The code that you suggested doesn't work because of a lifetime issue with the client. I can't clone the client, and I tried wrapping it in an Arc but that didn't work.
I end up with a too many files open error after a 1000 connections are open

You shouldn't open more than one connection at a time; There's no use case that would warrant 1000 clients open in a given process. Please look at the examples in the test/ folder

Hey @nevi-me :)
Mind sharing a gist ? I'll try to have a look at it and figure out what you mean :)

Hey @nevi-me :)
Mind sharing a gist ? I'll try to have a look at it and figure out what you mean :)

Hi @o0Ignition0o , here's a gist: https://gist.github.com/nevi-me/f1920e0b51c260d2ac52786a0cbccc2a. Please bear in mind that a part of my problem might be because I don't understand some Rust concepts well, I'm finding it a difficult (but rewarding) language.

Hi :) thanks a lot for the readme explanation, which is really helpful :)
From what I understand, you're tring to listen to a db_client and send the events to nats, preferably using a stream interface. This is a great idea, even though there is probably no need to 'create a new client' on each loop iteration. Plus as everything here is being async, this would probably end up pinning a huge number of clients :)
What we may want to do instead is :

create a nats client
handle reconnection if the client fails
Every 7 seconds, grab the new items and send them using the nats client :)

A neat way to learn about streams would be to :

create a stream "creator" (which is called a Sink - the link is down right now but it will be back up soon :) )
Every 7 seconds, grab the new items and write them to the sink.
Iterate over the created stream to publish each new item.

I feel like this article on creating a stream over a pagination and this one on streaming two protocols would come in handy :)
If you want to dig a bit deeper, note there's also a handy way to handle some database notifications, here's a Postgresql example .
I hope there also is such an interface for your favorite db client :)


Filters out lots with unpublished artworks

Fix for https://github.com/artsy/auctions/issues/497

          1 Warning

:warning:
Needs testing on a Phone if change is non-trivial

  Generated by :no_entry_sign: Danger


Fix Issue 17581 - Document behavior of -betterC

I couldn't find much about -betterC, the best resource was Ilya's guide:
https://github.com/libmir/mir-algorithm/wiki/BetterC-for-Mir
CC @WalterBright @andralex: would be great if we could document the current behavior.

Thanks for taking the initiative!
Also, you're spoiling the compiler guys. Soon they'll be expecting you to document all their changes :P

@ZombineDev @adamdruppe @jpf91: thanks a lot for your help. As you might have noticed, it's not very well know what -betterC actually implies for the end user - hence the need for this page.

No static module constructors or deconstructors
I think @WalterBright is working on making this work with betterC. (At least shared static constructors, by using C++'s static constructors.)
I actually wouldn't strictly document this since much of it is subject to change.
Note that struct destructors do NOT work right now but I have a PR that hacky fixes them

@adamdruppe The idea is to document the status quo. Future improvement can always update this page.

@wilzbach of course, thanks for doing this! I also think that documenting the current status quo is very important.

Most probably this can be made more clear or informative, so feel free to improve it.

Adapted it a bit, but I think it's an excellent motivation for betterC. Thanks!

I'm going to merge this, because it's needed despite its flaws.

@WalterBright please try to hesitate merging pull requests that fail to build in the future. The ddoc build of pull requests is automatically tested with Vladimir's DAutoTest, and you can see the result at the bottom of each pull request, including this one:

As you can see this PR fails to build indicated by the red cross. You can see the result of the build by clicking on the Details link to the right. Normally, if the documentation for a PR built successfully, you would see:

If a pull request introduces changes to the website content, you should see them under the "Changes" section, where for each of the affected pages there will be "Old" and "New" links pointing to the current version and to the one proposed by the pull request, respectively.
For pull requests that fail to build, you can try to find why by opening the "Build log". Most often errors are at the bottom of the build log. In this particular case:
make[1]: Leaving directory '/dev/shm/dtest/work/repo/dlang.org/.generated/phobos-release'
../dub-1.1.0/bin/dub upgrade --missing-only --root=dpl-docs
Upgrading project in /dev/shm/dtest/work/repo/dlang.org/dpl-docs
DFLAGS="-conf=/dev/shm/dtest/work/repo/dlang.org/.generated/stable_dmd-2.072.2/dmd2/linux/bin64/dmd.conf -L--no-as-needed" ../dub-1.1.0/bin/dub build --root=dpl-docs \
	--compiler=.generated/stable_dmd-2.072.2/dmd2/linux/bin64/dmd
Performing "$DFLAGS" build using .generated/stable_dmd-2.072.2/dmd2/linux/bin64/dmd for x86_64.
hyphenate 1.1.1: target for configuration "library" is up to date.
libdparse 0.7.0: target for configuration "library" is up to date.
vibe-d:utils 0.7.31: target for configuration "library" is up to date.
vibe-d:data 0.7.31: target for configuration "library" is up to date.
vibe-d:core 0.7.31: target for configuration "libevent" is up to date.
vibe-d:http 0.7.31: target for configuration "library" is up to date.
vibe-d:diet 0.7.31: target for configuration "library" is up to date.
vibe-d:web 0.7.31: target for configuration "library" is up to date.
ddox 0.15.18: target for configuration "library" is up to date.
dpl-docs ~master: building configuration "application"...
To force a rebuild of up-to-date targets, run again with --force.
Searching for trailing whitespace
Searching for undefined macros
/dev/shm/dtest/work/repo/dlang.org/web/spec/betterc.html:105:<style>    body { counter-reset: h1 <!--UNDEFINED MACRO: "CHAPTER"-->; counter-increment: h1 -1; }
posix.mak:646: recipe for target 'test' failed
make: *** [test] Error 1
Test failed: object.Exception@ae/sys/d/manager.d(801): Command ["timeout", "1800", "make", "-f", "posix.mak", "DIFFABLE=1", "test"] failed with status 2
----------------
/usr/local/src/phobos/std/exception.d:420 pure @safe void std.exception.bailOut!(Exception).bailOut(immutable(char)[], ulong, const(char[])) [0x7ec406]
/usr/local/src/phobos/std/exception.d:388 pure @safe bool std.exception.enforce!(Exception, bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0x7ec476]
ae/sys/d/manager.d:801 void ae.sys.d.manager.DManager.Component.run(const(immutable(char)[])[], const(immutable(char)[][immutable(char)[]]), immutable(char)[]) [0x7d70c8]
ae/sys/d/manager.d:1667 void ae.sys.d.manager.DManager.Website.make(const(immutable(char)[][])) [0x7dd43b]
ae/sys/d/manager.d:1698 void ae.sys.d.manager.DManager.Website.performTest() [0x7dd752]
ae/sys/d/manager.d:648 void ae.sys.d.manager.DManager.Component.test() [0x7d659d]
ae/sys/d/manager.d:2020 void ae.sys.d.manager.DManager.test() [0x7df6af]
autotest.d:244 autotest.main().Result autotest.main().runBuild(immutable(char)[], int, immutable(char)[], immutable(char)[]) [0x743fec]
autotest.d:346 _Dmain [0x742b66]
[2017-08-18 01:24:30.160863] dautotest: Error: Test failed
[2017-08-18 01:24:30.168329] dautotest: Setting status for dlang.org pull 1796 (commit c7b3c834273118264bc79c7784c6703196b42696) to failure (Test failed): http://dtest.dlang.io/results/2e94dab2be1338bd05d362ce62f1f0ad31fdeaa4/c7b3c834273118264bc79c7784c6703196b42696/
[2017-08-18 01:24:30.542626] dautotest: ----------------------------- Log end -----------------------------

I just experimented a bit with -betterC on the hello world from the testsuite, with extern (C) prepended before main, dmd -betterC hello.d.  I guess varargs also doesn't work with the arguments passed into it, as it prints out junk data from the environment variables instead, worth mentioning no varargs in the spec?

That hello world does not have the correct signature for an extern(C) main. It should be main(int argc, char** argv,) (with const if you want) and perhaps with char** envp at the end.
char[][] is a D type and not directly compatible with C's array arguments.


A variant of CssBaseline.flush() that return string

Feature request 🚀

[ ] I will create Pull Request
[x] It's just a suggestion

I'm trying to use geist-ui with Remix, Remix doc suggested a method to integrate other css frameworks, but when doing this for geist, I run into the problem that CssBaseline.flush() returns a ReactElement instead of string.
So my request is can we have a string version of CssBaseline.flush()?
Examples
  let markup = renderToString(<RemixServer context={remixContext} url={request.url} />);

  const styles = CssBaseline.flushToString();
  markup = markup.replace("__STYLES__", styles);

  responseHeaders.set("Content-Type", "text/html");

Programme (Optional)
Others (Optional)

This is a very problematic issue that predictably cannot be resolved well in the short term.
Now Geist is using styled-jsx as a style generator, but has encountered many problems, such as compilation of rollup, exporting package content sharing, exporting style content, etc. These issues cannot be solved in the patch version(for Geist), unless Geist finds an alternative style solution instead.
Unfortunately, I can't solve the problem you've raised right now, but I already have plans to find a new dynamic styling solution to replace the styled-jsx, this requires a significant portion of time for refactoring development.
(All suggestions for style solution selection are also welcome)

I don't have experience with Remix yet, so I'll try to understand the framework and find out if there is a way around it in the next few days. (it may or may not work, not sure yet)

@wong2
The good news is that Geist can support Remix server-side rendering by exporting a new API, which you can refer to in this example to create your project.
Note that this requires version v2.3.2 or above.

nice!


Fix parsing of galactic MSP table following changes to galmsp repo

The way that values are stored in the galmsp table changed (see 8a6b1be6). This broke how psrqpy parsed the data, which has now been fixed in this PR.

@mattpitkin my bad 😅! I was about to fix this with a PR myself but it completely slipped my mind. Good that you have got it done in this one 👍🏾 ! I made the change after checking out your code for parsing my table, and thought it would be a good idea if the field names followed ATNF from the very beginning. If there are any other changes like this one, I will let you know beforehand next time 😁 !

@astrogewgaw no problem. I spotted the problem when I noticed the CI failed after my last minor update.
A heads up about future changes would be very much appreciated though.

@mattpitkin sure thing 👍🏾 😁 !


Duplicate power bracelet in OoA cross items

The first was at Nayru's house and the second one was under Chavel's grave.
Haven't finished the seed yet, so I can't say anything about its completeability.


how can we train customize dataset?

You can construct your own json file for your dataset, and modify the config file.

config file in config folder or different one?


add query and verbose_name

I got an error in admin site about no query attribute in QuerySetSequence object
I added it from sql.Query(self.model)

I got another error when I delete record about no verbose_name attribute in QuerySetSequence object
I add it from queryset.model.__meta.verbose_name
( args[0].model._meta.verbose_name)

def get_queryset(self):
        db_list = Databases.objects.all().filter(model_name=self.model._meta.model_name).exclude(count=0)
        if db_list.count() != 0:
            return reduce(QuerySetSequence, [super(CustomModelManager, self).get_queryset().using(db.get_name) for db in db_list])
        return super(CustomModelManager, self).get_queryset().none()

This doesn't make sense though -- if each of the internal QuerySet instances has a different model we shouldn't arbitrarily choose one to build the query out of.

This doesn't make sense though -- if each of the internal QuerySet instances has a different model we shouldn't arbitrarily choose one to build the query out of.

Yes, the same model is required,
In my case, I used it to get the same table from multidatabases (horizontal scaling)
and to avoid that error if we use django-querysetsequence in admin site

if each of the internal QuerySet instances has a different model we shouldn't arbitrarily choose one to build the query out of.

We can also add feature return a dictionary if models not the same

In my case, I used it to get the same table from multidatabases (horizontal scaling)

I suspect there's better ways to do this in Django -- maybe using a database router (or using a database proxy or something).
Arbitrarily choosing the first one doesn't make sense. I'd be more inclined to accept it if there's a check if all the models are the same.

Thanks, I used django-querysetsequence in this repository
https://github.com/Fethienv/django-sharding

I'm going to close this as I think it is the wrong approach. I think I would accept a PR that checks if all the QuerySets have the same underlying model before setting these properties. Also, please include tests! If you're interested in updating this, feel free to shout and I'll re-open it.


Feature Request: Rename folder based on child text

Example: I have a folder with two text layers.
I would like a way to rename the folder to be the same as the value entered in the first child text layer. This would be amazing for lists!

In the attached. It'd be great to have a feature in which I can rename "Rename This Folder" with "Assets" (the child text value)

This is interesting, I've never got a request for this feature. I got tons of requests for the parent naming which I have in the plugin.
I'll take a look to see what's involved to make this.

Whoops attached the wrong screenshot but let me know if you have any clarifying questions :) THANK YOU!

Good News! This wasn't too hard to add in, I'll be releasing a new version of it today.
Thanks for the suggestion

Hey @rodi01 thanks so much for making this! One small bug fix: It appears that this will use the last text layer on the layer list and use it as the folder name. Is there any way to make it take the first text layer?

Current Experience: Folder is renamed to "1,000,000"
Desired Experience: Folder is renamed to "Assets"
Thanks for all that you've already done! Great app :D

good catch looks like a easy fix

Pushed a fix

Awesome, thanks! Let me know whenever you push it to master and I'll test it out on Sketch. Haven't seen anything come through the pipes yet but may just be slow to update?

It should be up, you might need to restart Sketch to get the notification

Verified complete and functional. Thanks so much for the quick turnaround!
Jordan Tranchina
Senior UX Designer | EY Design Studio | New York, NY
Website | LinkedIn | Schedule Call
On Apr 23, 2020, 2:20 PM -0400, Rodrigo Soares<EMAIL_ADDRESS>wrote:

It should be up, you might need to restart Sketch to get the notification
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.


findAndModify now returns T | null instead of T | undefined

According to the Official document of mongoDB, findAndModify returns the document or null.
I test this problem by below code:
const collection = /*...*/;
const result = await collection.findAndModify(
  {
    name: 'abc',
  },
  {
    update: {
      $set: {
        'someField': 12345,
      },
    },
    new: false,
  },
);

I've confirmed that the result is a pre-updated document if the document matches { name: 'abc' } found, if not, the result is certainly null.
Maybe, the return type should be Promise<T | null>.
Last but not least, I apologize if there are any mistakes in my English writing. I am just Japanese student learning English ;)

Looks great thanks very much for the PR!


How could I pack each node_modules to single file with chunkhash value, then insert it's path into html

Hi，I Have an question, and I ask it in Stack Overflow, http://stackoverflow.com/questions/38641667/how-could-i-use-webpack-split-app-and-dependency-in-to-different-js-files , But I could not get the answer for so long time. And I have tries many tools, but none of them could help me.
here is the tools list

webpack-node-externals
https://github.com/soundcloud/split-by-name-webpack-plugin
common chunk plugin

I need some help.
here is my question
==================================================================
Hi， I have a problem with webpack.
How could I split dependencies and app, my dir like this
.
├── app                  //app loginc
├── node_modules         // npm packages, contains react and react-dom
├── package.json
└── webpack.config.js

I want to use webpack to pack each node_module into one js file and app into another.
like this
.
├── 83948393.app.js
├── 78219321.react.js
├── 27843784.react-dom.js
└── index.html

so the app.js should be smaller. If I change the app.js, client does not have to download the 78219321.react.js and  27843784.react-dom.js

I need some help, than you

I am using webpack 1.13.2 on mac os

entry: {
    app: './main.js',
    common: ['react','redux'],
reactdom: ['react-dom']
  },

@rohitlodha sorry, I could not  understand your project example, could you give some more examples? and how to use your project? Thank you~

what config should I use? or this is not important? or this would be support soon?

Do you have a working webpack config? You can use any starter pack to get
started. If you have a config you will see entries like entry, output and
plugins.
On Tue, 30 Aug 2016, 10:41 徐向阳<EMAIL_ADDRESS>wrote:

what config should I use? or this is not important? or this would be
support soon?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/webpack/webpack/issues/2925#issuecomment-243387424,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABohbkbITO03hq_LtZTFZDNLC5M_NECOks5qk_rIgaJpZM4Ju5jI
.

yes, here is my webpack config
var webpack = require('webpack');
var path = require("path");
var CommonsChunkPlugin = require("webpack/lib/optimize/CommonsChunkPlugin");
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var process = require("process");
var commonsName = "";

if (process.env.NODE_ENV === 'development') {
  commonsName = "commons.[hash:8].js"
} else {
  commonsName = "commons.[chunkhash:8].js"
}

module.exports = {
  entry: {
    share: ["./src/pages/share"],
  },
  output: {
    path: path.resolve("dist"),
    filename: "[name].[chunkhash:8].js"
  },
  resolve: {
    root: path.resolve("src/"),
    extensions: ["", ".js", ".cjsx", ".coffee"]
  },
  plugins: [
    new webpack.optimize.DedupePlugin(),
    new CommonsChunkPlugin(commonsName),
    new webpack.DefinePlugin({
      "process.env": {
        NODE_ENV: JSON.stringify(process.env.NODE_ENV)
      }
    }),
    new webpack.ProvidePlugin({
      $: "jquery",
      jQuery: "jquery",
      "window.jQuery": "jquery"
    }),
    new HtmlWebpackPlugin({
      template: "src/index.html",
      favicon: "./favicon.ico",
      filename: "share.html",
      chunks: ["share", commonsName]
    }),
    new ExtractTextPlugin("[name].[chunkhash:8].css"),
  ],
  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        loader: 'babel-loader',
      },
      {
        test: /\.css$/,
        loader: ExtractTextPlugin.extract("style-loader", "css-loader"),
      },
      {
        test: /\.(png|jpg|gif)$/,
        loader: "url-loader",
        query: {
          mimetype: "image/*"
        },
      },
      {
        test: /\.swf$/,
        loader: "url?limit=10000&mimetype=application/x-shockwave-flash"
      },
      {
        test: /\.woff$/,
        loader: "url?limit=10000&mimetype=application/font-woff"
      },
      {
        test: /\.ttf$/,
        loader: "url?limit=10000&mimetype=application/octet-stream"
      },
      {
        test: /\.xml/,
        loader: "url?limit=10000&mimetype=application/xml"
      },
    ]
  }
}

if (process.env.NODE_ENV === 'production') {
  configs.plugins.push(new OfflinePlugin());
}

What the problem you are facing is: third-party library is stable, but your logic file is changed frequently, so you want to use browser cache as much as possible.
What you need is DllPlugin.
I have a boilerplate project had done it, take a look.

@jzzj cool


Fix retry to get posts race condition

Wondering if this code in the componentWillReceiveProps have the same problem with the race condition
if (nextChannelRefreshingFailed && this.state.channelLoaded && nextPosts.length) {
            this.toggleRetryMessage();
        } else if (!nextChannelRefreshingFailed || !nextPosts.length) {
            this.toggleRetryMessage(false);
        }

@enahum For that other one, I'm not sure if I understand the race condition there, but maybe we could use the props to set something like this.state.showRetryMessage. Then we can watch to see if it changes in componentWillUpdate to tell whether or not we need to show/hide the retry message? I did something like that for toggling the go button in the group DMs modal to clear up that logic


feat(version check): support versions check

support versions check
Checklist:

[!IMPORTANT]
Please review the checklist below before submitting your pull request.

[x] Please open an issue before creating a PR or link to an existing issue
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas

Description
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. Close issue syntax: Fixes #<issue number>, see documentation for more details.
Fixes #49
Type of Change

[ ] Bug fix
[x] New feature
[ ] Documentation update
[ ] Enhancement, including but not limited to code refactoring, performance optimization, Test and CI
[ ] Dependency upgrade

Failed cases: https://github.com/XdpCs/manuscript-core/actions/runs/11598260669/job/32293723652
Successful cases: https://github.com/XdpCs/manuscript-core/actions/runs/11598244515/job/32293667049


How we make npm packages work in the browser

原文地址：https://hackernoon.com/how-we-make-npm-packages-work-in-the-browser-announcing-the-new-packager-6ce16aa4cee6

相关文章：

Creating a parallel, offline, extensible, browser based bundler for CodeSandbox


feat: incremental compiling

Describe the feature
tsc supports incremental option.
For a huge project, I guess this may help.
Actually, I thought this option is so valuable that this topic might be already discussed but couldn't find such an issue. Is there a reason not to support this?
Babel plugin or link to the feature description
No response
Additional context
No response

It's too much


os: ioutil.ReadFile() returns a truncated buffer on Windows 10

Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
1.10.3
Does this issue reproduce with the latest release?
This is the latest binary release I can find on windows.
What operating system and processor architecture are you using (go env)?
Windows 10, amd64
What did you do?
I called ioutil.ReadFile() on a file that is > 4GB<PHONE_NUMBER> bytes).
bytes, err := ioutil.ReadFile("C:\\Path\\To\\Big\\File.txt")
if err != nil {
   panic(err)
}
fmt.Printf("%v", len(bytes))

What did you expect to see?
I expected to see an output of<PHONE_NUMBER>
What did you see instead?
I got an output of 175508955

/cc @alexbrainman

@AWoloszyn,
Sure. I can reproduce this. Thank you.

I'll note that the fix may be to copy the use of maxRW from internal/poll/fd_unix.go to internal/poll/fd_windows.go.

What maxRW value do you suggest, @ianlancetaylor ? This particular issue calls Windows ReadFile API https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-readfile , and the API uses DWORD (uint32), to pass file size. Also do you know if we have a test for this? Should I add new test?
Alex

What maxRW value do you suggest, @ianlancetaylor ? This particular issue calls Windows ReadFile API https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-readfile , and the API uses DWORD (uint32), to pass file size. Also do you know if we have a test for this? Should I add new test?

Never mind all my questions. I made decisions myself. And I am not adding test, because playing with 4GB file takes too long on my computer.
Alex

I've spent a little bit of time investigating and testing code to fix this. I'm not sure on what approach should be taken for testing this as writing out such a large file and then reading it back in (as per my rough test code below) would be super slow!
I'm more than willing to put together some PR(s) together if this looks OK!
Ideas:

ReadFile / WriteFile 4GB error catching (see code below)

We could add a check insyscall\zsyscall_windows.go ReadFile/WriteFile so its an invalid argument error (or similar) if you try to read/write more than 4GB.

Apply maxRW logic from fd_unix

As suggested by @ianlancetaylor we can simply take the maxRW logic from internal\poll\fd_unix.go. I've put together an example of what that might look like below. I decided to only make that logic apply for file reading/writing cases and not for console printing or socket operations as I'm not sure if you would want that behaviour for those so I'd rather leave it for the time being.
Not sure how you would test this in a way that is adequately fast in execution time.

ReadFile / WriteFile 4GB error catching
// NOTE: ReadFile looks the same at the start of the function
func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
	var _p0 *byte
	if len(buf) > 0 {
		_p0 = &buf[0]
                // NOTE: Don't allow writing buffers larger than 4GB as ReadFile takes uint32
		if len(buf) > 4<<30 {
			err = EINVAL
			return
		}
	}
	r1, _, e1 := Syscall6(procWriteFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0)
	if r1 == 0 {
		if e1 != 0 {
			err = errnoErr(e1)
		} else {
			err = EINVAL
		}
	}
	return
}

Apply maxRW logic from fd_unix
internal\poll\fd_windows.go
// Windows can't read or write 4GB+ files at a time with syscall.Read or syscall.Write
// even on 64-bit systems.
// Use 1GB instead of, say, 2GB-1, to keep subsequent reads aligned.
const maxRW = 1 << 30

// Read implements io.Reader.
func (fd *FD) Read(buf []byte) (int, error) {
	if err := fd.readLock(); err != nil {
		return 0, err
	}
	defer fd.readUnlock()

	var n int
	var err error
	if fd.isFile || fd.isDir || fd.isConsole {
		fd.l.Lock()
		defer fd.l.Unlock()
		if fd.isConsole {
			n, err = fd.readConsole(buf)
		} else {
			if len(buf) > maxRW {
				buf = buf[:maxRW]
			}
			n, err = syscall.Read(fd.Sysfd, buf)
		}
		if err != nil {
			n = 0
		}
	} else {
		o := &fd.rop
		o.InitBuf(buf)
		n, err = rsrv.ExecIO(o, func(o *operation) error {
			return syscall.WSARecv(o.fd.Sysfd, &o.buf, 1, &o.qty, &o.flags, &o.o, nil)
		})
		if race.Enabled {
			race.Acquire(unsafe.Pointer(&ioSync))
		}
	}
	if len(buf) != 0 {
		err = fd.eofError(n, err)
	}
	return n, err
}

// Write implements io.Writer.
func (fd *FD) Write(buf []byte) (int, error) {
	if err := fd.writeLock(); err != nil {
		return 0, err
	}
	defer fd.writeUnlock()

	var n int
	var err error
	if fd.isFile || fd.isDir || fd.isConsole {
		fd.l.Lock()
		defer fd.l.Unlock()
		if fd.isConsole {
			n, err = fd.writeConsole(buf)
			if err != nil {
				n = 0
			}
		} else {
			var nn int
			for {
				max := len(buf)
				if max-nn > maxRW {
					max = nn + maxRW
				}
				n, err = syscall.Write(fd.Sysfd, buf[nn:max])
				if n > 0 {
					nn += n
				}
				if nn == len(buf) {
					return nn, err
				}
				if err != nil {
					return nn, err
				}
				if n == 0 {
					return nn, io.ErrUnexpectedEOF
				}
			}
		}
	} else {
		if race.Enabled {
			race.ReleaseMerge(unsafe.Pointer(&ioSync))
		}
		o := &fd.wop
		o.InitBuf(buf)
		n, err = wsrv.ExecIO(o, func(o *operation) error {
			return syscall.WSASend(o.fd.Sysfd, &o.buf, 1, &o.qty, 0, &o.o, nil)
		})
	}
	return n, err
}

To test the maxRW fix above, I used the following code on my Windows 10 machine:
package main

import (
	"fmt"
	"io/ioutil"
)

const (
	slightlyLargerThan4GB =<PHONE_NUMBER>
)

func main() {
	// Write large file, add text "end-of-the-file" to the end of it
	text := "end-of-the-file"
	data := make([]byte, slightlyLargerThan4GB-len(text), slightlyLargerThan4GB)
	data = append(data, text...)
	fmt.Printf("Writing %d bytes to \"test_write_4gb\"\n", len(data))
	err := ioutil.WriteFile("test_write_4gb", data, 0644)
	if err != nil {
		fmt.Printf("%s\n", err)
	} else {
		fmt.Printf("Written %d bytes to file.\n", len(data))
	}

	// Read large file, get the last bit of text
	fmt.Printf("Reading file \"test_write_4gb\"...\n")
	bytes, err := ioutil.ReadFile("test_write_4gb")
	if err != nil {
		panic(err)
	}
	endText := string(bytes[len(bytes)-len(text) : len(bytes)])
	if endText == "end-of-the-file" {
		fmt.Printf("SUCCESS! Loaded: %d bytes, End of file has text: %s\n", len(bytes), endText)
	} else {
		fmt.Printf("FAILURE! Loaded: %d bytes, End of file has text: %s\n", len(bytes), endText)
	}
}

I'm more than willing to put together some PR(s) together if this looks OK!

@silbinarywolf thank you for the offer, but I already sent https://golang.org/cl/129137
Alex

Ah nice one! Looks more complete as well :)


Improve the README.md

The current README.md is just the automatically generated one for all create-react-apps.
Discuss below what you think it should include, and we can start making it more relevant.

At a minimum, I think the README should include how to use npm start and npm run test while developing locally.
I realise the contributing file kinda assumes people have node and npm installed - we may need to update that there.
The readme probably also needs to explain that the app uses a backend api that can currently only be accessed from the http://pairboard.surge.sh domain - for people developing locally, this will likely cause issues.
A link to the backend repo might be a good idea. The backend repo readme can explain how to set up a copy of the database, in case anyone wants to clone the app for their own purposes...I dunno....


Add support for vector and matrix slices

We currently allow slices in list comprehension iterables but we should also support them generally.
For e.g.
const A = [1, 2, 3, 4, 5]
trace_columns:
  main: [a, b[5]]
integrity_constraints:
  let c = [1, 2, 3, 4, 5]
  let d = b[1..3]  # slice of the trace column group b
  let e = $main[1..3] # slice of the main trace columns
  let f = c[1..3] # slice of the variable vector c
  let g = A[1..3]

We could also support them for matrices.
For e.g.
const A = [[1, 2, 3, 4 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]
integrity_constraints:
  let c = [[1, 2, 3, 4 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]
  let d = A[1..3][..]  # slice of matrix A rows
  let e = A[..][1..3] # slice of matrix A columns
  let f = c[1..3][..] # slice of matrix c rows
  let g = c[..][1..3] # slice of matrix c columns

I believe this is already working for vectors of values, but not yet for vector of columns. @tohrnii, @bitwalker - could you confirm?

Slices of any aggregate type should be supported in general now, so I think this can be closed. If there are places where they don't work and are expected to, we should probably treat that as a bug now.


[BUG] Harvester v1.2.1 stuck on boot with BOSS-S1 hardware RAID

Describe the bug

Although we fixed the issue in v1.1.x, the customer still has an issue with 1.2.1.
To Reproduce
Steps to reproduce the behavior:

Install Harvester v1.2.1.
Reboot
The OS hangs on "Welcome to GRUB!" for 30+ minutes.

Expected behavior

The OS should boot smoothly.
Support bundle

Environment

Harvester ISO version: v1.2.1
Underlying Infrastructure (e.g. Baremetal with Dell PowerEdge R630):

Additional context
Add any other context about the problem here.

@megabreit Can you check if the issue description is still correct? And do you see the same issue in 1.2.0? Thanks.

The workaround grub2-editenv /oem/grubcustom create is still working, but maybe the actual cause is different this time.

yap, that is what we are curious about. We are trying to reproduce it in our lab. And for sure I will backport this to v1.2.2.

One, maybe important, detail: Our Harvester nodes are booting in BIOS mode. Not because of a technical decision, but just because it's default.

Verified fixed on master-9e663418-head (24/01/12).
Result
$\color{green}{\textsf{PASS}}$ On BOSS-S1 bare machine: Can install and reboot Harvester on BOSS-S1 RAID machine without stuck on boot $~~$

Can install Harvester on BOSS-S1 card machine and without stuck on boot in GRUB

https://github.com/harvester/harvester/assets/29251855/aff58090-097c-49d7-9887-eecc929a035d

$\color{green}{\textsf{PASS}}$ On BOSS-S1 bare machine: After installation, the `/oem/grubenv` and `/oem/grubcustom` files exists $~~$

The /oem/grubenv and /oem/grubcustom files exists

rancher@harvester-pxe-1:~> ls /oem/grubenv
/oem/grubenv
rancher@harvester-pxe-1:~> ls /oem/grubcustom
/oem/grubcustom

$\color{green}{\textsf{PASS}}$ On BOSS-S1 bare machine - After reboot: Harvester on BOSS-S1 RAID machine without stuck on boot $~~$

Can reboot Harvester on BOSS-S1 card machine and without stuck on boot in GRUB

https://github.com/harvester/harvester/assets/29251855/24dff364-7e75-4039-bd72-b91e320e269e

$\color{green}{\textsf{PASS}}$ On local kvm: After installation, the `/oem/grubenv` and `/oem/grubcustom` files exists $~~$

The /oem/grubenv and /oem/grubcustom files exists

rancher@harv-240112:~> ls /oem/grubenv
/oem/grubenv
rancher@harv-240112:~> ls /oem/grubcustom
/oem/grubcustom

$\color{green}{\textsf{PASS}}$ On local kvm: After installation, Can install Harvester without stuck on boot $~~$

$\color{green}{\textsf{PASS}}$ On local kvm: After reboot, Can reboot Harvester  without stuck on boot $~~$

$\color{green}{\textsf{PASS}}$ On local kvm: After reboot, the `/oem/grubenv` and `/oem/grubcustom` files exists $~~$

The /oem/grubenv and /oem/grubcustom files exists

rancher@harv-240112:~> ls /oem/grubenv
/oem/grubenv
rancher@harv-240112:~> ls /oem/grubcustom
/oem/grubcustom

$\color{green}{\textsf{PASS}}$ On ipxe installation: After installation, the `/oem/grubenv` and `/oem/grubcustom` files exists $~~$

The /oem/grubenv and /oem/grubcustom files exists

rancher@harvester-node-0:~> ls /oem/grubenv
/oem/grubenv
rancher@harvester-node-0:~> ls /oem/grubcustom
/oem/grubcustom

Test Information

Test Environment: Single nodes harvester on equinix bare machines and local kvm machine
Harvester version: master-9e663418-head (24/01/12)

Verify Steps
On local kvm machine

ISO Install Harvester v1.3.0 master release on BIOS kvm
Check no stuck during the installation process
Check the check the /oem/grubenv and /oem/grubcustom files exists
Reboot the machine, check no stuck
Check no stuck, can smoothly boot up Harvester

On BOSS-S1 raid baremetal machine

Ensure the machine boot in BIOS mode

Ensure the machine have BOSS S1 card

Use terraform equinix to ipxe install Harvester v1.3.0 master release on BIOS kvm

Check no stuck during the installation process

Check the check the /oem/grubenv and /oem/grubcustom files exists

Reboot the machine, check no stuck

Check no stuck, can smoothly boot up Harvester


Remove class << self wrapper for config variables

Using mattr_accessor within the wrapper for modules can lead to
conflicts with other modules that use the same variable names.
Fixes issue #44

Awesome, thanks for this, that looks good, I just think we should add a spec for this. This should be pretty straight forward to write.

I'm not sure how to approach testing this, since we can expect mattr_accessor to work as intended

I guess we could define a dummy module in a test as you showed in #44 and make sure that setting an attribute on SeedMigration doesn't set it on the dummy one.

Added a basic test case that fails with the old code and passes with the new. Please let me know if you feel anything else should be tested.

Wow, that was fast!
This is awesome, thank you so much. I'll try to release a new version later today, I'll let you know here when it's done.
Thanks again!

No problemo. I ended up having to add a default table name constant to reset the table name after tests. Let me know if you are OK with this approach.


breaking change (intentional?) to template repository inclusion

this used to work: https://github.com/pre-commit/pre-commit/blob/023b337ff0f5566f366dd85c390804208a60f7e7/azure-pipelines.yml#L32
but now leads to:
/azure-pipelines.yml: Could not find /step--git-install.yml in repository self hosted on http://github.com/ using commit f7e4397f8f11bae8b8803357c97c9c51c7e5c1ed. GitHub reported the error, "Not Found"

I'm now inconsistently getting this error after putting @asottile on the end of that template:
/job--python-tox.yml@asottile (Line: 65, Col: 5): Templates in other repositories may not specify a repository source when referencing another template. The template reference 'step--git-install.yml@asottile' is not allowed.

this seems to be back to the original way :man_shrugging:


confusion by heavenly chips reset bonus income

I only (relatively) recently started playing Cookie Clicker (with Cookie Monster, of course). After two weeks and currently about 620Qa CBAT I still haven't reset once, because Cookie Monster told me I would only get a bonus of about 5.6 % from heavenly chips, which really didn't seam to be worth it. Even though I was confused because the general advice was to reset when getting 500 HC and the percentage didn't raise at all even with new heavenly chips, I only just realized, that this only refers to the bonus from achievements and not to the bonus gained from the chips themselves!
Even though most people don't seam to have this problem, I'd like to make two suggestions:

Rephrase the tooltip to make it more clear, that only achievements are counted in here.
Add a calculation of how much bonus the new heavenly chips will give as a percentage of the current CpS. Since it doesn't stack with most other bonuses, it's not exactly easy to estimate the actual benefit.

Hmm, as far as I know, the bonus from the chips themselves is suppose to be calculated into it also.  I'll check the code.

Okay, I see the problem.  You see, as the tooltip says, it only calculates the gain you will get with the same upgrades you have currently bought.  Since you have never resetted, you never bought the upgrades to unlock the chip bonuses (25%, 50%, 75%, 100%) since you can't even buy that until you have at least 1 chip.  Hence the chip bonus is not included in the reset bonus!  Now as to how to fix this, I need to think about it, but I guess the best solution is to always assume you are going to buy the upgrades to enable the chip bonus.

So it is supposed to show the actual bonus including everything.

Since you have never resetted, you never bought the upgrades to unlock the chip bonuses (25%, 50%, 75%, 100%) since you can't even buy that until you have at least 1 chip. Hence the chip bonus is not included in the reset bonus!

Ah, I didn't even think about this possibility.

but I guess the best solution is to always assume you are going to buy the upgrades to enable the chip bonus.

I totally agree with that. Seams simple and effective.
Oh, an as a side note, it would also make sense to include the cookies stored by wrinklers into the calculation of HC and the bonus.

Oh, an as a side note, it would also make sense to include the cookies stored by wrinklers into the calculation of HC and the bonus.

I guess, since they do auto pop before you reset?  Actually I'm not sure of that.

Just discovered, that they actually don't auto pop, at least not in the sense of adding their cookies. Hm, didn't really expect that. In this case it might be confusing or misleading to calculate them in just like that. Now what? The reason why I would like a calculation with wrinklers somewhere is, that I often end up with more cookies stored in wrinklers than I have baked in total. Under these circumstances it makes a big difference in HC whether you count them in or not.
A solution might be, to simply add the number of HC with wrinklers counted in after a slash:
Heavenly Chips (MAX) : 767/1,088 (1,535%/2,176%)
The more information the better, isn't it? Well, most of the time at least.

Maybe.  I'll think about it.  The info tooltip would need to have a lot more writing, lol.

With the way beta is going, this may become a non-issue in the future...

Since I've removed HC stats as they are useless now, I'll close this.  Please reopen if you think otherwise.


how to create OpenApiDocument  read from WSDL with XML Reader?

Hi,
I am using OpenApiStreamReader to read a swagger JSON and it's working fine
` string ServiceJson = swaggerLink;
        using (var httpClientHandler = new HttpClientHandler())
        {
            httpClientHandler.ServerCertificateCustomValidationCallback = (message, cert, chain, errors) => { return true; };
            using (var client = new HttpClient(httpClientHandler))
            {
                client.BaseAddress = new Uri(ServiceJson);
                // Make your request...
                var stream = await client.GetStreamAsync(ServiceJson);
                // Read V3 as YAML
                OpenApiDocument openApiDocument = new OpenApiStreamReader().Read(stream, out var diagnostic);}}`

but when I try to read XML from the WSDL link it throws error tell that XML is not supported
is there any way to do the same thing with XML?

Hi @Samanoova, as per the error thrown, currently we don't support reading XML documents let alone WSDL. We only support Open API documents in either JSON or Yaml formats.
However, we have a Commandline tool - Hidi (Executable file), that helps transform/convert CSDL/XML documents into either JSON/Yaml. Maybe try using that first?


Added some explanation on what prestissimo is and does.

Coverage remained the same at 81.436% when pulling 9b2a543f7b02f751b0a6dc497237ffd1b9c840a9 on MPParsley:patch-1 into 783cd5ccc1c6840c33fa798bda327ebb146cf738 on hirak:master.

Coverage remained the same at 81.436% when pulling 9b2a543f7b02f751b0a6dc497237ffd1b9c840a9 on MPParsley:patch-1 into 783cd5ccc1c6840c33fa798bda327ebb146cf738 on hirak:master.


Why do I need to input class weight as class count into hinge loss?

class_weights = sfm(torch.from_numpy(np.asarray(mmcv.load(freq_file)['neg_class_freq'])).to(torch.float32).cuda())
hinge_loss = SoftMarginHingeEmbeddingLoss(margin=0.2, class_counts=class_weights)

Why do I need to input class weight as class count into hinge loss? By the way, the class weights is two-dimension which is not suitable for the hinge_loss.

Hi @JarvisUSTC ,
Thank you for showing interest in LMPT!

The reason why class weight is required in the calculation of hinge loss is because it incorporates the re-weighting strategy, which makes the model perform better when it comes to long-tailed distribution data. For details, you can refer to Eq. 5 and 6 in the paper.

The class weight is a one-dimensional tensor. Below is an example. I hope it may help you.

inputs = torch.randn(3, 3)
# labels should be 1 or -1
labels = 2 * (torch.rand(3, 3) > 0.5).float() - 1
# class_weights should be a tensor with the same shape as the labels
class_counts = torch.tensor([6, 34, 8, 14, 154, 17, 249, 29, 479, 4, 240, 48, 11, 20, 775, 100, 5, 82, 7, 64])
hinge_loss = SoftMarginHingeEmbeddingLoss(class_counts=class_counts)
loss = hinge_loss(inputs, labels)
print(loss)


[processor/lsminterval] Optimize memory usage for each aggregation interval

As per the current logic, the processor uses aggregation interval and processing time as the key in the LSM database. On harvest, each key is decoded and loaded into memory. Due to this, all of a specific aggregation interval will be loaded into memory -- this piece of logic is also required to do overflows during merge as we will require ALL of the data to be available at once.
Above said, we could reduce the memory usage by relaxing the overflow during merge requirement and partitioning the metrics. We do something similar in apm-aggregation (ref). The side-effect of adopting this approach will be that if the partition count is greater than 1 (or partition is being used) then the overflow will be indeterministic and there will be more than 1 aggregated metric with same dimensions. The duplicate metrics could be avoided by offsetting the timestamps on the aggregated metrics based on the partition count.

Compared to apm-aggregation, the performance of the merge operations using the opentelemetry data model is too expensive. As per some of the benchmarking, the biggest culprit is merge operations performed for exponential histograms (we use a copy of the contrib implementation). Here are some benchmarking results:

Playing around with GOGC and GOMEMLIMIT does produce some positive results but as a whole other performance is still marred by the huge number of allocations required for the merge operation as a whole. Note that merge is the biggest culprit but not the only one.

Diving into the source of high allocations, I ran an experiment to replace exponential histogram with histogram. While the number of buckets for the histogram was kept to the default value (which is quite less than exponential histogram default) the observed GC was much lower and the throughput was stable and in a good range:

(Above was ran with go mem limit set to 4GB and normal gc disabled i.e. GOGC=off GOMEMLIMIT=4GiB)
While in another experiment, reducing the max buckets for the exponential histogram from the default of 160 to 20 didn't result in much improvement. Looking at the code for merging histograms (which is taken from the upstream deltatocumulative processor), the why is quite evident - the merge creates new slices for every merge operation (ref). While there are some low hanging fruits to reduce allocations in the lsminterval processor as a whole but since exponential histogram's footprint is much larger than anything else, I don't expect them to have any substantial impact.
Looking at ways to circumvent this, there are a couple I can think of:

Use normal histograms as default - we could use this with the same buckets as what we had in HDR histograms implementation in APM aggregation, however, this needs to be benchmarked too since HDR histograms has a high number of buckets.
Convert delta exponential histogram to cumulative before merging. Since memory requirement for delta to cumulative will not be amplified due to the merge operations performed by LMS database we should see net positive in terms of allocations. Again benchmarking required.
Optimize the merge for exponential histograms. This is a bit tricky to do because there are not many options, like pooling, available to us due to usage of the pdata model.

I am working on investigating the above options next.


Set up GitHub actions

Hi there!
I was poking around, and as I don't have a machine with the proper Visual Studio set up, I set up a workflow with GitHub Actions.  Not sure if it's actually relevant for you, but I figured since I did it (and you appear to be working on this relatively actively), I might as well send it your way and see if you like it.  No hard feelings at all if you don't want it (just close the pull request without merging), and apologies for sending a PR before discussion.
This just builds the project (after installing dependencies), and puts the result in a zip file that can be downloaded.  Nothing fancy.  Only using custom actions from reasonably-official looking sources for safety reasons.

Hi mook, thanks for your contribution! I have a good workflow for the few edits I make to this project, so I don't feel like complicating stuff with GitHub Actions right now. But thanks again for your intrest :)


ENH: add indexing to sparse pandas DataFrame

related is #6076 (loc not working either)
It would be nice if common operations like indexing/slicing is available for sparse dataframes as for their dense counterparts.
Thanks!
In [1]: import pandas as pd

In [2]: import numpy as np

In [3]: A = np.zeros((3,4))

In [4]: A[:] = np.nan

In [5]: A[2,3] = 1

In [6]:

In [6]: Y = pd.DataFrame(A)

In [7]: print Y.iloc[2,3]   # print 1.0
1.0

In [8]: sY = Y.to_sparse()

In [9]: print sY.iloc[2,3]
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-9-0674f68ef869> in <module>()
----> 1 print sY.iloc[2,3]

/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/core/indexing.pyc in __getitem__(self, key)
    667     def __getitem__(self, key):
    668         if type(key) is tuple:
--> 669             return self._getitem_tuple(key)
    670         else:
    671             return self._getitem_axis(key, axis=0)

/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/core/indexing.pyc in _getitem_tuple(self, tup)
    774                 continue
    775
--> 776             retval = getattr(retval,self.name)._getitem_axis(key, axis=i)
    777
    778         return retval

/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/core/indexing.pyc in _getitem_axis(self, key, axis)
    803                 raise ValueError("Cannot index by location index with a non-integer key")
    804
--> 805             return self._get_loc(key,axis=axis)
    806
    807     def _convert_to_indexer(self, obj, axis=0):

/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/core/indexing.pyc in _get_loc(self, key, axis)
     61
     62     def _get_loc(self, key, axis=0):
---> 63         return self.obj._ixs(key, axis=axis)
     64
     65     def _slice(self, obj, axis=0, raise_on_error=False):

/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/core/frame.pyc in _ixs(self, i, axis, copy)
   1880                         new_values = self._data.fast_2d_xs(i, copy=copy)
   1881                     except:
-> 1882                         new_values = self._data.fast_2d_xs(i, copy=True)
   1883                     return Series(new_values, index=self.columns,
   1884                                   name=self.index[i])

AttributeError: '_SparseMockBlockManager' object has no attribute 'fast_2d_xs'

I think that this was fixed at some point and can be closed.
In [4]: data = np.zeros((2,2))

In [5]: data[:] = np.nan

In [6]: data[1,1] = 1

In [7]: df = pd.DataFrame(data)

In [9]: df.ix[:,1]
Out[9]:
0   NaN
1     1
Name: 1, dtype: float64

In [10]: df.to_sparse().ix[:,1]
Out[10]:
0   NaN
1     1
Name: 1, dtype: float64
BlockIndex
Block locations: array([1], dtype=int32)
Block lengths: array([1], dtype=int32)

In [24]: df.to_sparse().iloc[1,1]
Out[24]: 1.0

In [25]: df.to_sparse().iloc[1,0]
Out[25]: nan

In [3]: pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 3.4.1.final.0
python-bits: 64
OS: Linux
OS-release: 2.6.32-431.17.1.el6.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.15.2
nose: 1.3.4
Cython: 0.20.2
numpy: 1.9.1
scipy: 0.14.1

ok. I am not 100% sure that this is actually tested though. Can you confirm? If it is we want to add this issue reference, and if not put some tests in place. thxs.

I searched test_sparse for indexers. I was surprised at how few cases I found, but maybe I should be looking elsewhere. Here's a summary:
.iloc only applied to a DataFrame, not a SparseDataFrame
.loc does not occur.
.ix is used on a SparseDataFrame in a few spots e.g. L270, L1051, and 1112
.isin is tested on SparseDataFrame.
.iat and .at do not occur.
Maybe inheriting from NDFrame makes this good enough? If needed, I can make a PR with some additional tests.

you should run the tests with -v and see
as since it inhersts tests from test_frame.py as well (and test_series).

It appears to me that the tests inherited from test_frame.SafeForSparse only execute .ix. TestSparseSeries only inherits test_series.CheckNameIntegration
From what I can gather, it seems that the "do it right" solution might be to reuse some of the test_indexing machinery in test_libsparse. I don't think I'm the right person for that job at this point in time.

after #12779, this issue is adding more tests for .iat/.at


hotfix clippy 1.72 lints

This fixes the recent CI failures we've been getting.

Clippy errors on it for a reason, no? This feels more like a duct tape patch than an actual fix, I'm fine with getting this merged in as a hotfix, but shouldnt the underlying problem not get fixed instead?

Clippy errors on it for a reason, no? This feels more like a duct tape patch than an actual fix, I'm fine with getting this merged in as a hotfix, but shouldnt the underlying problem not get fixed instead?

Snbt module is in need of a full rewrite so I'm fine with this temp fix.


Update video-indexer-output-json.md

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

@az14 : Thanks for your contribution to the Azure documentation! The author, @juliako, has been notified to review your proposed change.

@az14 : Thanks for your contribution to the Azure documentation! The author, @juliako, has been notified to review your proposed change.

@az14 : Thanks for your contribution to the Azure documentation! The author, @juliako, has been notified to review your proposed change.

@az14 : Thanks for your contribution to the Azure documentation! The author, @juliako, has been notified to review your proposed change.

@az14 : Thanks for your contribution to the Azure documentation! The author, @juliako, has been notified to review your proposed change.

#sign-off


Buffering issue

I've experienced several buffering issues when using google drive as storage. Plexdrive has an option named 'chunk-load-ahead'. Could you expose it ?
By the way, I've seen that your merged a PR allowing deletion on the cloud mount. Would that work with google drive ? At the moment, when radarr/sonarr replaces content, I get a duplicate file on google drive as it can't delete the old. Would that PR fix this ?

I coded the deletion part and it seems to be working for me so far. It does work for radarr/sonarr for me. I'm hoping it doesn't have unintended consequences, so far so good for me.
chunk-load-ahead will need to be responded by madslundt


validate onblur or onfocusout

hi, is there a way to set input fields to validate when focus is lost?
thanks!

Currently not because there is no focus for all fields (pickers, sliders...etc).


More comprehensible terms for CIBERSORT aggregates

Would be best to find better labels for our four ways of displaying and working with CIBERSORT fractions.
The values are estimated by CIBERSORT (“Original” fraction), and various combinations of those estimates are provided, for example “Aggregate 1” corresponding to broader categories of cells, and “Aggregate 2” and “Aggregate 3” to finer categories.

Per email discussion with group
Aggregate 1 becomes: Muli-potent Progenitor Cell Derivative Class
Aggregate 2 becomes: Common Lymphoid and Myeloid Cell Derivative Class
Aggregate 3 becomes: Differentiated Lymphoid and Myeloid Cell Derivative Class


Fix DAP path mismatch on Windows

Closes #75834
Handles all cases where file paths are received from DAP clients and might be in Windows-style. Implicitly this also fixes breakpoints not being correctly set in-between.

Thank you for your continuous effort in maintaining this Godot functionality :trophy:, it is deeply appreciated :heart:  !