fix #490 bug

What is the purpose of the change
see #490
Brief changelog
1.修复"健状性"中文描述错误
Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Make sure there is a GITHUB_issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[ ] Format the pull request title like Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Test your code locally by running docsite start, and make sure it works as expected.
[ ] Make sure no files under build directory is added.
[ ] If this contribution is large, please follow the Software Donation Guide.

thanks for your contribution


create library and refactor code and change it to OOP...

Hello @fisothemes,
congratulations for spreading your work, I think it is the right way to improve.
I liked your idea implementing timers...
Would you like me to create a single FB that groups them all..., refactoring the code and passing it to the OOP paradigm and also create a timer library...
Tell me if you are interested and we can do it collaborating or I do it and see if you like it...
I wait your answer...

Hello @runtimevic,
That sounds nice, I would be happy to collaborate or see what you come up with.
Thanks for the taking an interest and for contributing,

Hi @runtimevic
Thanks again, I though it would be helpful to share some background and my thought process on the matter.
Timer Library:
I previously created a library the first version is tagged v<IP_ADDRESS>.
Bundling timers into a single FB and bringing it into line with OOP:
When I first started, I thought about doing this. The reason why I didn't group them all into a single FB was because I wanted make the use of the timers familiar by basing them on those found in the Tc2_Standard library. It also made refactoring old code easy.
Bundling them into a single OOP FB would be nice. I'm having a think as to how it would can be done in a way that is friendly for devs new and old alike (Similar to FB_Timer were parameters are descriptive and it works in similar way to general consumer hardware timers or timers you have on your mobile device).
I'm interested in what you have so far. Nothing has been set stone so I am open to anything.
Refactoring:
I did think about coming back and refactoring the code as this made on my early journey to learning PLC programming, but I had my hands full with other projects specifically a TwinCAT ADS client for LabVIEW.

Hello @fisothemes
I think that it is best to reach consensual agreements between the 2:

The first issue that I would like to raise is that there is no normalization of the names of the input variables, outputs...

VAR_INPUT
	IN 	: BOOL; // Starts timer with falling edge, resets timer with rising edge
	PT 	: TIME; // Time to pass, before Q is set
END_VAR
VAR_INPUT
        bStart 		: BOOL; // Start (TRUE) or Stop (FALSE) Timer
	bPause 		: BOOL; // Pause Timer (TRUE), Only Pauses if IN := TRUE
        tSet		: TIME; // Set Time
END_VAR
VAR_OUTPUT
	Q 	: BOOL; // is FALSE, PT seconds after IN had a falling edge
	ET 	: TIME; // Elapsed time
END_VAR
VAR_OUTPUT
    bElapsed 	: BOOL;	// Becomes TRUE after Set Time has passed
    tElapsed 	: TIME; // Time Elapsed
END_VAR

I think we should unify the names of the variables, tell me which of the 2 forms do you like the most? for us to change it...

I think we should stick to the PLC programming convention used by Beckhoff, they already have pre-built Static Analysis configuration file, which saves us the headache of producing our own and makes reviews easier. The downloads for the config files are found in the link I gave.
VAR_INPUT
        bStart 	: BOOL; // Start (TRUE) or Stop (FALSE) Timer
	bPause 	: BOOL; // Pause Timer (TRUE), Only pauses if bStart := TRUE
        tSet 	: TIME; // Set Time
END_VAR

I think we should stick to the PLC programming convention used by Beckhoff, they already have pre-built Static Analysis configuration file, which saves us the headache of producing our own and makes reviews easier. The downloads for the config files are found in the link I gave.
VAR_INPUT
        bStart 	: BOOL; // Start (TRUE) or Stop (FALSE) Timer
	bPause 	: BOOL; // Pause Timer (TRUE), Only pauses if bStart := TRUE
        tSet 	: TIME; // Set Time
END_VAR

so what do you think is better?
bStart or IN?

bStart

I think we should stick to the PLC programming convention used by Beckhoff, they already have pre-built Static Analysis configuration file, which saves us the headache of producing our own and makes reviews easier. The downloads for the config files are found in the link I gave.
VAR_INPUT
        bStart 	: BOOL; // Start (TRUE) or Stop (FALSE) Timer
	bPause 	: BOOL; // Pause Timer (TRUE), Only pauses if bStart := TRUE
        tSet 	: TIME; // Set Time
END_VAR

so what do you think is better?
bStart or IN?

I think we should do without the Hungarian notation, do you agree?
let me give these symbol hints:
Start, PreSet, Done, Elapsed.
What do you think...

bStart

I think we should do without the Hungarian notation, do you agree?
let me give these symbol hints:
Start, Pause, PreSet, Done, Elapsed.
What do you think...

Yh I personally don't like it either, but in terms of PLC programming it's pretty but a thing to overcome the pitfalls of the language and it's implementations such as being case insensitive, difficult to read in plain text (metadata everywhere on the file) and potential clashes with reserved keyword, local enums and Tc2 stuff.

We have to decide with or without Hungarian notation?  bStart or Start?

With. So bStart unfortunately

With. So bStart unfortunately

So we stay with these symbols to unify everything the same?
bStart, bPause, tPreSet, bDone, tElapsed.
Or
biStart,biPause,tiPreSet,boDone,toElapsed.

bStart, bPause, tPreSet, bDone, tElapsed.
We'll stick with Beckhoff's conventions, https://infosys.beckhoff.com/english.php?content=../content/1033/tc3_plc_intro/12073947403.html&id=3338831657965116106

https://alltwincat.com/2019/02/11/plc-naming-conventions/

Adding i/o prefixes:
Yh that's a bit much, i can also be easily mistaken for int. Adding stuff like li, di, ui, etc. will hamper refactoring efforts on number types, ui is a bad idea for obvious reasons.
Passing as OOP:
I can do the refactoring myself this evening if you haven't already.  Or you can put in what you have now and later I'll scan through it and refactor as well as do the documentation.
I'm pretty much happy with everything else.

Give me a few days and I'll send you the changes so you can see what you think...

I have sent you a version, tell me what you think?,
but I think it can be improved by using POINTER and NEW for the list of timers, in this way you would not have the entire list of timers...

I'm gonna run some tests them give me a moment.

I have sent you a version, tell me what you think?, but I think it can be improved by using POINTER and NEW for the list of timers, in this way you would not have the entire list of timers...
https://twincontrols.com/community/twincat-knowledgebase/factory-method-design-pattern/#post-470
Tomorrow if I have time I'll try it and if it works I'll send you a new version...

I love the idea of a polymorphic timer. I can see this coming in handy in situations when you have to create dynamic timers. One suggestion would be to add a type property to the base Timer class. It will allow for some introspection which will be be handy for situation like these:
fbTimerCollection
	.Insert(fbRStopwatch)
	.Insert(fbRTimer);
fbTimerCollection.Get(14, ipTimer => ipTimer);

CASE ipTimer.Timer_Type OF
	E_Timer_Type.Stopwatch:
		// Do something
	E_Timer_Type.RTimer:
		// Do something
ELSE
	// Default
END_CASE

I use this pattern regularly when creating steps for sequencers and retentive timers ensure that a process has actually run it's course, even if it is paused.
fbSequence
	.Insert(11, fbPurgeStep)
	.Insert(0, fbInitStep);
	.
	..
	...

Another thing is to probably reduce the use of REF=
fbRStopwatch.Input REF= stInput;
fbStopwatch.Input REF= stInput;

fbRStopwatch.Run();
fbStopwatch.Run();

stROutput := fbRStopwatch.Output;
stOutput := fbStopwatch.Output;

This could cause unintended side-effects especially when working with dynamic memory. My one big gripe with Beckhoff at the moment is that they haven't fixed the STRUCT access bug Codesys fixed a long time ago, the one were that makes the compiler throw the towel when you try to access properties that are structs and methods that return structs. One way I solve this is by replacing STRUCTs with FB's with only properties. Aside from the 4-16bytes that are object headers mainly used for RPCs, they're the same in memory.
Tomorrow, if I have time, I might investigate what happens when <Timer Instance>.FB_Init(E_Timer_Type.<type>) is called multiple times during a run and pen a few designs ideas trying to make all timers work in unison without having to instantiate a new one for each timer type.
Overall, I like the idea and I have learnt quite a bit. Also, I didn't even know about the twincontrols website, thanks for that, And thanks again for contributing.

Hello @fisothemes

I just sent you a new version, I hope you like it and enjoy learning new things..
I have not been able to work with POINTER and using __NEW I have left the code commented in case you want to try it....
I think you should refactor the instructions of the FB_RStopwatch, it can be made easier..., I'll leave it to you...
There are things that I would change..., I think you can reduce the types of timers you have now that there are 7..., FB_Timer and FB_Stopwatch could become one...
You still need to add to your project the timers such as: FB_TOF, FB_TON, FB_RTP without using the ones from the Beckhoff library TOF, TON, RTP...

You will tell me...

Hello @fisothemes
I have already sent the last changes, tell me what you think, you have an example of use with everything in the main...
I would like to start with the unit tests..., we must choose what we do them with...

Hello,
Sorry for the late reply I caught up in a lot of things.
Thanks for the contributions, I put your name in the MIT license, if you don't mind.
I'm trying to get up to speed with the changes you made. I like the changes so far. I didn't know you could access members of structs in property structs by using REFERENCE TO ST_Struct. In the past the compiler used always throw an error.

I would like to start with the unit tests..., we must choose what we do them with...

There are 4 things I checked for when running the timers to ensure that they run correctly.

I check that the retentive timers run the same as their non-retentive variants under normal conditions such as a plc task with a 1ms cycle tick with a pre-set of 1m.
I check if the r-timers behave correctly if the division between the cycle tick and pre-set is irrational, e.g. cycle tick is 44s for a pre-set of 1m.
I check if the r-timers retain the time if they're not called by a for a period of timer in plc cycle.
I check if the r-timers behave correctly if they called multiple times in the same cycle.

Writing unit tests for this might be tricky.


go mod verify should consider the vendor directory instead of only the modules cache

What version of Go are you using (go version)?

