Support mutating TypeScript code

Stryker is only capable of mutating JavaScript. For TypeScript projects this results in an unprecise mutation score as generated code is being mutated and because some mutations would normally cause compilation errors.
So as an extension of issue #343, the `stryker-typescript plugin will be developed. @thomasp24 has already done a great deal for this and the current code can be viewed on the support-typescript branch. Based on that @nicojs created a typescript-mutation-poc in various features are demonstrated needed for the changes here.
Todo list
We're working on this in the stryker-typescript branch.

[ ] Gather info on projects that want this plugin so we can test it.

Stryker itself
Typed html: https://github.com/nicojs/typed-html
Link parent bin: https://github.com/nicojs/node-link-parent-bin/
Install local: https://github.com/nicojs/node-install-local

[x] Update stryker-api for a Transpiler api
[x] Update stryker-api's Mutator plugin. Update stryker's Mutator for this structure.
[x] Update stryker to use the Transpiler api.
[x] Create TypescriptConfigEditor responsible for enhancing stryker.conf.js with typescript's config.
[x] Create TypescriptTranspiler responsible for transpiling ts code and generating sourcemaps
[x] Write unit tests for TypescriptTranspiler
[x] Create TypescriptMutator responsible for mutating typescript code and validating that it can still compile.
[ ] Write unit tests for TypescriptMutator.
[ ] Add Typescript mutator equivalents for every js mutator in stryker.
Refactoring in Stryker:

[x] Refactor InputFileResolver to now also read in the input files initialially
[x] Make InputFileResolver responsible for reporting OnSourceFileRead and onAllSourceFilesRead
[x] Refactor current Mutators in Stryker to be implemented using the new MutantGenerator api
[ ] Refactor - check if code coverage analysis still works. Stryker is now calculating its own line/column offset based on position in a file. It's doing that 1-based, so the first line is 1 and first column is 1. Not sure if that is the same for istanbul inspected code.

[ ] Notify users if they specify a transpiler and a coverage analysis level, because this is not yet supported.
[ ] Add unit tests for the ChildProcessProxy
[ ] Don't start a transpiler ChildProcessProxy if there is no transpiler
[ ] Make a plugin out of the current MutatorOrchestrator
[x] Add 'transpiled' property to the FileDescriptor so users can select if a file should be transpiled. Defaults to 'true'.

Way it will work
When running Stryker on a TypeScript project, we won't mutate your javascript anymore. Please read the blog article about the Stryker 1.0 roadmap to know why. Instead, we'll mutate your TypeScript code. We split the responsibility of TypeScript mutation testing in 2 blocks:

Mutate typescript code.

The mutating will be done basically the same way as it is now for javascript code. We'll walk the AST and create mutations on copies of the typescript nodes. This will keep the process really fast. It is OK for these mutations to cause compilation errors as they'll be caught during transpiling of the typescript code.

Transpile typescript code.

All code will be transpiled for the initial test run, and then for each mutant after that. This has some advantages over other ways of working:

By first generating all mutants, we can later decide to devide the transpiling workload over multiple processes (however, we'll start with using the host process for this PR)
By running the transpiler for each mutant, we can mutate our typescript code as complex or simple as we want. We don't have to worry about the javascript code it will produce. This contrary to transpiling once and than go find-and-replacing bits of javascript code (using source maps). That might be faster, but we would be limited in what we can mutate, as complex typescript constructs (like decorators for example) can result in complex javascript, different for each target (es5, es2015, es2016, ...).

There is some added complexity though: we want to use coverage analysis on transpiled code too. This means that we need to actively keep track of source maps if we want to know which line, column in the source code is hit by a particular javascript statement. Fortunately, TypeScript has excellent source map support. We might skip coverage analysis for this PR. Lets make it work first.
The transpile api will be added to accommodate this process. You'll be able to configure multiple transpiler plugins. Each transpiler gets the output of the previous transpiler. This makes it possible to first transpile using TypeScript and next transpile that output using a bundler like web pack. Each transpiler is responsible for its own source maps.
A picture to illustrate:
foo.ts   ==> Typescript  ==> foo.js ==> Webpack ==> foobar.js
bar.ts   ==> Transpiler  ==> bar.js ==> Transpiler

So foo.ts:3:5 might map to foo.js:5:6 which maps to foobar.js:52:46.
Pretty complex stuff, but makes it really pluggable.
In order to keep things as fast as possible, transpilers know exactly which file is changed for a mutant. This makes it possible to use the TypeScript "watch source files" feature to not do too much work. It goes without saying that we want to do as much work as we can in-memory.
Usage
Your future stryker.conf.js file might look like this:
// stryker.conf.js
module.exports = functions(config) {
  config.set({
    tsconfigFile: 'tsconfig.json',
    mutate: 'src/**/*.ts',
    mutatorGenerator: 'typescript',
    transpilers: [
      'typescript'
    ]
  });
}

Do you want to use this on your project? Please let us know if we can access the source code for testing purposes!
Note: This post will be updated to always show the latest info.

Do some of the people who have upvoted this issue also have typescript projects to test this on?
@omar10594 @dmitry-korolev @thekiba @Horat1us

I have two open-source projects, where I want to test this
https://github.com/wearesho-team/moneyboom-ch-frontend
https://github.com/wearesho-team/wearesho-site

I have two open-source projects, where I want to test this

Very cool! I can see both projects are using webpack. As we're mutating the typescript source code, instead of the resulting javascript, we won't support webpack out of the box... at first. So you might have to do some more work to get this working.

This projects using webpack only for creating bundle for web, not tests. (webpack is too slow to bundle every time I want to run unit tests).
For tests we use Mocha:
cross-env TS_NODE_PROJECT=tsconfig.test.json ./node_modules/.bin/nyc mocha -r jsdom-global/register -r ts-node/register -r source-map-support/register tests/unit/bootstrap.ts tests/unit/**-specs.tsx tests/unit/**-specs.ts

So I use ts-node to transpile typescript before testing.
Is it ok?

So I use ts-node to transpile typescript before testing.
Is it ok?

TLDR: Yes. If you choose to configure the TypescriptMutantGenerator and not the TypescriptTranspiler.
Theoretically it should work. As you can see, we choose to split mutating of the ts code and transpiling of ts code into 2 separate plugins. If you choose to configure the TypescriptMutantGenerator and not the TypescriptTranspiler, you should be able to use mocha with ts-node. Stryker will just write the mutated source files to the test sandboxes.
However, the TypescriptMutantGenerator will also generate invalid mutants. That means: mutants that cannot compile. These will probably be reported as runtime errors. They won't influence your mutation score, as the mutants are not valid, so its not a big deal.

The first bits & pieces of the Badge API are in place, and written in TypeScript. Curious to see how good the tests are. Its tests are currently written in Jest, so that adds another challenge :).

I have a private project where we use typescript and webpack (I will make a new public small project with similar configuration).
For test with stryker, we first build with webpack, and use stryker with the js code.

About the name MutantGenerator. I think we should rename it back to Mutator.
It better explains what the thing does: mutating code. The  problem was this is that we have a Mutator plugin point right now that we are removing with this feature. With that, you could write a plugin that can mutate a single javascript AST node. It was kind of blocking this feature, that's why we removed it. To prevent confusion, we decided to name the new plugin differently.
The way I see it now: its better to have some confusion now, than have a confusing name for the rest of the time.
@simondel do you agree?

@nicojs As discussed, I like the name Mutator more.
What kind of tags shall we use for the plugins? I would say stryker-transpiler for the transpilers. Mutators are a bit more difficult. We could use stryker-mutator but we already use that one. We could aos use stryker-mutator-plugin but that's also really generic..

Good news! We don't use the tag stryker-mutator yet 👍

@simondel
In that case, let's use stryker-mutator. 👍

[ ] Add mutators and transpilers to the initializer code

Do we really need to add the initializer code in this branch? I think that can be a separate feature. Let's first release it as a "soft launch". Test it in multiple projects and iron out any kinks along the way. Add initializer code in an other feature and release it big.

@mthmulders @Horat1us @omar10594
Yesterday, we finally launched typescript support in stryker. Before we write a blog article highlighting the changes and new features, we want to know if the solution is working for you.
The best place to get started with stryker & typescript is the stryker-typescript readme at the moment. You can also review commit 617f54 i did on install-local for adding stryker to my build.
It works as expected for me. Of course, it would be pretty schizophrenic of me if it did not do so. Please share your experiences with is. Any questions can be posted here as well of course.

This is just the thing I need for my current project... But I keep coming up against one particular error:
[2017-09-21 14:22:04.988] [ERROR] IsolatedTestRunnerAdapter - /Users/[...]/src/main/webapp/node_modules/di/lib/injector.js:22     return new Error(stack ? msg + ' (Resolving: ' + stack + ')' : msg);            ^ Error: No provider for "files"! (Resolving: framework:jasmine -> files)     at error (/Users/[...]/src/main/webapp/node_modules/di/lib/injector.js:22:12)     at Object.get (/Users/[...]/src/main/webapp/node_modules/di/lib/injector.js:9:13)     at get (/Users/[...]/src/main/webapp/node_modules/di/lib/injector.js:54:19)     at /Users/[...]/src/main/webapp/node_modules/di/lib/injector.js:71:14     at Array.map (<anonymous>)     at Array.invoke (/Users/[...]/src/main/webapp/node_modules/di/lib/injector.js:70:31)     at Injector.get (/Users/[...]/src/main/webapp/node_modules/di/lib/injector.js:48:43)     at /Users/[...]/src/main/webapp/node_modules/karma/lib/server.js:143:20     at Array.forEach (<anonymous>)     at Server._start (/Users/[...]/src/main/webapp/node_modules/karma/lib/server.js:142:21)     at Injector.invoke (/Users/[...]/src/main/webapp/node_modules/di/lib/injector.js:75:15)     at Server.start (/Users[...]/src/main/webapp/node_modules/karma/lib/server.js:103:18)     at new KarmaTestRunner (/Users/[...]/src/main/webapp/node_modules/stryker-karma-runner/src/KarmaTestRunner.js:47:22)     at TestRunnerFactory.Factory.create (/Users/[...]/src/main/webapp/node_modules/stryker-api/src/core/Factory.js:46:20)     at IsolatedTestRunnerAdapterWorker.start (/Users/[...]/src/main/webapp/node_modules/stryker/src/isolated-runner/IsolatedTestRunnerAdapterWorker.js:59:80)     at process.<anonymous> (/Users/[...]/src/main/webapp/node_modules/stryker/src/isolated-runner/IsolatedTestRunnerAdapterWorker.js:20:27)
I'm using stryker with jasmine and karma, and the stacktrace appears to suggest an issue with those... except the unit tests do run fine by themselves. I'm only having the issue when I run stryker.
My stryker config is as follows:
module.exports = function(config) {
  config.set({
    files: ['src/**/*.ts'],
    testRunner: "karma",
    reporter: ["clear-text", "progress"],
    testFramework: 'jasmine',
//    coverageAnalysis: "perTest",
    karmaConfigFile: "karma.conf.js",
    mutate: ['src/**/*.ts'],
    coverageAnalysis: 'off', // Coverage analysis with a transpiler is not supported a.t.m.
    tsconfigFile: 'tsconfig.json', // Location of your tsconfig.json file
    mutator: 'typescript', // Specify that you want to mutate typescript code
    logLevel: 'trace'
//    transpilers: [
//        'typescript' // Specify that your typescript code needs to be transpiled before tests can be run. Not needed if you're using ts-node Just-in-time compilation.
//    ]
  });
};

