[alert-handler] auto-fix Nvidia GPU low performance issue

Coverage remained the same at 34.02% when pulling 2c0b141b71815201a2ec3d95709c52975913c0a9 on suiguoxin:gpu-perf into 4441e28c3969058d22750db46b0484a914bf3f70 on microsoft:master.

Test cases:

enable this feature by adding the following customized route & receiver in services-configuration.yaml:

customized-routes:
  routes:
  - receiver: pai-email-admin-and-fix-nvidia-gpu-low-perf
    match:
      alertname: NodeGpuLowPerfState
customized-receivers: # receivers are combination of several actions
- name: "pai-email-admin-and-fix-nvidia-gpu-low-perf"
  actions:
    email-admin:
    fix-nvidia-gpu-low-perf:

manully send an alert by POST to https://xxx.openpai.org/alert-manager/api/v1/alerts with the following body:

[
        {
            "labels": {
                "alertname": "NodeGpuLowPerfState",
                "minor_number": "0",
                "node_name": "node6",
                "severity": "warn"
            },
            "generatorURL": "alert/script",
            "fingerprint": "6b8102e96c9e6b2a"
        }
]

check k8s job named nvidia-gpu-low-perf-fixer-xxx and related pods created, check logs, the GPU state & clocks should been changed


Fix typo in Readme for tests.

Also remove line-final whitespace.
What does this PR do?

Motivation

Additional Notes

Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] Changelog entries must be created for modifications to shipped code
[ ] Add the qa/skip-qa label if the PR doesn't need to be tested during QA.

Closing, the module name is correct.


Setting the default schema disables the execute statement

After choosing the active schema in a SQL Editor, the execute statement is being disabled.
Identified on version 3.7.5

It is a bug in toolbar icons enablement. Actual command can be executed (using shortcut or context menu).
Thanks for report.


fix bug in run_clm_no_trainer.py

Type of Change
bug fix
Description
missing tokenizer when using lm_eval==0.4.2
detail description

ext test: https://inteltf-jenk.sh.intel.com/view/lpot-validation/job/intel-lpot-validation-top-mr-extension/5583/


⚠ Samsung has degraded performance

In 313e369, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 1795 ms

Resolved: Samsung performance has improved in 44c9af6.


How to set game regions on import?

How is it possible to set game regions (want to set PAL) on import from steam?
And is there a documentation on the supported file formats?

5f43690 adds a --bl-region flag which addresses this, although full HTML or GUI support is still something I want to add.


Term used for number of cases in Slovak translation is misleading

On home screen the user is presented with number of cases ("Chorí") and number of recoveries ("Uzdravení"), which implies the total number of cases is "Chorí" + "Uzdravení" which is incorrect. In fact "Chorí" represents the total number of confirmed cases by itself.
I think best term to use would be "confirmed cases" (as used by Our World in Data), since we know only about cases confirmed by tests, not all cases in general. In Slovak that would be "Potvrdené prípady" instead of "Chorí", or possibly "Nakazení" if shorter string is absolutely necessary.

Similarly, it would make sense to talk about confirmed recoveries, i.e. "Potvrdené uzdravenia".


Istio injected envoy sidecar container sometimes fails to start with Istio 1.1.x

There is an issue in Istio 1.1.x (#9504) which in some circumstances causes startup/readiness problem for the injected Envoy sidecar container.
We should check if it could be mitigated on our end!

Solved in Istio 1.3, Istio 1.1 is EOL, see: https://github.com/istio/istio/issues/9504#issuecomment-532412566


in_tail: Simplify TargetInfo related code

Which issue(s) this PR fixes:
None
What this PR does / why we need it:
Since TargetInfo related code is too confusing, we introduced some fatal bugs in the past.
We should refactor it.

Using TargetInfo as hash table key is confusing, only path is used in actual.
Simlify error handling.

Docs Changes:
None
Release Note:
Same with the title

I'm planning to merge this after #3535

Thanks for your review :+1:


Can you close the screenmelting procces by alt-f4?

I have some concerns about this program. Does it disable taskmanager? Does it have any pre-set arguments? Can you close it with ALT-F4? Is it destructive?

I should test it on a vm...

it gives off entry point not found

By default no user input is disabled. With the args mentioned in the README.md file you can partially disable the keyboard and mouse.
No destructive file operations are made.

So you can close the melting procces by altf4?

If disable_input or disable_keyboard flags are not set it should work.
(The code is poorly optimized so it might be a bit hard to kill the process on a weaker hardware.)

never mind, I found a way to close it by task mgr


If you disconnect and connect the device, have a two events with onDataReceived

I used the library for some months and I have this bug
When the user disconnect and connect the device, before that the onDeviceDisconnected listener detect the device and show the toast, we have a problem, the listener onDeviceRead (or onDataReceived) will run twice.
This is my code to make the connection:
const connectDevice = (device: BluetoothDevice): Promise<void> => {
    return new Promise(async (resolve, reject) => {
      try {
        await device.connect({
          connectionType: 'binary',
          delimiter: '\r\n',
        });

        const readDevice = RNBluetoothClassic.onDeviceRead(device.address, onReceiveData);

        const onDisconnect = RNBluetoothClassic.onDeviceDisconnected(
          (event: any) => {
            readDevice.remove();
            onDisconnect.remove();

            dispatch(removeDevice(event.address));

            ToastAndroid.show(`${event.name} se ha desconectado`, 3000);
          },
        );

        dispatch(setConnectedDevice(device));
        resolve();
      } catch (error) {
        if (error instanceof Error) {
          ToastAndroid.show(error.message, 3000);
          reject(error.message);
        }
      }
    });
  };

I try to add this line of code on the disconnect function but I have the same problem:
const disconnectDevice = (device: BluetoothDevice): Promise<void> => {
    return new Promise(async (resolve, reject) => {
      try {
        RNBluetoothClassic.onDeviceRead(device.address, onReceiveData).remove(); // <----
        await device.disconnect();

        dispatch(removeDevice(device.address));
        resolve();
      } catch (error) {
        if (error instanceof Error) {
          ToastAndroid.show(error.message, 3000);
          reject(error.message);
        }
      }
    });
  };

We need the user to be able to connect multiple devices. If you know of a different method I can fix or if it's a bug in the library please let me know.

Okey, sorry if my explanition is not clear...
I have one device, if I connect to the app, and later disconnect, but I connect the same device before de onDeviceDisconnect read the event, i have the same event when i received data duplicated, if I repeat the process, I have three messages, but the same device, only I disconnect and connect.
Is that my question or my problem. I see other issue and I copy the code to connect to the device where the onDataReceived listener and the onDeviceDisconnect  listener is applied when connect the device.
If you want a video to show the "problem", I don't have problem to send you a video.
If is not a bug, what is the reason?, I understand that listeners are independent but they don't clean when I disconnect the device and the events affect the app behavior. (Sorry but english is not my native language).

Answering your question:
If connect a device and later disconnect the same device, but the onDeviceDisconnected read the event detect that device is disconnected, and later connect again the device, we have a normal behavior.
The problem is when the onDeviceDisconnected don't read the disconnected device (it takes a few seconds to detect it) and we try to connect the same device, what causes we have duplicated listeners.
From what I understood from your answer is that natively, we will have to prevent the same device from having two listeners at the same time. Am I correct?
I have no problem modifying what is necessary, only if you could tell me in which file or module I can make the change, I can do it without any problem.

The problem is when the onDeviceDisconnected don't read the disconnected device (it takes a few seconds to detect it) and we try to connect the same device, what causes we have duplicated listeners.
This is due to the disconnection event being based on the ACL Event which from what I've read isn't the most accurate, but it's documented as such, so I don't think there is an issue with using it as long as this is the understanding.   With that said, I guess the issue is that:

the device is disconnected
the connection is removed from mConnections
the device is reconnected?
the device is disconnected?

I don't understand how this is possible?  I guess I'm still completely missing how you're getting two connections at the same time.  There is a check in there where:

If attempting to connect to a device, and it's already in mConnections it will not allow you to connect again.

So you should never be able to have two active connections to the same device.  Now, there are some devices that will allow this:

connect to device
connect to device again (this causes an automatic disconnect)
disconnect would fire
connect would be successful

For example, this is how my old companies devices would work.  In this case, I needed to actually maintain the connection state globally in the react app, not just on the screen.
I don't see any way (easily, without breaking changes) to fix this on the Native side of things.

After a few days, I've some conclusions:

The problem can be solved saving a global state like redux where save the onDataReceived listener, example:

  ...
  listeners: {
    [address: string]: BluetoothEventSubscription;
  };

const readDevice = device.onDataReceived(onReceiveData);

dispatch(
  addListener({
    address: device.address,
    listener: readDevice,
  }),
);

On disconnect function
await device.disconnect();
listeners[device.address].remove();

Note: It's very important that when you connect to the device, than the connect button when is connecting you put the button disabled to avoid problems.

Another way is if you save the entry of the device, prevent two events that the timestamp and the address are the same. But if you don't do the first point, you can have a problem with the performance of your app.

If you only do the first point, you can have the same problem, but this only happened to me 1 time, and I things it is related to this

Note: It's very important that when you connect to the device, than the connect button when is connecting you put the button disabled to avoid problems.

It should be noted that I have solved it, but it happened to me once, I don't know if it's the fault of the device, the application or performance itself.
I close the issue 'cause is not a bug but if anyone have the same problem keep this in mind.
Thanks @kenjdavidson for you help, I apologize because they are maybe small problems but I am a newbie

Right on! Feel free to post about any issues or questions you have.  At this point, if more people think it should change, we can definitely change it.  But your definition is how I would expect this to be solved, without attempting to make assumptions about how the app will be used.   The less assumptions and more wide open the library can stay, I think is the best.


[stack] section chrome iteration

Questions

are we happy with using the whole left gutter of the section just for a centered drag handle?
how could we support collapsing a section?
should the section have a canonical way to expose a toolbar?

sections need to be able to expose a toolbar to action the content of the section

editor has a toolbar
table will likely have a toolbar
sketch has tools as well

toolbar could be rendered within the content area of the section
having a place for toolbars in the section however will likely make it feel more consistent

how do the toolbar and section actions related?

are we happy with using the whole left gutter of the section just for a centered drag handle?
The rail (‘gutter’ refers only to negative space and ‘margin’ is overloaded) can host whatever we want! I anticipated this space would be used by other controls.

how could we support collapsing a section?
Our best options I think are to add a button to the rail, or to add an action to the menu.

should the section have a canonical way to expose a toolbar?
Sections that use toolbars will reserve space for their toolbars and can choose when to display them (ideally only when attended, or always if that detail proves hard to implement). Their position should be sticky to just beneath the plank heading, so toolbars should never overlap and scroll away when the bottom edge of their content scrolls away.

how do the toolbar and section actions relate?
Without upending the design, section actions are hosted by the rail, and the toolbar is on the horizontal axis indented by the rail size. We may want a “section toolbar item” akin to “File”/“Edit”/“View” in the space at the intersection of the rail and a section’s toolbar.

I can take a stab at these ideas in Figma to get a sense for it.

@thure I'd be curious what a stack section would look like with the chrome being across the top rather than the rail. (If we've tried this before already please refresh my memory of what the problems with it are.)
Motivating thoughts:

