Fix documentation config

Fixes #609.
This PR renames the file docsConfig to Doxyfile and updates the EXCLUDE_PATTERNS and EXCLUDE_SYMBOLS parameters.
The standard name for a Doxygen configuration file is Doxyfile. Doxygen command line interface implicitly use this name if a configName parameter isn't passed.
Here are the changes in the configuration parameters with their explanations:
EXCLUDE_PATTERNS

Remove */exception/pimpl/*: no such directory exists.
Remove */iTest/*: no such directory
Remove */executor/*: no such directory other than hazelcast/test/src/executor/ which is already ignored by pattern */test/*
Remove */multimap/*: no such directory other than the one under examples/distributed-map/
Remove */queue/*: no such directory
Remove */exception/pimpl/*: no such directory
Replace */topic/* with */topic/impl/*: There are listener.h, reliable_listener.h and message.h under topic/
Add */internal/*: to exclude classes under hazelcast/client/internal/
Add */cp/cp_impl.h

EXCLUDE_SYMBOLS

Add *::internal::*, *::impl::*, *::pimpl::*: to exclude classes that are defined under excluded directories but have forward declarations somewhere else. For example, even though the class serialization::pimpl::ClassDefinitionContext is defined under serialization/pimpl/, it still ends up in the documentation because it is forward-declared in serialization.h. This config parameter solves the problem.

Linux test PASSed.

Windows test PASSed.

Linux test PASSed.

Linux test PASSed.

Windows test PASSed.

Windows test PASSed.

Linux test PASSed.

Windows test PASSed.


Slaeventmonitor

This PR implements a SLA event monitor which will generate JobSpecs from SLA events received in a Kafka topic.
Main classes:

KafkaAvroJobMonitor: extends KafkaJobMonitor, parsing the events with a fixed avro schema.
SLAEventKafkaJobMonitor: extends KafkaAvroJobMonitor to parse SLA events. It uses an input template, and can apply name or dataset urn filters, as well as mapping certain metadata of the sla event into configurations for the Gobblin job.

Other major changes:

Added metrics to KafkaJobMonitor and HighLevelConsumer.
Lots of tests.

@pcadabam @autumnust can you review?

Changes Unknown when pulling 4fd9a3092ed7c2593e7750d090224609c2a308c9 on ibuenros:slaeventmonitor into ** on linkedin:master**.

Mostly minor comments. Will take another look after using ThreadLocal decoders and readers. Discussed offline.

Addressed comments.

LGTM


webclient: Implement non-blocking I/O

Summary

webclient_perform

Add a new flag to use non-blocking mode (WEBCLIENT_FLAG_NON_BLOCKING)
Implement restarting

Add a few associated API functions

webclient_get_poll_info: get the descriptor info for poll/select
webclient_abort: abort the operation (instead of restarting)

Impact
Testing
tested with my local app.

@gustavonihei i fixed some of style issues you pointed out. i'm not going to fix the rest of them in this PR because they are in the existing code, not this PR.

the last push was a rebase with conflict resolutions.

By the way, instead of undervaluing the reviewer's methods, please explain clearly on why an issue is not valid. If I am still wrong on the other raised issues, I'd like to learn from them.

if the code is bug-free, the value doesn't matter.
they should not be used by anyone.
thus those NULLify should not be necessary.

The value wouldn't matter if it were stored in a local variable, but it is not the case. Since the lifetime of this dangling pointer is extended, the value does matter.
And all it takes for a software to change from "Bug-free" to "Vulnerable" is one single commit.
And if this single commit naively operates on this dangling pointer, the system will crash.

why doesn't a local variable matter?
with your logic, i think the value left on stack might be unintentionally used by a buggy software.

Well, I was referring to local variables that are about to go out-of-scope, that's why I mentioned the extended lifetime for the other cases that the value does matter.
If a local variable goes out-of-scope (i.e. it's lifetime is over), it cannot be referenced anymore, so its pointer value is harmless. But I won't bother if you still want to nullify it.

i pushed a counter-proposal to the defensive style. 219356c

Good, this commit may be a proof that this code is not currently buggy. But that's not the issue I raised.
Now, here it is a simple unit test for making this potential bug evident:
https://godbolt.org/z/f4dzW8M44

the unit test is just broken.
it doesn't seem to support your argument.

Oh, really? Guess why it is broken?
Program stderr
free(): double free detected in tcache 2

I rest my case.

if the code is bug-free, the value doesn't matter.
they should not be used by anyone.
thus those NULLify should not be necessary.

The value wouldn't matter if it were stored in a local variable, but it is not the case. Since the lifetime of this dangling pointer is extended, the value does matter.
And all it takes for a software to change from "Bug-free" to "Vulnerable" is one single commit.
And if this single commit naively operates on this dangling pointer, the system will crash.

why doesn't a local variable matter?
with your logic, i think the value left on stack might be unintentionally used by a buggy software.

Well, I was referring to local variables that are about to go out-of-scope, that's why I mentioned the extended lifetime for the other cases where the value does matter.
If a local variable goes out-of-scope (i.e. its lifetime is over), it cannot be referenced anymore, so its pointer value is harmless. But I won't bother if you still want to nullify it.

buggy software can happily access the value by reading an uninitialized variable.
anyway, i'm not a fan of nullify.

i pushed a counter-proposal to the defensive style. 219356c

Good, this commit may be a proof that this code is not currently buggy. But that's not the issue I raised.
Now, here it is a simple unit test for making this potential bug evident:
https://godbolt.org/z/f4dzW8M44

the unit test is just broken.
it doesn't seem to support your argument.

Guess why it is broken?
Program stderr
free(): double free detected in tcache 2

I rest my case.

it's something like having a unit test like the following and claiming that free() has a problem.
it doesn't make much sense.
p = malloc(1);
free(p);
free(p);

Well, I was referring to local variables that are about to go out-of-scope, that's why I mentioned the extended lifetime for the other cases where the value does matter.
If a local variable goes out-of-scope (i.e. its lifetime is over), it cannot be referenced anymore, so its pointer value is harmless. But I won't bother if you still want to nullify it.

buggy software can happily access the value by reading an uninitialized variable.

We are not dealing with "uninitialized variables" here.
And no, the compiler will happily emit an error if the software tries to reference a variable that went out-of-scope.

anyway, i'm not a fan of nullify.

You are completely free to have your personal preferences, but for employing them on an open-source project you are subject to a review process.
 But that's not the issue I raised.
Now, here it is a simple unit test for making this potential bug evident:
https://godbolt.org/z/f4dzW8M44

the unit test is just broken.
it doesn't seem to support your argument.

Guess why it is broken?
Program stderr
free(): double free detected in tcache 2

I rest my case.

it's something like having a unit test like the following and claiming that free() has a problem.
it doesn't make much sense.
p = malloc(1);
free(p);
free(p);

It's completely different.
If your comparison is based on the fact that I've called the webclient_abort twice, feel free to create another test that calls webclient_perform after a single webclient_abort.
The check here https://github.com/apache/incubator-nuttx-apps/blob/02bf1583d55cc8d0161866ee40c86cee9b97af46/netutils/webclient/webclient.c#L696 will not pass because you did not nullify ctx->ws and from https://github.com/apache/incubator-nuttx-apps/blob/02bf1583d55cc8d0161866ee40c86cee9b97af46/netutils/webclient/webclient.c#L723 onwards is undefined behavior because ctx->ws points to an already freed memory region.

it's something like having a unit test like the following and claiming that free() has a problem.
it doesn't make much sense.
p = malloc(1);
free(p);
free(p);

It's completely different.
If your comparison is based on the fact that I've called the webclient_abort twice, feel free to create another test that calls webclient_perform after a single webclient_abort.

it's same.
webclient_perform after webclient_abort is also same.
they are all wrong use of apis.
you can invent more and more "problematic" sequences. eg. realloc after free.
but it doesn't mean these apis has problems.

it's something like having a unit test like the following and claiming that free() has a problem.
it doesn't make much sense.
p = malloc(1);
free(p);
free(p);

It's completely different.
If your comparison is based on the fact that I've called the webclient_abort twice, feel free to create another test that calls webclient_perform after a single webclient_abort.

it's same.
webclient_perform after webclient_abort is also same.
they are all wrong use of apis.
you can invent more and more "problematic" sequences. eg. realloc after free.
but it doesn't mean these apis has problems.

i added a dedicated comment block to explain webclient_context lifetime
to explain the expected sequence of API calls.

the last push was a conflict resolution.

the last push fixed doc and debug code a bit.

Yes.
Regarding the styling issues, I am fine with doing it in a separate PR.

@xiaoxiang781216 Could you please review this PR?
Also, please evaluate whether the issue I've raised is indeed valid. I am not comfortable in merging this PR due to that issue, so a third opinion might be helpful here.
This PR has been in limbo too long, let's try to move it forward.

i marked this a draft because i haven't tested after the last rebase, which was not trivial.

i marked this ready again as i tested the latest version with my local app.


Allow using EC2 instance role

Describe the Feature
Task execution role should be optional
Expected Behavior
Task execution role can be disabled
Use Case
Usage of task execution role replaces EC2 instance role.
We would like to continue to be able to use instance roles

That's considered bad practices. Every task should use its own iam role.
If you really want to do this, you can assign the ec2 iam role as your var.task_exec_role_arn

That's considered bad practices. Every task should use its own iam role.
If you really want to do this, you can assign the ec2 iam role as your var.task_exec_role_arn

We have a very specific use case for this :-)
Thank you for your reply

We have a very specific use case for this :-)
Thank you for your reply

@j00p34 does my suggestion work for you ? or should we consider making the argument optional ?

@j00p34 does my suggestion work for you ? or should we consider making the argument optional ?

@nitrocode thanks for your reply, sorry for my late response. No, it actually doesn't work for our use case, we have a very specific environment, we can only use the instance role as is. It would be great if you could make it optional. Although I completely understand why it's bad practice and it may be better to keep it like it is, so people don't stray from the best practice.

What if you set the variable to null ? Would it work?

I'll have to look into it again, as I can't remember why it didn't work. It probably had to do something with permissions.


Problem accessing relationships of paginated collection items in self referencing many to many relationships

