Q: How can I tell Flow that a function returns a type (one of many disjoint union types)?

I have thought about this and tried many things for many weeks, on and off.
My problem is that I use disjoint union types - and I have a lot of them, not just two. I save (Javascript) objects in storage that all look similar:
{
    type: 'TypeString',
    data: {<different properties depending on type>}
}

So type is the type identifying string.
The problem: I have only one function that reads them from storage - so that function returns one 20 different types.
Now I don't want to have the same type checking code everywhere I load an object. But I don't know how I can get that code into the getObject function itself! I would add a string parameter for the obj.type type-switch property to check against, but how would I connect that with the return type of the function? How would I be able to tell Flow that the function returns a concrete type now?
The function how I imagine it:
const getObjectAsObject = function (fileName: string, type?: string): Promise<ObjectTypesUnion> {
    return getObjectAsString(fileName)
    .then((s: string) => {
        const obj: ObjectTypesUnion = MicrodataToObject.convert(s);

        if (!type || obj.type === type) {
            return obj;
        } else {
            throw new Error(`Wrong type: expected ${type}, got ${obj.type}`);
        }
    });
};

I know this doesn't work, I declare the returned parameter as of the type of the entire union. But how can I do otherwise? I just don't see a way except with lots of very wasteful code! But this whole thing in seems to me based on a common generic problem and not at all uniquely my problem.
A function potentially returning many types, but depending on a parameter returning a concrete type. Only that in the case of disjoint unions, or actually in any case where I get an object from storage, or even more generically where I create a type without having that same type in the input list, I cannot use the usual "generics" syntax, which as far as I can see is 100% dependent on having the exact desired type
in the parameters! Or how would I use generics here? I have a string as input, which is used to select the type from the union list. I don't see a way with generics either.
So that I can assign the object I get from that function to a variable of the concrete type instead of the union type. After all, the check of the type switch property was made!
// GrantObj is part of the union ObjectTypesUnion
const grantObj: GrantObj = getObjectAsObject(hash, 'Grant');

Didn't have time to digest your entire post, but based on your code example, I think this is what you're looking for:
type DataType = 'type1' | 'type2'

type ObjectTypesUnion<Data: {}> = {
  type: DataType,
  data: Data,
}

declare var getObjectAsString: string => Promise<string>
declare var MicrodataToObject: { convert: (string) => ObjectTypesUnion<*> }

const getObjectAsObject = function (fileName: string, type?: DataType): Promise<ObjectTypesUnion<*>> {
  return getObjectAsString(fileName)
    .then(stringValue => {

      const obj = MicrodataToObject.convert(stringValue)

      if (!type || obj.type === type) {
        return obj;
      } else {
        throw new Error(`Wrong type: expected ${type}, got ${obj.type}`);
      }
    });
};

https://flowtype.org/try/#0C4TwDgpgBAIghsOAVc0C8UDkpIEZNQA+WOEATJgFCWlQDyARgFYQDGwKkAzgKoB2ASwD2fADzxEALigBvAL4A+KBhmUoUUtInJUASAA0aqABMEcLWcNzqxtgBs4AJ2gA3J1ADmEYIxbsAglwAysCOAnwe0lyh4R7KSgAKjkIAtgJcEKLRYREKlLasDs5Qbo5QALICrMmmiEhCvmzA0jJQrCIuEI7NUAAU2bEAlPH0zE2cELyCIqIAVErWlO180Z7ejQFcG8DKUABmAK587MJ8fXsCdhAAcnApEFExEfoaqAD8FnWog9JJqemZbYTKanOYKJSqdTOYAHRxnLw+MabEI5Dy9C5XW73QZGdQAOmAAAsIHx+k8PAA1OB2A7oCFGXHqNoiVZCZi7SrVIS1ZANJHAPHLTrdMmoqk0iA4xnqAR7PoAQlohGIbKYBNQyjQGFIw0hTP10NhZ1VAG5pVA5FAIHYMrJzeoickAO5QPgQF0AUUcyUcvQABgB1ZIRV6QaQQAAekHYEGMUAAJDJSHIXh4hDtE6r1ZA5H7Bmb9eprPq5PnKHITUA

@mwalkerwells
Thanks! Not sure it works like that though. Two questions:

How would I use this? Assign a result from the function to a variable with only one concrete type?
Something like
const type2Result: Promise<ObjectTypesUnion> = getObjectAsObject('filename', 'type2');

(This example is obviously wrong).

The "data" object has different properties. Example:

export type AccessObj = {|
    type: 'Access',
    data: {
        object: ReferenceObj,
        grant?: Array<ReferenceObj>
    }
|};

export type ChumObj = {|
    type: 'Chum',
    data: {
        name: string,
        person: [string, string],
        instance: [string, string],
        password: [string, string],
        host: [string, string],
        port: [number, number],
        atob?: Array<LinkObj>,
        btoa?: Array<LinkObj>
    }
|};

export type GrantObj = {|
    type: 'Grant',
    data: {
        accessIsGrantedTo: Array<ReferenceObj>
    }
|};

...(etc.)

The whole reason I want to have concrete types is so that when I have one those properties get checked. I don't see how I get this into the example?
Here is what I had previously, where I indeed did have the "data" part as the parameter, and it caused me nothing but grieve and since the 0.42 update nothing but errors (worked previously):
export type OneObject<T: OneObjectTypes> = {|
    type: OneObjectTypeNames,
    data: T
|};

export type AccessT = {|
    object: OneObject<Reference>,
    grant?: Array<OneObject<Reference>>
|};

...(etc.)

Then I'd use it like this:
const grantObjs: OneObject<Grant>[] = await Promise.all(
    Array.from(grantHashes).map(StorageUnversionedObjects.getObjectAsObject)
);

But that is no longer possible since the latest Flow update since the getObjectAsObject since the function is defined as
module.exports.getObjectAsObject = function (hash: string): Promise<OneObject<*>> {
    return getObjectAsString(hash)
    .then(MicrodataToObject.convert);
};

Without a parameter - but I did try this with a type parameter and it blew up all over the place, so I was glad that Flow accepted the above. Until now.

It's probably not as concise as you'd like, but you can do the type check on one line like this:

const getObjectAsObject = function (fileName: string): Promise<ObjectTypesUnion> {
    return getObjectAsString(fileName).then(s => MicrodataToObject.convert(s));
};

function nope<T>(msg: string = 'not gooood'): T {
  throw new Error(msg);
}

const grantObj: GrantObj = getObjectAsObject(hash).then(x => x.type === 'Grant' ? x : nope());

And possibly extract const assertGrant = x => x.type === 'Grant' ? x : nope() for reuse.

Thanks, I managed to implement it, using a disjoint union type and some generics for meta-types (with the concrete instances of the union as parameter). I even found two or three errors in the code.


run prospector across entire directory

Updates command to run prospector across entire directory instead of individual files. This takes longer but should eliminate a large class of false positives.
reviewer: @bertenator @mmacxm

re-worked to do PR into develop instead of master.

lgtm


add Photopea shortcut

This function may have issues with larger images as they are being sent as URI data in the URL. The reason we cannot pass the original URL to Photopea is twofold.

CORS
any edits made in BetterViewer itself would not be passed along to Photopea

Not exactly sure how to resolve this but I have 2 ideas.

hiding the option to edit in Photopea if the image is over a certain file size
uploading to Imgur first then passing the URL to Photopea (might run into CORS problems)

Let me know if you have any ideas or if this PR requires any changes for a merge.

@bbbenji You're amazing! I really appreciate your contribution
Thanks a lot! Your idea is so cool 👍 You made my day ❤

This function may have issues with larger images as they are being sent as URI data in the URL. The reason we cannot pass the original URL to Photopea is twofold.

CORS
any edits made in BetterViewer itself would not be passed along to Photopea

Not exactly sure how to resolve this but I have 2 ideas.

hiding the option to edit in Photopea if the image is over a certain file size
uploading to Imgur first then passing the URL to Photopea (might run into CORS problems)

Let me know if you have any ideas or if this PR requires any changes for a merge.

I found a solution:

We upload the image using ImgBB (many users requested to change Imgur with ImgBB) https://api.imgbb.com
We use Photopea to open the uploaded image (No CORS problems found)
I've test it and It's working fine 👍

Thank you again for your time and effort!
I will add the list of contributers in "About" page.

@all-contributors please add @bbbenji for code


Frontend correct redirection after Action

Fixes to have correct redirection

When creating an election the user should be redirected to the election show page of this new election
When casting a vote the user should be redirected to the correct page ( show page or elections table depending on where he came from )
The back button of show results should redirect the user to the correct page  ( show page or elections table depending on where he came from )

Bonus:

when I access a protected page (like create an election) and I'm not logged in, I am redirected to the login page. When I log from that page, I should then be redirected to the page I tried to access (create an election in this case).


Delegates (anonymous / nested methods?) not being able to access "this"

In a given method TryInitialize of the type WarpGateHost, creating a delegate referencing to this or to a field in this, causes the field 'FezGame.Components.WarpGateHost/c__AnonStorey0.$this' to be not found.

Will be re-opened if it still occurs with MonoMod neo.


orchestra\testbench required by ApplicationResolver

ApplicationResolver requires orchestra\testbench but it has only been marked as a suggested package.
https://github.com/nunomaduro/larastan/blob/f74befd87b7278285cbf6f1597509cbfaca46bf8/src/ApplicationResolver.php#L18
https://github.com/nunomaduro/larastan/blob/c103da52d6c455b05d3a50cda7fc9a648a5b8d5a/composer.json#L33
I'm not sure why this is the case as there is no description of why it is a suggestion, but for a package (not an application) PHPStan fails to run with Larastan loaded
> phpstan analyze
Note: Using configuration file phpstan.neon.
PHP Fatal error:  Trait 'Orchestra\Testbench\Concerns\CreatesApplication' not found in vendor/nunomaduro/larastan/src/ApplicationResolver.php on line 16
Fatal error: Trait 'Orchestra\Testbench\Concerns\CreatesApplication' not found in vendor/nunomaduro/larastan/src/ApplicationResolver.php on line 16

It is very simple. From the README

Using Larastan for analysing Laravel packages? You may need to install orchestra/testbench.

You have an Application -> Use Larastan
You have a package -> Install testbench -> Use Larastan

It is okay for you?

Lets put that directly in the description so it's easier to find for people that read the code before the docs :)
https://github.com/nunomaduro/larastan/pull/847

Resolved by #846


Metrics Provider for Torpedo

What this PR does / why we need it:
Adding Monitor Driver to expose metrics from Torpedo .
These metrics can be exposed and integrated with Prometheus Server.
This code will. be useful in following cases:

Monitoring and Alerting when test failed for long running job like longevity
Tracking and Analyzing different issue
Adding any new metrics

Which issue(s) this PR fixes (optional)
Closes # PTX-5085
Special notes for your reviewer:
Tested the alert when longevity test failed

/close


[BUG] Discriminator with "." in json is not handled correctly with FlatteningSerializer

