Valence could use a website

I don't have any webdev experience. Also, I have the valence.rs domain name.
Edit: Here's what I would expect the website to have once finished:

Dedicated page for documentation with a tutorial-like guide (markdown).
FAQ page.
A clean landing page with the Valence logo and links to github, discord, crates.io, etc. It should have a short summary of Valence's goals and capabilities.
A page for announcing releases including patch notes (markdown).
Minimal design. Nothing too flashy.
Uses the valence.rs domain name.
Available in a website directory at the root of the Valence repository. If it would make more sense to be in a separate repo we could discuss that.
Hosted on GitHub for easy edits?

Sources of Inspiration

Minestom: https://minestom.net/
I quite like the simplicity of the landing page. I'm indifferent about the use of gitbook for the docs.
Feather: https://feathermc.org/
This one is a bit bare-bones but it's worth mentioning.
Rocket: https://rocket.rs/
Not Minecraft related, but It's got all the ingredients for a good site.

Hi,
This project is something that I have been actually thinking about but I don't have enough rust expeirience.
I still would like to contribute to this project and since I'm a web dev I could help with this.
You got any particular ideas on your mind?

We could make a Hugo website?
Also your bio website seems down
Can you apply for GitHub sponsors so I can sponsor you?
Also, would you mind creating a valence github organization and moving the project into it?
It would avoid some bus factor we can observe in the rust ecosystem :)

Yea, I was thinking about using hugo or astro. And making an organisation seems a good idea too.

Yea, I was thinking about using hugo or astro.

You can copy paste everything from my website: https://github.com/wdes/website

And making an organisation seems a good idea too.

Yayy
One question, it's not clear why you say it's a framework but in fact you have a runnable server. How is this all built together?

You could say that the word framework in web dev is really stretched. With astro you can make a mostly static site and sprinkle js components wherever you want. This results in low bundle sizes and quick load times.
It supports markdown and MDX. You can even use other frameworks like react and vue.

You could say that the word framework in web dev is really stretched.

Indeed, this is why I think it will confuse some people browsing this Rust project

It is in reality a rust implementation of a java minectaft server with easy "plugin" expansion in mind but it does sound quite long.
On a hero section it would be quite akward.

Also, would you mind creating a valence github organization and moving the project into it? It would avoid some bus factor we can observe in the rust ecosystem :)

Thanks for the suggestion. I've done this now.
I will also move the serde_nbt crate to a separate project under the organization.

Can you apply for GitHub sponsors so I can sponsor you?

I will be applying to GitHub sponsors shortly ❤

Also your bio website seems down

Yeah, it's a placeholder for now. (no webdev experience and all that)

Alright,
we need a repo for the web site, it doesn't need to be public but can, that is not a problem.
We need to choose the framework for it.
Do you plan any dynamic content on the site or only static?

Alright, we need a repo for the web site, it doesn't need to be public but can, that is not a problem.
We need to choose the framework for it. Do you plan any dynamic content on the site or only static?

To use GitHub pages without paying it will need to be public. Static would be a good idea because of how easy the setup will be : basically a CNAME to GitHub.

I mean a free hosting in 2022 is not a problem. We can use vercel/netlify or github pages as you said.
I would use astro as its great at static content and gives us some flexability in the future if we want to do something dynamic/use state frameworks.

@UltimateDoge5 and @williamdes, since we've mainly setttled on a framework choice, do y'all want to continue the development details on Valence's discord?

If you would give me an invite link that would be awesome!

@UltimateDoge5 and @williamdes, since we've mainly setttled on a framework choice, do y'all want to continue the development details on Valence's discord?

Sure, let's continue to discuss on Discord. URL ?

For anyone else, it's on the README: https://discord.gg/8Fqqy9XrYb

I think VitePress would be great for the site as it'd make writing docs dirt easy. https://vitepress.vuejs.org/

Idk, SPA for docs doesn't connect for me. And as I can see its still in alpha. Does it even support SEO?

Idk, SPA for docs doesn't connect for me. And as I can see its still in alpha. Does it even support SEO?

from https://vitepress.vuejs.org/guide/getting-started:

VitePress is currently in alpha status. It is already suitable for out-of-the-box documentation use, but the config and theming API may still change between minor releases.

It's still an SSG so SEO will be great, and it's very lightweight so web vitals score highly. But mainly good DX so writing docs won't be a pain because of framework/tooling.

I think VitePress would be great for the site as it'd make writing docs dirt easy. https://vitepress.vuejs.org/

If we're talking purely about docs, docusaurus might be worth taking a look at.
It basically takes markdown such as this and turns them into a static page like this. (Notice: This is my own project. I really don't want to self-ad, but its the best demo I had on hand)

had a crazy thought.. could make the "website" a valence minecraft server with all the information provided in creative ways in-game. and for a plus have the "real" website run have a wasm compatible minecraft client connected to the server :P

had a crazy thought.. could make the "website" a valence minecraft server with all the information provided in creative ways in-game. and for a plus have the "real" website run have a wasm compatible minecraft client connected to the server :P (more on the marketing side ofc :D docs would probably best in the old fashined way upside_down_face)

That's brilliant!

had a crazy thought.. could make the "website" a valence minecraft server with all the information provided in creative ways in-game. and for a plus have the "real" website run have a wasm compatible minecraft client connected to the server :P (more on the marketing side ofc :D docs would probably best in the old fashined way 🙃)

While I like the idea I feel like it would kinda make accessibility or finding certain pieces of information pretty hard, it would probably give me this vibe of custom scrolling effects. Additionally I think it could kind of fail to show why you should even pick Valence over the default mc server (or bukkit, spigot etc.) which is especially performance. You probably wouldn't be able to simulate like 1000 cows with wasm in your browser especially since hardware acceleration is off by default iirc.

And hardware acceleration being disabled by default for wgpu stuff would be new to me?

That was rather a hard guess sorry for that. Though it would seem a bit weird to me that browsers would allow gpu usage although hardware accel is disabled as the reason people disable it is exactly to not have their gpu used, but again I am not sure how it actually handles it 😅

As the gameclient website would be a showoff addition anyway, moving forward with a hugo website (or sth like that) would be the way to go). We could even only build a docs site for now.

Hey @rj00a let me know if this would be somewhat usable: https://valence-docs.netlify.app/
source: https://github.com/kubo6472/valence-docs

@kubo6472 Hey, thanks for working on this! It looks nice. I've updated this issue with some of my expectations. Let me know what you think.
The website you made in its current state would need some adjustments before I'd be willing to accept it. In particular, the Valence logo repeated three times doesn't look so great. I also think a dark theme by default would look nice. It would need to work well with the logo. Perhaps the banner at the top could be lighter so the logo in the top left doesn't blend in? Just throwing out some ideas.
Can the site be adjusted to have a FAQ page and release notes page as described above?

