Merge<PHONE_NUMBER>2320_add_cost_field_to_charges.exs (Charge Cost field)

Hi @adriankumpf,
Off the back of the feature request for adding costs to charging details, I wanted to see if I could propose a new database column for this.
I'm new to making a schema change this way so appreciate any feedback. Once I work out how it works, I'll update the development doco to explain the process.
I have modeled this on other schema changes I can see in the distribution, however I couldn't find an example of a datatype with arguments in the way that I have defined this one, and I am not sure how to make these migrations apply to my existing distribution, I have tried restarting teslamate but that doesn't seem to initiate it.
The reasoning for the datatype proposed is:

floating point datatypes are imprecise
whilst integer could be used for representing cents, it would require a conversion routine for this which might differ per currency based on localisation - not sure if that is just adding unnecessary complexity?
decimal(6,2) gives 6 digits in total with a 2 digit exact decimal precision. This would support a number up to 9999.99 or 999999. It is somewhat of an assumption that this will be sufficient for all currencies however it doesn't seem unreasonable to me in that currencies with high values will generally not involve decimal precision. Do you think it is sufficient, or would a larger field size (say 12,2) be a safer bet?

Once I know how best to test this, I'll test it on my distribution. Let me know if you would like me to approach this in a different way.

Okay, reading the ecto documentation I see that mix datatypes cannot be defined this way. I will need to do some more reading.

A datatype like decimal(6,2) is a good choice in my opinion. We shouldn't overthink it for now.

To apply the database migration there is mix ecto.migrate

How will cost data get into that column?
I charge at different chargers. They apply different costs, some per minute, some per kwh, some are free and some use a fixed fee per charge.
As a first step, I built a custom dashboard for me that just displays the charges at home (location: home) and applies my kwh price on the gross kwh consumption of the charge (fixed multiplication in the table, not even in the database). That gives me an overview how much my car consumes at home and what fraction of my power bill is caused by my car.
My approach is simple, but just covers cost at home.
Is there any other way than entering manually the charging type (minutes, kwh, fix, free) and the location as a tuple?

There is no charging cost interface either manual or automatic at this
point.
The motivation for the immediate addition of this column to the database is
for those who are able to populate the field without requiring the project
to implement a UI or function.
I do have some ideas around automatic cost calculation, including either by
geolocation or by tag per charging session, and perhaps with a default cost