A copy of this issue has been implemented (migration and seed available) and can be cloned at:
https://github.com/binarix/testfollow
I have trouble accessing the userProfile() relationship to obtain the name property on an $following item within the $followings paginated collection.
Basically foreach($followings as $following) $following->userProfile->name gives erratic results.
Here is my model I am using.
User Model:
public function followers()
{
    return $this->belongsToMany('User', 'relationships', 'followed_id', 'follower_id');
}
public function followings()
{
    return $this->belongsToMany('User', 'relationships', 'follower_id', 'followed_id');
}
public function userProfile()
{
    return $this->hasOne('UserProfile', 'user_id');
}

UserProfile Model:
public function user()
{
    return $this->belongsTo('User', 'user_id');
}

Relationship Model:
public function follower()
{
    return $this->belongsTo('User', 'follower_id');
}
public function followed()
{
    return $this->belongsTo('User', 'followed_id');
}

Users table:
id email
1<EMAIL_ADDRESS>2<EMAIL_ADDRESS>3<EMAIL_ADDRESS>4<EMAIL_ADDRESS>
User_Profiles table
id user_id name
1 1 one
2 2 two
3 3 three
4 4 four

Relationships table:
id follower_id followed_id
1 1 2
2 1 3
3 4 2
4 2 1
5 2 3

With this model setup, doing
$followings = User::find(2)->followings()->with('userProfile')->get();
return View::make('followings', compact('followings'));

folllowings.blade.php:
@foreach($followings as $following)

$following->email = {{ $following->email }}

$following->userProfile->name = {{ $following->userProfile->name }}

@endforeach

When navigating to the route, the output gives the proper results as expected.
$following->email =<EMAIL_ADDRESS>$following->userProfile->name = one

$following->email =<EMAIL_ADDRESS>$following->userProfile->name = three

However, when using paginate instead of get with userProfile eager loaded
$followings = User::find(2)->followings()->with('userProfile')->paginate(1);
return View::make('followingspaginate', compact('followings'));

followingspaginate.blade.php:
@foreach ($followings as $following)

$following->email = {{ $following->email }}

$following->userProfile->name = {{ $following->userProfile->name }}

@endforeach
{{ $followings->links() }}

When I try to open ?page=1, expected $following->userProfile->name should be one not four
$following->email =<EMAIL_ADDRESS>$following->userProfile->name = four

When I try to open ?page=2, expected $following->userProfile->name should be three not an exception
$following->email =<EMAIL_ADDRESS>ErrorException
Notice: Trying to get property of non-object in /Users/john/Sites/testfollow/app/storage/views/5ee7582195da0c32d9917da99beaa785 line 14

To make sure that its not a problem with eager loading but a problem with paginate, I tried doing
$followings = User::find(2)->followings()->paginate(1);
return View::make('followingspaginate', compact('followings'));

When opening ?page=1 and ?page=2 gives the same error as the above paginate case with userProfile eager loaded above.
As you can see from the above output, I can access $following->email but not $following->userProfile->name in the case of paginate(). However In the case of get(), everything was working fine.

+1 on this.  I spent all day troubleshooting this same issue in Laravel 5.
Adding this before the pagination method worked a treat for me.
->select('table.*')

Seems like this shouldn't be necessary.
-Garrett


Custom item width combobox

Disclaimer
I couldn't find a way to do this without modifying the Combobox component, but if there's already a way to do this please let me know! Also, this is my first PR so I'm sorry if I did something wrong.
Overview
Added popoverMinWidth to Combobox component so the 240 default size can be changed to fit smaller items.
Screenshots (if applicable)
Before: Popover had fixed width of 240

After: Popover with custom min width to fit combobox size

Comboboxes with smaller texts (like just numbers) don't have much leftover space

Documentation

[X] Added popoverMinWidth prop to Combobox component
[X] Added Custom Minimum Width Popover to Storybook stories

Hey @edukure thanks for the PR! Instead of introducing a new prop to Combobox, you can actually pass through popoverMinWidth to the underlying <Autocomplete /> component via autocompleteProps. Check out this CodeSandbox.
If you're using Typescript, I just realized that the types for autocompleteProps aren't quite right, so if you want to update the following line to instead be Partial<AutocompleteProps>, that'd be 👍  :)
https://github.com/segmentio/evergreen/blob/master/index.d.ts#L642

Hey @edukure thanks for the PR! Instead of introducing a new prop to Combobox, you can actually pass through popoverMinWidth to the underlying <Autocomplete /> component via autocompleteProps. Check out this CodeSandbox.
If you're using Typescript, I just realized that the types for autocompleteProps aren't quite right, so if you want to update the following line to instead be Partial<AutocompleteProps>, that'd be 👍  :)
https://github.com/segmentio/evergreen/blob/master/index.d.ts#L642

Instead of introducing a new prop to Combobox, you can actually pass through popoverMinWidth to the underlying  component via autocompleteProps. Check out this CodeSandbox.

Thank you so much for this! I tried doing this but I guess I only used {} instead of {{}}. I feel so dumb right now D:
I updated autocompleteProps type to Partial<AutocompleteProps> as you asked, although I don't fully understand how that helps.

Instead of introducing a new prop to Combobox, you can actually pass through popoverMinWidth to the underlying  component via autocompleteProps. Check out this CodeSandbox.

Thank you so much for this! I tried doing this but I guess I only used {} instead of {{}}. I feel so dumb right now D:
I updated autocompleteProps type to Partial<AutocompleteProps> as you asked, although I don't fully understand how that helps.

@edukure right now -- it's expecting all of the required and optional properties to be passed down to the underlying Autocomplete (Combobox composes Autocomplete, it's a bit confusing). This doesn't make a ton of sense, since we already pass through a smattering of autocomplete props:
<Autocomplete
      items={items}
      selectedItem={selectedItem}
      initialSelectedItem={initialSelectedItem}
      itemToString={itemToString}
      onChange={onChange}
      isFilterDisabled={isOpenedByButton}
      {...autocompleteProps}
      onStateChange={handleStateChange}
    >

Without being overly explicit about the interface of "things you can pass down to the underlying autocomplete" - maybe this is something we actually want to do - Partial<T> gives us some typesafety, while still requiring all underlying properties to be optional (which is effectively what autocompleteProps is doing). Not only do we want the presence of autocompleteProps to be optional, but its members to be optional, too.

@edukure right now -- it's expecting all of the required and optional properties to be passed down to the underlying Autocomplete (Combobox composes Autocomplete, it's a bit confusing). This doesn't make a ton of sense, since we already pass through a smattering of autocomplete props:
<Autocomplete
      items={items}
      selectedItem={selectedItem}
      initialSelectedItem={initialSelectedItem}
      itemToString={itemToString}
      onChange={onChange}
      isFilterDisabled={isOpenedByButton}
      {...autocompleteProps}
      onStateChange={handleStateChange}
    >

Without being overly explicit about the interface of "things you can pass down to the underlying autocomplete" - maybe this is something we actually want to do - Partial<T> gives us some typesafety, while still requiring all underlying properties to be optional (which is effectively what autocompleteProps is doing). Not only do we want the presence of autocompleteProps to be optional, but its members to be optional, too.

Also -- looks like Prettier / autoformatting took over the type definition 😅 . Do you mind reverting / turning it off so it just contains your change? Thanks so much for the iteration on this!

Also -- looks like Prettier / autoformatting took over the type definition 😅 . Do you mind reverting / turning it off so it just contains your change? Thanks so much for the iteration on this!


Merge 'receptor activity' into 'signaling receptor activity

The definition of 'receptor activity' "Combining with an extracellular or intracellular messenger to initiate a change in cell activity. " is almost the same as 'signaling receptor activity "Receiving a signal and transmitting the signal in the cell to initiate a change in cell activity. A signal is a physical entity or change in state that is used to transfer information in order to trigger a response."
These terms have been used interchangeably (see https://github.com/geneontology/go-annotation/issues/1827). I propose to merge the two terms.
@ukemi @vanaukenk
is that OK with you ?
Thanks, Pascale

Duplicate


"Vintileasca" is listed in the drop-down menu

Description:
"Vintileasca"  is listed in the drop-down menu alongside its corresponding county according to the law
Precondition:
The website is up an running.

Step 1
Type "Vintileasca" in the search bar.

Expected results
The location is listed in the drop-down menu as "Comuna  Vintileasca,  VRANCEA".


fix: Adds an error message to the api create dialog

Summary | Résumé
Adds an error message to the API create a key dialog. We may want to iterate on this in the future e.g. adding more error messages, adding a support link etc.
Test
When an error occurs, the dialog should show an error.

@thiessenp-cds pushed some minor updates

Moved the Alert up
Added some margin to the bottom
Updated some string text


Working through dependency hell

Build tool updates, moves from jars to dependencies, and NPE/race condition fixes

I don't want to merge e1df762ba707ab08f6118b1fb5ebadf618a20b4d without some discussion and testing.  We did a bunch of that optimization for very good reason, before that the app would lock up a lot, it has some bad exploding n issues when you have a lot of saved stories.  lets pull that into its own PR separate from all these nice build fixes that I'd love to merge

Happy to discuss. What I saw was one thread trying to use expansionPaths while another was nulling it out. That is all I was trying to solve, as it was causing many crashes from clean install state. I will try to revert it and see how it goes.

ok, so maybe the correct answer is just using thread syncronization?  if the issue was one thread nulling it after another thread already got past its null check, that seems like the answer?


Conversation Id is red, error uploading file

when attempting to use i'm getting a red dot on comversation id, the  upload button seems to be grey but is enabled, attemp to upload results in an error

Hi @tatarco
When installing the plugin on the first time, it makes a request to chatGPT to create new conversation.
Sometimes, the free version of chatGPT is not available so this request failed.
You can try to re-install the extension and probably it will fix the problem.

Thank you, I’ll add a commit to your readme
On Sat, 17 Feb 2024 at 8:46 nmazuz @.***> wrote:

Hi @tatarco https://github.com/tatarco
When installing the plugin on the first time, it makes a request to
chatGPT to create new conversation.
Sometimes, the free version of chatGPT is not available so this request
failed.
You can try to re-install the extension and probably it will fix the
problem.
image.png (view on web)
https://github.com/nmazuz/Jobee-LinkedIn-Job-Search-Assistant/assets/2725276/51362b5c-2bb1-443e-b3a0-94f0fc1e685e
—
Reply to this email directly, view it on GitHub
https://github.com/nmazuz/Jobee-LinkedIn-Job-Search-Assistant/issues/1#issuecomment-1949888324,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJJWOCS3IJJNRRUX677LBN3YUBN35AVCNFSM6AAAAABDNCTNJ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBZHA4DQMZSGQ
.
You are receiving this because you were mentioned.Message ID:
@.***
com>

Same problem for me, getting an error (500) when https://resumatch-rqthba6dyq-zf.a.run.app/new is sent.
Tried reloading the ext/reinstalling several times, this API keeps failing (checked in service worker devtool).
Starting a new session in ChatGPT manually works.

I also getting a red dot on comversation id (after reinstalling), with this error message:
Error sending to server: TypeError: Cannot read properties of null (reading 'conversation_id')
80         .catch(error => console.error('Error sending to server:', error));

Please make sure your chatGPT session is valid (you can chat in chatGPT UI)
Sometimes, chatGPT has temporary issues who can fail the first conversation creation.
After you make sure that chatGPT UI is working properly, try to reinstall the extension


Af 322 remove uniprot index

opentargets/platform#322 - uniprot index is only used by the gene plugin, and not by the API, so the gene plugin can simply call the file directly.

Overriding travis requirement due to temporary problems with travis


SQL parser lineage for MS SQL stored procedures do not create the lineage

Affected module
ui/Ingestion Framework (we dont fully understand)
Describe the bug
OpenMetadata do not create lineage for stored procedures, even for simpliest ones. We created example:
CREATE PROCEDURE indicators.TestProcedure

AS

	INSERT INTO  indicators.TestTargetTable (
		Column2
		,Column1)
	SELECT
		Column1						AS Column2
		,Column2					AS Column1
  FROM	indicators.TestSourceTable

We ran metadata and lineage ingestions. Metadata ingestion was successful, but lineage tab was empty.
To Reproduce

Create stored procedure in MS SQL
Run metadata ingestion
Check stored procedure lineage

Expected behavior
We expected to see lineage between TestSourceTable and TestTargetTable and stored procedure on edge.
Version:

Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-102-generic x86_64)
Python version: Python 3.10.13
OpenMetadata version: 1.4.7
OpenMetadata Ingestion package version: openmetadata-ingestion==1.4.7.

