Allow AccessKit to filter WindowEvents before they reach the engine.

This should have been part of #9989 but I didn't know it was necessary at the time.
Without this merged, AccessKit won't completely work on macOS or Unix.
It's draft at the moment because I don't know how to get this borrow working:
error[E0502]: cannot borrow `app.world` as immutable because it is also borrowed as mutable
   --> crates\bevy_winit\src\lib.rs:442:41
    |
422 |                       event_writer_system_state.get_mut(&mut app.world);
    |                                                         -------------- mutable borrow occurs here
...
442 |                   if let Some(adapters) = app.world.get_non_send_resource::<AccessKitAdapters>() {
    |                                           ^^^^^^^^^ immutable borrow occurs here
...
475 | /                         event_writers
476 | |                             .window_close_requested
    | |___________________________________________________- mutable borrow later used here

Help welcome.

It's draft at the moment because I don't know how to get this borrow working:

I think you need to change the event_writer_system_state parameter (line 310) to contain a Option<NonSend<AccessKitAdapters>> as well, then destructure it at line 421.

Hmm, would that require systems to use that signature, though? Wondering if that'd cause needed systems to not be retrieved/called unless they too access the adapters.
Thanks for taking the time to look into this.

I have

It's draft at the moment because I don't know how to get this borrow working:

I think you need to change the event_writer_system_state parameter (line 310) to contain a Option<NonSend<AccessKitAdapters>> as well, then destructure it at line 421.

Done in https://github.com/ndarilek/bevy/pull/2

CC @mwcampbell and @DataTriny Sorry, can't seem to do a quote reply for some reason but there's confusion about why the event filtering is needed and I don't want to speculate.
Also, be sure you're looking at the right implementation. The Windows version returns true but the Unix version doesn't, so it's definitely doing something.
Looks like more changes may be needed based on https://github.com/emilk/egui/pull/3475#issuecomment-1775422311. Going to try getting those in today but this exact moment isn't the best for me to be pivoting away from other projects so those may have to get punted to 0.12.1 if someone else can't get to them. Maybe AccessKit upgrade/migration notes might be a useful thing to have--sorry if they're there and I missed them.

If it's not used then I'm in favor of skipping it as well, though based on https://github.com/emilk/egui/pull/3475#issuecomment-1774152662 it sounded like a hard requirement (I.e. used for focus-tracking on macOS and hit-testing on Unix.)
I'd like some clarity on whether this is actually used or not. Thanks.

Yep, @mattcampbell @DataTriny I'd appreciate more clarification on this point. We're fine to retrofit this change in the future once that API is active: the changes we need to make look straightforward.

As I said in https://github.com/emilk/egui/pull/3475: calling on_event is required. I would strongly recommend to not ignore its return value, but since it currently is of no use at the moment I can't really convince anyone. So the suggested changes are acceptable to me.
I agree that the name of this function is not great and that it should be documented, I'll take care of that for accesskit_winit's next release.

Thanks a ton @DataTriny: your expertise here was very helpful.

Until there is a clear need for it, I think we should not filter events.
And in the future, I would prefer a design where events are marked as being handled by accessibility, but still have the option to handle them in Bevy or in other plugins that would answer other needs.

I've swapped this over to the non-filtering design for now: happy to revisit in the future but we do need to make and ship this change currently.
@mockersf if this has your approval please go ahead and merge.

This fails clippy. @ndarilek's branch doesn't support pushes from me so I can't fix it like I normally would.

Oh strange, "Allow edits and access to secrets by maintainers " is checked on my end. Is there something more I need to do?

Generally that should be enough. I've encountered this once before and we worked around it by giving me write access to the dev's bevy fork, but thats a nuclear option / not my preference. If you can just run rustfmt on bevy_winit/src/lib.rs and commit, that should solve our immediate problem.

I think the error reported in CI is due to a change on main and this PR needs rebasing.
@ndarilek can you try and fix CI? I can open a PR with your change and get it in shape otherwise

opened https://github.com/bevyengine/bevy/pull/10356 to fix CI

Adopted! Merging the linked PR: you'll be credited appropriately :)


Add changes after QA feedback

I want to merge this change because...

Apply changes after QA feedback SALEOR-4904
Impact

[ ] New migrations
[ ] New/Updated API fields or mutations
[ ] Deprecated API fields or mutations
[ ] Removed API types, fields, or mutations
[ ] Documentation needs to be updated

Pull Request Checklist

[ ] Privileged queries and mutations are guarded by proper permission checks
[ ] Database queries are optimized and the number of queries is constant
[ ] Database migration files are up to date
[ ] The changes are tested
[ ] GraphQL schema and type definitions are up to date
[ ] Changes are mentioned in the changelog

Task linked: SALEOR-4904 Changes after Lush's feedback


containerlab fails to cleanup exited containers

Looks like a regression has been introduced with containerlab failing to remove containers which reached exited state.
clab dep -c doesn't clean them up and reports that containers exist during the deploy phase.

A reproduction may be created with a linux container with entrypoint sleep 1 to simulate exist state.

@jbemmel can you paste here the output of docker version?

$ docker version
Client: Docker Engine - Community
Version:           24.0.2
API version:       1.41 (downgraded from 1.43)
Go version:        go1.20.4
Git commit:        cb74dfc
Built:             Thu May 25 21:51:00 2023
OS/Arch:           linux/amd64
Context:           default
Server:
Engine:
Version:          20.10.24
API version:      1.41 (minimum version 1.12)
Go version:       go1.20.4
Git commit:       5d6db84
Built:            Wed May 24 23:31:22 2023
OS/Arch:          linux/amd64
Experimental:     false
containerd:
Version:          v1.6.20
GitCommit:        2806fc1057397dbaeefbea0e4e17bddfbd388f38
runc:
Version:          1.1.5
GitCommit:
docker-init:
Version:          0.19.0
GitCommit:        de40ad0

Was able to reproduce with containers that would not exist.
Meaning I've deployed a topology, deleted a node (docker rm -f ) and the ran again with the --reconfigure knob.
Here we're implementing the reconfigure specifics, calling destroyLab()
https://github.com/srl-labs/containerlab/blob/main/cmd/deploy.go#L136-L145
It makes use of ListNodesContainers() trying to list all the nodes defined in the topology.
https://github.com/srl-labs/containerlab/blob/main/cmd/destroy.go#L150
But it retrieves an error and therrefore exists early and does not return all the nodes for deletion,
https://github.com/srl-labs/containerlab/blob/main/clab/clab.go#L629-L631
The fix is available in PR #1447

#1447 is merged via #1445, but this is not immediately related to the issue reported.
Maintainers still can't reproduce this issue to work on the fix.
I will close it keeping in mind that this issue may resurface. If anyone spots the issue and can enable remote access, we will reopen and investigate.


Update dependencies in preparation for v0.3 release

This includes adding pygraphviz, and upgrading the minimum python version to 3.9.

Sorry conda forge CI. I'll keep it in mind next time.


TabControls don't look Material

The MaterialTabControl look like a normal TabControl, but all others components work.
http://img11.hostingpics.net/pics/227095Screenshot72.png

On a new test project I was able to get this working using the 0.2.0 version of the MaterialSkin NuGet package.
Steps to configure the MaterialTabControl:

Add a MaterialTabSelector to the form.

Add a MaterialTabControl to the form.

Click on the MaterialTabSelector in the design view, go to the properties and update the BaseTabControl property to point to the MaterialTabControl added in step 2.

Save the form and close the form design view. Re-open the design view and it should now show the tabs in the MaterialTabSelector (changing the BaseTabControl or adding new tabs does not refresh the designer at the moment).

Thanks a lot ! I'm a bit disapointed by the way of this control work, is this possible to change the color of the MaterialTabSelector ? Thanks !

There is a MaterialSkinManager which allows you to change the theme and color scheme - you can find the source code for the demo application at https://github.com/IgnaceMaes/MaterialSkin/tree/master/MaterialSkinExample.
Album of themes/colors in the demo application
Example code for a form which has two buttons to change the theme and/or color scheme (taken from the demo application source code). You can select the colors you wish to use by setting materialSkinManager.ColorScheme in the form constructor.
public partial class Form1 : MaterialForm
{
    private readonly MaterialSkinManager materialSkinManager;

    public Form1()
    {
        InitializeComponent();

        materialSkinManager = MaterialSkinManager.Instance;
        materialSkinManager.AddFormToManage(this);
        materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
        materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE);
    }

    private void materialButton1_Click(object sender, EventArgs e)
    {
        materialSkinManager.Theme = materialSkinManager.Theme == MaterialSkinManager.Themes.DARK ? MaterialSkinManager.Themes.LIGHT : MaterialSkinManager.Themes.DARK;
    }

    private int colorSchemeIndex;
    private void materialRaisedButton1_Click(object sender, EventArgs e)
    {
        colorSchemeIndex++;
        if (colorSchemeIndex > 2) colorSchemeIndex = 0;

        //These are just example color schemes
        switch (colorSchemeIndex)
        {
            case 0:
                materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE);
                break;
            case 1:
                materialSkinManager.ColorScheme = new ColorScheme(Primary.Indigo500, Primary.Indigo700, Primary.Indigo100, Accent.Pink200, TextShade.WHITE);
                break;
            case 2:
                materialSkinManager.ColorScheme = new ColorScheme(Primary.Green600, Primary.Green700, Primary.Green200, Accent.Red100, TextShade.WHITE);
                break;
        }
    }
}

Thanks a lot,
But I deleted the code from my mainform and the partial class from the designer but I still have a residual bug :

When I click outside of the window a bar appear at the top but the form is made with no borders...
I'm using vb.NET

I was a bit disappointed to see that the tab control had to be implemented using two different controls. It'd be great if you can somehow make them one unified control. And one more suggestion would be to make the skin manager a global like devexpress does. For DevExpress skins you just have to wire up the theme once in Program.cs and then you're done. All forms will automatically use those themes.

The default TabControl is hard to theme. It was impossible to do the skinning needed for MaterialDesign in it. I've made a second control so I was totally free in the size and placement of the Tab Selectors. I see the struggle, 2 controls kinda suck. However it might be possible to embed the TabControl in the TabSelector? It's worth experimenting with it, because it would be way nicer.
MaterialSkin's theme manager currently is a Singleton, however you still have to add the forms manually. I don't know how DevExpress's manager works internally. But it would be nicer to have that done automatically.

Why don't you just download the DevExpress WinForms trial. They also include the source code. I think that'll help you. I have used DevExpress in the past and can say that they can write good controls. For how they achieved theming their XtraTabControl check their source.