$ go version
go version go1.17 darwin/amd64

Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/x4e5/Library/Caches/go-build"
GOENV="/Users/x4e5/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/x4e5/go/pkg/mod"
GONOPROXY="gitlab.com/theuberlab/common-go"
GONOSUMDB="gitlab.com/theuberlab/common-go"
GOOS="darwin"
GOPATH="/Users/x4e5/go"
GOPRIVATE="gitlab.com/theuberlab/common-go"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.17/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.17/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.17"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/x4e5/go/src/gitlab.nordstrom.com/devx/chef/ramsay-ci-utils/ramrun/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/z3/9z_2ck8j75v140khy_ycq455wd7x89/T/go-build1758182581=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?
wrote some go code with third party dependencies.
initialized go module
performed go mod download
hand edited a go file under the vendor directory and added a new function
ran go mod verify
What did you expect to see?
An error that the contents of my dependency didn't match it's hash
What did you see instead?
$ go mod verify
all modules verified

Duplicate of #27348

Ah, missed that one when I searched issues. Apologies for the noise.


Failed syncing nested fields with Strapi plugin

Discussed in https://github.com/meilisearch/meilisearch/discussions/2388

Originally posted by pedrogaudencio May 11, 2022
Hi there!
I’m having an issue when I update a collection-type entry that is nested inside a component/single type/collection. Not sure if this case is already referenced but I couldn't find it anywhere.
Example:

Create an Author collection type entry -> Meilisearch plugin creates an Author document;
Create an Article collection type entry, add an Author collection type field inside the repeatable component AuthorsList in the Article -> Meilisearch plugin creates an Article document with its nested fields;
Update the Author entry -> Meilisearch plugin updates the Author document;
Meilisearch plugin does not update the Author entry inside the nested fields in the Article document.

As a workaround, (in this example) I thought of creating an afterUpdate() lifecycle hook in the Author triggering the Article document update by calling the Meilisearch plugin controller. Is there a better way to do this? If not, is there an example to call the document update from the Meilisearch plugin?
Using:

Meilisearch v0.27.0 docker image
Strapi v4.1.1
Meilisearch Strapi Plugin 0.6.2

Thank you! :)

@oluademola I'm guessing along with the collection type update there could be a way to specify rules for populate including various component or relation fields by passing an array of attribute names as described in the documentation:
const entries = await strapi.entityService.findMany('api::article.article', {
  populate: ['componentA', 'relationA', 'componentB.relationC']
});

Maybe it could be extended from #410 latest additions. Would pass in custom parameters from the settings - as proposed in #423 - while having '*' as a default fallback solve this?

It's on its way!

@oluademola

Meilisearch plugin does not update the Author entry inside the nested fields in the Article document.

Unfortunately we are bound to the triggers of Strapi to update documents.
What is happening when you link a collection to meilisearch
On Article:

Adds all Article to an index called article in Meilisearch
Subscribe the Article collection to the Strapi's hook

Now every time an action is done on an Article, it will enter the associated hook (afterUpdate or afterCreate, ...).
On Author:

Adds all Author to an index called author in Meilisearch
Subscribe the Author collection to the Strapi's hook

Now every time an action is done on an Author, it will enter the associated hook (afterUpdate or afterCreate, ...).
 Relationships do not trigger the associated documents. If authors update it will not trigger the associated Articles and vice versa.

I thought of creating an afterUpdate() lifecycle hook in the Author triggering the Article document update by calling the Meilisearch plugin controller

I'm not sure this is possible.
A possible solution would be to create a setting childOf or relationshipWith which on a trigger (afterUpdate, afterCreate, ...) will make a call to the database to find every related member and update them as well.
For example, the settings of Author, we add a field childOf: "Article". Now, image we update an Author with id 1, in the hook we make a call to the database to find all Articles that have a relation with the Author with id 1. We proceed to update them all in Meilisearch.
What do you think?
@pedrogaudencio
Unfortunately this does not solve the issue. If an author is updated, even with the custom populate it will only update the author not the associated article.

Hi @pedrogaudencio

A possible solution would be to create a setting childOf or relationshipWith which on a trigger (afterUpdate, afterCreate, ...) will make a call to the database to find every related member and update them as well.
For example, the settings of Author, we add a field childOf: "Article". Now, image we update an Author with id 1, in the hook we make a call to the database to find all Articles that have a relation with the Author with id 1. We proceed to update them all in Meilisearch.

Have you considered trying out this workaround?

Thanks for the follow up.

A possible solution would be to create a setting childOf or relationshipWith which on a trigger (afterUpdate, afterCreate, ...) will make a call to the database to find every related member and update them as well.
For example, the settings of Author, we add a field childOf: "Article". Now, image we update an Author with id 1, in the hook we make a call to the database to find all Articles that have a relation with the Author with id 1. We proceed to update them all in Meilisearch.

@bidoubiwa @oluademola you're suggesting implementing childOf or relationshipWith as a setting in the plugin, correct? Can this be done the same way as #427 by introducing a new task within actionInBatches?

Another possibility which may open more possibilities is to add the hooks as a setting. We could add the following as settings:

afterCreate
afterUpdate
afterDelete

Which would trigger at the end of the current hook. To take back the example of Author and Article.
I update an Article, first it triggers the current afterUpdate hook.
afterCreate(result) {
    // 1. adds the Article to Meilisearch
    // ...
    // 2. Runs the hook defined in the plugins settings
   pluginsConfig.afterCreate(result)
}

// In the settings:
module.exports = {
  meilisearch: {
    config: {
      article: {
        async afterCreate(result) {
             // fetches the authors related to the updated article
             const authors = await contentTypeService.getEntries(...)

             // Updates the authors
             await meilisearch
              .updateEntriesInMeilisearch({
                contentType: "author",
                entries: [authors],
              })
            }
        },
      }
    }
  },
}

With this solution we are not limited by the deepness of a relation or the type of the relation. A user can decide how the update of one content-type affects another one in Meilisearch.
Btw this is already possible using the hooks provided by Strapi. You add a custom hook in your application in which you update whatever related entry/content-type in Meilisearch.

Those suggestions all seem very interesting. Do you know if there's already something in place?
await meilisearch
  .updateEntriesInMeilisearch({
    contentType: "author",
    entries: [authors],
  })

This was kinda what I was aiming towards with my suggestion of triggering the parent document update by calling the Meilisearch plugin controller. As you say, this is possible using the hooks provided by Strapi and probably the cleanest solution at this point. Although it's likely that the entry data won't pass through transformEntry() when we bypass the plugin and call meilisearch.updateEntriesInMeilisearch()...

I think you can call have access to transformEntry by using the strapi API like this:
strapi.config.get('plugin.meilisearch')

I'm actually having this issue right now and look pretty complicate it to working around it ourselves.  In my case I have events  with tickets.
Events {
...
tickets:[many tickets]
...
}
if a customer buy a ticket I need to update the quantity of the specific ticket that have been bought. Right now the only workaround I can think of is a for for all the tickets of the event until I find the one I need to update change it and call the Meilisearch API  updating the event document with all the array of tickets as I cannot just update one of the ticket myself.
have you consider kind of a re-index function by ID? i.e meilisearchPlugin.reindexById('/indexes/events', eventID) and with that trigger a whole refresh as it does when you save the event on the strapi dashboard.

have you consider kind of a re-index function by ID? i.e meilisearchPlugin.reindexById('/indexes/events', eventID) and with that trigger a whole refresh as it does when you save the event on the strapi dashboard.

Do you mean that if someone buys a ticket, you'd like the whole event index to be re-indexed or only the events that have a relationship with the ticket that has been bought?
A possibility for you instead of changing the code of the plugin is to create your own trigger and subscribe your ticket collection to it. See doc.
Which would look roughly like this:
// The file goes here:
// ./src/api/[api-name]/content-types/ticket/lifecycles.js