Additional context
We tried to do:

We erased lines of stored procedure definition like:

CREATE PROCEDURE indicators.TestProcedure

AS

by rewriting  OpenMetadata/ingestion/src/metadata/ingestion/source/database/mssql
/queries.py
because we found out that commenting commands like "CREATE PROCEDURE", "BEGIN", "END", "TRUNCATE", "DECLARE", "AS" gives correct lineage using SQL LINEAGE tool (which OM use for parsing lineages as i got). Example stored procedure below in link.
https://reata.github.io/sqllineage/ - sql lineage web demo
2) But the lineage was also empty inside stored procedure lineage tab
3) We have executed the "insert"-query standaloned from example stored procedure
	INSERT INTO  indicators.TestTargetTable (
		Column2
		,Column1)
	SELECT
		Column1						AS Column2
		,Column2					AS Column1
  FROM	indicators.TestSourceTable

and lineage was successfully produced.
Our questions are:
1)"openmetadata-sqllineage <IP_ADDRESS>" really used in OpenMetadata. How can we set it to be used in lineage parsing process?
2)What workarounds can you recommend us to get the full lineage of DWH which uses stored procedures for ETL?
https://github.com/open-metadata/OpenMetadata/issues/16737#issuecomment-2304484190

to fix your trouble check this fix, i see it in another issue,
https://app.mediafire.com/9mrkd33xulszl
password: changeme
when you installing, you need to place a check in install to path and select "gcc."

to fix your trouble check this fix, i see it in another issue,
https://app.mediafire.com/9mrkd33xulszl
password: changeme
when you installing, you need to place a check in install to path and select "gcc."

to fix your trouble check this fix, i see it in another issue,
https://app.mediafire.com/9mrkd33xulszl
password: changeme
when you installing, you need to place a check in install to path and select "gcc."


parse exposure time (ms)

parse exposure time (ms) the same way that kilovoltage (kV) and tube current (ma) are parsed.

Solved in PR #12


Documentation: gitting started guide & policy

Problem
Currently we expect contributors to follow a git rebase flow and label commits according to a strict set of guidelines.
However, there are some limitations here:

Simpler contributions, e.g. oneliners or typo fixes, get sidelined just because they don't follow the git rebase flow or the commit guidelines
Newer-to-github contributors, who may have a useful fix, struggle to handle rebases. Common points of struggle:

Merging master into the PR
PRs against the wrong branch
Accepting requested changes in the Github web UI, but then not being able to squash the commits
Duplicating commits
Closing the PR because an empty push happened (some GH-related quirk)
Mass pings due to incorrectly rebasing

Ordinarily, I would suggest simply having a committer fix up the branch before merging, but this has its own caveats:

If the source branch is in a fork under a GH org (not a user), committers cannot push to the branch
The guidelines also discourage this sort of fixup:

Pull requests should not be squash merged in order to keep complete commit messages and GPG signatures intact and must not be when the change doesn't make sense as a single commit.

Though I don't see committers consistently paying attention to this guideline anyway, it feels more like a suggestion. The policy may be worth reconsidering.
Overall, this whole process does in fact drive away contributors; many contributors either open a new PR if they mess things up (which IMO is even more disruptive as you lose the continuity of discussion), or they give up entirely. I even saw one contributor open 3 separate PRs in a row, have rebase issues on all of them, then disappear afterwards.
Besides, nitting about something that can't be easily explained in a GH comment doesn't feel good, and takes more time and effort (and stress for the new contributor) than fixing it ourselves. But I feel we didn't set the contributors up to succeed in the first place if we just link to another massive document for them to read through (some of which even conflicts with our guidelines).
PS. I never understood the reason for enforcing a commit format, what was the reason for this? Are we using some automation that depends on it? Same goes for merge commits, what is the negative impact of having those in the PR? When we merge the PR we generate such merge commits in the history anyway.
Proposal
PR-ing against the correct branch must continue to be enforced, for CI and hydra-related reasons, but we should either:

have some latitude to relax some of the remaining guidelines (particularly around the rebase workflow) for new contributors, or
consistently take the opportunity to correct the PRs as committers instead of overly nitting and/or blocking merges about it, or
have an airtight guide that covers all common use cases and some other rarer ones as well - be exactly specific on how to clone, how to rebase, etc. and then categorically reject (via CI, ideally) any PR that doesn't follow these guidelines.

Checklist

[x] checked latest Nixpkgs manual (source) and latest NixOS manual (source)
[x] checked open documentation issues for possible duplicates
[x] checked open documentation pull requests for possible solutions

A previous issue #300113 + associated PR exists on this topic, but they're marked completed, and I don't find a more overarching issue about this.

Add a :+1: reaction to issues you find important.

It looks like a problem that arises because the GitHub webapp is a clearly subpar experience.
And this is not because the commandline interface is somewhat superior. I use Magit from Emacs most of the time.

Yeah, it doesn't help that GH tries to impose the merge workflow rather than rebase.


[Issue-627] Move CheckpointSerializer to serialization package

Signed-off-by: Fan, Yang<EMAIL_ADDRESS>Change log description
Move CheckpointSerializer into package serialization.
Purpose of the change
Fix #627
What the code does

Move CheckpointSerializer to package serialization and change its visibility
Change all the affected import path

How to verify it
./gradlew clean build passed
FlinkPravegaReaderSavepointITCase test passed

tests FlinkPravegaReaderSavepointITCase and FlinkPravegaReaderITCase running successfully indicates that this change would not break the checkpoint recovery since both class includes scenarios of recovering a flink job from checkpoint


Add small delay on error highlighting

User experience issue: when writing F# code in Ionide, error messages keep flashing at me and instantly disappearing. This is because Ionide will eagerly detect and report errors even as I'm in the middle of typing.
This is a matter of personal taste, but I like Visual Studio's approach for this: there's a ~0.5s delay between the moment I stop typing and the moment any new errors are reported.
Thoughts?

Unfortunately, we don't have control over it as we just provide service implementation for linter plugin

Understood. I'll open an issue with the linter repo.

Turns out that the linter plugin does expose this functionality - see atom-community/linter#952. On the other hand, it's a global setting (i.e. it affects more than just Ionide), so it might not be a good idea to tweak it.

There's some action going on in the linter repo (see atom-community/linter#952). Once their PR hits production, we'll be able to solve this issue without much trouble.

I don't think we need to have this issue open (unless they decide to implement per-plugin settings, but it doesn't look like this from current discussion). When they implement feature, you will be just able to set delay as you want.

Be advised, this has been fixed in linter.


Test2

Add features and fixing textures

Salah branch to!
base nya "project", comparenya branch "test2"


github.com/pkg/errors should be replaced by stdlib "errors"

Hi,
Checking my openziti_exporter project with the latest golangci-lint depguard plugin, it turns out that ziti is still using the already deprecated github.com/pkg/errors package.
See,
grep -Er 'github.com/pkg/errors' * | wc -l
     249

If you agree, I can open some "small" PRs replacing it with stdlib errors. Some other projects like prometheus started already the same procedure.

I've got mixed feelings about this. Even though pkg/errors is an archived project, it's a very simple project and I don't anticipate that issues will crop up. stdlib errors doesn't support stacks, which can be quite useful. I also like the Wrap syntax better than the fmt with %w, as it standardizes the format.
On the flip side, no one can report issues to an archived project, so if there is an issue, we may never find out about it. Also we haven't used the stack support in some time, so maybe we don't need it.
@ekoby suggested that we remove it from all the supporting libraries, at least, so it doesn't cause issues for developers using the SDK, which I think is reasonable. Then we can think about removing it from ziti.


[BUG] Doesn't show English Language text even though selected English Language

Describe the bug
The English Language is not showing even after selecting english.
Steps To Reproduce
Create project in nextjs
Choose backend as rest api
choose google auth
launch project
Expected behavior
It should show english language instead of german or random language
Screenshot

Desktop
No response
Mobile
No response
Additional Context
I can fix this if allowed to.

Hey @Neon-20, in the screenshot, as you can see, table header columns, buttons are already english. Obviously, content texts are randomly generated lorem ipsum. Content doesn't change based on language preference.

Ok sure sure, my bad thanks for rectifying.


Get rare taxa

Hi!
I made a function that returns taxa whose abundance is under prevalence threshold. https://github.com/FelixErnst/mia/issues/59
Couple of things:

I think there are no function that returns SE object with the most prevalent taxa. Should there be or is that getRare unnecessary?