how to make tab view in vb net.? I didn't find BaseTabControl in materialTabSelector properties. Iam using vb net

The sources of DevExpress are not perfect either, they have a finite number of resources and a certain technical debt to pay back to some extent..
Just have a look at the sources of the some controls, like the GridControl or event their XPO DAL you can see that a lot of not that good legacy code has not been refactored for ages.
I'm using the DevExpress Winforms subscription on a daily-basis, but I already had to hack it a bit here and there to make it suitable to my needs.
It's a good library it saves me tons of effort but for god sake don't think that just because it's kind of famous and maintained by more people the quality of the source code is much better... cause it's not that good, it's not the worst code I have ever seen either.
Just think twice before getting inspired by some big libraries like that DevExpress, Telerik and others they all have to make money, they also have their deadlines, limited resources and all the limitations  that you usually experienced when you are working for a company.

@clementpoiret @IgnaceMaes Hi, just a quick question how can I make tab controls side aligned and vertical? Do you have any tutorials to follow? Thanks.


breaking bug: formatting HTML corrupts source, moves content around

I'm using Atom 1.19.0 ia32 with atom-beautify 0.30.4 on Windows 10 Pro 64-bit. I'm using the following .jsbeautifyrc:
{
	"indent_with_tabs": true,
	"preserve_newlines": true,
	"max_preserve_newlines": 2,
	"end_with_newline": true,
	"wrap_line_length": 0
}

I have the following content. (Copyright © 2016–2017 GlobalMentor, Inc. Excerpted for bug investigation.)
<!DOCTYPE html>

    <meta charset="UTF-8" />
    <title>Time</title>
    <meta name="author" content="Garret Wilson" />

    This document is an excerpt from the GlobalMentor Complete Course on Software Development. Copyright © 2016–2017 GlobalMentor, Inc. All Rights Reserved. For more information, contact <a<EMAIL_ADDRESS>Inc..

ISO 8601

The standard that governs time representation around the world is ISO 8601: Data elements and interchange formats — Information interchange — Representation of dates and times. This document is put out by the <dfn>International Organization for Standardization</dfn> (ISO), and prescribes various format for representing dates and times. One of the most most common is the representation for a date and time of day, with an included offset from UTC, such as 1985-04-12T10:15:30+04:00.

Beyond the specific syntax, however, ISO 8601 is based on a certain conception of dates and times. Dates are based on the Gregorian calendar, and rules are introduced for representing dates before the institution of the Gregorian calendar in 1875. Week numbers and day ordinals are fixed, and definitions are put into place regarding time scales and leap years. Thus many time library implementations rely not only on ISO 8601 for how time should be represented as text, but also for its basic model of time representation.

Representing Time

The latest versions of Java provide built-in libraries for tracking time, located in the java.time package. Lower-level time processing classes may be found in the java.time.temporal subpackage including the java.time.temporal.Temporal interface that underlies most of the Java time-related types, and an even lower-level interface java.time.temporal.TemporalAccessor which allows access to individual fields of time classes. The time classes represent value objects, which you have studied. You can therefore expect the time classes to be immutable to be comparable with equals(…), and to include static factory methods typically named of(…).

    The Java time classes include extensive support for extracting time units, converting between types, and moving forwards and backwards on the timeline. The API explained here presents but the most basic methods. When solving a time-related problem you must consult the full java.time API to get a complete idea of the functionality available.
    Most of the Java time classes, both for human time representation and for computer time, include static factory method now() which returns an instance of that class based upon the current system time in the current time zone.

Local and Zoned Time

Representing a general date date or time, not tied to any time zone, is accomplished using the java.time.LocalDate and java.time.LocalTime classes. These types correspond to the date marked on a calendar or the time displayed on a clock, respectively. These classes represent immutable value types, so it is no surprise that they provide many static factory methods including LocalDate.of(int year, int month, int dayOfMonth) and LocalTime.of(int hour, int minute, int second). The local date and time classes provide a variety of static factory methods, including some that use the java.time.Month enum.

java.time.LocalDate

A general year, month, and day not fixed to any time zone.

java.time.MonthDay

A month and a day not fixed to any time zone or even associated with a particular year.

java.time.Month

A single month of the year.

java.time.Year

A year without regard to any time zone.

java.time.LocalTime

A general time not associated with any particular date nor fixed to any time zone.

java.time.LocalDateTime

A combined date and time not fixed to any time zone.

Examples of local time classes.

//someone's date of birth: May 30, 1970
final LocalDate dateOfBirth = LocalDate.of(1980, Month.MAY, 30);
//someone's birthday: May 30
final MonthDay birthday = MonthDay.of(Month.MAY, 30);

//a typical end of a workday: 5:00 p.m.
final LocalTime endOfWorkday = LocalTime.of(17, 0);

//current date and time
final LocalDateTime = LocalDateTime.now();

    A LocalDate is used for a date of birth and a birthday, because someone will commemorate  their birthday on the same date regardless of where they are in the world. A person born in New York, for instance, will recognize the local of their birthday while traveling in France without regard to the technicalities of the literal date in New York when the date arrives in France.

Local dates and times are relative or <q>floating</q>; they do not provide sufficient information to determine precisely when an event occurred or will occur. Recording the date and time of a birth, for instance, must include the time zone. A journal entry as well would normally indicate the time zone in order to fix the exact moment in an absolute way worldwide: <q>December 11, 2016 10:53 a.m. America/Los Angeles</q>.

The zoned time classes keep track of a time zone in addition to their other time components, and thus are able to represent absolute times in history. To represent the time zone itself Java provides the class java.time.ZoneId. You can create a ZoneId using its static factory method ZoneId.of(String zoneId) with the identifier from the IANA Time Zone Database, such as ZoneId.of("Europe/Paris"). The current time zone of the system can be found using ZoneId.systemDefault().

The main zoned time class is java.time.ZonedDateTime, which is essentially a LocalDateTime combined with a ZoneId. It can be created using all its components using the static factory method ZonedDateTime.of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond, ZoneId zone). There exist various other static factory methods, including one from an existing LocalDate, and LocalTime, with the addition of a time zone using ZonedDateTime.of(LocalDate date, LocalTime time, ZoneId zone).

java.time.ZoneId

Identifies a time zone from the IANA Time Zone Database.

java.time.ZonedDateTime

Represents an absolute date and time in a particular time zone.

    Copyright © 2016–2017 GlobalMentor, Inc. All Rights Reserved. Content may not be published or reproduced by any means for any purpose without permission. Version 2017-08-09.

This is what atom-beautify produces after formatting:
<!DOCTYPE html>

	<meta charset="UTF-8" />
	<title>Time</title>
	<meta name="author" content="Garret Wilson" />

	This document is an excerpt from the GlobalMentor Complete Course on Software Development. Copyright © 2016–2017 GlobalMentor, Inc. All Rights Reserved. For more information, contact <a<EMAIL_ADDRESS>Inc..

ISO 8601

The standard that governs time representation around the world is ISO 8601: Data elements and interchange formats — Information interchange — Representation of dates and times. This document is put out by the <dfn>International Organization for Standardization</dfn> (ISO), and prescribes various format for representing dates and times. One of the most most common is the representation for a date and time of day, with an included offset from UTC, such as 1985-04-12T10:15:30+04:00.

Beyond the specific syntax, however, ISO 8601 is based on a certain conception of dates and times. Dates are based on the Gregorian calendar, and rules are introduced for representing dates before the institution of the Gregorian calendar in 1875. Week numbers and day ordinals are fixed, and definitions are put into place regarding time scales and leap years. Thus many time library implementations rely not only on ISO 8601 for how time should be represented as text, but also for its basic model of time representation.

Representing Time

The latest versions of Java provide built-in libraries for tracking time, located in the java.time package. Lower-level time processing classes may be found in the java.time.temporal subpackage including the java.time.temporal.Temporal interface that underlies most of the Java time-related types, and an even lower-level interface java.time.temporal.TemporalAccessor which allows access to individual fields of time classes. The time classes represent value objects, which you have studied. You can therefore expect the time classes to be immutable to be comparable with equals(…), and to include static factory methods typically named of(…).

	The Java time classes include extensive support for extracting time units, converting between types, and moving forwards and backwards on the timeline. The API explained here presents but the most basic methods. When solving a time-related problem you must consult the full java.time API to get a complete idea of the functionality available.
	Most of the Java time classes, both for human time representation and for computer time, include static factory method now() which returns an instance of that class based upon the current system time in the current time zone.

Local and Zoned Time

Representing a general date date or time, not tied to any time zone, is accomplished using the java.time.LocalDate and java.time.LocalTime classes. These types correspond to the date marked on a calendar or the time displayed on a clock, respectively. These classes represent immutable value types, so it is no surprise that they provide many static factory methods including LocalDate.of(int year, int month, int dayOfMonth) and LocalTime.of(int hour, int minute, int second). The local date and time classes provide a variety of static factory methods, including some that use the java.time.Month enum.

java.time.LocalDate

A general year, month, and day not fixed to any time zone.

java.time.MonthDay

A month and a day not fixed to any time zone or even associated with a particular year.

java.time.Month

A single month of the year.

java.time.Year

A year without regard to any time zone.

java.time.LocalTime

A general time not associated with any particular date nor fixed to any time zone.

java.time.LocalDateTime

A combined date and time not fixed to any time zone.

Examples of local time classes.

//someone's date of birth: May 30, 1970

Local dates and times are relative or <q>floating</q>; they do not provide sufficient information to determine precisely when an event occurred or will occur. Recording the date and time of a birth, for instance, must include the time zone. A journal entry as well would normally indicate the time zone in order to fix the exact moment in an absolute way worldwide: <q>December 11, 2016 10:53 a.m. America/Los Angeles</q>.

The zoned time classes keep track of a time zone in addition to their other time components, and thus are able to represent absolute times in history. To represent the time zone itself Java provides the class java.time.ZoneId. You can create a ZoneId using its static factory method ZoneId.of(String zoneId) with the identifier from the IANA Time Zone Database, such as ZoneId.of("Europe/Paris"). The current time zone of the system can be found using ZoneId.systemDefault().

The main zoned time class is java.time.ZonedDateTime, which is essentially a LocalDateTime combined with a ZoneId. It can be created using all its components using the static factory method ZonedDateTime.of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond, ZoneId zone). There exist various other static factory methods, including one from an existing LocalDate, and LocalTime, with the addition of a time zone using ZonedDateTime.of(LocalDate date, LocalTime time, ZoneId zone).

	A LocalDate is used for a date of birth and a birthday, because someone will commemorate  their birthday on the same date regardless of where they are in the world. A person born in New York, for instance, will recognize the local of their birthday while traveling in France without regard to the technicalities of the literal date in New York when the date arrives in France.