and karma config is as follows:
module.exports = function (config) {
  config.set({
    basePath: '',
    frameworks: ['jasmine', '@angular/cli'],
    plugins: [
      require('karma-jasmine'),
      require('karma-chrome-launcher'),
      require('karma-jasmine-html-reporter'),
      require('karma-coverage-istanbul-reporter'),
      require('@angular/cli/plugins/karma')
    ],
    client:{
      clearContext: false // leave Jasmine Spec Runner output visible in browser
    },
    coverageIstanbulReporter: {
      reports: [ 'html', 'lcovonly' ],
      fixWebpackSourcePaths: true
    },
    angularCli: {
      environment: 'dev'
    },
    reporters: ['progress', 'kjhtml'],
    port: 9876,
    colors: true,
    logLevel: config.DEBUG,
    autoWatch: true,
    browsers: ['Chrome'],
    singleRun: false
  });
};

@james-dsb thanks for trying out our typescript support!
This sounds like an issue with karma. Do you mind opening a separate issue for this? Could you also set logLevel: 'debug' in your stryker.conf.js and report the logging somewhere?

I made a small repo with similar configuration from a large private project.
https://github.com/omar10594/nutri-starter
We first use webpack to generate three files(dependencies code, main code (to mutate) and specs code), then we run karma only, at last run stryker, and some mutants survive.
Now i'm trying to use stryker-typescript but i think, we should change a lot of code, because we use webpack, and for example, to include a template we import it and webpack use a loader to return the file content (or the url), but if we compile the the file with typescript, we will get a error like:

Cannot find module 'xxx.template.html'

To avoid that kind of errors we should include the templates on typescript files (i suppose that), but we import other files like images, json files, etc., so for projects like ours i think it will be hard implement stryker-typescript.

@omar10594 i've tried your repo and i think stryker works as well as can be expected. I see that you are using webpack to transpile and bundle all typescript files (amongst others) into a main.js. Later you use stryker to mutate the main,js code. This is a good approach seeing as we don't support webpack as a transpiler yet.

I just read right now the road to 1.0, so if i can help with the stryker-webpack-transpiler tell me.

Archcry is an intern at our company and is working on the webpack support. @Archcry maybe you can use @omar10594 nutri-starter project as an example?
I'm closing this issue. We have now formally communicated the support for TypeScript in our latest blog article https://stryker-mutator.github.io/blog/2017-10-06/typescript-support.html

We forgot to even reference the PR here: it was #376 😄


Detection of LIGGGHTS scripts or various scripts used for simulation programs

Describe the enhancement
Many of us use DEM (discrete element method) to carry out simulations using engines like LIGGGHTS or LAMMPS. To run our simulations, we have to write some scripts. In the LIGGGHTS community, it's very customary to label our input scripts as "in.XXXXX". It would be a fun addition to add a language called "LIGGGHTS/LAMMPS Script" when it detects an input file of this sort of format. To make it more robust, one could also detect keywords like "atom_style", "boundary", etc. to better label it. An example script is the following:
#Particle packing by insertion and successive growing of particles
atom_style	granular
#atom_modify	map array
boundary	f f p
newton		off
#echo		both
dimension 	2
communicate	single vel yes
units		si
read_data	particles.dat
neighbor	0.002 bin
neigh_modify	delay 0
# MATERIAL PROPERTIES FOR PAIR STYLE
fix 		m1 all property/global youngsModulus peratomtype 1.e9 1.e9
fix 		m2 all property/global poissonsRatio peratomtype 0.2 0.2
fix 		m3 all property/global coefficientRestitution peratomtypepair 2 0.1 0.1 0.1 0.1
fix 		m4 all property/global coefficientFriction peratomtypepair 2 0.4 0.0 0.0 0.0
# DEFINE PAIRTSTYLE
pair_style gran model hertz tangential history #Hertzian without cohesion
pair_coeff	* *
# TIMESTEP
timestep	0.001

What is the file extension/name?

What is the file extension/name?

If I understand the OP correctly...

it's very customary to label our input scripts as "in.XXXXX".

... the files are named in.XXXXX where the Xs represent some other random characters. If this is the case, this isn't currently possible with Linguist as it works purely on full identifiable filenames, eg Makefile and extensions, eg .php. It doesn't cater for fixed prefixes and changing extensions/suffixes.
This is the same thing that affects having Linguist identify Dockerfile.foobar as detailed in https://github.com/github/linguist/issues/4566
If "LIGGGHTS/LAMMPS" as a language has a fixed filename or extension, and has wide enough usage on GitHub.com, we'd certainly welcome a PR. Once the language is known, users can then use an override to force the language of these in.* files.


Redirected URL

Hello,
Is there a way to get a redirected URL from OkHttp's Response object?
Thanks

Hi Alexey,
OkHttp uses priorResponse for that but we don't populate the field (https://github.com/google/cronet-transport-for-okhttp#common-incompatibilities). Can you share a bit more about your use case to prioritize the feature request?

It is HLS stream downloader. The app downloads a manifest file first, then segment files. When composing URLs for segment files, the app should know the final redirected URL used while downloading a manifest file.


"Resource interpreted as Document but transferred with MIME type video/mp4"

I'm trying to use plyr.io to create a video player from a video URL I feed it from my backend. This URL is a video, it works on my browser, and it returns with content type of "video/mp4"
Expected behaviour
The video should start automatically playing in my player.
Actual behaviour
When I try to play the video via plyr.io, the video just starts downloading and no player plays. In the console, I get "Resource interpreted as Document but transferred with MIME type video/mp4"
Environment

Browser: Google Chrome
Version: 67.0.3396.87 (Official Build) (64-bit)
Operating System: Windows 10
Version: 1709 (OS Build 16299.492)

Steps to reproduce

Create a new Plyr
Attach your video URL as a source with type 'video/mp4'
Let the video play.

Your mime type is incorrect. That’s the only explanation for that message in your console. This isn’t really an issue with Plyr, but rather with your server config.

On 20 Jun 2018, at 1:29 am, bin senpai<EMAIL_ADDRESS>wrote:
I'm trying to use plyr.io to create a video player from a video URL I feed it from my backend. This URL is a video, it works on my browser, and it returns with content type of "video/mp4"
Expected behaviour
The video should start automatically playing in my player.
Actual behaviour
When I try to play the video via plyr.io, the video just starts downloading and no player plays. In the console, I get "Resource interpreted as Document but transferred with MIME type video/mp4"
Environment
Browser: Google Chrome
Version: 67.0.3396.87 (Official Build) (64-bit)
Operating System: Windows 10
Version: 1709 (OS Build 16299.492)
Steps to reproduce
Create a new Plyr
Attach your video URL as a source with type 'video/mp4'
Let the video play.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@sampotts I did do that, it's sending it as video/mp4.