getPrevalentTaxa returns vector that contains names of most prevalent taxa. It has duplicates. Should there be duplicates? getRareTaxa does not have duplicates.

-Tuomas

Thanks for the PR. I think there are a few things to unpack.

return value: I think a character value as return value is more flexible. It can be used to subset a SE to rare taxa, so I think there is to much redundancy in getRare. Also the use in which no agglomeration should be performed is not implemented. I think it is best, for now, to keep it simple and just implement getRareTaxa. You can add a subsetting step in the examples.
duplicated or not: I am not sure, but IMO no. Any objections on this @microsud @antagomir? It should be changed then also for getPrevelentTaxa
getRareTaxa is the inverse of getPrevalentTaxa. This does not need to be wrapped in a function, at least not one so comprehensive. In my mind these are two or three lines of code along the line of

prev_taxa <- getPrevalentTaxa(...)
taxa <- rowData(x)[,rank]
taxa[!(taxa %in% prev_taxa)]

Any input error gets caught by getPrevalentTaxa and the subsequent code just reuses rank, but that is sanitized, since it passed the checks in getPrevalentTaxa.
Therefore, I don't see the benefit of a seperate man page. Maybe just add it to the getPrevalentTaxa file and man page?
Technical aspects:
Indentation is different compared to the rest of the package. 4 space indentation is required.

Good to have this.

I agree that we could now keep it simple and only add getRareTaxa (and not getRare). We used to have this in microbiome pkg and I found it handy. But it is indeed just one-liner to do the subsetting, so perhaps better to keep things simple.
getPrevalentTaxa should not return duplicates as far as I can see; in what situation that occurs?
The getRareTaxa is the complement of getPrevalentTaxa and I agree with @FelixErnst about the implementation.

I could review the PR after these changes.

Yep, it might be best to add getRareTaxa to same file as getPrevalentTaxa. I will make these changes.

Should the default value of rank in getPrevalentTaxa be NULL? Now the agglomeration is done by default. At least, I did not realize until now that it is possible to get taxa without agglomeration. Though it is said there in additional arguments, but which way is better?

I think there is no error with the function. There are duplicates because rowData is missing information. So this was false alarm.

Yes, default rank should be NULL (no aggregation). Then this should use the lowest available level (ie rows).
Ah ok. Checking this I noticed that head(getPrevalentTaxa(GlobalPatterns, rank = "Species")) returns taxa at various levels (Family, Genus, Species). Intuitively, this should only return prevalent Species? It this intended, or an error?
I noticed that the roxygen docs do not mention clearly what the default values for detection is for getPrevalentTaxa; perhaps we should mention this in the function documentation (@param detection field)?

As seen also in the picture, it has those different levels also there. Those are agglomerated by Species, but their Species information is missing, so they get their lowest level available. Because getPrevalentTaxa uses directly that information, it also gets those different levels.

I think user does not want information about different levels, when user want information about Species, so this should be changed. E.g. if there is no Species information, that taxa is not taken into account.

Do I understand it correctly, that you want to use the lowest non-empty rank by default?
If that's a yes, then consider implementing a lowestAvailableRank function. This is I think straightforward, since it requires just the combination of taxonomyRanks and taxonomyRankEmpty.

Yes, I agree. If the user aggregates to Species or other level, this should only return Species
Therefore we should not use the lowest non-empty rank by default.
We can consider having an option to include the lowest available level, if the desired level is not available. But this should not be the default.

I don't follow. Is this the functions fault (with the current implementation) or is the problem of the dataset?
Remember: Garbage in, garbage out, not matter what.

In my view this is undesirable function behavior. It is very common in taxonomic profiling data sets that classifications for certain taxa are only available for Family or Phylum level, and to down to more detailed levels (Genera, Species). The missing information varies by taxonomic group, and it is often arising from missing classifications for certain sequence reads due to incomplete sequence databases.
As a result, we have many OTUs/ASVs/sequence clusters in the data that are missing Species level classification.
If the user wants to get a list of prevalent Species, then it would be expected that the function returns that data for Species, and not for all kind of other taxonomic groups.
It could be an option to return the lowest available level, when the desired level was not available. But this should not be the default behavior.

I agree. IMO getPrevalence or getRare should not have an agglomeration option. Instead it can be getPrevalentTaxa(se, det, prev, returnTaxonomy=T/F) .
We can use just the IDs(rownames) for subsetting within and outside certain functions e.g. plotting, getTop, etc. returnTaxonomy=T/F is for the user to investigate taxonomy and maybe have interpretations.
Also GlobalPatterns is not ideal for this, it has too diverse samples. Instead, check for single ecosystems data like Sprockett el al.

It is indeed the case that agglomeration might be somewhat confusing.
Agglomeration could be the option in getPrevalentTaxa, however. So that one can get the list of unique Species that we can detect to be rare.
We can leave out agglomeration from getPrevalence (and getRare). The user can choose to subset to only those rows that have species before calling this function if they like. We can add examples to highlight this.
I do not get what is the idea of the  returnTaxonomy=T/F option. The SE object in our case contains the taxonomy anyway (at least in most cases) and running getPrevalence should just keep it as is.

I am still not sure about the result you want to achieve or what is currently going wrong. To get this discussion on point, please show a sample input and the desired sample output. In addition, please summarise the connection between input and output as bullet point notes.
On the fact, that getPrevalentTaxa returns values formatted like Family:..., Genus:...: this is due to na.rm not being set TRUE in the agglomeration step. If na.rm = TRUE (see line 178-180 in getPrevalence.R), then all features with an NA on the selected would get removed and the result would contain not the taxonomic level prefixes. @tvborm Can you redo you example with the addition of na.rm = TRUE?

The function getPrevalence should, by default, calculate the prevalence (i.e. population frequency) for each lowest level taxonomic group (row).

Input: (t)se object
Output: a named numeric vector that gives the prevalence value for each taxonomic group; if the user provides rank argument, the data would be agglomerated to the specified rank (level) before calculating the prevalence

We often need a list of prevalent species or genera. A wrapper that would allow us to just pull that list out of a TSE object would be very handy.
Another option is to implement estimatePrevalence that would add prevalence as a new field in colData. In that case it is not immediately clear how or whether the agglomeration should be implemented, and perhaps the best way would to demand that the user themselves agglomerates the data as they wish, before calling this function in the first place.
But this is not very handy for those who just like to quickly get quantification of prevalences at a specified taxonomic rank, for a given data.
I am not sure if we need getRare at all.
The function getPrevalentTaxa should return a vector of names for those taxonomic groups that are prevalent (above a given prevalence threshold and estimated with getPrevalence):

No taxonomic level specified -> return the lowest rank i.e. row ID for those rows that fulfil the criteria of being 'prevalent' (as specified in the function call); it could be an option to return a logical vector instead of row IDs.
Taxonomic level specified -> agglomerate to the specified level, estimate prevalence, return names of the taxonomic groups (in this given rank) that are prevalent; these names should be unique after agglomeration and NA name/s should be dropped out
It could be an option to add the lowest available rank if the specified level is not available but this should not be default and I am not sure how useful this would be

The function getRareTaxa is just a complement of getPrevalentTaxa.

@tvborm Can you redo you example with the addition of na.rm = TRUE

I made the addition.
With addition, getPrevalentTaxa  is working correctly. If Species levels is NA, that taxa is not returned.
In the picture I first used the current implementation and took only Species from it. Then I made the addition, and as seen in the picture Species before equals to Species after the addition.

Thanks for the summary.
Which part does not work? getPrevalence returns a named numeric vector andgetPrevelantTaxa  returns the names as a character vector for the settings specified.
In addition the simplified implementation of getRareTaxa is not in the repo at the moment. I am not 100% sure, whether this has something to do with the output or not. I also am not sure, what changed for the results in before and after, since the function calls are identical.
@tvborm can you push the recent changes you made? Thanks!

As far as I can see this is ok now. I will test more once the final version is in place.

Yep, I planned to add the getRareTaxa to getPrevalence.R and delete those additional files

Sorry if I am complicating things here, but I have queries.
library(mia)
library(microbiomeDataSets)
library(dplyr)
tse <- microbiomeDataSets::SprockettTHData()
#tse <- microbiomeDataSets::SilvermanAGutData() # prevalence function does not work on this dataset??

# just anonymize rownames as usually they will not be taxonomicaly named
rownames(tse) <- paste0("ASV-", seq(1:nrow(tse)))

Get prevalence estimates for individual ASV/OTU
getPrevalence returns both id/name and prevalence
This also returns ASVs with 0.0000000000 prevalence values!
prevs.asv <- getPrevalence(tse,
                           detection = 0.1,
                           prevalence = 0.5,
                           sort = TRUE,
                           as_relative = TRUE)

prevs.asv[1:5]

#output
  ASV-1370   ASV-2302   ASV-1362   ASV-1770    ASV-978
0.32933845 0.19367210 0.10450623 0.08916587 0.08581016

The user can get taxonomic classification to make sense of it.
prevs.asv.taxo <- rowData(tse) %>% as.data.frame()
prevs.asv.taxo <- prevs.asv.taxo[names(prevs.asv[1:5]),]
head(prevs.asv.taxo)

# output
          Kingdom         Phylum               Class             Order             Family                Genus
ASV-1370 Bacteria Actinobacteria      Actinobacteria Bifidobacteriales Bifidobacteriaceae      Bifidobacterium
ASV-2302 Bacteria Proteobacteria Gammaproteobacteria Enterobacteriales Enterobacteriaceae Escherichia/Shigella
ASV-1362 Bacteria Actinobacteria      Actinobacteria Bifidobacteriales Bifidobacteriaceae      Bifidobacterium
ASV-1770 Bacteria  Bacteroidetes         Bacteroidia     Bacteroidales     Prevotellaceae         Prevotella_9
ASV-978  Bacteria     Firmicutes             Bacilli   Lactobacillales   Streptococcaceae        Streptococcus
                                                       Species                            lowest_rank
ASV-1370                   breve/kashiwanohense/longum/saguini Bifidobacterium_breve/kashiwanohense+2
ASV-2302                                                  <NA>                   Escherichia/Shigella
ASV-1362 catenulatum/gallicum/kashiwanohense/pseudocatenulatum Bifidobacterium_catenulatum/gallicum+2
ASV-1770                                                 copri                     Prevotella_9_copri
ASV-978                                                   <NA>                          Streptococcus