we already have three-dots along the top
toolbar across the top could host actions on the section content
would provide something to render with section collapsed
could render title of section object (at the very least when collapsed, perhaps always if there's space)
UI for collapsed section would be consistent with open sections (don't need to move things around)

There are 3 hierarchical levels of information architecture to consider:

info & actions about the stack itself and where it sits among other planks in the deck
actions about a stack’s section and where it sits among other sections in the stack
actions within a stack’s section, relating only to the section’s content

Each layer of the IA should be able to scale significantly if we expect to facilitate actions that are frequently usable. A single nine-dots or three-dots menu will not comfortably scale to accommodate high-frequency actions or actions that require a passive signifier like expand/collapse.
If the concern is with the rail’s size, that is configurable. Rails are a common pattern even in mobile apps.

UI for collapsed section would be consistent with open sections (don't need to move things around)

You might not be imagining what I intend to convey about the rail, this is true for the rail and probably untrue for the 3-layer toolbar/header.

Here is an exploration using the existing componentry available in Figma which use the rail pattern, I’ll look at a variation that does all actions horizontally next.
https://www.figma.com/file/w9HsmcQattO4slk9fLWjnh/Operating-system-v1?type=design&node-id=161%3A4049&mode=design&t=rYHIPXy69E58yPk1-1

nine-dots is changed to type icon as we have for plank headings — whether/how we signify these are drag handles is worth exploring, though they’ll also support invoking menus like Notion
expand/collapse action appears under that since it needs a passive signifier
six-dots drag handle appears at the bottom-edge of stack sections for adjusting size, if available

really like the direction. @thure can you show a stack with text, table, and sketch sections. for tables i'd like to see the x/y scroll container.

@richburdon a somewhat hasty draft here

StackSection overflow could potentially be visible in the rail as long as StackSection’s chrome occludes it
The extrema for StackSection scrollbars would be x) the width from the right-edge of the rail to the right edge of the section, and y) the entire height of the section
This isn’t meant to express an opinion about Table design specifics

@thure one thing I'm noticing that these stack sections are missing is the menu where actions such as "go to item" or "insert above" would be housed. Where are you thinking that will go?
Separately, on the toolbar in the screenshot, I'm guessing that you envision that allow the top of whichever section has attention?

the menu where actions … would be housed

I’m trying out a design pattern where the type icon is both the drag handle and the menu invoker for an entitiy, throughout the app.
I do think it has discoverability issues unadorned as it is now, have been thinking of a way to make it more obvious.

you envision that allow the top of whichever section has attention?

Yes, one reason sections need to reserve space for their toolbar is so that they can display in their static position if the section is not scrolled past the top edge of the viewport.
I think an optimization would be to show only one toolbar at a time, that of a section with attention.


Data not Posting back to the server even with .Encode(false) (Reference to #123)

Hello I am having a problem with the data posting back to the server.  I have read through Issue #123 and #141, which had me set .Encode(false) on all my id rows and also put a span on them.
When I Get the data we can see that I the correct amount of rows:

I then can see all the correct data on the page, and if you look at the information showing in the following picture, you can see each row has the id information in the tr, plus the id:

Lastly when I hit the submit button I am getting nothing returned on the Post:

I have the following as the html views:
From the Edit.cshtml:

            <label<EMAIL_ADDRESS>class="control-label col-md-2">
            <partial name="_RepEditPartial" model="Model.Reputation">

                <input type="submit" value="Save" class="btn btn-default" />

Then from the above referenced _RepEditPartial.cshtml:

        @(Html
                    .Grid( Model )
                    .Build( columns =>
                    {
                        columns.Add( model => model.CharacterCharID ).Encoded(false).RenderedAs(model => "" + model.CharacterCharID + "").Css( "hidden" );
                        columns.Add( model => model.FactionFactionID ).Encoded(false).RenderedAs(model => "" + model.FactionFactionID + "").Css( "hidden" );
                        columns.Add( model => model.FactionName ).Titled( "Faction" );
                        columns.Add( model => model.FactionSet ).Titled( "Available" ).Encoded( false ).RenderedAs( model => Html.CheckBoxFor( a => model.FactionSet, new { @class = "cbFS" } ) ).Css( "col-md-1" );
                        columns.Add( model => model.RepLevels ).Titled( "Reputation" ).Encoded( false ).RenderedAs( model => Html.Partial( "_RepLevelEditPartial", model.RepLevels ) );

                    } ).RowAttributed(model => new { model.CharacterCharID, model.FactionFactionID})
                    .Pageable( pager =>
                    {
                        pager.RowsPerPage=25;
                    } )
                    .Empty( "No Data Found" )
        )

Lastly from the inner grid referenced above hte _RepLevelEditPartial.cshtml:

        @(Html
                    .Grid( Model )
                    .Build( columns =>
                    {
                        columns.Add( model => model.ReputationLevelID ).Encoded(false).RenderedAs(model => "" + model.ReputationLevelID + "").Css( "hidden" );
                        columns.Add( model => model.ReputationIsChecked ).Encoded( false ).RenderedAs( model => Html.CheckBoxFor( a => model.ReputationIsChecked, new { @class = "cbRS" } ) );
                        columns.Add( model => model.ReputationLevelName );
                        columns.Add( model => model.ReputationLevelTier ).Encoded(false).RenderedAs(model => "" + model.ReputationLevelTier + "").Css( "hidden" );
                    } ).RowAttributed(model => new { model.FactionID, model.ReputationLevelID, model.ReputationLevelTier })
        )

Not sure what I missed, I though I had followed your guidance from the above issues and the following link to get this correct.

You only have check boxes to post, so at best you will only get their information, but they don't have any array like names, for example ReputationIsChecked[0] and so on.

So I did miss something with the CharacterCharID, FactionFactionID, and ReputationLevelID not coming through?  I do want the checkboxes to post, but I also need the IDs above to post.  On that thought that the values for the IDs are not being posted back, I tried .RenderedAs(model => Html.ValueFor( a =>  model.CharacterCharID )) to post this information back, but it still didn't provide any post back data.  But now I think I see what you are saying.  Put a int row in the code and call that as in the example with #141?

I mean, remove the grid abstraction and imagine you want to post a lot of data how would you do that? You need to use postable html tags like input, textarea, button and so on. What you are rendering out with Html.ValueFor is just the plain value without any tags, that's why it doesn't work.

I am getting what you are saying.  I have placed on the inner grid the following: .RenderedAs(model => model.ReputationLevelID + "<input type=\"hidden\" rId=\"repLevelID[" + innerRow + "].ReputationLevelID\" value=\"" + model.ReputationLevelID + "\" />"
and increment it on the last row value.  Though I am struggling with adding the value to the checkbox section, I essentially want the output of that to be .ReputationIsChecked[0] where 0 would be the value of the innerRow number.
I also have placed in the outer grid the following: .RenderedAs(model => model.CharacterCharID + "<input type=\"hidden\" cId=\"CharacterID[" + outerRow + "].CharacterCharID\" value=\"" + model.CharacterCharID + "\" />")
from here though I am trying to see if placing that increment in the middle will work.  That is what you are saying though?

Yes, increment works, grid is rendered in for each row render each column in the order they were added.
You don't have to do the dirty work by hand, if your model properties are lists, you can still use html helper to render hidden input though.

Ok my model properties are a List<ChraracterReputationListViewModel> and in that a List<ReputationLevelListViewModel>.  The first list (List<ChraracterReputationListViewModel>) contains the CharacterCharId, FactionFactionID, and the succeeding list.  The second list (List<ReputationLevelListViewModel>) contains the factionID (for reference back to the outer list) and the ReputationLevelID, the ReputationIsChecked, and the ReputationLevelTier.  I am looking at essentially posting back to the database the following: CharacterCharID, FactionFactionID, ReputationLevelID, and the ReputationIsChecked value.  The first three are the composite key and the last is the value in the database.
I would say I am getting closer as the following is my output:

                            1<input type="hidden" value="1" cid="CharacterID[0].CharacterCharID">
                            1<input type="hidden" value="1" fid="FactionID[0].FactionFactionID">
                            Ale Association
                            <input name="FactionSet" class="cbFS" id="FactionSet" type="checkbox" checked="checked" value="true" data-val-required="The previous value must be selected" data-val="true">

                            6<input type="hidden" value="6" rid="repLevelID[0].ReputationLevelID">
                            <input name="ReputationIsChecked" class="cbRS" id="0" type="checkbox" checked="checked" value="true" data-val-required="The previous value must be selected" data-val="true">
                            Enemy
                            0<input type="hidden" value="0" rtid="repLeveTier[0].ReputationLevelTier">

                            13<input type="hidden" value="13" rid="repLevelID[1].ReputationLevelID">
                            <input name="ReputationIsChecked" class="cbRS" id="1" type="checkbox" checked="checked" value="true">
                            Neutral
                            1<input type="hidden" value="1" rtid="repLeveTier[1].ReputationLevelTier">

                            1<input type="hidden" value="1" rid="repLevelID[2].ReputationLevelID">
                            <input name="ReputationIsChecked" class="cbRS" id="2" type="checkbox" checked="checked" value="true">
                            Acquaintance
                            2<input type="hidden" value="2" rtid="repLeveTier[2].ReputationLevelTier">

                            8<input type="hidden" value="8" rid="repLevelID[3].ReputationLevelID">
                            <input name="ReputationIsChecked" class="cbRS" id="3" type="checkbox" checked="checked" value="true">
                            Friend
                            3<input type="hidden" value="3" rtid="repLeveTier[3].ReputationLevelTier">

                            2<input type="hidden" value="2" rid="repLevelID[4].ReputationLevelID">
                            <input name="ReputationIsChecked" class="cbRS" id="4" type="checkbox" value="true">
                            Ally
                            4<input type="hidden" value="4" rtid="repLeveTier[4].ReputationLevelTier">

                            11<input type="hidden" value="11" rid="repLevelID[5].ReputationLevelID">
                            <input name="ReputationIsChecked" disabled="" class="cbRS" id="5" type="checkbox" value="true">
                            Kindred
                            5<input type="hidden" value="5" rtid="repLeveTier[5].ReputationLevelTier">

Though still nothing is being posted back on the submit.

Well from grid's side I don't know what can stop it from being send :smile:

I agree, it looks like the data should be sent back to the server, though I look at my returnedView.Reputation and I still have a count of 0 with all the above in there.  I know I am expecting a count of 39.

I don't see you binding returnedView[0].PropertyName anywhere.

Ok on that you lost me.  Where would I end up binding that?  I do have in my controller the returnedView, but it doesn't hit the controller until after I hit the submit button.  Would that be with the processwith funtion?

Never mind me, I thought returnedView is a list being bound in the post action, couldn't see well in that 10x10 pixel image.

My controller Post action does start out with the returnedView binding.  Though that is where it is not receiving the data
        [HttpPost]
        [ValidateAntiForgeryToken]
        public async Task<ActionResult> Edit( CharacterReputationViewModel returnedView, CharacterReputation characterReputation )
        {

My page is essentially:
<form action="/CharacterReputations/Edit" method="post">

Character Reputation

        Alfwine

            Reputation

                            Faction

                            Available

                            Reputation

                            1<input type="hidden" value="1" cid="CharacterID[0].CharacterCharID">
                            1<input type="hidden" value="1" fid="FactionID[0].FactionFactionID">
                            Ale Association
                            <input name="FactionSet" class="cbFS" id="FactionSet" type="checkbox" checked="checked" value="true" data-val-required="The previous value must be selected" data-val="true">

                            6<input type="hidden" value="6" rid="repLevelID[0].ReputationLevelID">
                            <input name="ReputationIsChecked" class="cbRS" id="0" type="checkbox" checked="checked" value="true" data-val-required="The previous value must be selected" data-val="true">
                            Enemy
                            0<input type="hidden" value="0" rtid="repLeveTier[0].ReputationLevelTier">

                            13<input type="hidden" value="13" rid="repLevelID[1].ReputationLevelID">
                            <input name="ReputationIsChecked" class="cbRS" id="1" type="checkbox" checked="checked" value="true">
                            Neutral
                            1<input type="hidden" value="1" rtid="repLeveTier[1].ReputationLevelTier">

                            1<input type="hidden" value="1" rid="repLevelID[2].ReputationLevelID">
                            <input name="ReputationIsChecked" class="cbRS" id="2" type="checkbox" checked="checked" value="true">
                            Acquaintance
                            2<input type="hidden" value="2" rtid="repLeveTier[2].ReputationLevelTier">

                            8<input type="hidden" value="8" rid="repLevelID[3].ReputationLevelID">
                            <input name="ReputationIsChecked" class="cbRS" id="3" type="checkbox" checked="checked" value="true">
                            Friend
                            3<input type="hidden" value="3" rtid="repLeveTier[3].ReputationLevelTier">

                            2<input type="hidden" value="2" rid="repLevelID[4].ReputationLevelID">
                            <input name="ReputationIsChecked" class="cbRS" id="4" type="checkbox" value="true">
                            Ally
                            4<input type="hidden" value="4" rtid="repLeveTier[4].ReputationLevelTier">

                            11<input type="hidden" value="11" rid="repLevelID[5].ReputationLevelID">
                            <input name="ReputationIsChecked" disabled="" class="cbRS" id="5" type="checkbox" value="true">
                            Kindred
                            5<input type="hidden" value="5" rtid="repLeveTier[5].ReputationLevelTier">

// Data removed to shorten

«

‹

1

2

›

»

            <input class="mvc-grid-pager-rows" type="hidden" value="25">

                <input class="btn btn-default" type="submit" value="Save">

<input name="__RequestVerificationToken" type="hidden" value="CfDJ8PLOJLiQ_blJkLKoM2M8NMhwjT1IyHpXNkTDoledVdWvyymm31tSzvNarI1S5T1BQO3E7rNz4EOjFjNEpvCcYdNxsgiGhuK7GezvtIBv7swI7ZOwSnOORuUY-w8hiA5f2fkCxLikzyu-nOLSD36ZD6c"></form>

Can you provide a small repro project on github?

I have made some headway with this.  I know that the information is not posting back because the grids are each a partial view.  So Chrome, Edge, and Firefox are not collecting the data.  Using an index, how would I pass that index number into the partial view?

Probably this.

Probably this.

Yes, pager only loads the page, in posting scenarios you usually don't want to use the pager.

While I can work with that currently, I am guessing I would need to use javascript to collect all the post data.  If I was to check something on one page, move to another, check something there then want to post it back?

Yes.

Thank You, I feel that this question has been answered.  I will close this.


Timestamp should be UTC

Partial fix for issue #100

pnemonic78, thank you for your time and effort making contributions to this project. I appreciate you.
First, this pull request is changing multiple things simultaneously: 1. Persist the timestamps with UTC timezone in the database, 2. Change the data types for some of the values from Integer to Long. Maybe these distinct changes should be made in separate pull requests?
I'm not too familiar with this code base. But I've poked around a little bit as I've been invited to review pull requests. With that in mind, here is my thoughts regarding this change.
If only it was easy to work with time!
I think it's a good idea to store the time as UTC in the database. However, I don't think it is quite as simple as it is currently implemented in this PR. For example, this pull request mutates the time zone when writing the timestamps to the database. I don't see any code that reverses this data mutation when the data is read back from the database. It seems like a more thorough approach would be to make sure that all timestamps are converted to UTC at write time and converted back to the default timezone at read time.
I have several other thoughts about this change that would require more time and effort than I can currently afford to contribute to this project. But in short, I think making any changes regarding how timestamps are persisted should be carefully and holistically considered.
I would currently vote to not merge this PR.
I would feel more confident making these changes if we had some test cases that properly validate that writing and then reading the persisted values from the database result in the same timestamps. These tests might be difficult to write due to the need to make the comparisons across timestamps that are mutated to/from different time zones.
I think ideally, the information persisted to the database would be timezone agnostic, such as using a java.util.Instant, rather than using a timezone specific timestamp such as java.sql.Timestamp. This way, all the UTC information would be encapsulated in the object that is written and then read from the database. Then, any/all code that want's to use timezone specific logic can do so based on the requirements of that code.

@axiopisty
java.util.Instant is not available in many "older" Android versions.
The timestamps are written/read using only UTC. In general, all Java timestamps are UTC (java.util.Date is timezone-independent).
There are some tests in TimestampHelperTest


[RF] Updates for templateflow

To work with https://github.com/poldracklab/fmriprep/pull/1334

Any crazy stuff that I don't see?

Sounds good.

Good to go? Looks like poldracklab/fmriprep#1334 is passing.

(Or do we want to wait for the next release, to avoid too much churn?)

I'm fixing the colors of ROIsPlot. If I'm not done by the end of the day, let's push it to the next release.

Alright, this is finished. I've tested locally and the plots look the same as before the PR 👍.
Currently testing fmriprep here: https://circleci.com/workflow-run/d3fa2769-7013-4fce-83f0-23e9a32ae158
Right after merging this, I'll release 0.5.0 (I think the big change in templates deserves that minor bump)


private-endpoint-dns-12-28-pull.md

Added more information regarding the DNS forwarder as customers do not know what this resource is supposed to be.

@romoriar : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Break codebase into separate pieces

In particular, breaks the Contract class into its own file.
This has the benefit of being more modular, allowing subclassing for external modules, as well as saving memory that was previously wasted re-initializing the class on each instance creation.
Fixes #3.

Coverage remained the same at 100.0% when pulling 7a5973fb49035422fc5e46bdd4d24defaee2fcfc on flyswatter:i3-BreakOutContractClass into afa016904cf2ab1f79b831494b80faea8d7b74a0 on ethjs:master.

Coverage remained the same at 100.0% when pulling 7a5973fb49035422fc5e46bdd4d24defaee2fcfc on flyswatter:i3-BreakOutContractClass into afa016904cf2ab1f79b831494b80faea8d7b74a0 on ethjs:master.

Will review, I like this a lot. Does it change the main method signatures in anyway?

Nope, all external API is identical, no tests changed, all tests passing.
I want this entirely so I can inherit from this to make an event-emitting subclass of your contract abstraction.

Keep going on the event subclasses, that sounds great. I want to see a PR for that soon =D

Oh, do you think it should just be a different export on this repo?  I was making it its own repo that imports the contract file from this one.

@flyswatter oh yeah, it's own is fine


Compiling failed

Hello
I got some errors:

and gmsh.h , gmsh.lib are missing

Try pulling the latest changes and compiling again.
The library depends on Gmsh so you need to download and compile it from here: https://gmsh.info/bin/Windows/gmsh-4.12.1-Windows64-sdk.zip

Thanks
How to use the library ? or where we extract it?


Error with save_checkpoint

Provide as much information as possible. At least, this should include a description of your issue and steps to reproduce the problem. If possible also provide a summary of what steps or workarounds you have already tried.
System information

OS: Ubuntu
Flax version: 0.6.1
Jax version: 0.3.17
jaxlib version:  0.3.15+cuda11.cudnn805
Python version: 3.7.14

Problem you have encountered:
I have been trying to save a train_state using checkpoints.save_checkpoint. To check if my code was not the problem, I used the following code you guys posted on one of your discussions:
import jax.numpy as jnp
import jax
import flax
import flax.linen as nn
from flax.training import train_state, checkpoints
import optax
import numpy as np

class Net(nn.Module):
    features: int

    @nn.compact
    def __call__(self, x):
        x = nn.Dense(self.features)(x)
        x = nn.Dense(self.features)(x)
        return x

model = Net(features=2)
params = model.init(jax.random.PRNGKey(0), jnp.ones((1, 2)))

tx = optax.adam(learning_rate=0.0001)
state = train_state.TrainState.create(apply_fn=model.apply,
                                      params=params,
                                      tx=tx)

CKPT_DIR = 'ckpts'
checkpoints.save_checkpoint(ckpt_dir="./", target=state, step=0)
restored_state = checkpoints.restore_checkpoint(ckpt_dir=CKPT_DIR, target=state)

assert jax.tree_util.tree_all(jax.tree_multimap(lambda x, y: (x == y).all(), state.params, restored_state.params))

However, I got the same error (described below)
Logs, error messages, etc:
AttributeError                            Traceback (most recent call last)
 in
28
29 CKPT_DIR = 'ckpts'
---> 30 checkpoints.save_checkpoint(ckpt_dir="./", target=state, step=0)
31 restored_state = checkpoints.restore_checkpoint(ckpt_dir=CKPT_DIR, target=state)
32
/usr/local/lib/python3.7/dist-packages/flax/serialization.py in _np_convert_in_place(d)
251   if isinstance(d, dict):
252     for k, v in d.items():
--> 253       if isinstance(v, jax.Array):
254         d[k] = np.array(v)
255       elif isinstance(v, dict):
AttributeError: module 'jax' has no attribute 'Array'
Steps to reproduce:
Colab link: https://colab.research.google.com/drive/1TgOt-ERfSRXXEFyfUAQxmWK0ERqMPLNf?usp=sharing

You can upgrade jax to 0.3.18 or newer, and the error should resolve itself!
The jax.Array type was introduced in that version, see https://jax.readthedocs.io/en/latest/changelog.html

This is correct, jax recently deprecated some APIs and created new ones, please upgrade to the latest version of jax and flax.

Closing the issue assuming this assessment is correct, but feel free to reopen it if you continue to face the problem.


dxDataGrid Data Binding

I am trying to convert a data grid project from angular 1.x into angular 2
As there is currently no support and this is the first time i have used angular 2 it is difficult for me to even get started.
Currently -> I have this:
<dx-data-grid
[dataSource]='tradecosts'
[paging]='{
pageSize: 10
}'
[pager]= '{
showPageSizeSelector: true,
allowedPageSizes: [5, 10, 20],
showInfo: true
}'>

This creates the grid fine, and i can populate the grid IF i hardcode the array.
The problem i am having is that the array needs to be populated via a web api.
To do this, i am using the JQuery $.get method (expanded into $.ajax below), which is called within the ngInit() method of the export class AppComponent.
var temp =[];
$.ajax({
type: 'GET',
url: tradeCostUrl,
contentType: "application/json",
dataType: "json",
success: function (result) {
$.each(result, function (index, object) {
temp.push(object.Fields);
});
},
error: function (result) {
console.log(result);
},
complete: function(){
this.tradecosts = temp;
}
});
This method works fine and updates my data binding array (tradecosts) with the data that i want to appear in the grid.
However, this does not update the data being shown on the grid.
In angular 1.x, i could call the onInitialized method when the grid first rendered and create an instance of the grid that i could then call the Refresh() method on.
Is there an equivelant in angular2

I have solved this issue myself.
It is a duplicate of one that was requested.
I had to use the ViewModel to get an instance of the DataGrid, then call the refresh method on the instance


How to perform complex navigation in stacked routes?

Consider an e-commerce website for this example.
Routes:
Each store: '/store/id'
Cart: '/store/id/cart'
Checkout  page: '/store/id/checkout'
Goal: I need to pop cart before going to checkout. (So that after checkout we can just pop and land on store instead of cart).
I am having difficulty moving from cart -> checkout using push replacement. (throws error)
I might be using routes incorrectly. Any help is appreciated.
Also, a second question, is there a way to pop 2 routes? In case pushReplacement will not work, I can put checkout inside cart and pop twice to land on store post checkout (this is not prefarable but will fix my use case).
Minimal Code below.
import 'package:flutter/material.dart';
import 'package:vrouter/vrouter.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return VRouter(
      title: 'Flutter Demo',
      mode: VRouterModes.history,
      routes: [
        VWidget(path: '/', widget: HomePage(), stackedRoutes: [
          VWidget(
              path: '/store/:id',
              widget: Builder(
                builder: (context) => StoreView(
                  id: context.vRouter.pathParameters['id']!,
                ),
              ),
              stackedRoutes: [
                VWidget(
                  path: 'cart',
                  widget: CartView(),
                ),
                VWidget(
                  path: 'checkout',
                  widget: CheckoutView(),
                ),
              ]),
        ]),
      ],
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          TextButton(
            onPressed: () {
              context.vRouter.push("/store/1");
            },
            child: const Text("Store 1"),
          )
        ],
      ),
    );
  }
}