Also, I don't have control over what Content-Type I get from the server.

Yes the header is correct but the data is not. That’s why it’s interpreted as a Document. As I said. Check the “preview” tab and you’ll likely see the HTML Document that’s being sent. The header is useless if the content itself is not a video.
Sam

On 20 Jun 2018, at 1:49 am, bin senpai<EMAIL_ADDRESS>wrote:
@sampotts I did do that, it's sending it as video/mp4.
Also, I don't have control over what Content-Type I get from the server.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

My preview data is an empty tab.
If I download the video, and play it manually, it works just fine. If I use video.js, it works just fine.

Any idea as to how I can solve this?

If you remove Plyr from your code and use native html5 video instead it should still happen. Then use Google or Stack Overflow to find your solution. Seems like it's a problem with your server. Please read our contributions document if you want to keep commenting or open new issues.

As above, try with the regular HTML5 player. If you can share the URL for the video then I can take a look too.


Remove CoreBundleContext.dataStorage clear

As per issue #733 this commit removes the code for 'clear()' dataStorage to solve the data-race warning generated by ThreadSanitizer.
Analysis:
The Thread Sanitizer data-race warning is caused when two threads simultaneously try to access the dataStorage variable. Thread T71 (in the issue log) tries to perform a READ operation on the variable while thread T74 performs a WRITE.
Solution:
As the dataStorage string variable is only set at the time of initialization of the framework and will not be changed during the lifecycle. So there is no need to perform a clear() operation on dataStorage during Shutdown. Thus, this line is removed solving the possible race-condition.

Looks good. the thread sanitizer build found a number of other issues, unrelated to this change, which I will log as issues to be fixed later.
thread sanitizer build log: https://github.com/CppMicroServices/CppMicroServices/actions/runs/4872584091/jobs/8690974464?pr=845

make sure to update the CHANGELOG and add this fix. thanks.


feat(saas): Improved SEO, Metadata to pages

#30  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @alifarooq9 and the rest of your teammates on  Graphite


fixed mfx_dispatch compilation with gcc6/MinGW64

This small change allows compiling mfx.lib on Windows MINGW64 with gcc-6.3.

Without the space, compiler looks for an operator named "str" to apply.

Thank you for contribution! I'm going to merge it once it pass our internal review cycle.


HTTPS and SSL Certificate

Add in HTTPS support and receive signed SSL certificate. This will be used to register the app on azure app directory for remote authentication.

Completed in #73


Close button does close the extension website on success screen

Screenshots of the changes [optional]

To Reproduce
Steps to reproduce the behavior:

Open the extension website (click on the extension icon and open "send")
Send to a lightning address of your choice
Clicking "close" closes the tab

Expected behavior
In the extension popup the button "close" takes you to the send screen again.

Waiting on #1581


speech api with sample content bytes is not encoded to ASCII string before being sent over the wire

When using the package as under with python3.5 -
with open('linear.wav', 'rb') as f:
    data = f.read()

s = client.sample(data, None, encoding=Encoding.LINEAR16, sample_rate=16000)
texts = client.sync_recognize(s)

Throws an error that it is not possible to convert the byte stream to JSON.
In speech/google/cloud/speech/client.py#240 the following line encodes the bytes in base64 but the return type of b64encode is still bytes.
audio = {'content': b64encode(_to_bytes(sample.content))}

If this is changed to the following, the API behaves as expected -
audio = {'content': b64encode(_to_bytes(sample.content)).decode('ascii')}

Thanks for reporting @INRIX-Avilay-Parekh!
I was able to reproduce this, thanks to your examples.
I'm working on a fix right now.

@INRIX-Avilay-Parekh, just merged a fix. Let me know if you have any issues. Thanks again!

Great! Thanks for the quick turn-around :-)


update to webm opus support since Safari 17.4

see docs and discussion at:

https://stackoverflow.com/questions/70143421/webm-and-opus-in-safari
https://github.com/Fyrd/caniuse/issues/6805#issuecomment-2102183335
https://github.com/Fyrd/caniuse/issues/7056#issuecomment-2111259595
https://developer.apple.com/documentation/safari-release-notes/safari-17_4-release-notes#Media
https://developer.apple.com/documentation/safari-release-notes/safari-17_5-release-notes#Media

Thanks!


show --release option in the readme

ceph-deploy install currently still uses 10.2.5 (not 11, although it is released).
guess a lot of people would like to play with bluestore, so adding the --release option might be nice:
-ceph-deploy install ceph-admin ceph-server-1 ceph-server-2 ceph-server-3 ceph-client
+ceph-deploy install --release=luminous ceph-admin ceph-server-1 ceph-server-2 ceph-server-3 ceph-client

Depending on what you target, maybe don't add luminous, but show the option, so it is obvious where to give that. (just using a different debian-xxxxx repo is not enough)

Sounds like a good change! Care to PR it?

thanks!


Columns with background image needs non black block option

We need an option to not have a black linear gradient for background images
Ours:

Original:

Good point. I will try adding this feature on the section metadata as style.


Allow MAC filtering on unmanaged parent bridge

Fixes https://discuss.linuxcontainers.org/t/lxd-3-18-security-mac-filtering-on-bridged-nic-fails/6022/9

Testsuite passed

Testsuite passed


Feature/allow vip sharing

Allow sharing of loadbalancer IPs across different services, as long as they do not conflict on the used ports.
Remark (can be deleted before merging):
I'm new to go, so please be prepared for some strange implementation ;-)

Thanks for the PR! General looks good, just few nits. No worries, we all start from somewhere.
Could you add a e2e test as well?
You could create a folder like this https://github.com/kube-vip/kube-vip-cloud-provider/tree/main/test/e2e/defaultconfig, changing the default configmap config

Thanks for the PR! General looks good, just few nits. No worries, we all start from somewhere.
Thanks :-) As you may have been noticed, i'm not a native english speaker and though correction is appreciated.

Could you add a e2e test as well?
You could create a folder like this https://github.com/kube-vip/kube-vip-cloud-provider/tree/main/test/e2e/defaultconfig, changing the default configmap config
Honestly, this is bit overwhelming at this point for me. I'd be happy if you can do this change for me.

And maybe you can tell me, what this 'File is not goimports-ed (goimports)' thing means.

i'm not a native english speaker and though correction is appreciated.

Don't worry, I'm not a native speaker either, you will get to it. Just keep practicing.

Maybe you can tell me, what this 'File is not goimports-ed (goimports)' thing means. And I think I have to handle the dual-stack case also, 'cause it may happen that in a dual-stack case the sharing-algo only share the service with the first hit (which can be ipv4 or ipv6). Better would be to check both assigned IPs that case, but it's a bit more compicated.

File is not goimports-ed (goimports) this means you need to format your file with goimports. There is a doc here https://hyr.mn/gofmt/ you can refer to. If you are using Visual Studio Code` to code, you can also configure formatting on save, it's mentioned there. This tool is expecting you to sort your imports in some order. Usually people just configure the IDE to do it for you, no need to manually run it.
Dual stack case yeah it's little bit more complicated, one services might have two IPs. Maybe you can use two maps, one for ipv6, one for ipv4.
I can help on the e2e test later, lets get unit test cover enough cases first.

Dual stack case yeah it's little bit more complicated, one services might have two IPs. Maybe you can use two maps, one for ipv6, one for ipv4.

I'v reconsidered it a bit: with IPv4 I think we're more often in the situation, that a assigned pool is small. But with IPv6, even the smallest networks are /64... so I'm thinking about handling the dual-stack case only for the IPv4-part and let IPv6-services always get a unused IP. What's you opinion about this?

Sorry took a long PTO last week, let me take a look ASAP

This looks great, is it ready to merge @lubronzhan / @pnxs ?

No objections from my side

Just few more suggestions. Then it's good to merge.
Thank you

@pnxs in case you missed the comment


Point to "how to make CI fast" link when cache is messed up

When running elm make with an elm-stuff directory but no ~/.elm directory the build fails with an error about corrupt binaries:
$ elm make src/**/*.elm
Success! Compiled 1 module.
-- CORRUPT BINARY -- /Users/mbark/.elm/0.19.0/package/elm/browser/1.0.0/objs.dat

The binary data at /Users/mbark/.elm/0.19.0/package/elm/browser/1.0.0/objs.dat
is corrupt.

Elm caches build artifacts in the following directories:

    /Users/mbark/.elm
    elm-stuff/

Maybe you recently installed a command line tool or editor plugin that messes
with them? They definitely should not be doing that, but you never know! So
maybe try deleting them? Everything will be rebuilt from scratch. This may help
reveal the corrupting influence.

SSCCE
I was able to reproduce the error consistently with the elm-todomvc with elm installed via Homebrew:
$ git clone https://github.com/evancz/elm-todomvc.git
$ cd elm-todomvc
$ elm make src/**/*.elm
$ rm -rf ~/.elm
$ elm make src/**/*.elm
Success! Compiled 1 module.
-- CORRUPT BINARY -- /Users/mbark/.elm/0.19.0/package/elm/browser/1.0.0/objs.dat
[...]