Describe the bug
If a discriminator value with "." e.g. odata.type from monitor, and one of the class using it has @JsonFlatten annotation, the FlatteningSerializer would break that ".".
If I instead escape it as property = "odata\\.type". The serialization is good, but de-serialization would then fail (subclass not serialized correctly).
Exception or Stack Trace
Add the exception log and stack trace if available
To Reproduce
    @JsonFlatten
    @Fluent
    public static class Foo {
        @JsonProperty(value = "properties.criteria", required = true)
        private MetricAlertCriteria criteria;

        public MetricAlertCriteria criteria() {
            return this.criteria;
        }

        public Foo withCriteria(MetricAlertCriteria criteria) {
            this.criteria = criteria;
            return this;
        }
    }

    @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type", defaultImpl = com.azure.management.monitor.MetricAlertCriteria.class)
    @JsonTypeName("MetricAlertCriteria")
    @JsonSubTypes({
        @JsonSubTypes.Type(name = "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", value = MetricAlertSingleResourceMultipleMetricCriteria.class),
        @JsonSubTypes.Type(name = "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", value = MetricAlertMultipleResourceMultipleMetricCriteria.class)
    })
    @Fluent
    public static class MetricAlertCriteria {

    }

    @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "odata.type")
    @JsonTypeName("Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria")
    @Fluent
    public static final class MetricAlertSingleResourceMultipleMetricCriteria extends MetricAlertCriteria {

    }

    @Test
    public void testSerialization() throws Exception {
        SerializerAdapter adapter = new AzureJacksonAdapter();

        Foo foo = new Foo();
        foo.withCriteria(new MetricAlertSingleResourceMultipleMetricCriteria());
        String fooJson = adapter.serialize(foo, SerializerEncoding.JSON);
        Assertions.assertTrue(fooJson.contains("odata.type"));
    }

Produce
{"properties":{"criteria":{"odata":{"type":"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"}}}}

Code Snippet
Add the code snippet that causes the issue.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):

OS : Windows
IDE : IntelliJ
Version of the Library used : com.azure.azure-core 1.4.0-beta.1

Additional context
Relate to but not same as https://github.com/Azure/azure-sdk-for-java/issues/8372
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

[x] Bug Description Added
[x] Repro Steps Added
[x] Setup information Added

@anuchandy could you please assist here?

@weidongxu-microsoft - you're right that any dot in a discriminator property name in typeId has to be escaped e.g. "swagger odata.type" to "java odata\\.type.
I will validate the deserialization and sent out a PR. Thank you for sharing the repro code!

@weidongxu-microsoft - The PR is opened, I'm running a few more tests.
Please make sure the following constraints are met when using this version:

The dot "." in the discriminator name must be escaped e.g. "swagger odata.type" to "java odata\\.type
If a type Foo is annotated with JsonTypeInfo with discriminator containing dot then we also need to apply JsonFlatten annotation to the same type Foo.

Please refer the tests in the PR for the usage.

Fixed by https://github.com/Azure/azure-sdk-for-java/pull/10310
Verified on latest 1.5.0-beta.1


Update changelog and changelog tool for v2.2.0

This PR updates the changelog for v2.2.0
It also containes some updates to the script that generates the draft of the release notes and a new test to check if there are duplicated entries in the changelog
Before you get started

[ ] ☝ Create an issue to discuss what you are going to do

Checklist
It is the responsibility of the author to make sure the PR is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.

[ ] 🛠 PR has a descriptive title for the changelog
[ ] 🛠 Code follows the style guide
[ ] 🛠 Documentation is available
[ ] 🛠 YAML files pass pre-commit or yamllint checks
[ ] 🛠 Circle/CI tests pass
[ ] 🛠 Codacy code quality checks pass
[ ] 🛠 Documentation builds successfully on readthedocs

New or updated recipe/diagnostic:

[ ] 🛠 Provenance information has been added
[ ] 🛠 New dependencies are added to the project requirements
[ ] 🧪 Documentation for the recipe/diagnostic clearly describes what it calculates from a scientific point of view
[ ] 🧪 Recipe runs successfully on @esmvalbot or some other machine without modification
[ ] 🧪 Figure(s)/data look as expected
[ ] 🧪 Code is well documented and scientifically sound

New or updated data reformatting script:

[ ] 🛠 Dataset is added to the table in the documentation
[ ] 🛠 Documentation contains instructions to obtain the data
[ ] 🛠 Tests for the CMORized data are available
[ ] 🧪 Numbers/units of the data look physically meaningful
[ ] 🛠 Data set is added to the OBS data pool

To help with the number pull requests:

🙏 We kindly ask you to review two other open pull requests in this repository

@jvegasbsc dude, what age was the base branch you used for this? This looks like it's from 1953 :rofl:

Javi man, please modernize the base branch that you use, this is before the Gulf War (first one from 1991) - we froze the code today, so grab the state of master from a75326e or something like that 👍

This was started before the core release

By thw way, I have not gone through the actual changelog, so please start reviewing only the tests and the draft tool.

yeah no probs, the changelog we can go through it together next week, cheers for modernizing it :grin:

Changelog ready!

I added the note about Iris 3. I think we do not have any other big thing for the tool

cool, that should do it :+1:


Use latest chart version

This will avoid errors like:
no matches for kind "ClusterRoleBinding" in version "rbac.authorization.k8s.io/v1beta1"

:pencil: Description
Use the latest version of the helm chart on the readme.
:link: Related Issues

Thanks for the contribution @pinarruiz !


Increment version for keyvault releases

Increment version for keyvault releases

Can one of the admins verify this patch?


Document loader factory

There's quite a few document loaders already, but currently (AFAIK) you need to know upfront which one you want to use.
It would be pretty nice to have a sort of a "loader factory" which allows you to pass it a URI and it does a few things for you:

if it's a local file path, what's the file type (via MIME type), select the best loader candidate
if it's a local dir path, recurse into it and do 1-2 on each item
if it's an URL, try to see if there's specialized loader candidates, if not, check the Content-Size and Content-Type  via a HEAD request, pull it to a temp file locally and do 1 on it

In the meantime loaders got upgraded, closing.


Formatting html.erb files

Curious if it would be possible for this to work with ERB files (Ruby and HTML).
Right now I get the error "format provider not found for current buffer, your language server does not support it".
There is a prettier ERB plugin, but I'm not sure if it's possible to make it work with coc-prettier.

Install the prettier plugin with your local prettier and make coc-prettier use your local prettier and make sure the filetype match required languageIs by that ERB plugin.


IPv6 question

Hi ~ there.
I have  wondering things that leshan-server-demo is supported IPv6 properly.
On IPv6 environments, I think that leshan-client-demo can't receive registered message sent from leshan-server-demo. so leshan-server-demo de-register the client registrered after 30 secs.
Between my client PC(leshan-client-demo) and server PC(leshan-server-demo), ping6 command is okay.
But, On IPv4 environments, Everything is okay.
I need some advices about this problem of IPv6.

I think that leshan-client-demo can't receive registered message sent from leshan-server-demo. so leshan-server-demo de-register the client registrered after 30 secs.

What make you think that ?
Here some hint about ipv6 and Leshan.

Thanks your advice.
I already tried to use  -Djava.net.preferIPv6Addresses=true and direct ipv6 address on client side.
but client couldn't receive registered message from server.
our ipv6 addresses are private ipv6 addresses for testing. is that problem?

Hard to say ...but I would bet this is more a network issue than a Leshan one.
Let us know if you find any solution.

I solved my problem. I made a mistake.
I used the first ipv6 ipaddress for server :
inet6 2001:2:0:aab1::1 prefixlen 64 <--- used
inet6 2001:2::aab1:cb4:eefa:46c5:2ab3 prefixlen 64 autoconf secured
inet6 2001:2::aab1:55f:da91:15eb:b504 prefixlen 64 autoconf temporary
When i use third ipv6 address, every communication is okay.
inet6 2001:2:0:aab1::1 prefixlen 64
inet6 2001:2::aab1:cb4:eefa:46c5:2ab3 prefixlen 64 autoconf secured
inet6 2001:2::aab1:55f:da91:15eb:b504 prefixlen 64 autoconf temporary <-- used
Thank you for your network advice.
I appreciate it.


Reading FITS function added to sji.py

As a first part of SJICube Refactor, I created a reading FITS function named read_iris_sji_level2_fits. For now, the function is independent and return an NDCube instance that will be change to SJICube when it will be refactored.
Most of this new function is clearly inspired by spectograph's FITS reading function and sji's initialization.

Thanks for your returns, they will take part of my next pull request.
Do you have some ideas about SJICube refactor that I can now work about ?

@BaptistePellorceAstro I don't know how familiar with GitHub you are, but you can make changes to this PR by pushing more changes to your fork. (On the same master branch).

Hi @BaptistePellorceAstro.  Thanks so much for your first PR (pull request) to IRISpy!  The SJICube refactor will be a very useful addition to IRISpy.  Now starts the valuable, although sometimes frustrating, process of code review.  The comments and suggestions are meant maximise the quality and usefulness of your PR, and in doing so make you a better Python programmer.  They are never meant to criticise or discourage.  My first ever PR has gone down in SunPy legend as the longest and most frustrating code review process ever!  However, in the end it gave me the Python skills and confidence to eventually create IRISpy.  So the process worked!  We all get the same treatment and I think there's very little chance of your PR experience being as bad as my first one ;)
As we make suggestions and request changes, you can make those changes to the same branch that you've PR'd (in this case your local master branch) and this git push the new commits to the branch on your github account.  As @Cadair said, the changes will automatically appear as part of this PR.  Comments made on lines of code you've changed will be marked as outdated, while comments on unchanged lines remain as they were.  This way we go through an iterative process in getting your PR to a point where it's ready to merge into IRISpy and be used by everyone!
I'll leave some specific comments on the code soon.

@BaptistePellorceAstro regarding your query about the SJICube class, let's get the FITS reader right first.

Thanks for your answer, I hope I will have fun to work on IRISpy. As I said previously, I am open to every suggestion by the fact I am learning python ! I don't have access to my working computer now, I will modify it tomorrow morning.
Thanks for all returns and teach me python !

You're welcome @BaptistePellorceAstro.  I found code review an intense but great way to learn a language.  Thanks to you for contributing!

You can find a new version of the FITS reading function.

I changed from astropy.io import fits as pyfits to from astropy.io import fits and the two pyfits calls to fits.

I deleted try ... except ... and changed it by @Cadair suggestion.

About metadata, I pick up some ideas from spectrograph.py and sji.py and I mixed them. 'WAVEUNIT' is not existing on SJI FITS files but I think it will be useful to have a better understanding of metadata. However, I can remove it if you want.

Sorry for this two successive commits but deleting as pyfits created an error on SJICube._init_ because the name of the fits file was fits

Well apartment from the metadata issue I think this PR is looking good!

Hi @BaptistePellorceAstro.  How is this coming along?

Hi @BaptistePellorceAstro.  No problem.  So do you feel this PR is ready for final code review or do you think you have more to do?

I think we can do this PR, I finished to worked on the reading function.

I'm happy with these changes 👍 If we do find bugs though you can fix them in a new PR.


Support for customizing exception breakpoints in debugger