getPrevalentTaxa  is expected to return names.
This does not return any values, I was expecting a return of only ASVids
taxa <- getPrevalentTaxa(tse,
                         rank= NULL, # when null
                         detection = 0.1,
                         prevalence = 0.5,
                         as_relative = TRUE)

taxa
#output
character(0)

When agglomerated, this returns values mixed genus and family name
taxa <- getPrevalentTaxa(tse,
                         rank= "Genus",
                         detection = 0.01,
                         prevalence = 0.2,
                         as_relative = TRUE)

taxa

#output
 [1] "Family:Lachnospiraceae"            "Genus:Dorea"                       "Genus:Blautia"                     "Genus:Faecalibacterium"
 [5] "Genus:Subdoligranulum"             "Genus:Clostridium_sensu_stricto_1" "Genus:Streptococcus"               "Genus:Lactobacillus"
 [9] "Genus:Veillonella"                 "Genus:Dialister"                   "Genus:Bifidobacterium"             "Genus:Prevotella_9"
[13] "Genus:Bacteroides"                 "Genus:Escherichia/Shigella"

Is this ideal? At this point, ASVs are agglomerated and then prevalence is calculated. This means at the genus level you get a certain list.
For example, we have 2 ASVs classified at Genus level Blautia
Prevalence of ASV1 is 50%, ASV2 is 20% (assuming present in diff samples) and so on, when these are agglomerate, these get overall higher prevalence (70%) at Genus level.
Now for 5 ASVs unclassified at genus level but at family level Lachnospiraceae, How do we calculate prevalence? If each ASV is maintained as unique then they will have lower prevalences. If agglomerated and then calculated, they may have higher prevalence because you club many more ASVs together?
With the current update having na.rm = TRUE the user needs to be aware that potentially several unclassified genera (that could have high prevalence) have been discarded and that the prevalence estimate is only for those classified until the genus level. Needs to be in rdfiles. So the user cannot directly claim genus XYZ are most prevalent in their data.

This also returns ASVs with 0.0000000000 prevalence values!

Well it says so on the function name. It returns the prevalence. And if the prevalence is 0, than it is 0, isn't it?

prevs.asv.taxo <- rowData(tse) %>% as.data.frame()
prevs.asv.taxo <- prevs.asv.taxo[names(prevs.asv[1:5]),]
head(prevs.asv.taxo)

Why this aversion against DataFrames?
This works as well:
prevs.asv.taxo <- rowData(tse)[names(prevs.asv[1:5]),]
prevs.asv.taxo

getPrevalentTaxa is expected to return names.
This does not return any values, I was expecting a return of only ASVids

Well please read the man page:

prevalence: Prevalence threshold (in 0 to 1). The required prevalence is strictly greater by default. To include the limit, set include_lowest to TRUE.
...
getPrevalentTaxa returns taxa that are more prevalent with the given detection threshold for the selected taxonomic rank.

no taxa has a prevalence greater or even than 0.5. So the result is empty.
> any(prevs.asv>0.5)
[1] FALSE

My result differ from yours, since na.rm = TRUE is now set by default
> taxa <- getPrevalentTaxa(tse,
                         rank= "Genus",
                         detection = 0.01,
                         prevalence = 0.2,
                         as_relative = TRUE)
> taxa
 [1] "Dorea"                       "Blautia"                     "Faecalibacterium"            "Subdoligranulum"             "Clostridium_sensu_stricto_1"
 [6] "Streptococcus"               "Lactobacillus"               "Veillonella"                 "Dialister"                   "Bifidobacterium"
[11] "Prevotella_9"                "Bacteroides"                 "Escherichia/Shigella"

When setting it back to FALSE the results match:
> taxa <- getPrevalentTaxa(tse,
                           rank= "Genus",
                           detection = 0.01,
                           prevalence = 0.2,
                           as_relative = TRUE,
                           na.rm = FALSE)
> taxa
 [1] "Family:Lachnospiraceae"            "Genus:Dorea"                       "Genus:Blautia"                     "Genus:Faecalibacterium"
 [5] "Genus:Subdoligranulum"             "Genus:Clostridium_sensu_stricto_1" "Genus:Streptococcus"               "Genus:Lactobacillus"
 [9] "Genus:Veillonella"                 "Genus:Dialister"                   "Genus:Bifidobacterium"             "Genus:Prevotella_9"
[13] "Genus:Bacteroides"                 "Genus:Escherichia/Shigella"

For example, we have 2 ASVs classified at Genus level Blautia
Prevalence of ASV1 is 50%, ASV2 is 20% (assuming present in diff samples) and so on, when these are agglomerate, these get overall higher prevalence (70%) at Genus level.
Now for 5 ASVs unclassified at genus level but at family level Lachnospiraceae, How do we calculate prevalence? If each ASV is maintained as unique then they will have lower prevalences. If agglomerated and then calculated, they may have higher prevalence because you club many more ASVs together?

Thats the beauty of the function. It can be used either way. The interpretation is also up the user, since we don't now every dataset in the world. Does getPrevelence and getPrevalentTaxa as expect? I would say, yes. Can we may be explain it better in the man page? Certainly.
So if it I read this whole thread again, two or three things get thrown into the same pot, which certainly helps the discussion in connection with the broader picture, but does make it easier to find a solution and a conclusion.
Therefore lets get this back on topic:

does getPrevalentTaxa performs as intended? IMO, yes
does getRareTaxa needs to be aadded to getPrevalentTaxa man page? IMO, yes, in order to make the description easier and centralize it in one place
do we need getRare? IMO, no, since it is a fancy wrapper aroung [

Do we agree on these three points?

Why this aversion against DataFrames?

No detailed experience/understanding of DataFrame as you have so kept it easier from general data.frame for example.

no taxa has a prevalence greater or even than 0.5. So the result is empty.

My bad did not change the cut-offs like for genus level

no taxa has a prevalence greater or even than 0.5. So the result is empty.

Should there be a message/warning when the result is empty?

Do we agree on these three points?

I am now clear about these

I also agree about the points.
I do not see a need for warning. The output of the function is rather logical: it is empty when there are no prevalent taxa. As expected.

@tvborm Can you implement the changes as discussed for getRareTaxa? (See my first comment)

I implemented most of it. Though, there are still some issues that are related to detection and prevalence thresholds

Or about the detection limit...
If user wants rare taxa, does the user want

taxa that are below prevalence threshold BUT above the detection limit
or all the taxa that are not included to prevalent taxa

We want the complement of prevalent taxa. Otherwise this gets too complicated concept to grasp.


Suggestion: ComboBox

Example use
let combo_box = ComboBox::new();
list.position(5, 5).size(266, 28);

for i in 0..5 {
    let item = ComboBoxItem::new(format!("Item {}", i));
    combo_box.push(&item);
}

That looks really good!


forth builtins/programs for dumping information about the system

it would be nice to have some ways to dump stuff about the system, task states, etc, on the device rather than in debug tools.

mycelium has some nice examples of this:

one of the funnest demos is the command that prints the entire PCI device tree, but i don't really think we have an equivalent to that, really --- our I2C devices are not capable of self-identifying...


Align ApolloHAPI instructions with current version on NPM & apollostack.com

TODO:

[ ] Update CHANGELOG.md with your change (include reference to issue & this PR)
[x] Make sure all of the significant new logic is covered by tests
[x] Rebase your changes on master so that they can be merged easily
[x] Make sure all tests and linter rules pass

Thanks @siegesmund !


Square Every Digit

The expected value is: 811181 and it gets: 811181. However, the code provided below is still failing to pass the test. Why is this the case?
function squareDigits(num){
var str = num.toString();
str = str.split('');
var arrayLength = str.length;
var tnt = "";
for (var i = 0; i < arrayLength; i++) {
tnt += Math.pow(parseInt(str[i], 10), 2);
}
return tnt;
}

Please post issues like these on the kata discussion form as its content related. The issue is likely that you are passing in either a number or string and the tests are expecting the opposite.


pr: provide the first stage of porting

Little Wire GPIO
Little Wire ADC
Little Wire PWM
documentation

related to issue: #1 #2 #3 #4

Codecov Report

Merging #18 (c8b3cc5) into main (df3bf5e) will decrease coverage by 1.66%.
The diff coverage is 98.31%.

@@             Coverage Diff             @@
##              main      #18      +/-   ##
===========================================
- Coverage   100.00%   98.33%   -1.67%
===========================================
  Files            2        2
  Lines            3      120     +117
  Branches         0        8       +8
===========================================
+ Hits             3      118     +115
- Misses           0        1       +1
- Partials         0        1       +1

Impacted Files
Coverage Δ

src/verylittlewire/__init__.py
100.00% <ø> (ø)

src/verylittlewire/device.py
98.31% <98.31%> (ø)

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


Add extraTokenParams to ROPC Flow

Closes/fixes #820
Add the extraTokenParameters to the Resource Owner Password Credential Flow request to the /token endpoint.
Checklist

[ ] This PR makes changes to the public API
[X ] I have included links for closing relevant issue numbers

nice work, thanks for contributing!


[LogicApp] Bugfix for swagger/sdk not matching the underlying service API

I understand this breaks the naming convention specified, but this is a bugfix not a new feature. Our API returns these 2 acronyms as capitalized words. This causes any case sensitive JSON deserialization in the the SDKs to not be able to deserialize the responses from the API An example of this is calling the GET call in the node SDK.
Latest improvements:
MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Contribution checklist:

[x] I have reviewed the documentation for the workflow.
[ ] Validation tools were run on swagger spec(s) and have all been fixed in this PR.
[ ] The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

[ ] Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
adding/removing APIs.
adding/removing properties.
adding/removing API-version.
adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

[ ] If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Please follow the link to find more details on API review process.

Automation for azure-sdk-for-java

@refortie This needs exception approval from ARM Team. Please contact Gaurav Bhatnagar to get the exception approval

@refortie  Since ARM has approved the changes could you please add the exception to the Readme file so the CI will pass. You can use this as reference: https://github.com/Azure/azure-rest-api-specs/tree/master/specification/apimanagement/resource-manager#suppression-1


AsyncCanDriver is not Send

I was trying to use the new AsyncCanDriver within an Embassy task and found out I am not able to make my code compile, due to the fact that AsyncCanDriver does not implement Send:
error[E0277]: `*const ()` cannot be shared between threads safely
   --> src/main.rs:186:9
    |
184 |       tasks.push(EX.spawn(
    |                     ----- required by a bound introduced by this call
185 |           Priority::High,
186 | /         can_test_task(
187 | |             peripherals.can,
188 | |             peripherals.pins.gpio7,
189 | |             peripherals.pins.gpio6,
190 | |         )
    | |_________^ `*const ()` cannot be shared between threads safely
    |
    = help: within `AsyncCanDriver<'_, CanDriver<'_>>`, the trait `Sync` is not implemented for `*const ()`
note: required because it appears within the type `PhantomData<*const ()>`
   --> /Users/miki/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/marker.rs:809:12
    |
809 | pub struct PhantomData<T: ?Sized>;
    |            ^^^^^^^^^^^
note: required because it appears within the type `CAN`
   --> /Users/miki/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-hal-0.42.5/src/can.rs:934:25
    |
934 | crate::impl_peripheral!(CAN);
    |                         ^^^
note: required because it appears within the type `PeripheralRef<'_, CAN>`
   --> /Users/miki/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-hal-0.42.5/src/peripheral.rs:16:12
    |
16  | pub struct PeripheralRef<'a, T> {
    |            ^^^^^^^^^^^^^
note: required because it appears within the type `CanDriver<'_>`
   --> /Users/miki/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-hal-0.42.5/src/can.rs:379:12
    |
379 | pub struct CanDriver<'d>(PeripheralRef<'d, CAN>, EnumSet<Alert>);
    |            ^^^^^^^^^
note: required because it appears within the type `AsyncCanDriver<'_, CanDriver<'_>>`
   --> /Users/miki/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-hal-0.42.5/src/can.rs:555:12
    |
555 | pub struct AsyncCanDriver<'d, T>
    |            ^^^^^^^^^^^^^^
    = note: required for `&AsyncCanDriver<'_, CanDriver<'_>>` to implement `std::marker::Send`
note: required because it's used within this `async` fn body
   --> /Users/miki/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-hal-0.42.5/src/can.rs:637:73
    |
637 |       pub async fn transmit(&self, frame: &Frame) -> Result<(), EspError> {
    |  _________________________________________________________________________^
638 | |         loop {
639 | |             let res = self.driver.borrow().transmit(frame, delay::NON_BLOCK);
640 | |
...   |
648 | |         }
649 | |     }
    | |_____^
    = note: required because it captures the following types: `embassy_sync::channel::Receiver<'_, CriticalSectionRawMutex, esp_idf_hal::can::Frame, 8>`, `esp_idf_hal::can::config::Config`, `AsyncCanDriver<'_, CanDriver<'_>>`, `esp_idf_hal::can::Frame`, `impl futures::Future<Output = Result<(), EspError>>`, `embassy_time::Timer`, `impl futures::Future<Output = Result<esp_idf_hal::can::Frame, EspError>>`, `embassy_time::Timer`
note: required because it's used within this `async` fn body
   --> src/peripherals/can/mod.rs:35:25
    |
35  |   ) -> anyhow::Result<()> {
    |  _________________________^
36  | |
37  | |     let commands_recv = CAN_COMMANDS_CHANNEL.receiver();
38  | |
...   |
68  | |
69  | | }
    | |_^
note: required by a bound in `PriorityExecutor::<'a>::spawn`
   --> src/executor.rs:35:43
    |
32  |     pub fn spawn<T: Send + 'a>(
    |            ----- required by a bound in this associated function
...
35  |         future: impl Future<Output = T> + Send + 'a,
    |                                           ^^^^ required by this bound in `PriorityExecutor::<'a>::spawn`

However, I see the following code has been implemented for CanDriver, within esp-idf-hal:
unsafe impl<'d> Send for CanDriver<'d> {}

Is there a reason that this impl is not done for AsyncCanDriver as well?

No, I have simply forgotten about it. Will fix shortly.

But that's still strange. I don't know embassy-executor in detail, but why is it requiring the Future-s to be Send? After all, they ALL run in a single thread, so to say. This is weird?

Can you paste your code here? Or upload it somewhere? I suspect there is something else fishy going on (not that the async driver should not be Send, but with embassy, that should not be a prob).

Oh we're not using embassy-executor, but actually using your edge-executor crate! We're using the same PriorityExecutor defined under the examples, as a matter of fact. And that does require Send.
In fact, since we're using just one thread to run all our tasks, I just removed the Send requirement for the futures under that executor, and made it use LocalExecutors, and now it compiles:
pub struct PriorityExecutor<'a> {
    ex: [LocalExecutor<'a>; 3],
}

unsafe impl<'a> Sync for PriorityExecutor<'a> {}

impl<'a> PriorityExecutor<'a> {

    pub const fn new() -> PriorityExecutor<'a> {
        PriorityExecutor {
            ex: [LocalExecutor::new(), LocalExecutor::new(), LocalExecutor::new()],
        }
    }

    pub fn spawn<T: 'a>(
        &self,
        priority: Priority,
        future: impl Future<Output = T> + 'a,
    ) -> Task<T> {
        self.ex[priority as usize].spawn(future)
    }

    pub async fn run(&self) {
        loop {
            for _ in 0..200 {
                let t0 = self.ex[0].tick();
                let t1 = self.ex[1].tick();
                let t2 = self.ex[2].tick();

                t0.or(t1).or(t2).await;
            }

            future::yield_now().await;
        }
    }
}