Workaround
Our current workaround for this problem to remove the ~/.elm and elm-stuff directories before running elm make when doing a production build (as this happens every time we try to do a build in our CI environment otherwise).

How is your ~/.elm directory getting deleted?

I've seen this too, from naïvely running elm make in a docker container with the host machine's source directory mounted into it. In this case the ~/.elm directory appears to elm make to be missing, while the elm-stuff (which is seen inside the container) persists across invocations.
That may not be a reasonable thing to do, though it worked perfectly with 0.18. At the very least, the error message here is confusing, and stymied me for a while: even printing "missing" instead of "corrupt" in this specific case would be a win.

The typical case where this happens is in our CI environment which is setup to start in a clean environment (i.e. no ~/.elm directory) and then downloads a pre-built elm-stuff directory from our Artifactory server (since it doesn't have internet access due to security reasons) and finally tries to run elm make.

I just realized that with Elm 0.19 we should now store the ~/.elm directory (rather than elm-stuff) in Artifactory instead, which makes this issue not really occur very often. However, as @purcell says the error message is a bit confusing and could maybe be clarified?

Yeah, you want to store ~/.elm instead with 0.19. I would recommend not storing elm-stuff/, and only looking into it if you think it'll save enough time that is worth the risk of messing with cached artifacts and timestamps.
I think it'd be good to add a link to a documenting how to get fast builds on CI when people are getting this kind of error though. I'm not convinced things should work different at this time though.

FYI this just tripped me up trying to get stated with Elm on GitLab. I was following this example which is broken (at least in part) due to this issue. See my comment on the example for work arounds.

A couple of (GitLab specific) updates:

I opened a PR to add an example Elm app to their GitLab pages repo (comments there are welcome because I am an Elm newbie), but:
I confirmed that trying to use their caching with ~/.elm and elm-stuff results in CORRUPT BINARY on subsequent builds 😞

@evancz The error message could clearly be better. The word "corrupt" could be replaced with "corrupt or missing" and it would be a vast improvement.


findNearestPoly should indicate an error on too many polygons

findNearestPoly currently uses an internal buffer size of 128 polygons. When this is not enough, it still succeeds silently without any indication of an error occurring.
I want to submit a PR to fix this, but I am not sure of the best way to indicate this error. findNearestPoly can be changed to return DT_FAILURE | DT_INVALID_PARAM immediately after queryPolygons indicates that the buffer was too small; this, however, is a breaking change.
Another option could be to return DT_SUCCESS | DT_INVALID_PARAM or DT_SUCCESS | DT_BUFFER_TOO_SMALL, and still find the nearest poly among the polygons returned by queryPolygons. This would not be a breaking change.
Which solution do you think would be the best?

The DT_SUCCESS | DT_BUFFER_TOO_SMALL would be most appropriate.
On Mon, Aug 17, 2015 at 9:03 PM, Jakob Botsch Nielsen <
<EMAIL_ADDRESS>wrote:

findNearestPoly currently uses an internal buffer size of 128 polygons.
When this is not enough, it still succeeds silently without any indication
of an error occurring.
I want to submit a PR to fix this, but I am not sure of the best way to
indicate this error. findNearestPoly can be changed to return DT_FAILURE
| DT_INVALID_PARAM immediately after queryPolygons indicates that the
buffer was too small; this, however, is a breaking change.
Another option could be to return DT_SUCCESS | DT_INVALID_PARAM or DT_SUCCESS
| DT_BUFFER_TOO_SMALL, and still find the nearest poly among the polygons
returned by queryPolygons. This would not be a breaking change.
Which solution do you think would be the best?
—
Reply to this email directly or view it on GitHub
https://github.com/memononen/recastnavigation/issues/107.

I was so busy wondering whether I could, I didn't stop to think if I should. Fixing it would indeed be pretty straightforward like that.
I did however find a post of yours, where you talk about solving it from the caller of the API: https://groups.google.com/d/msg/recastnavigation/Gz3CavAztxk/p9cNj1UgiYAJ
Here you recommend starting with small extents and increasing them until it finds the closest polygon. This is something findNearestPoly could also do by itself. Although there could be problems with it not finding the nearest polygons when it used deflated extents, since the box corners are farther away than the center of the box faces. Here's what I mean for 2D:

But as you note, findNearestPoly will be slow for large extents, so the dtPolyQuery solution would also be potentially breaking for some people, as it could end up having to process very large amounts of polygons, when not needed.
Is there a more ideal solution maybe? Perhaps a way to indicate in dtPolyQuery that we do not need all polygons.

Isn't the problem with this function that it is implemented in a way that must gather all the polygons for consideration up front before processing them?
Why not make the bounding volume tree an internal dependency(and not user optional), such that these type of searches can use the tree structure to find the nearest polygon. No buffers to fill, and the extents can just be a restriction to which nodes of the tree may search.

@jwigart that's essentially the fix suggested by @memononen. queryPolygons already uses the BV-tree if available, so if we passed dtPolyQuery to that we could avoid collecting them all and just process a chunk of them directly. I will look at getting that done.


Using CMake-codecov with $<TARGET_OBJECTS:xxxxxxxx>

I am facing a Coverage disabled warning while trying to use CMake-codecov.
I am building executable with TARGET_OBJECTS option, that prevent CMake-codecov to discover the language used. The internal variable NUM_COMPILERS is equal to zero in Findcodecov.cmake. Would it be possible to investigate this development?
ADD_EXECUTABLE(my_test_prog $<TARGET_OBJECTS:my_test_prog_obj>)
add_coverage(my_test_prog)

Below is a CMakeLists.txt, that repoduces the problem (one needs to have codecov available to CMake)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
PROJECT(hello_world)
IF(NOT DEFINED CMAKE_BUILD_TYPE)
    SET(CMAKE_BUILD_TYPE Coverage)
ENDIF()
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)
IF(${CMAKE_BUILD_TYPE_UPPER} STREQUAL "COVERAGE")
    MESSAGE(STATUS "Adding coverage")
    SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) # ;${CMAKE_MODULE_PATH}
    FIND_PACKAGE(codecov)
ENDIF()
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/my_test_prog.cpp"
"
#include <iostream>
using namespace std;
int main()
{
    cout << \"Hello World!\" << endl;
    return 0;
}
")

ADD_LIBRARY(my_test_prog_obj OBJECT ${CMAKE_CURRENT_BINARY_DIR}/my_test_prog.cpp)
ADD_EXECUTABLE(my_test_prog $<TARGET_OBJECTS:my_test_prog_obj>)
add_coverage(my_test_prog)

The log is here
-- Adding coverage
-- Try  code coverage flag = [-O0 -g -fprofile-arcs -ftest-coverage]
-- Try  code coverage flag = [-O0 -g --coverage]
CMake Warning (dev) at cmake/Findcodecov.cmake:174 (message):
  Coverage disabled for target my_test_prog because there is no sanitizer
  available for target sources.
Call Stack (most recent call first):
  cmake/Findcodecov.cmake:34 (add_coverage_target)
  CMakeLists.txt:25 (add_coverage)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: buildCoverage

#make
Scanning dependencies of target my_test_prog_obj
[ 50%] Building CXX object CMakeFiles/my_test_prog_obj.dir/my_test_prog.cpp.obj
[ 50%] Built target my_test_prog_obj
Scanning dependencies of target my_test_prog
[100%] Linking CXX executable my_test_prog.exe
[100%] Built target my_test_prog

Guillaume

Unfortunately I didn't find a way to find the linker and compiler to be used this early at configuration time, so I needed to get these by the list of source files. The my_test_prog target doesn't have any source files in its sources list, so add_coverage() can't determine the language of this target and doesn't know which flags to set for this target.
However, add_coverage() should have print an error instead of searching flags for an empty compiler. I'll investigate why this didn't happen.

@Gjacquenot I can't reproduce your log.
First I needed to change the code to get it working with CMake 3.8.2:
--- ../foo.txt	2017-07-21 17:20:42.000000000 +0200
+++ ../CMakeLists.txt	2017-07-21 17:21:40.000000000 +0200
@@ -1,6 +1,9 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
 PROJECT(hello_world)