Today the debugger supports breaking into specific exceptions by listing the exceptions in the launch.json file.
Now that PTVSD supports the protocol, Its a good time to visit how these custom exception breakpoints can be passed into PTVSD, here's are the two solutions:
Option 1: Note: We'd need to add lot more exceptions into the list,
Option 2: Go with the launch.json approach (configure exceptions in the launch.json as done today - no GUI).
here's option 1:

@MikhailArkhipov @brettcannon @qubitron cc

@DonJayamanne I think listing all possible exceptions types will be overloading the UI too much, and not clear how it would work for user defined exception types. Ideally you could add exceptions to this list, similar to how the add function breakpoint works, though I assume this would require upstream work from VS Code to support. I'm thinking the "+" button would show a menu allowing you to choose between "Add Function Breakpoint" and "Add Exception Breakpoint". Upon selecting "Add Exception Breakpoint" you could then type in the exception name you wanted.
If we can't do the above, then I'd stick with launch.json. To improve discoverability we could add a checkbox in the list above that turns break on specific exceptions on/off, named something like "Exceptions Specified in launch.json". This would also allow you to turn off the exception breakpoints mid-debug session if they are hitting too often & getting in your way.

Here's how its configured in the Mono debugger:

Its per workspace, not per debug configuration
Settings stored in settings.json
Settings can be managed via gui (see below)

@brettcannon I think we should follow the Node.js approach, but since this is new functionality it can be added after the stable release.

I agree we should select from the drop-down as the list of potential exceptions is rather long just from the built-in exceptions alone.

@qubitron @brettcannon
Currently this isn't part of any milestone as its considered an enhancement (i.e. not considered for VSC Stable). Please feel free to change.

@DonJayamanne yes, that is intentional, we'll prioritize this after the stable release.

Would very much be interested in this for TypeScript debugging. I often want to break when a particular exception is occurring, but not all. I use it all the time C# / Visual Studio, and would also like to in Vscode with TypeScript.
@DonJayamanne you mentioned this can currently be added via launch.json, but I have searched everywhere on how to do this (as this would still be helpful). IS there any doco that you know of on how to do this?

@pjc2007 please file an issue on VSCode for questions related to typescript or js debugging.

The most useful thing is to be able to "turn off break on exception" on a specific exception that is happening too often, like "GeneratorExit" exceptions that happen in swig wrappers.  So I don't really care about the full list of all possible exceptions, rather the inverse, which is the much smaller list of exceptions that I don't care about.

Today the debugger supports breaking into specific exceptions by listing the exceptions in the launch.json file.

Where is this documented, please?

Today the debugger supports breaking into specific exceptions by listing the exceptions in the launch.json file.

@pcolmer This was in an older version of the extension (that shipped with an older debugger) and it is no longer available in the current version.
Please upvote this issue so we can track interest in this feature. @luabud /cc

I have the following need for being able to customize breakpoints. I'm writing some Python 3 code with uses the ldap3 library. During development, calls to ldap3 will sometimes break because the library raises an exception.
If I don't select "Raised Exceptions", the debugging process just stops, losing my ability to see what has gone wrong.

I accept that I may not be using VS Code in an optimal manner here or that I could code around it by using try...catch on the LDAP calls and just breakpoint on the exceptions but I do think that this shows how the debugging experience could be improved by being able to configure which exceptions are watched.
Thanks.

This is critical feature ask for Python given that language requires exceptions for various core features, unfortunately. Unless there is an ability to supress this, integrated debugging becomes useless on more difficult bugs.

Today the debugger supports breaking into specific exceptions by listing the exceptions in the launch.json file.

Could someone point me to documentation on how to customize the launch.json file for this?

I think @pcolmer put it best, Python requires the regular leveraging of exceptions as a part of a typical design paradigm. This is part of what makes Python unique - the design mentality is often to "try it and see what happens" lending itself to frequent handling of exceptions. This design paradigm can be particularly prevalent in some domains, ironically software testing being my particular domain.
I'm posting here because it's the longest standing open feature request - but I'm not necessarily recommending the original suggested implementation details. I would be thrilled to simply have a way to "break on unhandled exceptions." Thus, if at any point the debugger is about to quit due to an exception, instead break. The two options we have of "Raised Exceptions" and "Uncaught Exceptions" are basically useless in my experience, but I'll concede I'm probably not using them correctly.
I'll offer one last thing, what I'm requesting can be done easily via the command line with the following simple wrapper:
try:
    main()
except Exception:
   import pdb;pdb.set_trace()

Hmm... I would have expected that uncaught exceptions would be the same as what that does @ChadBailey, what was your experience for how it actually behaved?

Good point... In my experience "Raised Exceptions" breaks on every single raised exception irrespective of handling, while "Uncaught Exceptions" seems to do nothing at all. I just did a simple test though, and I can confirm it works as you suggested.
I code everything using TDD so I don't actually invoke the debugger directly. Instead, I invoke the debugger via debugging my tests. When ran this way, can confirm the setting does not actually work. It never occurred to me that invoking the debugger directly versus from the test explorer may impact the way the debugger behaves. Seems I may need to open a new issue for this?
Irrespective of this issue, I still think it would be swell to have improved control over exceptions.

Yes that sounds like a different issue to open.
Just a guess here: I wonder if this is due to how just-my-code is defined, I believe uncaught exception means "not caught by your code". If the test framework is somehow considered your code then the debugger might consider that a handled exception. Or maybe a different issue altogether.

@qubitron Good thinking, but I don't think that's the case since it handles all other just-my-code procedures correctly (i.e. when I click the step-into button for a builtin, it will not do that unless it's my code).
I have created a new issue #14056 with full details.

I'm new to VS Code and Python but this is also annoying to me. I cobbled this together, it seems to work, but might be really bad style:
if __name__ == "__main__":
	while True:
		try:
			app.run(debug=True, host="<IP_ADDRESS>", port=8000)
			break
		except KeyboardInterrupt:
			print("Web server stopped")
			break
		except SystemExit as err:
			if err.code == 3:
				# It's VS Code trying to reload the app, a bit clumsy. Help it out.
				continue
			break

@ygoe, it seems like that should be posted as a new issue or question on stackoverflow.

Maybe. Actually I'm more interested in this bug fixed properly than my workaround to be good. It even seems like it's not effective because after such a reload no breakpoints work anymore, they're just skipped. So it's probably better if everything falls apart than trying to keep it alive in this state.

@ygoe, what I'm saying is your post doesn't seem related to this issue thread which is titled "Support for customizing exception breakpoints in debugger".  Perhaps you need to start a new thread on better support for Flask app or something, if that's what you are using.

@ygoe that starts new threads everytime you change a source file, plus it doesn't update the code behind the endpoints. But you can achieve what you want by adding the debug option "django": true in your launch.json, or alternatively by waiting until the following PR is accepted and using "flask": true: https://github.com/microsoft/debugpy/pull/721

Closing as we do not plan to implement this change within the Python extension.

is there an alternate plan so solve this general python debugging problem?


Make keystore file import accept 1 or more characters instead of min 6

After #1272
Export remains 6 or more chars

Already works this way.


How to use --where= in command line

Im trying the syntax:
db-sync -e --user root --password PASSWORD origin.server.com destiny.server.com:3306 database.table --target.user=remoteuser --target.password='REMOTEPASSWORD' --target.table=database.table --where=date='2017-06-18'
In my table I have a columm date with this data, but the --where cant find.
[info] Hash calculation:
CONCAT(COALESCE(LOWER(CONV(BIT_XOR(CAST(CONV(SUBSTR(MD5(CONCAT_WS('#', id, cliente, date, hour, ethport, ethalias, direction, bytes)),17,16),16,10) AS UNSIGNED)), 10, 16)), 0),COALESCE(LOWER(CONV(BIT_XOR(CAST(CONV(SUBSTR(MD5(CONCAT_WS('#', id, cliente, date, hour, ethport, ethalias, direction, bytes)),1,16),16,10) AS UNSIGNED)), 10, 16)), 0))
[info] Written '0' rows, checked '1024' rows for tables 'table' => 'database.table'
[notice] {"checked":1024,"transferred":0,"affected":0}

Thanks in advance.
Rafael.

I'm not 100% sure about this... are you getting an error or just no results? Try running the command in very verbose mode: db-sync -vvv -e --user.... and looking at the queries its executing.
Its possible that wrapping the where clause in quotes will help:
db-sync -e --user root --password PASSWORD origin.server.com destiny.server.com:3306 database.table --target.user=remoteuser --target.password='REMOTEPASSWORD' --target.table=database.table --where="date = '2017-06-18'"

The other thing to watch out for here is that date and hour are functions in MySQL. DbSync should be able to handle that, but in general its best to avoid naming your columns with reserved words as it always catches you out at some point :)

Awesome!
--where="date = '2017-06-18'" WORKS!
Thanks a LOT!
Rafael.

Thanks, I've added an example for this in the readme: https://github.com/mrjgreen/db-sync/commit/df3c64701d7071153f45b2994dc24d8cf3ea2562


Use ppa for cmake 2.8.11

This fixes a build failure in Travis CI. The build gets past the cmake failure in my fork but then hits a problem in glfw: https://travis-ci.org/bstpierre/nphysics/builds/67459074

Yes, I hit the same problem. This is my solution:
https://github.com/MichaelRiss/nphysics/blob/travisCmakeFix/examples3/nphysics_testbed3d/Cargo.toml

That's correct, we need to always use glfw from crates.io. Will do this on another commit.
Thanks for this one!


python38Packages.aioextensions: 20.11.1621472 -> 21.7.2261349

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python38Packages.aioextensions is: "High performance functions to work with the async IO"
meta.homepage for python38Packages.aioextensions is: "https://kamadorueda.github.io/aioextensions"
meta.changelog for python38Packages.aioextensions is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS

Warning: a test defined in passthru.tests did not pass

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 21.7.2261349 with grep in /nix/store/3v6iwahflj96f76r97zhvdna9zlp8hfq-python3.8-aioextensions-21.7.2261349

found 21.7.2261349 in filename of file in /nix/store/3v6iwahflj96f76r97zhvdna9zlp8hfq-python3.8-aioextensions-21.7.2261349

directory tree listing: https://gist.github.com/c41147be890458a2c42daedf1839b1df

du listing: https://gist.github.com/5285528c3ad79eebacabbf6811a1ad39

Rebuild report (if merged into master) (click to expand)

8 total rebuild path(s)

2 package rebuild(s)

2 x86_64-linux rebuild(s)
2 i686-linux rebuild(s)
2 x86_64-darwin rebuild(s)
2 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
python38Packages.aioextensions
python39Packages.aioextensions

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/3v6iwahflj96f76r97zhvdna9zlp8hfq-python3.8-aioextensions-21.7.2261349 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python38Packages.aioextensions https://github.com/r-ryantm/nixpkgs/archive/0a8f13a368f1ecbda1e2502f5398ba90bfae9664.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/3v6iwahflj96f76r97zhvdna9zlp8hfq-python3.8-aioextensions-21.7.2261349
ls -la /nix/store/3v6iwahflj96f76r97zhvdna9zlp8hfq-python3.8-aioextensions-21.7.2261349/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