module.exports = {
  afterCreate(event) {
    const { result, params } = event;

     // fetch all the events that have a relationship with the `ticket` that has been added
     // see this doc: https://docs.strapi.io/dev-docs/api/entity-service/crud#findmany
    const events = await strapi.entityService.findMany(
      'events',
      {
      // add the tickets to the events returned
      // I suppose something like this
       populate: ["tickets"],
        // add the filter to only include the entries containing the ticket
       // I suppose something like this
        filters: { "tickets.id" : { $eq : result.id }
      }
    )
    const eventsId = events.map(event => event.id)

     const meilisearch = strapi.plugin('meilisearch').service('meilisearch');
    meilisearch
        .updateEntriesInMeilisearch({
           contentType: contentType,
           entries: [eventsId],
        })
    // do something to the result;
  },
};

have you consider kind of a re-index function by ID? i.e meilisearchPlugin.reindexById('/indexes/events', eventID) and with that trigger a whole refresh as it does when you save the event on the strapi dashboard.

Do you mean that if someone buys a ticket, you'd like the whole event index to be re-indexed or only the events that have a relationship with the ticket that has been bought?

I meant just the documents that have a relationship with this ticket not the entire index.
Your solution seams plausible for this scenario, but not scalable for the long term as a document (i.e: event) can have multiple relationship  and it would imply a lot of manual work to modify every lifecycle per each relationship, and we are just talking about one contentType / index on small apps you might have dozens indexes with tons of relationships, not even considering large applications, that what I think some kind of automation on the plugin would be interesting so that if any of the nested field of a document get updated get the document updated to.
Thanks a lot for your answer and suggestion!!

Based on this discussion I started working on a lifecycle hook for my specific use case that I then refactored into being slightly more generic:
async function updateRelationsInMeilisearch({ model, result, params }) {
  const meilisearchPlugin = strapi.plugin('meilisearch');
  const store = meilisearchPlugin.service('store');
  const meilisearch = meilisearchPlugin.service('meilisearch');
  const indexedContentTypes = await store.getIndexedContentTypes();

  const relationsToUpdate = Object.entries(model.attributes).reduce((acc, [ key, value ]) => {
    if (value.type === 'relation' && indexedContentTypes.includes(value.target)) {
      const contentType = value.target;
      acc.push({ key, contentType });
    }
    return acc;
  }, []);

  relationsToUpdate.forEach(async ({ key, contentType }) => {
    const ids = Object.values(params.data[key]).reduce((acc, entry) => {
      return acc.concat(entry.map(item => item.id));
    }, [])

    if (ids.length === 0) {
      return;
    }

    const entries = await strapi.entityService.findMany(
      contentType,
      {
        populate: '*',
        filters: {
          id: ids,
        },
      }
    );

    meilisearch.updateEntriesInMeilisearch({
      contentType,
      entries,
    });
  });
}

In a nutshell:
It first checks the attribute definitions of the underlying model and finds attributes that are in indexed by meilisearch.
For every indexed relationship, the changed ids (stored in connect/disconnect attributes) are being extracted.
For these, the complete models are then fetched from strapi and then pushed to meilisearch.
This could be used to register programmatically global in lifecycle hooks, and then perform the necessary updates of associated models when needed.
@bidoubiwa What do you think?

Hi @20x-dz I'm not an expert on this plugin as @bidoubiwa, but I think you have something very promising, I will be glad to review a PR if you publish one. This seems to be a common issue here.
Also, I didn't check your code entirely but what will happen when you have circular dependencies?
Like a user has many users "friends"  (not sure if that's possible in strapi, but in any case, I'm curious 😅)


2531 HateoasSortHandlerMethodArgumentResolver should append * to the …

Fix for #2531

The goal should be to raise the pull request on the original repository.
At least, tests are missing.

@motofix please open immediatly a PR on https://github.com/spring-projects/spring-data-commons

Done
https://github.com/spring-projects/spring-data-commons/pull/2945


Make bench file not need by pecl package

Fixes failures like this in dd-trace-php: https://app.circleci.com/pipelines/github/DataDog/dd-trace-php/16600/workflows/31d2931c-8a5b-449c-bc12-d911585b2ddb/jobs/4698215

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.21%. Comparing base (a2757e9) to head (3bad8e7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #530   +/-   ##
=======================================
  Coverage   70.21%   70.21%
=======================================
  Files         206      206
  Lines       27815    27815
=======================================
  Hits        19530    19530
  Misses       8285     8285

Components
Coverage Δ

crashtracker
16.86% <ø> (ø)

datadog-alloc
98.73% <ø> (ø)

data-pipeline
51.15% <ø> (ø)

data-pipeline-ffi
0.00% <ø> (ø)

ddcommon
86.41% <ø> (ø)

ddcommon-ffi
75.31% <ø> (ø)

ddtelemetry
59.02% <ø> (ø)

ipc
84.13% <ø> (ø)

profiling
78.68% <ø> (ø)

profiling-ffi
58.26% <ø> (ø)

serverless
0.00% <ø> (ø)

sidecar
35.64% <ø> (ø)

sidecar-ffi
0.00% <ø> (ø)

spawn-worker
54.98% <ø> (ø)

trace-mini-agent
70.93% <ø> (ø)

trace-normalization
98.24% <ø> (ø)

trace-obfuscation
95.73% <ø> (ø)

trace-protobuf
77.16% <ø> (ø)

trace-utils
89.91% <ø> (ø)


Phial Errors  Missing parameters. Automagic routing needs 3 parameters.

$app->route('/test/:name', function() use($app) {

    // render a template with data
    return $app->render('welcome');

});

visit http://localhost/test/john
Phial Errors  Missing parameters. Automagic routing needs 3 parameters.

Hi, you are missing the $name variable in your closure declaration.
So Phial, is not recognizing the url routing.
Try changing this:
$app->route('/test/:name', function($name) use($app) {
// render a template with data
return $app->render('welcome');

});


PHOENIX-6471 Revert PHOENIX-5387 to remove unneeded CPL 1.0 license

Revert "PHOENIX-5387 - Added LICENSE message for phoenix-pherf's use of system-rules"
This reverts commit 9f2274bcd6cc272a5bb462a63aabb46956c4a79b.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
1m  2s
Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s
No case conflicting files found.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

_ master Compile Tests _

+0
hbaserecompile
6m 43s
HBase recompiled.

_ Patch Compile Tests _

+0
hbaserecompile
6m 35s
HBase recompiled.

+1 :green_heart:
shellcheck
0m  0s
There were no new shellcheck issues.

+1 :green_heart:
shelldocs
0m  4s
There were no new shelldocs issues.

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

_ Other Tests _

-1 :x:
asflicense
0m 24s
The patch generated 614 ASF License warnings.

15m 33s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1235/1/artifact/yetus-general-check/output/Dockerfile

GITHUB PR
https://github.com/apache/phoenix/pull/1235

Optional Tests
dupname asflicense shellcheck shelldocs

uname
Linux 5e5fc7432390 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev/phoenix-personality.sh

git revision
master / eeebc8e

asflicense
https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1235/1/artifact/yetus-general-check/output/patch-asflicense-problems.txt

Max. process+thread count
96 (vs. ulimit of 30000)

modules
C: . U: .

Console output
https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1235/1/console

versions
git=2.7.4 maven=3.3.9 shellcheck=0.7.0

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.


Every time during training I get this error

Checks

[X] This template is only for usage issues encountered.
[X] I have thoroughly reviewed the project documentation but couldn't find information to solve my problem.
[X] I have searched for existing issues, including closed ones, and couldn't find a solution.
[X] I confirm that I am using English to submit this report in order to facilitate communication.

Environment Details
win 11, rtx 3060 12g
Steps to Reproduce
pip install torch==2.3.0+cu121 torchaudio==2.3.0+cu121 --extra-index-url https://download.pytorch.org/whl/cu121

Every time during training I get this error
✔ Expected Behavior
train
❌ Actual Behavior
Epoch 2/100:  95%|#########5| 1001/1049 [01:05<?, ?step/s]
Traceback (most recent call last):
  File "C:\Users\User\Documents\Work\F5-TTS\src\f5_tts\train\finetune_cli.py", line 174, in <module>
    main()
  File "C:\Users\User\Documents\Work\F5-TTS\src\f5_tts\train\finetune_cli.py", line 167, in main
    trainer.train(
  File "C:\Users\User\Documents\Work\F5-TTS\src\f5_tts\model\trainer.py", line 295, in train
    for batch in progress_bar:
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\tqdm\std.py", line 1181, in __iter__
    for obj in iterable:
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\accelerate\data_loader.py", line 552, in __iter__
    current_batch = next(dataloader_iter)
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\torch\utils\data\dataloader.py", line 631, in __next__
    data = self._next_data()
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\torch\utils\data\dataloader.py", line 1346, in _next_data
    return self._process_data(data)
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\torch\utils\data\dataloader.py", line 1372, in _process_data
    data.reraise()
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\torch\_utils.py", line 705, in reraise
    raise exception
soundfile.LibsndfileError: <exception str() failed>

have you do pip install -e .?
maybe also check for libsndfile, e.g. conda install -c conda-forge libsndfile or pip install pysoundfile

have you do pip install -e .?

yes

maybe also check for libsndfile, e.g. conda install -c conda-forge libsndfile or pip install pysoundfile

I tried this pip install pysoundfile but now I get this error and the training stops
Epoch 3/500:   9%|8         | 86/982 [01:16<?, ?step/s]
Traceback (most recent call last):
  File "C:\Users\User\Documents\Work\F5-TTS\src\f5_tts\train\finetune_cli.py", line 174, in <module>
    main()
  File "C:\Users\User\Documents\Work\F5-TTS\src\f5_tts\train\finetune_cli.py", line 167, in main
    trainer.train(
  File "C:\Users\User\Documents\Work\F5-TTS\src\f5_tts\model\trainer.py", line 314, in train
    self.optimizer.step()
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\torch\optim\lr_scheduler.py", line 75, in wrapper
    return wrapped(*args, **kwargs)
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\accelerate\optimizer.py", line 171, in step
    self.optimizer.step(closure)
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\torch\optim\optimizer.py", line 391, in wrapper
    out = func(*args, **kwargs)
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\bitsandbytes\optim\optimizer.py", line 291, in step
    self.update_step(group, p, gindex, pindex)
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\bitsandbytes\optim\optimizer.py", line 520, in update_step
    if state["state1"].dtype == torch.float:
KeyError: 'state1'

bnb_optimizer

This means "Use 8-bit Adam optimizer"?

yes
or if you need it, just take some time searching and to debug

I removed this flag and mixed_precision -> none, the process seems to have started
Epoch 3/1057:   9%|8         | 86/982 [00:00<?, ?step/s]C:\Users\User\Documents\Work\F5-TTS\src\f5_tts\model\modules.py:436: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at ..\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:455.)
  x = F.scaled_dot_product_attention(query, key, value, attn_mask=attn_mask, dropout_p=0.0, is_causal=False)
C:\Users\User\.conda\envs\f5-tts\lib\site-packages\torch\autograd\graph.py:744: UserWarning: Plan failed with a cudnnException: CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR: cudnnFinalize Descriptor Failed cudnn_status: CUDNN_STATUS_NOT_SUPPORTED (Triggered internally at ..\aten\src\ATen\native\cudnn\Conv_v8.cpp:919.)
  return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass

Epoch 3/1057:   9%|8         | 86/982 [01:19<?, ?step/s, loss=0.626, step=2051]
Epoch 3/1057:   9%|8         | 87/982 [01:19<19:44:41, 79.42s/step, loss=0.626, step=2051]
Epoch 3/1057:   9%|8         | 87/982 [01:28<19:44:41, 79.42s/step, loss=0.688, step=2052]
Epoch 3/1057:   9%|8         | 88/982 [01:28<9:22:30, 37.75s/step, loss=0.688, step=2052]
Epoch 3/1057:   9%|8         | 88/982 [01:40<9:22:30, 37.75s/step, loss=0.575, step=2053]
Epoch 3/1057:   9%|9         | 89/982 [01:40<6:27:30, 26.04s/step, loss=0.575, step=2053]
Epoch 3/1057:   9%|9         | 89/982 [01:50<6:27:30, 26.04s/step, loss=1.6, step=2054]
Epoch 3/1057:   9%|9         | 90/982 [01:50<4:53:27, 19.74s/step, loss=1.6, step=2054]
Epoch 3/1057:   9%|9         | 90/982 [02:00<4:53:27, 19.74s/step, loss=0.643, step=2055]
Epoch 3/1057:   9%|9         | 91/982 [02:00<4:03:18, 16.38s/step, loss=0.643, step=2055]
Epoch 3/1057:   9%|9         | 91/982 [02:09<4:03:18, 16.38s/step, loss=0.665, step=2056]

Unfortunately, training is still interrupted
Epoch 3/1057:   0%|          | 4/1049 [01:53<8:12:32, 28.28s/step, loss=0.611, step=2102]
Traceback (most recent call last):
  File "C:\Users\User\Documents\Work\F5-TTS\src\f5_tts\train\finetune_cli.py", line 174, in <module>
    main()
  File "C:\Users\User\Documents\Work\F5-TTS\src\f5_tts\train\finetune_cli.py", line 167, in main
    trainer.train(
  File "C:\Users\User\Documents\Work\F5-TTS\src\f5_tts\model\trainer.py", line 309, in train
    self.accelerator.backward(loss)
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\accelerate\accelerator.py", line 2241, in backward
    loss.backward(**kwargs)
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\torch\_tensor.py", line 525, in backward
    torch.autograd.backward(
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\torch\autograd\__init__.py", line 267, in backward
    _engine_run_backward(
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\torch\autograd\graph.py", line 744, in _engine_run_backward
    return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
RuntimeError: CUDA error: misaligned address
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Keyboard interruption in main thread... closing server.
Exception ignored in atexit callback: <function _MultiProcessingDataLoaderIter._clean_up_worker at 0x000001ADE8EEF9A0>
Traceback (most recent call last):
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\torch\utils\data\dataloader.py", line 1473, in _clean_up_worker
    w.join(timeout=_utils.MP_STATUS_CHECK_INTERVAL)
  File "C:\Users\User\.conda\envs\f5-tts\lib\multiprocessing\process.py", line 149, in join
    res = self._popen.wait(timeout)
  File "C:\Users\User\.conda\envs\f5-tts\lib\multiprocessing\popen_spawn_win32.py", line 108, in wait
    res = _winapi.WaitForSingleObject(int(self._handle), msecs)
KeyboardInterrupt:
Traceback (most recent call last):
  File "C:\Users\User\.conda\envs\f5-tts\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\User\.conda\envs\f5-tts\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\User\.conda\envs\f5-tts\Scripts\accelerate.exe\__main__.py", line 7, in <module>
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\accelerate\commands\accelerate_cli.py", line 48, in main
    args.func(args)
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\accelerate\commands\launch.py", line 1168, in launch_command
    simple_launcher(args)
  File "C:\Users\User\.conda\envs\f5-tts\lib\site-packages\accelerate\commands\launch.py", line 760, in simple_launcher
    process.wait()
  File "C:\Users\User\.conda\envs\f5-tts\lib\subprocess.py", line 1209, in wait
    return self._wait(timeout=timeout)
  File "C:\Users\User\.conda\envs\f5-tts\lib\subprocess.py", line 1506, in _wait
    result = _winapi.WaitForSingleObject(self._handle,
KeyboardInterrupt```

need detailed steps and thought better for yourself to debug since seems configuration problem and not with our repo


Open HDF files in read-only mode for reading.

This patch allows a given HDF file to be opened multiple times for reading.

Looks fine to me. Is There an easy way to test this?

I have slightly refined the patch to allow users to specify the file mode, rather than imposing 'r'. With this change all existing tests pass. I have also added a new test that demonstrates that with that change it's possible to call read_hdf(mode='r') while someone else already keeps an open HDFStore in read-only mode (as is the case in the code I'm working with).

Since our interface here is just a reading function, is there ever a reason to open in other than 'r'? I'd prefer not to add another keyword that we have to maintain unless there's a reason to.

I share your concern, and mandating 'r' was my initial thought. However, as it turns out, the existing tests contained a use-case where a HDFStore was already open in default mode ('a'), which triggered an error when opening the file again in read-only mode. (See https://github.com/dask/dask/blob/master/dask/dataframe/tests/test_io.py#L760-L765)
I'm not sure how frequent that use-case is, but it required the full exposure of the 'mode' keyword to work in these different cases.

Ok, this sounds reasonable to me. Just trying to understand how hdf5 file modes work. The file in that test is open in 'a' mode, and is then read in 'a' mode (which will open it multiple times when computed). So the only restriction is if a file is open in 'r' mode then all have to be open in 'r' mode?

Yes, that's my understanding. (I'm not even sure having the file open in 'a' mode multiple times makes any sense in practice. At least the user needs to know exactly what (s)he is doing...)

Alright, this seems good to me then. Thanks!


Ban nodes immediately after adding them to gating state

We need to check that turning on the banning engine doesn't hurt the network by us misattributing some nodes as malicious which is not evident now because banning is half-working.


Using smooth-scroll breaks :target CSS selectors

Elements that are styled depending on the URL hash and element's ID using the :target CSS selector only work on page render or refresh, but if the hash changes by clicking a smooth-scrolled link the target element does not change.

This is unfortunately a side effect of how the script works. The JS pushState API does not respect :target, causing the break. Updating the script to use hash instead would fix the :target issue, but result in a page jump, which defeats the purpose of using the script.
You might try using the callback option to assign an active class to the clicked link:

Thanks for the advice. Does the callback scroll at the point of scrolling, or after the scroll animation completes?

The callback runs after the animation has completed.


Add format for haml-lint

Hello
I would like to add the haml-lint format
https://github.com/sds/haml-lint

@ZeroPointEnergy 👋Thank you for your contribution! 🚀


Nop execution in non-browsers

First off, thanks for the polyfill. It seems to work and has been a huge help.
For anyone dealing with "isomorphic" code, or simply using Deno or Node to test abstract components of an app, it would be nice if importing this polyfill didn't throw exceptions and simply did nothing. In those "server" environments, you're usually not concerned with loading redundant code, especially 1 small file. It would spare people some effort.

this polyfill has no meaning for the server ... you can use feature/detection or create documents dropping this polyfill from the layout, right? basically you are asking me to increase code size for a non-intendend use case, and I am not sure why anyone would do that? 🤔

P.S. with JSDOM the global is polluted with document, window, etc ... with LinkeDOM you can pollute it  before parsing the document and yet no script is executed there ... it looks like you should check how to disable JSDOM execution or just use LinkeDOM instead if it works out of the box?

Native JS modules are static. You can't feature-detect and conditionally use an import statement. You could use await import() but this syntax has less browser support and might have other negatives. To clarify: the issue affects hybrid apps which have a client component and happen to import that into their server component, such as for SSR, and which happen to use native JS modules rather than require. In SSR, you don't use JSDOM or LinkeDOM, so I'm not sure why you brought them up.  But the custom element polyfill is 1 tiny file with very little startup impact. Feature-detecting in the polyfill is more feasible than in user code that imports it via native import.

I agree with you that increasing the polyfill's size and complexity for an edge case is iffy. Depends on the amount.

In SSR, you don't use JSDOM or LinkeDOM, so I'm not sure why you brought them up

Because you dont' execute JS that's meant for the browser neither? And btw, I do use basicHTML (similar to LinkeDOM) for SSR too, see heresy or others.

Exactly. so why are you importing those? Use an import map and solve it for the backend? just point at an empty file and call it a day? Nothing to do here. imho, as import maps are the way to solve these cases.


Removal of .fastai Directory Sometimes Needed

I've discovered some errors which were resolved by removing .fastai directory. The issues were discovered running course_v4 01_intro.ipynb in docker but aren't limited to either. I believe the errors can be mitigated by some software fix, improved error messaging or documentation.
Removing .fastai directory resolved the following errors:

"CUDA out of memory error"
"list index out of range" when data loading, probably due to a defective cache.

Both issues were resolved by executing:
rm -rf $HOME/.fastai
In the case of CUDA out of memory, perhaps the error message can suggest removal of .fastai as a possible solution. Also needs documenting, perhaps in a FAQ too.
In the case of "list index out of range", perhaps a sanity check needs implementing which verifies that the cache is valid. Also needs documenting, perhaps in a FAQ too.
I'll post both issues to the forum.

CUDA out of memory means you have no memory on the GPU you are using. It needs a restart of the kernel, removing the .fastai directory will have no effect on that.

"list index out of range" when data loading, probably due to a defective cache.

is very vague and there is little we can do to see where this error came from without the full stack trace and (ideally) a reproducer.
Wiping the .fastai folder only removes the data and forces you to redownload it. It will not solve any issue you have in the code.


Adds BigModel BLOOM and Eleuther.AI's GPT-J as models

This PR introduces a new interface for Edit and Generate requests, which new AI models are required to implement depending on their capability.
The GenerateClient simply requires you to implement a Generate() method, and the EditClient requires the Edit() method.
This allows for implementation details to be abstracted through their builder methods.
Some notes:
Currently, GPT-3 is the only model offering an edit functionality, however, we can implement edit functionality with the other models through some extra work and prompt engineering.
Fixes #11

Codecov Report
Base: 66.88% // Head: 58.70% // Decreases project coverage by -8.17% :warning:

Coverage data is based on head (4a47bd4) compared to base (1debb41).
Patch coverage: 39.35% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
- Coverage   66.88%   58.70%   -8.18%
==========================================
  Files           7        8       +1
  Lines         625      770     +145
==========================================
+ Hits          418      452      +34
- Misses        188      291     +103
- Partials       19       27       +8

Impacted Files
Coverage Δ

pkg/cmd/config/config.go
9.83% <3.57%> (+9.83%)
:arrow_up:

pkg/ai/gpt3/gpt3.go
33.33% <33.33%> (ø)

pkg/cmd/edit.go
62.68% <41.37%> (-20.34%)
:arrow_down:

pkg/cmd/generate.go
72.02% <46.66%> (-14.23%)
:arrow_down:

pkg/cmd/utils.go
77.31% <85.71%> (-1.46%)
:arrow_down:

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

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Access denied when trying to copy ReAgent.dll

Having a lot of troubles when copying the files to system32 folder. I always get access denied, especially with reagent.dll. Tried to change the owner of the file but no dice. Any thoughts?
Thanks

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: b73c22f0-cb0d-e34b-29d8-06829b86784f
Version Independent ID: 083115ed-f1be-e962-5b0e-5079dec37353
Content: MBR2GPT
Content Source: windows/deployment/mbr-to-gpt.md
Product: w10
Technology: windows
GitHub Login: @greg-lindsay
Microsoft Alias: greglin

also reagent.dll.mui from de-de folder throws the same error.

My fault, I was injecting the files into the windows.wim, not the boot.wim. in the boot.wim everything works like described.

@TonitoDux.  I have injected lots of files including third party .exe and .dll files in system32 under windows.wim and under boot.wim.
actually I taken ownership of all files using  registry

Please note that this site is used to report documentation issues on docs.microsoft.com .
Errors relating to end user computers can be reported to Microsoft Support, but are usually results of local software problems.


code typo fixy

They need the space before the equals when in environment.yml files, but the space causes an invalid package specification error when doing conda install commands (command-line gonna command) 👍

Thank you!


[demo] - allow image names/tags to be configured

Since the OpenTelemetry community demo is meant to be forked/vendored, we want to ensure that a vendor can modify an image of one or more of the service components and leverage the official chart to deploy.
Ideally, we can have a default image name and tag prefix that can be configured for all service components, as well as the ability to override just an individual service component.

Doing some research in the chart it is possible to set the default image for all services and also overwrite, but the values.yaml doesn't make this clear.  I will clean things up.


refactor: better unified pipeline

Addressing #43 suggestions about use unified and avoid reparsing things.
I split the suggested pipeline in two steps:

Get markdown from the input.
Use the markdown for getting HTML ToC.
Convert the markdown into HTML.

closes #43

Where is the TOC used? Can’t see it here. Where is it supposed to be placed on the website?

Not yet, we need to implement the UI visualization for that. I updated https://github.com/IBM/nicedoc.io/issues/16 with all the information necessary 🙂


Queryable

Hi,
let me say this is great project because Blazor is young framework which needs to grow with modules.
I'm trying to implement IQueryable feature on top of this project but there are few limitations. Can you state if the project is in active development?
Let me list the mentioned limitations:

It's difficult to create StoreIndexQuery instance and call GetAllRecordsByIndex if query value type is unknown at compile time; because all is generic.
GetAllRecordsByIndex uses rows fetching cursor but the only implemented comparison is "Equals". It would be great be able to have other ones - ">", ">=", "!=", "StartsWith", "EndsWith", "Contains", ... Sometimes also case insensitive string comparison.
It would be usefull to have range limitations - Take(), Skip(). This and previous bullets require to introduce query expressions.
Is there any reason the GetAllRecordsByIndex and GetRecords methods return different types (Task<IList<>> vs. Task<List<>>)? Maybe Task<T[]> is enough as nobody is allowed to add an item that way.
Acquiring rows does't propagate raw exceptions, rather provide hints by nonstandard way.
I'm unable to call GetAllRecordsByIndex upon a primary key - maybe I'm doing something wrong.

You can look at https://github.com/MarekPokornyOva/BlazorIndexedDbQueryablePoC/blob/master/BlazorIndexedDbQueryablePoC/Pages/Index.razor for an example.

Have been a bit behind in working on this due to work commitments. Hoping to review and respond to queries over the next week


I want to add Prims,kurskal and Djiskta algorithm of DSA in your repository

Please allow me to do.

Djiskta algorithm already contributed by someone, but you can add others.I am assigning this issue to you so that you can contribute.

Hey @Mridul-1-Sharma  , Can you assign me this issue too?

Thank You so much, Okay am adding prims kurshkal algorithm

This repository is excluded from hacktoberfest if want to contribute you can contribute in https://github.com/Mridul-1-Sharma/data_structures_algos


Add yAxisSuffix

Add the yAxisSuffix to Bar and Line charts. An example of when this is needed is for amounts in the thousands, e.g 124,000 can become 124k (where the 'k' is the suffix).

I think it would be better to have a formatLabel prop that takes a value and returns a formatted string.

This is now available in v3.11.0, I merged it as is, but my comment stands.
Thank you for your contribution!


⚠ Turnos 24x7 has degraded performance

In ddd414e, Turnos 24x7 (https://reservas-dev.alternativasinteligentes.com/) experienced degraded performance:

HTTP code: 200
Response time: 3494 ms

Resolved: Turnos 24x7 performance has improved in eed15e8.


Does not give notice when there's an error on INI and INI does not support multiple lines.

My INI file.  All I did was put new lines in the command.  On the upstream it gives an error saying that that string is not terminated which doesn't appear to be true.  but on the fork it does not even show an error message.
[global]

[job-service-run "Do a job at CA1"]
schedule = @every 10s
image = fullstorydev/grpcurl:latest
delete = false

command = """
  grpcurl --plaintext -d {'name':'foo'} ca1:6565 rpc.Greeter/SayHello
"""

Docker compose
version: "3.7"
services:
  scheduler:
    image: ghcr.io/premoweb/chadburn:latest
    command: daemon --config=/jobs.ini
    deploy:
      resources:
        limits:
          memory: 256M
      placement:
        constraints:
          - "node.role == manager"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    configs:
      - source: jobs
        target: /jobs.ini
        mode: 0600
configs:
  jobs:
    file: ./example.ini

Thank you for bringing this to my attention. (sorry for the late response)
I'm going to try and start the re-write of the entire project before the end of this month (April). I'm trying to get other big projects finalized first.


parallel to_sql

Today there are many ways to read into modin in parallel, but none of the write (to_) methods are implemented. Since to_sql does not require parallel file access, it could be a good candidate for the first parallel write.
It should be fairly easy to implement. following is a simple implementation suggestion. would appreciate your inputs
most of the implementation is in pandas_query_compiler.py
    def to_sql(self, **kwargs):
        kwargs["index"] = False
        kwargs["index_label"] = None
       # this is to create the full table and can be used for validation of the input as well. making the alignment with pandas easier
        empty = self.head(0).to_pandas()
        empty.to_sql(**kwargs)
        # so each partition will append its respective DF
        kwargs["if_exists"] = "append"
        columns = self.columns

        def func(df, **kwargs):
            df.columns = columns # get the column names to the partition
            df.to_sql(**kwargs)

        map_func = self._prepare_method(func, **kwargs)
        self.map_across_full_axis(0, map_func)

Though we have an empty INSERT at the beginning and a shuffle, the improvement in performance should still be definitive

Thanks @eavidan this sounds great!
In the code example, mapping across axis=1 might be what you want as it will be a full row for each insert. I am interested to see if there is any reordering (e.g. the rows in the same order as the dataframe).

@devin-petersohn thats a good point. I was more focused on the columns, and did not think about the rows.
After some testing, that is indeed the case, but we should not really care about that as SQL tables do not maintain row order by definition. So, pandas will not keep the row order as well.
Usually the way you read in the same order is by saving the index using df.to_sql(index=True).
Then you can read with pandas.read_sql(index_col="index") and get the original ordering.
The thing is that we don't have the original index in each partition, and the user will have a table with a "misleading" index column in the DB.
Any suggestions on how we can keep the original row index in each partition?

so for now I believe the easiest way is adding an index column to the DF it self before the operation and removing it at the end. Not sure how much it will hurt performance, since its 3 distributed operations, though those two (add and remove) should be really light.
any thoughts?

Hey @eavidan, that sounds great. I will offer an alternative that is very similar.
One option is to do a df.reset_index(drop=False) first. Then you can do row-wise inserts with df.to_sql(index=False) in the partitions (because the data will already be there). It is similar to your proposal, but we already have reset_index implemented. You can do df.index.name = index_label first to get the index column named properly.
It is very similar to your approach, but your approach may be a bit more direct. Either way sounds good to me!

thanks @devin-petersohn
one last thing before the PR. I have an initial working implementation, but for some reason I am getting an error. The implementation is in this [branch].(https://github.com/eavidan/modin/tree/issue_453)
But, when I run the code below, I get this error and an empty DF back from the DB:
Traceback (most recent call last):
  File "/Users/eavidan/PycharmProjects/forks/modin/modin/engines/ray/pandas_on_ray/axis_partition.py", line 74, in deploy_ray_func
    return func(*args)
  File "/Users/eavidan/PycharmProjects/forks/modin/modin/engines/base/axis_partition.py", line 208, in deploy_axis_func
    if sum(lengths) != len(result.columns):
AttributeError: 'NoneType' object has no attribute 'columns'

It seems that I am missing some blocking operation, since as I put time.sleep(2), the DF is inserted in full to the DB. The error is thrown anyway at the beginning. I could be completely off of course.
What am I missing here?
import modin.pandas as pd
import pandas
import os
import numpy as np
import time

conn = "sqlite:///tmp.db"

if os.path.exists("tmp.db"):
    os.remove("tmp.db")
df = pd.DataFrame(np.random.randint(0, 100, size=(100, 100)), columns=range(100))

df.to_sql(name="tbl", con=conn)

# time.sleep(2)

df = pandas.read_sql("tbl", con=conn, index_col="index")
print(df)

Ok I found the source of the problem. It is as you said: the operation is non-blocking so the read is happening before the writes are finished (or even started in some cases).
One of the issues I found was that the internal function is returning None values, but then the code is trying to create a new PandasQueryCompiler with those Nones.
I will PR against your branch for the simple fix I created, though feel free to modify it. I also copied your logic into the pandas_on_ray.io.PandasOnRayIO class because there we can use ray specific optimizations for I/O.

Resolved in #461


Gracefully handle FT_OTHER_ERROR for FT_GetDeviceInfo

For devices that do not have a configured EEPROM attached, there are no USB string descriptors present. Under this condition, FT_GetDeviceInfo will return FT_OTHER_ERROR. This is the case for an Adafruit FT232H module with factory configuration and libftd2xx 1.4.24 (current x86_64 Linux release at time of writing).
Static analysis of this function indicates that all fields except serial_number and description are valid for FT_OTHER_ERROR. These string parameters are unmodified in this case.
This really seems to be a bug in FTDI's implementation. It also causes internal misbehaviors that affect the output of FT_GetDeviceInfoList (all zero fields).

For devices that do not have a configured EEPROM attached, there are no USB string descriptors present. Under this condition, FT_GetDeviceInfo will return FT_OTHER_ERROR. This is the case for an Adafruit FT232H module with factory configuration and libftd2xx 1.4.24 (current x86_64 Linux release at time of writing).

I had the same thing happen with my second FT232H from Adafruit.  I assumed it was a one-off manufacturing error because the first one I have (purchased years earlier) worked fine.  I guess they made a few with the same problem.

Static analysis of this function indicates that all fields except serial_number and description are valid for FT_OTHER_ERROR. These string parameters are unmodified in this case.

There may be some #ifdefs for non-linux platforms on the vendor side.
Is there a sane way to check that his holds true for all the targets?
There may be multiple conditions in this function that return FT_OTHER_ERROR which are not present on Linux, and the other fields may not always be valid for this return code.  I think it is unlikely that this would be a problem, but this library has given me enough problems that I think it is necessary to double check assumptions here.
Alternatively, maybe we could sidestep the problem entirely and return the DeviceInfo in the Err type to let the user decide what to do?
Something along the lines of:
struct DeviceInfoError {
   device_info: DeviceInfo,
   status: FtStatus,
}

// add comment about known FT_OTHER_ERROR conditions here
fn device_info(&mut self) -> Result<DeviceInfo, DeviceInfoError> {
    let mut device_type: u32 = 0;
    let mut device_id: u32 = 0;
    let mut serial_number: [i8; STRING_LEN] = [0; STRING_LEN];
    let mut description: [i8; STRING_LEN] = [0; STRING_LEN];
    trace!("FT_GetDeviceInfo({:?}, _, _, _, _, NULL)", self.handle());
    let status: FT_STATUS = unsafe {
        FT_GetDeviceInfo(
            self.handle(),
            &mut device_type,
            &mut device_id,
            serial_number.as_mut_ptr() as *mut c_char,
            description.as_mut_ptr() as *mut c_char,
            std::ptr::null_mut(),
        )
    };
    let (vid, pid) = vid_pid_from_id(device_id);
    let device_info = DeviceInfo {
        port_open: true,
        speed: None,
        device_type: device_type.into(),
        product_id: pid,
        vendor_id: vid,
        serial_number: slice_into_string(serial_number.as_ref()),
        description: slice_into_string(description.as_ref()),
    };

    if status != 0 {
        Err(DeviceInfoError { device_info, status: status.into() })
    } else {
        Ok(device_info)
    }
}

What are your thoughts here?

This really seems to be a bug in FTDI's implementation. It also causes internal misbehaviors that affect the output of FT_GetDeviceInfoList (all zero fields).

Yeah... The vendor library is pretty bad on linux... I had to add list_devices_fs to work around bugs in that same function.

Alternatively, maybe we could sidestep the problem entirely and return the DeviceInfo in the Err type to let the user decide what to do?

The main issue I'm facing isn't calls to device_info from my application, rather the way libftd2xx-rs calls it when converting from generic devices to specific devices. The OTHER_ERROR case could potentially be handled there instead.
I'm not really equipped for Windows development at the moment, but it's a good point that there could be a completely separate set of OTHER_ERROR semantics there.

Are the ffi types for the FT_STATUS codes supposed to be c_int on Windows? I thought the data type was c_ulong.

The main issue I'm facing isn't calls to device_info from my application, rather the way libftd2xx-rs calls it when converting from generic devices to specific devices. The OTHER_ERROR case could potentially be handled there instead.

Ah, good point.
Let me think on this for a bit, the first few ideas coming to mind are not good ones.

Are the ffi types for the FT_STATUS codes supposed to be c_int on Windows? I thought the data type was c_ulong.

They are an enum in the original ftd2xx.h which bindgen casts to different types for the different platforms.  Apparently Windows handles this differently than Linux ¯\_(ツ)_/¯?  I was still learning the language back then so I did not dig into it as much as I should have.  There's some cross-platform types here to work around it: https://github.com/newAM/libftd2xx-rs/blob/main/src/errors.rs#L136

I tried making sense of the Windows implementation of GetDeviceInfo, but the bulk of it is done in kernel mode and I don't really have to willpower to untangle that mess. :sweat_smile:

No worries, my willpower to develop on Windows is low too :+1:
In the meantime, if you want to put valid settings on your EEPROM I used this python CLI tool to put valid settings onto mine: https://eblot.github.io/pyftdi/eeprom.html

Cool! Thanks for that. Though I'm still hoping users of my application would be able to use their unprogammed devices if at all possible.
I reached out to FTDI to set the record straight on what FT_OTHER_ERROR actually means. I hope that this code can be made into a stable, well documented API semantic.

Got a response back from FTDI.
Their current position is WONTFIX due to their inability to reproduce the issue and lack of reports from other customers. This is in spite of me providing detailed information about what causes the return code, concerns about the ambiguity of such an error code in the first place, and a parsed dump of my USB descriptors.

That's unfortunate, but I am not surprised.  I submitted some documentation bugs to them a while ago (practically free to fix) and the same issues are still outstanding a year later.
Ideas:

unsafe fn into_ft232h_unchecked
Figure out a way to get the PID/VID on Windows without reading the EEPROM (should be available in headers) and make a into based off of that.
Make the try_from call the FFI for device type and ignore FT_OTHER_ERROR only of the device type matches the expected.

* Figure out a way to get the PID/VID on Windows without reading the EEPROM (should be available in headers) and make a `into` based off of that.

What's the behavior on Windows out of curiosity? Do none of the fields get returned for an unprogrammed EEPROM? What's the return code in that case?

What's the behavior on Windows out of curiosity? Do none of the fields get returned for an unprogrammed EEPROM? What's the return code in that case?

No idea unfortunately, I loaded mine with a valid EEPROM without ever using it on Windows.
I would test it out, but I have bricked a FTDI device before with (unintentional) invalid EEPROM settings.

I just tried out my board on Windows. FT_GetDeviceInfo actually succeeds and returns all fields. Obviously these aren't coming from the USB descriptors, so perhaps they're fallback constants hard-coded into the driver???
Serial: FTXZ7WQM
Description: FT232H
I tried it again on Linux just in case it sneakily programmed my device for me. Nope, still no descriptors, still FT_OTHER_ERROR

Also had a look at the macOS version. It's essentially the same as the Linux version, returning FT_OTHER_ERROR when libusb_get_string_descriptor_ascii fails.

I just tried out my board on Windows. FT_GetDeviceInfo actually succeeds and returns all fields. Obviously these aren't coming from the USB descriptors, so perhaps they're fallback constants hard-coded into the driver???
Serial: FTXZ7WQM
Description: FT232H
I tried it again on Linux just in case it sneakily programmed my device for me. Nope, still no descriptors, still FT_OTHER_ERROR

Can you hexdump your eeprom with something like pyftdi?  If there are valid values in there we could just dump the EEPROM to check the device type.
This is definitely a bug in libftd2xx now though...  Platform specific behavior for the same function is never desirable.

Oh! Looks like my EEPROM is programmed after all.

How would you feel about adding this to FtdiCommon? Then TryFrom could just use this instead.
Type constants are from pyftdi. It doesn't have exhaustive coverage of DeviceType though, so this could be problematic for those other devices.
/// Identify device type with a single EEPROM read.
///
/// # Example
///
/// ```no_run
/// use libftd2xx::{Ftdi, FtdiCommon};
///
/// let mut ft = Ftdi::new()?;
/// let dev_type = ft.device_type()?;
/// println!("Device type: {:?}", dev_type);
/// # Ok::<(), libftd2xx::FtStatus>(())
/// ```
fn device_type(&mut self) -> Result<DeviceType, FtStatus> {
    match self.eeprom_word_read(0x3)? {
        0x0200 => Ok(DeviceType::FTAM),
        0x0400 => Ok(DeviceType::FTBM),
        0x0500 => Ok(DeviceType::FT2232C),
        0x0600 => Ok(DeviceType::FT232R),
        0x0700 => Ok(DeviceType::FT2232H),
        0x0800 => Ok(DeviceType::FT4232H),
        0x0900 => Ok(DeviceType::FT232H),
        0x1000 => Ok(DeviceType::FT_X_SERIES),
        _ => Err(FtStatus::NOT_SUPPORTED)
    }
}

Managed to fill in the last four from an obvious switch statement in FT_GetDeviceInfo, but FT100AX is a mystery because nothing in FT_GetDeviceInfo maps to it.
I put the panic in there to match the one in From<u32>
fn device_type(&mut self) -> Result<DeviceType, FtStatus> {
    Ok(match self.eeprom_word_read(0x3)? {
        0x0200 => DeviceType::FTAM,
        0x0400 => DeviceType::FTBM,
        // ??? => DeviceType::FT100AX,
        0x0500 => DeviceType::FT2232C,
        0x0600 => DeviceType::FT232R,
        0x0700 => DeviceType::FT2232H,
        0x0800 => DeviceType::FT4232H,
        0x0900 => DeviceType::FT232H,
        0x1000 => DeviceType::FT_X_SERIES,
        0x1700 => DeviceType::FT4222H_3,
        0x1800 => DeviceType::FT4222H_0,
        0x1900 => DeviceType::FT4222H_1_2,
        0x2100 => DeviceType::FT4222_PROG,
        value => panic!("unknown device type in EEPROM: {}", value),
    })
}

How would you feel about adding this to FtdiCommon? Then TryFrom could just use this instead.

I think the vendor function may actually be keying off of the VID/PID and not the EEPROM (maybe?)
Ideally we can try the vendor function first and use EEPROM reads as a fallback.

I put the panic in there to match the one in From

I wrote this back when I was still learning rust, I should probably fix that at some point :fearful:, ideally we can return an error instead.
Something along the lines of:
/// Identify device type.
///
/// This will attempt to identify the device using the the [`device_info`]
/// method, if that method fails it will then try to determine the device type
/// from the value stored in the EEPROM.
/// If the EEPROM value does not match a known device this function returns
/// [`FtStatus::OTHER_ERROR`], though there may be other conditions in the
/// vendor driver that also return this code.
///
/// This is not a native function in `libftd2xx`, this works around a bug in
/// `libftd2xx`, see https://github.com/newAM/libftd2xx-rs/pull/37 for more
/// information.
///
/// # Example
///
/// ```no_run
/// use libftd2xx::{Ftdi, FtdiCommon};
///
/// let mut ft = Ftdi::new()?;
/// let dev_type = ft.device_type()?;
/// println!("Device type: {:?}", dev_type);
/// # Ok::<(), libftd2xx::FtStatus>(())
/// ```
fn device_type(&mut self) -> Result<DeviceType, FtStatus> {
    if let Ok(info) = self.device_info() {
        Ok(info.device_type)
    } else {
        match self.eeprom_word_read(0x3)? {
            0x0200 => DeviceType::FTAM,
            0x0400 => DeviceType::FTBM,
            // ??? => DeviceType::FT100AX,
            0x0500 => DeviceType::FT2232C,
            0x0600 => DeviceType::FT232R,
            0x0700 => DeviceType::FT2232H,
            0x0800 => DeviceType::FT4232H,
            0x0900 => DeviceType::FT232H,
            0x1000 => DeviceType::FT_X_SERIES,
            0x1700 => DeviceType::FT4222H_3,
            0x1800 => DeviceType::FT4222H_0,
            0x1900 => DeviceType::FT4222H_1_2,
            0x2100 => DeviceType::FT4222_PROG,
            _ => Err(FtStatus::OTHER_ERROR)
        }
    }
}

Then for each specific device that implements FtdiCommon we can change the const DEVICE_TYPE to an infallible method, e.g.
impl FtdiCommon for Ft232h {
    fn handle(&mut self) -> FT_HANDLE {
        self.handle
    }

    fn device_type(&mut self) -> Result<Ftdi, FtStatus> {
        Ok(DeviceType::FT232H)
    }
}

What do you think?

I think the vendor function may actually be keying off of the VID/PID and not the EEPROM (maybe?)
Ideally we can try the vendor function first and use EEPROM reads as a fallback.

I like this idea. The EEPROM read is essentially how pyftdi does device selection, seems like a good fallback.
I'll update the PR in a bit.


Read default database refresh threshold from Central Config

What this PR does / why we need it

Read default database refresh threshold from Central Config

Which issue(s) this PR fixes

Fixes #
Describe testing done for PR

Run any command first to make sure the inventory database fetch is done recently.
Now simulate the central configuration update (in production scenarios this can be done with central configuration fetch that currently happens every 24 hours with 30 min TTL)

Add following two keys to the central configuration to simulate the behavior
$ cat ~/.cache/tanzu/plugin_inventory/default/central_config.yaml
cli.core.tanzu_cli_default_inventory_refresh_ttl_seconds: 2
cli.core.tanzu_cli_default_plugin_db_cache_refresh_threshold_seconds: 2

Run any command again with 2 second interval and notice the database update is triggered. When running command within 2 seconds the database update will not get triggered.

$ date && tz context list
Thu Sep 12 21:09:10 PDT 2024
[i] Refreshing plugin inventory cache for "projects.packages.broadcom.com/tanzu_cli/plugins/plugin-inventory:latest", this will take a few seconds.
  NAME                                      ISACTIVE  TYPE   PROJECT  SPACE
...

$ date && tz context list
Thu Sep 12 21:09:16 PDT 2024
[i] Refreshing plugin inventory cache for "projects.packages.broadcom.com/tanzu_cli/plugins/plugin-inventory:latest", this will take a few seconds.
  NAME                                      ISACTIVE  TYPE   PROJECT  SPACE
...

$ date && tz context list
Thu Sep 12 21:09:17 PDT 2024
  NAME                                      ISACTIVE  TYPE   PROJECT  SPACE

Release note

Read default database refresh threshold from Central Config

Additional information
Special notes for your reviewer

Thanks for this @anujc25.  Can you explain what use case this will allow to address?
My concern is that if we are trying to reduce the 24 hours to a shorter time by updating the central config, then it will take 24 hours for this new setting to be read before it will take effect, which defeats the point. But maybe you had something else in mind?

Thanks for this @anujc25. Can you explain what use case this will allow to address? My concern is that if we are trying to reduce the 24 hours to a shorter time by updating the central config, then it will take 24 hours for this new setting to be read before it will take effect, which defeats the point. But maybe you had something else in mind?

Basically, This will allow us to update the threshold and TTL before any upcoming change which requires CLI to poll frequently in short time window. Once things are settled we can even update the central configuration to increase the time again if needed. So, this will give us more flexibility to plan upcoming changes wrt to central config.


Reconnect Travis builds

It'd be nice to see the Travis builds running again.

Thanks!

Travis should be up and running now! Thanks @robbieaverill


Change range display in the event browser with single value if range …

…is only a single element.

The change looks good. Can you please modify the commit message to fit the guidelines?

Rebased manually onto head.


background image in css does not work with cdn

Affects label check boxes and search component.
background-image: ('cdn-url'); does not work as expected.

Issue wasn't with CDN.
the inline proper caused.
Easy fix is to add display: block; attribute to .labelCheckbox class.


Verbose mode

@DIFSRIP basically we do not have a unified .prettierrc.json (or analogue). want me to implement one, that i used for this kind of formatting? tried not to change much, but still if you want smth to be different, you can ping :D


[migration] cs:app

migrate cs:app note from hackmd to personal blog

csapp chapter1 migration done

Bug:

[ ] picture CORS needs to be fixed


DatHost Backup Rounds/ Demo Dir

Currently I believe it will fail, because they do not give you access to these areas , I will need to adjust the location that we store demos for non containerized applications.

https://github.com/5stackgg/game-server/commit/1ec582f6b3b8649042f339bba4934e4b41059530


minor: release V1.0.16

Codecov Report

Merging #181 (744dd10) into V1.0.X (58ec7d5) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

:exclamation: Current head 744dd10 differs from pull request most recent head 0da39ef. Consider uploading reports for the commit 0da39ef to get more accurate results

@@            Coverage Diff             @@
##           V1.0.X     #181      +/-   ##
==========================================
- Coverage   16.99%   16.99%   -0.01%
==========================================
  Files         182      182
  Lines        8909     8910       +1
==========================================
  Hits         1514     1514
- Misses       7395     7396       +1

Impacted Files
Coverage Δ

...pps/gsekit/adapters/base/pipeline_managers/base.py
26.43% <0.00%> (-0.31%)
:arrow_down:

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 1cfd97f...0da39ef. Read the comment docs.


Syncing from upstream zalando/patroni (master)

bt_gitbot

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

226 of 226 (100.0%)  changed or added relevant lines in 18 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 99.849%

Totals

Change from base Build<PHONE_NUMBER>:
0.02%

Covered Lines:
12546

Relevant Lines:
12565

💛  - Coveralls


DYNAMODB_SHARE_DB environment variable not honored by LocalStackContainer java client

Even if I set the DYNAMODB_SHARE_DB parameter in the LocalStackContainer java client, it is still not honoring it.
public static final LocalStackContainer LOCALSTACK_CONTAINER =
            new LocalStackContainer(localstackImage)
                    .withServices(Service.DYNAMODB)
                    .withEnv("DEBUG", "1")
                    .withEnv("DYNAMODB_SHARE_DB", "1")
                    .withImagePullPolicy(PullPolicy.alwaysPull());

The logged output still looks like below:
org.testcontainers.containers.output.WaitingConsumer - STDOUT:
org.testcontainers.containers.output.WaitingConsumer - STDOUT: CorsParams:	*
org.testcontainers.containers.output.WaitingConsumer - STDOUT: shouldDelayTransientStatuses:	false
org.testcontainers.containers.output.WaitingConsumer - STDOUT: SharedDb:	false
org.testcontainers.containers.output.WaitingConsumer - STDOUT: DbPath:	null
org.testcontainers.containers.output.WaitingConsumer - STDOUT: InMemory:	true
org.testcontainers.containers.output.WaitingConsumer - STDOUT: Port:	43503
org.testcontainers.containers.output.WaitingConsumer - STDOUT: Initializing DynamoDB Local with the following configuration:
org.testcontainers.containers.output.WaitingConsumer - STDOUT: Listening at http://:::42875

I was expecting that the DynamoDB container that comes up should have a shared DB. I'm running the 1.17.2 version of TestContainers.

which localstack version are you using? AFAIK, this is available in 0.14.3. see localstack's changelog

@eddumelendez  Unfortunately, I can only use the versions present in my organizations repository at the time being (which is 0.13.0). But it is no worry, for the time being, I have figured out a way around this. If this issue has been fixed in later versions, I'll close out this ticket.


SendOperationRequest doesn't set "Accept" header

The "Accept" header is never set in ms-rest-js this causes issues such as #7869 in which some services may send something different by default if the Accept header is not set.
For example in the bug mentioned above, JSON is assumed, however the default service default behavior is to send XML.
A workaround for this issue has been to send the Accept header with each operation, however we should be able to set the right header in ms-rest-js based on the information in the OperationSpec
Workaround sample
const result = client.listEntities(
  query,
  { customHeaders: { accept: "application/json" } }
);

This would require a change in the code generator as well as a change to this package.
Since the accept value can also different between operations, the code generator would need to add a property in the OperationSpec interface to hold the Accept header value. @azure/ms-rest-js would then need to read this value and adding the header in sendOperationRequest.
This change would affect all future re-generated code.
But, as discussed in https://github.com/Azure/azure-sdk-for-js/issues/10141, there are better ways to do this in the latest version of the code generator that is currently in development.
So, to reduce risk and churn, the recommendation is to tweak the auto-generated code manually and update the sendRequest() method in the client to add the right header.
This won't work for services that have different accept headers for each operation. But, since we havent seen any such cases, we will be sticking to the above recommendation.
https://github.com/Azure/azure-sdk-for-js/issues/10141 and https://github.com/Azure/autorest.modelerfour/issues/324 will be used to track further work here


new plugin manager is missing preset selector

It is an overlooked missing feature, noticed when I was working on #169 (preset selector is the only feature that could be invoked in realtime manner, even if set_preset() may not "take effect" in realtime manner).

It turned out that NativeRemotePluginInstance does not expose/implement getPreset() and getPresetCount() methods right now.
Since they are based on extensions, I wonder if we should have somewhat better foundation to support extensions. It is easy to implement getPreset() like AudioPluginInstance did, but that means only standard extensions are usable through this class.

Maybe we can inject aap::RemotePluginInstance::sendExtensionMessage() to generate AAPXS SysEx8 message and add it to the event queue (or create another dedicated queue) to be merged at process().
We will have to get "size" information about the extension data, but it is currently not available (AAPXS does not require extensions to provide it) so there will be an additional function to provide it. Unless it can be made optional, it will be a BREAKING CHANGE.

It is in general working as of 24f1303.
The native UI needs some more tweaks on how to ensure to show all the preset options.

Fixed ^ at 29355c3.


How to do Multi node DeepSpeed? Does the current code supports?

I don't have access to a multi-node environment (I run everything locally), so I don't think I can be much help.
You can take a look at this issue for qlora-pipe which is my training script for LLMs, which has a similar architecture to diffusion-pipe. Two users were able to get multi-node deepspeed training working there.
The core training loop is the part that is most likely to work correctly for multi node. I am less sure about the dataset caching and loading part. The way it works, is that the main process launches a subprocess for managing the caching flow. Then every process (one per GPU) sits in a loop, pulling work items off a queue, running the VAE / text encoder, then sending the results back to the caching subprocess. This way caching can easily use multiple GPUs. This code is in the DatasetManager class.
There might be problems if the different processes are on different machines. Worst case, you may need to modify the code to do all this only using the processes on one machine (everything else could jump straight to the barrier() at the end and wait).

Ok got it @tdrussell . This is exactly what I need. I will see if I can get this running. Will update with a PR if I get this working


Random values for one-sided scales are always positive, even when the default isn't 0.0

From the forums http://www.makehumancommunity.org/forum/viewtopic.php?p=48003#p48003, it seems as if something is wrong with the randomization of breast size. It should obviously also generate small-cup breasts, not only large-cup.

Actually, this is/was a wider problem. The randomization of two-sided values on one-sided scales was crippled so that it always added values, never subtracted them.
Breast size is such a scale. It ranges from 0.0 to 1.0, and has a default value of 0.5. Thus it is a one-sided scale (0.0 and upwards), but the default value is two-sided in the sense that it can be randomized in both downwards and upwards direction. But as the bug always added values to the default, the end result were large breasts.
I'm going to rename this issue and take a closer look at whether the fix I committed in https://github.com/makehumancommunity/community-plugins-massproduce/commit/a008edcf4781bc32284abc737d8dffa4c0cfd9fa actually solves the problem.

I think this is fixed


🐛 Unspendable DFIs block any transactions (DeFiCh/wallet)

What happened:
https://github.com/DeFiCh/wallet/issues/3663
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:

/area packages
It's a known issue since the PrevoutProvider that we use and implemented today is the bare minimum but good enough. Another implementation can be done and take into account "Immature UTXO" and filter it from the prevout provider. However, that's not enough since we still need to show that a certain amount of their UTXO is Immature.
https://github.com/JellyfishSDK/jellyfish/blob/4c35de8a08d35283abbdaf7786703ef73ce150a3/packages/jellyfish-transaction-builder/src/provider.ts#L12-L28
If we were to implement the Immature UTXO filtering, we should implement this https://github.com/JellyfishSDK/jellyfish/issues/1663 first.
Since this is not a low-bearing fruit, I don't have an answer now; let's see.

@fuxingloh thanks, for clarification. It's dangerous, because it blocks the user from being able to save its vaults from liquidation. I was shocked when I noted that I cannot do any transactions for 100 blocks. I was happy that I noticed it the issue on a friday night, so oracles do not move much.
As soon as setRewardAddress is possible for a masternode owner this could become a bigger problem, because at the moment only masternode operator are able to set rewardaddress for all operators.
From my user glasses, it is very important to solve the problem because it could cost the user a lot of money and kind it's not totally his fault.

@fuxingloh thanks, for clarification. It's dangerous, because it blocks the user from being able to save its vaults from liquidation. I was shocked when I noted that I cannot do any transactions for 100 blocks. I was happy that I noticed it the issue on a friday night, so oracles do not move much.
As soon as setRewardAddress is possible for a masternode owner this could become a bigger problem, because at the moment only masternode operator are able to set rewardaddress for all operators.
From my user glasses, it is very important to solve the problem because it could cost the user a lot of money and kind it's not totally his fault.

/triage accepted
Great insights; let me think about this since it's not an easy fix with many legacy tech debts. Alternative for affected users please separate your reward address from active operational wallets.

Not an easy change; let's approach it slowly and tackle the first issue first since that interface prevents spending. Where we can throw an error when attempting to spend immature UTXO. We can improve and expand on the basic PrevoutProvider while we're at it.
Issues to Tackle:

[ ] WhalePrevoutProvider should ignore UTXO that are Immature (<100 confirmations)
[ ] Whale Balance Aggregation should separately aggregate immature UTXO
[ ] Provide additional field on whale-api to show immature category UTXO

Let me find the resources to tackle this.

/close and triaged as #1819


Add option for client to choose until when an operation is being watched

A client submitting a trusted operation (top) should be able to choose until which status event (Submitted, InBlock, Finalized..) the top is being watched.
Additionally, only one answer should be returned, not multiple

Pushing this issue a little in importance, because Ajuna keeps having problem with the current setup, which gives multiple answers for one call ('Submitted' + 'InBlock`)

That would be awesome, the more we can align with the usual RPC the more we can rely on libraries to make the client more resilient.
In the case of a TrustedCall, I suppose a good approach would be to get a an Id (or use the request id) and a call back of the client's method author_extrinsicUpdate (similar to substrate parity) with the updates  (Submitted, InBlock, Finalized..).
In the case of a TrustedGetter, there is no need to send anything to watch, only one response I would assume.,


Generic server for testing intercepting proxies - somewhat related to pathod

This is tangentially related to #4273
I wanted to post this for quite some time and #4273 reminded me of it. I am working on a product that integrates mitmproxy and basically turns it into a desktop application (this is a gross oversimplification). I will join Slack later and might share some details.
Anyway, I want to write full end-to-end integration tests. By that I mean launching some apps (e.g. WordPress in a Docker container) and then running the application and automating all the interface interactions (like editing a flow etc.).
To cover all the edge cases I plan on writing a server specifically designed for integration tests of intercepting proxies (or HTTP clients in general I guess). And I thought maybe this is something the mitmproxy team would be interested in joining forces?
The server would basically have routes for all things I want to test, e.g. something likes this (I haven't really looked into all the things I actually want and need to test in detail)
/encoding/utf-8
/encoding/gb18030

/websockets/text # These would serve an HTML page that starts communicating using WebSockets
/websockets/binary
/websockets/mixed

/status/200 # Maybe these things could also be parameters of the other routes
/status/404

/chunked

So I'm hitting /encoding/gb18030 with my HTTP client (e.g. headless Chrome) that's using the proxy and once I get the response I verify that weird characters are correctly rendered in the UI. Or that my replacement pattern correctly matched.
I personally would write this in Go, but I wouldn't mind Python (although it'd slow me down I guess).
Is this something you are interested in? How are you planning on doing integration tests? Does something like this already exist (how are others doing that?)? Could parts of pathod be reused?

I wanted to post this for quite some time and #4273 reminded me of it. I am working on a product that integrates mitmproxy and basically turns it into a desktop application (this is a gross oversimplification). I will join Slack later and might share some details.

Cool stuff! 😃

To cover all the edge cases I plan on writing a server specifically designed for integration tests of intercepting proxies (or HTTP clients in general I guess). And I thought maybe this is something the mitmproxy team would be interested in joining forces?

That pretty much sounds like what pathod is doing currently (or maybe also httpbin if you are looking more at the application layer).  For example, if you just start pathod and then open http://localhost:9999/p/200:b@100, you get served a 200 status code and 100 random bytes.
IMO there's really nothing wrong with this approach. The reason we are moving away from this is that our sans-io unit tests are switching to a plain specification of the bytes on the wire, which doesn't depend on a custom DSL, is a bit faster, and allows for more fine-grained control of the timings (see e.g. this test for response streaming). For unit-testing the UI, we can manually construct flows and go from there. Looking at integration tests, we really don't plan to test down to the same level of detail - any simple HTTP server on the other end would probably suffice.
That being said - maybe you want to take a closer look at pathod and see if it fits your needs. Keeping it around isn't too much work for us, but there's no point in maintaining it if we don't use it anymore and have very little adoption otherwise. :)

I've looked into pathod once some time ago but didn't want to learn a new DSL. pathod works on a different abstraction layer then what I'm looking for (that's what it's designed for).
But I think you've pointed me in the right direction, I might just contribute to https://github.com/mccutchen/go-httpbin (the original is inactive anyway).
I'll close this for now and might post an update once I actually start writing the tests. Thanks!


Could not resolve com.github.stfalcon-studio:Chatkit:v0.4.1.

Hi,  i tried to follow all steps here but am still getting this beautiful error.
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.github.stfalcon-studio:Chatkit:v0.4.1.

Any answer to this? Same problem here.

I have the same problem.
There is a solution?

After doing some research and modifying a thousand things, I have found a possible solution:
In 'settings.gradle' add
maven { url 'https://jitpack.io' }
jcenter()
'dependencyResolutionManagement' is equivalent to the old 'allprojects'.
I attach a screenshot.

Hope this helps in the future :)

jcenter is dead

It doesn't work at all.
No one has this problem? I've spent a day trying to solve it.

Any update on this?

hi, better download lib folder then import it's into your project
this lib is DEAD, so we dont need to using gradle to import this lib.

You can still use version 0.3.3 which is available in JCenter https://mvnrepository.com/artifact/com.github.stfalcon/chatkit/0.3.3
Only the newer version 0.4.1 requires something from a private repo on jitpack.

add maven { url 'https://jitpack.io' } in android build.gradle

@yoryer not working, the 0.3.3 version not founded.


If selected layer is within a group, chart is created outside group

Minor  issue - if you try to create a chart within a group in Sketch, the chart is made outside the group, and in a different position.
Sketch 50.2
Chart 3.3.0

@thejanaki it is the known issue and I will try to fix it later


API docs of CheckboxControlValueAccessor: fix example syntax

Opening single quote changed to double quote to match string closing character.
cc @kwalrath

Closed in https://github.com/dart-lang/angular/commit/f3bbbfc38787292a9253439faeea20586dd2ca7d