Local dates and times are relative or <q>floating</q>; they do not provide sufficient information to determine precisely when an event occurred or will occur. Recording the date and time of a birth, for instance, must include the time zone. A journal entry as well would normally indicate the time zone in order to fix the exact moment in an absolute way worldwide: <q>December 11, 2016 10:53 a.m. America/Los Angeles</q>.

The zoned time classes keep track of a time zone in addition to their other time components, and thus are able to represent absolute times in history. To represent the time zone itself Java provides the class java.time.ZoneId. You can create a ZoneId using its static factory method ZoneId.of(String zoneId) with the identifier from the IANA Time Zone Database, such as ZoneId.of("Europe/Paris"). The current time zone of the system can be found using ZoneId.systemDefault().

The main zoned time class is java.time.ZonedDateTime, which is essentially a LocalDateTime combined with a ZoneId. It can be created using all its components using the static factory method ZonedDateTime.of(int year, int month, int dayOfMonth, int hour, int minute, int second, int nanoOfSecond, ZoneId zone). There exist various other static factory methods, including one from an existing LocalDate, and LocalTime, with the addition of a time zone using ZonedDateTime.of(LocalDate date, LocalTime time, ZoneId zone).

java.time.ZoneId

Identifies a time zone from the IANA Time Zone Database.

java.time.ZonedDateTime

Represents an absolute date and time in a particular time zone.

	Copyright © 2016–2017 GlobalMentor, Inc. All Rights Reserved. Content may not be published or reproduced by any means for any purpose without permission. Version 2017-08-09.

Notice the lines after
Examples of local time classes.
. Specifically, after //someone's date of birth: May 30, 1970, some content has been dropped. In fact depending on the actual surrounding content (e.g. in the original document), sometimes content seems to be moved around arbitrarily!
This bug has already been reported at https://github.com/beautify-web/js-beautify/issues/1225 , but note that this is not reproducible on the js-beautify site, so @bitwiseman indicated it probably was not a js-beautify problem.

OK, this is getting more complicated and worse. To understand the situation, let me remind you of the history:

The BlueGriffon HTML editor has a huge bug from deep in the Mozilla code, which adds newlines when it shouldn't --- but to make matters worse, it adds an LF in the middle of a file using CRLF on a Windows machine, producing mixed line endings. I have put my money out as a bounty to get this fixed, but there have been no takers.
I use atom-beautify to attempt to reformat the file: to normalize the line endings, and get rid of the extra newlines. This only halfway works; many of the erroneous newlines remain because of a js-beautify bug. I have also paid my money on a bounty to get this fixed, but no one seems interested.

The file in question is of mixed line endings because of this. Normally Atom will show the LF and CRLF line endings as distinct (and at least js-beautify will normalize them). But in the file at issue here, Atom 1.19.0 is not showing the line endings as different, and the line ending indicator at the bottom shows CRLF even though the line endings are mixed.
If I use another editor such as EmEditor to change all the line endings to CRLF or LF (it doesn't matter which, as long as they are all the same), this bug no longer appears!! That is, atom-beautify formats the file with no problem.
So are we now dealing with a new Atom line-ending bug, on top of the BlueGriffon and js-beautify bugs?? (When will it end?!!) The failure of Atom to distinguish the line endings could be an indication of a problem. Or is the display in the editor a red herring, and is atom-beautify (or js-beautify) skipping line endings incorrectly, assuming they are all the same?

I'm attaching the exact file that causes the problem. Now that we know it potentially has something to do with line endings, copying and pasting from the inline example above won't help anything.
js-beautify-1225.zip

This time it was a bug deep inside Atom: https://github.com/atom/atom/issues/15225 . Apparently they rewrote the low-level buffer handling and didn't pay attention to the line endings, or something to that affect. They claim to have a fix on the way. I'm going to close this atom-beautify issue.


[fix] add cid

thanks @rknightuk

Sorry it took so long, it's been a busy few months. Thanks for contributing.


Add Dynamic Icons Component

Fixes #1359
Additional description

CONTRIBUTOR checklist (do not remove)
Please complete for every pull request

[x] First-time contributors should sign the Contributor License Agreement.  If you haven't before, wait a few minutes and a bot will comment on this pull request with instructions.
[x] npm run lint:fix has been run and linting passes.
[x] Mocha, Jest (Storyshots), and components/component-docs.json CI tests pass (npm test).
[ ] Tests have been added for new props to prevent regressions in the future. See readme.
[x] Review the appropriate Storybook stories. Open http://localhost:9001/.
[x] The Accessibility panel of each Storybook story has 0 violations (aXe). Open http://localhost:9001/.
[ ] Review tests are passing in the browser. Open http://localhost:8001/.
[ ] Review markup conforms to SLDS by looking at DOM snapshot strings.

REVIEWER checklist (do not remove)

[ ] TravisCI tests pass. This includes linting, Mocha, Jest, Storyshots, and components/component-docs.json tests.
[ ] Tests have been added for new props to prevent regressions in the future. See readme.
[ ] Review the appropriate Storybook stories. Open http://localhost:9001/.
[ ] The Accessibility panel of each Storybook story has 0 violations (aXe). Open http://localhost:9001/.
[ ] Review tests are passing in the browser. Open http://localhost:8001/.
[ ] Review markup conforms to SLDS by looking at DOM snapshot strings.

Required only if there are markup / UX changes

[ ] Add year-first date and commit SHA to last-slds-markup-review in package.json and push.
[ ] Request a review of the deployed Heroku app by the Salesforce UX Accessibility Team.
[ ] Add year-first review date, and commit SHA, last-accessibility-review, to package.json and push.
[ ] While the contributor's branch is checked out, run npm run local-update within locally cloned site repo to confirm the site will function correctly at the next release.

@kevinparkerson Please see feedback at https://github.com/salesforce/design-system-react/issues/1359#issuecomment-469993752

@tanhengyeow your contribution here is much appreciated! It solves the issue, just a few housekeeping changes I'm adding before we merge it. Thanks again for your work!


return-undefined false positive with catch

Bug Report

TSLint version: 5.8.0
TypeScript version: 2.6.1
Running TSLint via: CLI

TypeScript code being linted
async function asyncWorker() {
  const state = Math.random()
  if (state > 0.8) { return "data" }
  if (state > 0.5) { throw new Error('not found') }
  throw new Error('unknown error')
}

function find() {
  return asyncWorker()
    .catch(err => {
      if (err.message === 'not found') {
        return undefined
      }
      throw err
    })
}

with tslint.json configuration:
{
  "rules": {
    "return-undefined": { "severity": "error" }
  }
}

Actual behavior
`void` function should use `return;`, not `return undefined;`. (return-undefined)
  10 |     .catch(err => {
  11 |       if (err.message === 'not found') {
> 12 |         return undefined
     |        ^
  13 |       }
  14 |       throw err
  15 |     })

Expected behavior
No error

This is expected behavior. Because the function passed to .catch() does not have a contextual type, its return type is inferred from the return statements in the body. Since there is only one return undefined the function has a return type of undefined. The rule correctly complains about return undefined where the return type is undefined or void.

Thank you for the explanation. I suppose for such edge use case, suppressing it with
// tslint:disable-next-line:return-undefined is the way to go.


Changelog v0.6

Please double-check, in case I forgot a new feature or an important bug fix..

@t20100 @vallsv
I find --use-opengl-plot do cumbersome to type that looks like discouraging the user to type it. Options like --gl or --opengl are much more intuitive to type.

OK we go like that


Soft assertions - Assertions that do not cause the whole scenario to stop

I recently had a problem where my tests could not find a bug that would have been checked for in the last
step of my test scenario but the whole scenario stopped executing because of the step before that one. The bug that caused the scenario to stop already had a ticket and took a bit longer for the fix to reach the test stage.
My question would be if there is a clean way to have steps that are kind of optional and are not really necessary for the next step to continue without it changing the test context. (i.e assertions for text on the website)
I could create more scenarios that only check for one specific functionality but it will make the files
quite cluttered and harder to manage in the future.

I would say to add a catch block after the task you know it's buggy, so you can continue with them even if there is a bug.
Something like this:
  performAs(actor: PerformsTasks): PromiseLike<void> {
    return actor.attemptsTo(
      // bug is among the actions here
    ).catch(() => Promise.resolve());
  }

Serenity will continue and you will see in the report that the step failed

Hi there, I think this functionality would require a bit more in-depth conversation.
I suppose we could have some sort of a soft-assert mechanism, but am not really sure:

in what scenarios it would apply?
how should the failure be reported? Should the step be marked as failing but the scenario as passing? should the step be marked as passing even when the assertion has failed? 🤔
what about the screenshots? should those be generated upon the "soft-assertion" failing?
and so on...

It's been a while since I created this issue.
I had and still have some tests where I check for multiple error / info messages that need to appear on the site because they are really important for the users. As it takes a lot of steps to get to that point I had them all in one scenario as I only wanted one scenario that checks for all plausibilities in regards to error / info messages.
It was not necessary for the assertions to fail the entire scenario as they do not influence the state of the next assertion in my case.
I could have just put them in multiple scenarios but I found that to clutter all the tests as I had to be really specific about naming them and it was not always clear what I really wanted to check just from the title.
The scenario should still fail but mark each failed step / assertion in the report and not just the first.
As for the screenshots it should still create one because it still is an error just not that important for the full scenario execution. We could probably make it optionally with a new option for the photographer -> takesPhotosWhen(...).
Not sure if my explanation makes any sense.

Thanks @Ijee, I think I understand what you're after.
So basically what you'd need is a variant of Ensure.that that can perform multiple assertions and only fail when at least one of them has failed. Is that right?

Well, that would help but as I have to click some elements or fill in some inputs on the page in-between those assertions I could not simply put it all in an Ensure.that even if I wanted to. These in-between steps are necessary for the state of the page so the errors / info show up.

Well, that would help but as I have to click some elements or fill in some inputs on the page in-between those assertions I could not simply put it all in an Ensure.that even if I wanted to.

@Ijee - the problem of storing state can be solved with a Notepad. The concept of a notepad already exists in Serenity/JS v2 and is further improved in v3 (currently available as 3.0.0-rc)
I'm planning to look into implementing soft assertions soon, so if you could provide some examples of how you'd like to use them it would be of great help in guiding the design.

I sadly don't work with serenity-js at the moment anymore because I changed jobs and I am currently a bit
short on time. I'll see if I can clarify what I meant soonish (next week I guess).

@jan-molak is this still valid for v3? I think it can be very useful. I'll provide an example to see if makes sense. Thanks!

When an assert statement is executed, it compares the actual outcome of a test with the expected outcome.
Hard Assert:
If the two outcomes match, the ensure statement passes and the scenario continues. But, if the actual outcome does not match the expected outcome, the ensure statement fails and the test is halted. The remaining ensures are skipped and the scenario is marked as failed.
Soft Assert:
The scenario execution does not stop if any ensure does not meet its condition. The remaining activities are executed. Also, if any ensure fails the scenario is marked as failed.
In my opinion: hard assert should be used in scenarios where it is required to halt the test execution if a critical ensure results in a failure. For example, the total price displayed on the cart page from an e-commerce site. Or if the following actions depend on a previous one. For example, ensure that a product has been added to the cart before doing the checkout. And the soft assert should be used in scenarios where the failure of certain conditions does not hamper the execution of other ensures in the task (steps) or the scenario itself. For example, check that different information on a form is properly displayed: error messages on different fields, labels, buttons, etc...
Proposal for using soft assertions on Serenity-js
Execute all the flow.
actor.attemptsTo(
      Ensure.soft.that(Text.of(element1), equals('title')),
      Ensure.soft.that(Text.of(element2), equals('20/03/2023')),
      Click.on(subformDropdown),
      Ensure.soft.that(subformElement1), isVisible()),
    );