2 packages built:

python38Packages.aioextensions
python39Packages.aioextensions

Maintainer pings
cc @kamadorueda for testing.

Result of nixpkgs-review pr 133708 at 0a8f13a3 run on aarch64-linux 1

2 packages built successfully:

python38Packages.aioextensions
python39Packages.aioextensions


Roll Flutter Engine from 68943afd62d1 to 6165122ee789 (1 revision)

https://github.com/flutter/engine/compare/68943afd62d1...6165122ee789
2024-02-01<EMAIL_ADDRESS>Roll Skia from bcbc172f74da to 505d22d0ecdc (1 revision) (flutter/engine#50230)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC matanl@google.com,rmistry<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


Discuss/document ci/cd

What to do if main is moving fast while you are working on your branch X? You could do a git rebase exercise or you may wanna try merging main into your branch X to get X'. You can then merge X' into main.

branches that have been merged can be deleted? Let's not accumulate our merged branches...

@phschiele I think you could delete the codespaces branch

While rebase can be cleaner in some circumstances by keeping a linear commit history, I usually merge main into the feature branch. This is because once the branch is pushed, others might want to work on it as well, so rebasing could mess up their version of the branch.


grid-row() sass mixin not working fine anymore

This i not working anymore since 6.0.5 as been released !
ul
  @include grid-row(17)
  li:not(.item)
    @include grid-column(5)
    &:last-child
      @include grid-column(2)

Grid columns keep using 12 as reference...

The grid-column() class need to go inside grid-row(). In SCSS it looks like this. In Sass you probably just need to shift the indent over by one where li:not(.item) is.
ul {
  @include grid-row(17) {
    li:not(.item) {
      @include grid-column(5);

      &:last-child {
        @include grid-column(2);
      }
    }
  }
}


feat(containers): enforce disable bind mounts (#4110)

fix #4106

feat(containers): enforce disable bind mounts

refactor(docker): move check for endpoint admin to a function

feat(docker): check if service has bind mounts

feat(services): allow bind mounts for endpoint admin

feat(container): enable bind mounts for endpoint admin

fix(services): fix typo

cc @itsconquest for the review of that one, it's a backport so functionally it should be OK it just needs to be tested.

@chiptus are you able to fix the merge conflicts on this?

@chiptus are you able to fix the merge conflicts on this?

@chiptus are you able to fix the merge conflicts on this?

done

@chiptus are you able to fix the merge conflicts on this?

done

using these tests:
version: "2"

services:
  web:
    image: nginx:latest
    volumes:
      - /temp:/temp1

API test for containers
token = JSON.parse(localStorage['portainer.JWT'])
body = {
  "Image": "nginx:latest",
  "HostConfig": {
    "Binds": ["/temp:/temp1"],
  },
  "name": "testbind"
}
fetch("http://localhost:9000/api/endpoints/1/docker/containers/create?name=testbind", {
  "headers": {
    "authorization": "Bearer " + token,
    "content-type": "application/json",
  },
  "body":JSON.stringify(body),
  "method": "POST",
});

API test for services (when invalid returns 502, which is ok for now)
token = JSON.parse(localStorage['portainer.JWT'])
body = {
  "Name": "testservice",
  "TaskTemplate": {
    "ContainerSpec": {
      "Mounts": [
        {
          "Source": "/temp",
          "Target": "/temp1",
          "ReadOnly": false,
          "Type": "bind",
          "Id": ""
        }
      ],
      "Image": "nginx:latest",
    },
  },
}
fetch("http://localhost:9000/api/endpoints/14/docker/services/create", {
  "headers": {
    "authorization": "Bearer " + token,
    "content-type": "application/json",
  },
  "body": JSON.stringify(body),
  "method": "POST",
});

no RBAC
settings disabled

[ ] regular user, able to create a stack

[ ] regular user, able to create a container with bind mounts through UI

[ ] regular user, able to create a container with bind mounts through API

[ ] regular user, able to create a service with bind mounts through UI

[ ] regular user, able to create a service with bind mounts through API

[ ] admin, able to create a stack

[ ] admin, able to create a container with bind mounts through UI

[ ] admin, able to create a container with bind mounts through API

[ ] admin, able to create a service with bind mounts through UI

[ ] admin, able to create a service with bind mounts through API

settings enabled

[ ] regular user, not able to create a stack

[ ] regular user, not able to create a container with bind mounts through UI

[ ] regular user, not able to create a container with bind mounts through API

[ ] regular user, not able to create a service with bind mounts through UI

[ ] regular user, not able to create a service with bind mounts through API

[ ] admin, able to create a stack

[ ] admin, able to create a container with bind mounts through UI

[ ] admin, able to create a container with bind mounts through API

[ ] admin, able to create a service with bind mounts through UI

[ ] admin, able to create a service with bind mounts through API

RBAC
settings disabled

[ ] standard user, able to create a stack

[ ] standard user, able to create a container with bind mounts through UI

[ ] standard user, able to create a container with bind mounts through API

[ ] standard user, able to create a service with bind mounts through UI

[ ] standard user, able to create a service with bind mounts through API

[ ] endpoint-admin, able to create a stack

[ ] endpoint-admin, able to create a container with bind mounts through UI

[ ] endpoint-admin, able to create a container with bind mounts through API

[ ] endpoint-admin, able to create a service with bind mounts through UI

[ ] endpoint-admin, able to create a service with bind mounts through API

settings enabled

[ ] standard user, not able to create a stack

[ ] standard user, not able to create a container with bind mounts through UI

[ ] standard  user, not able to create a container with bind mounts through API

[ ] standard user, not able to create a service with bind mounts through UI

[ ] standard user, not able to create a service with bind mounts through API

[ ] endpoint-admin, able to create a stack

[ ] endpoint-admin, able to create a container with bind mounts through UI

[ ] endpoint-admin, able to create a container with bind mounts through API

[ ] endpoint-admin, able to create a service with bind mounts through UI

[ ] endpoint-admin, able to create a service with bind mounts through API


Enable the configuration of garbage collector in kube controller manager for CAPI providers

For CAPVCD it is defined https://github.com/giantswarm/cluster-cloud-director/blob/main/helm/cluster-cloud-director/templates/kubeadmcontrolplane.yaml#L80|here
Slack Message

Opened https://github.com/giantswarm/cluster/pull/123 to make the threshold configurable through helm value, keeping the current default of 125 when not specified.

PR merged in cluster chart, so it will be available to configure in new versions of cluster-aws.
Eventually all providers will be based on the cluster chart, so will get the change.
In the meantime, if there is urgency for a specific provider, a specific change can be made on the provider chart (e.g., cluster-azure).


VehicleStateCommand is still used in simple_planning_simulator, which is a deprecated message

We have to replace VehicleStateCommand with GearCommand.

resolved by #217.


Fix the wrong formula to calculate the total number of unique entities supported in the anomaly detection plugin

Fix the wrong formula to calculate the total number of unique entities supported in the anomaly detection plugin.
Description
Fix the wrong formula to calculate the number of unique entities supported by the anomaly detection plugin. There is no need to multiply by 10^9.
Issues Resolved
No issue
Checklist

[x] By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@baonq-me What release versions does this change apply to?

Hi sean-zheng-amazon , can you please review this contribution from a technical standpoint? Thanks!

@sean-zheng-amazon Please verify this change is technically accurate. Thanks.

Tagging @kaituo for the tech review. Thanks!


Enhancing custom fields of type select to be exported correctly to excel

Enhancing Custom fields of type select to be exported as part of excel exports. This allows for exporting human readable values for custom select fields. The feature was lost after refactoring done a year back. Was previously supported through extensions when Export to Excel button was available.
Tried adding only an extension but the initialization of the PhabricatorSelectExportField needs a reference to the PhabricatorStandardCustomField object to get options from the custom select field. :tada: :tada: 🎉 🎉

This is building on top of https://secure.phabricator.com/D18954 to allow export for custom select fields.

https://secure.phabricator.com/book/phabcontrib/article/contributing_code/#no-pull-requests

Created a discourse question. Will wait for the task to be created to proceed with the commit if needed through arcanist.
Throwing the links here for reference if anyone lands here
Orginal tasks and comment
Discourse question


Add ODIN SDK

SteamDB app page links to a few games using this

https://steamdb.info/app/2479810/

Brief explanation of the change
ODIN is a cross-platform SDK engineered to seamlessly integrate real-time voice chat into multiplayer games, applications, and websites. This PR allows finding its files.
php tests/GenerateTestStrings.php was used to generate the test file.

After running changed rules in this pull request (this bot only tests rules.ini changes):
Changed technologies: SDK.ODIN
These apps now match: (18)<PHONE_NUMBER>70<PHONE_NUMBER>860 1480080 1601920 1890650 1957780 2003160 2009460 2018820 2077180 2195750 2227830 2331150 2437390 2479810 2651270
Please confirm that all these changed apps are correct.

After running changed rules in this pull request (this bot only tests rules.ini changes):
Changed technologies: SDK.ODIN
These apps now match: (18)<PHONE_NUMBER>70<PHONE_NUMBER>860 1480080 1601920 1890650 1957780 2003160 2009460 2018820 2077180 2195750 2227830 2331150 2437390 2479810 2651270
Please confirm that all these changed apps are correct.

Confirmed! 😇

Thanks for the feedback! I've removed the macOS libraries from the pattern as suggested by @Lifeismana, updated the test file and added some non matching tests.

Looks good to me, thank you!

Any idea when this will go live?


Please add support for Physical Drives

The filter on "input" file discards physical drives.
https://stackoverflow.com/questions/2108313/how-to-access-specific-raw-data-on-disk-from-java
Additionally some indirection/buffering would need to be added to FileSeeker.kt so that when it reads from a HD it reads entire sectors at a time (limitation of java.io.RandomAccessFile when dealing with physical drives).
I'm suggesting this because the drive I'm interested in is a 4TB usb disk and I'm not keen on buying another drive just so I can first backup it up so that I can run this tool.

Unfortunately I don't have much spare time to maintain this project anymore. Feel free to create a PR though

~_~ I may have spent too many hours trying to learn Kotlin and getting things to build. I did eventually get it to build and played around with it.
Things to know: Not everything is the same for external drives/different models. The file names are different. Additionally, the working block size is adjusted so that the number of blocks can fit into a 32 bit integer, the block size goes from 512 to 4096. This imposes a theoretical max drive size of 16 TB, but good luck using all that space since there is a 2000 titles. BTW, you can download the FW, so there is always the possibility of reverse engineering it. Back on topic, adding support for 4k blocks to the Kotlin code is Annoying. Doable but annoying. I kinda gave up, too much structure was being thrown at something I was pretty sure could be done in many fewer lines of code. So I wrote myself a python script. It doesn't handle MPG extraction yet but it does dump all* the files.
Anyway, turns out I didn't need to recover my data after all, so I've stopped working on this.

For the next person trying to make sense of the layout and structure, here is some code and comments I wrote.
In the script I'm abusing the fact that python buffers everything in 4k chunks. It does file reads in 4k chunks. When using the windows PhysicalDrive# interface, reads must be done in increments of the drives block size. If you need to seek to a position that isn't block aligned and in the current buffer, you may need to call BlockSeek (which handles the double seeking for you). I don't use it because I'm doing block aligned seeking or inter block seeking.
The next step is to reverse engineer the TI000_0#.IFO files. BTW the numbered files indicate active and backup, this way if you loose power during a record the filesystem isn't foobar. I'm pretty sure you don't need to worry about the MPG_SEG#.DAT files.+
I have no idea about the first 128 bytes of FB000_00.LST except for the first three fields (number of blocks, free blocks and allocated blocks). No idea what the deal is with the 0x2E.
import os
import sys
import errno

DEFAULT_SECTOR_SIZE = 512
blockSize = None
directory = "C:\\temp\\found\\"

#TI000_01.IFO & TI000_02.IFO
# file contains a header of 0x1F48 bytes?
# the two files are nearly identical
# first 4byte looks like a size or count
# second 4byte is the last value in the allocated portion of the header
# might be describing some sort of tree?
# data section after the header has Date/Times in it as ascii strings, this is the title name.
# each macro data block is 314 bytes
# no numerological analysis has been attempted yet
# The header is mostly pointers/indexes.

#VBI_DATA.DAT
# some sort of tree? very overkill
# 0x40 bytes at 0x0000
# 0x30 bytes at 0x1000
# 0x05 bytes at 0x2000
# no numerological analysis has been atttempted yet

#MPG_SEG1.DAT & MPG_SEG2.DAT
# Some sort of space allocation table.
# The file is too small. The blocks being allocated would be huge.
# There do appear to be null gaps in the AV001_00.MPG so they may relate.

#Empty Files:
# FONT_DAT.DAT
# DGT_INFO.DAT
# CM__INFO.DAT
# BU_LOG_D.DAT
# BU_DVDFS.DAT

def main():
    #Open it! Hope you have admin because it won't open if you don't!
    disk = open('\\\\.\\PhysicalDrive1', 'rb')
    #Is it one of our drives?
    if not has(disk, b'HDD REMAIN'):
        print("Not sure this is one of our drives!")
        exit(1)

    global blockSize
    #Now lets determine the block size
    #In an ideal world block == sector size but we don't live in that world.
    #They decided to make is so the number of blocks always fits in a 32 bit integer.
    for x in range(0, 5):    #512, 1024, 2048, 4096, 8192, 16384
        blockSize = DEFAULT_SECTOR_SIZE * (2 ** x)
        disk.seek(blockSize)
        disk.seek(16, 1)
        if has(disk, b'HDDFs 00.07 '):
            break
    else:
        print("Could not determine block size!")
        exit(2)

    print("Block size is: " + str(blockSize))
    print("Drive size is at most " + str(blockSize * 0x100000000) )

    #seek to the start of the file system!
    disk.seek(blockSize * 2)
    numberOfBlocks = readInt(disk)
    allocatedBlocks = readInt(disk)
    freeBlocks = readInt(disk)

    #assume the table is only one block wide.
    FB000_00_end = blockSize * 3
    files = []

    #seek to the start of the table
    i = blockSize * 2 + 0x80
    while i < FB000_00_end:
        disk.seek(i)
        firstBlock = readInt(disk)
        sizeInBlocks = readInt(disk)
        if firstBlock != 0:
            disk.seek(18, 1)#I know nothing about these fields
            nature = readString(disk, 5)
            name = readString(disk, 12)
            print(name + " " + nature + "\t" + str(firstBlock) + "\t" + str(sizeInBlocks) )
            files.append(FileDescriptor(sizeInBlocks, firstBlock, name, nature))
            if name == "FB000_00.LST":
                FB000_00_end = (sizeInBlocks + firstBlock) * blockSize
        i+= 0x40

    for fd in files:
        #do something smarter, like with a loop and do it in chunks.
        if fd.size < 200 * 1024 * 1024 :
            MakeDir(directory + fd.directory)
            ff = open(directory + fd.path, "wb")
            fd.seek(disk)
            ff.write(disk.read(fd.size))
            ff.close()

    disk.close()

def MakeDir(path):
    try:
        os.makedirs(path)
    except OSError as e:
        if e.errno != errno.EEXIST:
            raise

def BlockSeek(disk, offset):
    diff = offset & (blockSize - 1)
    disk.seek(offset - diff, 0)
    if diff != 0:
        disk.seek(diff, 1)

class FileDescriptor:
    def __init__(self, sizeInBlocks, firstBlock, name, nature):
        super().__init__()
        self.sizeInBlocks = sizeInBlocks
        self.firstBlock = firstBlock
        self.name = name
        self.nature = nature
        self.size = sizeInBlocks * blockSize
        self.directory = (nature + "\\") if len(nature) > 0 else ""
        self.path = self.directory + name
    def read(self, disk):
        disk.seek(self.firstBlock * blockSize, 0)
        return disk.read(sizeInBlocks * blockSize)
    def seek(self, disk, offset = 0):
        BlockSeek(disk, self.firstBlock * blockSize + offset)

def readString(disk, length) :
    data = disk.read(length)
    for i in range(0, length - 1):
        if data[i] == 0:
            return data[0:i].decode(encoding="ascii")
    return data.decode(encoding="ascii")

def readInt(disk) :
    return int.from_bytes(disk.read(4), byteorder='little')

def has(disk, data) :
    return disk.read(len(data)) == data

if __name__ == '__main__':
    main()


fixed deployed app link

The link to the deployed page was not correct so I have fixed it :)

Not sure how that link got changed, it was working in the interim README file I first created 😒


Update 3rd party deps

Trello card:
npm i node-elm-compiler
Description

Update 3rd party deps
Vulnerabilities remain - leaving card open

@neontribe/sea-map

Okies, I guess the patch update didn't affect our formatting!

Nope


Http1 protocol not need enable woker pool

The New Feature
HTTP1.x 的协议规范了，它是一个 ping pong 模式，所以没必要使用协程池，这样还可以减少协程数量和协程切换，还能减少锁的使用
https://github.com/mosn/mosn/blob/master/pkg/stream/http/stream.go#L161
Your scenes
Describe your use scenes (why need this feature).
Your advice
Describe the advice or solution of this new feature.
Environment

MOSN Version

@nejisama @taoyuanyuan 你们觉得呢？

是的哈，确实入池，不过我们之前测过，性能提升不明显，然后怕有其他坑，就一直没动他，你可以测测看

比如其中有个点就是，如果有conn断链事件，其实是不能及时感知的，因为read协程在执行proxy，可能卡在等待后端响应了。

比如其中有个点就是，如果有conn断链事件，其实是不能及时感知的，因为read协程在执行proxy，可能卡在等待后端响应了。

因为已经断开连接了，不能及时响应了，对于被代理的 Http1 客户端来说应该没啥影响把
并且应该也不影响其他的请求把，可能还有我没想到的其他场景

是的哈，确实入池，不过我们之前测过，性能提升不明显，然后怕有其他坑，就一直没动他，你可以测测看

我也遇到了坑，就是：
如果我只把这个地方改成 false https://github.com/mosn/mosn/blob/master/pkg/stream/http/stream.go#L161
我在用 wrk 工具压测的时候，协程就会一直阻塞住，然后经过我 debug 发现是阻塞在了：
https://github.com/mosn/mosn/blob/master/pkg/stream/http/stream.go#L582
但是我分析了下代码，发现在这个地方，会想 channel s.responseDoneChan 中写入一个值：
https://github.com/mosn/mosn/blob/master/pkg/stream/http/stream.go#L853
但是上面的那个地方会被阻塞住，就有点想不通。
不过只要把这个 等待的 channel s.responseDoneChan 删除就好了，经过我本在低压测，确实看不出来有什么提升
我想也可能是因为我的压测场景不能做到很极致造成的，比如说压测 连接数很多，一个吞吐很大等等

并且应该也不影响其他的请求把，可能还有我没想到的其他场景

不影响其他请求哈，就是资源被占用了，本来是可以提前释放的，就是有不少细节需要处理。

并且应该也不影响其他的请求把，可能还有我没想到的其他场景

不影响其他请求哈，就是资源被占用了，本来是可以提前释放的，就是有不少细节需要处理。

虽然不能特别快的响应  断连 的这个时间，但是也是很快的把，在这里会处理  断连 事件
https://github.com/mosn/mosn/blob/master/pkg/proxy/proxy.go#L218
我感觉 断连 毕竟是少数情况下才会发生，所以资源占用我觉得是可以接受的

看起不应该阻塞哟 看chan有1的缓存呢
确实一般场景的话看不出来明显的优化，只能看看下高并发场景，大连接数场景啥的

看起不应该阻塞哟 看chan有1的缓存呢

是呀，但是确实就阻塞住了，而且是每次必现，你可以用 wrk 复现下
命令如下：
$ wrk -t1 -c5 -d30s --latency http://<IP_ADDRESS>:2046/

我在用 wrk 工具压测的时候，协程就会一直阻塞住，然后经过我 debug 发现是阻塞在了：

是压一会就挂，还是一个请求都不行？

wrk 结果：
wrk -t1 -c1 -d30s --latency http://<IP_ADDRESS>:2046/
Running 30s test @ http://<IP_ADDRESS>:2046/
  1 threads and 1 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     5.59ms    0.00us   5.59ms  100.00%
    Req/Sec    10.00      0.00    10.00    100.00%
  Latency Distribution
     50%    5.59ms
     75%    5.59ms
     90%    5.59ms
     99%    5.59ms
  1 requests in 30.01s, 480.00B read
Requests/sec:      0.03
Transfer/sec:      15.99B

mosn 不会挂，wrk 也不会挂
而是一开始压测，mosn 似乎就阻塞住了，好像是只能有一个请求过去，第二个请求就在 mosn 中阻塞住了

mosn debug 日志
2022-01-21 17:25:54,581 [INFO] register a new handler maker, name is default, is default: true
2022-01-21 17:25:54,602 [INFO] [admin server] [register api] register a new api /server_info
2022-01-21 17:25:54,602 [INFO] [config] processor added to configParsedCBMaps
2022-01-21 17:25:54,611 [INFO] [network] [ register pool factory] register protocol: Http1 factory
2022-01-21 17:25:54,611 [INFO] [network] [ register pool factory] register protocol: Http2 factory
2022-01-21 17:25:54,618 [INFO] [mosn start] create an empty mosn structure
2022-01-21 17:25:54,618 [INFO] [stagemanager] state changed to 1
2022-01-21 17:25:54,619 [INFO] [network] [ register pool factory] register protocol: bolt factory
2022-01-21 17:25:54,619 [INFO] [network] [ register pool factory] register protocol: boltv2 factory
2022-01-21 17:25:54,619 [INFO] [network] [ register pool factory] register protocol: dubbo factory
2022-01-21 17:25:54,619 [INFO] [network] [ register pool factory] register protocol: dubbo-thrift factory
2022-01-21 17:25:54,619 [INFO] [network] [ register pool factory] register protocol: tars factory
2022-01-21 17:25:54,619 [INFO] [mosn] [start] xds service type must be sidecar or router
2022-01-21 17:25:54,619 [INFO] load config from :  ./examples/codes/http-sample/server_config.json
2022-01-21 17:25:54,621 [INFO] parameters parsed stage cost: 2.377807ms
2022-01-21 17:25:54,621 [INFO] [stagemanager] state changed to 2
2022-01-21 17:25:54,621 [INFO] [admin store] [add service] add server pprof
2022-01-21 17:25:54,621 [INFO] [mosn] [init tracing] disable tracing
2022-01-21 17:25:54,621 [INFO] [mosn] [NewMosn] new mosn created
2022-01-21 17:25:54,622 [INFO] [mosn start] init the members of the mosn
2022-01-21 17:25:54,622 [INFO] [mosn start] mosn init cluster structures
2022-01-21 17:25:54,622 [INFO] [admin store] [start service] start service pprof on [::]:8991
2022-01-21 17:25:54,622 [INFO] [cluster] [cluster manager] [AddOrUpdatePrimaryCluster] cluster serverCluster updated
2022-01-21 17:25:54,622 [INFO] [upstream] [host set] update host, final host total: 1
2022-01-21 17:25:54,622 [INFO] [cluster] [primaryCluster] [UpdateHosts] cluster serverCluster update hosts: 1
2022-01-21 17:25:54,622 [INFO] [mosn start] mosn init server structures
2022-01-21 17:25:54,622 [DEBUG] [server] [init] add server conn handler, server name =
2022-01-21 17:25:54,622 [INFO] parsing listen config:tcp
2022-01-21 17:25:54,622 [WARN] [streamfilter] createStreamFilterFactoryFromConfig return nil factories
2022-01-21 17:25:54,622 [INFO] [streamfilter] AddOrUpdateStreamFilterConfig add filter chain key: serverListener
2022-01-21 17:25:54,623 [DEBUG] [config] AddOrUpdateNetworkFilterFactories store network filter factories, name: serverListener
2022-01-21 17:25:54,623 [INFO] [server] [conn handler] [add listener] add listener: <IP_ADDRESS>:2046
2022-01-21 17:25:54,623 [INFO] init stage cost: 1.675108ms
2022-01-21 17:25:54,623 [INFO] [router] [virtualhost] [addRouteBase] add a new route rule
2022-01-21 17:25:54,623 [INFO] [mosn start] mosn start xds client
2022-01-21 17:25:54,623 [INFO] [router] [routers_manager] [AddOrUpdateRouters] add router: server_router
2022-01-21 17:25:54,623 [ERROR] start xds failed: null point exception
2022-01-21 17:25:54,623 [INFO] [stagemanager] state changed to 3
2022-01-21 17:25:54,623 [WARN] [feature gate] feature MultiTenantMode is not enabled
2022-01-21 17:25:54,623 [ERROR] StaticResources is null
2022-01-21 17:25:54,623 [WARN] [feature gate] feature auto_config is not enabled
2022-01-21 17:25:54,623 [WARN] [feature gate] feature XdsMtlsEnable is not enabled
2022-01-21 17:25:54,623 [INFO] [stagemanager] state changed to 4
2022-01-21 17:25:54,623 [WARN] [feature gate] feature PayLoadLimitEnable is not enabled
2022-01-21 17:25:54,623 [INFO] [admin store] [add service] add server Mosn Admin Server
2022-01-21 17:25:54,623 [INFO] [mosn start] mosn parse extend config
2022-01-21 17:25:54,623 [INFO] [stagemanager] state changed to 5
2022-01-21 17:25:54,623 [INFO] prepare start stage cost: 38.902µs
2022-01-21 17:25:54,623 [INFO] [stagemanager] state changed to 6
2022-01-21 17:25:54,623 [INFO] [mosn start] mosn start server
2022-01-21 17:25:54,623 [INFO] [mosn start] mosn transfer connections
2022-01-21 17:25:54,623 [INFO] [mosn start] mosn clean upgrade datas
2022-01-21 17:25:54,623 [INFO] start stage cost: 85.524µs
2022-01-21 17:25:54,623 [INFO] after start stage cost: 2.548µs
2022-01-21 17:25:54,623 [INFO] [admin store] [start service] start service Mosn Admin Server on [::]:34902
2022-01-21 17:26:07,347 [DEBUG] new idlechecker: maxIdleCount:6, conn:2
2022-01-21 17:26:07,347 [DEBUG] [2,-] new http server stream connection, stream config: {8192 0}
2022-01-21 17:26:07,347 [DEBUG] [server] [listener] accept connection from <IP_ADDRESS>:2046, condId= 2, remote addr:<IP_ADDRESS>:57368
2022-01-21 17:26:07,347 [DEBUG] [network] [read loop] Error on read. Connection = 2, Local Address = <IP_ADDRESS>:2046, Remote Address = <IP_ADDRESS>:57368, err = EOF
2022-01-21 17:26:07,347 [DEBUG] [network] [close connection] Close TCP Conn, Remote Address is = <IP_ADDRESS>:57368, eventType is = RemoteClose
2022-01-21 17:26:07,347 [DEBUG] [network] [close connection] Close connection 2, event RemoteClose, type NoFlush
2022-01-21 17:26:07,347 [DEBUG] new idlechecker: maxIdleCount:6, conn:5
2022-01-21 17:26:07,347 [DEBUG] new idlechecker: maxIdleCount:6, conn:4
2022-01-21 17:26:07,347 [DEBUG] new idlechecker: maxIdleCount:6, conn:3
2022-01-21 17:26:07,347 [DEBUG] new idlechecker: maxIdleCount:6, conn:6
2022-01-21 17:26:07,347 [DEBUG] new idlechecker: maxIdleCount:6, conn:7
2022-01-21 17:26:07,347 [DEBUG] [6,-] new http server stream connection, stream config: {8192 0}
2022-01-21 17:26:07,347 [DEBUG] [5,-] new http server stream connection, stream config: {8192 0}
2022-01-21 17:26:07,347 [DEBUG] [4,-] new http server stream connection, stream config: {8192 0}
2022-01-21 17:26:07,347 [DEBUG] [7,-] new http server stream connection, stream config: {8192 0}
2022-01-21 17:26:07,347 [DEBUG] [server] [listener] accept connection from <IP_ADDRESS>:2046, condId= 6, remote addr:<IP_ADDRESS>:57372
2022-01-21 17:26:07,347 [DEBUG] [server] [listener] accept connection from <IP_ADDRESS>:2046, condId= 7, remote addr:<IP_ADDRESS>:57373
2022-01-21 17:26:07,347 [DEBUG] [3,-] new http server stream connection, stream config: {8192 0}
2022-01-21 17:26:07,347 [DEBUG] [server] [listener] accept connection from <IP_ADDRESS>:2046, condId= 5, remote addr:<IP_ADDRESS>:57370
2022-01-21 17:26:07,347 [DEBUG] [server] [listener] accept connection from <IP_ADDRESS>:2046, condId= 3, remote addr:<IP_ADDRESS>:57369
2022-01-21 17:26:07,347 [DEBUG] [server] [listener] accept connection from <IP_ADDRESS>:2046, condId= 4, remote addr:<IP_ADDRESS>:57371
2022-01-21 17:26:07,347 [DEBUG] [6,0a00bf9e1642757167347100158679] [stream] [http] new stream detect, requestId = 1
2022-01-21 17:26:07,347 [DEBUG] [5,0a00bf9e1642757167347100258679] [stream] [http] new stream detect, requestId = 2
2022-01-21 17:26:07,347 [DEBUG] [3,0a00bf9e1642757167347100358679] [stream] [http] new stream detect, requestId = 3
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] new stream, proxyId = 2 , requestId =2, oneway=false
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] new stream, proxyId = 1 , requestId =3, oneway=false
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [stream] [http] new stream detect, requestId = 4
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [stream] [http] new stream detect, requestId = 5
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] OnReceive headers:GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