class StoreView extends StatelessWidget {
  final String id;
  StoreView({required this.id});

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        Text("Store" + id),
        TextButton(
          onPressed: () {
            context.vRouter.push("cart");
          },
          child: const Text("Go to Cart"),
        ),
      ],
    );
  }
}

class CartView extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        const Text("CartView"),
        TextButton(
          onPressed: () {
            context.vRouter.pushReplacement("checkout");
          },
          child: const Text("Go to Checkout"),
        ),
      ],
    );
  }
}

class CheckoutView extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return const Text("CheckoutView");
  }
}

Just use push to navigate where you want. Don't think in terms of pop.
push is actually replacing the entiere stack and animating correctly, so it's easier to use than pop.
Try it out and tell me if that works. If not I can modify your example to make it work 😉

push NOT starting with / is relative so when you are on cart (/store/id/cart) and use push("checkout")  you actually navigate to /store/id/cart/checkout which does not exist.
What you need in that case is to use absolute navigation instead, like: push("/store/id/checkout")

Btw push vs pushReplacement is only a different for the web browser history not for the navigation stack, this might be where you got the confusion

Thank! that works.


add option to keep one menu open at a time

close #14

@amirkian007 , Please merge this PR so I can use the closeOpenMenuOnHrefPush.
Many thanks