however ultimately these all result in a cost being associated with each
charging session, so I wouldn't think it would be any impediment to adding
it to postgres and grafana now? It is entirely possible that these wouldn't
be in scope for TeslaMate (that's entirely up to the developer) in which
case it may be an external module or process of some sort which then
updates the column. I am 99% sure that if it were not part of the
interface/project, someone (most likely myself at a minimum) would pick it
up as an add-on, as they could co-exist quite cleanly.

On Fri, Nov 22, 2019 at 7:42 AM Marco Gabriel<EMAIL_ADDRESS>wrote:

How will cost data get into that column?
I charge at different chargers. They apply different costs, some per
minute, some per kwh, some are free and some use a fixed fee per charge.
As a first step, I built a custom dashboard for me that just displays the
charges at home (location: home) and applies my kwh price on the gross kwh
consumption of the charge (fixed multiplication in the table, not even in
the database). That gives me an overview how much my car consumes at home
and what fraction of my power bill is caused by my car.
My approach is simple, but just covers cost at home.
Is there any other way than entering manually the charging type (minutes,
kwh, fix, free) and the location as a tuple?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/adriankumpf/teslamate/pull/258?email_source=notifications&email_token=AGFF33ANYOMIMQXJM3F5DPDQU3XD3A5CNFSM4JOGE4J2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE3SWDI#issuecomment-557263629,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGFF33C7VIVC4A5P4LXGSCLQU3XD3ANCNFSM4JOGE4JQ
.

For me just a database column with a simple cost input per charging session would be great.
Since charging costs are calculated by various ways (per minute, per kWh, per kWh and per minute in the same time, per session) I think it is the easiest to just start with a simple manual input. I would wait for the monthly bill of my providers and input the charging costs based on the data in the bill.

BTW, this is related to issue #185.

Huge thanks yet again @adriankumpf for the context around working with ecto/mix.
I have fixed the formatting issues and properly defined the column datatype, and have tested it in my environment:
teslamate=# \d charging_processes
 [...]
 cost                 | numeric(6,2)                |

Next steps will be to have a think about the data entry mechanism for this. I don't think I would be useful at all UI wise but I have an idea that I want to run past you, before I work on a separate PR. Here's my thoughts, what do you think?

This PR I think satisfies the schema update first approach, where the field then becomes available for population manually via psql
There would also need to be grafana dashboard updates which haven't happened yet, but I'd propose pushing that into the next PR
Alongside this, what would you think about an API endpoint that takes either a PUT or POST value to update cost for a given charge id? This doesn't satisfy the UI interface request in the original issue #185, but it does provide a programmatic interface so that external systems could update the value if they needed to (and avoids the need to run psql within the DB container to update values until a UI interface exists)
It might provide some reuse capability for the UI interface, as well.

In addition to the mix migration test in v1.13.0-dev, I have also just run a quick test with a charger session. The logs show:
18:34:46.765 car_id=1 [info] Charging / SOC: 73%
18:37:28.880 car_id=1 [info] Derived efficiency factor: 136.1 Wh/km (8x confirmed)
18:37:28.880 car_id=1 [info] Charging / Disconnected / 0.1 kWh – 3 min

And the charging_processes table is updated without issue, with cost being empty:
 id |         start_date         |          end_date          | charge_energy_added | start_ideal_range_km | end_ideal_range_km | start_battery_level | end_battery_level | duration_min | outside_temp_avg | car_id | position_id | address_id | start_rated_range_km | end_rated_range_km | geofence_id | charge_energy_used | cost
----+----------------------------+----------------------------+---------------------+----------------------+--------------------+---------------------+-------------------+--------------+------------------+--------+-------------+------------+----------------------+--------------------+-------------+--------------------+------
 78 | 2019-11-23 07:34:46.743167 | 2019-11-23 07:37:28.869828 |                 0.1 |                278.3 |              279.1 |                  73 |                73 |            3 |               22 |      1 |       9 |          9 |                278.3 |              279.1 |             |  0.106973177777778 |

All looks good.

Just one more update from me, I've actually managed to already set the costs for all of my charges, and I've already updated the grafana dashboard, although not as part of this PR. The one thing I did want to mention is that I think it does make sense to leave the default value for this column as null, because I have been using the following method for setting the values:

First, I select address_id,charge_energy_used from charging_processes where cost is null; to show all rows where the value has not been set.
I then cross-check address-id to see what the nature of the charger is, the following query will do this in one operation:

select address_id,charge_energy_used,display_name from charging_proc
esses LEFT JOIN addresses on addresses.id = charging_processes.address_id where
cost is null;

I then either set the cost to 0.00 if the charging is free (for me, the majority are) or to the cost if it is paid charging. If we were to default the value to 0.00, it would make it very difficult as I'd need to review every charge entry to see if it is a free charge or not.
Below is a look at what it looks like in my grafana dashboard. It is accurate (even if it seems as though it isn't) because the vast majority of my charging is free destination charging currently.

Another thought I have is whether grafana itself can update the value per charging session once I have updated the charges dashboard to show it per session? I have no idea if it's an option, but if so it may save us the UI work - I am going to follow it up.

[...] so I wouldn't think it would be any impediment to adding it to postgres and grafana now? It is entirely possible that these wouldn't be in scope for TeslaMate (that's entirely up to the developer) in which case it may be an external module or process of some sort which then updates the column. Looks good!

I wouldn't mind an add-on that covers the various ways to calculate charging costs at all. But in general, tracking charging costs is in scope for this project.
What's kept me from implementing it so far is, that I personally have no need for this feature. Additionally, like you and @toerb said, charging costs can be calculated in various ways (automatic cost calculation etc.) and I just don't know the specific requirements people have.

There would also need to be grafana dashboard updates which haven't happened yet, but I'd propose pushing that into the next PR

That would be a great follow-up PR!

Alongside this, what would you think about an API endpoint that takes either a PUT or POST value to update cost for a given charge id?

I think that's a good idea. It could be implemented very quickly. From my point of view, building a simple UI wouldn't be much trouble either, as long as it's only about annotating recorded charging sessions. I could do that next.

Another thought I have is whether grafana itself can allow users to update the cost column per charging session once I have updated the charges dashboard to show it per session? I have no idea if it's an option, but if so it may save us the UI work - I am going to follow it up.

I don't think that's possible with Grafana. But I'll be happy if it proves to be otherwise.

I wouldn't mind an add-on that covers the various ways to calculate charging costs at all. But in general, tracking charging costs is in scope for this project.

Perfect, I have thought some more about how this could be implemented and I'd see this as being a 3rd changeset, after the simple static charging cost code is integrated. I have some ideas around real-world use but in general I think the majority of people will be entering this statically (for example, TM might calculate supercharger charging based off per kWh rates for time of day or date ranges, but need to consider what would happen if the invoice differs due to an external factor/some sort of ancillary charging, etc). For me, the only dynamic charging calculation I'd use would be for home charging based off my grid rates (even though I have solar, making it impossible to calculate accurately, so I'd still be logging worst case costs). Everything else for me would be on the amount invoiced which is not going to be effectively automated.
It would also need to be a regularly executed routine or a dynamically generated value to be particularly useful - ie if I happen to charge after a charging rate is changed, I would want to be able to go back to the address record in TM and update the new charging rate and have it dynamically recalculated.

That would be a great follow-up PR!

Just opened a new PR for this and the API functions, and given you've answered all the questions I had here I am confident I know what to try out next, but if I can't offer anything grafana-driven for updating the costs field, I'd have to give up on that angle and ask for your help on a TM UI driven approach.

I think that's a good idea. It could be implemented very quickly. From my point of view, building a simple UI wouldn't be much trouble either, as long as it's only about annotating recorded charging sessions. I could do that next.

Cool! I thought a bit more about this and I know that currently you aren't rendering tables of data in TeslaMate (only in Grafana) so I was thinking maybe (unlikely) the Grafana clickable table functionality would  allow a javascript pop-up window (or even better, an overlay div) to modify the value and then send it to TM, maybe even using the API function? I have absolutely no idea how feasible this is, however - it would be pure experimentation from my side.

I don't think that's possible with Grafana. But I'll be happy if it proves to be otherwise.

Yep, you're 100% right - after some research I have come to the same conclusion. If only it were that easy :)

Perfect, something like the geo-fence link in Grafana would be perfect I think? I will update the dashboard with a link to something that could be used for this in the other PR.

Yeah, that'd be perfect!

Perfect, something like the geo-fence link in Grafana would be perfect I think?
@ngardiner , I think this is the most practical way for anyone to add the cost information.


Document revert strings config

I added --revert strings option on the compiler-options page.
I also explained the possible values of revert string, which are: default, strip, debug and verboseDebug.
Fix #234

Agreed

@all-contributors add @Sweng0d for docs


Create a (Private -> Public) Playlist

The current comment for playlist creation does not match the 'public: true' parameter used in the actual function.

Coverage remained the same at 97.866% when pulling 13c81832d737193fea7237ddc1192ba2a49c29dc on yairdyule:patch-1 into be15f1c742b35134ce5bd35521d8bf1ab1ba67cf on thelinmichael:master.


Updates for release 7.0.13

Mainly documentation updates, referencing already merged PRs.

Not needed


Update response model

Agree. That's a clean solution. Add a separate attribute for the
userUniqueName and prioritize accordingly. No need to include the
requestedUserId in the subject, though. The requestedUserId is either the
personalNumber or userUniqueName thus already covered by the other
attributes.
On Thu, Sep 15, 2022, 15:07 Daniel Lindau @.***> wrote:

@.**** commented on this pull request.
Comment on how to create subject attributes.
In src/main/resources/wsdl/service-server.wsdl
https://github.com/curityio/netid-authenticator/pull/9#discussion_r971962810
:

@@ -1,5 +1,5 @@

-<wsdl:definitions xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://netid.secmaker.com/nias/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://netid.secmaker.com/nias/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://netid.secmaker.com/nias/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://netid.secmaker.com/nias/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
Does this mean that this version is only compatible with this version of
the nias server? My SOAP is rusty
In
src/main/java/io/curity/authenticator/netid/client/NetIdAccessAuthenticationAttributes.java
https://github.com/curityio/netid-authenticator/pull/9#discussion_r971961019
:

@@ -103,7 +103,7 @@ private static SubjectAttributes getSubjectAttributes(ResultCollect result)
private static void handleSubject(UserInfoType userInfo, List subjectAttributes)
{
@Nullable String personalNumber = userInfo.getPersonalNumber();

   @Nullable String userId = userInfo.getUserId();

We need to find a subject to use, and as long as all the attributes we
find is available in the result the admin can change to the one they want
using an action. To not break previous functinoality, I suggest we do a
prio-list:
personalNumber -> userId -> uniqueUserName -> requestedUserId, and then
put all four of them in the result. Wdyt?
—
Reply to this email directly, view it on GitHub
https://github.com/curityio/netid-authenticator/pull/9#pullrequestreview-1109155012,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOIP2KVLI7BVLRCYIKC4ZFTV6MNSFANCNFSM6AAAAAAQMNCQ4Y
.
You are receiving this because you commented.Message ID:
@.***>


Add MTR generator

We should include Marginal Tax Rates (MTRs) in the TaxBrain output and make them available for current law and the reform.
We can display these in a new table builder on the static output page underneath our current table builder.
The table builder options should include:

For year:  2017 [dropdown]
Current Law or Reform.
MTR with respect to: wages [dropdown containing all of the income types handled by the Tax-Calculator MTR class
Combined Taxes or Payroll taxes or Individual Income Taxes
Tab by Expanded Income* or by MTR income type
Dollar weighted or population weighted
Percentiles or Deciles
All tax units or Single or Joint or Head of Household or Married Filing Separately
Marginal propensity to consume medical expenses: 0 [numerical input field]
Marginal propensity to consume state and local taxes: 0 [numerical input field]
Marginal propensity to consume charitable cash contributions: 0 [numerical input field]
Marginal propensity to consume miscellaneous deduction expenses: 0 [numerical input field]

Note that the functions for generating the percentiles and deciles and various weighting schemes and breakdowns are already available in Tax-Calculator utils.py and used in an extremely similar context in mtr_graph_data.
In fact, if it is equally easy to default to a chart rather than a table and have a "download data option", that would be preferable.
A note on compute.
We can pre-calculate and cache all of the current_law marginal tax rates and various ways of slicing and dicing the data and store all of them in our database. Therefore, the user will be able to see the current law results immediately and choose get instantaneous feedback when choosing other selectors.
However,  given that there are many income types, and each one requires rerunning taxcalc several times, I don't think we can/should calculate the reform results at the same time as we are calculating the other static output because it would slow things down too much. Rather, whenever the user choose a new reform result, we should calculate their marginal tax rates for their chosen income type. When they choose another income type, we will have to kick off a new calculation marginal tax rates. We'll probably want a status bar to cover up the table while those calculations are happening.

@MattHJensen said:

We should include Marginal Tax Rates (MTRs) in the TaxBrain output and make them available for current law and the reform.
We can display these in a new table builder on the static output page underneath our current table builder.
The table builder options should include:  [snip]
Note that the functions for generating the percentiles and deciles and various weighting schemes and breakdowns are already available in Tax-Calculator utils.py and used in an extremely similar context in mtr_graph_data.
In  fact, if it is equally easy to default to a chart rather than a table and have a "download data option", that would be preferable.

In order to support these TaxBrain enhancements, we will need to add the bokeh graphing package to the taxcalc conda.recipe.  Right now there is a lot of code in utils.py that checks for availability of bokeh and it is difficult to maintain .  That code is irrelevant in most cases because the taxcalc-dev environment include bokeh and users of the Tax-Calculator CLI have no problems with the taxcalc package not including bokeh because bokeh is part of the standard Anaconda Python distribution.
Unless I hear cogent reasons for not adding bokeh to the conda.recipe, I'll do that in the near future.  Meanwhile, I'm going to drop the pesky code that checks for the availability of bokeh.
@MattHJensen @PeterDSteinberg @brittainhard

I would suggest that @PeterDSteinberg or @brittainhard attempt to launch
the web app on Heroku with bokeh in the required packages list. The package
is large and there is often an issue in bumping up against maximum slug
size. That's probably the most likely immediate negative impact of forcing
all users of taxcalc to have bokeh.
On Thu, Jun 8, 2017 at 3:49 PM Martin Holmer<EMAIL_ADDRESS>wrote:

@MattHJensen https://github.com/matthjensen said:
We should include Marginal Tax Rates (MTRs) in the TaxBrain output and
make them available for current law and the reform.
We can display these in a new table builder on the static output page
underneath our current table builder.
The table builder options should include: [snip]
Note that the functions for generating the percentiles and deciles and
various weighting schemes and breakdowns are already available in
Tax-Calculator utils.py and used in an extremely similar context in
mtr_graph_data.
In fact, if it is equally easy to default to a chart rather than a table
and have a "download data option", that would be preferable.
In order to support these TaxBrain enhancements, we will need to add the
bokeh graphing package to the taxcalc conda.recipe. Right now there is a
lot of code in utils.py that checks for availability of bokeh and it is
difficult to maintain . That code is irrelevant in most cases because the
taxcalc-dev environment include bokeh and users of the Tax-Calculator CLI
have no problems with the taxcalc package not including bokeh because
bokeh is part of the standard Anaconda Python distribution.
Unless I hear cogent reasons for not adding bokeh to the conda.recipe,
I'll do that in the near future. Meanwhile, I'm going to drop the pesky
code that checks for the availability of bokeh.
@MattHJensen https://github.com/matthjensen @PeterDSteinberg
https://github.com/peterdsteinberg @brittainhard
https://github.com/brittainhard
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/OpenSourcePolicyCenter/webapp-public/issues/464#issuecomment-307248359,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABzcWoTGnKLYrjhfrHWE0PtZTABo_WIfks5sCHp0gaJpZM4Ly6Pv
.

@talumbau said:

I would suggest that @PeterDSteinberg or @brittainhard attempt to launch the web app on Heroku with bokeh in the required packages list. The package is large and there is often an issue in bumping up against maximum slug size. That's probably the most likely immediate negative impact of forcing
all users of taxcalc to have bokeh.

I have no idea what slug size means ... can you explain.
I have checked the size of the tar.bz2 files that contain pandas and bokeh.
I find that the bokeh file is half the size of the pandas file.
If we can upload pandas to Heroku why could we not upload bokeh to Heroku?

https://devcenter.heroku.com/articles/slug-compiler

@talumbau said:

https://devcenter.heroku.com/articles/slug-compiler

Thanks for the pointer to the Heroku documentation.  In part, it says this:

Your slug size is displayed at the end of a successful compile after the Compressing message. The maximum allowed slug size (after compression) is 500 MB.

You didn't bother to say how big the taxcalc slug size is now without the bokeh package included.
When I install the latest bokeh package, I see this:
iMac2:pkgs mrh$ ls -l bokeh*
-rw-r--r--  1 mrh  staff  4295645 Jun  8 21:52 bokeh-0.12.5-py27_1.tar.bz2

So, bokeh compressed is about 4 megabytes.  How close are we to the 500 megabyte limit?
@MattHJensen @PeterDSteinberg @brittainhard

@PeterDSteinberg,
Can you tell us the current slug size of the taxcalc package uploaded to  Heroku?
This question has come up in webapp-public issue #464, but nobody has provided an answer.
@MattHJensen

@martinholmer asked five days ago:

@PeterDSteinberg,
Can you tell us the current slug size of the taxcalc package uploaded to Heroku?
This question has come up in webapp-public issue #464, but nobody has provided an answer.

I'm interpreting no answer to mean that the current Heroku slug size for the taxcalc package is substantially below the 500 megabyte maximum, and therefore, there is no problem adding the bokeh package to the taxcalc conda.recipe.
@MattHJensen @talumbau @PeterDSteinberg @brittainhard


Commits:

Added SF2 Serializer as submodule
initiated the sender
Initialized mail sender
initiated the sender
Initialized mail sender
Serialize was moved to external method into AbstractChainNode.
Now AbstractChainNode's constructor receives 3 parameters. There are adapter, serializer and configuration with DataHolderInterface
Tests for the last changes
Added the base part of MailSender
[mail] Added mail sender
[sender] Implemented native mailer
delete catcher

[adapter] Removed generic AdapterInterface
[refactoring] Added the changes according to the last code review
[refactoring] Fixed remaining places in the PR
[chain-node-refactoring] fix mail sender
[chain-node-refactoring] change interface
[chain-node-refactoring] fix callback
[chain-node-refactoring] fix abstract filter
[chain-node-refactoring] fix exception class filter
[chain-node-refactoring] fix abstract chain node
[chain-node-refactoring] revert filter method back.
[chain-node-refactoring] fix exception class filter
[chain-node-refactoring] fix error level filter
[chain-node-refactoring] fix duplicate exception filter
[chain-node-provider] fix exception summary provider
[chain-node-refactoring] fix subject provider
Added sender chain node implementation.
Commits:

Added SF2 Serializer as submodule
initiated the sender
Initialized mail sender
initiated the sender
Initialized mail sender
Serialize was moved to external method into AbstractChainNode.
Now AbstractChainNode's constructor receives 3 parameters. There are adapter, serializer and configuration with DataHolderInterface
Tests for the last changes
Added the base part of MailSender
[mail] Added mail sender
[sender] Implemented native mailer
delete catcher

[adapter] Removed generic AdapterInterface
[refactoring] Added the changes according to the last code review
[refactoring] Fixed remaining places in the PR
[chain-node-refactoring] fix mail sender

Approved


add contribution, code of conduct and license to readme

Description
Changes proposed in this pull request:

add readme sections as required by OSPO

Related issue(s)

will review after https://github.com/kyma-project/template-repository/pull/2 is merged


Middleware message.intent doesn't seem to work outside of DM

I based the code off of the examples written within the repo, but when leveraging the middleware system to listen to message intent, it only seems to work when in a DM conversation with the BOT but not in a group chat or channel. Any ideas?

Do you have any example code or error logs posted anywhere?

Closing for now, please reopen if you collect some additional information


Issue with multiple open proxies being created and not cleaned up

I'm using Typescript. Controller is created on each navigate to one of my pages. I create a new "Hub" inside my controller constructor. When I navigate away from the page, scope & controller are removed, but the "Hub" is never cleaned up and - through usage of my app for a while - I end up with many, many open hub proxies, with no way to clean them up.
Is this an issue, or is there a way to clean up a hub proxy when it's no longer in "scope"/used? (whilst still leaving the underlying connection open)

are there any updates regarding this issue?

@ronaldbluethl
Have you tried putting your hub instance in a service (that you inject in your controller) instead of a controller as per @JustMaier 's suggestion? That's how he originally intended it to be used...

^ this is what worked for me in the end

@DeBiese @mleyb Thanks four your replies. I finally got it working by removing the variable globalConnections and always returning a new connection instead of using a shared one in getConnection()
This is what works for me at the moment. Do you see any problem here? Is the approach putting the hub instance in a service maybe the better one?
var globalConnections = [];

function getConnection(options) {
			return initNewConnection(options);
		}

@ronaldbluethl If you don't want to use the globalConnections, you should just add useSharedConnections equal to false to your options. It will result in getConnection returning the output of initNewConnection... No need to change the getConnection function for that.
Still, I would put the hub in a service...

@DeBiese You're right. I totally overlooked that. Nevertheless, I do not really get the approach with the service. What is the big advantage of moving the hub into a service? Do you mean using @JustMaier's 'Hub' factory as a service? Thanks for the clarification.

I mean using a service as a wrapper around your hub. You create the hub in your service and expose methods/functions on the service that can invoke methods/functions on your hub.
The advantage of using the service approach is that you open only one hub proxy and that one hub can be used across all your controllers.
Take a look at the demo applications mentioned in the readme.
In the EmployeeGrid application look for the EmployeeGrid.js file. In the simplechat demo look for ChatService.js as an example.

Alright, now I got it. I was already using the described method. I misunderstood 'service' in this context, because the wrapper is actually an angular factory, not a service. Thanks for your help, really appreciated.


Gif support

So we do actually already have half support for GIFs because we have NYTPhotoViewer, it brings with it FLAnimatedImage.
SDWebImage also supports FLAnimatedImage.
If we change our UIImageViews out to be the FLAnimatedImageView we could begin to get them working throughout comments.
Additionally if we add ANIMATED_GIF_SUPPORT as a compiler flag - NYT should start showing them as GIFs also (see code below)
https://github.com/NYTimes/NYTPhotoViewer/blob/master/NYTPhotoViewer/NYTScalingImageView.m#L21

Ref #313

Test

OK, so I thought maybe the size would be an issue. Maybe not.

Re: Is it getting to https://github.com/NYTimes/NYTPhotoViewer/blob/master/NYTPhotoViewer/NYTScalingImageView.m#L125?
Yes, when you tap on the image; not before.

Also interesting: The NYTPhotoViewer master doesn't actually compile, and errors on FLAnimatedImage.

OK, so I had to do a carthage bootstrap. 🙄
It works in their example app. Maybe the issue is GitHub-related?

Try overriding the URL to a GIF hosted directly on Imgur or something (removing the parsing from Markdown or GitHub being an issue)

/**
 *  The image data to display.
 *
 *  This property's value, if non-`nil`, is preferred over `-image`. This allows clients to provide image data for FLAnimatedImage when the library is compiled with `ANIMATED_GIF_SUPPORT` defined.
 *
 *  Note that if you're working with a non-animated image, using a native `UIImage` will provide better performance. Therefore, it is recommended to return `nil` from this property unless this photo is an animated GIF.
 */

Aha!

So I can't seem to get it to work at this point, but this should be good enough of a pointer for someone else to pick this up. 😇

Ahh good spot! I know what it wants, and know how to do it -- Will pick this up 😄

FWIW, just passing it
self.imageData = image.sd_imageData()

didn't work either, and then I didn't want to look into it further.


Update aws-core, http-client-spi, ... to 2.17.10

Updates

software.amazon.awssdk:aws-core
software.amazon.awssdk:http-client-spi
software.amazon.awssdk:netty-nio-client

from 2.17.9 to 2.17.10.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "software.amazon.awssdk" } ]

labels: library-update, semver-patch

Superseded by #464.


Early trait bounds on generic types

Summary
Make it an API convention that generic types that have an interface
that always requires the same trait bounds on the same type parameters
should have those bounds directly in the type definition. Allow exceptions
from this rule for cases like planned changes or upholding backwards
compatibility.
Rendered

@Kimundi Thanks for this RFC, and sorry to be slow commenting on it.
I quite like this idea, and I think you've very carefully thought out the tradeoffs and nuances for rolling out; I'm basically happy to take the RFC as-is.
I would note that this has some interaction with implies bounds, though it's not clear if/when we'll get those. But essentially, that change would put even more pressure to follow the convention you're laying out here.

https://github.com/rust-lang/rust/pull/23176 is related.
It (unfortunately) "removes" the motivating example, by making Mutex<T> only consider the Send/Sync nature of T when considering that of the whole Mutex<T>, i.e. making the methods themselves not care about/require T: Send.

One

One thing that was not clear to me: the RFC mentions adding these bounds after the fact, but that would be a breaking change -- I presume we intend to follow this only for newer types, if we accept it now?

Arguably hoisting "universal" requirements to the struct level is a minor breaking change in that:

everyone genuinely using the type would have had those constraints already
adding those type constraints in client code is forward-backward compatible

On the RFC as a whole, I feel like this could largely be alleviated by better error message tooling overall. Right now we have a nasty habit of telling you the "last detail" of why your code is wrong. e.g. in this case we're telling you you're calling a non-existent method, where really this is just a consequence of missing the bound. I'm not familiar enough with the error-reporting tooling, but it seems plausible in theory to "explore" the type's impl's for matching names and construct plausible causes.
See also https://github.com/rust-lang/rust/issues/21793

Note: This RFC entered its Final Comment Period as of yesterday.

This RFC does seem to unfortunately contradict the decision made in https://github.com/rust-lang/rust/pull/23176, the rationale there being that operating generically over these types is much easier if the bounds are not required (as sometimes they may not be, for example deriving).
I think that the motivation here was also solved by that PR by only using the Send and Sync bounds when they're actually needed to cross a thread boundary of some form. For example the lock method of Mutex no longer requires that the type is Send.
Also, 1.0 has been released since this RFC was written, so I would personally prefer to take the opposite route of adding bounds to type definitions as soon as possible. Bounds should only be required when absolutely necessary, for example Send and Sync should usually only be necessary when determining whether a type itself is Send or Sync, not for the instance methods.

Yeah, with the new stance to have impls be as minimal as possible this RFC is largely obsoleted

@nikomatsakis: Ah, just re-read your comment.  Though Gankro's comment also holds true.

I think it's annoying to implement types this way, and by extension use them this way. Ironically (to me), trait bounds on a struct don't help you, because instead of being the default for any use of the struct, they simply become mandatory to repeat for any use of it.
I prefer the minimal route. Usually bounds on the struct definition is only required for A) Correspondance with Drop B) Using associated types in fields.

@alexcrichton I don't see that decision as being relevant here. As @huonw said there,

It is perfectly safe for an Arc<T> to stay on and be used on a single thread if T doesn't satisfy the necessary bounds. It just acts like a (expensive) Rc<T>.

In contrast, some types like HashSet<T> don't make any sense if T: !Hash—you can't even construct an instance with new(). I think types like that shouldn't be allowed at all—the alternative, as @Kimundi said, would still give errors late.

Ironically (to me), trait bounds on a struct don't help you, because instead of being the default for any use of the struct, they simply become mandatory to repeat for any use of it.

This happens to be the same reason why DatatypeContexts is going to be (or has been?) removed from Haskell.

The state of the standard library has definitely changed since this RFC was first opened, and the specific motivation listed has since been fixed. The policy in the standard library for now will likely be "do not mention bounds in datatype definitions unless the compiler requires it", but this is perhaps subject to change over time. Regardless, however, existing APIs cannot be altered due to backwards compatibility concerns, so I'm going to close this RFC now.
Thanks regardless though for it @Kimundi!


[FEATURE REQUEST] Excluding based on context (pasted vs relative path link image, regex)

What would be useful is to be able to:

Exclude files or folders like with the attachment management plugin, and it would be even better if we could have regex to exclude certain extensions, folders, or files, etc.
Exclude cases where I dragged and dropped an image that's already in the vault (relative path to an existing image in the vault).  It would be awesome if this setting could be overridden for certain folders as well just as with the above regex-based exclusions.

Organizing images that I've pasted from my clipboard into the vault is very useful, because it makes for an organized home for attachments.  However, I shouldn't care about other cases such as the ".svg" image that I have generated from my Excalidraw diagrams.  Setting #2 would mean that I can drag and drop this image into a note (using relative path essentially) without disconnecting the .svg from the Excalidraw plugin.
The prime issue here with Excalidraw + Custom Attachment Location - Excalidraw auto-updates the .svg when the diagram is changed, but this won't update in the notes that the .svg is a part of because Custom Attachment Location force changes the name.
Let me know if you need more context.

It might be the case that this is an issue with Attachment Management as well.  If your plugin is just a better version of that, then let me know 😆👍

@cybersader please provide a test vault and a video to demonstrate how you want it to be improved

Closing as no answer provided


msrdc.exe spams .etl files in RdClientAutoTrace directory

Version
Microsoft Windows [Version 10.0.19045.2546]
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
<IP_ADDRESS>-microsoft-standard-WSL2
Distro Version
Ubuntu 20.04
Other Software
Docker Desktop (Windows), version 4.16.3
JetBrains Toolbox <IP_ADDRESS>01, Windows 10.0
Repro Steps
Start Docker Desktop and work with some containers
Expected Behavior
No new .etl files in C:\Users\username\AppData\Local\Temp\DiagOutputDir\RdClientAutoTrace
Actual Behavior
I see the msrdc.exe process in my Windows which creates spam of .etl files in the C:\Users\username\AppData\Local\Temp\DiagOutputDir\RdClientAutoTrace directory from time to time. Full path of the msrdc process: C:\Program Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_<IP_ADDRESS>_x64__8wekyb3d8bbwe\msrdc.exe /v:1DA2E607-905F-45FE-8912-D4B1F8019ABF /hvsocketserviceid:8C4086BF-FACB-11E6-BD58-64006A7986D3 /silent /wslg /plugin:WSLDVC_PACKAGE /wslgsharedmemorypath:WSL\1DA2E607-905F-45FE-8912-D4B1F8019ABF\wslg "C:\Program Files\WindowsApps\MicrosoftCorporati...
Diagnostic Logs
No response

@nevmerzhitsky, thanks for reporting the issue, do you observe same issue when WSL is launched without docker? such as start WSL by wsl.exe command from Windows's command prompt or terminal?
@ligq, do you also use Doccker desktop?
And if you can share us a few of those *.etl, it would help us to diagnostic the issue, thanks!

@nevmerzhitsky, thanks for reporting the issue, do you observe same issue when WSL is launched without docker? such as start WSL by wsl.exe command from Windows's command prompt or terminal?
@ligq, do you also use Doccker desktop?
And if you can share us a few of those *.etl, it would help us to diagnostic the issue, thanks!

No, I am not using Docker.
I had this issue since I updated wsl to the latest version last week. (I updated wsl from MS store).
Every 30 seconds a .etl file was created.
The attached is a .etl file.
RdClientAutoTrace-WppAutoTrace-20230211-164020-138.zip

@nevmerzhitsky, thanks for reporting the issue, do you observe same issue when WSL is launched without docker? such as start WSL by wsl.exe command from Windows's command prompt or terminal?

Yes, files are create even when Docker Desktop stopped.
But today I was noticed that JetBrains Toolbox (<IP_ADDRESS>01, Windows 10.0) related to the issue: I see a new .etl file is created after just I started the Toolbox (without starting PhpStorm/PyCharm even). I think the Toolbox triggers the start of my WSL's Ubuntu to scan my PHP/Python projects whose all located on WSL's filesystem. The created .etl file: RdClientAutoTrace-WppAutoTrace-20230211-171635-606.zip

I have not installed anything about JetBrains.

Today I updated the wsl to the latest version, still got this issue.
And I found if I keep a wsl terminal open, no new .etl file is created.

@ligq, would you please clarify what do you mean by "wsl terminal" ? If you close "wsl terminal" (and keep new files being created), what do you see when you type wsl --list -v in Windows command prompt? thanks!

"wsl terminal" means I run wsl in the windows terminal.
After I close windows terminal, then the new .etl files are being created every 30 seconds.
PS C:\Users\ligq> wsl --list -v
NAME            STATE           VERSION

Ubuntu-22.04    Running         2

Hi,
Any updates regarding this issue?

Seems this issue has been solved, after I updated the wslg and windows to the last versions.
WSL version: <IP_ADDRESS>
Kernel version: <IP_ADDRESS>
WSLg version: 1.0.50
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1413

I am waiting for a solution to this issue...

May relate to https://github.com/microsoft/WSL/discussions/8486

I just discovered that my system is generating these log files every time File Explorer scans the system for drives. This happens whenever I open Explorer to the Home location and again every time it refreshes the tab. The log retention is exactly one week, and currently I have a few hundred of the logs totaling 3 GB. More information in the related discussion linked above. Hope this helps you with troubleshooting or corrective action.

File explorer definitely isn't the only thing creating these log entries, because a couple dozen have shown up in my logs tonight while I was watching videos in Chrome.

First, please allow me to clarify a few things.
1: One log file is always created every time when WSL/WSLg is launched. Thus, if WSL is terminated (aka wsl --shutdown) and restarted "repeatedly", it can end up large number of files being created.
2: Log files older than one week will be deleted, but there is no limit by number of files or total size of all files in the folder.
3: When Linux GUI applications are used, the size of one currently active log file can grow over time, but it shouldn't be significant, it should be less then 2~300mb even active WSL session is running more than 1 month.
Above 3 are currently expected behavior, but we are looking into to add limit by number of files.
Second, if WSL/WSLg is not terminated and relaunched repeatedly (like 1), but new log files are being created, or log files keep growing more than 500mb, this is not what's expected, thus, if you are experiencing such issues, please share a few log files with us, we would like to see as many as possible cases, and please make sure you are on the latest version of WSL, thanks!

@nevmerzhitsky, thanks for sharing log file

file: RdClientAutoTrace-WppAutoTrace-20230211-171635-606.zip

From provided log file, it's very likely your case is fixed by https://github.com/microsoft/weston-mirror/pull/138, which will be included in next WSL update, thanks!

If I have an active WSL terminal open, I only see one log entry for the session, and opening File Explorer is instantaneous. However, if I close the WSL terminal, then any refresh of the File Explorer "Home" view will start a fresh WSL process. There's a noticeable delay (with progress bar) while File Explorer starts WSL, which I can see in Task Manager. If I leave the File Explorer window open, it'll start WSL again every few minutes when the view auto-refreshes.
That still doesn't explain what happened yesterday, though, as I wasn't actively using WSL or File Explorer. I presume that some other background process must have scanned the WSL drive. I'm attaching some of the logfiles from last night, including at least one log caused by File Explorer and a few more from unknown sources.
RdClientAutoTrace-WppAutoTrace-20230321.zip
Altogether there were about 2 dozen logfiles accumulated last night. Right in the middle of them, I can see this entry in Event Viewer:
Faulting application name: DllHost.exe, version: 10.0.22621.1, time stamp: 0x05e70ed3
Faulting module name: KERNELBASE.dll, version: 10.0.22621.1413, time stamp: 0x5129184b
Exception code: 0x80000003
Fault offset: 0x0000000000107d22
Faulting process id: 0x0x3684
Faulting application start time: 0x0x1D95BC690A6C0DD
Faulting application path: C:\WINDOWS\system32\DllHost.exe
Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll
Report Id: 29adb7c7-1fcc-4765-af4b-5ec5fae754d5
Faulting package full name: MicrosoftCorporationII.WindowsSubsystemForLinux_<IP_ADDRESS>_x64__8wekyb3d8bbwe
Faulting package-relative application ID: wsl

This is the first time I've noticed an error like that, no idea whether it's related.
What's the recommended way to check WSL for updates?

@bszonye,

What's the recommended way to check WSL for updates?

Please try wsl --update, this will install update if available. I think there is no way to just check if update is available without installing it, @benhillis? thanks!

Thanks! The update command says that I'm already running the latest version.

I'm now seeing this as well, started randomly possibly after an update to Windows (on Beta channel insider builds)
It's creating about one file every second all of which are around 8MB and it's filling up my drive extremely quickly and with tons of unnecessary writes.
I've attached a random one here if that helps at all, couldn't see anything noteworthy - happens whenever WSL is running at all, have to use wsl --shutdown to stop. Up to date, installed from MS Store. Tried uninstalling and reinstalling WSL entirely and did not fix it.
RdClientAutoTrace-WppAutoTrace-20230626-023310-410.zip

@MattJeanes, thank you very much for sharing the log, the log indicates the socket is disconnected and it seems triggered from Linux VM side, do you see any dumps at /mnt/wslg/dumps? if not, please share /mnt/wslg/*.log with us, (note, this folder is cleaned up at every WSL start up, thus, dumps/logs need to be collected while active WSL instance is experiencing the issue) thanks!
[for internal reference]
::AP=c9281653::0 bytes read -- WSock has gracefully terminated, socket 3336 : 0.226455500
[c9281653]Read operation failed: freeing the read buffer. : 0.226456200

@hideyukn88 thank you for looking into this. I was not able to find any dumps in the /mnt/wslg/dumps folder, but I have attached the log files. I can see a couple of interesting things like unable to checkDescriptor for 0x55b601632160 and this in the wlog.log file:
[01:35:58:789] [9:9] [INFO][com.freerdp.core.gcc] - Active rdp encryption level: NONE
[01:35:58:789] [9:9] [INFO][com.freerdp.core.gcc] - Selected rdp encryption method: NONE
[01:35:58:792] [9:9] [ERROR][com.freerdp.core.info] - failed to convert Domain string
[01:35:58:792] [9:9] [ERROR][com.freerdp.core.peer] - peer_recv_callback: CONNECTION_STATE_SECURE_SETTINGS_EXCHANGE - rdp_recv_client_info() fail
[01:35:58:792] [9:9] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
[01:35:59:126] [9:9] [INFO][com.freerdp.core.connection] - Client Security: NLA:0 TLS:0 RDP:1
[01:35:59:126] [9:9] [INFO][com.freerdp.core.connection] - Server Security: NLA:0 TLS:0 RDP:1
[01:35:59:126] [9:9] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:0 TLS:0 RDP:1
[01:35:59:126] [9:9] [INFO][com.freerdp.core.nego] - Turning off encryption for local peer with standard rdp security
[01:35:59:129] [9:9] [ERROR][com.freerdp.core.gcc] - Unknown GCC client data block: 0xC00C
[01:35:59:129] [9:9] [ERROR][com.freerdp.core.gcc] - Unknown GCC client data block: 0xC00D

I'm sure there is other useful stuff in the logs too! Please let me know if you need anything else or wish to reach out directly to me to investigate, I really appreciate it.

Oops, didn't actually attach the file - here it is!
logs.zip

@MattJeanes, thank you very much for log, as you pointed, below error is the fatal and this causes the disconnection of remote desktop protocol.
[01:35:58:792] [9:9] [ERROR][com.freerdp.core.info] - failed to convert Domain string
While error message indicates it's failing to convert "Domain" string, but based on FreeRDP source code, it can be either "Domain name", "User name", "Password", "AlternateShell" or "WorkingDirectory".
What it does here is, Windows sends these strings in Unicode, and FreeRDP is converting to UTF-8, and this conversion is failed.
But based on the RdClientAutoTrace you provided which logs what Windows is sending to Linux side; these are simply  (below screen capture). There is no logging for "Password" for security purpose, but this should be  as well. At my environment, these are all . Thus, I can't tell why conversion has been failed at your end.
So, just in case, I believe you have multple RdClientAutoTrace files can be found on your local disk, would you please share a few more of them? And is it possible you can run privately build version of WSLg with extended logging? if yes, I can send something to you. thank you very much for your help!

@hideyukn88 yes I am happy to run debug versions of WSLg if you can share how to do that.
If you would like to reach out over email you can find it on my GitHub profile, although it is also useful to be talking in this public thread as well in case anyone else is seeing similar issues.
Here is a zip with 73 of those logs from when I booted WSL up earlier to grab those logs for you 🙂
They compress very well, 600MB down to 3MB!
RdClientAutoTrace.zip

@MattJeanes, would you please try attached private system distro VHD (at below link, unzip it first). You can install it by following steps at https://github.com/microsoft/wslg/blob/main/CONTRIBUTING.md#installing-a-private-version-of-the-wslg-system-distro. Once the issue occurs again, please share /mnt/wslg/wlog.log with us, the log contains some additional information including the "Password" field mentioned above, it should be nil, but just in case, please double check, if it's exposing your real password or other than nil, please simply remove it and let us know, thanks for helping!
https://1drv.ms/u/s!AqQ2qEh_9iIOhqkPVs2_V0Z9dWoOrg?e=16q5df

@hideyukn88 I have done that and the much more verbose log is attached below! Password is indeed showing nil as you said it should.
The issue happens immediately after booting WSL and I have also noticed the mouse cursor often showing the 'working in background' symbol (pic below) and flickering back to the normal mouse seemingly every time it writes one of these files. Not sure if that's relevant but thought worth noting!

wlog.zip

Oh also, some extra system information in case it is useful:
Windows build: 22H2 (OS Build 22631.1900)
Insider settings: Beta channel
Distro: Ubuntu from MS Store
uname -a: Linux Matt-PC <IP_ADDRESS>-microsoft-standard-WSL2 #1 SMP Fri Jun 2 00:45:15 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
I have docker desktop installed but the issue was also happening without it installed, and happens with only the primary Ubuntu WSL runnning:
C:\_git> wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu                 Running         2
  docker-desktop-data    Stopped         2
  docker-desktop         Stopped         2

As I mentioned I also tried completely uninstalling WSL as much as I could and re-installing it to no avail.

@MattJeanes, thanks for collecting additional log, First, the mouse cursor behavior is expected as msrdc.exe is repeatedly starting up in background, it changes between busy and idle state. Second, from your log, the data failed to be converted is nothing difference from mine and it is successfully converted at my local machine, so there must be another factor other than the Unicode string itself.

and happens with only the primary Ubuntu WSL runnning:

This is interesting, if possible, would you please install other Linux distro, such as Debian or Arch Linux to see if this issue occurs, thanks!

@MattJeanes, for diagnostics purpose, I rebuilt system distro private VHD without ICU library (which in charge of Unicode conversion) and switch to WinPR's inhouse conversion, would you please try this?
https://1drv.ms/u/s!AqQ2qEh_9iIOhqkRO2bCFSyGqmt23Q?e=biDVq4

@hideyukn88 I have tried Arch WSL from the Microsoft Store and with only that one running it still shows the same issue:
C:\_git> wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu                 Stopped         2
  docker-desktop-data    Stopped         2
  Arch                   Running         2
  docker-desktop         Stopped         2

I have also tried your new system VHD (back on Ubuntu now) and it unfortunately has not helped the issue. Attached below is a zip containing one of the RdClientAutoTrace files and the wlog.log file.
logs.zip
I really appreciate your help with this by the way, hope we can get to the bottom of this!

@hideyukn88 sure, have attached logs below.
wlog.zip

@MattJeanes, I've updated to address possible buffer handling, please try again.
https://1drv.ms/u/s!AqQ2qEh_9iIOhqkWmWhadTTAxMby2g?e=tyHbzv

@hideyukn88 I think you're onto something  it looks to be working 😄 I can now open graphical apps successfully!

There is one file it has created in the DiagOutputDir but it is no longer spamming. I have attached it and the wlog.log again, very promising results! Still some errors in the wlog.log but not sure if they are normal.
logs.zip

@MattJeanes, thanks for checking, it's good to hear it's working!

Still some errors in the wlog.log but not sure if they are normal.

These are not really error but I logged them in that way (easy to tell), so all looks good, thank you very much for helping us to solve this! thanks!

Ah okay, great! No problem at all, I am super happy that you've been able to fix this and so quickly as well 🙂
I was a little worried that I would be shouting into the wind by commenting here originally so I am very glad to be proven wrong.
I'll keep running the custom system.vhd for now but if you could let me know when the fix is out on the MS Store that would be super useful.
Again really appreciate you looking into this for me, hope you have a great rest of the week!

I'm having the exact same issue as MattJeanes (down to the flickering cursor), I tried using the latest custom system.vhd provided by @hideyukn88, but I'm still getting ~10 .etl files per second. This has been going on for a couple weeks now.
Some details:
Windows 11 22H2 (22631.1972 ni_release)
> wsl -l -v
  NAME      STATE           VERSION
* Ubuntu    Running         2

> wsl -v
WSL version: <IP_ADDRESS>
Kernel version: <IP_ADDRESS>-3
WSLg version: 1.0.54
MSRDC version: 1.2.4240
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.22631.1972

> cat .\.wslgconfig
[system-distro-env]
WESTON_RDP_HI_DPI_SCALING=true
WESTON_RDP_FRACTIONAL_HI_DPI_SCALING=true
WESTON_RDP_DEBUG_DESKTOP_SCALING_FACTOR=1OO

[wsl2]
guiApplications=false
systemDistro=C:\\Users\\<Path_To_File>\\system.vhd

Here's a zip containing a dump of some  .etl files from a minute ago, as well as my wslg.log.
RdClientAutoTrace-and-wlog.zip
Let me know if I can provide any more info. Any help would be hugely appreciated. This is eating up my storage.
Thanks!

@camerondubas, using my private VHD shouldn't cause such network issue, just in case, would you please re-download the VHD and try again? If persist, would you please take WSL log following https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method, thanks!

(edit: had some incorrect config. Made some progress and updated this comment to reflect that)
I'm having the exact same issue as MattJeanes (down to the flickering cursor), I tried using the latest custom system.vhd provided by @hideyukn88, but that causes wsl to crash on start with this error:
The network name cannot be found.
Error code: Wsl/0x80070043

[process exited with code<PHONE_NUMBER> (0xffffffff)]

I tried running netsh winsock reset (suggested here), but that didn't help.
Some details: Windows 11 Home 22H2 (22631.1972 ni_release)
> wsl -l -v
  NAME      STATE           VERSION
* Ubuntu    Running         2

> wsl -v
WSL version: <IP_ADDRESS>
Kernel version: <IP_ADDRESS>-3
WSLg version: 1.0.54
MSRDC version: 1.2.4240
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.22631.1972

> cat .\.wslgconfig
[system-distro-env]
WESTON_RDP_HI_DPI_SCALING=true
WESTON_RDP_FRACTIONAL_HI_DPI_SCALING=true
WESTON_RDP_DEBUG_DESKTOP_SCALING_FACTOR=1OO

> cat ./.wslconfig
[wsl2]
systemDistro=C:\\Users\\<Path_To_File>\\system.vhd

Setting guiApplications=false in .wslconfig does stop the logging. Using this as a workaround for now.
Here's a zip containing a dump of some .etl files from a minute ago, as well as my wslg.log. RdClientAutoTrace-and-wlog.zip
Let me know if I can provide any more info, Thanks!

Having the same configuration in my system. Uploading the trace etl file. I have tried doing the registry tweak, re-install etc. Did not help.
RdClientAutoTrace-WppAutoTrace-20230710-034045-804.zip
PS C:\Users\Dell> wsl -v
WSL version: <IP_ADDRESS>
Kernel version: <IP_ADDRESS>-3
WSLg version: 1.0.54
MSRDC version: 1.2.4240
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.22631.1972
PS C:\Users\Dell> wsl -l -v
NAME      STATE           VERSION

Ubuntu    Stopped         2
osuse     Stopped         2

I dont know what i do, wsl or other, but when i searching in google i found this page, can i just delete this folder C:\Users\cpanel\AppData\Local\Temp\DiagOutputDir because using my space 22.7 GB (24,448,598,016 bytes)
Thanks

I dont know what i do, wsl or other, but when i searching in google i found this page, can i just delete this folder C:\Users\cpanel\AppData\Local\Temp\DiagOutputDir because using my space 22.7 GB (24,448,598,016 bytes) Thanks

Yes, you can.

I am getting about 140 new such files per minute.

I am getting about 140 new such files per minute.

damn ☠

@lexavey, thanks for sharing your experience, it is unfortunate that this issue is still not addressed. While the log is deleted automatically time to time, but it was not enough in this case. I have added some mitigation for this by #1082, so that it will not take out large amount of space on user's disk. If you can share a few of those files, it will help us to understand more about this issue or your specific situation, thanks!

This is output of wsl --version :
WSL version: <IP_ADDRESS>
Kernel version: <IP_ADDRESS>-1
WSLg version: 1.0.55
MSRDC version: 1.2.4419
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25880.1000-230602-1350.main
Windows version: 10.0.22631.2050

In WSL :
ubuntu@Optiplex:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
ubuntu@Optiplex:~$

The file in C:\Users\cpanel\AppData\Local\Temp\DiagOutputDir\RdClientAutoTrace generated when i open cmd.exe and type bash then enter, wait for one minute (maybe) then file RdClientAutoTrace-WppAutoTrace-XXX.etl generated.
Now i close wsl with wsl --shutdown, new file named RdClientAutoTrace-WppAutoTrace-20230721-193223-562.etl generated again.
So i try open wsl with bash and close with wsl.exe --shutdown new .etl file generated, every open and close new file generated.
RdClientAutoTrace-WppAutoTrace-20230721-192741-810.zip

@hideyukn88 So RdClientAutoTrace etl files are error/crash logs? Due to their frequency I previously assumed they were debug logs. I seems to be if they are error/crash logs, we need to find out the root causes of error/crash right? Otherwise limiting process restart etc.. is just a band air. If these are crash logs, can you please share how to open/read them? That way users can maybe help with diagnosis?

Dupe of https://github.com/microsoft/WSL/issues/10216 ?

@sarim, no, they are not error/crash log, those logs are being created even everything is perfectly working, and unfortunately user can not read these logs in meaningful way. The log can be opened by wpa.exe (Windows Performance Analyzer) which tool is available publicly, but in order to access important logging information, it requires full private debug symbols of msrdc which is not available publicly, thanks!

@lexavey, the behavior you observed is expected, the new log file is created every fresh WSL startup, and the log you provided does not show any errors, everything is working as expected, then WSL is terminated after roughly 50 secs of idle time. In this case, https://github.com/microsoft/wslg/pull/1082 will not prevent from new log file being created, thus we are also working on to limit the number of files being created (or any other possible limitation), thanks!

Hello! I just had 23.3 GB worth of disk space consumed by these etl logs until I stopped WSL manually. It is after I stopped it that I realised I had lost so much space. This hasn't happened to me before - at least at this scale.
I just had my primary (and only) WSL distro sitting open, while I was working on something else. After reading this thread, I realise that msrdc.exe probably kept restarting - because I had my mouse flickering to the "working in background" state every other second.

@hideyukn88 I have tried the new VHD and it looks good to me! It's created one file and appears to be holding it open which I believe is intended behaviour

I had 32 874 files, total size 205 GiB. Any solution?

Exactly the same issue here 240GB of log files deleted. I am running WSL2 Ubuntu 20.04 LTS and Docker desktop.

@hideyukn88 I have tried the new VHD and it looks good to me! It's created one file and appears to be holding it open which I believe is intended behaviour

I can also confirm this fix works 🙌. I was unable to use the PC as constant low diskspace.

Not reproduced for me anymore, thanks!
$ wsl -v
Версия WSL: <IP_ADDRESS>
Версия ядра: <IP_ADDRESS>-1
Версия WSLg: 1.0.59
Версия MSRDC: 1.2.4677
Версия Direct3D: 1.611.1-81528511
Версия DXCore: 10.0.25880.1000-230602-1350.main
Версия Windows: 10.0.19045.3636

Docker Desktop (Windows), version 4.25.0 (126437)
JetBrains Toolbox <IP_ADDRESS>44, Windows 10, x64

I just deleted 50gb of logs.
I tried the trick of renaming the folder to RdClientAutoTrace.xxx so it looks like a file, reports said this would stop logs writing to it. But a few seconds later some process (I have shut down WSL already????) recreates the RdClientAutoTrace folder and logs start dumping in.
This thread was last commented over a year ago. I am pretty sure my WSL install isn't even that old, maybe 8 months? So as of 8 months back, there was no update to the default install that prevented this behaviour, I assume.
Is there now?
Or Is the best method still "download this random file from @hideyukn88 ?
I only have a 1Tb SSD, I can't be losing 100gb to logs every week or so.


Info about upcoming removal of packages in the General registry

As described in https://discourse.julialang.org/t/ann-plans-for-removing-packages-that-do-not-yet-support-1-0-from-the-general-registry/ we are planning on removing packages that do not support 1.0 from the General registry. This package has been detected to not support 1.0 and is thus slated to be removed. The removal of packages from the registry will happen approximately a month after this issue is open.
To transition to the new Pkg system using Project.toml, see https://github.com/JuliaRegistries/Registrator.jl#transitioning-from-require-to-projecttoml.
To then tag a new version of the package, see https://github.com/JuliaRegistries/Registrator.jl#via-the-github-app.
If you believe this package has erroneously been detected as not supporting 1.0 or have any other questions, don't hesitate to discuss it here or in the thread linked at the top of this post.

This package remains useful to me, and perhaps to some others — there have been several PRs making the minor updates needed.
Perhaps it’s worth re-opening the question of simply switching the registered version to point to a fork. How do we do this?
CC from #8: @StefanKarpinski, @andreasnoack. See also https://github.com/JuliaLang/julia/issues/1845

Yeah, if the package would be removed otherwise I think repointing it to a fork makes sense. https://github.com/AndyGreenwell/GroupSlices.jl/issues/8 has been open for a year as well so ample time has been given. Opening a PR to the registry to just change the URL should be enough.


More test clean up

Remove trailing \n from t.Log and t.Error messages as it's unnecessary.
In some instances, combine multiple t.Error()s into one
To provide more consistency across the tests, rename e to err and use %v as the format arg for errors.
Replace Logf and Errorf with Log and Error when it made sense.  For example t.Errorf("%v", err) to t.Error(err)
Run gofmt -s over the code to simplify it.

Could you fixed the go1.3 compile failure?
The gofmt -s makes sense, but could you separate those out in another PR?

gofmt changes reverted


O365 connectors within Teams will be deprecated

Just a follow up issue to track https://github.com/atc0005/go-teams-notify/issues/262 as MS deprecated office connectors and you now need to use workflows.
Once the library is updated, we need to pull it in to this repo to ensure teams webhooks keep working

Thanks a lot for reaching out, @firefart! I've opened a new issue that I encountered while trying to fix this. Will close this here issue once everything has been resolved.


FEATURE: Create plugin Before-you-leave

Is your feature request related to a problem? Please describe.
We want specific actions when user wants to leave page.
Describe the solution you'd like
When user wants to leave page there is some kind of popup: "oh no. youre leaving? Consider donation". Message should be configurable and internationalizable (can contain hmtl code)
It should be created in another repository as a platzky plugin.

you can find example here:
https://github.com/platzky/platzky-redirections/


Feature  new ss methods

Added:

Katz selector
Community Based Influence Maximisation selector
Closeness selector
Betweenness selector

Codecov Report

Merging #20 (4aa99e3) into master (0ab9b7d) will decrease coverage by 12.97%.
The diff coverage is 24.37%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@             Coverage Diff             @@
##           master      #20       +/-   ##
===========================================
- Coverage   77.61%   64.64%   -12.97%
===========================================
  Files          31       36        +5
  Lines        1376     1816      +440
===========================================
+ Hits         1068     1174      +106
- Misses        308      642      +334

Impacted Files
Coverage Δ

network_diffusion/models/mlt_model.py
28.88% <0.00%> (ø)

network_diffusion/mln/functions.py
30.12% <7.69%> (-6.89%)
:arrow_down:

network_diffusion/seeding/cbim.py
16.01% <16.01%> (ø)

network_diffusion/models/mic_model.py
29.16% <29.16%> (ø)

network_diffusion/seeding/betweenness_selector.py
64.28% <64.28%> (ø)

network_diffusion/seeding/closeness_selector.py
66.66% <66.66%> (ø)

network_diffusion/seeding/katz_selector.py
66.66% <66.66%> (ø)

network_diffusion/__init__.py
100.00% <100.00%> (ø)

network_diffusion/models/__init__.py
100.00% <100.00%> (ø)

network_diffusion/seeding/__init__.py
100.00% <100.00%> (ø)

... and 1 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Trigger Release 3.16.0

Trigger Release 3.16.0

In my opinion this is a breaking Release, because of: https://github.com/zio/zio-quill/pull/2412
In order to  follow semantic versioning this has to be a 4.0.0 ?


how to set the \alpha coefficient in Depth Similarity Function?

Hi. You reported the best performance with \alpha set to 8.3. My question is how to set the \alpha coefficient in Depth Similarity Function? I didn't find the corresponding code in your repo.

I found the code:
val *= exp(-abs(Di - Dval));
which means \alpha was set to 1 by default, is that correct?

I want to know where is the corresponding code .Have you solved it?

models/ops/depthavgpooling(or depthconv)/src/depthavgpooling(or depthconv)_cuda_kernel.cu


Proposal to Add Packer Build Support for Windows Container

Dear @ChristopherHX and fellow developers,
First and foremost, I would like to express sincere gratitude to @ChristopherHX for the valuable contributions that enable us to smoothly utilize GitHub's official actions/runner through ChristopherHX/gitea-actions-runner. Additionally, I appreciate the efforts put into the project https://github.com/ChristopherHX/runner.server, which adds support for Windows Container to actions/runner.
However, as the scripts executed by actions/runner are based on Node.js, using the standard Microsoft Windows image directly does not meet our requirements. We need to pack additional components such as nodejs and git to fulfill our needs.
During my exploration, I came across the windows-2019.json file in actions/runner-images. I noticed that it is packed using the packer tool, and the related file can be found here:
https://github.com/actions/runner-images/blob/main/images/windows/templates/windows-2019.json
#https://github.com/hashicorp/packer/releases
To meet our specific needs, I attempted to pack a Windows Container image using the following Packer configuration on Windows:
# builds.pkr.hcl
packer {
  required_plugins {
    docker = {
      version = ">= 0.0.7"
      source  = "github.com/hashicorp/docker"
    }
  }
}

source "docker" "windowsltsc" {
  image  = "mcr.microsoft.com/windows/servercore:ltsc2019"
  commit = true
  windows_container = true
}

build {
  name = "Build"
  sources = [
    "source.docker.windowsltsc"
  ]
  provisioner "powershell" {
     inline = [ "echo Hello World!" ]
  }

  post-processor "docker-tag" {
     repository = "runner-images/windows"
     tags = ["runner-hostedtoolcache-ltsc2019"]
  }
}

packer init .\builds.pkr.hcl
packer build .\builds.pkr.hcl

PS C:\Users\Administrator> packer -v
1.7.0
PS C:\Users\Administrator\Desktop\windows_2019_docker> packer build .\builds.pkr.hcl
Build.docker.windowsltsc: output will be in this color.

==> Build.docker.windowsltsc: Creating a temporary directory for sharing data...
==> Build.docker.windowsltsc: Pulling Docker image: mcr.microsoft.com/windows/servercore:ltsc2019
    Build.docker.windowsltsc: ltsc2019: Pulling from windows/servercore
    Build.docker.windowsltsc: Digest: sha256:4fe58f25a157ea749c7b770acebfdbd70c3cb2088c446943e90fe89ea059558b
    Build.docker.windowsltsc: Status: Image is up to date for mcr.microsoft.com/windows/servercore:ltsc2019
    Build.docker.windowsltsc: mcr.microsoft.com/windows/servercore:ltsc2019
==> Build.docker.windowsltsc: Starting docker container...
    Build.docker.windowsltsc: Run command: docker run -v C:\Users\Administrator\AppData\Roaming\packer.d\tmp464450642:c:/packer-files -d -i -t --entrypoint=powershell -- mcr.microsoft.com/windows/servercore:ltsc2019
    Build.docker.windowsltsc: Container ID: 6d8f1bd3ea6f47b68c75b034c2bc79d50d662b22ccfb4a52be356849eb044b73
==> Build.docker.windowsltsc: Using dockerWindowsContainer communicator to connect:
==> Build.docker.windowsltsc: Provisioning with Powershell...
==> Build.docker.windowsltsc: Provisioning with powershell script: C:\Users\ADMINI~1\AppData\Local\Temp\2\powershell-provisioner255266019
    Build.docker.windowsltsc: Hello
    Build.docker.windowsltsc: World!
==> Build.docker.windowsltsc: Committing the container
    Build.docker.windowsltsc: Image ID: sha256:8a8c7941967a94d6fb7a21de8c3378dfb2c141feae8695f6bc510fdc78df63c5
==> Build.docker.windowsltsc: Killing the container: 6d8f1bd3ea6f47b68c75b034c2bc79d50d662b22ccfb4a52be356849eb044b73
==> Build.docker.windowsltsc: Running post-processor:  (type docker-tag)
    Build.docker.windowsltsc (docker-tag): Tagging image: sha256:8a8c7941967a94d6fb7a21de8c3378dfb2c141feae8695f6bc510fdc78df63c5
    Build.docker.windowsltsc (docker-tag): Repository: runner-images/windows:runner-hostedtoolcache-ltsc2019
Build 'Build.docker.windowsltsc' finished after 56 seconds 935 milliseconds.

==> Wait completed after 56 seconds 935 milliseconds

==> Builds finished. The artifacts of successful builds are:
--> Build.docker.windowsltsc: Imported Docker image: sha256:8a8c7941967a94d6fb7a21de8c3378dfb2c141feae8695f6bc510fdc78df63c5
--> Build.docker.windowsltsc: Imported Docker image: runner-images/windows:runner-hostedtoolcache-ltsc2019 with tags runner-images/windows:runner-hostedtoolcache-ltsc2019

PS C:\Users\Administrator> docker images
REPOSITORY                             TAG                               IMAGE ID       CREATED          SIZE
runner-images/windows                  runner-hostedtoolcache-ltsc2019   8a8c7941967a   17 seconds ago   4.62GB
mcr.microsoft.com/windows/servercore   ltsc2019                          c632661e39bb   3 weeks ago      4.61GB

This configuration ran successfully, producing the desired Windows Container image.
I would like to inquire whether @ChristopherHX has considered packing windows-2019 using packer to broaden the support for Windows Container.
Once again, thank you for your contributions and time.
Best regards,
oilrich25

I saw https://github.com/actions/runner-images/blob/main/images/windows/templates/windows-2019.json and its components are quite large, but in actual applications only go may be used , docker, node, donet, python, pwsh, choco, git, Visual Studio 2019, etc. @ChristopherHX What do you think? Could you please enable this project?

I tried adding provisioner "windows-restart"
packer {
   required_plugins {
     docker = {
       version = ">= 0.0.7"
       source = "github.com/hashicorp/docker"
     }
   }
}

source "docker" "windowsltsc" {
   image = "mcr.microsoft.com/windows/servercore:ltsc2019"
   commit = true
   windows_container = true
}

build {
   name = "Build"
   sources = [
     "source.docker.windowsltsc"
   ]
   provisioner "powershell" {
      inline = [ "echo Hello World!" ]
   }

   provisioner "windows-restart" {
      restart_timeout = "10m"
   }

   post-processor "docker-tag" {
      repository = "runner-images/windows"
      tags = ["runner-hostedtoolcache-ltsc2019"]
   }
}

The log is as follows:
PS C:\Users\Administrator\Desktop\windows_2019_docker> packer build .\builds.pkr.hcl
Build.docker.windowsltsc: output will be in this color.

==> Build.docker.windowsltsc: Creating a temporary directory for sharing data...
==> Build.docker.windowsltsc: Pulling Docker image: mcr.microsoft.com/windows/servercore:ltsc2019
     Build.docker.windowsltsc: ltsc2019: Pulling from windows/servercore
     Build.docker.windowsltsc: Digest: sha256:4fe58f25a157ea749c7b770acebfdbd70c3cb2088c446943e90fe89ea059558b
     Build.docker.windowsltsc: Status: Image is up to date for mcr.microsoft.com/windows/servercore:ltsc2019
     Build.docker.windowsltsc: mcr.microsoft.com/windows/servercore:ltsc2019
==> Build.docker.windowsltsc: Starting docker container...
     Build.docker.windowsltsc: Run command: docker run -v C:\Users\Administrator\AppData\Roaming\packer.d\tmp1509725874:c:/packer-files -d -i -t --entrypoint=powershell -- mcr .microsoft.com/windows/servercore:ltsc2019
     Build.docker.windowsltsc: Container ID: 5bfba7d51aeccf1cbe1198555e4821d4459221b21d5c50d36460fe505a0fc909
==> Build.docker.windowsltsc: Using dockerWindowsContainer communicator to connect:
==> Build.docker.windowsltsc: Provisioning with Powershell...
==> Build.docker.windowsltsc: Provisioning with powershell script: C:\Users\ADMINI~1\AppData\Local\Temp\2\powershell-provisioner703348455
     Build.docker.windowsltsc: Hello
     Build.docker.windowsltsc: World!
==> Build.docker.windowsltsc: Restarting Machine
==> Build.docker.windowsltsc: Waiting for machine to restart...
     Build.docker.windowsltsc: container 5bfba7d51aeccf1cbe1198555e4821d4459221b21d5c50d36460fe505a0fc909 encountered an error during hcs::System::CreateProcess: failure in a Windows system call: The request is not supported. (0x32)
     Build.docker.windowsltsc: container 5bfba7d51aeccf1cbe1198555e4821d4459221b21d5c50d36460fe505a0fc909 encountered an error during hcs::System::CreateProcess: failure in a Windows system call: The request is not supported. (0x32)
     Build.docker.windowsltsc: container 5bfba7d51aeccf1cbe1198555e4821d4459221b21d5c50d36460fe505a0fc909 encountered an error during hcs::System::CreateProcess: failure in a Windows system call: The request is not supported. (0x32)
     Build.docker.windowsltsc: container 5bfba7d51aeccf1cbe1198555e4821d4459221b21d5c50d36460fe505a0fc909 encountered an error during hcs::System::CreateProcess: failure in a Windows system call: The request is not supported. (0x32)
==> Build.docker.windowsltsc: Error response from daemon: Container 5bfba7d51aeccf1cbe1198555e4821d4459221b21d5c50d36460fe505a0fc909 is not running
==> Build.docker.windowsltsc: Error response from daemon: Container 5bfba7d51aeccf1cbe1198555e4821d4459221b21d5c50d36460fe505a0fc909 is not running
==> Build.docker.windowsltsc: Error response from daemon: Container 5bfba7d51aeccf1cbe1198555e4821d4459221b21d5c50d36460fe505a0fc909 is not running
==> Build.docker.windowsltsc: Error response from daemon: Container 5bfba7d51aeccf1cbe1198555e4821d4459221b21d5c50d36460fe505a0fc909 is not running
     Build.docker.windowsltsc: 5bfba7d51aec restarted.
==> Build.docker.windowsltsc: Machine successfully restarted, moving on
==> Build.docker.windowsltsc: Committing the container
     Build.docker.windowsltsc: Image ID: sha256:891aeb5525a21200352149a09c21eb5f61c4da3a0a714b1380fe6998a1d7ee2a
==> Build.docker.windowsltsc: Killing the container: 5bfba7d51aeccf1cbe1198555e4821d4459221b21d5c50d36460fe505a0fc909
==> Build.docker.windowsltsc: Running post-processor: (type docker-tag)
     Build.docker.windowsltsc (docker-tag): Tagging image: sha256:891aeb5525a21200352149a09c21eb5f61c4da3a0a714b1380fe6998a1d7ee2a
     Build.docker.windowsltsc (docker-tag): Repository: runner-images/windows:runner-hostedtoolcache-ltsc2019
Build 'Build.docker.windowsltsc' finished after 3 minutes 13 seconds.

==> Wait completed after 3 minutes 13 seconds

==> Builds finished. The artifacts of successful builds are:
--> Build.docker.windowsltsc: Imported Docker image: sha256:891aeb5525a21200352149a09c21eb5f61c4da3a0a714b1380fe6998a1d7ee2a
--> Build.docker.windowsltsc: Imported Docker image: runner-images/windows:runner-hostedtoolcache-ltsc2019 with tags runner-images/windows:runner-hostedtoolcache-ltsc2019
PS C:\Users\Administrator\Desktop\windows_2019_docker>

If you see Error response from daemon: Container 5bfba7d51aeccf1cbe1198555e4821d4459221b21d5c50d36460fe505a0fc909 is not running, don’t panic, then start it through docker ps and then docker start xxx. packer will continue to complete the next task.
In short, I feel that there is great hope for porting https://github.com/actions/runner-images/blob/main/images/windows/templates/windows-2019.json.

Convert windows-2019.json to windows-2019.pkr.hcl via https://developer.hashicorp.com/packer/tutorials/configuration-language/hcl2-upgrade


get_contracts_deployed should return all contract data

Check this comment for more info.

The interface of the function appears to be broken. We always assume that get_contracts_deployed() will always return all the deployed contract addresses. It makes no sense to have to call this function twice.

Why not just return all deployed contracts in a dict and let the user/caller decide which one to use? You just need to populate the dict, nothing more.

Even the docstring of the function tells me that I should expect the deployment data. Source.

I'll first try to understand why it's supposed to be called twice.

@pirapira At the moment it seems to need to be called twice. Once with services=True and once without if you want to get all contract deployment data in development mode. I would expect you to only need to do it once.

I'll first try to understand why there are services=True and services=False.

Good question :)

Many, many functions in raiden_contracts now take an argument  services:bool.  I guess this should be turned into module:str and it should take "raiden", "services", and sometimes "all".
If I completely remove these distinctions, I have to change the organization of the deployment files.  Since the Raiden contracts and service cotracts are deployed on separate commands, it makes sense to keep deployment_kovan.json and deployment_services_kovan.json separate (otherwise I have to read JSON, add elements and write it back).
Options

don't change anything
get_contracts_deployed() takes module:str instead of services:bool.  By default module is "all".
completely remove the notion of modules

modify JSON files in-place when deploying more contracts
one JSON file contains only one contract deployment

For now, I take 'get_contracts_deployed() takes module:str instead of services:bool. By default module is "all".'
But I guess the new function get_contract_deployment_info() should implement the new convention, and the old function should be deprecated for now.

For deprecating the old function, I'm looking at https://pypi.org/project/Deprecated/ .

I also see https://pypi.org/project/deprecation/.


**/README.md links don't work

Local/relative links are now adapted to work for docs/**. The strategy of linking **/README.md into there unfortunately doesn't work with the links.
Probably the only way to avoid this confusion is to replace them with links to the online documentation.
See #384

Would also avoid the link checker false positives.

Other option: Partial inclusion of markdown files and a warning notice (?)


SW-3618 Use Kaloko themed assets

upgrade web-components to pick them up

Getting this in. @chudo76 let us know your feedback when you get a chance.


Package Build Script

Pull Request Description
This PR introduces a new, stack script-based package build script for Luna. It's the first step towards being able to distribute binary distributions of the Luna command-line. The script currently handles:

Clean-building Luna.
Copying Luna into the correct place in the package structure.
Copying the stdlib and license files into the correct place in the package structure.

Important Notes
The script does not yet handle packaging library dependencies and rewriting paths. This will need to be implemented before the script is properly ready for prime time.
Checklist
Please include the following checklist in your PR:

[x] The documentation has been updated if necessary.
[x] The code conforms to the Luna Style Guide.
[x] The code has been tested where possible.

I'm somewhat concerned about turtle library usage. All these "shell-like" libraries from my experience always end up causing more trouble than it is worth, particularly when they are not properly maintained on Windows.

I definitely agree. This is more a stopgap, and we should definitely move it to our own build library as that matures. This primarily exists now because I needed it to test the datafile logic.

In the longer term I think that scripts should be promoted to their own packages as single-file scripts are too limited. Naming and common parameters should be standardised between our repositories.

You're in charge of build infrastructure so I definitely defer to you in this case. Is the limitation the single-file nature, or that we can't currently use local (or hackage) dependencies? In the latter case, it may be better for us to file a feature request with stack HQ to be able to do so, as the workflow and self-containedness of a stack script is, in my opinion, better suited to the job of being a 'build script'.

Are there reasons not use our foundational libraries (like prologue) for build script?

Yeah, as there's no way to use local or extra deps in a stack script.

Any comment I've not replied to above I agree with, and I'll get them fixed ASAP!

You're in charge of build infrastructure so I definitely defer to you in this case. Is the limitation the single-file nature, or that we can't currently use local (or hackage) dependencies? In the latter case, it may be better for us to file a feature request with stack HQ to be able to do so, as the workflow and self-containedness of a stack script is, in my opinion, better suited to the job of being a 'build script'.

For now script is OK, particularly if it uses different LTS than rest of the repo.
I just feel that having a package solves several problems:

being able to use extra deps (what will become must-have once we want to use support library)
being able to check if script builds by running stack build build_packge (or whatever name we chose)
having package.yaml will allow us to keep language extensions synchronized

Of course, having more advanced stack script support all these would eliminate the problems… but I'm not really convinced that it is effort-worthy. I feel that stack script was meant for simple, minimal-configuration scripts. When we need extra deps and more complex configuration support then it just stops feeling to me like a trival script and more like "another Haskell program".
We should also check how minimal the package can be — perhaps it is just directory with package.yaml (mostly filled with information that we need to provide now anyway) and Main.hs. Being able to share language extensions and extra-deps with the rest of the project is IMHO worth it.
(Just using prologue requires ~9 extra deps, and support library uses prologue… so I somehow don't feel that it would be nice as a script, even it was possible.)
Running would be stack build_package.hs' versus stack run build_package`. I don't feel that having a package is that "heavy" or hampering to any use-cases.
But that's all discussion for future, when we have support library.

Definitely! I agree with all the above points.


configure.ac:407: error: AC_PROG_CC cannot be called after AM_PROG_CC_C_O

CentOS 7
Python3.6.8
gcc 版本 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
automake:  1.13.4
autoconf: 2.69

[root@node1 pythontests]# sudo pip3 install coincurve
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting coincurve
  Using cached https://files.pythonhosted.org/packages/65/31/9f13921cc7ca27059af4def1a9d1277a6a252dea967b62f9ea05cc2a4115/coincurve-15.0.0.tar.gz
Requirement already satisfied: asn1crypto in /usr/local/lib/python3.6/site-packages (from coincurve)
Requirement already satisfied: cffi>=1.3.0 in /usr/local/lib64/python3.6/site-packages (from coincurve)
Requirement already satisfied: pycparser in /usr/local/lib/python3.6/site-packages (from cffi>=1.3.0->coincurve)
Installing collected packages: coincurve
  Running setup.py install for coincurve ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-u1e6quzp/coincurve/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-fb0eljsb-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/coincurve
    copying coincurve/__init__.py -> build/lib.linux-x86_64-3.6/coincurve
    copying coincurve/_windows_libsecp256k1.py -> build/lib.linux-x86_64-3.6/coincurve
    copying coincurve/context.py -> build/lib.linux-x86_64-3.6/coincurve
    copying coincurve/ecdsa.py -> build/lib.linux-x86_64-3.6/coincurve
    copying coincurve/flags.py -> build/lib.linux-x86_64-3.6/coincurve
    copying coincurve/keys.py -> build/lib.linux-x86_64-3.6/coincurve
    copying coincurve/types.py -> build/lib.linux-x86_64-3.6/coincurve
    copying coincurve/utils.py -> build/lib.linux-x86_64-3.6/coincurve
    copying coincurve/py.typed -> build/lib.linux-x86_64-3.6/coincurve
    running build_clib
    configure.ac:407: error: AC_PROG_CC cannot be called after AM_PROG_CC_C_O
    build-aux/m4/ax_prog_cc_for_build.m4:38: AX_PROG_CC_FOR_BUILD is expanded from...
    configure.ac:407: the top level
    autom4te: /usr/bin/m4 failed with exit status: 1
    aclocal: error: echo failed with exit status: 1
    autoreconf: aclocal failed with exit status: 1
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-u1e6quzp/coincurve/setup.py", line 309, in <module>
        **setup_kwargs
      File "/usr/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib64/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib64/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib64/python3.6/distutils/command/install.py", line 556, in run
        self.run_command('build')
      File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib64/python3.6/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib64/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib64/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/pip-build-u1e6quzp/coincurve/setup.py", line 152, in run
        subprocess.check_call([autogen], cwd=absolute('libsecp256k1'))
      File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/tmp/pip-build-u1e6quzp/coincurve/libsecp256k1/autogen.sh']' returned non-zero exit status 1.

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-u1e6quzp/coincurve/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-fb0eljsb-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-u1e6quzp/coincurve/
[root@node1 pythontests]#

I upgraded autoconf to 2.71  and upgrade automake to  1.16.2, then I successfully installed coincurve .
upgrade automake and autoconf on CentOS7:

https://www.quyu.net/info/807.html

wget https://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz
wget https://ftp.gnu.org/gnu/automake/automake-1.16.2.tar.gz
tar xzf autoconf-latest.tar.gz
tar xzf automake-1.16.2.tar.gz
cd autoconf-2.71
./configure --prefix=/usr
make && make install
cd ..
cd automake-1.16.2
./configure --prefix=/usr
make && make install

Thanks!


What kind of database should I use?

A quick search seems to indicate PostgreSQL > MySQL, let me check for alternatives quickly. I think I'm okay with making a quick-and-dirty choice right now just to test integration with the docker containerization system, and then thinking harder about what I want out of my database later on.

This blog post seems good: https://www.docker.com/blog/docker-compose-from-local-to-amazon-ecs/. People seem to talk about Docker volumes and Docker compose.

Actually this series of posts looks better: https://docs.docker.com/get-started/.

This repository was mentioned in a stack exchange post for how to use docker compose in AWS Lightsail: https://github.com/mikegcoleman/todo.

This blog post is maybe the next thing to check out: https://dev.to/koladev/deploy-a-react-app-on-aws-lightsail-testing-docker-docker-compose-nginx-github-actions-4lb5

Wait, do I use Docker Compose or Kubernetes? Do these compete with each other?

A quick google search indicates that Kubernetes is the preferred option for scaling applications. I'd also like to avoid AWS-specific infrastructure as much as possible to maintain flexibility.

According to https://www.youtube.com/watch?v=TlHvYWVUZyc, Kubernetes would be overkill for me. Ugh. I wish there was a simple, cloud-provider-agnostic approach to all this.

From the stack exchange question here "If you are networking containers within the same host go for docker compose.
If you are networking containers across multiple hosts go for kubernetes."

"Note: Docker Compose’s integration with Amazon ECS has been deprecated and is retiring in November 2023" ChatGPT recommended this as direct cloud support for Docker Compose.

From this video: "Stateful deployments in Kubernetes are a pain, and databases are often hosted outside of the Kubernetes cluster." Well, then we've just made the program container into a bunch of hierarchical groupings of containers for no reason, right? What's the benefit here?

Minikube looks good. I also see K3s and MicroK8s mentioned. It probably makes sense to work with a simpler version of Kubernetes that can be scaled up rather than Docker Compose which is kind of at its maximum development potential.

... except Minikube isn't meant for production deployments. Aaargh.

Managed Kubernetes service? https://www.pluralsight.com/resources/blog/cloud/aks-vs-eks-vs-gke-managed-kubernetes-services-compared

People on this reddit thread seem to like Google's GKE over AWS or Azure. Maybe I migrate?

Okay, maybe let's try GKE. The article I previously linked about managed Kubernetes services indicates that GKE provides the most out of the box.

Is AWS Fargate what I need?

Am I looking for a "serverless" cloud service?

Okay, at a certain point I have to stop this pursuit. Docker containers were revelatory for me and I was hoping that something analogously elegant and abstract existed at the container management level, but it looks like that's not the case. The settings that connect the application to the database should in principle be straightforward, so I should be willing to configure them manually from the AWS Lightsail console. I should just set this up and move on.

So now that I've set up a connection between my AWS Lightsail container and my AWS Lightsail database, my big remaining concern is how we're going to version control the database and how we're going to specify the configuration from this repository. I'm currently watching this video on the matter: https://www.youtube.com/watch?v=dJDBP7pPA-o.

Flyway and Liquibase keep being mentioned. This whole system feels suboptimal to me.

Bytebase looks good, but again, I'd rather keep the number of third party tools used for infrastructure to a bare minimum.

Putting the database versioning question on hold until tonight. Closing this issue and creating a new issue with a more specific topic.


Make your library available on Bower

Would it be possible for you to publish your library to bower?

I don't want to hassle with it, but if someone else wants to take that on, they're welcome to do so!


Creating indexes in the indexes section of a model config

Implementation of #163

[x] clustered / nonclustered indexes
[x] row-store (b-tree) / columnstore indexes
[x] uniqueness (UNIQUE) for row-store indexes (clustered and nonclustered)
[x] nonclustered row-store index may have included columns: INCLUDE (col1, col2)
[x] data compression: ROW / PAGE compression for row-store and COLUMNSTORE / COLUMNSTORE_ARCHIVE for columnstore
[x] partitioning (partition schema name and partition column)

Hi @swanderz! It takes 4-5 days to test, but I'm ready to accept suggestions/edits 🚀

Am I correct to think that this PR introduces the possibility to create a unique non-clustered index, which wasn't possible before?
This would be very useful for us!

@NicolasPA Yep, of course:
indexes=[
    {'type': 'nonclustered', 'columns': ['customer_id'], 'unique': True}
]

Should be rebased on latest master


added folder for common data structures

added folder for common data structures with stack, queue, linkedlist, binary tree and hash table

hi @Kuwarsaab , hope you're doing well. I just wanted to check in to see if there's anything else needed for this PR to be merged before Hacktoberfest officially ends. Thank you so much for your time and support.