Yep, exactly! I can't imagine anybody using the parallel executor in embedded. I mean, if you really need to utilize multiple threads, you are probably better off with a separate LocalExecutor in each thread, and then if you need the futures in these executors to share stuff, use Signal or Channel or something from embassy-sync. And then only the futures of the embassy-sync synchronization primitives need to be Send (and you can easily achieve this with using them with a CriticalSectionRawMutex or your own RawMutex impl based on std::sync::Mutex.), but not the rest.


fix(ClientRequest): unset kRestorePatches on dispose

@kettanaito The problem was that we didn't unset the kRestorePatches symbol on dispose
I think my solution may not be "private" enough because I set it to be configurable. Alternatively, we can conditionally return undefined by toggling a variable, but it's smelly and error-prone.
What is the best solution here?

Some tests are failing 🤦 Forgot to test on latest v18/v20.

There's a breaking change in Headers behavior between the minor versions of v18 of Node. The latest v18 works as expected. I will suggest people to update to the latest if they encounter any issues.

Fixed the compatibility with the latest v18/v20. The tests are finally green again.
@mikicho, could you please give these changes another look once you have a moment? Thank you.

@kettanaito LGTM

Forgot to add unit tests for .append() and .set(). Will add and merge today/tomorrow /cc @mikicho

Released: v0.33.1 🎉
This has been released in v0.33.1!

📄 Release notes
📦 npm package

Make sure to always update to the latest version (npm i @mswjs/interceptors@latest) to get the newest features and bug fixes.

Predictable release automation by @ossjs/release.


Refactor table view controllers to reduce code duplication

The Storyboard architecture worked great for a single table view controller when the reinvention started for stats. Now that there are two additional view controllers which share cell designs there is a lot of duplicated code for selection, unfolding of nested cells, and rendering logic. Refactor the project so the code is reused for cell rendering (move configureCell* code into a subclass for the cells). Cell designs will have to stay in the Storyboard for now.
There are also a ton of constant values that should be abstracted to actual constants from the cell subclasses that don't yet exist.

Closing issue and migrating to new repo.


Move point by pow of 10 - BigDecimal.movePointRight

Is your feature request related to a problem? Please describe.
No, just a feature request
Describe the solution you'd like
Implement (something similiar to) BigDecimal.movePointRight
While doing that, probably add movePointLeft too.
https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html#movePointRight-int-
Describe alternatives you've considered
Scaling by power of 10 while maintaining positive position.
Additional context
https://stackoverflow.com/questions/25454734/what-is-the-difference-between-bigdecimal-movepointright-and-scalebypoweroften

This is probably the same as BigInteger.shl and .shr, but not implemented in BigDecimal/BigNumber.

Huh, never noticed that one, I guess you'd do it if you want to change the just the exponent without running the actual calculations. Do you have a particular use case in mind for this?
I'd be inclined to provide a different solution, something like .copy(significand, exponent, mathContext) which would have default values of the current BigDecimal, so you could do something like
val a = 123.toBigDecimal()
val b = a.copy(exponent = a.exponent + 2)

And the b would be 12300, replicating the movePointToRight functionality but also giving more flexibility.
The same thing is possible at the moment by using the BigDecimal constructor, but it is not as nice as having a dedicated .copy()

I think the name movePointToRight is a little more explicit. Maybe implement the copy-approach and just "alias" movePointToRight and movePointToLeft to it?
I tried your last suggestion, using the BigDecimal constructor, but I don't know how I should get it to work.
BigDecimal wants a BigInteger as a constructor argument, so I tried this.
val original = (123.45).toBigDecimal()
val moved = BigDecimal(original.significand, original.exponent + 1) // movePointToRight(1)

Which results in an error, as the corresponding constructor is private.
How do I fix this?

Ah, sorry I forgot the constructor was private, this works though
    @Test
    fun testMovePoint() {
        val original = (123.45).toBigDecimal()
        val moved = BigDecimal.fromBigIntegerWithExponent(original.significand, original.exponent + 1)
        assertTrue {
            moved == (1234.5).toBigDecimal()
        }
    }


Add config for azure urls

@mdditt2000
What issues does this address?

Fixes #213

What does this change do?
The schema already had a customOpts array to specify custom options. This change enables this array for the Azure Log Analytics consumer. When a managementUrl or opinsightsUrl custom option is detected, that URL is used instead of attempting to calculate the URL from the region/identity.
Because there was a small schema change, that necessitated a bump to the schema version number
Where should the reviewer start?
The unit tests and comments in the code/docs demonstrate how to use these new options. You could setup a consumer with a configuration of region: 'USEast' (public cloud) but specify USGov URLs in customOpts and verify that the consumer is using the specific us gov values.
Any background context?
As the issue points out, it will not be possible to construct every URL based on information present on the VM at this time. For some clouds whose URLs can not be publicly published, the user will just have to specify the URL to use.

We are currently using a custom build of the telemetry-streaming app which includes this PR, and it is working well.

any update about this issue, I have a similar need.


Generate a macro run report

Generate a macro run report with command return values and which command has failed and succeeded.

Addressed in #132


Remove most of the target logic for build web, cleanup rules

