Resolve events in pagerduty

After the min refresh period mark events resolve in pagerduty.
https://developer.pagerduty.com/documentation/integration/events/resolve
I feel like a recommended workflow would be to acknowledge the incident in pagerduty, then fix the problem, and let the system resolve itself naturally.
This way if I think that I fixed it, but then in the "Incident Ack Timeout" from pager duty it is not actually resolved I will get notified again.

I also agree that this is the correct semantic. It also matches the behavior of the Nagios/Icinga integration.

:+1:

I think that in general what needs to be added is just an event queue of 'deleted' or 'resolved' events.

:+1: To the general issue. When alerts disappear from alertmanager (whether due to not being refreshed or getting explicitly resolved from Prometheus), alertmanager should try to resolve any existing issues in PagerDuty.

If prometheus is down for 2 minutes, its alerts will disappear from alertmanager. It would be unfortunate if that short outage caused a notified problem to be marked resolved prematurely. Issues shouldn't be resolved on PagerDuty until (a) the alert origin has been heard from again, (b) the origin has completed its first evaluation following any restart and possible recovery, and (c) the alert is neither firing nor pending.

But if there is still a problem, Prometheus coming back would still fire them again, right?
I'm leaning towards resolving them … they've paged someone already anyway, so the risk is limited. On the other hand, we constantly have alerts in PD that the alerting "forgot" to actively clear for any number of reasons. We deal with them by reaping everything after 24h and never using the PD default of un-acknowledging but I really dislike that state of affairs.

But with explicit clear notifications Prometheus -> Alertmanager, the timeout could be much longer in Alertmanager.

Yeah, and what about Prometheus servers going away completely? At some point, there still needs to be a timeout for deleting stale alerts in alertmanager, methinks. But as @matthiasr said, that timeout could be much longer than it currently is once it is only used as a fallback and explicit Prometheus->AM "resolved" notifications are used as the primary mechanism for deleting inactive alerts from AM.

I've just submitted #51, it's a rather naive implementation so it doesn't address the corner cases you discussed here (like prometheus being down causing a invalid resolution of the issues etc) but it's a step in the right direct imo.

This appears to be implemented.


It seems that validation decorators are not working.

Here I specify enableValidation: true

Then I use it here:

  @Post("/register")
  async register(
    @Req() request: Request,
    @Body() form: LoginForm,
    @Res() res: Response
  ): Promise<ObjectLiteral> {
    // Checking if user already exists by this username
    const user = await this.userManager.findUserBy({ email: form.email });

    if (user) {
      res.status(409);

      return {
        error: "User with this email already registered"
      };
    }

with class with constraints here:
class LoginForm {
  @IsEmail()
  email: string;

  @MinLength(6)
  password: string;
}

Validation does not happen. It does not check for length or email.

what routing-controllers version are you using? Adding @19majkel94

@pleerock "routing-controllers": "^0.6.12",

Can you show how you send the LoginForm from the client side? Do you send the credentials by AJAX (json string and Content-Type: application/json) or as application/x-www-form-urlencoded from the normal html form?
Does the form action param contains send data or it's just undefined or empty?

@19majkel94
sending it via json

Don't mind 409 conflict - it's about "email already registered" :D

On "0.7.0-alpha.9" everything works ok, I have even created a special test case for the issue and it pass correctly:
describe.only("should throw validation error when body is incorrect", () => {

    let actioncalled = false;

    before(() => {
        getMetadataArgsStorage().reset();

        class LoginForm {
            @IsEmail()
            email: string;

            @MinLength(6)
            password: string;
        }

        @JsonController("/users")
        class ClassTransformUserController {

            @Post("/register")
            async register(
                @Body() form: LoginForm,
                @Res() res: any,
            ) {
                actioncalled = true;
                res.status(409);

                return {
                    error: "User with this email already registered"
                };
            }
        }

    });

    const options: RoutingControllersOptions = {
        validation: true
    };

    let expressApp: any, koaApp: any;
    before(done => expressApp = createExpressServer(options).listen(3001, done));
    after(done => expressApp.close(done));
    before(done => koaApp = createKoaServer(options).listen(3002, done));
    after(done => koaApp.close(done));

    assertRequest([3001, 3002], "post", "users/register", { email: "test", password: "test" }, response => {
        expect(response).to.have.status(400);
        expect(actioncalled).to.be.false;
    });
});

I can even see throwed ValidationErrors array on console. Other validation test cases passed correctly, even on 0.6.10 where the feature has been added.
So the problem is in your code, maybe you should try to create a minimum code sample for reproducing the issue?

@19majkel94 I'll try to reproduce it again. Will write here with example code if problem stays.

They seem to work now. Well, maybe I change something and that forced them to work, lol.
Closing this now.


Add cursor movement functions for row navigation

Introduce MoveToRowStart and MoveToRowEnd functions for cursor navigation, along with corresponding tests to ensure functionality. Update the editor to handle home and end key events for these new functions.

Codecov Report
Attention: Patch coverage is 84.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 65.57%. Comparing base (c19897c) to head (68976b7).

Files with missing lines
Patch %
Lines

pkg/edit/editor.go
0.00%
4 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #33      +/-   ##
==========================================
+ Coverage   65.21%   65.57%   +0.35%
==========================================
  Files          18       18
  Lines        1288     1313      +25
==========================================
+ Hits          840      861      +21
- Misses        396      400       +4
  Partials       52       52

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


unable to double click on chart

I am trying to add double click event to chart so can have interaction with it, such as: change its style or edit data source. However every time I double click it, it always triggers the parent click event. From source code, the div only accepts the style props, is it okay if div accepts onDoubleClick props ? Thanks.
 return

return

Hi! @mavisjheng.
I can look at it, but I am a bit busy right now. If you make a PR I will happily merge it :D
Take a look at Transferring-props-react. It might be a good idea to transfer all props.

Hi @emilmork
I made a PR, thanks : )

@mavisjheng Greate! I will look into it tonight and merge/deploy a new version.

Resolved by #8


Support \Traversable (e.g. generator) for Writer::addRows()

It would be nice if Writer::addRows() could accept a \Traversable (e.g. a generator) instead of only an array. Right now one either has to use iterator_to_array() or Writer::addRow() and foreach.

The only option would probably be to not typehint, otherwise plain arrays would no longer work. The validation might have to be dropped as well, since it requires a \Countable implementation. So we'd end up with this I guess =)
    public function addRows($rows, Style $style = null)
    {
        foreach ($rows as $row) {
            $this->addRow($row, $style);
        }
    }

I chose plain array b/c pretty much all collection implementations either allow a typecast to array or implement a toArray() method.
But feel free to create a pull request, if you have a different/specific solution in mind =)

Until we have union types in PHP it basically boils down to what you wrote. I'd add a runtime type check just to be sure since the default Invalid argument supplied for foreach warning of PHP is not useful.


Fixed frozen and cache_hash incompatibility

This uses the same mechanism to clear the cache hash as __hash__ uses to set the cache hash in frozen classes - bypassing the object's __setattr__ in favor of object.__setattr__. Neat trick.
Fixes #611.
Pull Request Check List
This is just a reminder about the most common mistakes.  Please make sure that you tick all appropriate boxes.  But please read our contribution guide at least once, it will save you unnecessary review cycles!
If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

[x] Added tests for changed code.
(N/A) New features have been added to our Hypothesis testing strategy.
(N/A) Changes or additions to public APIs are reflected in our type stubs (files ending in .pyi).
(N/A) Updated documentation for changed code.
[x] Changes (and possible deprecations) have news fragments in changelog.d.

If you have any questions to any of the points above, just submit and ask!  This checklist is here to help you, not to deter you from contributing!

Oops, thanks to the coverage result I realized that the test was copying the class, not an instance of the class. This is what I get for skipping my usual semi-TDD style of putting the test under an xfail in a separate commit, and removing the xfail in the commit that fixes it, so I've refactored the commit history a bit.
Feel free to squash the commits if you don't like that style - I mainly do it to give an easy(-enough)-to-verify way to show that the test is probably testing what we expect.

Thanks, Paul!


Is the documentation on custom rest client understandable?

What you were expecting:

A short, yet comprehensible documentation on how to create a custom rest client for admin on rest.
What happened instead:

The documentation states that it's very easy, but I didn't find it very easy. Maybe this is my fault, but maybe also the documentation could be improved.
Steps to reproduce:

Imagine you're new to admin-on-rest. Try to understand how to create a custom rest client from this guide https://github.com/marmelab/admin-on-rest/blob/master/docs/RestClients.md#writing-your-own-rest-client.

It feels like the documentation was written to be friendly and helpful. But after using it extensively, I have to say that it sometimes says something is simple, when it's instead rather difficult and this makes me feel stupid (see also http://bradfrost.com/blog/post/just/).
Take for example this statement in the docs for creating a custom rest client:

But don't be afraid, it's easy!

Personally, I didn't find it easy at all.
My proposal is therefore to add the following to the documentation of custom rest clients:

Add that you need to adjust the imports when copying from the original simple rest client as stated here https://stackoverflow.com/questions/44745113/creating-a-custom-rest-client-admin-on-rest.
Add that you need to update this file every time admin-on-rest is updated and the simple rest client might get any optimizations.
Add context to the snippets under the respective “Examples:” paragraphs.
Rephrase “But don't be afraid, it's easy!” to “Follow the guide below to create a custom rest client”.

I'm sorry in case I can't articulate well enough what I mean, but there are a few more places where I had this feeling when reading the docs (e.g. https://github.com/marmelab/admin-on-rest/blob/master/docs/Fields.md#writing-your-own-field-component). Writing this, I hope you understand it as constructive feedback. :-)

Myself and my team followed the documentation and also looked at the several existing examples and plugins. We had zero problems.
You should raise a PR with the documentation update you suggested, it would be faster than listing it here :)

I agree with Thomas, we should not assume anything is easy in the documentation. I'll work on it asap

But as @Phocea said, a PR will be welcome :)

I agree with Thomas, we should not assume anything is easy in the documentation. I'll work on it asap

Thank you so much, for considering this :-)

We had zero problems.

 Please, go ahead and rip it apart... 🤓