Many Thanks
Vào Th 4, 1 thg 5, 2024 vào lúc 20:10 Amir Adel @.***>
đã viết:

@anhcunmio https://github.com/anhcunmio
done

@.***

Not sure you why need this pr to use closeOpenMenuOnHrefPush ?
—
Reply to this email directly, view it on GitHub
https://github.com/amirkian007/vue-awesome-sidebar/pull/15#issuecomment-2088441359,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGNGWD6OFKD5LCBR47YYMC3ZADSWFAVCNFSM6AAAAAAWFXZJZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYGQ2DCMZVHE
.
You are receiving this because you were mentioned.Message ID:
@.***>


System.NullReferenceException after calling tf.Variable

Is there any point needed to pay attention to when calling tf.Variable？

@WaylandGod Please reference this example.


Cluster stuck in Provisioning state with error "etcdsnapshots.rke.cattle.io "sowmya-test-etcd-on-demand-sowmya-test-etcd-p1-ad3bbd6c-x-1eb30" not found" after performing a restore on the RKE2 cluster

Rancher Server Setup

Rancher version: 2.6-head commit id: e93a53c
Installation option (Docker install/Helm Chart): docker install

Information about the Cluster

Kubernetes version: v1.21.10+rke2r1
Cluster Type (Local/Downstream): Downstream DO Node driver cluster

User Information

What is the role of the user logged in? (Admin/Cluster Owner/Cluster Member/Project Owner/Project Member/Custom) admin

Describe the bug
Cluster stuck in Provisioning state with error  - "etcdsnapshots.rke.cattle.io "sowmya-test-etcd-on-demand-sowmya-test-etcd-p1-ad3bbd6c-x-1eb30" not found" after deleting one of the snapshots from the cluster
To Reproduce

Deploy a cluster - 3 etcd, 1 control plane, 3 worker nodes
After cluster has come up Active, take a few manual snapshots
Restore from one of the snapshots on the cluster
Cluster is stuck in provisioning state with error "etcdsnapshots.rke.cattle.io "sowmya-test-etcd-on-demand-sowmya-test-etcd-p1-ad3bbd6c-x-1eb30" not found"

Result

Error in rancher logs:

2022/03/01 17:55:02 [ERROR] error syncing 'kube-system/rke2-etcd-snapshots': handler snapshotbackpopulate: rkecluster fleet-default/sowmya-test-etcd: error while creating etcd snapshot fleet-default/sowmya-test-etcd-on-demand-sowmya-test-etcd-p1-ad3bbd6c-m-50baa: etcdsnapshots.rke.cattle.io "sowmya-test-etcd-on-demand-sowmya-test-etcd-p1-ad3bbd6c-m-50baa" already exists, requeuing

Expected Result:
Restore on RKE2 cluster should work.

The UI is not supposed to allow a user to delete etcd snapshots. Are you able to delete the CRs from the UI? If so, that is a bug in itself.

The fix for https://github.com/rancher/rancher/issues/36696 may fix this....

I think https://github.com/rancher/rancher/pull/36707 will resolve this hopefully

On 2.6head commit id: 4df221

Deploy a cluster - 3 etcd, 1 control plane, 3 worker nodes.
After cluster has come up Active, take a few manual snapshots
Restore from one of the snapshots on the cluster - etcd only
Restore does not work
Rancher logs:

2022/03/06 19:41:28 [INFO] [snapshotbackpopulate] rkecluster fleet-default/sowmya-new-etcd-snapshot-backup-restore: processing configmap kube-system/rke2-etcd-snapshots
2022/03/06 19:41:28 [INFO] [snapshotbackpopulate] rkecluster fleet-default/sowmya-new-etcd-snapshot-backup-restore: processing configmap kube-system/rke2-etcd-snapshots
2022/03/06 19:41:29 [ERROR] Failed to handling tunnel request from remote address <IP_ADDRESS>:7512: response 401: failed authentication
2022/03/06 19:41:29 [INFO] Handling backend connection request [stv-cluster-c-m-28p52p6m]
2022/03/06 19:42:02 [INFO] [planner] rkecluster fleet-default/sowmya-new-etcd-snapshot-backup-restore: waiting: refreshing etcd restore state
2022/03/06 19:42:02 [INFO] [planner] rkecluster fleet-default/sowmya-new-etcd-snapshot-backup-restore: waiting: refreshing etcd restore state
2022/03/06 19:42:02 [INFO] rkecluster fleet-default/sowmya-new-etcd-snapshot-backup-restore: ensuring designated init node: sowmya-new-etcd-snapshot-backup-restore-pool1-a57751e3-vt5pf
2022/03/06 19:42:02 [INFO] rkecluster fleet-default/sowmya-new-etcd-snapshot-backup-restore: ensuring designated init node: sowmya-new-etcd-snapshot-backup-restore-pool1-a57751e3-vt5pf
2022/03/06 19:42:02 [INFO] rkecluster fleet-default/sowmya-new-etcd-snapshot-backup-restore: ensuring designated init node: sowmya-new-etcd-snapshot-backup-restore-pool1-a57751e3-vt5pf
2022/03/06 19:42:02 [INFO] rkecluster fleet-default/sowmya-new-etcd-snapshot-backup-restore: ensuring designated init node: sowmya-new-etcd-snapshot-backup-restore-pool1-a57751e3-vt5pf
2022/03/06 19:42:04 [INFO] Handling backend connection request [c-m-28p52p6m]
2022/03/06 19:42:05 [INFO] error in remotedialer server [400]: websocket: close 1006 (abnormal closure): unexpected EOF
2022/03/06 19:42:05 [INFO] error in remotedialer server [400]: websocket: close 1006 (abnormal closure): unexpected EOF
W0306 19:42:05.006637      33 reflector.go:443] github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168: watch of *v1.ClusterRoleBinding ended with: an error on the server ("unable to decode an event from the watch stream: tunnel disconnect") has prevented the request from succeeding
W0306 19:42:05.006741      33 reflector.go:443] github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168: watch of *v1.Node ended with: an error on the server ("unable to decode an event from the watch stream: tunnel disconnect") has prevented the request from succeeding
W0306 19:42:05.006751      33 reflector.go:443] github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168: watch of *v1.ServiceAccount ended with: an error on the server ("unable to decode an event from the watch stream: tunnel disconnect") has prevented the request from succeeding
W0306 19:42:05.006912      33 reflector.go:443] github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168: watch of *v1.Role ended with: an error on the server ("unable to decode an event from the watch stream: tunnel disconnect") has prevented the request from succeeding
W0306 19:42:05.007162      33 reflector.go:443] github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168: watch of *v1.ClusterRole ended with: an error on the server ("unable to decode an event from the watch stream: tunnel disconnect") has prevented the request from succeeding
W0306 19:42:05.007375      33 reflector.go:443] github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168: watch of *v1.Namespace ended with: an error on the server ("unable to decode an event from the watch stream: tunnel disconnect") has prevented the request from succeeding
W0306 19:42:05.007524      33 reflector.go:443] github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168: watch of *v1.APIService ended with: an error on the server ("unable to decode an event from the watch stream: tunnel disconnect") has prevented the request from succeeding
2022/03/06 19:42:05 httputil: ReverseProxy read error during body copy: tunnel disconnect
W0306 19:42:05.008157      33 reflector.go:443] github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168: watch of *v1.Node ended with: an error on the server ("unable to decode an event from the watch stream: stream error: stream ID 2189; INTERNAL_ERROR; received from peer") has prevented the request from succeeding
W0306 19:42:05.008247      33 reflector.go:443] github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168: watch of *v1.ConfigMap ended with: an error on the server ("unable to decode an event from the watch stream: tunnel disconnect") has prevented the request from succeeding
W0306 19:42:05.008238      33 reflector.go:443] github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168: watch of *v1.ConfigMap ended with: an error on the server ("unable to decode an event from the watch stream: tunnel disconnect") has prevented the request from succeeding
W0306 19:42:05.008325      33 reflector.go:443] github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168: watch of *v1.Secret ended with: an error on the server ("unable to decode an event from the watch stream: tunnel disconnect") has prevented the request from succeeding
W0306 19:42:05.008411      33 reflector.go:443] github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168: watch of *v1.RoleBinding ended with: an error on the server ("unable to decode an event from the watch stream: tunnel disconnect") has prevented the request from succeeding
E0306 19:42:05.009269      33 upgradeaware.go:423] Error proxying data from backend to client: tunnel disconnect
2022/03/06 19:42:07 [ERROR] Failed to handling tunnel request from remote address <IP_ADDRESS>:23639: response 401: failed authentication
2022/03/06 19:42:07 [INFO] Handling backend connection request [stv-cluster-c-m-28p52p6m]
2022/03/06 19:42:07 [INFO] [snapshotbackpopulate] rkecluster fleet-default/sowmya-new-etcd-snapshot-backup-restore: processing configmap kube-system/rke2-etcd-snapshots
2022/03/06 19:42:08 [INFO] [snapshotbackpopulate] rkecluster fleet-default/sowmya-new-etcd-snapshot-backup-restore: processing configmap kube-system/rke2-etcd-snapshots
I0306 19:42:12.035365      33 trace.go:205] Trace[484857753]: "Reflector ListAndWatch" name:github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168 (06-Mar-2022 19:41:28.468) (total time: 43566ms):
Trace[484857753]: ---"Objects listed" error:<nil> 43566ms (19:42:12.035)
Trace[484857753]: [43.566918998s] [43.566918998s] END
I0306 19:42:12.037341      33 trace.go:205] Trace[967839729]: "Reflector ListAndWatch" name:github.com/rancher/rancher/go/pkg/mod/github.com/rancher/client-go@v1.23.3-rancher1/tools/cache/reflector.go:168 (06-Mar-2022 19:41:28.293) (total time: 43743ms):
Trace[967839729]: ---"Objects listed" error:<nil> 43743ms (19:42:12.037)
Trace[967839729]: [43.743837362s] [43.743837362s] END