, data:<nil>, trailers:<nil>
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] OnReceive headers:GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

, data:<nil>, trailers:<nil>
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] enter phase InitPhase[0], proxyId = 2
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] enter phase InitPhase[0], proxyId = 1
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] enter phase DownFilter[1], proxyId = 2
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] enter phase DownFilter[1], proxyId = 1
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] new stream, proxyId = 4 , requestId =4, oneway=false
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] enter phase MatchRoute[2], proxyId = 2
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] enter phase MatchRoute[2], proxyId = 1
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] new stream, proxyId = 5 , requestId =5, oneway=false
2022-01-21 17:26:07,348 [DEBUG] [router] [routers] [MatchRoute] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [router] [routers] [findVirtualHost] found default virtual host only
2022-01-21 17:26:07,348 [DEBUG] [router] [routers] [MatchRoute] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] new stream, proxyId = 3 , requestId =1, oneway=false
2022-01-21 17:26:07,348 [DEBUG] [router] [config utility] [try match http header] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [router] [routers] [findVirtualHost] found default virtual host only
2022-01-21 17:26:07,348 [DEBUG] [router] [config utility] [try match header] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [router] [config utility] [try match http header] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [router] [config utility] [try match header] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] OnReceive headers:GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

, data:<nil>, trailers:<nil>
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] enter phase InitPhase[0], proxyId = 4
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [router] [DefaultMakeHandler] [MatchRoute] matched a route: &{0xc0007bf290 /}
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [router] [DefaultMakeHandler] [MatchRoute] matched a route: &{0xc0007bf290 /}
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] enter phase DownFilter[1], proxyId = 4
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] enter phase MatchRoute[2], proxyId = 4
2022-01-21 17:26:07,348 [DEBUG] [router] [routers] [MatchRoute] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] enter phase DownFilterAfterRoute[3], proxyId = 1
2022-01-21 17:26:07,348 [DEBUG] [router] [routers] [findVirtualHost] found default virtual host only
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] enter phase DownFilterAfterRoute[3], proxyId = 2
2022-01-21 17:26:07,348 [DEBUG] [router] [config utility] [try match http header] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [router] [config utility] [try match header] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [router] [DefaultMakeHandler] [MatchRoute] matched a route: &{0xc0007bf290 /}
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] enter phase ChooseHost[4], proxyId = 1
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] OnReceive headers:GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