Also, we should be able to group several soft assertions into one single hard assertion to stop the flow execution in case of any failure of those soft ensures.
actor.attemptsTo(
      Ensure.soft.that(Text.of(element1), equals('title')),
      Ensure.soft.that(Text.of(element2), equals('20/03/2023')),
      Ensure.allSoft(),
      // line above triggers the ensures of the previous 2 lines
      Click.on(subformDropdown),
      Ensure.soft.that(subformElement1), isVisible()),
      Ensure.soft.that(subformElement2), isVisible()),
    );

Great points @damonpam and @viper3400!
It seems like there are several interesting challenges with soft assertions:

Grouping - Typically, soft assertions are grouped around some logical part of the system, like validation of a specific form or several aspects of an API response. In this case, individual assertions in the group are not optional - we want all of them to pass. However, they're not atomic; we want to perform all the assertions to get a broader picture of the failure, and then fail the step if any of the individual assertions have failed. E.g. did the form validation fail on one form field or more? Which fields have failed exactly? Did the API response contain both the username and their ID?
Evaluation timing - Some test automation libraries, like AssertJ, would use soft assertions to queue checks to be performed when the scenario finishes, or when the verification is triggered by the developer - like softly.assertAll(); from AssertJ, or Ensure.allSoft() from @damonpam's proposal. While this design is quite popular, I'm a bit worried that it might become rather confusing with nested Screenplay tasks. Also, we could achieve such delayed evaluation by combining notes and Ensure - so make the actor remember the form validation results when going through the form, and then perform an assertion later on.
Retryability and time outs - As per @viper3400's point, I'm not sure how retrying failed soft assertions should work. Should individual soft assertions be retryable? What about the timeouts? Should we count them per soft assertion, or per group of soft assertions? What if not all soft assertions in the group are "timeoutable" because we know that the evaluated answer won't change no matter how many times we try?

The API design is also a very interesting problem. I think it makes sense to perform a group of soft assertions together in a single task, but designing an API here that feels consistent with the rest of Serenity/JS is not trivial.

OK, enough of those problems, let's talk about solutions :)
Let's consider an example where we have a blog article that should display an edit menu with several icons: edit, delete, publish, etc.
However, depending on the persona interacting with the system, we get different icons.
For example, when an "article author" views a blog article, they should be able to edit it. However, when a "publisher" views the article, they should be able to delete it or publish it.
While we should probably have different assertions for those two scenarios, let's assume that instead, we want a "soft assertion" that works in both cases and simply checks that at least some of the icons of interest are displayed.
In pseudo-code, we'd get a logical flow like this:
actor attempts to
  ensure that either:
    edit is displayed
    delete is displayed
    publish is displayed

This could lead to an API like this one:
actor.attemptsTo(
  Ensure.that(editIcon(), isDisplayed())
    .or(deleteIcon(), isDisplayed())
    .or(publishIcon(), isDisplayed())
)

While this first draft looks quite appealing, what we're after in this example scenario is not a chain of or statements; we want to ensure that either one or the other group of conditions is met:
actor attempts to
  ensure that either:
    edit is displayed
    OR
      delete is displayed
      AND
      publish is displayed

Catering for this scenario now becomes much harder as we'd need an API-equivalent of parentheses:
actor.attemptsTo(
  Ensure.that(editIcon(), isDisplayed())
    .orGroup( // ???
      // ???
    )
)

This doesn't look great. Not to mention that we haven't even touched upon timeouts and retries 🙄

So I'm wondering if we should change how we look at soft assertions altogether.
Perhaps what we're after is a way to express that actor should perform several activities (such as assertions) and consider it a success either when some or all of them pass:
actor attempts to:
  perform some:
    ensure that edit is displayed
    perform all:
      ensure that delete is displayed
      ensure that publish is displayed

This way we wouldn't have to modify how Ensure and Wait work, but we'd create a wrapper around them:
actor.attemptsTo(
  Perform.some(                                   // succeed if at least one activity doesn't throw
    Ensure.that(editIcon(), isDisplayed()),
    Perform.all(                                  // succeed if none of the activities throw
        Ensure.that(deleteIcon(), isDisplayed()),
        Ensure.that(publishIcon(), isDisplayed()),
    )
  )
)

In the last listing, Perform.some is a hypothetical tasks that makes the actor perform each sub-task and emit a success if at least one of them succeeds; Perform.all would make the actor emit success only if all the subtasks passed.
Could this work as a Screenplay flavour of soft assertions? 🤔


Add a "Usage" section to the README

Hi, could we add a "Usage" section to the README with just a short example of serializing and deserializing a basic python object? This will make it faster to get started with this library instead of having to jump over to the docs for python pickle to understand the correct way to call this library's methods

How do we know people will read this section if they didn't already read the intro section that links to the jsonpickle documentation?
That documentation already has a usage example and we shouldn't duplicate all of that stuff in the readme.
I'm not 100% sure that this will solve any perceived issues.
I would actually go in the other direction -- I would recommend slimming the README down and making it link to the documentation instead so that there's less duplication of effort and reading material.

This will make it faster to get started with this library instead of having to jump over to the docs for python pickle

We link to jsonpickle's documentation from the README. You don't need to read the python pickle documentation.
I'm not convinced that lazy readers is a problem that can be solved by... adding more reading material.
I'd be happy review a PR that updates the README with a Usage section that links to https://jsonpickle.github.io/#jsonpickle-usage though.

Actually, I think Takanuva has a point, @davvid, but not for the reason they specified. When I google "jsonpickle" or " "jsonpickle docs", the first result I get is our outdated documentation from version 1.4.3. The GitHub page isn't even the in the first 3 results for either search (for me). Until that page is shut down, I think it may be useful to combine a short usage example on the GitHub with a slimmed-down README, so that anyone who happens to land on the GitHub after seeing the outdated docs notices that the library has changed significantly and how to get started.

Also, I will say that when I'm under time pressure, I do often check the GitHub README instead of the documentation page, especially when I'm looking among alternatives for a library that fulfills a purpose. I can gather examples of the many python libraries that include a short Usage section, with ~2-5 lines of basic code in their GitHub READMEs, because there's a good reason it's not uncommon for libraries to include such a section.

lazy readers
As much as I would hope that users would read all the documentation, I don't think that thinking about people who don't read everything as lazy is a practical mindset. There are many people out there who may be under time pressure because of a demanding job, demanding school studies, or other reasons, and judging them for needing a quick solution instead of spending hours reading the documentation for every library can sometimes be counterproductive. I think that saving users time is something that motivates a large portion of best practices in the UI/UX field, and I don't think any project, let alone one with 300k+ daily downloads on PyPi, is an exception.

True that, sorry for the (knee-)jerk initial reaction. That reminded me that I should update jsonpickle.github.io so I did that just now.
I'll add a garden file for handling that shortly so I don't have to remember the manual steps I ran.

@takanuva15 is #516 more in line with what you were envisioning? Or did you have something else in mind?

Oh ok, I think I see now. I'll add that to the PR, thanks so much for the suggestion and providing an example!

Ok, I think #516 addressed this issue. I'll close this as completed for now, but feel free to re-open it if you think there's more to do to help new users!


POL-239 - Google Compute Engine (GCE) Plugin all changes

Google Compute Engine (GCE) Plugin all changes
Description
Updated the Google Compute Engine Plugin to work with the Resource Browser/Plugin Registration
Issues Resolved
Updated required changes.
Contribution Check List

[ ] All tests pass.
[ ] New functionality includes testing.
[ ] New functionality has been documented in the README if applicable
[x] New functionality has been documented in CHANGELOG.MD

@gopinathmahakud1   changes look good.  thank you

          1 Error

:no_entry_sign:
google/gce/changelog.md:3: MD002 First header should be a top level header
google/gce/changelog.md:8: MD022 Headers should be surrounded by blank lines
google/gce/changelog.md:10: MD032 Lists should be surrounded by blank lines
A detailed description of the rules is available at https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md

          1 Warning

:warning:
Should this include readme changes

  Generated by :no_entry_sign: Danger

Closing this as OpenAPI Plugins are now preferred.


[ResourceObject] getNTriples is rather slow

In my system it takes 6664 ms to return the results. Is this an expected behaviour?

So far the getNTriples was just a way to show the underlying triples (mostly debug purpose). Can you explain your use-case? Maybe there is another way or we can tune the getNtriples

Well, I am using the N-triples serialization to transform it to JSON-LD. I guess the ResourceObject class or at least Annotation, should have its own method to be serialized as either JSON-LD or N-triples

Hey @papadako ,
we are also interested in a way to put out our annotations in different serialisation formats, but couldn't find the time yet to implement it.
The Sesame Rio API (which we also use to parse the annotations) does also support possibilities to produce that output.  I hope to be able to look into that next week, maybe I can support a solution for you then.

Thank you berndl that would be nice.
I guess I should probably try and implement it by my own but I am not yet used to the anno4j code base and the whole building process needs.

Hello @papadako ,
I implemented the output for ResourceObjects with the "getTriples" method, that should allow to print every object that is used in our Anno4j context.
You have to support a RDFFormat (just as we did with the ObjectParser) in order to generate your desired serialisation.
Tests for the method are rather shallow yet, but at first sight, it worked quite well. I will support further testing soon though.