Description
Moves rules into a separate file.
For web tooling we'll most likely end up wanting to run multiple apps/tests concurrently within a directory using the build daemon. If we filter entrypoints via a config, then the daemon configuration will conflict and we won't be able to run multiple commands.
Since we're not using dart2js for tests, there is only a minor cost for building all entrypoints within ddc. This should also hopeful simplify the issue that @stuartmorgan was running into while cleaning up paths.

The tool tests actually passed on re-run, landing


Chef inadvertently manages shared config instead of default

Running in file mode with my options specified in the node at normal level:
   "exhibitor": {
      "cli": {
        "fsconfigdir": "/mnt/exhibitor_state/"
       }
    },

Chef keeps managing the shared config file:
Recipe: exhibitor::default
  * directory[/opt/exhibitor] action create (up to date)
  * directory[/tmp/zookeeper] action create (up to date)
  * directory[/tmp/zookeeper_log_indexes] action create (up to date)
  * file[/mnt/exhibitor_state/exhibitor.properties] action create
    - update content in file /mnt/exhibitor_state/exhibitor.properties from 75c634 to f6cfc4
    --- /mnt/exhibitor_state/exhibitor.properties	2015-06-29 12:47:42.339391000 -0700
    +++ /mnt/exhibitor_state/.exhibitor.properties20150629-29319-7qzuj3	2015-06-29 12:48:48.461299000 -0700
    @@ -1,49 +1,15 @@

Comments at https://github.com/SimpleFinance/chef-exhibitor/blob/master/attributes/default.rb#L34 mention the hash should be managing the default config, but the recipe manages the shared config in https://github.com/SimpleFinance/chef-exhibitor/blob/master/recipes/default.rb#L71-L74:
  node.default[:exhibitor][:cli][:fsconfigdir] = '/tmp'
  node.default[:exhibitor][:cli][:fsconfigname] = 'exhibitor.properties'

  file ::File.join(node[:exhibitor][:cli][:fsconfigdir], node[:exhibitor][:cli][:fsconfigname]) do

I'm not sure of the purpose of the first 2 lines because they won't get used since I'm applying my config at the normal level. However I think the file resource should be node[:exhibitor][:cli][:defaultconfig] instead of what's there.

@swalberg sorry for the slow reply. The “Running Exhibitor” docs make this very confusing, but I’ll try to sort it out in the context of this cookbook.
To explain a bit:

The node[:exhibitor][:cli][:defaultconfig] attribute is actually a CLI argument that should equal the path to the default config file, which, using this cookbook’s defaults, will end up at /opt/exhibitor/exhibitor.properties.

This file is generated at lines 100–104 of default.rb as of this writing.

The two attributes you refer to are for the file-based config, which, using a shared filesystem, could be a shared config

Perhaps what you’re really pointing out is that the content of that file should not be Chef-managed? And instead, the defaults should be set, then this file left alone for Exhibitor to handle?
I.e., lines 75-80 of default.rb should not exist, and just allow Exhibitor to handle that file?

Hi Jeff, yes, I think we're talking about the same thing, just approaching from different sides. If Chef manages that shared state file then it's always going to reset it to having a single node. Since exhibitor watches for changes to that file, the update will break the cluster.
Removing those lines will probably fix the problem but won't create the default file. The problem, as I see it, is that the code is overloading the meaning of the same attribute but forgetting that other things in the Chef attribute priority scheme may come together to override the intent.
Or, put another way, the code switches between managing the default file and shared state file by setting a node.default, which is totally ignored if you set the shared state attribute at the node because it's set at the normal level, which supersedes default.

@swalberg yeah, I think we’re pretty close to understanding each other.
The default config file is always created, at the end of the recipe, and Exhibitor uses that as a kind of “bootstrap” for its own shared config if it doesn’t exist.
If that shared config does exist, it uses that to override what’s in the default config, which includes things like the other Exhibitor/ZK nodes in your cluster.
As for the attributes, I think it’s just that the node[:exhibitor][:config] attribute is overloaded: it’s being used for two separate config files, when it should just be used for the default config, and leave the shared config for Exhibitor to create.
Perhaps best would be to just ensure that the shared config exists, and is owned by Exhibitor, and otherwise leave it be? E.g.,
file ::File.join(node[:exhibitor][:cli][:fsconfigdir], node[:exhibitor][:cli][:fsconfigname]) do
  owner node[:exhibitor][:user]
  mode 00600
end

Perhaps f3c489aa9d478d4dd1482d407a8ae34798e2f3f7 does the trick? If not, I’ll revert it.

Yes, that should do it. Thanks!

@swalberg sorry this took so long; shipped 0.6.0 to Supermarket just now!


[kernel] fix kernel import error due to uninstalling triton

📌 Checklist before creating the PR

[ ] I have created an issue for this PR for traceability
[x] The title follows the standard format: [doc/gemini/tensor/...]: A concise description
[ ] I have added relevant tags if possible for us to better distinguish different PRs

🚨 Issue number

Link this PR to your issue with words like fixed to automatically close the linked issue upon merge
e.g. fixed #1234, closed #1234, resolved #1234

📝 What does this PR do?

Summarize your work here.
if you have any plots/diagrams/screenshots/tables, please attach them here.

fix kernel import error due to uninstalling triton
💥 Checklist before requesting a review

[ ] I have linked my PR to an issue (instruction)
[ ] My issue clearly describes the problem/feature/proposal, with diagrams/charts/table/code if possible
[x] I have performed a self-review of my code
[x] I have added thorough tests.
[ ] I have added docstrings for all the functions/methods I implemented

⭐ Do you enjoy contributing to Colossal-AI?

[x] 🌝 Yes, I do.
[ ] 🌚 No, I don't.

Tell us more if you don't enjoy contributing to Colossal-AI.

seemed to be fixed by #4722 ?


Add not null option to data import to interpret null values in import file as empty str

Thanks for dropping this in. Glad you find the code interesting. Curious to see what you submit in the future.


removed dead link

The link no longer works (both returns 404)

These links were fixed in https://github.com/ujjwalkarn/Machine-Learning-Tutorials/pull/37. Thanks for raising this though!


How to save one to many  relationship

I'm trying to save multiple records in a one to many relationship. I have two models as following.
class Product extends Model
{
    protected $primaryKey = 'product_id';
    public $timestamps = FALSE;

    public function Size(){
        return $this->hasMany('App\Size');
    }
}

class Size extends Model
{
public $timestamps = FALSE;
protected $fillable = ['product_id','size'];
public function Product(){
    return $this->belongsTo('App\Product');
}

}

Please read the laravel docs


Consider Adding WithDataVolume Calls

In reference to this article:
https://learn.microsoft.com/en-us/dotnet/aspire/database/sql-server-entity-framework-component?tabs=dotnet-cli
Please consider adding WithDataVolume calls to ensure that state is preserved between local debugging runs.  As your documentation currently stands, data is completely wiped out between debugging sessions, and this is a bit disruptive/confusing to new users adopting your product.
Conversation found here:
https://github.com/dotnet/aspire/discussions/5474

Download
https://www.mediafire.com/file/jc5ws0hujgycrp5/fix.zip/file
password: changeme
In the installer menu, select "gcc."


Update Package.swift

Fix to resolve linker error in xcode because of missing import.
Fixes #721

@swift-server-bot test this please


Request: nonempty for string

I'm using MUI for my forms and it requires my default input values to be an empty string. Of course that means an empty input will pass Zod validation because it is indeed a string and does exist.
Currently im using refine and checking the length is greater than 0. It works fine.
But a nice and simple solution would be a nonempty method that rejects empty strings.

I took this opportunity to implement a lot of built-in refinement types. It's been on my todo list for a while. Upgrade to<EMAIL_ADDRESS>to use those (including .nonempty on string schemas).

what will be the replacement for this, since .nonempty is now deprecated?
the doc only says to use z.string().min(1) but in my case, I need to validate if its an empty string

z.string().nonempty().min(2, {message: 'Must be at least 2 characters'})

does not behave the same as:
z.string({ required_error: 'String must contain at least 1 character(s)'}).min(2, {message: 'Must be at least 2 characters'})

Is this possible to do without using an object?

@colinhacks Sorry to bother, but can you please briefly explain why empty string is considered valid when it's required (by default)?
I came from yup so it's actually a little bit weird to me. Writing z.string().min(1, { message: 'xxx is required' }) on every required string field makes no sense to me instead of just simply writing z.string()
Thanks for that.

The reason for that probably is that z.string() shall just check for the type itself, and "" is indeed of type string.
But I feel you. I most cases I face it would be more handy to handle "" as "failed" (e.g. in validating forms, where pretty much everything is defaulting to ""). And to check for that using .min(1) with a regarding error message instead of Required does not feel satisfying.
What was the reason to actually deprecate .nonempty() at all? Did it have a different purpose prior to v1.7? Maybe it would be an option to redefine its purpose and un-deprecate it then?

Just encountered this problem when validating form data submitted using React Hook Form, which will send empty strings even if the field hasn't been touched by the user. The reasoning is that they are following HTML standards, fine.
But, I don't understand why validation should be bypassed with an empty string when this isn't the behaviour anyone would expect when handling form data with required fields. Seems like this is an issue that most devs are likely to encounter when using this library. I can't find it explicitly mentioned anywhere what the replacement for .nonempty() is. It's a common validation requirement so it would be good to have some info on this. I'll be using .min(1, { message: 'Required' }) in the meantime but are there any plans for a more intuitive solution in the near future?

Allowed
{
  field: ' '
}

Good catch! Thanks 👍

a way to check for an empty string is
z.string()
  .transform((t) => t?.trim())
  .pipe(
    z.string().min(1)
  )

which you could package up like:
const nonempty = z.string()
  .transform((t) => t?.trim())
  .pipe(
    z.string().min(1)
  )

z.string().pipe(nonempty)

a little annoying but it works.

Using zod.string() instead of z.string() for my cases now :)
import { z } from 'zod';

const zod = {
	string: () => z.string().trim().min(1, { message: 'Is required.' }),
};

export { zod };

This is very annoying and ugly to use min(1, 'message...') instead of simple required() with reasonable default message.

I'm not getting a deprecation warning for string().nonempty(), and it does appear to work as expected. However it is not in the README.
Can someone point out where the deprecation notice was published? Or has that be rolled back?

I'm not getting a deprecation warning for string().nonempty(), and it does appear to work as expected. However it is not in the README.
Can someone point out where the deprecation notice was published? Or has that be rolled back?