-IF(NOT DEFINED CMAKE_BUILD_TYPE)
+IF(POLICY CMP0051)
+    cmake_policy(SET CMP0051 NEW)
+ENDIF()
+IF(NOT CMAKE_BUILD_TYPE)
     SET(CMAKE_BUILD_TYPE Coverage)
 ENDIF()
 STRING(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

Then I've run CMake:
$ cmake .. -DCMAKE_BUILD_TYPE=Coverage -DENABLE_COVERAGE=On
-- The C compiler identification is AppleClang <IP_ADDRESS>20042
-- The CXX compiler identification is AppleClang <IP_ADDRESS>20042
-- Check for working C compiler: /usr/local/opt/ccache/libexec/cc
-- Check for working C compiler: /usr/local/opt/ccache/libexec/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/local/opt/ccache/libexec/c++
-- Check for working CXX compiler: /usr/local/opt/ccache/libexec/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Adding coverage
-- Try Clang code coverage flag = [-O0 -g -fprofile-arcs -ftest-coverage]
-- Performing Test COVERAGE_FLAG_DETECTED
-- Performing Test COVERAGE_FLAG_DETECTED - Success
-- Found gcov evaluation for Clang: /usr/bin/gcov
-- Could NOT find lcov (missing:  LCOV_BIN GENINFO_BIN GENHTML_BIN)
CMake Warning at /Users/alexander/develop/must/PnMPI/externals/CMake-codecov/cmake/Findcodecov.cmake:218 (message):
  Can't use code coverage for target my_test_prog, because it uses an unknown
  compiler.  Target will be compiled without code coverage.
Call Stack (most recent call first):
  /Users/alexander/develop/must/PnMPI/externals/CMake-codecov/cmake/Findcodecov.cmake:38 (add_coverage_target)
  CMakeLists.txt:28 (add_coverage)

-- Configuring done
-- Generating done
-- Build files have been written to: .

As you can see I get the right output for the search of the right compiler flag and add_coverage() will print an appropriate warning to the console.

@alehaa, thanks for your quick answer.
Sorry, I did not use the latest version of your repository, this is why we obtain different log messages.
However, you face the same disabling warning on target.
Wouldn't it be possible to obtain compiler information from another method, or use a default value in case of failure?

My fault, sorry.
I think some time ago CMake itself didn't know how to handle targets with object libraries as only sources. There are two problems:

You have to add add_coverage() for the object library, otherwise the objects wouldn't be compiled with coverage support. In the configure step CMake doesn't know which sources belong to a target and its related targets, so it can't figure out for which files to add the compile flags. This information becomes available in the generate step first.

Someone has to tell the linker for the my_test_prog to link with coverage support. These flags have to match the compiler used for compilation. One cannot add GCC flags, if you've compiled with Clang, etc. - and if the objects have been compiled by different compilers, e.g. Fortran by Gcc and C by Clang, coverage must not be used et all. As we don't know the full list of sources of all object libraries (see 1.), we can't add flags and therefore can't use coverage.

However, I'm thinking about an optional parameter named LANGUAGES for add_coverage() to override the language detection.


Setting up environment using binder session

Hi,
I am trying to set up environment using binder session for our class and I get error below.
"Failed to connect to event stream."
Has anyone else had this issue? Please advise.
Thank you.
PS.

@psjms it usually means that there was some timeout on Binder. I think a page refresh might do the trick?

Thank you, Eric. I am able to see the page.
PS.


fix: reduce the entities collected by default

Summary
Reduce the entities collected by default and implement a configuration that is convenient for users to collect
Does this close any open issues?
Related to #5920
Screenshots
github:

jira:

gitlab:

Other Information
Any other information that is important to this PR.

close# https://github.com/apache/incubator-devlake/issues/7375


Add mp3 support

Wanna to listen nyan cat. Please.

The origin is already supports right media tag for MP3 files

https://cdn.rawgit.com/avatsaev/touchbar_nyancat/master/nyan_music.mp3

Here is your nyan cat


Supported models for auto discovery

Are all supported devices also supported when doing autodiscovery?

Are there any dependencies from zigbee/mqtt that I need to get in place?

Which zigbee gateway are you using?
Could you have a look into config/.storage/core.device_registry? Than search for a device which you expect to be discovered. I am interested in "manufacturer" and "model" values.

I am using Zigbee2MQTT and ConbeeII as coordinator.
These are two devices that I'd expect to discovered.
              "manufacturer": "IKEA",
                "model": "TRADFRI LED bulb GU10 400 lumen, dimmable (LED1650R5)",
                "name": "kitchen_spot_2",
                "sw_version": "2.3.086",
                "entry_type": null,
                "id": "8657d2fe0bcc5f591fc2c58c532b587c",
                "via_device_id": null,
                "area_id": null,
                "name_by_user": null,
                "disabled_by": null,
                "configuration_url": null
            },
            {
                "config_entries": [
                    "b3c58bccd27f5af0bbe35dc7a4651cbd"
                ],
                "connections": [],
                "identifiers": [
                    [
                        "mqtt",
                        "zigbee2mqtt_0x804b50fffe101252"
                    ]
                ],
                "manufacturer": "IKEA",
                "model": "TRADFRI LED bulb GU10 400 lumen, dimmable, white spectrum (LED1537R6/LED1739R5)",
                "name": "guest_room_desktop_lamp",
                "sw_version": "2.0.029",
                "entry_type": null,
                "id": "4fb205e9ec7bbf33ec9701b55965640b",
                "via_device_id": null,
                "area_id": null,
                "name_by_user": null,
                "disabled_by": null,
                "configuration_url": null
            },

They are currently manually configured...

Powercalc will look at the model to determine the actual model.
When there are parenthesis in the string it will take the value between the parenthesis.
In this case:
"LED1650R5" and "LED1537R6/LED1739R5". The second one is a case I have not seen before and don't think I can fix this kind of strange cases.
However the first one should work correctly.
Do you see any errors in the logs? Could you also enable debug loggin?

Here is a subset of the discovery logs:
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.master_bedroom_spot_1: Auto discovered model (manufacturer=Ikea of Sweden, model=LED1837R5)
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] light.master_bedroom_spot_1: Model not found in library, skipping auto configuration
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.master_bedroom_spot_2: Auto discovered model (manufacturer=Ikea of Sweden, model=LED1837R5)
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] light.master_bedroom_spot_2: Model not found in library, skipping auto configuration
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.master_bedroom_spot_3: Auto discovered model (manufacturer=Ikea of Sweden, model=LED1837R5)
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] light.master_bedroom_spot_3: Model not found in library, skipping auto configuration
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.wled: Auto discovered model (manufacturer=WLED, model=FOSS)
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] light.wled: Model not found in library, skipping auto configuration
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.kids_bedroom_lamp: Auto discovered model (manufacturer=Ikea of Sweden, model=LED1623G12)
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] light.kids_bedroom_lamp: Model not found in library, skipping auto configuration
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.attic_freezer_power_plug: Auto discovered model (manufacturer=AEON Labs, model=ZW096)
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] light.attic_freezer_power_plug: Model not found in library, skipping auto configuration
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.wled_master: Auto discovered model (manufacturer=WLED, model=FOSS)
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] light.wled_master: Model not found in library, skipping auto configuration
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.kitchen_window_lamp: Auto discovered model (manufacturer=Ikea of Sweden, model=LED1934G3_E27)
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] light.kitchen_window_lamp: Model not found in library, skipping auto configuration
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.kitchen_spot_2: Auto discovered model (manufacturer=Ikea of Sweden, model=LED1650R5)
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] light.kitchen_spot_2: Model not found in library, skipping auto configuration
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.guest_room_desktop_lamp: Auto discovered model (manufacturer=Ikea of Sweden, model=LED1537R6/LED1739R5)
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] light.guest_room_desktop_lamp: Model not found in library, skipping auto configuration
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.range_extender_6: Auto discovered model (manufacturer=AEON Labs, model=ZW117)
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] light.range_extender_6: Model not found in library, skipping auto configuration
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.porch_lamp_1: Auto discovered model (manufacturer=Ikea of Sweden, model=LED1836G9)
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] light.porch_lamp_1: Model not found in library, skipping auto configuration
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc.model_discovery] light.porch_lamp_2: Auto discovered model (manufacturer=Ikea of Sweden, model=LED1836G9)
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] light.porch_lamp_2: Model not found in library, skipping auto configuration
2022-01-06 12:56:35 DEBUG (MainThread) [custom_components.powercalc] Done auto discovering entities

About the models with a name as: "LEDXXXX/LEDXXXX" They are almsot identical in every aspect... Could they not be merged into a single model/config in the powercalc library as well?

Thanks for the log, with this information I'm pretty sure I have found the issue. Fixed with #481
Could you test with the master branch?
The other on "LEDXXXX/LEDXXXX" is not resolved. I have to think about this some more.

Thanks for the log, with this information I'm pretty sure I have found the issue. Fixed with #481 Could you test with the master branch?

Perfect! Detects all my IKEA bulbs except the ones having merged model names.
Strange this hasn't come up before? IKEA seems to be a very popular brand in your user base...

The other on "LEDXXXX/LEDXXXX" is not resolved. I have to think about this some more.

👍
Maybe not necessary to merge the models, but if you detect the parenthesis and extract the string, maybe you can split or detect the / and use whatever is after? There should be close to no differences between the bulbs, also regarding power usage.

Yes strange no one detected this before. But it also depends on the gateway used. When using the Hue bridge it works correctly as that one returns "IKEA of Sweden" as manufacturer. Your Zigbee2MQTT was returning "IKEA" causing this issue. I have added some mapping for that, but there was a casing issue in there.
Yes I also thought about detecting the / and only using the part before the /

Does it make more sense to use what is after /, as it seems the newer model number (which likely will dominate the market) is last in the string....?

Think I will be able to check both if they are in the directory listing.
Could you make a new issue for this with this feature request?