@rj00a let me know if it looks more okay. I went for some placeholder content. I think it is perfectly possible to host in from a directory and deploy from gh actions (if there's some problem with netlify). All custom content apart from the homepage is 100% markdown, so I think you should be able to work with it, and replace it for something real yourself. Let me know how should I structure the repo for a PR, then. Thanks

@kubo6472 Thanks. You can go ahead and make a PR that adds a website directory at the root of the repo. It should include a README.md describing the steps needed to use it (which commands necessary, etc).
We can make the website live once Valence 0.2.0 is around the corner.

Okay, sure

If you need help to Code a Site i can help

If you need help to Code a Site i can help

#138 feel free to submit PRs to my branch :)


[4pt] Display missions - Lists render

Use useSelector() Redux Hook to select the state slices and render lists of  missions in corresponding routes. i.e.:

// get rockets data from the store
const rockets = useSelector(state => state.rockets);

You can style the whole application "by hand" or you could use React Bootstrap, a UI library that could speed up the process. This is a popular library and working with its components would be good practice.
Render a table with the missions' data (as per design).

https://github.com/oluwatobi-fasasi/react-group-project/pull/31


Breaking changes of version 11.0.0

This issue will document the breaking changes that are planned for 11.0.0
The new major version should not be released without discussing it first, introducing all of our breaking changes at once, major versions give us the opportunity to clean a lot of issues so it should be used to clean up as much as we can, versions such as 7.0.0 and 10.0.0 almost didn't introduce much of breaking changes.
7.0.0 only cleaned some minor code that shouldn't be exposed directly and 10.0.0 introduced due to the project structure refactoring which wasn't a breaking change for many users.
This issue will be updated as we plan. All breaking changes should be planned here instead of discussing them in different issues.

I propose that we should and need to refactor files that contain several classes that are only used internally.
If you want to see what the problem is with this you can take a look at: editor, text_line, text_block, proxy, etc. There are many files of this style that we can perfectly divide into different files (and thus avoid creating files with more than 1000 lines that are not always easy to debug)

Update: I have started working on release/v11, if anything is missing, something that shouldn't be done, improvements or an issue, or suggestions for some breaking changes, I'm open for all suggestions.
This major release aims to address issues requiring breaking changes, along with cleanup and refactoring for better organization. See the issue details.

@EchoEllet Would you be planning for tables in v11?

Would you be planning for tables in v11?

For now, we don't have any plans to, we have deprecated it in #2254 and has been removed in v11 (#2338). We might create a highly experimental package (in a separate repo) with this feature though with our current state it's not production-ready.
We're trying to prioritize existing issues before adding more features to provide more on the surface for more issues and we have agreed on that for now.
@CatHood0
Since the table feature has been removed in the branch release/v11 (#2338), we can create a new package (quill_table_embed or a different name) and publish it as highly experimental in a separate repo. I don't plan to work on it for now though you don't have either, you can only take existing table code from flutter_quill_extensions that was introduced in #1960 so users can use it if they still want to depend on it after 11.0.0. You can create it in FlutterQuill/quill-table or outside of flutter-quill.
It's a minor issue though it requires minimal time too. I can also do it if you prefer.

Since the table feature has been removed in the branch release/v11 (https://github.com/singerdmx/flutter-quill/pull/2338), we can create a new package (quill_table_embed or a different name) and publish it as highly experimental in a separate repo. I don't plan to work on it for now though you don't have either, you can only take existing table code from flutter_quill_extensions that was introduced in https://github.com/singerdmx/flutter-quill/pull/1960 so users can use it if they still want to depend on it after 11.0.0. You can create it in FlutterQuill/quill-table or outside of flutter-quill.

It's a minor issue though it requires minimal time too. I can also do it if you prefer.
I will take care of creating that table, however it will take some time to avoid the same errors that the previous implementation had. Thanks for the suggestion to add the table as a separate package.


NDRS-874 - track allocated and total ram use metrics

Add metrics for allocated/total ram (as reported by jemalloc_ctl)

bors r+


Restore Mobile Authorization

This logic was stripped out of core/mobile prematurely, and we didn't have a replacement API in place to restore functionality to mobile applications. This resulted in some difficult workarounds in mobile-samples. It can be removed again when auth is addressed more comprehensively in 3.2

@mergifyio backport release/3.1.x

Seems like this test is failing MacOS.

Seems like this test is failing MacOS.

This is the third PR I've seen in the past 24 hours with the same test failure (timeout) on macOS.
It's not even doing anything complicated or async, I do not understand how it can take more than 2 seconds.
Anybody able to repro locally on a mac?

@pmconne @skirby1996 I'll look into reproducing this. I can also extend the timeout to 8s, as we've done here.

@pmconne @skirby1996 I'm unable to reproduce this on my mac. Bumping the timeout to 8s.

@DanielToby you'll need to run rush change again.


Need help: Unable to upload files/objects to local Seaweed AWS S3 server

Discussed in https://github.com/chrislusf/seaweedfs/discussions/3017

Originally posted by cskru May  6, 2022
Environement details:
aws cli version: aws-cli/1.23.8 Python/3.6.0 Windows/10 botocore/1.25.8
Seaweed installer that I've used: https://github.com/chrislusf/seaweedfs/releases/download/3.01/windows_amd64.zip
Clients I have tried
AWS Java SDK 2
AWS Java SDK 1
aws cli version 1
aws cli version 2
Getting same error.
===========================
I have started the server using
weed server -s3
I set the configurations this way:
> s3.configure -access_key=test -secret_key=test -user=admin -actions=Read,Write,List,Tagging,Admin -apply
{
  "identities": [
    {
      "name": "admin",
      "credentials": [
        {
          "accessKey": "test",
          "secretKey": "test"
        }
      ],
      "actions": [
        "Read",
        "Write",
        "List",
        "Tagging",
        "Admin"
      ]
    }
  ]
}

I also tried to initialize the server with same static configuration.
All bucket operations go through. make bucket, list, remove, get, etc..
But, uploading a file to S3 is not going through.
> aws --endpoint-url http://localhost:8333 s3 cp sample.txt s3://newbucket

upload failed: .\sample.txt to s3://newbucket/sample.txt An error occurred (InternalError) when calling the PutObject operation (reached max retries: 4): We encountered an internal error, please try again.

Before setting up the above authentication, when I tried to upload file like I've explained above, I got an error that asked me to setup authentication or Seaweedfs S3.
Hence, I followed the wiki to setup auth like I've explained above.
.aws/credentials are properly set and the corresponding env variables are also perfect.
Which is why I am able to perform all operations on bucket like make, remove, list, etc.
Any help is very much appreciated

there are no version info or logs.
Possibly the same issue as https://github.com/chrislusf/seaweedfs/issues/3013
Please use the dev version https://github.com/chrislusf/seaweedfs/releases/tag/dev
or wait for the next release this Sunday.

@chrislusf , thank you for the timely response.
The logs on seaweed server are same as #3013 : dial unix: missing address
On the client it's 500 Internal server error.
I get same message on the server even when I make bucket as well, but that goes through.
Only file related operations are giving 500 (as seen on Java SDK and AWS CLI).
I'll try dev version as you've suggested.

@chrislusf
File upload, download etc is now working with dev exe: https://github.com/chrislusf/seaweedfs/releases/download/dev/weed-20220509-0529-windows-amd64.zip
Thanks for the suggestion.

@chrislusf , now with the dev exe (https://github.com/chrislusf/seaweedfs/releases/download/dev/weed-20220509-0529-windows-amd64.zip) I am facing another issue with presigned urls.
Explanation:
Create an upload presign url - Works
If I try to do a PUT, for the same url, I get the below error:

SignatureDoesNotMatch
The request signature we calculated does not match the signature you provided. Check your key and signing method.
/newbucket/sample.txt
1652075615580054400
sample.txt
newbucket

=============
Tried to generate presigned URL via aws cli, Java SDK 2.
Both give same error.
But If I try to do a GET on presigned URL, that works.
I have also set the signature version, as mentioned in the Seaweed wiki: (https://github.com/chrislusf/seaweedfs/wiki/AWS-CLI-with-SeaweedFS#configuration)
$ aws configure set default.s3.signature_version s3v4

Need to make it reproducible.

please create a separate issue with reproducing steps/code.


BUG: No projects available for Google Season of Docs

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
Description
As of now when we click on Google Season of Docs no project is displayed
Proposed Solution
Extract information from Google Season of Docs project website into JSON file year-wise. Use this JSON data to display different projects on the app.
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

Please assign me this issue.

@ShashankDeepak First, gather all the projects that exist and bring them into this project in JSON format. Then, create another issue where you can display those projects within the project. This will also solve the issue of your points.

@andoriyaprashant Ok will do it


Kickstarter Logo Broken

Seen on https://edent.github.io/SuperTinyIcons/radius.html
Works in Safari. Broken in Chrome and Firefox.

It's because of clipPath. New one should fix this.


Can't compile with rustc 1.3.0-nightly (69ca01256 2015-07-23)

Hi,
I tried to compile this but got this error:
carlopires@carlo-DH67VR:~/rust/lesson4/mio-examples/ping_pong$ cargo run
 Downloading slab v0.1.1
 Downloading mio v0.4.1
   Compiling libc v0.1.8
   Compiling bytes v0.2.10
   Compiling slab v0.1.1
   Compiling bitflags v0.1.1
   Compiling nix v0.3.9
   Compiling winapi v0.1.23
   Compiling log v0.3.1
   Compiling clock_ticks v0.0.5
   Compiling mio v0.4.1
   Compiling pingpong v0.1.0 (file:///home/carlopires/rust/lesson4/mio-examples/ping_pong)
src/main.rs:7:18: 7:22 error: unresolved import `bytes::Take`. There is no `Take` in `bytes` [E0432]
src/main.rs:7 use bytes::{Buf, Take};
                               ^~~~
error: aborting due to previous error
Could not compile `pingpong`.

Rust version:
carlopires@carlo-DH67VR:~/rust/lesson4/mio-examples/ping_pong$ rustc --version
rustc 1.3.0-nightly (69ca01256 2015-07-23)

Thanks for the report. I got some feedback that it would be better to work on the example in the mio repo proper, so I moved the example there. I also fixed the issue that you reported, so hopefully it should work now.
The example is here: https://github.com/carllerche/mio/tree/getting-started in the examples/ping_pong directory. Cloning the repo and running cargo run in the ping pong directory should work.
Also, I have a PR representing the in progress work, so issues would be best left as comments https://github.com/carllerche/mio/pull/222
Thanks.


[#2479] Changing URL parsing method.

Simple change. Fixes some URL parsing errors for Relations, Sources as well as content in Extended Metadata tab.
Note: still keeping old method to use on dynamically generated items for now.

Build finished.


Invalid scripts in extras folder

I've found some invalid scripts in folder called "extras". These scripts cannot be added to master branch, and cannot be accepted in MMT because they cannot be run anywhere except a very specific setup: the scripts contains hard-coded paths and files, so nobody can actually run them without getting an error.
If this scripts are useful for the entire MMT community/project, please consider rewriting them in a more flexible way. Notice also that you should never commit new code directly to master branch, instead create a new branch from develop one.
I'm removing the scripts for now, a copy of them is attached to this issue:
amazon-aws.tar.gz
Thanks for your collaboration.

OK. I added a Usage and some parameters and committed again in the develop branch.


Stop LDAP Auth from succeeding without password

Fixing issue #1724

@eliemichel, @thisisdarshan, @gramakri, @lindskogen, pinging you here as well, sorry for the spam! 🙏

Sounds rather odd, isn't it your LDAP server that doesn't return an error if the password is empty?
Could you also add a test case for this change?

It's default behavior for some LDAP servers to allow anonymous binds (unauthenticated, in spec terms). The spec also specifically warns against clients trusting the LDAP server's bind result without checking if the password is empty:

Operational experience shows that clients can (and frequently do) misuse the unauthenticated authentication mechanism of the simple Bind method (see Section 5.1.2).  For example, a client program might make a decision to grant access to non-directory information on the basis of successfully completing a Bind operation.  LDAP server implementations may return a success response to an unauthenticated Bind request.  This may erroneously leave the client with the impression that the server has successfully authenticated the identity represented by the distinguished name when in reality, an anonymous authorization state has been established.  Clients that use the results from a simple Bind operation to make authorization decisions should actively detect unauthenticated Bind requests (by verifying that the supplied password is not empty) and react appropriately.

tl;dr this check for empty passwords in LDAP authentication mode should be merged and released ASAP.

On one hand, I am tempted to call this a server configuration issue. As per http://www.openldap.org/doc/admin23/security.html, you can disable anonymous binds on the server side using disallow bind_anon in slapd.conf.
On the other hand, most people don't know of this feature and it's very dangerous. The change looks good but please add a comment as to why we are making that check. Maybe a link to https://tools.ietf.org/html/rfc4513#section-5.1.1

Mmh, I wasn't aware of this being a common issue. My prod server does not allow empty passwords and the unit test code does not have this this problem neither. But I totally agree that if it is a typical error that administrators do, it is part of our responsibility to warn them/protect them.
To add a test for this, you'll simply have to edit startLdapServer::authorize in test/plugins/auth/ldap.js in order to make the fake test server behave like misconfigured one (i.e. authorizing empty password).

Hey hey, does anyone want to help @keegan write a test for this? We can make sure commit authorship is kept if so :)

@gramakri, @eliemichel, you've both been very helpful to us and our LDAP support. Would you like to be added to our GitHub organization and official reviewers for the LDAP integration?
You don't have to commit to code anything obviously, it's mainly to help us triage bugs, review/test PRs, etc. 🙏

@astorije Yeah, sure. I can help review LDAP related code. Thanks!

@gramakri, awesome! I added you to the org 😊
Does anyone want to help adding a test for this? 🙏

@gramakri, would you be able to add a test for this case? 🙏 🙏 🙏

Hey @keegan, we have sticker packs for our contributors now!
If you're interested, go fill the form at https://goo.gl/forms/f5usqAEp5DWoeXC92 🙂


"Ask a question" sidebar scrolling behavior

The scrolling behavior in "Ask a question sidebar UI is quirky and frustrating to use. This seems like a core use case so I'd recommend to prioritize fixing this. The best behavior in my view would be:

Autoscroll while an answer is being generated.
The "Stop responding" button should not obscure the last few lines of the answer.

Hi everyone!
I hope you're all doing well. Please take a moment to update to the latest version here: Visual Studio Marketplace.
Thank you!


Secure Witness Support

This PR includes:

Enhanced interact and rotate kli commands to allow for --authenticate parameter to ask user for a 2-factor auth code to send to witnesses for secure witness interactions.
Enhancement to streaming CESR or HTTP to allow for path components in location records.
Update to receipt endpoint interaction to honor path components in location records to allow for easier multi-tenant witness solutions.

Fixed.


Implement Pull Request Assistant GH Action and the merge command

Closes: #3

[x] Unit tests
[ ] Changelog
[ ] Documentation (Readme)

What has been done

How to test

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@7567321). Click here to learn what that means.
The diff coverage is n/a.

:exclamation: Current head 9f57462 differs from pull request most recent head b7c011d. Consider uploading reports for the commit b7c011d to get more accurate results

@@            Coverage Diff            @@
##             master       #4   +/-   ##
=========================================
  Coverage          ?   92.12%
=========================================
  Files             ?       41
  Lines             ?      635
  Branches          ?       68
=========================================
  Hits              ?      585
  Misses            ?       50
  Partials          ?        0

Continue to review full report at Codecov.

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


Channels often become inactive

Background
After upgrade to 0.10 channels quickly become inactive, for an unknown reason.
I have a simple script to kick inactive channels every couple of hours, e.g.
lncli disconnect 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f ; sleep 5; lncli connect 030c3f19d742ca294a55c00376b3b355c3c90d61c6b6b39554dbc7ac19b141c14f@<IP_ADDRESS>:9735 # bitrefill 2
but that doesn't seem right, and channels tend to close in couple of days after that.
Cant verify if its 0.10 fault as I don't have older node running, or the problem is somewhere else.
Dont know how to debug this as well.
Your environment

version of lnd
v0.10.0-beta
which operating system (uname -a on *Nix)
Linux lnd2 4.15.0-66-generic Ubuntu 18.04.4 LTS
version of btcd, bitcoind, or other backend
neutrino
any other relevant environment details

Steps to reproduce
Just run 0.10 for a while
Expected behaviour
channels always stay active and don't close randomly
Actual behaviour
channels become inactive and randomly close

We consider a link active if the peer is online and the link is known to your node's switch (our internal mechanism for routing htlcs).

If you have a look at your inactive channels, are their peers present in ListPeers?
ListChannels now monitors peer uptime with an uptime and lifetime field; it is possible that your peers are just offline, what are those values looking like for the inactive channels?

All of my peers are well-established nodes, for example here's ACINQ node that has channel inactive now:

        {
            "active": false,
            "remote_pubkey": "03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f",
            "channel_point": "35fe61d261fe03f5d27b5fa503921ca96775c48ddd7850cf822065c4e2695540:0",
            "chan_id": "691463071535595520",
            "capacity": "16777215",
            "local_balance": "9471183",
            "remote_balance": "7296981",
            "commit_fee": "9051",
            "commit_weight": "724",
            "fee_per_kw": "12500",
            "unsettled_balance": "0",
            "total_satoshis_sent": "10457429",
            "total_satoshis_received": "3160448",
            "num_updates": "882",
            "pending_htlcs": [
            ],
            "csv_delay": 720,
            "private": false,
            "initiator": true,
            "chan_status_flags": "ChanStatusDefault",
            "local_chan_reserve_sat": "167772",
            "remote_chan_reserve_sat": "167772",
            "static_remote_key": false,
            "commitment_type": "LEGACY",
            "lifetime": "158998",
            "uptime": "154263",
            "close_address": "",
            "push_amount_sat": "0",
            "thaw_height": 0
        },

And no, its not in my list of peers for some reason, that's why I have a script to disconnect and reconnect periodically:

$ lncli listpeers | grep 03864ef025fde8fb587d989186ce6a4a186895ee44a926bfc370e2c366597a3f8f
overtorment@lnd2:~/.lnd$

Interesting, so you're losing connection with peers and then your script reconnects periodically.
Do you know whether any of the peers you are running into this issue with are other lnd nodes by any chance? Would be interesting to see whether it's a lnd-lnd issue, or lnd-eclair.
Would you be able to provide some logs? If you can grep for the peer pubkey that these disconnections are occurring with, that would be useful. Running your node on debug log level would also be really helpful (if it isn't already) so that we can get more detailed logs.

ok I will restart it and enable logging, don't have any logs atm

0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0.log
this is my grepped log with lnbig-01
listpeers:
        {
            "pub_key": "0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0",
            "address": "<IP_ADDRESS>:36243",
            "bytes_sent": "56513",
            "bytes_recv": "1282109",
            "sat_sent": "0",
            "sat_recv": "0",
            "inbound": true,
            "ping_time": "34622141",
            "sync_type": "PASSIVE_SYNC",
            "features": {
                "0": {
                    "name": "data-loss-protect",
                    "is_required": true,
                    "is_known": true
                },
                "5": {
                    "name": "upfront-shutdown-script",
                    "is_required": false,
                    "is_known": true
                },
                "7": {
                    "name": "gossip-queries",
                    "is_required": false,
                    "is_known": true
                },
                "9": {
                    "name": "tlv-onion",
                    "is_required": false,
                    "is_known": true
                },
                "13": {
                    "name": "static-remote-key",
                    "is_required": false,
                    "is_known": true
                },
                "15": {
                    "name": "payment-addr",
                    "is_required": false,
                    "is_known": true
                },
                "17": {
                    "name": "multi-path-payments",
                    "is_required": false,
                    "is_known": true
                }
            },
            "errors": [
                {
                    "timestamp": "1588837606",
                    "error": "disconnecting 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:9735, reason: server: disconnecting peer 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:9735"
                }
            ]
        },

listchannels
        {
            "active": false,
            "remote_pubkey": "0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0",
            "channel_point": "95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0",
            "chan_id": "691789626551697408",
            "capacity": "16777215",
            "local_balance": "16381487",
            "remote_balance": "386677",
            "commit_fee": "9051",
            "commit_weight": "724",
            "fee_per_kw": "12500",
            "unsettled_balance": "0",
            "total_satoshis_sent": "397159",
            "total_satoshis_received": "10482",
            "num_updates": "34",
            "pending_htlcs": [
            ],
            "csv_delay": 2016,
            "private": false,
            "initiator": true,
            "chan_status_flags": "ChanStatusDefault",
            "local_chan_reserve_sat": "167772",
            "remote_chan_reserve_sat": "167772",
            "static_remote_key": true,
            "commitment_type": "STATIC_REMOTE_KEY",
            "lifetime": "87058",
            "uptime": "87056",
            "close_address": "",
            "push_amount_sat": "0",
            "thaw_height": 0
        },

this channel is NOT being monitored and reconnected by my script.
I glanced at logs and could not find anything suspicious.

also, it feels that this channel is getting some activity while still remaining inactive. i have just tailgrepped this:
overtorment@lnd2:~/.lnd$ tail -f    /home/overtorment/.pm2/logs/run-lnd-out.log  | grep 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0

2020-05-08 07:58:37.701 [DBG] PEER: Received ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=611595646515216384, mflags=00000001, cflags=00000001, update_time=2020-05-07 21:38:51 +0000 UTC) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 07:58:37.706 [DBG] PEER: Received ChannelAnnouncement(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=677779649340047360) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 07:58:37.709 [DBG] PEER: Received ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=677779649340047360, mflags=00000001, cflags=00000001, update_time=2020-05-07 21:38:51 +0000 UTC) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 07:58:48.917 [DBG] PEER: Sending Ping to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 07:59:31.509 [DBG] PEER: Received ChannelAnnouncement(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=679937990778748929) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 07:59:31.514 [DBG] PEER: Received ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=679937990778748929, mflags=00000001, cflags=00000000, update_time=2020-05-07 21:38:51 +0000 UTC) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 07:59:31.518 [DBG] PEER: Received ChannelAnnouncement(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=679972075605393408) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 07:59:31.524 [DBG] PEER: Received ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=679972075605393408, mflags=00000001, cflags=00000011, update_time=2020-05-07 21:38:51 +0000 UTC) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 07:59:48.917 [DBG] PEER: Sending Ping to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
^C
overtorment@lnd2:~/.lnd$ date
Fri May  8 08:00:04 UTC 2020
overtorment@lnd2:~/.lnd$ lncli listchannels | grep 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0 -B 2
        {
            "active": false,
            "remote_pubkey": "0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0",

now this channel is getting closed
        {
            "channel": {
                "remote_node_pub": "0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0",
                "channel_point": "95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0",
                "capacity": "16777215",
                "local_balance": "16381487",
                "remote_balance": "0",
                "local_chan_reserve_sat": "0",
                "remote_chan_reserve_sat": "0",
                "initiator": "INITIATOR_LOCAL",
                "commitment_type": "STATIC_REMOTE_KEY"
            },
            "closing_txid": "6df5bdf0400c7434d3a08da5f25e925a46992a17d06552361554ce775a9a180c",
            "limbo_balance": "16381487",
            "maturity_height": 631492,
            "blocks_til_maturity": 2009,
            "recovered_balance": "0",
            "pending_htlcs": [
            ],
            "anchor": "LIMBO"
        },

overtorment@lnd2:~/.lnd$ cat   /home/overtorment/.pm2/logs/run-lnd-out.log  | grep 95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073 | tail -n 20
    PreviousOutPoint: (wire.OutPoint) 95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0,
2020-05-08 09:30:11.503 [INF] CNCT: Local unilateral close of ChannelPoint(95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0) detected
2020-05-08 09:30:11.504 [INF] CNCT: ChannelArbitrator(95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0): local on-chain channel close
2020-05-08 09:30:11.528 [INF] CNCT: ChannelArbitrator(95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0): trigger localCloseTrigger moving from state StateCommitmentBroadcasted to StateContractClosed
2020-05-08 09:30:11.528 [DBG] CHBU: Removing channel 95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0 from backup state
2020-05-08 09:30:11.539 [DBG] CNCT: ChannelArbitrator(95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0): checking commit chain actions at height=629476, in_htlc_count=0, out_htlc_count=0
2020-05-08 09:30:11.540 [DBG] CNCT: ChannelArbitrator(95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0): sending resolution message=([]contractcourt.ResolutionMsg) (len=1 cap=1) {
2020-05-08 09:30:11.540 [DBG] CNCT: ChannelArbitrator(95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0): inserting 1 contract resolvers
2020-05-08 09:30:11.551 [DBG] CNCT: ChannelArbitrator(95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0): attempting to resolve *contractcourt.commitSweepResolver
2020-05-08 09:30:11.551 [DBG] CNCT: ChannelArbitrator(95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0): contract *contractcourt.commitSweepResolver not yet resolved
2020-05-08 09:30:11.566 [INF] CNCT: ChannelArbitrator(95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0): still awaiting contract resolution
2020-05-08 09:30:11.566 [DBG] CNCT: *contractcourt.commitSweepResolver(95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0): commit conf_height=629476, unlock_height=631492
2020-05-08 09:30:11.566 [DBG] CNCT: *contractcourt.commitSweepResolver(95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0): waiting for csv lock to expire at height 631492
2020-05-08 09:48:06.613 [DBG] BTCN: Received getdata (witness tx 95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073) from <IP_ADDRESS>:8333 (outbound)
2020-05-08 10:00:05.355 [DBG] BTCN: Received getdata (witness tx 95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073) from <IP_ADDRESS>:8333 (outbound)
2020-05-08 10:04:05.282 [DBG] BTCN: Received getdata (witness tx 95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073) from <IP_ADDRESS>:8333 (outbound)
2020-05-08 10:22:05.598 [DBG] BTCN: Received getdata (witness tx 95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073) from <IP_ADDRESS>:8333 (outbound)
2020-05-08 10:25:08.302 [DBG] BTCN: Received getdata (witness tx 95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073) from <IP_ADDRESS>:8333 (outbound)
2020-05-08 10:31:42.521 [DBG] UTXN: NurseryReport: building nursery report for channel 95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0
2020-05-08 10:35:14.121 [DBG] UTXN: NurseryReport: building nursery report for channel 95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0

overtorment@lnd2:~/.lnd$ cat   /home/overtorment/.pm2/logs/run-lnd-out.log  | grep  0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0  | tail -n 20
2020-05-08 10:32:30.524 [DBG] PEER: Sending Pong to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:32:30.524 [DBG] PEER: Sending Pong to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:32:30.524 [DBG] PEER: Sending Pong to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:32:30.524 [DBG] PEER: Sending Pong to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:32:30.524 [DBG] PEER: Sending Pong to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:32:30.524 [DBG] PEER: Sending Pong to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:32:48.917 [DBG] PEER: Sending Ping to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:33:14.437 [DBG] PEER: Received ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=621254856070332416, mflags=00000001, cflags=00000001, update_time=2020-05-08 08:08:50 +0000 UTC) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:33:48.917 [DBG] PEER: Sending Ping to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:34:22.914 [DBG] PEER: Received ChannelAnnouncement(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=622802968474615808) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:34:22.923 [DBG] PEER: Received ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=622802968474615808, mflags=00000001, cflags=00000011, update_time=2020-05-08 08:08:50 +0000 UTC) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:34:22.931 [DBG] PEER: Received ChannelAnnouncement(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=623661687061479424) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:34:48.917 [DBG] PEER: Sending Ping to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:35:48.917 [DBG] PEER: Sending Ping to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:36:06.959 [DBG] PEER: Received ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=623661687061479424, mflags=00000001, cflags=00000001, update_time=2020-05-08 08:08:50 +0000 UTC) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:36:48.917 [DBG] PEER: Sending Ping to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:37:19.994 [DBG] PEER: Received ChannelAnnouncement(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=624744705966604288) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:37:20.004 [DBG] PEER: Received ChannelUpdate(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=624744705966604288, mflags=00000001, cflags=00000001, update_time=2020-05-08 08:08:51 +0000 UTC) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:37:20.011 [DBG] PEER: Received ChannelAnnouncement(chain_hash=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f, short_chan_id=631458324039925761) from 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243
2020-05-08 10:37:48.917 [DBG] PEER: Sending Ping to 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:36243

Local unilateral close of ChannelPoint (95864b58fd1d9dc33c0498e8426108fc95392e50f3db38dbc1732f228ce51073:0) detected

Looks like your script initiated the close?
If you run lncli listpeers --list_errors are there more errors for this peer? The default response is only to show the latest error.

I dont have close on any of my scripts.
here's the listpeers with errors:
        {
            "pub_key": "0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0",
            "address": "<IP_ADDRESS>:36243",
            "bytes_sent": "170969",
            "bytes_recv": "2290643",
            "sat_sent": "0",
            "sat_recv": "0",
            "inbound": true,
            "ping_time": "6708072",
            "sync_type": "PASSIVE_SYNC",
            "features": {
                "0": {
                    "name": "data-loss-protect",
                    "is_required": true,
                    "is_known": true
                },
                "5": {
                    "name": "upfront-shutdown-script",
                    "is_required": false,
                    "is_known": true
                },
                "7": {
                    "name": "gossip-queries",
                    "is_required": false,
                    "is_known": true
                },
                "9": {
                    "name": "tlv-onion",
                    "is_required": false,
                    "is_known": true
                },
                "13": {
                    "name": "static-remote-key",
                    "is_required": false,
                    "is_known": true
                },
                "15": {
                    "name": "payment-addr",
                    "is_required": false,
                    "is_known": true
                },
                "17": {
                    "name": "multi-path-payments",
                    "is_required": false,
                    "is_known": true
                }
            },
            "errors": [
                {
                    "timestamp": "1588837402",
                    "error": "chan_id=eed00210d79cef30f31ff400238def8323910e83205e3da576abfbf62c753fec, err=rejected commitment: commit_height=33, invalid_commit_sig=3045022100e4ba756a08ceba94c638a97f15c54bff551ee52296b2fee635304e99255b0b8c0220285aff94584e7d8a812d6c31564dd4ec632d179c19d2fb658372fdec4bc28315, commit_tx=0200000001eed00210d79cef30f31ff400238def8323910e83205e3da576abfbf62c753fed0100000000bc96a58002180e0000000000001600145f008c89d8286f86fd218b9cfcf0f9e859be6e9619ccff00000000002200202ab9515a43800b448319908f25f3c0437d065e66916387cdc67aa9ed4d26e540731b7f20, sig_hash=5ad0d4438ee49d0d147cab238e01eb4c3b7f48e99f79e38fedd49738db62428d"
                },
                {
                    "timestamp": "1588837606",
                    "error": "disconnecting 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:9735, reason: server: disconnecting peer 0390b5d4492dc2f5318e5233ab2cebf6d48914881a33ef6a9c6bcdbb433ad986d0@<IP_ADDRESS>:9735"
                }
            ]
        },

Thanks for the logs and the cli output - really helpful! I was wrong on the script front, your node is disconnecting (hence the local disconnection error), but it's happening because lnd believes it's getting an invalid commitment signature.
This is a known issue, currently reproduced in #4193. This could explain the issue with active channels, because I believe this bug is only an issue on reconnect. There may also be a separate issue that's causing the channel to originally not display as active. Will have another look.


improvement: upgrade umi version to 3.0

fix #152
Signed-off-by: Haitao Yue<EMAIL_ADDRESS>

@hightall you got 2 commits in this PR. Can you squash them into one?

A lot of checks also failed on the second commit.

This is an important change, let's review carefully to avoid breaking existing functionalities.
@hightall @litong01 @jiahaoc1993

@litong01 it's netlify build, I have removed it, it's just a demo site deployment.


Should I use emq+emq-web-hook to persist messages to database?

My idea is use the emq broker + emq-web-hook sending all published messages to NodeJS API that only will be send to RabbitMQ (balance) and I instantiate some applicatons to consume. Is it sounds good?

?

@pineli it may flood the http api if the load is huge. you can directly send from emqx to rabbitmq.

Hi @pineli, I have the same idea as you, how about your final solution?


Implemented close correctly

Implement the Close() method correctly.
The cognitive services team reported that the Close() method with no parameters sent data to the server, which is an unexpected behavior. In addition, if you destroyed a WebSocket object without calling Close(), then the WebSocket  codebase would AV. This fixes both of these issues.
Pull Request Checklist
Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:
See the detailed list in the contributing guide.

[x] C++ Guidelines
[x] Doxygen docs
[x] Unit tests
[ ] No unwanted commits/changes
[ ] Descriptive title/description

[ ] PR is single purpose
[ ] Related issue listed

[ ] Comments in source
[ ] No typos
[ ] Update changelog
[ ] Not work-in-progress
[ ] External references or docs updated
[ ] Self review of PR done
[ ] Any breaking changes?

Ping :). This fixes two of the issues the cognitive folks raised about the WebSocket functionality.