, data:<nil>, trailers:<nil>
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] enter phase ChooseHost[4], proxyId = 2
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] enter phase DownFilterAfterRoute[3], proxyId = 4
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] enter phase InitPhase[0], proxyId = 5
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] enter phase ChooseHost[4], proxyId = 4
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] enter phase DownFilter[1], proxyId = 5
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] route match result:&{BaseHTTPRouteRule:0xc0007bf290 prefix:/}, clusterName=serverCluster
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] enter phase MatchRoute[2], proxyId = 5
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] route match result:&{BaseHTTPRouteRule:0xc0007bf290 prefix:/}, clusterName=serverCluster
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] route match result:&{BaseHTTPRouteRule:0xc0007bf290 prefix:/}, clusterName=serverCluster
2022-01-21 17:26:07,348 [DEBUG] [router] [routers] [MatchRoute] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] OnReceive headers:GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

, data:<nil>, trailers:<nil>
2022-01-21 17:26:07,348 [DEBUG] [router] [routers] [findVirtualHost] found default virtual host only
2022-01-21 17:26:07,348 [DEBUG] [router] [config utility] [try match http header] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [router] [config utility] [try match header] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [router] [DefaultMakeHandler] [MatchRoute] matched a route: &{0xc0007bf290 /}
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] enter phase InitPhase[0], proxyId = 3
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] enter phase DownFilterAfterRoute[3], proxyId = 5
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] enter phase ChooseHost[4], proxyId = 5
2022-01-21 17:26:07,348 [DEBUG] [upstream] [cluster manager] clusterSnapshot.loadbalancer.ChooseHost result is <IP_ADDRESS>:8080, cluster name = serverCluster
2022-01-21 17:26:07,348 [DEBUG] [upstream] [cluster manager] clusterSnapshot.loadbalancer.ChooseHost result is <IP_ADDRESS>:8080, cluster name = serverCluster
2022-01-21 17:26:07,348 [DEBUG] [upstream] [cluster manager] clusterSnapshot.loadbalancer.ChooseHost result is <IP_ADDRESS>:8080, cluster name = serverCluster
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] enter phase DownFilter[1], proxyId = 3
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] enter phase MatchRoute[2], proxyId = 3
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] route match result:&{BaseHTTPRouteRule:0xc0007bf290 prefix:/}, clusterName=serverCluster
2022-01-21 17:26:07,348 [DEBUG] [router] [routers] [MatchRoute] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [router] [routers] [findVirtualHost] found default virtual host only
2022-01-21 17:26:07,348 [DEBUG] [router] [config utility] [try match http header] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [upstream] [cluster manager] clusterSnapshot.loadbalancer.ChooseHost result is <IP_ADDRESS>:8080, cluster name = serverCluster
2022-01-21 17:26:07,348 [DEBUG] [router] [config utility] [try match header] GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [router] [DefaultMakeHandler] [MatchRoute] matched a route: &{0xc0007bf290 /}
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] enter phase DownFilterAfterRoute[3], proxyId = 3
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] timeout info: {GlobalTimeout:1m0s TryTimeout:0s}
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] enter phase ChooseHost[4], proxyId = 3
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] timeout info: {GlobalTimeout:1m0s TryTimeout:0s}
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] timeout info: {GlobalTimeout:1m0s TryTimeout:0s}
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] enter phase DownFilterAfterChooseHost[5], proxyId = 4
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] enter phase DownFilterAfterChooseHost[5], proxyId = 5
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] route match result:&{BaseHTTPRouteRule:0xc0007bf290 prefix:/}, clusterName=serverCluster
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] enter phase DownRecvHeader[6], proxyId = 4
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] enter phase DownRecvHeader[6], proxyId = 5
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] enter phase DownFilterAfterChooseHost[5], proxyId = 2
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [upstream] append headers: GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [upstream] [cluster manager] clusterSnapshot.loadbalancer.ChooseHost result is <IP_ADDRESS>:8080, cluster name = serverCluster
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [upstream] append headers: GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] timeout info: {GlobalTimeout:1m0s TryTimeout:0s}
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] enter phase DownFilterAfterChooseHost[5], proxyId = 1
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] enter phase DownRecvHeader[6], proxyId = 2
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] enter phase DownRecvHeader[6], proxyId = 1
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [upstream] append headers: GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [upstream] append headers: GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] timeout info: {GlobalTimeout:1m0s TryTimeout:0s}
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] enter phase DownFilterAfterChooseHost[5], proxyId = 3
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] enter phase DownRecvHeader[6], proxyId = 3
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [upstream] append headers: GET / HTTP/1.1
Host: <IP_ADDRESS>:2046
Content-Length: 0