Hi @berndl
getTriples still seem a bit slow. Now it takes 3663ms. Could this be related to the initialization of the SAIL and object repositories?

V2 has fixed this.
Thank you.


How to change default browser into Opera?

When I run ./atat add-alerts --loglevel 5 ; it opens tradingview.com page in Chromium.
Is it possible to open it under different browser such as Opera?
I am using trialer version for tradingview and when I login into my account from different browser tradingview disables my trialer usage.
Please note that I have already set system's default browser into Opera, I am not sure why its keep opening in Chromium.

Sign-out from Opera browser and re-logging into Chromium solved my problem like mentioned in the README.md.


(3.0) View is called static on some files.

I noticed by doing a big cleanup and bugfix that on some files the View class functions are called staticly.
@LuckyCyborg can you please look into this if you have any time? I wasn't 100% sure what to do there.

@tomvlk You are kind to explain more detailed?

@LuckyCyborg some lines in the actual 3.0-beta:
In the \Nova\Core\Controller:
View::addHeader('Content-Type: application/json');

and
View::addHeader('Content-Type: text/html; charset=UTF-8');

Btw, please test your eventmanager, view and stuff on this pull: https://github.com/simple-mvc-framework/framework/pull/285

Yep, it is OK, for now, using this support from View.
In future, maybe we enhance \Nova\Net\Response and we move the headers there.
And please revert all changes on Routing and Controllers!

@LuckyCyborg is it in the pull? And in the reformat commit? Or changed earlier? Because I think the reformat isn't carefully done... I will correct tomorrow.

@tomvlk Look, I work now right on Controllers, integration with EventManager, and Routing. Do not enter there, because our changes will overload. OK?

@tomvlk Also, I work in Templates, as the Hooks being nuked. All its job is done right now by EventManager.

@LuckyCyborg I will revert the reformat commit.

@tomvlk BTW, how about to move TableBuilder in \Nova\Database namespace?

@tomvlk If you want to see how EventManager works, look in my branch, in \App\Core\BaseController
And revert, please:
https://github.com/tomvlk/php-framework/commit/2bdd5bcec00669663fb0becf38f16f888024a281
I have the habit to look at uses to see what use the Class

Could you check out https://github.com/tomvlk/php-framework/tree/3.0-cleanup-code-styles again. Is it still conflicting? I revert the reformat commit in a new commit.
The only stuff that should be changed is phpdoc, returning statements and some other bugs!

@LuckyCyborg Done

@tomvlk OK. Again, us to work together, we need to work in different components. OR we hit the heads in code. :smile:

@tomvlk Even there you touched the Routing
https://github.com/tomvlk/php-framework/commit/2e26e4ef914bc1725b907c61b991eb7230f4cbdf

@tomvlk BTW, you want to do something very useful? How strong you are on REGEX?

@tomvlk And another thing, to understand what is my work:
There is an internal repository, where is a framework arrived around 20 times bigger than what we write, from were I try to catch the essentials elements, to port there, leaving open the window to extend the App to original level.
Because those are the orders, to enhance SVMC and use as Base Framework. That's why some time appear code sequences who looks strange for moment.

@LuckyCyborg, what we need to do with RegEx?

@LuckyCyborg tomvlk@2e26e4e has some good improvements in it. My RegEx is not pro pro but I heard @volter9 is good in it?!? :laughing:
Anyway, merging this wouldn't a big problem!

@tomvlk haha, dark sarcasm in the classroom :)
I'm just asking if I could help with RegEx.

@LuckyCyborg Btw, I got something better than the Form helper. (https://github.com/ValkSystems/bootbuilder)
@volter9 :laughing:

@volter9 There is a little Language Files Updater script, living in /scripts/makelangs.php, who do, in few words:
Look in all PHP files for translation functions, then __() and __d(), then extract the variables.
In first one, it extract first string and update the App Language files, in second case, capture both first and second parameter string. Then update the files from Language Domains, ie System, Modules, Templates.
The thing works, but there is a small problem: do not find right the counterpart ')', the result is visible there:
'The :field field may only contain alpha characters (a-z' => '',

See something strange? It eated the last part of string: ').'
Will be very nice to be enhanced this little script to find the right ().

@tomvlk How about to have AdminLTE by default, for Admin/Backend part? :smirk:

@LuckyCyborg I believe it would be something like that: http://rubular.com/r/gubQemZXUG
Right now I'm writing from mobile, so I can't really test it out in action, but RegEx is working. You can tweak it to get the best result. :)

@volter9 Cool! And for language domains ? It is _d('domain', 'translated string', param, param, ...)

Depends on what you want to parse those parameters as. Gimme some input -> value so I had the idea of how does RegEx will going to look like.

@volter9 For example:
__d('system', 'anc )', $test1, $test2);
__("foo ) 123", $test1, $test2);

First case, serve to capture in preg_match both domain and second string
In the second case, should capture only first string

@volter9 The real offender line:
'validate_alpha'               => __d('system', 'The :field field may only contain alpha characters (a-z).'),

@volter9 The NOW regex-es:
if($workPath == 'app') {
        $pattern = '#__\((\'|")(.*)\1(?:,.*){0,1}\)#smU';
    }
    else {
        $pattern = '#__d\((.+?),(.+?)\)#s';
    }

So you basically need to parse only those first two values?

@volter9 the pattern for __d need to capture the first two strings, being separated with ',', while the pattern for __() should capture the first string. Both function have optional parameters starting with, guess what? '$'

Try this with domain strings: http://rubular.com/r/u4CpfThbnY

I can't really think straight, I'll try more tomorrow.

@volter9 Thanks! And we will leave to tomorrow!
BTW, the domain one works almost perfect, with no parameters, but if you add one, do not match nothing.

Another try: http://rubular.com/r/M1zCEPGMY0
This one captures with additional parameters, but there's one problem, it can't have $ sign inside of the string.

@volter9 Nice! Thanks! I will look!
BTW, I arrive to those patterns right now:
__\(\'(.*)\'(?:,.*)?\)

__d\(\'(?:.*)?\',.?\s?\'(.*)\'(?:,.*)?\)

First one is for __() and both support $ in string. Also, I tested there for real PHP PCRE style.
http://www.phpliveregex.com/
Sure, there is room for enhancing, to make our little script tool smart. :smirk:

@volter9 Also, I know you being an "oldie" in SMVC. About what exactly is/was used the Hooks system in SVMC?
That Hooks system create problems in now SMVC3/Nova code, with our style of Controller/View and EventManager.
So, I suggest nuking the Hooks, and using the Events for doing its job. Eventually, we can write a particular Hooks system, "similar" with old one, but working in the new environment. Looks there how is possible to collect Views variables via Events system and Controllers.

@volter9 For example... there is an example, and the message text is received from another Controller, via Events Manager.
http://smvc3.giulianaeassociati.com/demos/events

@volter9 Looks there for my current development:
https://github.com/LuckyCyborg/simple-mvc-framework/tree/3.0-final-stage

I'm not that "oldie" :) I started watching this repo in September of 2014, I think. I never used hook system, though. Right now I'm not doing PHP much. I'm just watching this repository :)
By the way, you did a great job. 400 commits, wow!


Team middleware

Description
Add middleware to validate membership.
Add utility func to check if a member is a team lead.
Setup a role constants file so we don't have to remember ids for roles, and instead can use role names.
Update POST /api/teams/:id/prompts to use new middleware to prevent non-members and non-team leads from creating prompts.
Type of change
Please delete options that are not relevant.

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

Change Status

[x] Complete, tested, ready to review and merge
[ ] Complete, but not tested (may need new tests)
[ ] Incomplete/work-in-progress, PR is for discussion/feedback

How Has This Been Tested?

[x] Tested each edge case via Insomnia
[x] Original tests will be updated in a new PR

Checklist

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] My code has been reviewed by at least one peer
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] 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
[x] There are no merge conflicts

 [Issue]: Need a middleware to validate User on a Team

Ready for merge.

YEET


Quad encoder read with replacement not working on SW18

I'm using the SW18 to read some high quality encoders connected to an NodeMCU board. The code works fine when I use the regular sw.read() to read the position but not when I use read with replacement. When I use the read with replacement the returned value is always equal to the replacement value. This is true even if I write a value to the wombat and then do a read with replacement. In that case I get back the replacement value, rather than the value that I just wrote.
I also have some some W4 chips so I tried one of them to reduce the likelihood that I'm doing something wrong. The SW4 works exactly as expected. The only modifications to the attached code are the address at initialization and the pin selections. The code and its output are attached. There are 2 constants at the top to select the SW4 vs SW18, and to use regular read or read/replace. The outputs are in the PDF.
I have the pullups disabled and 0 set for the debounce time. I've checked the signals on a scope and they are pristine, without any debounce requirement (screen capture attached).
read_replace.zip

Thank you for the detailed description of the problem.  This bug report is exemplary.  The SW4B / SW18AB comparison is really useful, and definitely show's there's a problem.  I'll investigate this and fix it in the next release, probably sometime around Christmas.

Fixed in SW18AB_V208 .


Creating a new workspace on monitor if using m+1

Hi,
i would like to suggest the feature, that if using a relative workspace to monitor (m+1) argument in a workspace or movetoworkspace/movetoworkspacesilent dispatcher, a new workspace should be created instead of doing nothing in the case of the workspace dispatcher.
As an alternative monitor+next and monitor+previous as a new workspace choice may also be an option, although they imo do not differ that much from m+1 and m-1.
This could be beneficial to users in a multi-monitor setup, as they could just move back and forth between workspaces on a monitor instead of having to assign workspaces to outputs or remember the assigned workspaces.
TL;DR expected behaviour
If a monitor has only one workspace and hyperctl dispatch workspace m+1 is called, a new empty workspace should be created

Temporary solution

Create a workspace.py file
`#!/usr/bin/python
import subprocess
import time
import json

def current_focus_workspace():
workspace_list = (
subprocess.run("hyprctl -j monitors".split(), stdout=subprocess.PIPE)
.stdout.decode("utf-8")
.strip()
)
workspace_list = json.loads(workspace_list)
for workspace in workspace_list:
    if workspace["focused"] == True:
        return [workspace["name"], workspace["activeWorkspace"]["id"]]
return []

i = int(current_focus_workspace()[1]) + 1
j = current_focus_workspace()[0]
subprocess.run(f"hyprctl dispatch workspace {i}".split())
subprocess.run(f"hyprctl dispatch moveworkspacetomonitor {i} {j}".split())
`
2. Bind the key:

bind = $HLMOD, D, exec, python ~/.config/hypr/scripts/scripts/workspaces.py

Let me know if you want something more!

Would prefer if something like this was made into its own dispatch command, since m+1 is useful for cycling through workspaces on a monitor, and this suggestion would create an empty workspace, making it less streamlined.

To expand on the answer by @haininhhoang94:
If you save this python script as next-workspace.py in  .config/hypr/scripts:
#!/usr/bin/python
import subprocess
import json
import sys

def current_focus_workspace():
    monitor_list = (
        subprocess.run("hyprctl -j monitors".split(), stdout=subprocess.PIPE)
        .stdout.decode("utf-8")
        .strip()
    )

    monitor_list = json.loads(monitor_list)
    for monitor in monitor_list:
        if monitor["focused"] == True:
            return [monitor["name"], monitor["activeWorkspace"]["id"]]
    return []

currWorkspace = int(current_focus_workspace()[1])
currMonitor = current_focus_workspace()[0]

workspacesList = json.loads(subprocess.run(
    "hyprctl -j workspaces".split(), stdout=subprocess.PIPE)
    .stdout.decode("utf-8")
    .strip()
)

workSpacesOfMonitor = list(filter(
    lambda workspace: workspace["monitor"] == currMonitor, workspacesList))

workSpacesOfMonitor.sort(
    key=(lambda workspace: int(workspace["id"])), reverse=True)

highestWorkspaceOnMonitor = workSpacesOfMonitor[0]

if highestWorkspaceOnMonitor["id"] > currWorkspace:
    subprocess.run("hyprctl dispatch workspace m+1".split())
else:
    workspacesList.sort(
        key=(lambda workspace: workspace["id"]), reverse=True)
    highestWorkspaceID = workspacesList[0]["id"]

    if "--with-window" in sys.argv:
        subprocess.run(
            f"hyprctl dispatch movetoworkspace {highestWorkspaceID + 1}".split())
    else:
        subprocess.run(
            f"hyprctl dispatch workspace {highestWorkspaceID + 1}".split())
    subprocess.run(
        f"hyprctl dispatch moveworkspacetomonitor {highestWorkspaceID + 1} {currMonitor}".split())

And then add these four binds to your hyprland.conf:
bind = $mainMod, left, workspace, m-1
bind = $mainMod SHIFT, left, movetoworkspace, m-1
bind = $mainMod, right, exec, python ~/.config/hypr/scripts/next-workspace.py
bind = $mainMod SHIFT, right, exec, python ~/.config/hypr/scripts/next-workspace.py --with-window

You can then navigate between each monitor's workspaces, creating new ones when neccessary, by holding $mainMod and pressing arrow left or right. If you hold down shift you will also take your currently focused window with you.

+1 for this as a built-in feature.
This is the default navigating experience on gnome and other people coming from this DE might also be interested in it.
@CheesyPhoenix thanks for the script. One thing I would add here is also changing the behavior of m-1 to do nothing when it's the first workspace (instead of moving it to the last workspace)

+1 for this as a built-in feature.
This is the default navigating experience on gnome and other people coming from this DE might also be interested in it.
@CheesyPhoenix thanks for the script. One thing I would add here is also changing the behavior of m-1 to do nothing when it's the first workspace (instead of moving it to the last workspace)

I have now created a small program for this in rust that also handles moving backwards. Its installable with cargo aswell as from the AUR. See: https://github.com/CheesyPhoenix/hyprland-relative-workspace

Inspired by Script @CheesyPhoenix
with empty workspaces support.
#!/usr/bin/python
import subprocess
import json
import sys

cli = 'movetoworkspace' if "--move" in sys.argv else 'workspace'

def get_current_workspace():
    monitor_list = (
        subprocess.run("hyprctl -j monitors".split(), stdout=subprocess.PIPE, check=False)
        .stdout.decode("utf-8")
        .strip()
    )

    monitor_list = json.loads(monitor_list)
    for monitor in monitor_list:
        if monitor["focused"] == True:
            return [monitor["name"], monitor["activeWorkspace"]["id"]]
    return []

current_workspace = int(get_current_workspace()[1])
current_monitor = str(get_current_workspace()[0])

workspaces = json.loads(subprocess.run(
    "hyprctl -j workspaces".split(), stdout=subprocess.PIPE, check=False)
    .stdout.decode("utf-8")
    .strip()
)

current_monitor_workspaces = []
all_workspaces = []
for ws in workspaces:
    all_workspaces.append(int(ws['id']))
    if ws['monitor'] == current_monitor:
        current_monitor_workspaces.append(int(ws['id']))
current_monitor_workspaces.sort(reverse=False)
all_workspaces.sort(reverse=False)

cmw_with_empty = []
for i in range(1, all_workspaces[-1]+1):
    if i in current_monitor_workspaces or (i not in current_monitor_workspaces and i not in all_workspaces):
        cmw_with_empty.append(i)

if "--right" in sys.argv:
    if current_workspace == cmw_with_empty[-1]:
        subprocess.run(
            f"hyprctl dispatch {cli} {all_workspaces[-1]+1}".split())
    else:
        count = 0
        for cmw in cmw_with_empty:
            if cmw == current_workspace:
                subprocess.run(
                    f"hyprctl dispatch {cli} {cmw_with_empty[count+1]}".split())
                break
            count += 1

elif "--left" in sys.argv:
    if current_workspace != cmw_with_empty[0]:
        count = 0
        for cmw in cmw_with_empty:
            if cmw == current_workspace:
                subprocess.run(
                    f"hyprctl dispatch {cli} {cmw_with_empty[count-1]}".split())
                break
            count += 1

bind=SUPER,LEFT,exec, python ~/.config/hypr/navigate_workspaces.py --left
bind=SUPER,RIGHT,exec, python ~/.config/hypr/navigate_workspaces.py --right
bind=SUPERCTRL,LEFT,exec, python ~/.config/hypr/navigate_workspaces.py --left --move
bind=SUPERCTRL,RIGHT,exec, python ~/.config/hypr/navigate_workspaces.py --right --move

The r+1/r-1 workspace alias with empty workspaces support has been recently pushed.

yeah, closing because of the above


"Property '_statusBarItem' has no initializer" error.

I am following documentation below;
https://code.visualstudio.com/docs/extensions/example-word-count#_update-the-status-bar
If I use code snippet at the page, or here I am getting following error:

message: 'Property '_statusBarItem' has no initializer and is not definitely assigned in the constructor.'

VS Code configured to use TypeScript 2.7.2.
Am I missing something here?
Error SS:

Thanks for calling this out. This is due to TypeScript 2.7+ setting --strictPropertyInitialization on by default. Fixed in the VS Code documentation with https://github.com/Microsoft/vscode-docs/commit/06f622eddc4156db015d6375d2c372305383189d.

Thanks a lot!


[Snyk] Upgrade puppeteer from 13.4.1 to 13.7.0

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade puppeteer from 13.4.1 to 13.7.0.

:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 5 versions ahead of your current version.
The recommended version was released a month ago, on 2022-04-28.

Release notes

Package name: puppeteer

13.7.0 - 2022-04-28Features