Feature change request for logging

Request and response sizes for embedding usage are too large. request and response json is capped to 8196 bytes
Feature request to solve this with another way of logging outside the max 8196 request/response size of APIM

Please provide us with the following information:

This issue is for a: (mark with an x)
- [ ] bug report -> please search issues before submitting
- [X] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Run system as usual

Any log messages given by the failure

No failure, but logging request and response limit reached (max 8196 bytes)

Expected/desired behavior

Full log in diagnostic log service

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful

Thanks! We'll be in touch soon.

Thank you for logging this, we are aware of the limitation, for most text completion use cases the 8k payload size is sufficient.  Please follow for updates regarding increase of log size.

Thanks @jakeatmsft ,
In the mean-time, what would in your opinion be the best component to log complete requests/responses from a custom policy. CosmosDB or any other solution?
Thanks in advance,

I'm facing this issue too.
Is there anyway to prevent the returned embedding vectors from being logged? As the pertinent info required for monitoring is the remainder of the structure (token count / model etc...), minus "data\embedding".

Please see advanced-logging capabilities for logging over 8k payload size.

Please see advanced-logging capabilities for logging over 8k payload size.

Where would one find this?


MMCV CUDA Compiler version mismatch

Hi and thanks in advance for any help.
Describe the bug
I use a slurm server, and previously I used MMDetection without any errors. However, now I want to modify some parts of MMCV for a project I am running and so I install MMCV from source. Firstly, the server has several different GPUs and when using RTX 30 series GPU, I get the nvcc fatal : Unsupported gpu architecture 'compute_86' error as described in the doc. If I do the recommended solution, and add the MMCV_CUDA_ARGS='-gencode=arch=compute_80,code=sm_80' flag, then the error becomes nvcc fatal : Unsupported gpu architecture 'compute_80'. Secondly, when I install MMCV using some other GPU, e.g. GTX1080Ti, then the installation succeeds but MMCV CUDA Compiler version does not match CUDA Runtime. (10.0 vs 11.0 respectively) I post the full environment details below. In this case, when I run a simple code such as python tools/train.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py the error is invalid device function as again mentioned in the docs. So, my question basically is how can I install MMCV and MMDetection so that the CUDA versions match.
Environment
sys.platform: linux
Python: 3.8.8 (default, Feb 24 2021, 21:46:12) [GCC 7.3.0]
CUDA available: True
GPU 0: GeForce GTX 1080 Ti
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 10.0, V10.0.130
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.7.1
PyTorch compiling details: PyTorch built with:

GCC 7.3
C++ Version: 201402
Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
Intel(R) MKL-DNN v1.6.0 (Git Hash 5ef631a030a6f73131c77892041042805a06064f)
OpenMP 201511 (a.k.a. OpenMP 4.5)
NNPACK is enabled
CPU capability usage: AVX2
CUDA Runtime 11.0
NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_37,code=compute_37
CuDNN 8.0.5
Magma 2.5.2
Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_VULKAN_WRAPPER -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON,

TorchVision: 0.8.2
OpenCV: 4.5.1
MMCV: 1.2.7
MMCV Compiler: GCC 7.5
MMCV CUDA Compiler: 10.0
MMDetection: 2.10.0+af95704

Your Pytorch is built on CUDA 11.0 but MMCV is compiled on CUDA 10.0.
First, you should install pytorch that matches your CUDA, for example, your CUDA is 10.0, then Pytorch should be installed by conda install cudatoolkit=10.0 pytorch -c pytorch. Then you can try to compile MMCV again.

I have worked previously on the same environment, installing mmcv-full via pip with CUDA 11.0 as the server has CUDA 11 as well. I am just trying to build MMCV from source in order to modify some parts of it, but when building from source it compiles with CUDA 10. The following is my previously used environment:
sys.platform: linux
Python: 3.8.8 (default, Feb 24 2021, 21:46:12) [GCC 7.3.0]
CUDA available: True
GPU 0: GeForce RTX 3090
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 10.0, V10.0.130
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
PyTorch: 1.7.1
PyTorch compiling details: PyTorch built with:

GCC 7.3
C++ Version: 201402
Intel(R) Math Kernel Library Version 2020.0.2 Product Build 20200624 for Intel(R) 64 architecture applications
Intel(R) MKL-DNN v1.6.0 (Git Hash 5ef631a030a6f73131c77892041042805a06064f)
OpenMP 201511 (a.k.a. OpenMP 4.5)
NNPACK is enabled
CPU capability usage: AVX2
CUDA Runtime 11.0
NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_37,code=compute_37
CuDNN 8.0.5
Magma 2.5.2
Build settings: BLAS=MKL, BUILD_TYPE=Release, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_VULKAN_WRAPPER -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, USE_CUDA=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON,

TorchVision: 0.8.2
OpenCV: 4.5.1
MMCV: 1.2.7
MMCV Compiler: GCC 7.3
MMCV CUDA Compiler: 11.0
MMDetection: 2.10.0+a5db7fb

GPU 0: GeForce RTX 3090
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 10.0, V10.0.130

It seems that your CUDA_HOME is CUDA 10.0 not CUDA 11.0. You may need to modify that.

This solved the issue, thank you very much.


External scripts not updated

External scripts seem to be cached and require restarting vscode to run the updated code.
Example
# in request.http
{{
  // ...
  require('external.js').is({ test, response })
}}

// external.js
// ...

module.exports.is = ({ test, response }) => {
  test('Test name', function () {
    // ...
  })
}

// external.js - after some edits
// ...
  test("Test name - I was just edited yet this won't show", function () {
// ...

Hitting send from vscode the first time will show Test name. Hitting send after the edit will still show Test name. Restarting vscode is enough to see the updated code right away. The script in request.http itself is always updated right away (no caching? - no restart needed).
Bonus :)
// external.js
console.log('Good luck making me show in the ScriptConsole - ever')

# in request.http
console.log('I always show just fine 🎉')

The CLI shows all console logs.

Cause is the caching of Node JS. The code is executed in the context of the VSCode Extension Host and as long as it is active, all scripts are cached. Currently there is the possibility to simply restart the extension host (command in VSCode) , or to delete them manually from the cache using the following script.
# in request.http
{{
  delete require.cache[require.resolve('./external.js')]
  require('external.js').is({ test, response })
}}

I'll have a look at jest, since there seems to have been a better solution found (jest.resetModules). I have created my scripts with the help of the cli app, which gets restarted after every call.
Bonus :)
For the inline scripts I create a separate module, where I redirect the console calls to a separate object. With require loaded scripts, this is hard to do without rebuilding the complete require logic of NodeJS (maybe jest developer have some better ideas I can copy). The second option would be to redirect process.stdout, but I would also intercept logging from other extensions, which I don't want. I would currently simply recommend passing the console object.

good read: discussion of caching of require calls in context of vscode (https://github.com/microsoft/vscode/issues/84588)
I'm on the right track, I probably just need to play with the NodeJS Api

My plan now would be not to automatically bypass the behavior. This is standard in NodeJS and there are good reasons for it. Instead I provide a helper method requireUncached that automatically clears the cache.

I have provided a new version 3.0.0 where this method requireUncached is usable


Filter empty lines when importing excel file

When I'm importing excel file, dataset is created with row that all values is None, if the uploaded file have extra empty lines.
So I check the values before append to the dataset.

HI @waketzheng If you were able to add test coverage for this change we would consider it for a future release.
thanks


Suggestion: Tough as Nails Compatability

I love this mod, I love tough as nails, but if I want to use all this mod has to offer. TaN looks way out of place. Is it possible for you to have that kind of integration so I don't have the TaN stuff looking out of place?

This is mod compatiblitly and while important I don't have the time to look into how to make mods compatible at all. Once I have more time on my hands and have finished the priority features (resizing and element moving) I'll look into it.

Its been 3 years.

during most of the time I didnt actively mod minecraft nor play it.
On another note. this issue is due to TAN using the wrong render events to render it's overlay (it uses .AIR for thirst despite thirst not actually doing anything with air and .PORTAL and .EXPERIENCE for temperate. again neither of which it actually uses). Working around this on my end would be very tough and according to the forge devs, this is a bug with TAN (they should use .ALL instead).


chore: adding classic data client implementation

This change contains classic client implementation for DataClientWrapper.

I have marked the DataClientClassicAPI as internal only, PTAL!


Adds ChatOllama

@rlancemartin

I have not run the latter half of the notebook, may be some issues there.

Nit: In the notebook we should say something like: "if you've downloaded a chat model then you can use the ChatOllama. otherwise, you can simply use the Ollama interface.

just added this to the notebook.

I have not run the latter half of the notebook, may be some issues there.

I ran it. All looks good. I updated RAG to use a chat prompt.

Updated @baskaryan and @rlancemartin!

Moved around some docstrings - accidentally left one on the internal method!


README: fitView needs an argument

Working
  fitView({ padding: 10 })
  fitView({})

Not working

Fix

Change readme (this PR)
Change the type signature

Hey @andys8
thanks for the PR. I would prefer to make this parameter optional but I don't know how to do this for the fitView action. Can you help with this?

I force pushed a change that seems to work. Please have a second look at it ;)