2022-01-21 17:26:07,348 [DEBUG] [network] [client connection connect] connect raw tcp, remote address = <IP_ADDRESS>:8080 ,event = ConnectedFlag, error = <nil>
2022-01-21 17:26:07,348 [DEBUG] client OnEvent ConnectedFlag, connected false
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [upstream] connPool ready, proxyId = 1, host = <IP_ADDRESS>:8080
2022-01-21 17:26:07,348 [DEBUG] [network] [client connection connect] connect raw tcp, remote address = <IP_ADDRESS>:8080 ,event = ConnectedFlag, error = <nil>
2022-01-21 17:26:07,348 [DEBUG] client OnEvent ConnectedFlag, connected false
2022-01-21 17:26:07,348 [DEBUG] [network] [client connection connect] connect raw tcp, remote address = <IP_ADDRESS>:8080 ,event = ConnectedFlag, error = <nil>
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [upstream] connPool ready, proxyId = 4, host = <IP_ADDRESS>:8080
2022-01-21 17:26:07,348 [DEBUG] [network] [client connection connect] connect raw tcp, remote address = <IP_ADDRESS>:8080 ,event = ConnectedFlag, error = <nil>
2022-01-21 17:26:07,348 [DEBUG] client OnEvent ConnectedFlag, connected false
2022-01-21 17:26:07,348 [DEBUG] client OnEvent ConnectedFlag, connected false
2022-01-21 17:26:07,348 [DEBUG] [network] [client connection connect] connect raw tcp, remote address = <IP_ADDRESS>:8080 ,event = ConnectedFlag, error = <nil>
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [upstream] connPool ready, proxyId = 3, host = <IP_ADDRESS>:8080
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [upstream] connPool ready, proxyId = 5, host = <IP_ADDRESS>:8080
2022-01-21 17:26:07,348 [DEBUG] client OnEvent ConnectedFlag, connected false
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [upstream] connPool ready, proxyId = 2, host = <IP_ADDRESS>:8080
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [stream] [http] send client request, requestId = 6
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] start a request timeout timer
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] enter phase WaitNotify[11], proxyId = 1
2022-01-21 17:26:07,348 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] waitNotify begin 0xc000b2a000, proxyId = 1
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [stream] [http] send client request, requestId = 9
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] start a request timeout timer
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] enter phase WaitNotify[11], proxyId = 5
2022-01-21 17:26:07,348 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] waitNotify begin 0xc00082c000, proxyId = 5
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [stream] [http] send client request, requestId = 7
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] start a request timeout timer
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [stream] [http] send client request, requestId = 10
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] enter phase WaitNotify[11], proxyId = 4
2022-01-21 17:26:07,348 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] waitNotify begin 0xc000746000, proxyId = 4
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] start a request timeout timer
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [stream] [http] send client request, requestId = 8
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] start a request timeout timer
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] enter phase WaitNotify[11], proxyId = 2
2022-01-21 17:26:07,348 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] waitNotify begin 0xc000a9a000, proxyId = 2
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] enter phase WaitNotify[11], proxyId = 3
2022-01-21 17:26:07,348 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] waitNotify begin 0xc0007de000, proxyId = 3
2022-01-21 17:26:07,349 [DEBUG] [5,0a00bf9e1642757167347100258679] [stream] [http] receive response, requestId = 10
2022-01-21 17:26:07,349 [DEBUG] [7,0a00bf9e1642757167348100458679] [stream] [http] receive response, requestId = 7
2022-01-21 17:26:07,349 [DEBUG] [4,0a00bf9e1642757167348100558679] [stream] [http] receive response, requestId = 9
2022-01-21 17:26:07,349 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [upstream] OnReceive headers: HTTP/1.1 200 OK
Date: Fri, 21 Jan 2022 09:26:07 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 29

, data:
Headers:
Content-Length: 0
, trailers: <nil>
2022-01-21 17:26:07,349 [DEBUG] [3,0a00bf9e1642757167347100358679] [stream] [http] receive response, requestId = 6
2022-01-21 17:26:07,349 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [upstream] OnReceive headers: HTTP/1.1 200 OK
Date: Fri, 21 Jan 2022 09:26:07 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 29

, data:
Headers:
Content-Length: 0
, trailers: <nil>
2022-01-21 17:26:07,349 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] OnReceive send downstream response HTTP/1.1 200 OK
Date: Fri, 21 Jan 2022 09:26:07 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 29

2022-01-21 17:26:07,349 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] enter phase UpFilter[12], proxyId = 2
2022-01-21 17:26:07,349 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] OnReceive send downstream response HTTP/1.1 200 OK
Date: Fri, 21 Jan 2022 09:26:07 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 29

2022-01-21 17:26:07,349 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] enter phase UpFilter[12], proxyId = 5
2022-01-21 17:26:07,349 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] enter phase UpRecvHeader[13], proxyId = 5
2022-01-21 17:26:07,349 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] enter phase UpRecvData[14], proxyId = 5
2022-01-21 17:26:07,349 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] enter phase UpRecvHeader[13], proxyId = 2
2022-01-21 17:26:07,349 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] enter phase UpRecvData[14], proxyId = 2
2022-01-21 17:26:07,349 [DEBUG] update listener write bytes: 146
2022-01-21 17:26:07,349 [DEBUG] [6,0a00bf9e1642757167347100158679] [stream] [http] receive response, requestId = 8
2022-01-21 17:26:07,349 [DEBUG] [5,0a00bf9e1642757167347100258679] [stream] [http] send server response, requestId = 2
2022-01-21 17:26:07,349 [DEBUG] update listener write bytes: 146
2022-01-21 17:26:07,349 [DEBUG] [4,0a00bf9e1642757167348100558679] [stream] [http] send server response, requestId = 5
2022-01-21 17:26:07,349 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [upstream] OnReceive headers: HTTP/1.1 200 OK
Date: Fri, 21 Jan 2022 09:26:07 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 29

, data:
Headers:
Content-Length: 0
, trailers: <nil>
2022-01-21 17:26:07,349 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] OnReceive send downstream response HTTP/1.1 200 OK
Date: Fri, 21 Jan 2022 09:26:07 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 29