Unable to launch flow.tcl in local installation

After worked around the pyinstaller problem (version 4.1 to use instead of latest 5.1) I managed to run the installl script
python3 ./env.py local-install.
According to the doc at https://github.com/The-OpenROAD-Project/OpenLane/blob/master/docs/source/local_installs.md,
I should just do ./flow.tcl but I get:
ERROR]: run_non_interactive_mode missing required -design
while executing

"parse_key_args "run_non_interactive_mode" args arg_values $options flags_map $flags -no_consume"
(procedure "run_non_interactive_mode" line 10)
invoked from within
"run_non_interactive_mode {*}$argv"
invoked from within
"if { [info exists flags_map(-interactive)] || [info exists flags_map(-it)] } {
if { [info exists arg_values(-file)] } {
run_file [file nor..."
(file "./flow.tcl" line 384)
If I use /flow.tcl -design spm, it does not work either with:
[INFO]: Using design configuration at /home/titan/eda/ol/designs/spm/config.tcl
[INFO]: Sourcing Configurations from /home/titan/eda/ol/designs/spm/config.tcl
[ERROR]: PDK_ROOT is not specified. Please make sure you have it set.
while executing

"prep {}$args"
(procedure "run_non_interactive_mode" line 11)
invoked from within
"run_non_interactive_mode {}$argv"
invoked from within
"if { [info exists flags_map(-interactive)] || [info exists flags_map(-it)] } {
if { [info exists arg_values(-file)] } {
run_file [file nor..."
(file "./flow.tcl" line 384)

That's uh. I mean you can invoke flow.tcl with the same arguments as inside the Docker container.
As for PDK_ROOT, you do need to set that separately, in addition to using a tool like volare to get the PDK installed.
We'll update the documentation to reflect all of that.

Ah yeah indeed. Option -design is needed. I just followed blindy the doc at https://github.com/The-OpenROAD-Project/OpenLane/blob/master/docs/source/local_installs.md.
Ok thanks. I will try once the doc is updated.


Improve nvhpc configuration

It was suggested that instead of treating .cu files as .cpp files and passing on -stdpar to nvc++ we should rather use the -cuda compile flag.
Also we found that nvc++ has different default settings with respect to denormals. So add them too.
Fixes #530
Note: I consolitated passing those flags into a single location. If we should keep them separate please hiss

Pinging @dkolsen-pgi to bless these nvc++ flag changes.

I approve having the NVC++ options be -cuda -Mnodaz.  I have no opinion about which file should specify those options.


Improve documentation SEO, refactoring

Description
This pull request aims to improve the SEO and the structure of the Orchest documentation.

For the SEO improvements I drew inspiration from a couple of similar pull requests made in Dask (https://github.com/dask/dask/pull/9182, https://github.com/dask/dask/pull/9194) apart from other sources. In particular, I added .. meta descriptions to all pages, :alt: text to all figures, and be more careful with headers and wording in general.
For the structure, I drew inspiration from the Diátaxis documentation framework, which is widely used in the community. I noticed two things:

The "How to..." page contained lots of almost empty sections, which was annoying when doing searches. e.g. I would search for "git", click the first result, and realize that it was just a link to somewhere else ("your princess is in another castle"). I removed those sections and left only the ones that still made sense, and renamed that document FAQ.
There was some reference information (according to Diátaxis: understanding-oriented theoretical knowledge), so I created a separate Reference section that now contains the SDK, the CLI, and the keyboard shortcuts. One could say that the Glossary also fits here.

As a side effect, I continued converting some documents to MyST. To review, select the commit range ignoring the first two ones, which (1) upgrade docutils and (2) do all the conversions at once without touching the content. I did not convert all because this PR already moves some stuff around, so I preferred to not touch those documents that got heavily refactored.
Checklist

[x] I have manually tested my changes and I am happy with the result.
[x] The documentation reflects the changes.
[x] The PR branch is set up to merge into dev instead of master.
[x] I haven't introduced breaking changes that would disrupt existing jobs, i.e. backwards compatibility is maintained.
[x] In case I changed the dependencies in any requirements.in I have run pip-compile to update the corresponding requirements.txt.
[x] In case I changed one of the services' models.py I have performed the appropriate database migrations (refer to the DB migration docs).
[x] In case I changed code in the orchest-sdk I followed its release checklist.
[x] In case I changed code in the orchest-cli I followed its release checklist.

🤖  Rendered version: https://orchest--1148.org.readthedocs.build/en/1148/

The "How to..." page contained lots of almost empty sections, (...), and renamed that document FAQ.

From the last Docker based Orchest version we link to: https://docs.orchest.io/en/stable/getting_started/how_to.html#migrate-to-kubernetes. This link would no longer we working with the removal of the page.
Is there a possibility of setting up a redirect?

Is there a possibility of setting up a redirect?

Luckily yes! https://docs.readthedocs.io/en/stable/user-defined-redirects.html

Merging, we can continue fixing smaller stuff in later pull requests 👍🏽  Thanks both!

Hmm pre-commit just failed with an unexpected minor thing 🤔 On it

gh-1154

From the last Docker based Orchest version we link to: https://docs.orchest.io/en/stable/getting_started/how_to.html#migrate-to-kubernetes. This link would no longer we working with the removal of the page.

Redirect added 👍🏽


Changed Toast notification to Snackbar notification

I signed it.
On Fri, Dec 15, 2017 at 1:35 PM, googlebot<EMAIL_ADDRESS>wrote:

Thanks for your pull request. It looks like this may be your first
contribution to a Google open source project. Before we can look at your
pull request, you'll need to sign a Contributor License Agreement (CLA).
📝 Please visit https://cla.developers.google.com/
https://cla.developers.google.com/ to sign.
Once you've signed, please reply here (e.g. I signed it!) and we'll
verify. Thanks.

If you've already signed a CLA, it's possible we don't have your
GitHub username or you're using a different email address on your commit.
Check your existing CLA data https://cla.developers.google.com/clas
and verify that your email is set on your git commits
https://help.github.com/articles/setting-your-email-in-git/.
If your company signed a CLA, they designated a Point of Contact who
decides which employees are authorized to participate. You may need to
contact the Point of Contact for your company and ask to be added to the
group of authorized contributors. If you don't know who your Point of
Contact is, direct the project maintainer to go/cla#troubleshoot. The email
used to register you as an authorized contributor must be the email used
for the Git commit.
In order to pass this check, please resolve this problem and have
the pull request author add another comment and the bot will run again. If
the bot doesn't comment, it means it doesn't think anything has changed.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/firebase/quickstart-android/pull/392#issuecomment-351972330,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJUglhT7olLgCN2pt8uHst3vgImGptf8ks5tAkuCgaJpZM4RDTCb
.

Closing in favor of #393


Allow a single builder with components=

Summary
Allow users to pass a custom class that is built into a list of action row payloads. This should help with abstracting some custom component handlers.
Why is this needed?
There have been a few new component handlers recently. Generally, users are forced to use components as follows:
handler = library.SomeHandler(...)
await channel.send(components=handler.build())

It'd be ideal if the .build() could be abstracted away with:
handler = library.SomeHandler(...)
await channel.send(components=handler)

Ideal implementations
new builder protocol/abc
components will allow Sequence[ComponentBuilder] | CoolComponentHandlerNameIsWIP
await channel.send(components=handler)

allow pre-existing ComponentBuilder to return lists
If ComponentBuilder returns a sequence it will be assumed to be a list of action row payloads.
await channel.send(component=handler)

Checklist

[X] I have searched the issue tracker and have made sure it's not a duplicate. If it is a follow up of another issue, I have specified it.

I dont think this will be implemented, mostly because the solution to remove the .build() is quite simple. All you need is to make your handler = library.SomeHandler(...) a sequence, as specified in the typehint. This would look something like this:
class SomeComponent:
    def to_builder() -> ComponentBuilder:
        return ComponentBuilder(...)

class SomeHandler(typing.Sequence[ComponentBuilder]):
    _custom_components: typing.List[SomeComponent]

    def __len__(self) -> int:
        return len(self._custom_components)

    @typing.overload
    def __getitem__(self, index: int) -> ComponentBuilder:
        ...

    @typing.overload
    def __getitem__(self, index: slice) -> typing.Sequence[ComponentBuilder]:
        ...

    def __getitem__(
        self, index: typing.Union[int, slice]
    ) -> typing.Union[ComponentBuilder, typing.Sequence[ComponentBuilder]]:
        if isinstance(index, int):
            return self._custom_components[index].to_builder()

        return [component.to_builder() for component in self._custom_components[index]]

    def __iter__(self) -> typing.Iterator[ComponentBuilder]:
        # This is not necessary, but a worthwhile optimization
        yield from (component.to_builder() for component in self._custom_components)

and that can be safely passed into the components argument.
Because of this, will be closing this issue. Feel free to comment to it or open a new one if you have any comments :)

Ye, outdated. Would still be cool to allow for just an iterable though.


Buttons default to navigate within site

Checklist

[ ] I have performed a self-review of my code
[ ] I have reached out to another developer to review my code
[ ] New and existing unit tests pass locally with my changes
[ ] All Lint and CI checks are passing

If you want a Button to open a new tab, use prop newTab = {true} or just newTab (which will default to true)

Rename multiStepForm.ts to multiStepForm.d.ts to fix linter issues


Add browser compatibility table to docs index (fixes #445)

Would it be worth noting that in older browsers that we don't support, Raven should still fail gracefully? It shouldn't break by including it for an IE7, browser, for example.

Would it be worth noting that in older browsers that we don't support, Raven should still fail gracefully?

Do we know that, though? If I make that statement, I feel we're committing ourselves to testing every deprecated browser to ensure that Raven.js fails gracefully.

Well, we do a hard check for native browser JSON support, and this drives isSetup().
This check is done right before we attempt to squirt it over the network, but we can move it up right at captureException or whatever to make sure we fail right away.


install.remote should be separate for install.bin

For people who want to install podman remote or podman
only we need to separate out the two install commands.
Signed-off-by: Daniel J Walsh<EMAIL_ADDRESS>

LGTM

This PR seems to fix the broken .deb build on launchpad if someone could merge it please
(ref https://github.com/containers/libpod/issues/3126#issuecomment-493698862)

Restarting failed tests, they look like network flakes

/lgtm


What is a resume net? Can someone please elaborate?

The model that you resume training from (i.e. a checkpoint).

@xsacha I found resume_epoch
This is the set epoch. In the code, instead of starting from zero in the for loop, training starts from resume_epoch. Is this to start training from the node? Doesn’t it need to freeze some parameters?

You have to specify which epoch you are on for your resume net if you are resuming from a checkpoint.


Is it possible to throw a type error when list could possibly be empty in "where... in" clauses

Im not an expert with typescript but is it possible to suggest the possibility of an error when a (possibly empty) array is passed into a query builder for a "where ... in ... " clause. So for example:
const bills = await this.db
        .selectFrom('bills')
        .select([
          'bills.id',
        ])
        .where(
          'bills.forProperty',
          'in',
          properties.map((t) => t.propertyId),
        )
        .execute();

This threw an error during runtime because properties was an empty array. One of the big reasons for using kysely is that I dont have to worry about making mistakes like this because of it's incredible typesafety. Would it be possible to handle situations like this where if I havent't made sure the length is at least 1, this throws a type error?

Unfortunately this can't be fixed in the types.


Log training history

Training history is currently not logged. A tensorboard log file with reconstruction loss, perplexity, etc. per epoch would be useful.

Addressed in #30


Feature/trilaterion cal

Created trilaterion calculations for the bluetooth signals to get location from RSSI. Also refactored configurations.

Codecov Report

Merging #8 into master will decrease coverage by 12.1%.
The diff coverage is 6%.

@@              Coverage Diff              @@
##             master       #8       +/-   ##
=============================================
- Coverage     35.07%   22.97%   -12.11%
  Complexity       14       14
=============================================
  Files             6        6
  Lines           134      222       +88
  Branches          1       10        +9
=============================================
+ Hits             47       51        +4
- Misses           87      171       +84

Impacted Files
Coverage Δ
Complexity Δ

...ava/fi/helsinki/btls/services/LocationService.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

...main/java/fi/helsinki/btls/io/UbiMqttProvider.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

...in/java/fi/helsinki/btls/domain/LocationModel.java
29.72% <35.71%> (-2.28%)
2 <2> (ø)

...in/java/fi/helsinki/btls/services/MqttService.java
38.46% <8.33%> (-21.54%)
2 <0> (ø)

Continue to review full report at Codecov.

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


Support pagination natively

What do you guys think about native support to pagination? We could implement that using Django paginator (for example) since it doesn't have external dependencies.
That's helpful in most listing APIs. Here is just an example on how it could be implemented in the Resource:
    DEFAULT_RESULTS_PER_PAGE = 20

class Resource(object):

   ...

    def serialize_list(self, data):
        if getattr(self, 'paginate', False):
            page_size = getattr(self, 'page_size', DEFAULT_RESULTS_PER_PAGE)
            paginator = Paginator(data, page_size)

            try:
                page_number = int(self.request.GET.get('p', 1))
            except ValueError:
                page_number = None

            if page_number not in paginator.page_range:
                raise BadRequest('Invalid page number')

            self.page = paginator.page(page_number)
            data = self.page.object_list

        return super().serialize_list(data)

    def wrap_list_response(self, data):
        response_dict = super().wrap_list_response(data)

        if hasattr(self, 'page'):
            if self.page.has_next():
                next_page = self.page.next_page_number()
            else:
                next_page = None

            if self.page.has_previous():
                previous_page = self.page.previous_page_number()
            else:
                previous_page = None

            response_dict['pagination'] = {
                'num_pages': self.page.paginator.num_pages,
                'count': self.page.paginator.count,
                'page': self.page.number,
                'start_index': self.page.start_index(),
                'end_index': self.page.end_index(),
                'next_page': next_page,
                'previous_page': previous_page,
            }

        return response_dict

And to use simply add to your resource:
MyResource(Resource):
    paginate = True
    page_size = 50  # optional

If that seems useful I'm willing to create a PR with tests and docs.

I think it's better to write your own paginate mixin.
Restless is not Django-only and it could be tricky to support pagination for every usage.

@seocam nice approach, just a note: there's not need to use
        try:
            page_number = int(self.request.GET.get('p', 1))
        except ValueError:
            page_number = None

        if page_number not in paginator.page_range:
            raise BadRequest('Invalid page number')

since the django Paginator class will take care of bad page numbers, so your code can be even shorter:
def serialize_list(self, data):
    if getattr(self, 'paginate', False):
        page_size = getattr(self, 'page_size', DEFAULT_RESULTS_PER_PAGE)
        paginator = Paginator(data, page_size)
        page_number = self.request.GET.get('p', 1)
        self.page = paginator.page(page_number)  #  This django method takes care of the page number
        data = self.page.object_list

    return super().serialize_list(data)

https://github.com/django/django/blob/master/django/core/paginator.py#L52

Just add a little note:
def serialize_list(self, data):
    if getattr(self, 'paginate', False):
        page_size = getattr(self, 'page_size', DEFAULT_RESULTS_PER_PAGE)
        paginator = Paginator(data.value, page_size) # get value data
        page_number = self.request.GET.get('p', 1)
        self.page = paginator.page(page_number)  #  This django method takes care of the page number
        data = self.page.object_list

    return super().serialize_list(data)

https://docs.djangoproject.com/en/1.10/topics/pagination/#example
If you got error *** TypeError: object of type 'Data' has no len()  that my snippet code fix that error

@seocam just wondering if you had any plans on submitting a PR for this feature? Thanks!

Hey @CalebeGeazi. Honestly I had forgot that this issue was open. Thanks for bumping it up.
@toastdriven do you have any thoughts about that? If you don't oppose I think it's time to add a few extra features here ;)

Guys, do you think that the pagination should be enabled or disabled by default?

I think we could turn it on or off depending on the per_page class attribute. If it getattr(resource, 'per_page') evaluates to True, pagination is enabled, if it evaluates do False, it's disabled.


Adding Rita Levi-Montalcini and Claude Shannon to name generator

- What I did Added Shannon and Rita Levi-Montalcini to name generator
- How I did it Forked a repo and create pull request
- How to verify it Change is without any regression
- Description for the changelog Claude Shannon and Rita Levi-Montalcini added to name generator

- A picture of a cute animal (not mandatory but encouraged)
Signed-off-by: Anuj Bahuguna<EMAIL_ADDRESS>

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "master" git@github.com:anujbahuguna/docker.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

LGTM

LGTM


Navigation Reorder Battle Royale

Something else!

Dealing with the Astro DX Week realization that alphabetical order is not gonna cut it for our side navigation...
Immediate concern: UI Frameworks was too low to be easily found, given how many people are going to reach for it early.
Injection of Chaos: Sarah went rogue and reordered some other menu items, too! (No, Ben, Sharing State is still not a core concept, but you were upgraded to premium economy...)
Are there any strenuous objections to any reordered items here that would not satisfy #NWTWWHB? Will also entertain reasoned pleas for personal pet pages, but the goal is immediate DX improvement!

Definitely better than what we had before.
I imagine this is not the PR for me to suggest renaming "Guides" to something else?

You can try, @Jutanium. Do you have a clearly better suggestion that won't distract from the task at hand?  😅

@sarah11918 I'M GOING IN

OK! Want to wait to give @delucis @hippotastic @kevinzunigacuellar a chance to object before we merge this!
Also, time to speak up if you hate this new sidebar, @agustinmulet @kecrily @X7md @kyosuke @Chrissdroid!

maybe this is a bit nitpicking but maybe we can put fonts and CSS Styling next to each other?

@kevinzunigacuellar I was thinking that CSS is probably more used than anything else, and probably Images more used than Fonts. Do you have a gut feeling whether you'd drop Images lower, or move it above CSS (in order to keep CSS and Fonts together)? Which feels better to you?

@sarah11918 I like the new side navigation order!
I especially like how it's organized under "CONFIGURATION."
Not directly related to the order, but my concern about the sidebar is that the "UI Frameworks" link is to "Framework Components".
Could the navigation label be changed to "Framework Components" or could the page title be changed to "UI Frameworks"?
Similarly, "CSS & Styling" is now "Styling & CSS", so I think it would be better to unify either.

Since I was summoned I will give my input 😝
Love the new configuration part!
On the other hand, I personally would not consider MDX as something that belong on basics since it requires an integration, and also wouldn't consider SSR as something basic. Also, in SSR we talk about fetching data and SSR is positioned before Data Fetching.
BUT that's just my opinion, the battle royale continues! 😆

@kevinzunigacuellar I was thinking that CSS is probably more used than anything else, and probably Images more used than Fonts. Do you have a gut feeling whether you'd drop Images lower, or move it above CSS (in order to keep CSS and Fonts together)? Which feels better to you?

I see the logic now, it's a hard call. I would be okay with dropping images.
Perhaps, analytics can tell us more about which page is more popular 😇 and helps us decide.

@sarah11918 I like the new side navigation order! I especially like how it's organized under "CONFIGURATION."

Yay! This seems to be a popular idea! I think we'll keep it!

Could the navigation label be changed to "Framework Components" or could the page title be changed to "UI Frameworks"?
Similarly, "CSS & Styling" is now "Styling & CSS", so I think it would be better to unify either.

Cries in redirects and Hippo link checker... 😅
We will be looking at doing a site overhaul that will involve a lot of page redirects. So I'd rather not get into that YET which means changing only the text content in the nav bar (not file names) at this point.
"Framework Components" makes sense to me, and in fact I just had to answer a question today in Discord where my answer was, "No you can't have .vue pages, only components. So, I don't think emphasizing components is a bad idea...
As for the other, I'm honestly trying to remember if we stragegically wrote "CSS & Styling" because things were in alphabetical order, and we figured CSS was kind of a big deal that people would want to know about, so we wanted it higher in the list!  😂 I think CSS is just so MUCH MORE the thing that people will be looking for and catch people's eye, that I'm hesitant to change that one, though.
Anyone else have thoughts re: Framework Components vs UI Frameworks and CSS & Styling vs Styling & CSS??

On the other hand, I personally would not consider MDX as something that belong on basics since it requires an integration, and also wouldn't consider SSR as something basic. Also, in SSR we talk about fetching data and SSR is positioned before Data Fetching.

Gah! These are great points!
MD and MDX are now so closely aligned in how they're used (and, we're really pushing MDX usage because that's how you get what you used to get with Astro components) that it honestly seemed more trouble NOT to have them together. We're still working on this "story" (and, Ben is still writing more features!  😅 ) so there will absolutely be more changes to come in that space.
I threw SSR up into Basics for this draft to make it closer to Deploy, but strategically right after deploy so it looked kind of like "another deploy option" maybe? One thing we have noticed about our SSR doc coverage in general is it still feels like an experimental add-on, where we just removed the experimental warning. We are seeing a LOT of people using/interested in it, and I think it is going to end up being as basic as "deploy your site." So this was an attempt to give it more prominence, since we are not only advertising this feature, but also, the SSR guides (like the Integration Guides) are some of our nicer looking pages (THAN YOU CHRIS) and the only multi-level navigation items where you have to click AGAIN to get to info. So we don't want them lost down at the bottom of the site where, out of nowhere, it's CONTENT EXPLOSION! That's why Integrations are also so high up now.
This does make me wonder if we'd consider Data Fetching "Basics" now? Especially as one of our focuses over the next few weeks is adding CMS integration guides.

In my opinion, I agree with Sarah that it would be better to change the label to "Framework Conponents".
However, if we do that, it might be a bit confusing since "Componets" is also under "BASICS".
How about changing the label of "Components" to "Astro Components”?
As for "CSS & Styling"... maybe CSS should come first. Because if I'm looking for Styling, I look for the word "CSS".

I did just draft another branch, but yes, I'll change it to Astro components!

Random thought: I just saw a couple of tweets about Astro where people referred to JS Framework Components to describe React, Vue, Svelte etc....
Is there a nice "Astro Component" vs "JS Framework Component" story there? Is there any way in which "JS Framework Components" is better than "UI Framework Components"?  (Or, no, because we want to downplay JS in general??)


createnewaddress command error

version: 3.1.5

Server-side error: <Fault -32603: Server error: File "/usr/lib64/python3.6/json/encoder.py", line 180, in default | TypeError: Object of type 'bytes' is not JSON serializable
>
Traceback (most recent call last):
File "/root/Electron Cash-3.1.5/packages/jsonrpclib/SimpleJSONRPCServer.py", line 448, in do_POST
data, getattr(self, '_dispatch', None), self.path)
File "/root/Electron Cash-3.1.5/packages/jsonrpclib/SimpleJSONRPCServer.py", line 269, in _marshaled_dispatch
return jsonrpclib.jdumps(response, self.encoding)
File "/root/Electron Cash-3.1.5/packages/jsonrpclib/jsonrpc.py", line 160, in jdumps
return json.dumps(obj)
File "/usr/lib64/python3.6/json/init.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/lib64/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib64/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/lib64/python3.6/json/encoder.py", line 180, in default
o.class.name)
TypeError: Object of type 'bytes' is not JSON serializable
^CTraceback (most recent call last):
File "./electron-cash", line 419, in
d.join()
File "/usr/lib64/python3.6/threading.py", line 1056, in join
self._wait_for_tstate_lock()
File "/usr/lib64/python3.6/threading.py", line 1072, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):

createnewaddress method of commands.py should return a string. I fixed it in this way:
change return self.wallet.create_new_address(False)
to return str(self.wallet.create_new_address(False))

+1

why was this closed?


Register: Custom box height for single-line entry.

Make a custom class for a shorter red box height.

Fixed.


Improve "Show votes" output

Currently, the show votes output is rather limited due to Discord's message limits.
To support arbitrary participant counts when showing votes, the current system should be refined in the following way:

Construct the message text respecting message limits, splitting into multiple messages if necessary.
If there are 6 or less resulting messages, send the response and up to 5 followup messages.
If there are more than 6 resulting messages, format the results as a table and use a text file attachment.

The message can first be constructed like normal and then split on new lines when the limit is reached.

As it turns out, this is a bit difficult to accomplish because there's no confirmation when the interaction response comes through. Thus, there is a race condition between the initial response being accepted and the followup messages being sent. I would like to avoid implementing an artificial delay and "hoping for the best", so maybe another possibility could be a single message with some sort of pagination?


Add hidden field customization support

I needed a way to specify extra attributes on the hidden field. For example, specifying the form attribute to target a specific form on the page.
This adds the ability to specific extra attributes on hidden_field the same way that input works.
  <%= combobox_tag :id, users_path, placeholder: "Search users", hidden_field: {form: :user} %>

Thanks @excid3! I think the built-in (and undocumented — I really have to get on that 🤦♂) customizable concern should be able to handle this as follows:
<%= combobox_tag :id, users_path do |combobox| %>
  <% combobox.customize_hidden_field form: :user %>
<% end %>

Does that work for you?

I wondered about that. I'm fine using that instead. 👍

On an unrelated note, is there a way to clear the combo box from a turbo_stream action? I have a reset_form action that runs form.reset(), but that doesn't seem to trigger a reset of the combobox.

Cool, that's what I figured I'd do for now. 👍


Colab not working

https://colab.research.google.com/drive/1UAjdFenAqSPEBAocpjm5Lyr7J1I69kb2?usp=sharing is not working. Produces a black video and empty noise as the outputs when "Run All".

You are calling
! python main_nerf.py --text "a cat" --workspace trial -O --test
Remove --test to get more iterations and a working model :)

welcome to try!
https://colab.research.google.com/drive/1MXT3yfOFvO0ooKEfiUUvTKwUkrrlCHpF?usp=sharing

thanks will try!


fix for in-cluster case

Signed-off-by: Jeff McCormick<EMAIL_ADDRESS>

Thanks @jmccormick2001 !


feat: Added evictionHard, kubeReserved and podsPerCore to Provisioner

Fixes #2129
Description

Adds the ability to pass evictionHard, kubeReserved and podsPerCore in Provisioner spec

apiVersion: karpenter.sh/v1alpha5
kind: Provisioner
metadata:
  name: default
spec:
  ...
  kubeletConfiguration:
    podsPerCore: 3
    kubeReserved:
      cpu: 100m
      memory: 50Mi
    evictionHard:
      memory.available: 10%

How was this change tested?

make test
TEST_FILTER="integration" make e2etests
Manual validation

Does this change impact docs?

[ ] Yes, PR includes docs updates
[x] Yes, issue opened: #
[ ] No

Release Note

Added `evictionHard`, `kubeReserved` and `podsPerCore` to Provisioner

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Does it make sense to support soft eviction thresholds as well?

Does it make sense to support soft eviction thresholds as well?

It probably does, I figured we could decouple these for now, but we should probably follow-up this PR with support for evictionSoft and respect the higher of evictionHard and evictionSoft for scheduling