In another cluster, on clicking restore, rancher logs show:

2022/03/06 19:46:48 [INFO] [planner] rkecluster fleet-default/sowmya-restore-1: waiting: refreshing etcd restore state
2022/03/06 19:46:48 [INFO] [planner] rkecluster fleet-default/sowmya-restore-1: waiting: refreshing etcd restore state
2022/03/06 19:46:48 [INFO] rkecluster fleet-default/sowmya-restore-1: ensuring designated init node: sowmya-restore-1-pool1-acab8e03-tklhw
2022/03/06 19:46:49 [INFO] rkecluster fleet-default/sowmya-restore-1: ensuring designated init node: sowmya-restore-1-pool1-acab8e03-tklhw
2022/03/06 19:46:49 [INFO] rkecluster fleet-default/sowmya-restore-1: ensuring designated init node: sowmya-restore-1-pool1-acab8e03-tklhw
2022/03/06 19:46:49 [INFO] rkecluster fleet-default/sowmya-restore-1: ensuring designated init node: sowmya-restore-1-pool1-acab8e03-tklhw

2022/03/06 19:47:02 [ERROR] Error during subscribe websocket: close sent

What is the actual error shown in the UI?

@Oats87 There is no error on the UI. I saw the cluster was Active.

@sowmyav27 if you have an environment around that has a cluster in this state can I get access to it?
Otherwise, I would need to see the clusters.provisioning.cattle.io and rkecontrolplane object to see what the states statuses are on them.

On 2.6.4-rc6
Steps:

Deploy an rke2 do node driver cluster - 3 etcd, 1 cp and 3 worker nodes
Take a snapshot s1
Deploy a few resources
Take another snapshot s2
Restore from S1. using etcd only option
Cluster stays in Active state. Resources created are still available. No restore seems to happen
rancher logs:

2022/03/08 22:19:26 [INFO] Updating global catalog system-library
2022/03/08 22:19:27 [INFO] Catalog sync done. 0 templates created, 1 templates updated, 0 templates deleted, 0 templates failed
2022/03/08 22:19:31 [INFO] [planner] rkecluster fleet-default/sowmya-rke2-new: waiting: refreshing etcd restore state
2022/03/08 22:19:31 [INFO] [planner] rkecluster fleet-default/sowmya-rke2-new: waiting: refreshing etcd restore state
2022/03/08 22:19:31 [INFO] rkecluster fleet-default/sowmya-rke2-new: ensuring designated init node: sowmya-rke2-new-pool1-d51a76f4-lhn4b
2022/03/08 22:19:31 [INFO] rkecluster fleet-default/sowmya-rke2-new: ensuring designated init node: sowmya-rke2-new-pool1-d51a76f4-lhn4b
2022/03/08 22:19:31 [INFO] rkecluster fleet-default/sowmya-rke2-new: ensuring designated init node: sowmya-rke2-new-pool1-d51a76f4-lhn4b
2022/03/08 22:19:31 [INFO] rkecluster fleet-default/sowmya-rke2-new: ensuring designated init node: sowmya-rke2-new-pool1-d51a76f4-lhn4b
2022/03/08 22:19:45 [ERROR] Error during subscribe websocket: close sent

Root cause
The v2prov planner was receiving an ErrSkip from the init node manipulation functions with multiple etcd/controlplane node clusters during re-election/designation of an init node. This was fine for initial provisioning/health correcting a cluster, but posed problems in etcd snapshot functionality as it was short circuiting the logic and thus causing the provisioner to get stuck.
What was fixed, or what changes have occurred
The helper function for clearing the init node mark (label) will no longer always return an ErrSkip, and will instead now return nil if no change is made to the labels.
Areas or cases that should be tested
The area of the issue.
What areas could experience regressions?
N/A. I don't see much potential for regression here unless there was a pre-existing reliance somewhere in the code on the faulty logic.
Are the repro steps accurate/minimal?
I think so

On 2.6-head commit id: f904267
Blocked by https://github.com/rancher/dashboard/issues/5381

Test Environment:
Rancher version: v2.6-head d604b7e
Rancher cluster type: HA
Docker version: 20.10
Downstream cluster type: EC RKE2 aws node driver

Testing:
Tested this issue with the following steps:

Deploy a cluster - 3 etcd, 1 control plane, 3 worker nodes
After cluster has come up Active, take a few manual snapshots
Restore from one of the snapshots on the cluster
Cluster is stuck in provisioning state with error "etcdsnapshots.rke.cattle.io "sowmya-test-etcd-on-demand-sowmya-test-etcd-p1-ad3bbd6c-x-1eb30" not found"

Result - Pass
The cluster is able to restore and come back into Active state.

Test Environment:
Rancher version: v2.6-head 0ad0def
Rancher cluster type: HA
Docker version: 20.10
Downstream cluster type: RKE2 DO node driver

Testing:
Tested this issue with the following steps:

Deploy a cluster - 3 etcd, 1 control plane, 3 worker nodes
After cluster has come up Active, take a few manual snapshots
Restore from one of the snapshots on the cluster
Cluster is stuck in provisioning state with error "etcdsnapshots.rke.cattle.io "sowmya-test-etcd-on-demand-sowmya-test-etcd-p1-ad3bbd6c-x-1eb30" not found"

Result - Pass
The cluster is able to restore and come back into Active state.


Security fix for Prototype Pollution

📊 Metadata *
join-assign is vulnerable to Prototype Pollution.
This package allowing for modification of prototype behavior, which may result in Information Disclosure/DoS/RCE.
Bounty URL: https://www.huntr.dev/bounties/1-npm-join-assign/
⚙ Description *
Prototype Pollution refers to the ability to inject properties into existing JavaScript language construct prototypes, such as objects.
JavaScript allows all Object attributes to be altered, including their magical attributes such as proto, constructor and prototype.
An attacker manipulates these attributes to overwrite, or pollute, a JavaScript application object prototype of the base object by injecting other values.
Properties on the Object.prototype are then inherited by all the JavaScript objects through the prototype chain.
💻 Technical Description *
Fixed by avoiding setting magical attributes.
🐛 Proof of Concept (PoC) *

Create the following PoC file:

// poc.js
const { assign } = require('join-assign')

console.log(`Before: ${{}.polluted}`)
assign({}, JSON.parse('{"__proto__": {"polluted": true}}'))
console.log(`After: ${{}.polluted}`)

Execute the following commands in terminal:

npm i join-assign # Install affected module
node poc.js #  Run the PoC

Check the Output:

Before : undefined
After : true

🔥 Proof of Fix (PoF) *
After fix execution will block prototype pollution and polluted will be [undefined.]
👍 User Acceptance Testing (UAT)
After fix functionality is unaffected.

👋 Hello, @diogoeichert - @ready-research has opened a PR to us with a fix for a potential vulnerability in your repository. To view the vulnerability, please refer to the bounty URL in the first comment, above.
Ultimately, you get to decide if the fix is 👍 or 👎. If you are happy with the fix, please write a new comment (@huntr-helper - LGTM) and we will open a PR to your repository with the fix. All remaining PRs for this vulnerability will be automatically closed.
If you have any questions or need support, come and join us on our community Discord!
@diogoeichert & @ready-research - thank you for your efforts in securing the world’s open source code! 🎉

Hi! Thank you very much for this. While I truly appreciate the collaboration, I must say I don't agree with the solution, specially because I don't see this as a problem this package should try to solve. If the prototype has been polluted already by the time join-assign performs an assign or clone operation, it means the problem should have been prevented at an earlier point, most likely avoiding random code from other dependencies to be executed.
That being said, this change would also break some important functionality currently available, like the creation of multi-inheritance instances, e.g.
		function A() {
			this.a = 1;
		}

		function B() {}

		B.prototype.b = function () {
			return this.a;
		};

		const a = new A();
		const b = new B();
		join.assign(a, b);
		a.b(); // should be able to call this method and return 1

I have extended the unit tests to cover this case specifically. To run the tests, you can rebase your branch from the main branch and run npm test. Thanks again.


docs: Improve Docker setup instructions to include cd to project dire…

Description of change

Add a new step on Docker local setup instructions orienting the user to change to the project directory once they have Dockerfiles and Makefiles.
Issues resolved by this PR

Eliminate possibility of misunderstanding arising from the fact only  "without docker" instructions oriented to cd into packages/sdks/javascript.
More info

Post preview

@cla-bot check

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @Vitor-the-Dev on file. In order for us to review and merge your code, please contact the project maintainers to get yourself added.