This looks good, thanks.


Hopper extraction from fossil excavator does not work

(Hopper insertion does)

Fixed in beta version 0.6.2 (1.18.2) in commit 33e39ae


allow absolute paths in import codefix to support AMD modules

Undeclared identifier can be searched though all known modules, a codefix that imports the said identifier from one of the found modules should be offered to the user
Import codefix adds a relative path to a module, please allow absolute paths too to support AMD

What do you mean by absolute? if the baseUrl is set, the module name should use that.

./ or ../.. are relative paths against the current dir, this is what the import codefix uses, and which is if fine when you program for node
what we need is paths without ./ or ../ but rather looking like this basics/optional or  data/attributes/settings
Corresponding to
baseUrl
  basics/
     - optional.TS
  data/
     attributes/
        - settings.TS

Ideally the "paths" mappings from tsconfig.json need to be taken it accout to calculate the correct module path from a given filepath, which would be an inverse problem to mapping module paths to filepaths that is already done by TS

so just to be clear, you have a baseUrl in your tsconfig.json, and the quick fix returns something that is has ../?

I went and checked if we had baseUrl, we did not. I added "baseUrl": "./". Not it resolves to non-relative module path. Problem has gone. Thanks.


Add subject's avatar besides new comment box

Like in Github ↓

Avatar is still missing besides 2nd comment in a post


Implement delete, add licensing, and fix yalc deep

Work for this issue will begin begin on branch work-liquid-labs/s3-empty-bucket/18.


Create a shared folder for whisper models

Currently we download the models for each runner container again and again.
We should create a setup that shares models in a shared directory

done


Cocoapods support, miscellaneous fixes

Apologies this is a big mish-mash of commits. I've been making utilizing CFAAction for the last little while in projects and want to start contributing a bit more regularly. This commit covers a few issues:

[x] Cocoapods support. I know that's not for everyone.
[x] customActionWithDuration now using CADisplayLink to fire. Previously it didn't seem to work at all (?), or at least didn't seem to do what I expected from SKAction. I'm a pure iOS dev so I'm not sure about the repercussions of this for Mac dev.
[x] Fixed some bugs in CFAScale which prevented it from er, actually scaling. :smile:
[x] Added some flags to NSBezierPath so it's not included as part of an iOS project.

For the Cocoapods issue I've got it set to pull from a tag on your repo named 0.0.1. Think that's the best way to go with that?
Whew! That's a lot to parse, but take a look and let me know what you think!

Hi, and thanks for your contribution! :sparkles:
Before we start, can you format the swift parts of this with tabs?

Fixed by the merge of #2.


fix autoshow functionality whilst dragging thumb of a scrollbar

this fix will make sure that in autoshow mode,  it'll keep showing scrollbar if user moves cursor out of scrollview area horizontally whilst dragging thumb vertically.