add back and forward mouse buttons (#8284) (7a51bff)
support chrome headless mode (#8260) (1308d9a)

Bug Fixes

doc typo (#8263) (952a2ae)
use different test names for browser specific tests in launcher.spec.ts (#8250) (c6cf1a9)

13.6.0 - 2022-04-20Features

chromium: roll to Chromium 101.0.4950.0 (r982053) (#8213) (ec74bd8)
respond multiple headers with same key (#8183) (c1dcd85)

Bug Fixes

also kill Firefox when temporary profile is used (#8233) (b6504d7)
consider existing frames when waiting for a frame (#8200) (0955225)
disable bfcache in the launcher (#8196) (9ac7318), closes #8182
enable page.spec event handler test for firefox (#8214) (2b45027)
forget queuedEventGroup when emitting response in responseReceivedExtraInfo (#8234) (#8239) (91a8e73)
forget request will be sent from the _requestWillBeSentMap list. (#8226) (4b786c9)
ignore favicon requests in page.spec event handler tests (#8208) (04e5c88)
network.spec.ts: typo in the word should (#8223) (e93faad)

13.5.2 - 2022-03-31Bug Fixes

chromium downloading hung at 99% (#8169) (8f13470)
get extra headers from Fetch.requestPaused event (#8162) (37ede68)

13.5.1 - 2022-03-09Bug Fixes

waitForNavigation in OOPIFs (#8117) (34775e5)

13.5.0 - 2022-03-07Features

chromium: roll to Chromium 100.0.4889.0 (r970485) (#8108) (d12f427)

Bug Fixes

Inherit browser-level proxy settings from incognito context (#7770) (3feca32)
page: page.createIsolatedWorld error catching has been added (#7848) (309e8b8)
tests: ensure all tests honour BINARY envvar (#8092) (3b8b9ad)

13.4.1 - 2022-03-01Bug Fixes

regression in --user-data-dir handling (#8060) (85decdc)

    from puppeteer GitHub release notes

Commit messages

Package name: puppeteer

ae97cca chore(release): mark v13.7.0 (#8292)
f34219e chore(deps-dev): bump pixelmatch from 5.2.1 to 5.3.0 (#8287)
7a51bff feat: add `back` and `forward` mouse buttons (#8284)
b0e9e6f chore(deps-dev): bump @ microsoft/api-documenter from 7.17.10 to 7.17.11 (#8282)
e989cee chore(deps-dev): bump @ typescript-eslint/parser from 5.20.0 to 5.21.0 (#8278)
912dfba test: disable a failing Firefox test (#8286)
2f1a52d chore(deps-dev): bump @ typescript-eslint/eslint-plugin (#8277)
1308d9a feat: support chrome headless mode (#8260)
260ad5d chore(deps-dev): bump eslint from 8.13.0 to 8.14.0 (#8268)
7ef6b40 chore(deps-dev): bump @ microsoft/api-documenter from 7.17.9 to 7.17.10 (#8269)
813b6d9 chore(deps-dev): bump @ types/node from 17.0.25 to 17.0.26 (#8267)
60ec89a chore: add headful mode tests (#8265)
351d146 chore(deps-dev): bump @ types/mocha from 9.1.0 to 9.1.1 (#8264)
952a2ae fix: doc typo (#8263)
7b27e24 chore(deps-dev): bump sinon from 13.0.1 to 13.0.2 (#8257)
ff7eb71 chore(deps-dev): bump eslint-plugin-mocha from 10.0.3 to 10.0.4 (#8256)
e68d6c7 chore(deps): bump https-proxy-agent from 5.0.0 to 5.0.1 (#8255)
69d85e8 chore(deps-dev): bump @ types/node from 17.0.23 to 17.0.25 (#8253)
1595ec7 chore(deps-dev): bump @ typescript-eslint/parser from 5.18.0 to 5.20.0 (#8254)
b865bfb chore(deps-dev): bump @ microsoft/api-documenter from 7.17.2 to 7.17.9 (#8241)
c065170 chore(deps-dev): bump @ typescript-eslint/eslint-plugin (#8247)
4cb59e6 chore(deps-dev): bump @ microsoft/api-extractor from 7.20.1 to 7.22.2 (#8240)
c6cf1a9 fix: use different test names for browser specific tests in launcher.spec.ts (#8250)
9a9ec8f chore: bump version to v13.6.0-post (#8251)

Compare

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Codecov Report

Merging #1030 (4ea09ae) into develop (5f64de4) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #1030   +/-   ##
========================================
  Coverage    58.13%   58.13%
========================================
  Files           51       51
  Lines         1598     1598
  Branches       340      340
========================================
  Hits           929      929
  Misses         626      626
  Partials        43       43

Continue to review full report at Codecov.

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


Added tests for DX6 Pod-to-Pod tunnel

Coverage increased (+0.8%) to 69.463% when pulling 7e2162a8ca16c2d6b0e0c443bc2172dfc6b975fe on jgallo542:srv6_dx6_tunnel_test into 6f9765569ee7049b205127c9533ee3d086117440 on contiv:dev.


Error: error compiling magefiles

When I run the command: mage and  receive error
command-line-arguments
.\magefile.go:277:13: undefined: syscall.Rlimit
.\magefile.go:278:9: undefined: syscall.Getrlimit
.\magefile.go:278:27: undefined: syscall.RLIMIT_NOFILE
.\magefile.go:284:9: undefined: syscall.Setrlimit
.\magefile.go:284:27: undefined: syscall.RLIMIT_NOFILE
Error: error compiling magefiles

I see, syscall isn't available on windows. Can you give this branch a try?

@davidzhao Thank you, I will retry this branch

let me know how it works. I'll merge it in once you confirm!


This appears to meet all of the guidelines, but fails the first test

Challenge escaping-literal-quotes-in-strings has an issue.
User Agent is: Mozilla/5.0 (X11; CrOS x86_64 8872.76.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.105 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

var myStr = "I am a \"double quoted\" string inside \"double quotes\".";

[closed][blocked] This is actually an incorrect solution...

@strongdan  The code you have posted here seems to be working for me. What issue are you having?

@ajain17 This is working now for me too. I'm not sure what the problem was.

I am also experiencing the same issue.

The same problem for me. My code is code is correct but does not want to pass

@ichthub It works for me. Your code is incorrect. It doesn't generate expected output. Check it again, it will work.

I'm having the same issue.  My code is the exact same:
var myStr = "I am a "double quoted"string inside"double quotes".";
am I missing something? Thanks!

@pamela113 Your code is incorrect. It doesn't generate expected output. Check it again, it will work.

@ajain17 I see what you are talking about.  Thanks!

I found that while I had written the code correctly, the spacing  between words and punctuation marks should be accurate to the dot. if Spacing is off a bit , I had problems.
Var myStr = "I am a "double quoted " string inside"double quotes ".";


npm install failed

Not happening with pnpm i
Tried npm i with and without shamefully-hoist=true
❯ npm i

> postinstall
> nuxt prepare

Nuxi 3.6.5                                                                                1:50:14 PM

 ERROR  Error while requiring module nuxt-apollo: Error: Cannot find module '/Users/username/Sites/xxxx/gh-tpl/nuxt-apollo'                     1:50:15 PM
Require stack:
- /Users/username/Sites/xxxx/gh-tpl/index.js

 ERROR  Cannot find module '/Users/username/Sites/xxxx/gh-tpl/nuxt-apollo'                                                                      1:50:15 PM
Require stack:
- /Users/username/Sites/xxxx/gh-tpl/index.js

  Require stack:
  - index.js
  at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
  at Function.resolve (node:internal/modules/cjs/helpers:116:19)
  at Function._resolve [as resolve] (node_modules/jiti/dist/jiti.js:1:250100)
  at resolveModule (node_modules/@nuxt/kit/dist/index.mjs:2230:29)
  at requireModule (node_modules/@nuxt/kit/dist/index.mjs:2240:24)
  at loadNuxtModuleInstance (node_modules/@nuxt/kit/dist/index.mjs:2435:90)
  at async installModule (node_modules/@nuxt/kit/dist/index.mjs:2408:47)
  at async setup (node_modules/@bg-dev/nuxt-directus/dist/module.mjs:60:7)
  at async normalizedModule (node_modules/@nuxt/kit/dist/index.mjs:2140:17)
  at async installModule (node_modules/@nuxt/kit/dist/index.mjs:2409:95)

npm ERR! code 1
npm ERR! path /Users/username/Sites/xxxx/gh-tpl
npm ERR! command failed
npm ERR! command sh -c nuxt prepare

Will try on a fresh nuxt installation later today

Mentioned this on new nuxt-apollo release link.


fixdisable join reorder for test_bitmap_filter regression test

Proposed changes
the nereids planner may reorder the join without any statistics info. This could lead to very bad join order that cause the query timeout. This pr disable join reorder for this sql.

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

Is a join reorder without any statistics info as expected? Why not change the logic of the join reorder but the test case?

run external

run buildall

run buildall

run buildall


can partials decouple data from view

First of all thank you for your work. I have a question. Let's say we have this code in list.hbs

{{#each data }}

{{content}}

{{\each}}

I want to use it somewhere else using this code
{{#each concrete_data }}
{{>list}}
{{\each}}

Is this possible ?

absolutely. this is handlebars syntax though, so you'll want to read up on scope and how context works in  blocks/loops. http://handlebarsjs.com/


Fix  Series.astype() to return a Series[type] dependent on argument

Deprecations in 1.5 on Series.astype() revealed that we have to work on that method.
See https://github.com/pandas-dev/pandas-stubs/issues/227#issuecomment-1260164389
Ideally, things like s.astype(int) and s.astype("int") would both return Series[int] .  Have to deal with each of the possible types, as well as the possible strings.

So we just have to change the return type to Series[S1]

So we just have to change the return type to Series[S1]

No, it's more nuanced than that, because you can pass strings to astype() that correspond to dtypes, and there are dtype arguments that are not in the S1 typevar.  So you need a lot of overloads to appropriately do the mappings.  Have to handle a variety of numpy types as well.
I'd suggest making a table of values of S1 in one column, and then in the second column, you list all the possible arguments for astype() that could generate that value of S1.  Then, from that table, you build a set of overloads.
There might be cases where there is no possible value for the astype() argument that give a particular value in S1.  We'll need to review them one by one.

So we just have to change the return type to Series[S1]

No, it's more nuanced than that, because you can pass strings to astype() that correspond to dtypes, and there are dtype arguments that are not in the S1 typevar. So you need a lot of overloads to appropriately do the mappings. Have to handle a variety of numpy types as well.
I'd suggest making a table of values of S1 in one column, and then in the second column, you list all the possible arguments for astype() that could generate that value of S1. Then, from that table, you build a set of overloads.
There might be cases where there is no possible value for the astype() argument that give a particular value in S1. We'll need to review them one by one.

i'll get started with it now then


Add basic Theory or conceptual

Add basic terminology for the beginner to learn DSA confidential. and add the core concept Level Question

Learn DSA


Boolean attributes

{foo: true} adds attribute foo without value in virtual-dom. {foo: false} removes it.
This behaviour is simple and very helpful with disabled fields.

Right now, I'm using the equivalent of { disabled: "disabled" } which seems to work fine, and they're behind smart constructors anyway. But this is definitely more elegant and easier to traverse, so yes, let's add this.


fix(effects-directive): unregister all effects of a provider

PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit message follows our guidelines: https://github.com/ngneat/effects/blob/master/CONTRIBUTING.md#commit
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?
Ensures correct behavior of directive when on destroy is called
[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?
Only the last (order) effect in a provider was unregistered.
Issue Number: #72
What is the new behavior?
All effects are of a provider are unregistered.
Does this PR introduce a breaking change?
[ ] Yes
[x] No

Other information

Please let me know if you feel I should add additional unit tests. I added just enough to make them fail (multiple effects in a single provider). And the added a fix and retested.

LGTM
No need for an extra test. Just check that spy3 is called the same number of times as spy1 in the existing tests.

No need for an extra test. Just check that spy3 is called the same number of times as spy1 in the existing tests.
Done. That said I used spy3 to cover some additional edge cases instead of just mirroring spy1.

Thank you for the fix!

One note. While I would not consider this a breaking change as such,  since it just ensures the expected behavior. It does change significantly how the directive functions and might affect existing apps in a way that might not be easy to see for other devs. Not sure what the right way would be to go about this.

It should be fine generally. If someone faces a problem, it's because their code has worked wrong. While it is breaking change in some way, I don't see a problem.

@NetanelBasal I created a tag and update version but it's still isn't available for downloading/ Could you check what I missed?

I need to publish it

Done


Suggestion: Add cycle icon on card preview

Currently when you are looking the card-preview window (the small one that appears when mouse is over a card name) you can read for example: Core Set #50 or King of Isles #35.
My suggestion is to change it for:
Core Set #50 (and the crown icon)
King of Isles #35 (and the kraken icon)
And the same for all cycles.
My idea is to easily find where a card belongs to one cycle or another with no need to know the chapter name.
Thanks!

hey, thanks for making this suggestion. i would consider it, if i had the icon set for the cycles. which i don't, so i'll have to pass on this idea.


(pipelines): Destroying the pipeline does not destroy cross region S3 buckets

Describe the bug
When you create a Blueprints pipeline with cross region stages (for various environments), the pipeline will create cross-region support stacks which includes an S3 bucket. When the pipeline is destroyed, the S3 buckets are not deleted (most likely due to non-empty Cfn problem).
The problem rises when there needs to be dynamic pipeline testing (in my case it is testing the workshop for changes - but I've seen other use cases), and the pipeline is created and destroyed many times. Once the pipeline stack is initialized, cross-region support stack will fail because the same S3 bucket exists already.
Expected Behavior
When you re-deploy a pipeline to the same region, with the same target secondary/tertiary region, the cross-region support stack should deploy successfully.
Current Behavior
There will be errors similar to the following:
2022-11-02 18:05:15 UTC-0500 | pipeline-stack-support-us-east-1 | ROLLBACK_IN_PROGRESS | The following resource(s) failed to create: [CrossRegionCodePipelineReplicationBucketFC3227F2, CDKMetadata]. Rollback requested by user.
-- | -- | -- | --
2022-11-02 18:05:14 UTC-0500 | CDKMetadata | CREATE_FAILED | Resource creation cancelled
2022-11-02 18:05:13 UTC-0500 | CrossRegionCodePipelineReplicationBucketFC3227F2 | CREATE_FAILED | pipeline-stack-support-useplicationbucketb396d98d555a55691bab already exists

Reproduction Steps
cdk init --language typescript
npm i typescript/~4.8.4
npm i @aws-quickstart/eks-blueprints
(after writing appropriate pipeline code)
cdk deploy pipeline-stack
cdk destroy --all
(re-deploying pipeline stack)
cdk deploy pipeline-stack
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.50.0
EKS Blueprints Version
1.4.0
Node.js Version
v16.18.0
Environment details (OS name and version, etc.)
Cloud9 on AL2
Other information
No response

@youngjeong46 Do you still observe this issue. Looks like the ticket is open for an year now.


/tokenization/addcard-form returns status 200 and html code of the card addition form

I send POST request to
https://services.paytrail.com/tokenization/addcard-form
{
"checkout-account":375917,
"checkout-algorithm":"sha256",
"checkout-method":"POST",
"checkout-nonce":564635208570151,
"checkout-redirect-cancel-url":"https://example.fi/paytrailtoken",
"checkout-redirect-success-url":"https://example.fi/paytrailtoken",
"checkout-timestamp":"2018-07-06T10:01:31.904Z",
"signature":"1e59b16b1a2c1eb0d07f41c6747f6e325929e365711f448f7b8de1640362ee90"
}
According to https://docs.paytrail.com/#/?id=adding-tokenizing-cards
"On a successful request the user will be redirected to Paytrail's card addition service where user will input credit card information."
Instead of redirection to the paytrail card addition form I get the html code of the card addition form with status "200 OK".
Why doesn't redirection work?

Resolved


No Safetensor Option in Model Load

See below - the new notebook doesn't have a safetensor option:

Is that now implicit?

it will auto-detect the model type


Updateview success_url cannot change with POST parameter

Hi,
I want to change success_url listview to detailview or some extra url. I have tried with post parameter like:
POST /project/comment/create?success_url=/project/&
but i didnt work.
i have tried with hidden input type inside html form. and added success_url="/project/" to Crudview in views.py no chance.
Anyone can help post parameter for success_url ?
Regards..

I deleted success_url=reverse_lazy(url), line in initialize_create(self, basename) function. and added def get_absolute_url(self): to my models. It works now but initialize_delete function working like default list view.


Update websocket jsonrpc subscribe request parsing and response building

This PR fixes the websocket jsonrpc subscription endpoint.
I found that the implementation was different than almost everything I have checked online (is there any RFC for the subscription part? I only found this).
The jsonrpc subscribe endpoints should return the subscription ID straight in the result field. Whereas in pyth-client we wrap the id in a an object with a subscription field containing the ID.
Also, the parameter provided should be either an array or a null value, but we ask for an object containing the account field we are interested in.
Because of that, the usage of the rust jsonrpc library was impossible. I messed for hours until realising :P. All the online documentations about jsonrpc are all stating that the id should be straight in the result and that the arguments should be wrapped in an array. See:

https://besu.hyperledger.org/en/stable/HowTo/Interact/APIs/RPC-PubSub
https://geth.ethereum.org/docs/rpc/pubsub

With this patch, we are able to use the rust jsonrpc library without trouble. Please let me know whether I missed something or if my fix is wrong (I also fixed the absolute path used in the init script to make it more portable, as a NixOS user, it was impossible for me to run it).

As I mentioned on #27, this looks good but we will wait a while to merge. Thanks for the PR!


FUSETOOLS2-522 - provide hover for trait definition name

the job is green on Travis https://travis-ci.org/github/camel-tooling/camel-language-server/builds/703187677


Release qualification for IAP scanner

#403 is a big new feature that needs some pre-release manual testing.  Some interesting test cases:

Rules:

Wildcards in ruledef fields
Multiple entries in a ruledef field, e.g. multiple sources allowed
Wildcards in resource_ids
Various inheritance options and attachment points in resource_ids
Does the default wildcard rule do the right thing?
Both tags and IPs in allowed_sources rule

Instance groups:

Unmanaged, tag comes from instance
Managed, tag comes from template

Backend services:

No port name
Has port name, IG match
Has port name, IG no match

Firewall:

Protocol mismatch
Port mismatch
Port match (single port)
Port match (range)
Port wildcard
Overridden by deny
Not overridden by deny
Network mismatch
Tag mismatch
Tag match
Direction mismatch

Alternate services:

Same instance groups
Same instances, different groups

Created:

Network othernet
Instead tag sometag
Instance groups: ig-unmanaged-defaultnet, ig-unmanaged-othertag, ig-unmanaged-othernet, ig-managed-notag, ig-managed-othertag, ig-managed-othernet

Created one backend service for each instance group, plus some backend services for "alternate services": bs-alt-yes-group, bs-alt-no-network, bs-alt-no-port. Tried to also create bs-alt-yes-instance -- alternate-service backend service with different group but same instance -- but GCE doesn't actually permit that.

Created firewall rules:

fw-proto-mismatch
fw-port-mismatch
fw-port-match-single
fw-port-match-range
fw-port-wildcard
fw-deny-overridden, fw-deny-overridden-override
fw-deny-not-overridden, fw-deny-not-overridden-override
fw-network-mismatch
fw-tag-mismatch
fw-tag-match
fw-direction-mismatch

Set up the various GCLB frontend objects and enabled IAP on all of the backend services.

Expected results:

One alternate_services violation for bs-unmanaged-defaultnet: bs-alt-yes-group
The following alternate sources violations:

deny-not-overridden (all services except *-othernet)
port-match-range (all services except *-othernet, bs-alt-no-port)
port-match-single (all services except *-othernet, bs-alt-no-port)
tag-match (bs-managed-othertag, bs-unmanaged-othertag)
wildcard (all services except *-othernet)
network-mismatch (bs-managed-othernet, bs-unmanaged-othernet)

@blueandgold ran the scan. Oddities:

Unexpected source <IP_ADDRESS>/9 showing up
bs-managed-othertag showing bs-unmanaged-othertag as an alternate service, not showing tag-match as a source. Ditto for bs-unmanaged-othertag.
wildcard not showing up (expected since #486 wasn't pulled for the run.)

More data:

Unexpected source <IP_ADDRESS>/9 is due to default-allow-internal rule, so that's correct.
bs-managed-othertag was using the wrong tag name in the instance template ("sometag" v. "othertag".) I've updated fw-tag-match to match both. bs-unmanaged-othertag's instance did have the correct tag though so still need to follow up there. Ah... bs-managed-othertag was using ig-unmanaged-othertag instead of ig-managed-sometag: fixed. That explains the alternate services issue as well.

Tag issue fixed with #492, everything looks good now.


Liqoctl: install on kind forcing LoadBalancer

Description
This PR adds the possibility to force the use of a LoadBalancer service installing Liqo in kind with liqoctl

/rebase test=true

/test

/test

/test

/merge


UnicodeDecodeError

UnicodeDecodeError
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 40: ordinal not in range(128)
Traceback (most recent call last)
File "/home/livarava/.env/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/home/livarava/.env/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/livarava/.env/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/livarava/.env/lib/python2.7/site-packages/flask/app.py", line 1479, in full_dispatch_request
response = self.process_response(response)
File "/home/livarava/.env/lib/python2.7/site-packages/flask/app.py", line 1691, in process_response
response = handler(response)
File "/home/livarava/.env/lib/python2.7/site-packages/flask_debugtoolbar/init.py", line 196, in process_response
toolbar_html = self.debug_toolbars[real_request].render_toolbar()
File "/home/livarava/.env/lib/python2.7/site-packages/flask_debugtoolbar/toolbar.py", line 45, in render_toolbar
return template.render(**context)
File "/home/livarava/.env/lib/python2.7/site-packages/jinja2/environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "/home/livarava/.env/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/livarava/.env/lib/python2.7/site-packages/flask_debugtoolbar/templates/base.html", line 50, in top-level template code
{{ panel.content()|safe }}
File "/home/livarava/.env/lib/python2.7/site-packages/flask_debugtoolbar_lineprofilerpanel/panels.py", line 126, in content
'stats': processed_line_stats
File "/home/livarava/.env/lib/python2.7/site-packages/flask_debugtoolbar/panels/init.py", line 28, in render
return template.render(**context)
File "/home/livarava/.env/lib/python2.7/site-packages/jinja2/environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "/home/livarava/.env/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/livarava/.env/lib/python2.7/site-packages/flask_debugtoolbar_lineprofilerpanel/templates/content.html", line 72, in top-level template code
{{ line }}
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd1 in position 40: ordinal not in range(128)

It is an issue of Flask DebugToolbar Line Profiler. Sorry, guys.


Alternative to WS CLI by querying eth2-ws-provider (plus ws spec compliant verification)

Alternative to the IPFS setup for weak subjectivity CLI where we query a server running the ChainSafe fork of eth2-ws-provider (currently being implemented here: https://github.com/ChainSafe/eth2-ws-provider/pull/1) instead of querying https://github.com/ChainSafe/beacon-state-upload/ via IPFS
Also implements isWithinWeakSubjectivityPeriod and as a consequence, computeWeakSubjectivityPeriod (as spec'd here: https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/weak-subjectivity.md#is_within_weak_subjectivity_period) to verify the fetched weak subjectivity state (which also handles the state root verification).
TODO:

Still looking into it, but every time I try to access state.latestBlockHeader.stateRoot where state is a WS state, it tells me the stateRoot is 0x0000...00 every time.  This may be due to needing #2556 implemented (or the block backfilling part, rather), but I'm still not sure yet.

Still looking into it, but every time I try to access state.latestBlockHeader.stateRoot where state is a WS state, it tells me the stateRoot is 0x0000...00 every time. This may be due to needing #2556 implemented (or the block backfilling part, rather), but I'm still not sure yet.

it's expected bc we only know state root after we finish the state transition https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/beacon-chain.md#block-header
due to that this code snippet is quite common https://github.com/ChainSafe/lodestar/blob/ee75995812cbe60b4056b6800e34eea03c2c052b/packages/lodestar/src/chain/blocks/stateTransition.ts#L138