Hello @Vitor-the-Dev! 👋
Welcome to Devopness open source projects!
The user Vitor-the-Dev has been added to our allowed contributors list.
Thank you 💖 and congrats 🎉 for opening your very first pull request in this repository.
Hope you have a great time contributing and learning around here! 😄


RBAC not working with LDAP

I've been following this document here for setting up RBAC over the LDAP auth. However, this never worked even after trying different combinations.
Here is what my configs look like.
~]# grep rbac /etc/st2/st2.conf -A2
[rbac]
sync_remote_groups = True

~]# cat /opt/stackstorm/rbac/mappings/stormers.yaml
---
  group: "cn=GROUP_NAME,ou=groups,o=adbe"
  roles:
    - "observer"

configs seems to be registered well in the DB, after running st2-apply-rbac-definitions
    > use st2
    switched to db st2
    > db.group_to_role_mapping_d_b.find()
    { "_id" : ObjectId("62deaa7b77bfe684352d1d3a"), "group" : "cn=GROUP_NAME,ou=groups,o=ldaporg", "roles" : [ "observer" ], "source" : "mappings/stormers.yaml", "enabled" : true }

Proving that my user is part of the LDAP group.
  ~ % ldapsearch -H ldap://ldap.myorg.net:389 -x -ZZ -LLL -b ou=Users,o=ldaporg "cn=my_username"
  dn: cn=my_username,ou=Users,o=ldaporg
  memberOf: cn=GROUP_NAME,ou=Groups,o=ldaporg

When I login using my LDAP, I'm suppose to have only observer level privileges but I'm still getting the admin level privileges granted for some reason. There are no RBAC related traces in logs even after enabling DEBUG.  Any other suggestions ?
cheers.

hi @anrajme ! i don't have a lot with experience with RBAC here, but can you share your full rbac config?
just to confirm, and what authenticaiton are you using?
would you be able to try using this bit if not already:
enable = True
backend = default

and see if you get any logs? you should be seeing something
cheers!

We use LDAP with RBAC with no issues internally, but our config is a bit different than yours likely due to our use of AD for the LDAP server.  It is possible that your current login still have a valid authentication that needs to be refreshed or you have a local RBAC user defined with an overlapping user name.  It seems like multiple "mappings" will default to the highest access level.
Check the output of the command:
st2 role-assignment list
The RBAC mapping for each user is applied at login and written to the DB and that command should dump out all the RBAC users, the mapping applied, if they are Remote (LDAP), and the RBAC mapping file used to determine the Role.  It should look something like this:
+--------------------------+----------+---------------+-----------+-----------------------+-----------------------+ | id                       | role     | user          | is_remote | source                | description           | +--------------------------+----------+---------------+-----------+-----------------------+-----------------------+ | 624e04655a04fb4b3264d6ea | observer | ldap_user     | True      | mappings/st2_xx_xxxxx | Automatic role        | |                          |          |               |           | _xxx.yaml             | assignment based on   | |                          |          |               |           |                       | the remote user       | |                          |          |               |           |                       | membership in group   | |                          |          |               |           |                       | "CN=xxxxxxx"          | | 62670541d3bec1c9b4e79ed2 | admin    | stanley       | False     | assignments/stanley.y |                       | |                          |          |               |           | aml                   |                       | +--------------------------+----------+---------------+-----------+-----------------------+-----------------------+

Thank you so much @pimguilherme @jamesdreid. Your responses gave me enough clues to identify the problem.
There were two issues,

I didn't have these entries in RBAC configs.

enable = True
backend = default

The document here was  bit tricky. I assumed it only need the sync_remote_groups = True attribute.

As mentioned in the documentation -

LDAP group names referenced in the group attribute are case-sensitive.

I have tried different combinations before, but it didn't show up due to (1). I had to change ou=groups to ou=Groups and it started working!
2022-07-28 01:46:06,476<PHONE_NUMBER>41360 INFO ldap_backend [-] Successfully authenticated user "my_username".
2022-07-28 01:46:06,481<PHONE_NUMBER>41360 AUDIT access [-] Access granted to "my_username" with the token set to expire at "2022-07-29T01:46:06.480239Z". (username='my_username',token_expiration='2022-07-29T01:46:06.480239Z')
2022-07-28 01:46:06,482<PHONE_NUMBER>41360 DEBUG handlers [-] Retrieving auth backend groups for user "my_username" (auth_backend='LDAPAuthenticationBackend',remote_addr='<IP_ADDRESS>')
2022-07-28 01:46:06,482<PHONE_NUMBER>41360 DEBUG ldap_backend [-] Getting LDAP groups for user "my_username" from cache
2022-07-28 01:46:06,483<PHONE_NUMBER>41360 DEBUG ldap_backend [-] Found LDAP groups cache for user "my_username"
2022-07-28 01:46:06,483<PHONE_NUMBER>41360 DEBUG handlers [-] Found "12" groups for user "my_username" (auth_backend='LDAPAuthenticationBackend',remote_addr='<IP_ADDRESS>',username='my_username',user_groups=['cn=ORG_GROUP7,ou=Groups,o=myorg', 'cn=ORG_GROUP6,ou=Groups,o=myorg', 'cn=ORG_GROUP10,ou=Groups,o=myorg', 'cn=ORG_GROUP8,ou=Groups,o=myorg', 'cn=ORG_GROUP9,ou=Groups,o=myorg', 'cn=ORG_GROUP11,ou=Groups,o=myorg', 'cn=ORG_GROUP12,ou=Groups,o=myorg', 'cn=ORG_GROUP2,ou=Groups,o=myorg', 'cn=ORG_GROUP1,ou=Groups,o=myorg', 'cn=ORG_GROUP3,ou=Groups,o=myorg', 'cn=ORG_GROUP5,ou=Groups,o=myorg', 'cn=ORG_GROUP4,ou=Groups,o=myorg'])
2022-07-28 01:46:06,483<PHONE_NUMBER>41360 DEBUG driver_loader [-] Retrieving driver for backend "default"
2022-07-28 01:46:06,484<PHONE_NUMBER>41360 DEBUG extension [-] found extension EntryPoint.parse('noop = st2common.rbac.backends.noop:NoOpRBACBackend')
2022-07-28 01:46:06,484<PHONE_NUMBER>41360 DEBUG extension [-] found extension EntryPoint.parse('default = st2rbac_backend.backend:RBACBackend')
2022-07-28 01:46:06,490<PHONE_NUMBER>41360 INFO syncer [-] Synchronizing remote role assignments for user "UserDB(id=None, is_service=False, name="my_username", nicknames={})" (user_db={'id': None, 'is_service': False, 'name': 'my_username', 'nicknames': {}},groups=['cn=ORG_GROUP5,ou=Groups,o=myorg', 'cn=ORG_GROUP2,ou=Groups,o=myorg', 'cn=ORG_GROUP10,ou=Groups,o=myorg', 'cn=ORG_GROUP7,ou=Groups,o=myorg', 'cn=ORG_GROUP11,ou=Groups,o=myorg', 'cn=ORG_GROUP4,ou=Groups,o=myorg', 'cn=ORG_GROUP1,ou=Groups,o=myorg', 'cn=ORG_GROUP3,ou=Groups,o=myorg', 'cn=ORG_GROUP12,ou=Groups,o=myorg', 'cn=ORG_GROUP9,ou=Groups,o=myorg', 'cn=ORG_GROUP6,ou=Groups,o=myorg', 'cn=ORG_GROUP8,ou=Groups,o=myorg'])
2022-07-28 01:46:06,494<PHONE_NUMBER>41360 DEBUG syncer [-] New role assignments: {'observer'}
2022-07-28 01:46:06,495<PHONE_NUMBER>41360 DEBUG syncer [-] Updated role assignments: set()
2022-07-28 01:46:06,495<PHONE_NUMBER>41360 DEBUG syncer [-] Removed role assignments: {'admin'}
2022-07-28 01:46:06,503<PHONE_NUMBER>41360 DEBUG syncer [-] Created 1 new remote role assignments for user "UserDB(id=None, is_service=False, name="my_username", nicknames={})" (user_db={'id': None, 'is_service': False, 'name': 'my_username', 'nicknames': {}},groups=['cn=ORG_GROUP5,ou=Groups,o=myorg', 'cn=ORG_GROUP2,ou=Groups,o=myorg', 'cn=ORG_GROUP10,ou=Groups,o=myorg', 'cn=ORG_GROUP7,ou=Groups,o=myorg', 'cn=ORG_GROUP11,ou=Groups,o=myorg', 'cn=ORG_GROUP4,ou=Groups,o=myorg', 'cn=ORG_GROUP1,ou=Groups,o=myorg', 'cn=ORG_GROUP3,ou=Groups,o=myorg', 'cn=ORG_GROUP12,ou=Groups,o=myorg', 'cn=ORG_GROUP9,ou=Groups,o=myorg', 'cn=ORG_GROUP6,ou=Groups,o=myorg', 'cn=ORG_GROUP8,ou=Groups,o=myorg'],mapping_db={'description': None, 'enabled': True, 'group': 'cn=ORG_GROUP6,ou=Groups,o=myorg', 'id': '62e1ea18017b29a4ea935c18', 'roles': ['observer'], 'source': 'mappings/stormers.yaml'})
2022-07-28 01:46:06,503<PHONE_NUMBER>41360 DEBUG handlers [-] Successfully synchronized groups for user "my_username"

Are you running this on stackstorm-ha ? Wondering what's the best way to load these roles/mappings files so that the k8s jobs can register them to the DB.
cheers!


Workaround MAX_HEALTH limitations

Currently, max health is unlimited in 1.8.9, however in 1.9, there's a hard limit of the max health displayed on a client. This workaround will closely tie into health scaling to a certain point.
Note in 1.9: The maximum allowed health that both the client and server will accept is 1024.

I'm pretty sure the same limit applied in 1.8.9 and earlier.

This seems to apply to 1.8.9, I'm fairly certain that it wasn't in 1.7, can't attest for 1.8. Very strange modification, I wonder what the reason for the change was.


Add support for the Cookie HttpOnly flag

Some frontend frameworks (e.g. Angular) need to access the CSRF token in order to use it in their requests.
The HttpOnly flag allows to set the visibility to these frameworks.
For example, a configuration that works out-of-the-box with Angular (once this PR will be merged) is:
m.Use(csrf.Csrfer(csrf.Options{
        Header:         "X-XSRF-TOKEN",
        Cookie:         "XSRF-TOKEN",
        SetCookie:      true,
        CookieHttpOnly: false,
}))

cc @Unknwon

Thanks!


[enhancement] add a session manage module

Feature Request
Is your feature request related to a problem? Please describe:

Describe the feature you'd like:

After added the readwritesplitting feature, the processing of ConnAttr has been added. Currently, the attrs processed are charset, autocommit, but the processing logic is integrated in Pool, and Pool is a public component,  different databases  may also there are different session attrs, so ConnAttr should be separated from Pool.
Describe alternatives you've considered:

Add a specifiy  session manage module.
Teachability, Documentation, Adoption, Migration Strategy:

WIP,  this issue will reslove in v0.3.0.

It is useful for backend database endpoint rolling upgrade without any discruptions of applications.