Speaking from experience as someone who just started using AOR, The documentation is very different from the example that is referenced in it for creating a custom rest client. This led to confusion and frustration :(

@ariveralee Can you eloborate on that? Is it about the request/response examples that are not implemented like depicted there in the simple rest client? I didn't check them all, because I just copied from simple rest client.

Rewrote the doc in #1311. Hope that makes the experience smoother.

@fzaninotto Looks good to me, seems to include full examples and neutral language. One question: So, Rest client will be renamed to Data Provider?

Yes because you're not limited to REST


Add Hello World example to intro

To solve https://github.com/effekt-lang/effekt/issues/150

Adding more content to/rewriting the intro/adding a useful tutorial would probably be good, too.

Nitpick: Can the reader test online that the function actually prints "Hello World!"?

We can add a
main()

below to run it.


Excuse me, is the trident net's anchor setting too sparse?

I read the source code of tridentnet, and got some confusion. If stride is 16, then the smallest scale anchor (scale = 2) will be located on the feature map with a very sparse distribution. When the area of retinanet or fpn is the smallest (stride=4, scale=8, length=32, regardless of ratio shift), their distribution on P3 is very dense. However, the APs of tridentnet is greater than FPN. How does such an anchor setting affect the results? Many thanks for your answers!

There are many underlying detector design tradeoffs related. Too be short, adding more small anchors is not very rewarding due to the limited resolution of the raw images in COCO.

There are many underlying detector design tradeoffs related. Too be short, adding more small anchors is not very rewarding due to the limited resolution of the raw images in COCO.

Many thanks for your reply! Did you try trident-block in single-stage framework, Can it get good results？

Some fellow researchers have tried it out on SSD and it worked.
On Thu, Jan 9, 2020 at 2:21 PM wang yilan<EMAIL_ADDRESS>wrote:

There are many underlying detector design tradeoffs related. Too be short,
adding more small anchors is not very rewarding due to the limited
resolution of the raw images in COCO.
Many thanks for your reply! Did you try trident-block in single-stage
framework, Can it get good results？
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/TuSimple/simpledet/issues/288?email_source=notifications&email_token=ABGODH3JXH2VZBAIGJJDLA3Q42655A5CNFSM4KB4KIMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIPEJNI#issuecomment-572409013,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABGODH276ZHBIZ3NAF2HFWTQ42655ANCNFSM4KB4KIMA
.


True multi-tenant support and modelling with @auth

I have tried modelling my application with Amplify but, as far as I can see, the auth config using Cognito  does not currently support true multi-tenancy. By true multi-tenancy I mean that users belong to one or more organisations with a particular session being bound to a single organisation at a time. Data associated with one organisation should never be visible to another organisation. Like users, organisations need to be added or removed without infrastructure changes.

What is the time line on this ? this issue is open from 2018 ? Do you all need another 5 years ? Project managers - any sense of urgency around this ticket which is open from 2018 ? Disappointed! @abdallahshaban557 reopen https://github.com/aws-amplify/amplify-js/issues/10190

Copy-pasting the content of https://github.com/aws-amplify/amplify-js/issues/10190 here as advised by @abdallahshaban557 to carry on with the discussion here.
Contents from https://github.com/aws-amplify/amplify-js/issues/10190 :
Requirement - Implement multi tenancy in a react app backed by amplify ( Cognito + Appsync + S3)

Cognito is used for authentication
Appsync for Graphql with DynamoDB
S3 storage to store images and videos

Use case and our idea with gaps -
Use case -

Admin user should be able to sign up with CRUD access
Admin user should be able to add manager user with CRU access
Admin user should be able to add user with R access
Users of a company/tenancy should have access to only their Company/Tenancy data - Red company users should NOT have access to Blue Company data, do within their Company/Tenancy, based on their authorization access their access to their company data should be regulated.
Same logic needed for images and videos stored in S3.

Our attempted idea with gaps - which need help with OR a better design advise please :
_Graphql models : _
`============
type Post @model
@auth(rules: [
{ allow: groups, groupsField: "adminGroup" , operations: [read, create, update, delete], provider: userPools}
{ allow: groups, groupsField: "managerGroup" , operations: [read, create, update], provider: userPools}
{ allow: groups, groupsField: "userGroup" , operations: [read], provider: userPools}
])
{
id: ID!
title: String
adminGroup: String
@auth(rules: [{ allow: groups, groupsField: "adminGroup"}])
managerGroup: String
@auth(rules: [{ allow: groups, groupsField: "adminGroup"},{ allow: groups, groupsField: "managerGroup"}])
userGroup: String
}
type AuthorizationGroups @model
@auth(rules: [
{ allow: private, operations: [read, create, update, delete], provider: iam }
])
{
id: ID!
tentantId: String!
adminGroupId: String!
managerGroupId: String!
userGroupId: String!
}
`
Flow :

Admin will signup with the app

We call post signup lambda hook to
a.  Add tenantId to user in cognito - uuid generated and put into cognito custom attribute - tenantId
b.  Put an entry to AuthorizationGroups table with tentantId generated above from #a and uuids generated for adminGroupId, managerGroupId, userGroupId - this entity can only be operated by lambda hence the rule allow private. We do not want any direct user meddling or attempting to hack

Admin/Manager can create/updatePost record - during which we want to read the values for adminGroupId, managerGroupId and userGroupId from AuthorizationGroups entity for the tenantId of the belonging user, from cognito custom attribute- tenantId, and set these values before persisting - How can we achieve this ? Do not want to do it in client code - can be hacked is what we worry. Next lambda - How can the request be intercepted and these values set ? Unless all graphql APIs be explicitly routed to lambda which updates these values and then calls underLying AppSync APIs - too cumbersome and lot of hand written code ? Deal with resolver - again touch all resolvers - very painful? Is there a better approach - a lambda hook that gets called for all AppSync calls where we set these values ?

Admin/Manager/User should be able to read the data, so again we need to use similar logic as from # 3 to proceed

How do we extend these for storage and retrieval of multimedia - Images, Videos from S3 ?

This - https://aws.amazon.com/blogs/mobile/appsync-lambda-auth/ seems like what we want but not able to put everything together for our use case.
Here is 2018 request for multi tenancy - https://github.com/aws-amplify/amplify-category-api/issues/449 which is not considered yet.
Expected behavior
Possible options to implement multi tenancy.

closing as a duplicate of https://github.com/aws-amplify/amplify-category-api/issues/449

As of today, its still not resolved.  So much hype for the amount of limitations around it....


realtime linting

SublimeLinter-cpplint only works when the file is saved. Is there a way to make it work while typing? thanks.

cpplint does not support linting via stdin, it only lints files on disk. 🤷♀
Feel free to reopen if you know a workaround.

@kaste Is there anyone that can lint files while typing? thanks.

gcc and clang


Hosting?

Heroku's free tier gives us something like 18h/day/mo, after which the app is shut down for the rest of the month.
An alternative hosting provider that's free and doesn't come with downtime would be useful.

are you using node? App Engine supports 24h/day/mo I guess.  https://cloud.google.com/appengine/


after Ionic build , the fonts dir don't created, this caused ionic icon can't show

Hi, I have a problem about icon. Sometime after ionic build , the fonts directory don't created in www, this cause icon can't show on app. The directory like this after build:

Don't has the fonts directory.
The icon show on app like this:

Not everytime like this , but often . I don't know  whether it is a network problem, I'm in china . I user the ionicons v3.0.0, and the ionic info is this:
Your system information:
ordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.12
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.30
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v4.6.0
Look forward to your reply！

Please update you app-scripts version to the latest from npm.
This has been fixed.
https://github.com/driftyco/ionic-app-scripts/blob/master/CHANGELOG.md


Fixing issue #69

Description
Fixing issue #69. Excel should be present and execution logs should now show if any section is being skipped.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #69
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:

[x] Code compiles correctly
[ ] Created/updated tests
[x] Unit tests passing

Codecov Report

Merging #73 (0c6225a) into main (e22f9a1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #73   +/-   ##
=======================================
  Coverage   40.71%   40.71%
=======================================
  Files          46       46
  Lines        2579     2579
=======================================
  Hits         1050     1050
  Misses       1496     1496
  Partials       33       33

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

Hi I have same problem, I'cant find the excel anywhere but the scan works well. Can you help me with this ?

Hi I have same problem, I'cant find the excel anywhere but the scan works well. Can you help me with this ?

please try with the latest version: https://github.com/Azure/azqr/releases/tag/v.0.15.5 and let me know the results.


Adding more features in text like different languages,Bolding letters,fonts,adding water mark,Borders,showing the previous works etc

could you please assign this work to me so that i can add all the mentioned featues expecially different languages options .

Ok

thankyou for assigning this issue.

Could you please grant me access so I can work on adding a bold text formatting feature?

could you please assign me this work? i want to add some font styling features.


EKF: Add option to use GPS for height and improve height fall-back behaviour

Add GPS accuracy data to GPS buffer so that the accuracy and measurement information used by various processes is from the same point in time.
Define maximum measurement intervals for different sensor types so that timeouts can be detected using consistent thresholds
Use a combined time and height uncertainty criteria to determine if the height state needs to be reset
Maintain a filtered baro height correction so that the baro data can be used as a fall-back if either range or GPS height fusion fails
Use  low pass filtered data during alignment instead of averaged data to reduce the effect of time delays and allow for longer averaging periods when using range finder data.
Implement a consistent fall-back behaviour following a height fusion timeout.

Flight Test Results
http://logs.uaventure.com/view/7Cc2Jtrrarxc7RKCqfFX4Y
A flight test was conducted indoors with EKF2_HGT_MODE = 1 to use GPs altitude. The board used was a pixracer. The rc.logging file was modified to that data logging started in power-up. Three flights were performed. Flight 1 started before the GPS origin was set, so the origin was set and the switch to GPS height use occurred in-flight.
The copter was landed and disarmed and the GPs connector was disconnected which caused it to revert to Baro height and static mode for position aiding. Flight 2 was performed without the GPs connected, the copter was landed, disarmed and the GPS connector reattached.  This caused the EKF to switch back to GPs aiding for position and velocity, but remain with Baro aiding as per the design intent.
Innovation Plots
There were two large glitches in baro measurements shortly after power-up - the cause of these glitches is not known and they have not been observed in other logs. The switch to GPS height and back again was smooth

Local and Global Height

NE Position - note the divergence in position after GPs loss which continues until the filter times-out and switches to a non-GPs mode. Note the reset back to the correct position when GPs is re-acquired.

NE Position 1-Sigma Uncertainty - note the growth in estimated error which matches the actual error growth

I had a read through the code changes and made some comments here and there. However, I'm not really in the loop and haven't looked at the ekf2 before, so I can't really comment on logic or math. Just from reading the diff it didn't get how and when the logic of the switching works.
How do you go about testing all the different cases? Can you deactivate sensors in SITL?
Also, I was a bit confused about what _control_status is. Is it just for logging, or where is it used?

Thanks for having a look at it. Testing was done  by bench testing (disconnect range finder or disconnect GPS. I couldn’t find the functionality required in SITL to fail specific sensors like there is in APM.
The control _control status variable contains the status of the various filter modes (type of height sensor being used, aiding, magnetometer fusion control, etc). Most of the control loging is implemented here: https://github.com/PX4/ecl/blob/pr-addGpsHgtOption/EKF/control.cpp#L44

On 22 Mar 2016, at 1:55 PM, Julian Oes<EMAIL_ADDRESS>wrote:
I had a read through the code changes and made some comments here and there. However, I'm not really in the loop and haven't looked at the ekf2 before, so I can't really comment on logic or math. Just from reading the diff it didn't get how and when the logic of the switching works.
How do you go about testing all the different cases? Can you deactivate sensors in SITL?
Also, I was a bit confused about what _control_status is. Is it just for logging, or where is it used?
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/PX4/ecl/pull/78#issuecomment-200021356


Can this mod be used by the host only?

Hello. I want to know if I'm able, as a public lobby host, to use this mod without risking desyncs or other incompatibility issues with vanilla clients.

I can't guarantee that it won't cause desyncs, since it does change the amount of in-game time that it takes for a path to be chosen.
From my understanding of the networking of enemies, the clients will run the pathing code as well, and if the chosen path differs from the host, the enemies may jitter or teleport from the client's chosen path to the position that the host determines for the enemy.
It's also possible that the host doesn't send enough synchronization packets to the client for the differing pathing to be corrected consistently, in which case clients may never see enemies at the same position that the host sees them.
I would recommend testing this with someone to see if anything weird happens, and feel free to report back here, but it's not a configuration I want to support myself.

I played a bit with it and it seems to work altought the Bracken will act weird, the most notable issue is that when there is more than 2 players nearby (one of them being the host) the Bracken seems to get confused in wich path to take, sometimes stopping mid retreating and remaining stopped for about 3 seconds then suddendly going into a complety different direction from the one he was going before (this causes the Bracken to sometimes run into players while in it's retreating state or just stop right in front of a player preventing them to move(since they would die if they touch the Bracken)), this can happen multiple times during it's retreating state.

That can possibly also be caused by moving between two halves of the map when you spot the Bracken near the center, since the retreating Bracken is trying to choose the furthest location from the closest player to it. This can happen in vanilla as well. Given that, it's hard to say whether the issue you experienced is caused by running this mod on the host only.
I also forgot to note, installing the mod on the host will not reduce the lag experienced by clients in the game, as the same logic runs on both the host and the clients. Running the mod only on the client may also experience similar issues to running only on the host.


Change such that 'Transitional' is written to sheet

Currently 'Land Cover Condition' is always written to the sheet as 'Stable' even when 'Transitional' is selected

The corresponding dropdown (drop9) is not connected to anything!

Fixed in aa1d085f33c3b3b3f7e2f5a325c1f11fc74ce971


Enable processing of 'cleared' param of 'changed' DDP message

Right now only a 'fields' param of 'changed' DDP messages is processed. So, if a field is updated on the server, the change will be reactively displayed on the client. But, if a field is cleared on the server it won't be cleared on the client reactively. I suggest that we use 'cleared' param of 'changed' DDP messages. But to avoid steady clearing of fields when subscribing to publications that present the same collections, but with a different set of fields, I suggest that we disable processing of 'cleared' param of 'changed' DDP messages while subscribing / unsubscribing process is in progress.

@baryshok Thx for PR !
I check your commits in next days...

Nice PR, @baryshok . I wasn't aware of that at all!
I can try review it also tonight or tomorrow morning, @noris666.

@grsabreu ok i also will try again to check. Dont have a lot of time now 👎

@simonbelanger what you think about that PR ?

@noris666 I'll review it right now

It's definitely right to process the cleared param but I'm wondering if this could be a breaking change in some applications... Maybe the major version number will have to be bumped.
Also, I did some tests and it looks like the Meteor server is smart enough to not push clearing of fields that has already been sent for other subscriptions. So IMO the cleared param could just be systematically processed (and the whole subscribing/unsubscribing logic dismissed).

@simonbelanger if you say Meteor server is smart and does all that, we decline this PR ?

@noris666 The processing of the cleared params definitely worth merging, maybe @baryshok can refactor the PR to remove subscribing/unsubscribing logic?

@simonbelanger I removed subscribing/unsubscribing logic.

@baryshok  thx, i'll review it asap

@simonbelanger you was checked this PR ?

@noris666 no... sorry i've been super busy in the last months and will probably for the the next ones...

Don't mean any offence, but it is quite hard to stomach down how quite refactors for this PR were in comparison to how long it is (still) taking to review. 😆


Update 0004-Detect-bad-plugins.patch

Not even really a typo, that was just a weird way to phrase this.

Thank you for the correction


proposal: slices: MutableValues iterator

Proposal Details
It's a common task to iterate over a slice and modify its elements. For the following structure:
type element struct {
	field int
}

var (
	elements = []element{
		{field: 1},
		{field: 2},
		{field: 3},
	}

	doubledElements = []element{
		{field: 2},
		{field: 4},
		{field: 6},
	}
)

we have to use one of:
func TestDoubleWithRangeAndIndex(t *testing.T) {
	// change base elements without MutableValues
	// using indexing
	for i, e := range elements {
		e.field *= 2
		elements[i] = e
	}

	if !slices.Equal(elements, doubledElements) {
		t.Fail()
	}
}

or
func TestDoubleWithRangeAndPointer(t *testing.T) {
	// change base elements without MutableValues
	// using pointer to element (useful in case of neested loops
	// or operations on more than one field)
	for i := range elements {
		e := &elements[i]
		e.field *= 2
	}

	if !slices.Equal(elements, doubledElements) {
		t.Fail()
	}
}

The proposal is to add MutableValues iterator to slices package:
func MutableValues[Slice ~[]E, E any](s Slice) iter.Seq[*E] {
	return func(yield func(*E) bool) {
		for i := range s {
			if !yield(&s[i]) {
				return
			}
		}
	}
}

Mutating of all elements of the slice can looks like:
func TestDoubleWithMutableValuesIterator(t *testing.T) {
	// values in elements will be changed
	for e := range slices.MutableValues(elements) {
		// we can directly change element via pointer
		e.field *= 2
	}

	if !slices.Equal(elements, doubledElements) {
		t.Fail()
	}
}

Related Issues

proposal: slices, maps: add Pointer iteration functions #69916 (closed)
proposal: slices: add AllPointer #69345 (closed)

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@pkierski
I suggest you to re-open this issue. Because the other two have been closed, both by their owners, not by the proposal process.
There should be one opened.

This is just a restatement of #69916 without addressing any of the concerns in the comments. I don't think we need to rehash the discussion.

I think @pkierski well addresses the concerns in the first comment.
The other two haven't undergone the proposal process yet.
@ianlancetaylor @aclements

@ianlancetaylor  @aclements
Kindly re-ping. This alike proposals have never been accepted or declined. Do you think @seankhliao have the right to close it.
It looks to me @seankhliao has violated the proposal process.

OK, I'll reopen it to follow the process, but I think the comments are fair: this proposal does not appear to address the shortcomings pointed out for the earlier proposals.  Without doing that the proposal review committee is just going to close it.  In particular the behavior if the slice changes during iteration is going to be unclear and surprising.

this proposal does not appear to address the shortcomings pointed out for the earlier proposals

I don't see any valid objection reasons there. Those reasons look just unrelated to iterators. They also apply to traditional loops.

As I have stated in my last comment, the so-called "footgun" exists before Go 1.23, which introduced iterators.

The baseline without this proposal is (as shown in the proposal text) a loop which begins by immediately taking the address of the current element:
for i := range example {
    e := &example[i]

    // and then, presumably, mutate what e points at
}

The net effect of this proposal is to move the e := &example[i] statement out of the loop body and into the function returned by the slices.MutableValues helper:
for i, e := range slices.MutableValues(example) {
    // and then, presumably, mutate what e points at
}

It seems like this is a classic tension between convenience and explicitness.
The original example makes it relatively clear in the loop body that e is the address obtained through a slice, which is a clue to an experienced Gopher that they are holding a pointer to something in the slice's backing array and thus that pointer remains valid only as long as the slice is valid.
The proposed example moves that information slightly further out of reach: the reader must now understand what slices.MutableValues does and what implications that has. However, once you've learned what that function does you now have the same information as the experienced Gopher in my previous paragraph: you're holding a pointer to something in the slice's backing array, etc.
The way I understood the concerns in https://github.com/golang/go/issues/69916 was that they were imagining someone maintaining some code that is already using this helper function but doesn't notice that e is a pointer because they didn't read the range clause well enough and are accustomed to how slice iteration normally behaves. They might then use e in a way that is not just indirect mutation and instead retains that pointer beyond the end of the loop.
It's always tricky to trade off a concrete benefit against a hypothetical hazard, but perhaps we can sidestep that by asking a more straightforward question: is the benefit of eliminating that single statement great enough to justify any language or library change at all?
As with the previous proposal, for me the primary concern is helping an author discover that they are mistakenly modifying a value that will be immediately discarded at the end of the loop iteration, which caused me to suggest a go vet rule in the other proposal. Personally, I think that helping authors avoid that confusing mistake is the most important thing, since adding that one extra statement to take the address once you've noticed your error doesn't tend to be a significant hardship.
However, I wouldn't be particularly upset if this proposal were accepted. I don't personally think it pulls its weight in terms of overall value provided, but it also seems like a relatively straightforward function that's unlikely to need significant maintenance once it's been added. :man_shrugging:

The proposal has a big benefit. For a slice []E and a function needs a iter.Seq[*E] parameter, we don't need to construct a []*E slice from the []E slice to satisfy the parameter.

The proposal doesn't include any examples of functions that require sequences of pointers in particular. I expect it would help to add some realistic examples of such situations if that's a significant part of the value proposition.

I agree that in simple use case (single loop) this is not worth to add new method like that. But for more complicated case like nested loops tratidional way is more complicated and not so easy to read:

type (
	element struct {
		field         int
		innerElements []innerElement
	}

	innerElement struct {
		innerField int
	}
)

var (
	srcElements = []element{
		{
			field: 1,
			innerElements: []innerElement{
				{innerField: 1},
				{innerField: 2},
			},
		},
		{
			field: 1,
			innerElements: []innerElement{
				{innerField: 3},
				{innerField: 4},
			},
		},
		{
			field: 1,
			innerElements: []innerElement{
				{innerField: 5},
				{innerField: 6},
			},
		},
	}

	doubledElements = []element{
		{
			field: 1,
			innerElements: []innerElement{
				{innerField: 2},
				{innerField: 4},
			},
		},
		{
			field: 1,
			innerElements: []innerElement{
				{innerField: 6},
				{innerField: 8},
			},
		},
		{
			field: 1,
			innerElements: []innerElement{
				{innerField: 10},
				{innerField: 12},
			},
		},
	}
)

func TestDoubleWithRangeAndIndex(t *testing.T) {
	elements := slices.Clone(srcElements)

	// change base elements without MutableValues
	// using indexing
	for i, e := range elements {
		for ii, ie := range e.innerElements {
			elements[i].innerElements[ii].innerField = ie.innerField * 2
			// alternative for mutating more than one inner field:
			// e.innerElements[ii].innerField = ie.innerField * 2
		}
		// alternative for mutating more than one inner field:
		//elements[i] = e
	}

	if !reflect.DeepEqual(elements, doubledElements) {
		t.Fail()
	}
}

func TestDoubleWithRangeAndPointer(t *testing.T) {
	elements := slices.Clone(srcElements)

	// change base elements without MutableValues
	// using pointer to element (useful in case of neested loops)
	for i := range elements {
		e := &elements[i]
		for ii := range e.innerElements {
			ie := &e.innerElements[ii]
			ie.innerField *= 2
		}
	}

	if !reflect.DeepEqual(elements, doubledElements) {
		t.Fail()
	}
}

MutableValues allows to write it in clean compact form:
func TestDoubleWithMutableValuesIterator(t *testing.T) {
	elements := slices.Clone(srcElements)

	// values in elements will be changed
	for e := range slices.MutableValues(elements) {
		for ie := range slices.MutableValues(e.innerElements) {
			ie.innerField *= 2
			// changing other fields is also easy here
		}
	}

	if !reflect.DeepEqual(elements, doubledElements) {
		t.Fail()
	}
}

I want to address it again. Iterators are not only to shorten loop code. They certainly have other meaningfulness. Otherwise, the following APIs in the std library are totally meaningless:
slices.All
slices.Values
maps.All
maps.Keys
maps.Values


[SPARK-47423][SQL] Collations - Set operation support for strings with collations

What changes were proposed in this pull request?

This PR fixes support for set operations for strings with collations different from UTF8_BINARY. The fix is not strictly related to set operations and may resolve other problems in collation space. The fix is to add default value for StringType with collation. Previously the matching pattern would not catch the StringType with collation case and fix is simply to do pattern matching on st: StringType instead of relying on StringType match.
Why are the changes needed?

Fixing behaviour of set operations.
Does this PR introduce any user-facing change?

Yes - fixing the logic that previously didn't work.
How was this patch tested?

Golden file tests are added.
Was this patch authored or co-authored using generative AI tooling?

No.

+1, LGTM. Merging to master.
Thank you, @dbatomic and @yaooqinn for review.


Serversless functions trying to retrieve packages from {app_root}/node_modules instead of {app_root}/functions

I have this project structure
├── nhost
│   └── emails
│   ├── metadata
│   ├── migrations
└── functions
│   ├── node_modules
│   ├── hello.ts
└── web
│   ├── node_modules
│   ├── src
│   ├── pages

However, when trying to run a function I get this error:
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '/xxx/xxx/my-app/node_modules/express'
Require stack:

/private/var/folders/v8/2ytdjg411877v5dk1sn8v1300000gn/T/2155358153/users/1912323327.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/private/var/folders/v8/2ytdjg411877v5dk1sn8v1300000gn/T/2155358153/users/1912323327.js:2:19)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/private/var/folders/v8/2ytdjg411877v5dk1sn8v1300000gn/T/2155358153/users/1912323327.js'
]

it is clearly trying to get node_modules from {app_root} and not from {app_root}/functions

Hi, I saw your discord question that you solved it in restarting the cli. Is that the same issue?

No it was a different issue.
Actually, this project structure isn't supported since the CLI will always look for node_modules at the root of the project and not within functions folder.
In order to use functions we need to have a package.json and node_modules at the root of the project.


get init

get init
'get' is not recognized as an internal or external command,
operable program or batch file.

配置get的环境变量
安装get_cli的时候会有提示路径


Problem with measurements contribution

Hi!
I would like to contribute with measurements of two different models of yeelight lamps but I encountered one problem.
When I run the command
docker run --rm --name=measure --env-file=.env -v %CD%/export:/app/export -v %CD%/.persistent:/app/.persistent -it bramgerritsen/powercalc-measure:latest
I get these errors
Powercalc measure: v1.3.1:docker

2023-01-29 09:57:19,394 [DEBUG] Checking API connection: http://<IP_ADDRESS>/status
2023-01-29 09:57:19,397 [DEBUG] Starting new HTTP connection (1): <IP_ADDRESS>:80
2023-01-29 09:57:19,427 [DEBUG] http://<IP_ADDRESS>:80 "GET /status HTTP/1.1" 400 11
2023-01-29 09:57:19,428 [DEBUG] Unexpected status code 400
2023-01-29 09:57:19,428 [DEBUG] Checking API connection: http://<IP_ADDRESS>/rpc/Shelly.GetStatus
2023-01-29 09:57:19,430 [DEBUG] Starting new HTTP connection (1): <IP_ADDRESS>:80
2023-01-29 09:57:19,459 [DEBUG] http://<IP_ADDRESS>:80 "GET /rpc/Shelly.GetStatus HTTP/1.1" 400 11
2023-01-29 09:57:19,460 [DEBUG] Unexpected status code 400
2023-01-29 09:57:19,460 [ERROR] Aborting: Could not connect to Shelly Plug

but if I run in the same console the command curl http://<IP_ADDRESS>/status I get the correct output
{"wifi_sta":{"connected":true,"ssid":"xxxxxxxxxxxxxx","ip":"<IP_ADDRESS>","rssi":-80},"cloud":{"enabled":true,"connected":true},"mqtt":{"connected":false},"time":"10:58","unixtime":1674986292,"serial":7067,"has_update":false,"mac":"B4E62D7AE8CB","cfg_changed_cnt":0,"actions_stats":{"skipped":0},"relays":[{"ison":true,"has_timer":false,"timer_started":0,"timer_duration":0,"timer_remaining":0,"overpower":false,"source":"http"}],"meters":[{"power":0.41,"overpower":0.00,"is_valid":true,"timestamp":1674989892,"counters":[0.417, 0.404, 0.394],"total":3353}],"temperature":28.20,"overtemperature":false,"tmp":{"tC":28.20,"tF":82.75, "is_valid":true},"update":{"status":"idle","has_update":false,"new_version":"20230109-114426/v1.12.2-g32055ee","old_version":"20230109-114426/v1.12.2-g32055ee"},"ram_total":52064,"ram_free":40584,"fs_size":233681,"fs_free":167166,"uptime":321162}

This is my configuration:
C:\>docker version
Client:
 Cloud integration: v1.0.29
 Version:           20.10.22
 API version:       1.41
 Go version:        go1.18.9
 Git commit:        3a2c30b
 Built:             Thu Dec 15 22:36:18 2022
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: Docker Desktop 4.16.2 (95914)
 Engine:
  Version:          20.10.22
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.9
  Git commit:       42c8b31
  Built:            Thu Dec 15 22:26:14 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.14
  GitCommit:        9ba4b250366a5ddde94bb7c9d1def331423aa323
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Very strange. I have no clue yet.
http://<IP_ADDRESS>:80 "GET /status HTTP/1.1" 400
This indicates a 400 status code was returned by the Shelly API.
It's just a simple get request however.
Just to be sure, could you try the curl request to http://<IP_ADDRESS>:80/status, which the port number in the URI?

I tried with the port number but the result is the same:
C:\>curl http://<IP_ADDRESS>:80/status
{"wifi_sta":{"connected":true,"ssid":"xxxxxxxxxxxxxx","ip":"<IP_ADDRESS>","rssi":-83},"cloud":{"enabled":true,"connected":true},"mqtt":{"connected":false},"time":"14:56","unixtime":1675000617,"serial":261,"has_update":false,"mac":"B4E62D7AE8CB","cfg_changed_cnt":0,"actions_stats":{"skipped":0},"relays":[{"ison":false,"has_timer":false,"timer_started":0,"timer_duration":0,"timer_remaining":0,"overpower":false,"source":"input"}],"meters":[{"power":0.00,"overpower":0.00,"is_valid":true,"timestamp":1675004217,"counters":[0.000, 0.000, 0.000],"total":0}],"temperature":22.39,"overtemperature":false,"tmp":{"tC":22.39,"tF":72.31, "is_valid":true},"update":{"status":"idle","has_update":false,"new_version":"20230109-114426/v1.12.2-g32055ee","old_version":"20230109-114426/v1.12.2-g32055ee"},"ram_total":52064,"ram_free":40560,"fs_size":233681,"fs_free":167166,"uptime":11803}

I also tried to launch measurement with Shelly Plug S unplugged from the power line and the rusult is this:
C:\>docker run --rm --name=measure --env-file=.env -v %CD%/export:/app/export -v %CD%/.persistent:/app/.persistent -it bramgerritsen/powercalc-measure:latest
Powercalc measure: v1.3.1:docker

2023-01-29 10:39:24,084 [DEBUG] Checking API connection: http://<IP_ADDRESS>/status
2023-01-29 10:39:24,087 [DEBUG] Starting new HTTP connection (1): <IP_ADDRESS>:80
2023-01-29 10:39:29,110 [DEBUG] http://<IP_ADDRESS>:80 "GET /status HTTP/1.1" 403 None
2023-01-29 10:39:29,115 [DEBUG] Unexpected status code 403
2023-01-29 10:39:29,116 [DEBUG] Checking API connection: http://<IP_ADDRESS>/rpc/Shelly.GetStatus
2023-01-29 10:39:29,121 [DEBUG] Starting new HTTP connection (1): <IP_ADDRESS>:80
2023-01-29 10:39:34,147 [DEBUG] http://<IP_ADDRESS>:80 "GET /rpc/Shelly.GetStatus HTTP/1.1" 403 None
2023-01-29 10:39:34,149 [DEBUG] Unexpected status code 403
2023-01-29 10:39:34,149 [ERROR] Aborting: Could not connect to Shelly Plug

Tell me if there is something I can do to dubug and try to resolve the problem.
P.S. Is there a way to run curl command inside the docker container instead of from my console?

When you have the docker container running start another terminal session and try this:
docker exec -it measure sh

Which should bring you in the shell of the docker container,
Install curl
apt install curl

And try from the docker container:
curl http://<IP_ADDRESS>:80/status

Hopefully this should give more clues.

Thank you for suggestion.
The problem is that the container stop automatically after the error and I don't know how to avoid this behavior.

Try remove --rm at the docker run command.
Or else set power meter to dummy in env temporarily, which should prevent the container to stop.

# curl http://<IP_ADDRESS>:80/status --trace-ascii -
== Info: Expire in 0 ms for 6 (transfer 0x55be560b1010)
== Info:   Trying <IP_ADDRESS>...
== Info: TCP_NODELAY set
== Info: Expire in 200 ms for 4 (transfer 0x55be560b1010)
== Info: Connected to <IP_ADDRESS> (<IP_ADDRESS>) port 80 (#0)
=> Send header, 83 bytes (0x53)
0000: GET /status HTTP/1.1
0016: Host: <IP_ADDRESS>
002b: User-Agent: curl/7.64.0
0044: Accept: */*
0051:
<= Recv header, 26 bytes (0x1a)
0000: HTTP/1.1 400 Bad Request
<= Recv header, 23 bytes (0x17)
0000: Server: Mongoose/6.18
<= Recv header, 26 bytes (0x1a)
0000: Content-Type: text/plain
<= Recv header, 19 bytes (0x13)
0000: Connection: close
<= Recv header, 20 bytes (0x14)
0000: Content-Length: 11
<= Recv header, 2 bytes (0x2)
0000:
<= Recv data, 11 bytes (0xb)
0000: Bad Request
Bad Request== Info: Closing connection 0

# wget http://<IP_ADDRESS>:80/status --debug
DEBUG output created by Wget 1.20.1 on linux-gnu.

Reading HSTS entries from /root/.wget-hsts
URI encoding = ‘UTF-8’
Converted file name 'status' (UTF-8) -> 'status' (UTF-8)
--2023-01-29 19:44:27--  http://<IP_ADDRESS>/status
Connecting to <IP_ADDRESS>:80... connected.
Created socket 3.
Releasing 0x0000562b54562f90 (new refcount 0).
Deleting unused 0x0000562b54562f90.

---request begin---
GET /status HTTP/1.1
User-Agent: Wget/1.20.1 (linux-gnu)
Accept: */*
Accept-Encoding: identity
Host: <IP_ADDRESS>
Connection: Keep-Alive

---request end---
HTTP request sent, awaiting response...
---response begin---
HTTP/1.1 400 Bad Request
Server: Mongoose/6.18
Content-Type: text/plain
Connection: close
Content-Length: 11

---response end---
400 Bad Request
Closed fd 3
2023-01-29 19:44:27 ERROR 400: Bad Request.```

After these two test I have no clue yet.

I have no idea as well. Maybe some docker on windows quirks.
Could you try with the hass powermeter (which connects to the Home Assistanst API) to see if that one gives similar issues?

With hass powermeter it starts measurement but aborts with an error after a while
Powercalc measure: v1.3.1:docker

2023-01-29 20:14:15,265 [ERROR] Initializing Client syncronously
2023-01-29 20:14:15,266 [INFO] Selected powermeter: hass
2023-01-29 20:14:15,266 [INFO] Selected light controller: hass
[?] What kind of device do you want to measure the power of?: Light bulb(s)
 > Light bulb(s)
   Smart speaker

2023-01-29 20:14:16,747 [ERROR] Initializing Client syncronously
2023-01-29 20:14:16,748 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/config
2023-01-29 20:14:16,751 [DEBUG] Starting new HTTP connection (1): <IP_ADDRESS>:8123
2023-01-29 20:14:16,766 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/config HTTP/1.1" 200 1392
2023-01-29 20:14:16,767 [DEBUG] Using processor <function process_json at 0x7feaff7d3640> on <Response [200]>
2023-01-29 20:14:16,767 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states
2023-01-29 20:14:16,799 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states HTTP/1.1" 200 36633
2023-01-29 20:14:16,817 [DEBUG] Using processor <function process_json at 0x7feaff7d3640> on <Response [200]>
2023-01-29 20:14:16,920 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states
2023-01-29 20:14:16,921 [DEBUG] Starting new HTTP connection (1): <IP_ADDRESS>:8123
2023-01-29 20:14:16,965 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states HTTP/1.1" 200 36633
2023-01-29 20:14:16,984 [DEBUG] Using processor <function process_json at 0x7feaff7d3640> on <Response [200]>
[?] Do you want to generate model.json? (Y/n):
[?] Specify the full Light bulb(s) model name: MJTD01SYL
[?] Which powermeter (manufacturer, model) do you use to take the measurement?: Shelly Plug S
[?] Select the color mode: ColorMode.COLOR_TEMP
   hs
 > color_temp
   brightness

[?] Do you want to gzip CSV files? (Y/n):
[?] Did you connect a dummy load? This can help to be able to measure standby power and low brightness levels correctly (y/N):
[?] Are you measuring multiple lights. In some situations it helps to connect multiple lights to be able to measure low currents. (y/N):
[?] Select the light: light.midesklamp1s_ae74
   light.luce_dell_ingresso
   light.luce_della_camera
   light.luce_della_cameretta
   light.luce_dello_specchio
   light.luce_doppia
   light.luce_singola
   light.luce_sul_balcone_del_sogiorno
   light.luce_sul_balcone_della_cucina
   light.luce_sul_comodino_di_pasquale
   light.luce_sul_comodino_di_rossella
   light.mibedsidelamp2_88a1
 > light.midesklamp1s_ae74
   light.shellyswitch25_10521c06ed5c_channel_1

[?] What model is your light? Ex: LED1837R5: MJTD01SYL
[?] Select the powermeter: sensor.shellyplug_s_7ae8cb_device_power
   sensor.luce_singola_power
   sensor.luce_sul_balcone_del_sogiorno_power
   sensor.luce_sul_balcone_della_cucina_power
   sensor.luce_sul_comodino_di_pasquale_power
   sensor.luce_sul_comodino_di_rossella_power
   sensor.mi_9t_battery_power
 > sensor.shellyplug_s_7ae8cb_device_power
   sensor.shellyplug_s_7ae8cb_internet_access_device_power
   sensor.shellyplug_s_7ae8cb_power
   sensor.shellyswitch25_10521c06ed5c_channel_1_power
   sensor.shellyswitch25_10521c06ed5c_channel_2_power
   sensor.shellyswitch25_483fda8d0c82_channel_1_power
   sensor.shellyswitch25_483fda8d0c82_channel_2_power

2023-01-29 20:16:17,727 [DEBUG] Answers: {'generate_model_json': True, 'model_name': 'MJTD01SYL', 'measure_device': 'Shelly Plug S', 'color_mode': 'color_temp', 'gzip': True, 'dummy_load': False, 'multiple_lights': False, 'num_lights': None, 'light_entity_id': 'light.midesklamp1s_ae74', 'light_model_id': 'MJTD01SYL', 'powermeter_entity_id': 'sensor.shellyplug_s_7ae8cb_device_power'}
2023-01-29 20:16:17,729 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/light.midesklamp1s_ae74
2023-01-29 20:16:17,731 [DEBUG] Resetting dropped connection: <IP_ADDRESS>
2023-01-29 20:16:17,748 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/light.midesklamp1s_ae74 HTTP/1.1" 200 282
2023-01-29 20:16:17,749 [DEBUG] Using processor <function process_json at 0x7feaff7d3640> on <Response [200]>
2023-01-29 20:16:17,773 [INFO] Starting measurements. Estimated duration: 4.9h
2023-01-29 20:16:17,780 [DEBUG] POST request to http://<IP_ADDRESS>:8123/api/services/light/turn_on
2023-01-29 20:16:17,871 [DEBUG] http://<IP_ADDRESS>:8123 "POST /api/services/light/turn_on HTTP/1.1" 200 379
2023-01-29 20:16:17,872 [DEBUG] Using processor <function process_json at 0x7feaff7d3640> on <Response [200]>
2023-01-29 20:16:17,873 [INFO] Start taking measurements for color mode: color_temp
2023-01-29 20:16:17,873 [INFO] Waiting 10 seconds...
2023-01-29 20:16:27,884 [INFO] Progress: 0%, Estimated time left: 4.9h
2023-01-29 20:16:27,885 [INFO] Changing light to: ColorTempVariation(bri=1, ct=50)
2023-01-29 20:16:27,886 [DEBUG] POST request to http://<IP_ADDRESS>:8123/api/services/light/turn_on
2023-01-29 20:16:27,997 [DEBUG] http://<IP_ADDRESS>:8123 "POST /api/services/light/turn_on HTTP/1.1" 200 382
2023-01-29 20:16:28,001 [DEBUG] Using processor <function process_json at 0x7feaff7d3640> on <Response [200]>
2023-01-29 20:16:31,009 [DEBUG] Taking sample 1
2023-01-29 20:16:31,010 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_device_power
2023-01-29 20:16:31,018 [DEBUG] Resetting dropped connection: <IP_ADDRESS>
2023-01-29 20:16:31,044 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_device_power HTTP/1.1" 200 327
2023-01-29 20:16:31,045 [DEBUG] Using processor <function process_json at 0x7feaff7d3640> on <Response [200]>
2023-01-29 20:16:31,046 [DEBUG] Measurement received (update_time=29-01-2023, 20:13:38)
2023-01-29 20:16:34,049 [DEBUG] Taking sample 1
2023-01-29 20:16:34,050 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_device_power
2023-01-29 20:16:34,074 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_device_power HTTP/1.1" 200 327
2023-01-29 20:16:34,076 [DEBUG] Using processor <function process_json at 0x7feaff7d3640> on <Response [200]>
2023-01-29 20:16:34,078 [DEBUG] Measurement received (update_time=29-01-2023, 20:13:38)
2023-01-29 20:16:37,082 [DEBUG] Taking sample 1
2023-01-29 20:16:37,083 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_device_power
2023-01-29 20:16:37,115 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_device_power HTTP/1.1" 200 327
2023-01-29 20:16:37,119 [DEBUG] Using processor <function process_json at 0x7feaff7d3640> on <Response [200]>
2023-01-29 20:16:37,124 [DEBUG] Measurement received (update_time=29-01-2023, 20:13:38)
2023-01-29 20:16:40,128 [DEBUG] Taking sample 1
2023-01-29 20:16:40,129 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_device_power
2023-01-29 20:16:40,140 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_device_power HTTP/1.1" 200 327
2023-01-29 20:16:40,141 [DEBUG] Using processor <function process_json at 0x7feaff7d3640> on <Response [200]>
2023-01-29 20:16:40,142 [DEBUG] Measurement received (update_time=29-01-2023, 20:13:38)
2023-01-29 20:16:43,146 [DEBUG] Taking sample 1
2023-01-29 20:16:43,147 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_device_power
2023-01-29 20:16:43,169 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_device_power HTTP/1.1" 200 327
2023-01-29 20:16:43,173 [DEBUG] Using processor <function process_json at 0x7feaff7d3640> on <Response [200]>
2023-01-29 20:16:43,179 [DEBUG] Measurement received (update_time=29-01-2023, 20:13:38)
2023-01-29 20:16:46,184 [DEBUG] Taking sample 1
2023-01-29 20:16:46,185 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_device_power
2023-01-29 20:16:46,208 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_device_power HTTP/1.1" 200 327
2023-01-29 20:16:46,212 [DEBUG] Using processor <function process_json at 0x7feaff7d3640> on <Response [200]>
2023-01-29 20:16:46,220 [DEBUG] Measurement received (update_time=29-01-2023, 20:13:38)
2023-01-29 20:16:46,225 [ERROR] Aborting: Power measurement is outdated. Aborting after 1 nudged retries

With hass powermeter it starts measurement but it stops with an error after a while:
Powercalc measure: v1.3.1:docker

2023-01-29 20:30:05,630 [ERROR] Initializing Client syncronously
2023-01-29 20:30:05,630 [INFO] Selected powermeter: hass
2023-01-29 20:30:05,631 [INFO] Selected light controller: hass
[?] What kind of device do you want to measure the power of?: Light bulb(s)
 > Light bulb(s)
   Smart speaker

2023-01-29 20:30:07,403 [ERROR] Initializing Client syncronously
2023-01-29 20:30:07,404 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/config
2023-01-29 20:30:07,407 [DEBUG] Starting new HTTP connection (1): <IP_ADDRESS>:8123
2023-01-29 20:30:07,428 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/config HTTP/1.1" 200 1392
2023-01-29 20:30:07,429 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:30:07,430 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states
2023-01-29 20:30:07,479 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states HTTP/1.1" 200 36819
2023-01-29 20:30:07,490 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:30:07,598 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states
2023-01-29 20:30:07,599 [DEBUG] Starting new HTTP connection (1): <IP_ADDRESS>:8123
2023-01-29 20:30:07,641 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states HTTP/1.1" 200 36819
2023-01-29 20:30:07,650 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
[?] Do you want to generate model.json? (Y/n):
[?] Specify the full Light bulb(s) model name: MJTD01SYL
[?] Which powermeter (manufacturer, model) do you use to take the measurement?: Shelly Plug S
[?] Select the color mode: ColorMode.COLOR_TEMP
   hs
 > color_temp
   brightness

[?] Do you want to gzip CSV files? (Y/n):
[?] Did you connect a dummy load? This can help to be able to measure standby power and low brightness levels correctly (y/N):
[?] Are you measuring multiple lights. In some situations it helps to connect multiple lights to be able to measure low currents. (y/N):
[?] Select the light: light.midesklamp1s_ae74
   light.luce_dell_ingresso
   light.luce_della_camera
   light.luce_della_cameretta
   light.luce_dello_specchio
   light.luce_doppia
   light.luce_singola
   light.luce_sul_balcone_del_sogiorno
   light.luce_sul_balcone_della_cucina
   light.luce_sul_comodino_di_pasquale
   light.luce_sul_comodino_di_rossella
   light.mibedsidelamp2_88a1
 > light.midesklamp1s_ae74
   light.shellyswitch25_10521c06ed5c_channel_1

[?] What model is your light? Ex: LED1837R5: MJTD01SYL
[?] Select the powermeter: sensor.shellyplug_s_7ae8cb_power
   sensor.luce_singola_power
   sensor.luce_sul_balcone_del_sogiorno_power
   sensor.luce_sul_balcone_della_cucina_power
   sensor.luce_sul_comodino_di_pasquale_power
   sensor.luce_sul_comodino_di_rossella_power
   sensor.mi_9t_battery_power
   sensor.shellyplug_s_7ae8cb_device_power
   sensor.shellyplug_s_7ae8cb_internet_access_device_power
 > sensor.shellyplug_s_7ae8cb_power
   sensor.shellyswitch25_10521c06ed5c_channel_1_power
   sensor.shellyswitch25_10521c06ed5c_channel_2_power
   sensor.shellyswitch25_483fda8d0c82_channel_1_power
   sensor.shellyswitch25_483fda8d0c82_channel_2_power

2023-01-29 20:30:56,002 [DEBUG] Answers: {'generate_model_json': True, 'model_name': 'MJTD01SYL', 'measure_device': 'Shelly Plug S', 'color_mode': 'color_temp', 'gzip': True, 'dummy_load': False, 'multiple_lights': False, 'num_lights': None, 'light_entity_id': 'light.midesklamp1s_ae74', 'light_model_id': 'MJTD01SYL', 'powermeter_entity_id': 'sensor.shellyplug_s_7ae8cb_power'}
2023-01-29 20:30:56,004 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/light.midesklamp1s_ae74
2023-01-29 20:30:56,017 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/light.midesklamp1s_ae74 HTTP/1.1" 200 281
2023-01-29 20:30:56,018 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:30:56,044 [INFO] Starting measurements. Estimated duration: 4.9h
2023-01-29 20:30:56,050 [DEBUG] POST request to http://<IP_ADDRESS>:8123/api/services/light/turn_on
2023-01-29 20:30:56,150 [DEBUG] http://<IP_ADDRESS>:8123 "POST /api/services/light/turn_on HTTP/1.1" 200 374
2023-01-29 20:30:56,153 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:30:56,160 [INFO] Start taking measurements for color mode: color_temp
2023-01-29 20:30:56,163 [INFO] Waiting 10 seconds...
2023-01-29 20:31:06,178 [INFO] Progress: 0%, Estimated time left: 4.9h
2023-01-29 20:31:06,178 [INFO] Changing light to: ColorTempVariation(bri=1, ct=50)
2023-01-29 20:31:06,178 [DEBUG] POST request to http://<IP_ADDRESS>:8123/api/services/light/turn_on
2023-01-29 20:31:06,225 [DEBUG] http://<IP_ADDRESS>:8123 "POST /api/services/light/turn_on HTTP/1.1" 200 383
2023-01-29 20:31:06,225 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:09,230 [DEBUG] Taking sample 1
2023-01-29 20:31:09,231 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_power
2023-01-29 20:31:09,250 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_power HTTP/1.1" 200 248
2023-01-29 20:31:09,252 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:09,255 [DEBUG] Measurement received (update_time=29-01-2023, 20:31:03)
2023-01-29 20:31:12,259 [DEBUG] Taking sample 1
2023-01-29 20:31:12,260 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_power
2023-01-29 20:31:12,281 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_power HTTP/1.1" 200 248
2023-01-29 20:31:12,284 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:12,287 [DEBUG] Measurement received (update_time=29-01-2023, 20:31:03)
2023-01-29 20:31:15,292 [DEBUG] Taking sample 1
2023-01-29 20:31:15,293 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_power
2023-01-29 20:31:15,305 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_power HTTP/1.1" 200 248
2023-01-29 20:31:15,306 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:15,307 [DEBUG] Measurement received (update_time=29-01-2023, 20:31:03)
2023-01-29 20:31:18,310 [DEBUG] Taking sample 1
2023-01-29 20:31:18,311 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_power
2023-01-29 20:31:18,334 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_power HTTP/1.1" 200 248
2023-01-29 20:31:18,338 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:18,340 [DEBUG] Measurement received (update_time=29-01-2023, 20:31:03)
2023-01-29 20:31:21,344 [DEBUG] Taking sample 1
2023-01-29 20:31:21,345 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_power
2023-01-29 20:31:21,368 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_power HTTP/1.1" 200 251
2023-01-29 20:31:21,370 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:21,371 [DEBUG] Measurement received (update_time=29-01-2023, 20:31:18)
2023-01-29 20:31:24,375 [DEBUG] Taking sample 2
2023-01-29 20:31:24,376 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_power
2023-01-29 20:31:24,391 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_power HTTP/1.1" 200 251
2023-01-29 20:31:24,393 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:24,396 [DEBUG] Measurement received (update_time=29-01-2023, 20:31:18)
2023-01-29 20:31:27,400 [INFO] Measured power: 8.8
2023-01-29 20:31:27,403 [DEBUG] Flushing CSV buffer
2023-01-29 20:31:27,404 [INFO] Changing light to: ColorTempVariation(bri=1, ct=60)
2023-01-29 20:31:27,405 [DEBUG] POST request to http://<IP_ADDRESS>:8123/api/services/light/turn_on
2023-01-29 20:31:27,509 [DEBUG] http://<IP_ADDRESS>:8123 "POST /api/services/light/turn_on HTTP/1.1" 200 387
2023-01-29 20:31:27,511 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:30,516 [DEBUG] Taking sample 1
2023-01-29 20:31:30,517 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_power
2023-01-29 20:31:30,540 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_power HTTP/1.1" 200 251
2023-01-29 20:31:30,543 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:30,547 [DEBUG] Measurement received (update_time=29-01-2023, 20:31:18)
2023-01-29 20:31:33,551 [DEBUG] Taking sample 1
2023-01-29 20:31:33,551 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_power
2023-01-29 20:31:33,560 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_power HTTP/1.1" 200 251
2023-01-29 20:31:33,561 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:33,562 [DEBUG] Measurement received (update_time=29-01-2023, 20:31:18)
2023-01-29 20:31:36,566 [DEBUG] Taking sample 1
2023-01-29 20:31:36,567 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_power
2023-01-29 20:31:36,595 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_power HTTP/1.1" 200 251
2023-01-29 20:31:36,597 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:36,599 [DEBUG] Measurement received (update_time=29-01-2023, 20:31:18)
2023-01-29 20:31:39,603 [DEBUG] Taking sample 1
2023-01-29 20:31:39,603 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_power
2023-01-29 20:31:39,629 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_power HTTP/1.1" 200 251
2023-01-29 20:31:39,633 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:39,636 [DEBUG] Measurement received (update_time=29-01-2023, 20:31:18)
2023-01-29 20:31:42,641 [DEBUG] Taking sample 1
2023-01-29 20:31:42,642 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_power
2023-01-29 20:31:42,654 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_power HTTP/1.1" 200 251
2023-01-29 20:31:42,655 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:42,655 [DEBUG] Measurement received (update_time=29-01-2023, 20:31:18)
2023-01-29 20:31:45,659 [DEBUG] Taking sample 1
2023-01-29 20:31:45,659 [DEBUG] GET request to http://<IP_ADDRESS>:8123/api/states/sensor.shellyplug_s_7ae8cb_power
2023-01-29 20:31:45,678 [DEBUG] http://<IP_ADDRESS>:8123 "GET /api/states/sensor.shellyplug_s_7ae8cb_power HTTP/1.1" 200 251
2023-01-29 20:31:45,680 [DEBUG] Using processor <function process_json at 0x7f2edb80f640> on <Response [200]>
2023-01-29 20:31:45,681 [DEBUG] Measurement received (update_time=29-01-2023, 20:31:18)
2023-01-29 20:31:45,687 [ERROR] Aborting: Power measurement is outdated. Aborting after 1 nudged retries

That means the shelly plug state was not updated in HA after you switched the light. The measure tool tries a few times with sleeps in between and aborts when it can't get a recent power reading.
You can check in HA developer tools, and look at the update time.
You can also try setting the MAX_NUDGES setting in .env and increasing SLEEP_TIME
Do you have another Shelly plug which you can test? Maybe your plug is faulty somehow?

@maverick1982 Did my comments help?

Hi @bramstroker .
Yes, your comment helped me.
I have changed some parameters and now it seams to work.
I'll update you at the end of the measure.
Thankyou very much!

It worked and I have completed the measure.
I have just last question before I open the pull request.
Auto-discover fails with log
light.midesklamp1s_ae74: Skipping sensor setup Model not found in library (manufacturer: Yeelight Technology, model: MJTD01SYL)

but all works fine if I set manually manufacturer: yeelight.
Can I fix this ploblem in some way?
FYI: I put files in custom_components/powercalc/data/yeelight/MJTD01SYL folder

You can add an alias in this file https://github.com/bramstroker/homeassistant-powercalc/blob/master/custom_components/powercalc/aliases.py
"Yeelight Technology" is unknown to powercalc yet, so you must alias that to "Yeelight" here. See the other manufacturers for example.

@bramstroker thank you very much for your support!
I have opened the Pull Request


Default font on macOS should be SF Mono

SF Mono should be the default font on macOS if the font is downloaded. This would make VS Code look more native to the system.

SF Mono is already being used. Which part of the UI has the wrong font?


unmet peer dependency on eslint@8

└─┬ neostandard 0.6.0
  └─┬ @stylistic/eslint-plugin 2.1.0
    └─┬ @stylistic/eslint-plugin-plus 2.1.0
      └─┬ @typescript-eslint/utils 7.12.0
        └── ✕ unmet peer<EMAIL_ADDRESS>found 9.4.0

This is when using pnpm

Discovered that it had reappeared yesterday as well, reported it: https://github.com/eslint-stylistic/eslint-stylistic/issues/414

Is it actually causing any issues except a warning?
Because removing TS style support because of a peer dependency warning in a pre-release npm does not sound the right thing to do. Users can live with the warning, but without TS style support previously supported ...

@jerome-benoit Hopefully the stylistic team would move typescript-eslint to a peer dependency. I proposed that in their issue queue

Why not patch the package.json from upstream dep with patch-package as a temporary workaround? To avoid removing previously supported feature and installed the same deps with different  version.

Maybe we could fork the plugin until they officially release with typescript 8.x support, release it as @neostandard/eslint-stylistic-ts or something

@jerome-benoit Keeping track of it in https://github.com/neostandard/neostandard/issues/46 now :)


Preprocessing settings new features and cross-session update

modelPreprocessMovieFunction, getRegistrationSettings, and viewMovieRegistrationTest all updated to allow support for saving and loading of previous settings.
getRegistrationSettings - major refactoring to make it easier to add new settings, enable users to input arbitrary inputs into settings, and load previous settings.
matchObjBtwnTrials - Fix for cases in which cells are lost when cropping all movies to the same size before starting cross-session alignment.

Settings loaded from previous run (e.g. of modelPreprocessMovie) or file highlighted in orange now. Settings that user has just changed still highlighted in green.


[BUG] lark.exceptions.UnexpectedCharacters

Description

Followed by https://github.com/bufbuild/protovalidate-python?tab=readme-ov-file#usage instruction, but failed
    raise UnexpectedCharacters(lex_state.text, line_ctr.char_pos, line_ctr.line, line_ctr.column,
lark.exceptions.UnexpectedCharacters: No terminal matches 'o' in the current parser context, at line 1 col 23

(this.startswith('$') or this.startswith('£')) and float(this[
                      ^
Expected one of:
	* "!="
	* "=="
	* COLON
	* PLUS
	* ">="
	* COMMA
	* "||"
	* RSQB
	* QMARK
	* "<="
	* MORETHAN
	* MINUS
	* IN
	* LESSTHAN
	* RPAR
	* STAR
	* LBRACE
	* RBRACE
	* SLASH
	* DOT
	* PERCENT
	* "&&"
	* LSQB

Previous tokens: Token('RPAR', ')')

Steps to Reproduce

Expected Behavior

Actual Behavior

Screenshots/Logs

Environment

Operating System:
Version:
Compiler/Toolchain:
Protobuf Compiler & Version:
Protoc-gen-validate Version:
Protovalidate Version:

Possible Solution

Additional Context

Hi @elvizlai, looks like that was just some invalid CEL — have a fix in https://github.com/bufbuild/protovalidate-python/pull/230.


run travis integration tests on scylla

Why not run on both Apache Cassandra and ScyllaDB?

Sure can do that, are the Scylla flags OK?

@mmatczuk Why do you need --enable-in-memory-data-store? Otherwise looks OK to me.

Not to write on disk during the test

@mmatczuk Not write to disk to make the tests run faster? I don't object to using it, but I doubt it will show any significant difference. Up to you.

It's not the point, it runs in a Travis docker and we try to be nice to Travis by eliminating the writes.

@penberg please take a look

:+1:


Cli issue on RH7.9

Hello,
The platform sh support asks me to create an issue here (https://support.platform.sh/hc/en-us/requests/239416).
On Red Hat Enterprise Linux Server release 7.9 (Maipo), the platform sh cli has no input.
The installation seems to be ok :
Log of the installation using curl -fsSL https://raw.githubusercontent.com/platformsh/cli/main/installer.sh | bash :
^[[1;33m+--------------------------------------------------+^[[22;39m
^[[1;33m| |^[[22;39m
^[[1;33m| Platform.sh CLI Installer |^[[22;39m
^[[1;33m| |^[[22;39m
^[[1;33m+--------------------------------------------------+^[[22;39m
^[[1;33m
Checking environment^[[22;39m
^[[0;32m [] Your kernel (linux) is supported^[[0m
^[[0;32m [] Your architecture (amd64) is supported^[[0m
^[[0;32m [] Using raw install method^[[0m
^[[0;32m [] cURL is installed^[[0m
^[[0;32m [] No version specified, using latest (4.6.1)^[[0m
^[[0;32m [] Gzip is installed^[[0m
^[[0;32m [] sha1sum is installed^[[0m
^[[0;32m [] /usr/bin is in $PATH^[[0m
^[[1;33m
Target directories^[[22;39m
Binary will be installed in /usr/bin
^[[1;33m
Downloading the Platform.sh CLI^[[22;39m
Downloading https://github.com/platformsh/cli/releases/download/4.6.1/platform_4.6.1_linux_amd64.tar.gz
Uncompressing archive
Making the binary executable
Installing the binary under /usr/bin
^[[0;32m+--------------------------------------------------+^[[0m
^[[0;32m| |^[[0m
^[[0;32m| Platform.sh CLI has been installed successfully. |^[[0m
^[[0;32m| |^[[0m
^[[0;32m+--------------------------------------------------+^[[0m
^[[1;33m
What's next?^[[22;39m
To use the CLI, run: platform
^[[1;33m
Useful links:^[[22;39m
CLI introduction: https://docs.platform.sh/get-started/introduction.html#cli
As root : ls -l /usr/bin/platform
-rwxr-xr-x 1 501 games 28344320 26 mai   15:26 /usr/bin/platform
/usr/bin/platform -vvv return nothing.
Regards.

Hey, @cyril-ext - thanks for reporting this issue. I tried to reproduce it on CentOS 7.9 but couldn't. Please let us know if you have any specific security rules that might affect this.
For example, can you explicitly give it a temporary directory that is writable and run Platform.sh again? You can do this with the following command:
TMPDIR=/something/writable platform

Hello,
We have install the goland cli and the cli return a timetout. We know how to solve it (flow issue).
Thanks.

That's good to hear @cyril-ext - I'm going to solve this one for now, but please come back here in case you still face issues.


Compass to inquiry pr

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Type of change
Please choose appropriate options.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes in the below checkboxes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[ ] Ran Test A
[ ] Ran Test B

Test Configuration:

Software versions:
Hardware versions:

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

Added changes for server side evaluation based on eval{mode} property from the questionset. If mode is 'server' test evaluation will happen at server side and if mode is 'client' test evaluation will happen at client side (which is currently existing flow).

@pavankumar0408
Please build the web-component using command npm run build-web-component and update the npm package version.
For reference: https://github.com/Sunbird-inQuiry/player/pull/44/files
If you have the JIRA ticket kindly update the PR title to below format:
Issue #IQ-xxx feat: Proper message for PR header or the Jira ticket title

@rajnishdargan @sajeshkayyath, required access for adding reviewers


ConcurrentModificationException in LRUCacheMap

When running parallel threads with many different codecs, I'm able to generate a ConcurrentModificationException for the org.redisson.command.RedisExecutor#CODECS LRUCacheMap cache:
java.util.ConcurrentModificationException
        at java.base/java.util.LinkedHashMap$LinkedHashIterator.remove(LinkedHashMap.java:777)
        at org.redisson.cache.LRUCacheMap.onMapFull(LRUCacheMap.java:92)
        at org.redisson.cache.AbstractCacheMap.put(AbstractCacheMap.java:181)
        at org.redisson.cache.AbstractCacheMap.put(AbstractCacheMap.java:174)
        at org.redisson.command.RedisExecutor.getCodec(RedisExecutor.java:747)
        at org.redisson.command.RedisExecutor.execute(RedisExecutor.java:124)
        at org.redisson.command.CommandAsyncService.async(CommandAsyncService.java:605)
        at org.redisson.command.CommandAsyncService.readAsync(CommandAsyncService.java:357)
        at org.redisson.RedissonJsonBucket.getAsync(RedissonJsonBucket.java:100)
        at org.redisson.RedissonJsonBucket.get(RedissonJsonBucket.java:92)

This exception is actually lost (I had to find it via a debugger), because handleError then fails with:
java.lang.NullPointerException: Cannot invoke "java.util.concurrent.CompletableFuture.join()" because "connectionFuture" is null
        at org.redisson.command.RedisExecutor.handleError(RedisExecutor.java:614)
        at org.redisson.command.RedisExecutor.execute(RedisExecutor.java:200)
        at org.redisson.command.CommandAsyncService.async(CommandAsyncService.java:605)
        at org.redisson.command.CommandAsyncService.readAsync(CommandAsyncService.java:357)
        at org.redisson.RedissonJsonBucket.getAsync(RedissonJsonBucket.java:100)
        at org.redisson.RedissonJsonBucket.get(RedissonJsonBucket.java:92)

Although not LRU, I would recommend https://github.com/ben-manes/caffeine rather than debugging and maintaining an original LRU implementation in redisson.

Fixed.
Caffeine is too heavy for such a small task.

Fixed.

Thank you!

Caffeine is too heavy for such a small task.

Do you mean in terms of dependencies? Library size? I believe if you compared a benchmark against this implementation you will find it lower overhead.

I mean library size.


Add XRayCI integration

@charlierudolph @allewun
Somehow the notification for XRayCI fell off the table at some point. This commit adds it back.

:ship:


RF calculations wrong for multiple non-continuous pulse emission

HI Greg,
it seems that the RF calculations is wrong. Give a look at the attached notebook, the results should be different no?

I made a mistake, everythings works as expected, sorry :S

Thanks for taking a look at the package. I think the calculations are right - see my edits in this notebook. Emissions in year 50 should be located at idx 5000 of the numpy array when using a timestep of 0.01 (co2_emission[5000]). And because it was set up for continuous emission functions, the mass of pulse emissions need to be divided by the timestep. The model does need to take inputs in a better format, which would make this more clear.

No problem, I'm glad that someone else is taking a look at it! Let me know if you have any suggestions for how to improve the design or code. Hopefully in the next month or two I'll be doing a complete clean-up of the code (putting functions in classes, improving efficiency, etc).

Hi Greg,
I had the intention to use in ghgforcing in  termporalis to have a complete dynamic LCA package.
The idea is to use it to calculate GWP (thus would need also to include some others gasses) also considering the timing of emissions (i.e. Levasseur approach) and the GWPbio (Cherubini), really relevant to me that am working with forests and wood sector....this is the idea, need to check how much work this would involve :)
I would be more than happy to collaborate on this development and maybe write something together later (my actual final goal of this work).

Sure. I'm wrapping up a paper and a project at the moment, but should have some time once those are done. Go ahead and create issues for any specific improvements you want to suggest.


DOC: fixed Ricker wavelet formula

equations are one-lined in website documentation, making the
formula false by the absence of parenthesis in denominators;
to follow the convention from other docstrings, exponentiation is put
in Python-formatted form instead of LaTeX one;
in the same spirit, implicit multiplication is avoided,
and some other minor changes are made for cosmetic purposes;

Merged, thanks @danilo-augusto


[CI] fix creation of commits in error codes utility workflow

Signed-off-by: Suryashankar Das<EMAIL_ADDRESS>Description
Uses git-auto-commit-action to fix creation of commits in the error codes utility workflow.
This PR fixes #267
Notes for Reviewers
Signed commits

[x] Yes, I signed my commits.

Also, while you're at it, please do something about the glob that we use for adding files too.
**.go doesn't add the required go files:
https://github.com/meshery/meshery-istio/blob/1e8079e41721c41246b97fd68c38b5a7d37deaea/.github/workflows/error-ref-publisher.yaml#L38
doesn't work all the time due to shell quoting issues. I think changing it to something like **error.go should do the trick.

Were you also able to test this? If not, you should be able to do so by creating the required secret in your fork and pointing to your own fork of Meshery.

Got it, I'll try to test it out in my fork.
I'll need to look into the creating/adding of secrets part first though.

Btw a lot of the checks are failing due to some dependency issue, is this normal / known?

This should be helpful for creating a secret: https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository

Btw a lot of the checks are failing due to some dependency issue, is this normal / known?

Yes they are failing across every repo. Prolly some dependency changed its path or name. :grimacing:

It is because this package: https://gomodules.xyz/jsonpatch/v2?go-get=1 is giving a 404 error. I have found a workaround, but let's hope this gets fixed with using it.

Hey @warunicorn19 can you please provide the workaround here ?

@DelusionalOptimist it seems to be working fine. You can check out the commit it made over here

Hey @warunicorn19 can you please provide the workaround here ?

@sayantan1413 sorry I missed the message, this is the workaround, but let's wait till we implement this. // @leecalcote

@iamsdas let's get this updated in other repos as well? You up for it? 😃

Sure thing! I'll make the changes for the other repos too.


Logistics Multinet - North America only. WHY?

Hi
Why within the tool of MultiNet the logistics parametes are only available within North America?
would it work for Europe?

Hi @chritomix.  My apologies on the delay in this response.
Back when the original tool was first written for ArcMap well over a decade ago, I believe there was a lack of coverage of some logistics attributes that were only available in North America, so while the tool would successfully complete on data in Europe (or any other region), it would generate empty network attributes for these logistics attributes that weren't covered (the tool creates LOTS of logistics-specific restriction attributes!).
When the tool was ported to Pro about 26 months ago, the note restricting its usage to North America was dropped, as logistics attributes seem to be much more complete for many countries outside of North America.  This usage note still is no longer present in last week's most recent update of the MultiNet tool for Pro, as we encourage using it on data from all regions of the world.
Please let me know if you have any further questions.  Thanks!

It's been three months, and there have been no further comments on this issue, so I'm closing it.  If you're still having problems, feel free to re-open.


Support custom openapi url

I tried to do according to your suggestion. What do you think about it?

Thanks!


RFC: automated release cycle

Problem
I want some of the recent goodies checked into this ext, but they are not published to the marketplace.
Discussion
Do you have any interest in setting up some sort of Continuous Delivery to publish on change? I haven't looked into extension publishing, but would be willing to help wire up some semantic-release action to possibly help facilitate it if there is sufficient interest.

i think thats possible, i just need to add the key/cert to the security context of the git repo.
will look into that

we would need to add another release step to our github action workflows:
documentation:
https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions-automated-publishing
i added the vsce pat as VSCE_PAT to the repository secrets.
so if you find time i would be very happy.
regards
Tristan

Got it working in my fork.
https://github.com/cdaringe/vscode-jest-runner/runs/5797929175?check_suite_focus=true
Patches inbound. Pretty straightfoward

moving convo to #246


Duplicated C: drive

Hello,
I have an issue with this app: the C: drive at the 'Drives' is duplicated.
I have Windows 10 Home 64-bit, version 20H2.

Merging with #2686

Merging with #2686


Update JSDoc as documentation generator

Description

Move away from documentation and adapt better standardized jsdoc as documentation generator.

Applied theme: https://github.com/braintree/jsdoc-template
Documentation pages are now responsive
Minor amendment to README.md to better support this page shown in documentation webpages.

Motivation and Context

To provide better, consistent developer API documentations.
How Has This Been Tested?

Smoke test.
Types of changes:

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[x] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.

For the record,
existing design screenshot:

proposed design screenshot:

Looks like a clear improvement to me. Awesome job!


Import option to add a RESET animation

It is common practice for us to have a RESET animation in our animation players. I could add one to every Aseprite file, so that the wizard automatically generates it, but it would be cleaner to have it as an import option.

Yeah, that makes sense. I reckon the plugin can use any RESET animation set in aseprite itself, and fallback to the first frame from the first animation in case a RESET animation is not present. Was that what you had in mind?

Yes that’d work! Hadn’t thought about the ‘preset RESET’ needing a frame. And you’re right, first frame of first animation makes sense. Thanks :)


ci: merge staging to master

This is an automatic PR generated by the pipeline CI/CD. This will be automatically fast-forward merged if successful.

Pipeline Succeeded on 590322990 for fc0f586ded389fd3c5b3d265fd3d1c8103b0d705
https://gitlab.com/MatrixAI/open-source/js-logger/-/pipelines/590322990


Enable Discord-like emoji short codes

e.g. :heart:, :smile:, etc.

Added! Using the short codes defined here: https://gist.github.com/zhanghecool/2e5330aa211b7973f3a7332c5d172f88


Change preview hostname construction, enabling wildcard TLS certificates

We want to use "wildcard" TLS certificates to stop relying upon third-party certificate authorities for each new deployment. This should increase reliability and sometimes speed of new deployments. The easiest way to implement this is to use a single wildcard TLS certificate for all deployments. This requires that all deployments be subdomains of a single domain.
For example, a certificate for *.example.com will match foo.example.com but will not match foo.bar.example.com. As Wikipedia says:

[...] the wildcard only covers one level of subdomains (the asterisk doesn't match full stops.)

Maybe we can easily change how our app generates hostnames to only use a single level of subdomain. This could be as easy as replacing . with -.  Other tickets will describe changes to our controller and infrastructure.
This is a feature we want to become the most common case, so I don't think we need a feature "gate" like an environment variable.
Be mindful of RFC 1035 which specifies "Labels must be 63 characters or less."! https://datatracker.ietf.org/doc/html/rfc1035

For QA:

The hostname construction is changed so it consists of a single subdomain
If the subdomain length is bigger than 63 characters it gets cut

TESTED on prod - OK


Login with TwoFactor/Challenge on device without console

Issue Template Requirements
Issue must be of the specified template and follow these requirements or it will be ignored.

Please do not post screenshots of code output
Wrap code in a codeblock
exhibiting spam behavior or "evil" behavior will have the issue ignored
Please make sure your issue hasn't been asked before
Please complete the checklist below (mark boxes [ ] with [x])

Pre-Checklist
I made sure...

[x] I read the README.md
[x] I looked over the examples and wiki
[x] my issue hasn't been asked or solved before

Question
I cannot use the scanner.nextLine() for the onTwoFactor/challenge because I am using it on android, and the code will have to be input inside an EditText then be valide by the user. (Here the problem is for android, but could be anywhere the application have to request the user to write it inside an UI interface.)
My question is how can I be notify that the user should input a code (if needed) and how can I "pause" the login process until the user click on a button to confirm his input?

Please see this example (here)[https://github.com/instagram4j/instagram4j#two-factor-login]
The inputCode for reslolving is just a callable that must return the code. You can perform your retrieval via that callable.

If you have any other questions on usage, please ask them on our Discord.

Sorry but I still can't figure it out. Can you please show an example in which you are taking code from UI/edittext and resolving two factor?


5.9. Many-To-Many, Bidirectional - documentation

With described method of configuring Many-To_Many, Bidirectional relation I found that update works only on owner side as per documentation.
My colleague helped me to solve the problem and surprisingly solution was very simple.
Both classes has to be matched by inversedBy to make update works on both sides.
doctrine:schema:update --force didn't complain and performed update
doctrine:schema:validate generates errors and symfony profiler complains about two wrong entities
Now with above config update works on both sides

@mysiar the example used on http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html#many-to-many-bidirectional shows the mappedBy and inversedBy options and on http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/unitofwork-associations.html#bidirectional-associations you can see the more information about bidirectional associations.
As far as I can see the documentation is fine but maybe you could give more information on what made you misunderstand it or even a suggestion on how to improve the documentation?

All I wanted to say is that when I did it by example in documentation the relation updated changes only on one side: owner as per description - nothing wrong with that.
The thing is that by defining it as described in my post make it updating on both sides.
Though that it is worth to mention. That's all

@mysiar I don't understand what you mean by:

Both classes has to be matched by inversedBy to make update works on both sides.

Do you mean that both entities should have an inversedBy ? Or the value of inversedBy  should be both class names? Could you post an example?