Thanks for the pull request @kakadiya91. I took a look to make sure it's ready for merging and found some changes are needed:
.gm-scrollbar-container.gm-autoshow:hover .gm-scrollbar,
.gm-scrollbar-container.gm-autoshow:active .gm-scrollbar {
.gm-scrollbar-container.gm-autoshow:focus .gm-scrollbar {

Should be:
.gm-scrollbar-container.gm-autoshow:hover .gm-scrollbar,
.gm-scrollbar-container.gm-autoshow:active .gm-scrollbar,
.gm-scrollbar-container.gm-autoshow:focus .gm-scrollbar {

Can you please update the pull request to address these?

Thank you @kakadiya91, added in v1.4.1.


Can't edit app resources

There is no way to put, update, delete resources limit or guaranteed for the apps

Trello card: [#215] Can't edit app resources


Included documentation and verified platform compatibility unmanaged pods

…pods
Please ensure your pull request adheres to the following guidelines:

[x] For first time contributors, read Submitting a pull request
[x] All code is covered by unit and/or runtime tests where feasible.
[x] All commits contain a well written commit description including a title,
description and a Fixes: #14177  line if the commit addresses a particular
GitHub issue.
[x] If your commit description contains a Fixes: <commit-id> tag, then
please add the commit author[s] as reviewer[s] to this issue.
[x] All commits are signed off. See the section Developer’s Certificate of Origin
[x] Provide a title or release-note blurb suitable for the release notes.
[x] Are you a user of Cilium? Please add yourself to the Users doc
[x] Thanks for contributing!

Fixes: #14177
Document how to use restartPods instead and Verified compatibility of restartPods in k3s, azure, and gke environments before removal.

Hello @joestringer , forgive me for tagging you directly. I am Forcha Gail from Cameroon. I intend to participate on the LFX mentorship spring program 2024 under CNCF/Cilium. Please is my documentation in the right direction ? Please does it align with the goal of this issue?  I messed up the initial PR and decided to go with this one.

Hi @gailsuccess, this isn't quite what I was meaning about the xargs. The goal is to use the operator.unmanagedPodWatcher.restart Helm option to ensure that unmanaged Pods are restarted instead of providing manual commands like this docs page currently does. I'd suggest starting with going through some of the getting started guides to familiarize yourself with installing and using Cilium. After that you can step through the documentation in this file and test that the equivalent Helm option has the effect of what this guide is showing.
The commands with the git grep provide pointers to files that you can further investigate to understand the content of those files and how they relate to the issue.

Hello @joestringer , it seems the docs on  https://docs.cilium.io/en/stable/installation/k8s-install-rke/#restart-unmanaged-pods was written o the assumption that the user does n't have helm installed.  We should focus our attention on  https://docs.cilium.io/en/stable/installation/k8s-install-helm/#restart-unmanaged-pods . The latter holds knowlage of the fact that helm is already installed by the user.
I agree we should replace this section of the helm docs cilium installation

with
helm install cilium cilium/cilium --version 1.14.5 \
 --set operator.unmanagedPodWatcher.restart=true

the above command works on my system, but I don't have access to k3s and azure environments to test it. Please let me know what you think. May be we should open a new issue were developers can test functionality  this restartpods commands on their various environments before concluding.


web animation library .js problem

hi! i'm really new to github and also to usage of libraries in javascript. i'm trying to use the muuri library, but it needs the web animation library to work properly. according to the muuri's demo i need to include the web animation's .js file to my html, called "web-animations.min.js" but i can't find on their github post. could you please show me where is it? thanks.

I think you'll want to depend on this project from NPM: https://www.npmjs.com/package/web-animations-js
You can also depend on the file via a CDN: https://unpkg.com/web-animations-js
Basically not all projects host the built "min.js" versions of files in the repo themselves, but instead only put them on NPM, where you can depend on them generally.


Gaussian Smoothing

Hi, Thanks for your great work!
I'm afraid I think there is a minor mathematical error in Gaussian Smoothing.
In ldm/models/diffusion/gaussian_smoothing.py, lines 37 ~ 40 for computing the joint probability of 2D Gaussian is written as
for size, std, mgrid in zip(kernel_size, sigma, meshgrids):
    mean = (size - 1) / 2
    kernel *= 1 / (std * math.sqrt(2 * math.pi)) * \
                      torch.exp(-((mgrid - mean) / (2 * std)) ** 2)

I think line 39 and 40 should be rectified as
 kernel *= 1 / (std * math.sqrt(2 * math.pi)) * \
                      torch.exp(-((mgrid - mean) ** 2) / (2 * std ** 2))

Thank you!

Sorry, I'm afraid I think I had a mistake on this.


Relax visibility rules for type-aliases when 'declaration' compiler option is set.

One common thing I use type-aliases for is to give shorter, more expressive names to commonly used types throughout a file.
This is especially useful for callback signatures that see common use throughout a module, as well as string-literal types used in a union type, like type HttpMethods = 'get' | 'post' | 'put' | 'delete'.
Let's look at the following simplified example:
type CharCallback = (c: string, i: number) => string;

export function mapOnChar(str: string, fn: CharCallback): string {
  const newStr = [];
  for (let i = 0, lim = str.length; i < lim; i++)
    newStr.push(fn(str.charAt(i), i));
  return newStr.join('');
}

When using the declaration compiler option, this example fails to compile with the following error:
error TS4078: Parameter 'fn' of exported function has or is using private name 'CharCallback'.
This initially makes sense; the type-alias is not being exported so it is private.  However, if you look at the type-alias, the only thing "private" about it is the name it was given, and an alias' name is not really important to or needed for a definition file.
There is no reason that the un-exported type-alias in the example cannot be automatically de-aliased back into (c: string, i: number) => string and that used in its place when the definition file is emitted.
However, if the alias in the example were to be exported, then it should not be de-aliased in the definition file.
I should point out that this suggestion is considering type-aliases only.  If the CharCallback type was re-written as interface CharCallback { (c: string, i: number): string }, then that would be a good case to raise an error.  An interface is  generally considered more "concrete" than a simple type-alias, and so its name should be preserved and used in the definition file.

Here is the problem, an ambient module has all its members automatically exported. That was a design decision we made early on to avoid clutter in declaration files (turned out not to be so wise after all:)). So for instance:
declare module "Mod" {
    var x: number;
    export function f(): void;
}

In the example above, both x and foo are exported. the export keyword is not required, nor needed.
Now to the declaration emitter. the emitter is trying to emit  function mapOnChar(str: string, fn: CharCallback): string, it figures it needs CharCallback, so it writes that as well; but given the above behavior of ambient modules, this means it is making your type CharCallback public, whereas it was not. So options:

Do not mind, make it public any ways

Pros: no error reported
Cons: your API surface area has changed in a way you did not anticipate, moreover, you have no way of really "hiding" a declaration. Your users can now take a dependency on this type/value, and you can break them without noticing

Try to inline the type

Pros: again, no error reported
Cons: serializing types is not that simple, there are cases where that is not possible, e.g. classes, self-referencing types, etc.. and will make your .d.ts file look less organized, than your .ts file

Let the user know, and they can decide

Pros: either make it public, and commit to supporting it, or inline it, or not expose it at all
Cons: well.. an error is reported

So we picked the last option, as it seemed the safest, and most responsible.
Now for relaxing the rule for type aliases, not sure why a type alias is different from an interface, different from a class that your users will only use in a type position.. A change in any of these will break the compilation of your users regardless if they took a dependency on it.

I see.  But a lot of this stems off of just how "real" type-aliases are.  Since I started working with TypeScript, I've been seeing them being treated as non-corporeal; they vanish as soon as you look at them.  This has led me to believe that the community consensus is that this is how a type-alias should be treated by default.
  Interfaces, on the other hand, keep their name like it is holy throughout the entire code-base.
The TypeScript Handbook even makes special note of this in its "Interfaces vs Type Aliases" section:

One difference is that interfaces create a new name that is used everywhere. Type aliases don’t create a new name — for instance, error messages won’t use the alias name.

This declaration compiler option issue is the only circumstance I've found so far where a type-alias' name is treated in a first-class manner.  It seems like an inconsistent application of the concept.
If I didn't make an alias public by exporting its name into my module's API, then it's either not important enough to keep its name or I made a mistake when authoring my API (and the only negative consequence would be that my API's type-definitions are a little messier than I intend, but it would still function fine, otherwise).
I know that perhaps the idea was to help people catch that kind of mistake, but I argue that this violates pre-established rules regarding type-aliases, and it's more important for the longevity and continued maintenance of the language to keep those rules until we have a really good reason to break them.
And if you really look at it, the trade-off on compromising this rule is actually not all that great.  I'm basically being forced to either:

Unnecessarily export simple types into my public API, making the API generally messier, but keeping my own code cleaner.
In-line types that have very common use in my code, making messier and more difficult to maintain code, but cleaner APIs.

This is just not a good trade-off for the safety and responsibility you've suggested we're gaining with this.  With this restraint on type-aliases, there is significant pressure to make something messy for someone somewhere.

If the type alias is not exported, how would the user declare a variable of the specific type? For me it seems that if the library author needed to make their code clean chances are the user would find it beneficial as well. I treat type aliases as part of the API surface, inlining them just pushes the problem to the consumer.

At least for me, my response is, "why would I want them to declare such a variable?"
I almost exclusively use type-aliases privately or with the intention they're kept internal to my package.  Most of the problems I have here are due to there not being an internal modifier for TypeScript yet, so my internally used type-aliases are sometimes forced to leak out into the public API unintentionally.  I still don't want to export them, though, since they're not actually intended for public use.  I would prefer they just de-alias, if it is possible for them to do so.
I can also foresee circumstances where I really do just want to de-alias away a type-alias' name even though its exposed publicly.  Aliases for callbacks are probably a prime example; the function signature actually says a lot more about how the callback will be used than any name I'd give it.
And then, there's still the exceptional case of the odd type-alias I actually do want to make available for public consumption or I expect to have such common use throughout my code it deserves a proper name.  For those, I would explicitly export them.  Types like type Nullable<T> = T | null or type Trial<T> = T | Error come to mind.
This is basically what my coding practices for type-aliases have been up until I flipped on the declarations flag.  These seemed like sensible ways to use them, and even probably best-practices based on what the TypeScript Handbook told me, but the current TypeScript compiler disagrees.
I would just like to have greater control over what my public API looks like.  I haven't heard any really compelling arguments not to give that control back to the developer.  Any possible negative consequences mentioned so far could easily be picked out by a linter and ignored if they're actually intentional.

I am in agreement with JHawkley.  Aliases are not types, even according to the documentation, and should not be treated as types.  Aliases are often used internally, for code readability.  If a user of your module also requires an alias, they can make their own.  However, aliases are often used in instances where it is not necessary for the user of your module to deal directly with the type definition.  For example, when providing a type literal (object, callback function) or one of a union of types.
Since Aliases are not real types, they should be handled in the parser, not the compiler.  A simple way to deal with the aliasing would be to keep a map of known aliases when parsing the code, and when it comes across a name, perform a lookup, replacing the alias with the thing it is aliasing.  I do not see any complexities in this, it would in fact be no different than if no alias was used in the first place, and we know that that works fine.  When aliasing a class or interface, you would still need to make sure the class or interface was public if needed, or you would get an error on the class or interface, not the alias, since it shouldn't really exist in the first place.

I can also foresee circumstances where I really do just want to de-alias away a type-alias' name even though its exposed publicly. Aliases for callbacks are probably a prime example; the function signature actually says a lot more about how the callback will be used than any name I'd give it.
-- JHawkley

I can't agree more.
As @mhegazy mentioned, there are three options (which typescript has choosen the last for now) for solving that an unexported type being referenced by an exported one. And what we're hoping here is to chose the second one when it's possible.
I did an experiment and find out that type aliases inside a function body would be serialized in the emitted declaration file.
Take the code snippet in the OP as an example:
// source.ts
type CharCallback = (c: string, i: number) => string;
export function mapOnChar(str: string, fn: CharCallback): string {
  return '' // removed implementation detail for simplicity
}

export const mapOnChar2 = (() => {
  type CharCallback = (c: string, i: number) => string
  return function mapOnChar(str: string, fn: CharCallback): string {
    return '' // removed implementation detail for simplicity
})()

// emited source.d.ts
declare type CharCallback = (c: string, i: number) => string;
export declare function mapOnChar(str: string, fn: CharCallback): string;
export declare const mapOnChar2: (str: string, fn: (c: string, i: number) => string) => string;

Regarding @mhegazy 's concern:

not sure why a type alias is different from an interface, different from a class that your users will only use in a type position

As users of this API, if we were to use the original version and were not pretty sure about what signature it is expecting for the callback, here is how the IDE could, at best, help us:

While, the intellisence for the inlined version of the API would be:

The difference is obvious.
One might argue that users can check the .d.ts file to figure out what CharCallback really is. Then please consider this example (the usecase might seem to be particularly cooked to justify the inlining, but I assure you that it is simplified from my own real project):
// source.ts
type SomeRecursive<T extends string> = {
  [k in T]: SomeRecursive<Exclude<T, k>>
}

function factory<T extends string>(...t: T[]): SomeRecursive<T> {
  return {} as any // removed implementation detail for simplicity
}

export const foo = factory('a', 'b', 'c')

// source.d.ts
declare type SomeRecursive<T extends string> = {
    [k in T]: SomeRecursive<Exclude<T, k>>;
};
export declare const foo: SomeRecursive<"a" | "b" | "c">;

const factory = (() => {
  type SomeRecursive<T extends string> = {
    [k in T]: SomeRecursive<Exclude<T, k>>
  }
  return function<T extends string>(...t: T[]): SomeRecursive<T> {
    return {} as any // removed implementation detail for simplicity
  }
})()

export const bar = factory('a', 'b', 'c')

// source.d.ts
export declare const bar: {
    a: {
        b: {
            c: {};
        };
        c: {
            b: {};
        };
    };
    b: {
        a: {
            c: {};
        };
        c: {
            a: {};
        };
    };
    c: {
        a: {
            b: {};
        };
        b: {
            a: {};
        };
    };
};

I am aware that under certain circumstances (I ran into one myself earlier), serializing the type could be expensive or even impossible. But we don't really need the inlining every where and those occurances where we expect inlinings are most likely simple ones. So wherever the compiler fails to perform inlinging, it can fallback to option 3 and seek for a human intervention.


crypto/tls: conflicting lock order in Handshake() and Read()

What version of Go are you using (go version)?
1.14.2
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/boqin/.cache/go-build"
GOENV="/home/boqin/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/boqin/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/data/suz305/go-workspace/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/data/suz305/go-workspace/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build519488021=/tmp/go-build -gno-record-gcc-switches"
What did you do?
I analyzed the source code crypto/tls/conn.go and found a possible conflicting lock order which may lead to deadlock.
If Conn.Handshake() and Conn.Read() are executed concurrently in two threads, then a deadlock may occur.
In crypto/tls/conn.go
type Conn struct {
	...
	handshakeMutex sync.Mutex
	...

	// input/output
	in, out   halfConn

}

type halfConn struct {
	sync.Mutex

	...
}

Conn.handshakeMutex.Lock() -> Conn.in.Lock()
In Handshake(): Conn.handshakeMutex.Lock() is on L1344. Conn.in.Lock() is on L1354
https://github.com/golang/go/blob/9b189686a53d7fec7deb93d7521531157aa023cb/src/crypto/tls/conn.go#L1343-L1355

Conn.in.Lock() -> Conn.handshakeMutex.Lock()
In Read(): c.in.Lock()  is on L1243. handlePostHandshakeMessage() is on L1251.
https://github.com/golang/go/blob/9b189686a53d7fec7deb93d7521531157aa023cb/src/crypto/tls/conn.go#L1233-L1251
Then handleRenegotiation() is on L1178.
https://github.com/golang/go/blob/9b189686a53d7fec7deb93d7521531157aa023cb/src/crypto/tls/conn.go#L1176-L1179
Conn.handshakeMutex.Lock() is on L1164
https://github.com/golang/go/blob/9b189686a53d7fec7deb93d7521531157aa023cb/src/crypto/tls/conn.go#L1164-L1172

What did you expect to see?
--
What did you see instead?
--

cc @FiloSottile

Also /cc @katiehockman.


Display short container ID

The full docker container ID is long. 64 characters. Ain't nobody got time for that.
Docker command line tools and UI tooling such as Docker for Windows display the short container ID. The short container ID is the first 12 characters of the ID, and realistically will always be enough to uniquely identify a container.
See https://www.baeldung.com/ops/docker-container-id-from-name
Examples:
$ docker container ls -a
CONTAINER ID   IMAGE          COMMAND                  CREATED          STATUS          PORTS     NAMES
80f1bc1e7feb   nginx:alpine   "/docker-entrypoint.…"   36 seconds ago   Up 36 seconds   80/tcp    web-server-11
acdea168264a   nginx:alpine   "/docker-entrypoint.…"   36 seconds ago   Up 36 seconds   80/tcp    web-server-10
0cbfc6c17009   nginx:alpine   "/docker-entrypoint.…"   37 seconds ago   Up 36 seconds   80/tcp    web-server-1

The Aspire dashboard should display the short ID. The copy button should copy the full 64-character value.

I see we already were shortening the ID in places to 8 chars. It should be shortened to 12 chars.

What about the text name like wizardly-moser in your screen shot? They might be easier to eyeball.

I don't think that's necessary. The Aspire project has a name the user has specified for the container resource, e.g. "CatalogDB" for a postgres DB container.
But now that you point it out, why does the Docker UI have those silly names for Aspire containers? "CatalogDB" in the Docker UI would be more useful than wizardly-moser...

Issue for the name in Docker: https://github.com/dotnet/aspire/issues/1587


add modifier that absorbs surrounding whitespace

Sample use case: given 123 dot 8, change boat 8 period generates 123.8. (Obviously needs a better name!)
slack thread
Not a high priority for me; between is a suitable workaround for now.

Maybe: bleed, absorb, white, stretch. Or I guess just "void", because that's what people tend to try. The only issue there is that it's not a scope type, so they might be surprised when they can't say "next void" like they can with other scope types.
Maybe for things like this where they're not well-formed scope types, we support them as scope types grammatically but throw if they use it for anything other than containing scope

I just realized that this is basically token with both leading and trailing delimiter ranges included. Could we leverage that somehow?

Huh yeah interesting idea. I mean I guess there are 7 possibilities here and we cover the first 3:

Leading
Content
Trailing
Leading and content
Content and trailing
Leading and trailing
Leading, content, and trailing

I do wonder if we could get here with a more compositional approach, eg "from air take leading past trailing". I have some ideas there which I've been meaning to file in an issue. I guess not as compact as a purpose-built modifier tho

Thinking back on my own uses, I think a modifier that expands to whitespace, rather than leading and trailing delimiters, would be a better match. “Long paint”?
it also occurs to me that this may be  sufficiently handled with a regular expression scope. I’ll try that for a bit and see how it plays.

I wonder whether we should soup up regexps, as a means for easy experimentation. Two ideas on this front:
modifiers
Add regexp modifiers that can expand/shrink starting from some given content. So long paint (absorb leading/trailing whitespace) might be (waves hands):
long paint.expand-start,\s*\B
long paint.expand-end,\B\s*

Another example. In Go, it's common to see things like fmt.Println, where fmt is the package and Println is the exported identifier. You could image a package modifier that extracted just fmt. from this by (a) keeping only the fmt. or (b) cutting the identifier. Maybe, respectively, something like:
package.keep-start,[a-zA-Z]+\.

and
package.trim-end,[A-Z][A-Za-z]*

Obviously some actual thinking about the syntax here and lots of bike shed painting would be in order.
scopes
Currently the scope regular expressions just snag the content. But with named captures, they could also provide domain, leading, trailing, removal, etc. For example, to pick out formatter verbs (%v, %s) from a format string, you might want the string as the iteration range and the domain.
These are obviously pretty vague, ill-formed ideas with lots of refinement needed. But it's nice to have an escape hatch for things like this...and then we can take the ones that are the most popular and later pull them back into the main grammar.

long paint, "\s*\S+\s*"

This doesn't work out of the box, because it turns out regular expression scopes can't overlap, so the white space from one long paint steals the white space from the next one. :/

long paint, "\s*\S+\s*"

This doesn't work out of the box, because it turns out regular expression scopes can't overlap, so the white space from one long paint steals the white space from the next one. :/

Cross linking to https://github.com/cursorless-dev/cursorless/issues/1684


feature request: source from other lines of code similar to the one started

What I mean is that from a key combination, not by default, cmp will read the current buffer for similar lines to the one your are at. If it finds one that matches with your line, it gives you the rest.
async fn get_user() -> Result<User> {
    let url = format!("https://api.github.com/user");
    let user = make_json_request(&url).await?.json::<User>().await?;

    Ok(user)
}

async fn get_user_data( username: string ) -> Result<User> {
    let url = format!("https://api.github.com/{}", user);
    let user_data = make_json//_request(&url).await?.json::<User>().await?; <-- suggestion of cmp

I have a video example of where they use something similar at minute 45:00:
https://www.youtube.com/watch?v=tAVxxdFFYMU

It means complete with other buffer?

Your description is hard to understand. Please describe it more clearly with example codes like other issues.

Yes it was a awful explanation, I just edited.

It means complete with other buffer?

Well I was thinking only from the current buffer.

OK.  I get it.  It seems line completion.
C-x C-l
It is correct?

OK. I get it. It seems line completion. C-x C-l It is correct?

That is what I was searching for :) Thanks!

I didn't know about cmp.register_source, thanks! I need to read more the documentation 😄


npm-publish workflow failure

Error:
lerna ERR! ECONFIGWORKSPACES The "useWorkspaces" option has been removed. By default lerna will resolve your packages using your package manager's workspaces configuration. Alternatively, you can manually provide a list of package globs to be used instead via the "packages" option in lerna.json.

Fixed in https://github.com/privacy-scaling-explorations/p0tion/pull/124


multi-fidelity notebook tutorials

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 66.408%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
214

Relevant Lines:
304

💛  - Coveralls


生成的 id 带有0，导致无法解码

outputs = [0,0]
tokenizer.decode(outputs) 解码报错如下：
*** IndexError: Out of range: piece id is out of range.

0 is not a valid token id for the tokenizer and the model shouldn't predict 0. If you did encounter the problem with our demo, please open a new issue with the "Bug/Help" issue form to provide more information.


Improvement suggestions for 10 coffees

Hi there,
I sent you an email a few days ago about adding 4 suggestions to Element Tiptap and that I'd buy you 10 coffees if you were able to do it - did you receive the email? I sent it to the gmail in your profile here on Github. Please check your spam box in case in went there. I'd love to hear your thoughts.
Thanks!

Bought you 10 Coffees :)


Is it possible to get the displayed date range?

For example in this view is it possible to get the dates 26.06. & 06.08. ?
EDIT: Apparently vm.view is used internally although I don't know if it is possible to access this.

You can easily calculate this yourself with moment:
// where $scope.calendarDate is the variable you pass to the `view-date` option, and $scope.view is the variable you pass to the `view` option:
var start = moment($scope.calendarDate).startOf($scope.view).toDate();
var end = moment($scope.calendarDate).endOf($scope.view).toDate();

Internally this is all the calendar does as well. Hope that helps! 😄

I don't think that's what I wanted.
Your solution returns Fri Jul 01 2016 00:00:00 GMT+0200 (CEST) as start and Sun Jul 31 2016 23:59:59 GMT+0200 (CEST) as end, which is the start and the end of the month, but not the "displayed ones" (which are those days in the previous and next month which are still shown).

OK, try:
var start = moment($scope.calendarDate).startOf('month').startOf('week').toDate();
var end = moment($scope.calendarDate).endOf('month').endOf('week').toDate();

Works perfectly, thanks!
Mon Jun 27 2016 00:00:00 GMT+0200 (CEST) - Sun Jul 31 2016 23:59:59 GMT+0200 (CEST)

(I also changed the start of the week to monday)

I have one more question:
Is it possible to get a string from angular-translate (either possible via filter, service or directive) into the calendarConfig.i18nStrings.weekNumber variable? I already tried using a custom calendarMonthCell.html and getting a string from my controller into this view, although it seems that this is not possible (I tried {{'WEEK' | translate}} {week} what would be perfect, but I can't figure out a way to assign this resulting string to a variable (or directly use it with the  line where I didn't made it because there is some problem with using all those single and double quotes, it would be something like this: ng-bind="'{{'WEEK' | translate}} {week}'.replace(). I hope you understand what this wall of words mean and I hope you can help me :)

On more thought, not very easily, I've made a new ticket to track it here: https://github.com/mattlewis92/angular-bootstrap-calendar/issues/393

Thanks!


How to clean lama cleaner

I downloaded the Windows installation package and placed it on the E drive. Click on 'win'_ Config.bat downloaded a bunch of things, and the C drive is missing 6GB. Now, if I want to clear it, how do I execute the command? I tried deleting the E drive lama cleaner, but the C drive still occupies 6GB of memory. What do I need to do? Find a solution

By default all the models are downloaded to C:\Users\your_name\.cache\torch\hub\checkpoints\ & C:\Users\your_name\.cache\huggingface\diffusers, you can set model download directory in the web config page

I previously set the model to E: lama cleaner . Cache, but deleted the entire lama cleaner package, and the C drive still occupies 6GB
该邮件从移动设备发送

------------------ 原始邮件 ------------------
发件人:                                                                                "Sanster/lama-cleaner"                                                                                @.>;
发送时间: 2023年4月27日(星期四) 中午11:32
@.>;
<EMAIL_ADDRESS>主题: Re: [Sanster/lama-cleaner] How to clean lama cleaner (Issue #297)
By default all the models are downloaded to C:\Users\your_name.cache\torch\hub\checkpoints\ & C:\Users\your_name.cache\huggingface\diffusers, you can set model download directory in the web config page
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

Can you check the .cache folder in your C drive?

Where are the files stored in Mac? I want to remove them from my computer as they are taking up about 10GB.

I think I found it: /Users//.cache/huggingface

Hi, there are instructions in the FAQ on how to delete programs and models. If you have any further questions, please let me know.
https://lama-cleaner-docs.vercel.app/frequently_asked_questions#how-to-completely-uninstall-lama-cleaner