In pr #274, Added Session trait and SessionMut trait.


Some tweaks to sanitizer builds.

Don't restrict to debug builds. To reproduce issues it may be
necessary to run optimized buids, particularly for TSan.

Support Android, where just -fsanitize=address results in a link error
with lld. See https://github.com/android/ndk/issues/1088

Fix a typo in cmake messages.

Nice, thanks @bjacob for improving this! :D


Improve error handling/reporting in kubernetes.go

There were several call sites that did not check the error return value.
Either propagate the error or at least log it.

There were several calls to panic in cases where an update operation failed.
It seems a bit harsh to terminate in this case and is inconsistent with the
handling of other failed CRUD operations (which previously ignored errors).
For consistency, CRUD failures now return and propagate the error.

Added format args to some log messages to provide more context

Modified the wording in some log messages for consistency

LGTM, much more detailed reporting


Hyde docs

So...they're horrendous?
I really want to like hyde, but getting anything done requires spending >30 minutes digging through source code...

+1 to move the docs into this repo

This seems to be a duplicate of #188.


Feature relationship versioning

References
Add references/links to any related issues or PRs. These may include:

Fixes #7937
Related to https://github.com/DSpace/dspace-angular/issues/1312
Related to https://github.com/DSpace/dspace-angular/pull/1624

Description
This introduces support for versioning of entities with relationships. The solution ensures the new version receives the same relationships, and the old version's relationships remain intact even if the new version is altered
A detailed description can be found at https://docs.google.com/document/d/1E7_zUse5ojI_N9hks53GS3NGboXKkxkF6ud1lPmcDP8/edit#heading=h.mqgcspv7tsrj
This is WIP, the discovery part is not ready yet
Instructions for Reviewers
When testing this functionality, it's best to use the Angular PR https://github.com/DSpace/dspace-angular/pull/1624
There are many automated tests as well.
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

[x] My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon. => Most of the code is tests
[x] My PR passes Checkstyle validation based on the Code Style Guide.
[x] My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
[x] My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
[x] If my PR includes new, third-party dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
[x] If my PR modifies the REST API, I've linked to the REST Contract page (or open PR) related to this change.

Thanks @tdonohue for your review.
I've now also merged the bug fix in to ensure the older versions are indexed in solr (and ensuring they're not returned in the search). This was a problem that blocked us from supporting the discovery relations on item pages (e.g. the publications on a person page)

I've merged the last bit of functionality in this branch
This adds the .latestForDiscovery virtual metadata documented at https://docs.google.com/document/d/1E7_zUse5ojI_N9hks53GS3NGboXKkxkF6ud1lPmcDP8/edit#
They were first named .latest
I did also update the PDF and video visualizing the .latestForDiscovery virtual metadata with more details

@tdonohue I agree we should at some point restrict what metadata can be added/removed/edited. We did also encounter this in the ORCID work, where the owner is also just a metadata field.
I think this would be a very good added value, but quite beyond the scope of this PR. We did already have to include quite some other unrelated improvements
If the metadata field doesn't exist in the registry, I believe the following happens (based on an earlier test):

The log files will spawn errors or warnings about the missing field
The discovery indexing for those fields won't work, so they can't be used for searching
But nothing major goes wrong

I will check all the inline feedback in detail as well

I would suggest, for a future patch, adding an "internal use" Boolean attribute to metadatafieldregistry, which tells the UI to disable changes to metadata values for that field and tells dspace-api to reject such changes.  IIRC we already have a few other fields that DSpace expects to manage on its own.

Thanks for all the great feedback, I've planned processing for next week

Thanks @tdonohue
I will create a PR for the contract, and will update the documentation
I did merge another change in from Bruno from our testing. I did notice that if you'd re-index discovery, you're missing the older version items in discovery. This should be fixed now (at least it works correctly for me now)

Hi @tdonohue we've analyzed the performance in detail. Most of the time is spent on determining the places of the relationships. It's possible to optimize this, but this is the most complicated part of the PR, and I don't think it's wise to redesign this so close to the release.
We've added a warning in the UI about this, and will create a ticket to optimize this afterwards (when there's enough time to thoroughly test the changes as well).
We'll also work on the documentation, I see the wiki is up again

@abollini : This PR is waiting on a re-review from you.  All your prior feedback looks to have been addressed (I just double checked). Thanks!

@benbosman : Apologies but after merging the ORCID auth PR, this PR (and the UI PR) has new merge conflicts.  This should be the next major feature to be merged if you can get it updated tomorrow.

The merge conflicts are solved, this was agreed to be merged


iTunes fetching no longer works

An error occurred while retrieving the data. This might be a temporary problem. Try again in a few minutes.

Fixed by 7d6f1d248ef311ece8e633f92002e311af6b7df4


Add tailwind styles

add tailwind variables for fonts and colors
also, fix header links

You could also add typography to the config. If you think it's too early for that though, no problem :+1:


Added support for auto-creation of conda environments

This is one possible resolution for #168 .
This PR updates the Makefile requirements target with logic for selecting package and environment managers. If conda is detected, a conda environment is created and then updated with a new environment.yml file. If conda is not detected, requirements.txt is installed with pip and then an environment is created with virtualenv as before.
The conda condition successfully creates the environment and the local package src is available in the jupyter kernel in jupyter lab. I can run the notebook cell described in #168 without an error.
I have not tested the virtualenv condition as I am unfamiliar with it's normal behavior.

Thanks for the interest in this feature @jraviotta!
We're not going to merge this as-is, since we're moving to allowing the user to pick an option rather than bundling everything together. (see #162) If you want to test the changes on that branch with your conda flow, it would be great to hear the results.


How to hide the toast manually

How to hide/dismiss the toast manually and is any provision to show the toast permanently for particular scenario.

You were not able to dismiss the toast programmatically and still keep the animation. Few moments ago I pushed some changes which add dismiss method on the GTToastView. Here is how you can use it :
var toast: GTToastView = GTToast.create("foo bar")
toast.show()

// later when you are ready
toast.dismiss()

I will release the new version of the pod and update the README later today. I will keep this issue open till then.
With regards to your second question, you can use displayInterval of the GTToastConfig. If you set it to a large value like NSTimeIntervalSince1970 it will keep the toast displayed for long enough:)

The new version of the pod (0.1.2) is now available:)


intel_adsp_cavs15: run tests/kernel/smp/ failed on ADSP

Describe the bug
run this testcase failed on ADSP
To Reproduce
Steps to reproduce the behavior:

twister -p intel_adsp_cavs15 --device-testing -T tests/kernel/smp/ --west-flash="/home/ztest/work/zephyrproject/zephyr/boards/xtensa/intel_adsp_cavs15/tools/flash.sh,/home/ztest/work/zephyrproject/modules/audio/sof/keys/otc_private_key.pem,/home/ztest/work/zephyrproject/modules/audio/sof/zephyr/ext/rimage/config,/home/ztest/work/zephyrproject/modules/audio/sof/zephyr/ext/rimage/build/rimage" --device-serial-pty="/home/ztest/work/zephyrproject/zephyr/boards/xtensa/intel_adsp_cavs15/tools/adsplog.py,--no-history"

Logs and console output

Running test suite smp
===================================================================
START - test_smp_coop_threads
PASS - test_smp_coop_threads in 0.563 seconds
===================================================================
START - test_cpu_id_threads
PASS - test_cpu_id_threads in 1.1 seconds
===================================================================
START - test_coop_resched_threads
PASS - test_coop_resched_threads in 0.301 seconds
===================================================================
START - test_preempt_resched_threads
PASS - test_preempt_resched_threads in 0.512 seconds
===================================================================
START - test_yield_threads
PASS - test_yield_threads in 0.301 seconds
===================================================================
START - test_sleep_threads
PASS - test_sleep_threads in 1.1 seconds
===================================================================
START - test_wakeup_threads
PASS - test_wakeup_threads in 0.201 seconds
===================================================================
START - test_smp_ipi
cpu num=2 PASS - test_smp_ipi in 0.301 seconds
===================================================================
START - test_get_cpu
PASS - test_get_cpu in 0.51 seconds
===================================================================
START - test_fatal_on_smp
@ WEST_TOPDIR/zephyr/tests/kernel/smp/src/main.c:654
PASS - test_fatal_on_smp in 0.1 seconds
===================================================================
START - test_workq_on_smp
wrong error reason
Assertion failed at WEST_TOPDIR/zephyr/tests/kernel/smp/src/main.c:711: test_workq_on_smp: k_work_busy_get(&work) not equal to 0
FAIL - test_workq_on_smp in 0.51 seconds
===================================================================
Test suite smp failed.
===================================================================
PROJECT EXECUTION FAILED

Environment (please complete the following information):
OS: Fedora28
Toolchain: Zephyr-sdk-0.12.3
Commit id: 5f42a3d4

It seems that the testcase is OK, in passed on up_squared platform.  It is very likely that there is a problem with the ADSP platform. We need an expert in this field to have a look.

@andyross @nashif
This issue still can be reproduced on latest commit 8e69dafccf25bc5b4015a607cdba114216c4ea0e.
DEBUG   - DEVICE: START - test_workq_on_smp
DEBUG   - DEVICE: Caught system error -- reason 0 0
DEBUG   - DEVICE: Fatal error was unexpected, aborting...
DEBUG   - DEVICE:
DEBUG   - DEVICE: Assertion failed at WEST_TOPDIR/zephyr/tests/kernel/smp/src/main.c:716: test_workq_on_smp: k_work_busy_get(&work) not equal to 0
DEBUG   - DEVICE:
DEBUG   - DEVICE: FAIL - test_workq_on_smp in 0.51 seconds


:art: Improved layout of profile.css

[x] Fixes #120
[x] tests passed
[x] Ensure all linting tests/pre-commit pass, see here for how to run them.
[x] Improved thumbnail and layout for profile.html

Codecov Report

Merging #206 (64665f5) into develop (9707d09) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #206   +/-   ##
========================================
  Coverage    84.10%   84.10%
========================================
  Files           10       10
  Lines          667      667
========================================
  Hits           561      561
  Misses         106      106

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 9707d09...64665f5. Read the comment docs.


implement multilevel clustering

see http://w.ocp.me/fg:mlc for details