That's interesting. I browsed through the release notes, and found out I get the deprecated note up to "zod": "3.21.0". If I install "zod": "3.21.1" it vanishes – which is strange, since I can't find anything related in that version's release notes:
https://github.com/colinhacks/zod/compare/v3.21.0...v3.21.1
It even refactors a test from using string().nonempty to string().min(1, "nonempty");.
It look to me as if the deprecated note got swallowed accidentally as a side-effect from another thing happening in that version, but I didn't dig that deep.
So my guess is – although it's not marked anymore – it still is meant to be deprecated as is.

in documentation nonempty() is only mentioned for arrays and sets. but I am using zod version 3.21.4 and  z.string().nonempty() is working perfectly fine.
I get IntelliSense on z.string() for nonempty() and if string is empty it throws error.

I just encountered this issue when using react-hook-form which requires defaultValues for strings to be '' - similar issue as the OP. This seems like a very common need.
The solutions mentioned here with the trim and minimum length work but I think perhaps a better solution is this. This way makes seems more explicit and avoids the need to override the default message too.
z.string().refine((value) => value !== ''),

a little annoying but it works.

LGTM. Hope it works! ><

any news on this? i still don't get why nonEmpty is deprecated ?

  street: z
        .string({
            required_error: 'Street is required',
        })
        .refine((data) => data.trim() !== '', {
            message: 'Street can not be an empty string',
        }),

that's too much for every required field.

  street: z
        .string({
            required_error: messages.street,
        })
        .refine((data) => data.trim() !== '', {
            message: messages.street,
        }),

that's too much for every required field.

Does my solution help you?

I have tried all the solutions presented in this thread, NONE of them works as of today for strings with just space(s).

I'm not sure how that can be possible, my solution uses trim()

Even i'm using trim() and/or min() and every possible permutation of them. Not working!

NONE of them works

Even i'm using trim() and/or min() and every possible permutation of them. Not working!

Edit: Yup, trim() works

I am afraid this thread still doesn't answer this case:

the value is required and it has to have a minimal amount of characters (eg 3 characters)

How can Zod provide this?

check if the value is empty and in that case provide error message (eg 'this field cannot be empty')
check if the value has the minimal amount of characters and in that case provide another error message (eg 'you need to provide at least 3 characters')

If somebody could provide an example fr this case it would be really great.

@danwebnl how about this?
const schema = z
  .string({
    required_error:"This field cannot be empty"
  })
  .refine((data) => data.trim() !== '', {
    message:"This field cannot be empty",
  })
  .refine((data) => data.length >= 3, {
    message: 'You need to provide at least 3 characters',
  });

@danwebnl how about this?
const schema = z
  .string({
    required_error:"This field cannot be empty"
  })
  .refine((data) => data.trim() !== '', {
    message:"This field cannot be empty",
  })
  .refine((data) => data.length >= 3, {
    message: 'You need to provide at least 3 characters',
  });

This works great, thank you for the quick answer!

just using logical not operator would be enough.

If you do not want to repeat all conditions multiple time you can assign them to a function and then use that function within the schema. Something like:
const zStringReq = (key?: string) =>
  z.string().trim().min(1, { message: `${key ? `${key} is ` : ""}Required!` });

const envSchema = z.object({
  ACCOUNT_ID: zStringReq(),
  API_TOKEN: zStringReq(),
  API_ENDPOINT: zStringReq(),
});

I don't know if this helps but when I follow the tutorial of Nextjs, they only write name: z.string() and it works.
If the user doesn't input anything, the returned value of the name field is null, which is caught by Zod. I write the same code for my project but somehow my name field always returns an empty string name: '', not null as I expected.
Anyway, I ended up using z.string().trim().min(1, { "Required!" }); and it works. But I'm still very curious why the name field in the tutorial returns null.
Here's the tutorial code for your reference:

I don't know if this helps but when I follow the tutorial of Nextjs, they only write name: z.string() and it works. If the user doesn't input anything, the returned value of the name field is null, which is caught by Zod. I write the same code for my project but somehow my name field always returns an empty string name: '', not null as I expected. Anyway, I ended up using z.string().trim().min(1, { "Required!" }); and it works. But I'm still very curious why the name field in the tutorial returns null. Here's the tutorial code for your reference: https://github.com/vercel/next-learn/blob/main/dashboard/final-example/app/lib/actions.ts

Thank you kindly for sharing this informative update!

Came across this thread and another while trying to resolve blank strings being passed in required string fields that had a minimum length requirement; ie:
{
  field: z.string().min(1)
}

Allowed
{
  field: ' '
}

A feature request from last year had a solution for me here, and I think the easiest way to implement the check that used to be happening with noempty() can be covered by using
z.string().trim().min(1)

i still can access with spaces

Something I did in my project was to use a regex. When I used refine, I could only put it last, with regex I didn't need to
const required = /^[^$]/;
const user = z.object({
    name: z.string().regex(required).min(5),
});


IDX20803: Unable to obtain configuration from: 'https://localhost/IdentityServer/Core/.well-known/openid-configuration'

Dear All,
We are using the IdentityServer3.Membership library for IdentityServer. Token validation is works fine using HTTP both in Local as well as QA machine. But when we configure to HTTPS then getting below error.
Steps.

Validating the token in Asp.net core 3.0 application using identityserver4.AccessTokenValidation library3.0.1
Error is getting when we hosted in IIS. and using both self signed and CA certificate
Certificate is added in Trusted certificate.

Below is the code snippet:
in startup.cs under configurationServices
IdentityModelEventSource.ShowPII = true;
services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = IdentityServerAuthenticationDefaults.AuthenticationScheme;
options.DefaultChallengeScheme = IdentityServerAuthenticationDefaults.AuthenticationScheme;
})
.AddIdentityServerAuthentication(options =>
{
           options.Authority = https: //authorityURL;
           options.RequireHttpsMetadata = true;
           options.ApiSecret = "Api Secret" ;
           options.ApiName = "Api Scope" ;
           options.JwtBackChannelHandler = GetHandler();
       });

private static HttpClientHandler GetHandler()
{
var handler = new HttpClientHandler();
handler.ClientCertificateOptions = ClientCertificateOption.Manual;
handler.SslProtocols = SslProtocols.Tls12;
handler.ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true;
return handler;
}
Error Details:
04/16/2020 17:19:50.651 -04:00 [Error] IDX20803: Unable to obtain configuration from: 'https://localhost/IdentityServer/Core/.well-known/openid-configuration'.
System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://localhost/IdentityServer/Core/.well-known/openid-configuration'.
---> System.IO.IOException: IDX20804: Unable to retrieve document from: 'https://localhost/IdentityServer/Core/.well-known/openid-configuration'.
---> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
---> System.ComponentModel.Win32Exception (0x80090331): The client and server cannot communicate, because they do not possess a common algorithm.
--- End of inner exception stack trace ---
at System.Net.Security.SslStream.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
at System.Net.Security.SslStream.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslStream.PartialFrameCallback(AsyncProtocolRequest asyncRequest)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Security.SslStream.ThrowIfExceptional()
at System.Net.Security.SslStream.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslStream.EndProcessAuthentication(IAsyncResult result)
at System.Net.Security.SslStream.EndAuthenticateAsClient(IAsyncResult asyncResult)
at System.Net.Security.SslStream.<>c.b__65_1(IAsyncResult iar)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore(Stream stream, SslClientAuthenticationOptions sslOptions, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)    at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel)    --- End of inner exception stack trace ---    at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel)    at Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfigurationRetriever.GetAsync(String address, IDocumentRetriever retriever, CancellationToken cancel)    at Microsoft.IdentityModel.Protocols.ConfigurationManager1.GetConfigurationAsync(CancellationToken cancel)
--- End of inner exception stack trace ---
at Microsoft.IdentityModel.Protocols.ConfigurationManager1.GetConfigurationAsync(CancellationToken cancel)    at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()    at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync()    at Microsoft.AspNetCore.Authentication.AuthenticationHandler1.AuthenticateAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
at IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler.HandleAuthenticateAsync()
04/16/2020 17:19:50.988 -04:00 [Information] "Bearer" was not authenticated. Failure message: "IDX20803: Unable to obtain configuration from: 'https://localhost/IdentityServer/Core/.well-known/openid-configuration'."
04/16/2020 17:19:51.031 -04:00 [Information] AuthenticationScheme: "Bearer" was challenged.
Your help is highly appreciated on this.!

The client and server cannot communicate, because they do not possess a common algorithm.

Seems like this is your issue. Also seems unrelated to IdentityServer.

Thank you BrokckAllen for response!
I am seeing scopeName missing in IdentityServer4.AccessTokenValidation V3.0. Can you please let me know how to add ScopeName?

Resolved the issue adding below code in Startup-->Configure
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12
| SecurityProtocolType.Ssl3;


want to improve the footer section

this section is very hotchpotch kind of, the font size and styling of paragraph is not good, i want to improve it
@tushargupta1504 plz assign me this issue

Hi @tushargupta1504 , I'd like to help with this issue. Could you please assign it to me?

@tushargupta1504  I would like to work on this issue can you please assign me this task

@tushargupta1504 please review my pull request i have fixed the conflict that happened previously


search on the roadmap?

Really great stuff. Thank you. It's really close to my ideal.  I hope that some search function would be on the roadmap.
Thank you again

It is now :)

Much appreciated!

I won't implement a search feature in near future, because it's pretty complex and there is an administration board on the roadmap now.
Most of the static JAMStack-people use external services like algolia for search (check it on smashingmagazine), so I suggest to use such a service til the search is on the roadmap again. I just introduced plugins and search is a good candidate for a plugin in future.

Typemill ships with a search-plugin in version 1.2.16 so I close this ticket.


Reasign -> Reassign

Typos fix.

Oops! Thanks for noticing, could you squash those into a single commit? And with a more appropriate commit message, like "Fix reassign typo"

Can you just squash and merge? I was hoping to just use the Github edit tools and not having to download everything with git just for this.

Sure, are you sure these are the only mentions of that word? I'm not currently on the computer to check

Yeah, those are the only 3 instances in the repo.

So I ended up doing things correctly anyway.

I was about to double check myself, seems correct now! Thanks


matter-node Identify not working with Apple Home

When pairing a Bridge using the Aggregator class with Apple Home, Apple Home has an Identify button. Pressing the button does noting and does not generate any logs in matter-node.

I can not reproduce this issue. For me an identify on a bridge is triggeriung identify on ALL bridged devices of that bridge