2022-01-21 17:26:07,349 [DEBUG] [5,0a00bf9e1642757167347100258679] [proxy] [downstream] giveStream 0xc000a9a000 &{ID:2 proxy:0xc0003d0100 route:0xc0007dd9a0 cluster:0xc000792280 element:<nil> bufferLimit:0 timeout:{GlobalTimeout:60000000000 TryTimeout:0} retryState:0xc000a18050 requestInfo:0xc000a9a210 responseSender:0xc000a94000 upstreamRequest:0xc000a9a188 perRetryTimer:<nil> responseTimer:<nil> downstreamReqHeaders:{RequestHeader:0xc000a94080} downstreamReqDataBuf:<nil> downstreamReqTrailers:<nil> downstreamRespHeaders:{ResponseHeader:0xc000a947a0} downstreamRespDataBuf:0xc00095c480 downstreamRespTrailers:<nil> upstreamResponseReceived:1 downstreamResponseStarted:true downstreamRecvDone:true upstreamRequestSent:true upstreamProcessDone:{_:[] v:{_:[] v:1}} directResponse:false oneway:false notify:0xc000a04300 downstreamReset:0 downstreamCleaned:1 upstreamReset:0 reuseBuffer:1 resetReason:{_:[] v:{Value:{v:<nil>} _:[]}} streamFilterChain:{downStream:<nil> DefaultStreamFilterChainImpl:<nil>} receiverFiltersAgainPhase:0 context:0xc0009ba1a0 tracks:0xc000aa0000 logDone:1 snapshot:0xc0007bec90 phase:14}
2022-01-21 17:26:07,349 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] enter phase UpFilter[12], proxyId = 4
2022-01-21 17:26:07,349 [DEBUG] [4,0a00bf9e1642757167348100558679] [proxy] [downstream] giveStream 0xc00082c000 &{ID:5 proxy:0xc0001abd00 route:0xc0007dd9a0 cluster:0xc000792280 element:<nil> bufferLimit:0 timeout:{GlobalTimeout:60000000000 TryTimeout:0} retryState:0xc000850000 requestInfo:0xc00082c210 responseSender:0xc000816000 upstreamRequest:0xc00082c188 perRetryTimer:<nil> responseTimer:<nil> downstreamReqHeaders:{RequestHeader:0xc000816080} downstreamReqDataBuf:<nil> downstreamReqTrailers:<nil> downstreamRespHeaders:{ResponseHeader:0xc0008167a0} downstreamRespDataBuf:0xc000d04100 downstreamRespTrailers:<nil> upstreamResponseReceived:1 downstreamResponseStarted:true downstreamRecvDone:true upstreamRequestSent:true upstreamProcessDone:{_:[] v:{_:[] v:1}} directResponse:false oneway:false notify:0xc000826060 downstreamReset:0 downstreamCleaned:1 upstreamReset:0 reuseBuffer:1 resetReason:{_:[] v:{Value:{v:<nil>} _:[]}} streamFilterChain:{downStream:<nil> DefaultStreamFilterChainImpl:<nil>} receiverFiltersAgainPhase:0 context:0xc000a3e1a0 tracks:0xc000838000 logDone:1 snapshot:0xc0007bec90 phase:14}
2022-01-21 17:26:07,349 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] enter phase UpRecvHeader[13], proxyId = 4
2022-01-21 17:26:07,349 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] enter phase UpRecvData[14], proxyId = 4
2022-01-21 17:26:07,349 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [upstream] OnReceive headers: HTTP/1.1 200 OK
Date: Fri, 21 Jan 2022 09:26:07 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 29

, data:
Headers:
Content-Length: 0
, trailers: <nil>
2022-01-21 17:26:07,349 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] OnReceive send downstream response HTTP/1.1 200 OK
Date: Fri, 21 Jan 2022 09:26:07 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 29

2022-01-21 17:26:07,349 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] enter phase UpFilter[12], proxyId = 1
2022-01-21 17:26:07,349 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] enter phase UpRecvHeader[13], proxyId = 1
2022-01-21 17:26:07,349 [DEBUG] update listener write bytes: 146
2022-01-21 17:26:07,349 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] enter phase UpRecvData[14], proxyId = 1
2022-01-21 17:26:07,349 [DEBUG] [7,0a00bf9e1642757167348100458679] [stream] [http] send server response, requestId = 4
2022-01-21 17:26:07,349 [DEBUG] update listener write bytes: 146
2022-01-21 17:26:07,349 [DEBUG] [3,0a00bf9e1642757167347100358679] [stream] [http] send server response, requestId = 3
2022-01-21 17:26:07,349 [DEBUG] [7,0a00bf9e1642757167348100458679] [proxy] [downstream] giveStream 0xc000746000 &{ID:4 proxy:0xc000331100 route:0xc0007dd9a0 cluster:0xc000792280 element:<nil> bufferLimit:0 timeout:{GlobalTimeout:60000000000 TryTimeout:0} retryState:0xc000760050 requestInfo:0xc000746210 responseSender:0xc000730000 upstreamRequest:0xc000746188 perRetryTimer:<nil> responseTimer:<nil> downstreamReqHeaders:{RequestHeader:0xc000730080} downstreamReqDataBuf:<nil> downstreamReqTrailers:<nil> downstreamRespHeaders:{ResponseHeader:0xc0007307a0} downstreamRespDataBuf:0xc000c22100 downstreamRespTrailers:<nil> upstreamResponseReceived:1 downstreamResponseStarted:true downstreamRecvDone:true upstreamRequestSent:true upstreamProcessDone:{_:[] v:{_:[] v:1}} directResponse:false oneway:false notify:0xc000740060 downstreamReset:0 downstreamCleaned:1 upstreamReset:0 reuseBuffer:1 resetReason:{_:[] v:{Value:{v:<nil>} _:[]}} streamFilterChain:{downStream:<nil> DefaultStreamFilterChainImpl:<nil>} receiverFiltersAgainPhase:0 context:0xc000962000 tracks:0xc000750000 logDone:1 snapshot:0xc0007bec90 phase:14}
2022-01-21 17:26:07,349 [DEBUG] [3,0a00bf9e1642757167347100358679] [proxy] [downstream] giveStream 0xc000b2a000 &{ID:1 proxy:0xc000b02000 route:0xc0007dd9a0 cluster:0xc000792280 element:<nil> bufferLimit:0 timeout:{GlobalTimeout:60000000000 TryTimeout:0} retryState:0xc000374050 requestInfo:0xc000b2a210 responseSender:0xc000b26000 upstreamRequest:0xc000b2a188 perRetryTimer:<nil> responseTimer:<nil> downstreamReqHeaders:{RequestHeader:0xc000b26080} downstreamReqDataBuf:<nil> downstreamReqTrailers:<nil> downstreamRespHeaders:{ResponseHeader:0xc000b267a0} downstreamRespDataBuf:0xc00036c580 downstreamRespTrailers:<nil> upstreamResponseReceived:1 downstreamResponseStarted:true downstreamRecvDone:true upstreamRequestSent:true upstreamProcessDone:{_:[] v:{_:[] v:1}} directResponse:false oneway:false notify:0xc000368300 downstreamReset:0 downstreamCleaned:1 upstreamReset:0 reuseBuffer:1 resetReason:{_:[] v:{Value:{v:<nil>} _:[]}} streamFilterChain:{downStream:<nil> DefaultStreamFilterChainImpl:<nil>} receiverFiltersAgainPhase:0 context:0xc0003581a0 tracks:0xc000b2e000 logDone:1 snapshot:0xc0007bec90 phase:14}
2022-01-21 17:26:07,349 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [upstream] OnReceive headers: HTTP/1.1 200 OK
Date: Fri, 21 Jan 2022 09:26:07 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 29

, data:
Headers:
Content-Length: 0
, trailers: <nil>
2022-01-21 17:26:07,349 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] OnReceive send downstream response HTTP/1.1 200 OK
Date: Fri, 21 Jan 2022 09:26:07 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 29

2022-01-21 17:26:07,349 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] enter phase UpFilter[12], proxyId = 3
2022-01-21 17:26:07,349 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] enter phase UpRecvHeader[13], proxyId = 3
2022-01-21 17:26:07,349 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] enter phase UpRecvData[14], proxyId = 3
2022-01-21 17:26:07,350 [DEBUG] update listener write bytes: 146
2022-01-21 17:26:07,350 [DEBUG] [6,0a00bf9e1642757167347100158679] [stream] [http] send server response, requestId = 1
2022-01-21 17:26:07,350 [DEBUG] [6,0a00bf9e1642757167347100158679] [proxy] [downstream] giveStream 0xc0007de000 &{ID:3 proxy:0xc00010d900 route:0xc0007dd9a0 cluster:0xc000792280 element:<nil> bufferLimit:0 timeout:{GlobalTimeout:60000000000 TryTimeout:0} retryState:0xc000bc0000 requestInfo:0xc0007de210 responseSender:0xc0003b0d00 upstreamRequest:0xc0007de188 perRetryTimer:<nil> responseTimer:<nil> downstreamReqHeaders:{RequestHeader:0xc0003b0d80} downstreamReqDataBuf:<nil> downstreamReqTrailers:<nil> downstreamRespHeaders:{ResponseHeader:0xc0003b14a0} downstreamRespDataBuf:0xc000d8c000 downstreamRespTrailers:<nil> upstreamResponseReceived:1 downstreamResponseStarted:true downstreamRecvDone:true upstreamRequestSent:true upstreamProcessDone:{_:[] v:{_:[] v:1}} directResponse:false oneway:false notify:0xc0007e2000 downstreamReset:0 downstreamCleaned:1 upstreamReset:0 reuseBuffer:1 resetReason:{_:[] v:{Value:{v:<nil>} _:[]}} streamFilterChain:{downStream:<nil> DefaultStreamFilterChainImpl:<nil>} receiverFiltersAgainPhase:0 context:0xc000c0b6c0 tracks:0xc0007fa000 logDone:1 snapshot:0xc0007bec90 phase:14}

不改workpool 模式也能压来卡死吗？还是必须改workpool

我觉得是不改workpool模式也会卡死，只是不这么容易复现，可以改代码mock下看看

我觉得是不改workpool模式也会卡死，只是不这么容易复现，可以改代码mock下看看

确实会卡死，我试了下，在这个地方加上一个 sleep 基本就是能复现：
https://github.com/mosn/mosn/blob/7ce0de68bcde5c01b44535925162267f6e8208db/pkg/stream/http/stream.go?_pjax=%23js-repo-pjax-container%2C div[itemtype%3D"http%3A%2F%2Fschema.org%2FSoftwareSourceCode"] main%2C [data-pjax-container]#L753
wrk 结果：
wrk -t1 -c5 -d30s --latency http://<IP_ADDRESS>:2046/
Running 30s test @ http://<IP_ADDRESS>:2046/
  1 threads and 5 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   101.48ms    6.13ms 113.18ms   98.98%
    Req/Sec    49.19     10.27    98.00     76.87%
  Latency Distribution
     50%  101.31ms
     75%  102.87ms
     90%  104.38ms
     99%  106.85ms
  1475 requests in 30.05s, 210.30KB read
Requests/sec:     49.08
Transfer/sec:      7.00KB

qps 很低，说明中途被卡死了的

在 http1.1 这种协议下，还能减少协程数量，


Clarify final release stages, DOI bits

I've tweaked the docs here in two ways:

I found the instruction to update the version on the fork's dev a little odd. I never have my fork's dev ahead of the upstream, I just synch with the upstream, make branches and PR to upstream dev. So I've tweaked accordingly, but happy to undo that if I'm the odd one there.
Less controversially, I've re-jigged the final parts about DOI updates, which no longer work. We don't have direct master write, so I'm instructing the user to include the DOI updates with the other post-release tasks, and then ask a core team member to copy the DOI bit to master (we all agree that's not ideal but the best we can do for now).

Thanks @maxulysse


Where can I download the Linux-ARM64 architecture bit libskiaSharp.so file

Is your feature request related to a problem? Please describe.
After publishing the Avalonia project as a Linux-ARM64 architecture, the libskiasharp.so file was missing in the Generated directory
Describe the solution you'd like
I want the project to run on Linux-ARM64
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

What version of Avalonia are you using?

What version of Avalonia are you using?

https://www.nuget.org/api/v2/package/SkiaSharp.NativeAssets.Linux/2.80.2

https://www.nuget.org/api/v2/package/SkiaSharp.NativeAssets.Linux/2.80.2