num.clusters <- 1000
library(FlashGraphR)
fg.set.conf("flash-graph/conf/run_ssds.txt")
vecs <- fm.read.obj(file="/mnt/store_raid/zhengda/friendster-lcc.acd.LM40.1e-6.evecs")
col3 <- fm.get.cols(vecs, 1:3)
r.col3 <- fm.conv.FM2R(col3)
vals <- fm.conv.FM2R(fm.read.obj(file="/mnt/store_raid/zhengda/friendster-lcc.acd.LM40.1e-6.evals"))[1:3]
ase <- r.col3 %*% diag(abs(as.vector(vals)))
sXhat <- ase / sqrt(rowSums(ase^2))
kmeans.res <- fg.kmeans(sXhat, num.clusters, max.iters=100, init="random")
fg <- fg.load.graph("/mnt/store_raid/zhengda/friendster-lcc.adj-v4",
"/mnt/store_raid/zhengda/friendster-lcc.index-v4")
large.ccs <- c()
clusters <- kmeans.res$clusters
for (cluster.id in 1:num.clusters) {
clusterV <- which(kmeans.res$cluster==cluster.id)
if (length(clusterV) == 0)
next
sub.fg <- fg.fetch.subgraph(fg, vertices=clusterV - 1, compress=FALSE)
cat("subg #V:", fg.vcount(sub.fg), ", #E:", fg.ecount(sub.fg), "\n")
sub.cc <- fg.clusters(sub.fg, mode="weak")
clusters[clusterV] <- sub.cc[clusterV]
counts <- as.data.frame(table(sub.cc[sub.cc >= 0]))
lcc.id <- as.integer(levels(counts$Var1)[which.max(counts$Freq)])
if (max(counts$Freq) > 100)
	large.ccs <- c(large.ccs, lcc.id)
cat("subg #components:", length(counts$Var1), ", lcc size:",
	sum(sub.cc == lcc.id), ", #isolates:", sum(sub.cc == -1), "\n")
# lcc.fg <- fg.fetch.subgraph(sub.fg, vertices=)
cat("There are ", length(unique(clusters)), " clusters\n")

}
After the first level of clustering, there are  747132  clusters and 13339033 isolates.

sort(counts$Freq, decreasing=TRUE)[1:32]
[1] 13339033 10195563  5601838  5083333  5069569  4424942  3407606  3167767
[9]  1633000  1393512  1284523  1224135  1043562   862317   765394   724106
[17]   625693   599665   487171   463300   424429   391567   369165   296935
[25]   274296   234340     1996      361      321      318      313      257

this is great da!
to clarify, you set num.clusters to 1000,
but found 747132 connected components in the induced subgraphs of the
resulting clusters?
can you clarify:

how many clusters had > 0 vertices (this number must be less than 1000)
how many cc's from the induced subgraphs of those clusters?
how many of the cc's had > 100 vertices?

On Sunday, March 1, 2015, Da Zheng<EMAIL_ADDRESS>wrote:

num.clusters <- 1000
library(FlashGraphR)
fg.set.conf("flash-graph/conf/run_ssds.txt")
vecs <-
fm.read.obj(file="/mnt/store_raid/zhengda/friendster-lcc.acd.LM40.1e-6.evecs")
col3 <- fm.get.cols(vecs, 1:3)
r.col3 <- fm.conv.FM2R(col3)
vals <-
fm.conv.FM2R(fm.read.obj(file="/mnt/store_raid/zhengda/friendster-lcc.acd.LM40.1e-6.evals"))[1:3]
ase <- r.col3 %*% diag(abs(as.vector(vals)))
sXhat <- ase / sqrt(rowSums(ase^2))
kmeans.res <- fg.kmeans(sXhat, num.clusters, max.iters=100, init="random")
fg <- fg.load.graph("/mnt/store_raid/zhengda/friendster-lcc.adj-v4",
"/mnt/store_raid/zhengda/friendster-lcc.index-v4")
large.ccs <- c()
clusters <- kmeans.res$clusters
for (cluster.id in 1:num.clusters) {
clusterV <- which(kmeans.res$cluster==cluster.id)
if (length(clusterV) == 0)
next
sub.fg <- fg.fetch.subgraph(fg, vertices=clusterV - 1, compress=FALSE)
cat("subg #V:", fg.vcount(sub.fg), ", #E:", fg.ecount(sub.fg), "\n")
sub.cc <- fg.clusters(sub.fg, mode="weak")
clusters[clusterV] <- sub.cc[clusterV]
counts <- as.data.frame(table(sub.cc[sub.cc >= 0]))lcc.id <- as.integer(levels(counts$Var1)[which.max(counts$Freq)])
if (max(counts$Freq) > 100)
large.ccs <- c(large.ccs, lcc.id)
cat("subg #components:", length(counts$Var1), ", lcc size:",
sum(sub.cc == lcc.id), ", #isolates:", sum(sub.cc == -1), "\n")
lcc.fg <- fg.fetch.subgraph(sub.fg, vertices=)
cat("There are ", length(unique(clusters)), " clusters\n")
}
After the first level of clustering, there are 747132 clusters and
13339033 isolates.
sort(counts$Freq, decreasing=TRUE)[1:32]
[1] 13339033 10195563 5601838 5083333 5069569 4424942 3407606 3167767
[9] 1633000 1393512 1284523 1224135 1043562<PHONE_NUMBER>94 724106
[17]<PHONE_NUMBER>65<PHONE_NUMBER>00<PHONE_NUMBER>67<PHONE_NUMBER>35
[25]<PHONE_NUMBER>40 1996 361 321 318 313 257
—
Reply to this email directly or view it on GitHub
https://github.com/icoming/FlashGraph/issues/92#issuecomment-76602427.

--
the glass is all full:  half water, half air.
openconnecto.me, we're hiring!
https://docs.google.com/document/d/14SApYAzxF0Ddqg2ZCEwjmz3ht2TDhDmxyZI2ZP82_0U/edit?usp=sharing
, jovo.me, my calendar
https://www.google.com/calendar/embed?src=joshuav%40gmail.com&ctz=America/New_York

The result from my previous run may not be so meaningful, because I didn't use the right dimension for clustering and kmeans didn't converge.
I tried to perform spectral clustering on the 20 largest connected components from the first spectral clustering on the original graph. It ran for one night and still didn't finish.
There are a few problems in this approach from the perspective of the implementation:

we don't have a very fast eigensolver;
we don't have a very fast kmeans implementation;
we need to determine the right number of dimension and clusters, which makes it even more computationally expensive.

The first two are the main problems that prevent us from clustering the graph hierarchically right now. We should wait until we get the eigensolver from trilinos and implement a faster kmeans before proceeding this approach.
I'll keep my current implementation as demo code in FlashGraphR.

ok.  if we want to submit a "machine learning on SSDs" paper, we cannot do
it without an eigensolver and kmeans.
so, i don't know how you want to prioritize things....
On Tue, Mar 3, 2015 at 9:16 AM, Da Zheng<EMAIL_ADDRESS>wrote:

The result from my previous run may not be so meaningful, because I
didn't use the right dimension for clustering and kmeans didn't converge.
I tried to perform spectral clustering on the 20 largest connected
components from the first spectral clustering on the original graph. It ran
for one night and still didn't finish.
There are a few problems in this approach from the perspective of the
implementation:

we don't have a very fast eigensolver;
we don't have a very fast kmeans implementation;
we need to determine the right number of dimension and clusters, which
makes it even more computationally expensive.

The first two are the main problems that prevent us from clustering the
graph hierarchically right now. We should wait until we get the eigensolver
from trilinos and implement a faster kmeans before proceeding this approach.
I'll keep my current implementation as demo code in FlashGraphR.
—
Reply to this email directly or view it on GitHub
https://github.com/icoming/FlashGraph/issues/92#issuecomment-76952593.

--
the glass is all full:  half water, half air.
openconnecto.me, we're hiring!
https://docs.google.com/document/d/14SApYAzxF0Ddqg2ZCEwjmz3ht2TDhDmxyZI2ZP82_0U/edit?usp=sharing
, jovo.me, my calendar
https://www.google.com/calendar/embed?src=joshuav%40gmail.com&ctz=America/New_York

I'm implementing a new system called FlashR. As you can see from the name, it is an R system that stores data on SSDs. Users will use it like traditional R, but the backend of the system will perform automatic parallelization and handle data access on SSDs. With this system, we can implement the basic kmeans easily (less than 10 lines of R code) and the R implementation will very likely have the same performance as the highly optimized C implementation. You can also easily tweak the implementation.
FlashR is a very large project. It needs a few more operators and requires a lot of optimizations to get its best performance. I have implemented part of it and now the eigensolver is actually implemented in FlashR. I also implemented some operators such as inner product for dense matrix and apply for vectors.
Right now, my first priority is to prepare for the SuperComputing paper. To write this paper, I'll highly optimize two operations required by FlashR: sparse matrix vector multiplication and sparse matrix dense matrix multiplication. It's unclear what else should be included in the paper given the limited amount of time.
After this paper, I'll implement the remaining operators such as tapply and apply so that we can implement more applications such as kmeans easily. It may take a few months to implement all operators and some of the optimizations. Once it's complete, we can have many more people to implement machine learning algorithms. Actually, it'll be much easier for us to get a large collection of machine learning algorithms in this way.
When FlashR gets to a relatively complete form, I'll start to look into integration with Trilinos. I'll start with its eigensolver, which is probably the component we want the best. I'll also check other components.
This is my current roadmap. I think my main role is designing and developing FlashR. My another role may be to convince more people to develop machine learning algorithms for us :)


💥 Public API improvements

🏁 Motivation

To make the SDK look cool encourage the Functional Programming.
Inspired by Highland.js and RxJS when I was surveying for how to build complicated web-like pipelines with NodeJS Stream.

Web-like pipelines are depicted as the following graph.

The concept of pipeline is actually a nested structure of Transform stream. Some useful utilities can be found at htoooth/mississippi2.

               E
             /
      B - D
   /          \
A               F - G
   \          /
        C

👷 Role
The position of the SDK is as an event source to notify about the CQHTTP events and a library to provide convenient methods to call CQHTTP APIs.
The role as an event source can have several ways to deliver events, which can serve for a variety of developer's favor.
🛠 Todo

[ ] Performance test and analysis for legacy work.

[ ] 🌊 Provide proper support for Stream API; with Stream API support, users can gain better integration with popular libraries like Highland.js.

[ ] 🔍 Provide proper support for Observable API; with Observable API support, users can gain better integration with popular libraries like RxJS.

[ ] Improve connection state management. (To improve stability to solve #53)

[ ] Introduce namespace to provide convenience filters.

[ ] Introduce middleware API to handle events from CoolQ, leave original Event API to low-level events only.

Legacy code base is checked out into branch v2. Development will be conducted on branch dev.
Development style will have TDD a try, spec files will be written asap.


[Enhancement] add check if vol has available space before create data partition

Add check if vol has available space before create data partition
so that creating new data partition manually or automatically is not allowed when vol usage reaches its capacity.

hi @sejust, Conflict has been fixed, please review again

Codecov Report

Merging #1675 (fc846c4) into master (62ae8e8) will increase coverage by 0.06%.
The diff coverage is 37.03%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##           master    #1675      +/-   ##
==========================================
+ Coverage   48.17%   48.23%   +0.06%
==========================================
  Files         454      454
  Lines       79350    79363      +13
==========================================
+ Hits        38226    38282      +56
+ Misses      38102    38060      -42
+ Partials     3022     3021       -1

Impacted Files
Coverage Δ

master/cluster.go
45.88% <33.33%> (-0.06%)
:arrow_down:

master/vol.go
64.03% <35.00%> (-0.24%)
:arrow_down:

master/api_service.go
28.62% <100.00%> (ø)

... and 11 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


fix indentations in all workflows and try to fix CodeQL

The CodeQL workflow is not able to automatically build and so I am going to have to substitute a custom build into the workflow and see if that fixes the problem.