[Feature] Stopping/changing a scroll feature

Hi :),
I am trying to use the scroll gesture, but we have an additional constraint where the offset may change depending on the breakpoint:
offset: [`-${SOME DYNAMIC VALUE}px start`, "end start"]

This means that I would either need to be able to:

Dynamically change the offset
Delete the scroll and recreate a new one if parameters have changed

I checked the doc and the source but it does not seem this is possible. Am I missing something? :)

@bakura10 The way I've dealt with this is to use the web animations API directly to find the associated animations, remove them, and then recreate them.
const resizeObserver = new ResizeObserver(entries => {
  for (const entry of entries) {
    const anims = animatedElement.getAnimations(); // Get all animations on the element
    anims.forEach(anim => anim.cancel()); // Remove previous animations

    // Recreate your animation here
    const newSequence = [[animatedElement, newKeyframes, animationOptions]];
    scroll(timeline(newSequence), scrollOptions);
  }
});

resizeObserver.observe(element);

Thanks a lot for the trick @CAWeissen .
@mattgperry , may it be possible to abstract this with a simpler "stop" method that can be called on the scroll object?

+1 for a simple way to stop the scroll animation

yeah, would love to see that, need to create a different scroll timeline on mobile and desktop, on currently they are just both there after resize :(

Based on my testing and poking through the code, it looks like you can pass a Controls instance to scroll(), which gives you the ability to stop it via Controls.cancel():
/**
 * scroll() options object.
 *
 * @type {Object}
 *
 * @see https://motion.dev/dom/scroll
 */
const scrollOptions = {
  // scroll() options go here.
};

/**
 * Motion Controls object for the current animation.
 *
 * @type {Object}
 *
 * @see https://motion.dev/dom/controls
 */
let animationControls = Motion.animate(function(value) {

  // Do stuff with value.

}, {});

// Pause the animation so it doesn't progress except by being scrubbed on
// scroll. This is the same thing that Motion.scroll() does internally
// when it creates an animation if you don't pass it an existing
// animation.
animationControls.pause();

scroll(animationControls, scrollOptions);

Then you can later call animationControls.cancel() and it stops triggering the callback. Internally, it looks like Motion tries to only ever have one scroll listener on an element, such as the document, and automatically removes the listener if all handlers are stopped/cancelled.


Open Source license?

Hi there @jsha, I learned about this project while reading docs for Let's Encrypt.  It's a very cool looking project and I'm impressed you were able to do it in one Go file with no dependencies (it's a real testament to the Go standard library too).
I opened this issue because I was interested in taking a crack at a couple of the ideas from the open issues, as a pull request if you're open to it.  I didn't see a license in this repo, which is understandable for a small project like this, but would you be open to adding one?  GitHub has a nice web site at https://choosealicense.com/ to find one that makes sense for you.
(Disclaimer, I am a GitHubber but this is just out of personal interest and not any kind of official communication from GitHub)

Hi! Thanks for the interest. I'd be happy to add a license; want to submit a PR for the MIT license?

Hi there, thanks for the fast response!  It looks like #7 has beaten me to the punch here and makes the same addition I would have done.

@tbehling - Looks like I didn't get the "Closes #6" note put in the description in time.


Disabled queries (enabled: false) get affected by invalidateQueries (refetchInactive: true)

Describe the bug
queryClient.invalidateQueries(queryKey, {         refetchInactive: true,       })
also refetches disabled queries (enabled: false)
but  - https://github.com/tannerlinsley/react-query/issues/947#issuecomment-1005020047
looks like this issue was introduce in this commit  - https://github.com/tannerlinsley/react-query/pull/949/commits/f5ae636e2ba697d56e1789d731e5d382f7b444bd
Your minimal, reproducible example
https://codesandbox.io/s/quiet-dust-hegny?file=/src/App.js
Steps to reproduce

Create a query with useQuery and set enabled option to false.
Invalidate this query with invalidateQueries and set refetchInactive to true

Expected behavior
I expected that disabled queries (enabled: false) would not refetch when I use invalidateQueries
Platform

OS: macOs
Browser: Not related

react-query version
v3.34.8
TypeScript version
v4.2.2

Thanks for filing the issue. It seems that a query is considered active` if it has at least one observer that is not disabled. From that definition, it follows that a a query is inactive if it has:
a) no observers or
b) only disabled observers.
In your case, b) would apply, which is why it is refetched. I've traced it back and it works the same as in v 3.2.0 (the first v3 release), so this is not a regression introduced recently.
However, I think this is wrong and it contradicts the docs where it says:

When enabled is false:
The query will ignore query client invalidateQueries and refetchQueries calls that would normally result in the query refetching.

From what I am seeing, the only check we should be doing is check a) it has no observers. Especially because enabled: false is often used when a query is not ready to be fired, like when a dependency is missing (dependent queries).
To be on the safe side, I would still suggest to fix this with v4, where we have also changed the queryFilters.

adding { exact : true } prevents refetching.
queryClient.invalidateQueries(["key2"], {
refetchInactive: true,
exact: true
});

adding { exact : true } prevents refetching.

no it doesn't, and it shouldn't. With your keys, there should be no difference between exact or fuzzy matching.

@TkDodo why do i get a throttled response with { exact: true }, but get successful response without it?

the api your sandbox queries against has rate limiting. Just use Promise.resolve instead!

@TkDodo do you have workaround on your mind for now?

+1 here. I've lost about 3 hours investigating why the query having {enabled: false} does fetch. The problem was invalidateQueries((q)=> ...).

@TkDodo I found workaround for myself, but I hope this issue will be fixed in new version.

:tada: This issue has been resolved in version 4.0.0-alpha.9 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version 4.0.0-beta.1 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Integration with Trouble

Describe the problem

Hi, firstly, thanks for the awesome plugin.
There's a plugin called "Trouble", from folke, which basically toggles a window in the bottom for diagnostics, and other things one might implement for oneself.
I realized that toggling on your plugin's mode with both my main window and the Trouble's one active makes them fit correctly in the middle of the screen, but once I toggle off Trouble and them toggle it on again, Trouble takes all the width of my neovim.
Describe the solution

I assume it's within the realm of possibilities, but unsure of how Trouble handle its window.
Thanks

Hey! Thanks for reporting and using the plugin :D!

I assume it's within the realm of possibilities, but unsure of how Trouble handle its window.

usually those windows are implemented to be "relative" (floating), I might've missed a check somewhere, I'll take a look asap!

Thanks a lot for your efforts!

Hey, I've took a look at how it behaves and it seems pretty correct to me. My guess would be either because they are readonly windows or because they have fixed width/height. IIRC help pages behaves similarly, I'll check to see if there's a way to tweak that

I see, thanks! Once you have an update on whether it's possible or not please tell me.

Hey @aabbccddeeffggj, I just tried with the new v3 version and trouble seems to work out of the box! Let me know if you notice any issue, feel free to reopen :)


Output examples

It lacks the links to output examples to fully understand what it produces. =)

Examples are the changelogs of Spyder, QtPy, QtAwesome and Loghub itself.


ApiResponseError: Request failed with code 401 - Request token missing

This is the code I tried (the right tokens and secrets are there):
import { TwitterApi } from "twitter-api-v2";

const consumerClient = new TwitterApi({
    appKey: "APP KEY",
    appSecret: "APP SECRET",
    accessToken: "ACCESS TOKEN",
    accessSecret: "ACCESS TOKEN SECRET"
}).readWrite;
const client = await consumerClient.login();

This throws an ApiResponseError: Request failed with code 401 error. I tried the twit package and it worked just fine, so I think this is an issue specific to this library. The error's data property is { 'Request token missing': '' }.

Hello! Thanks for your submission.
The .login method takes a oauthVerifier as first param. It should be used to authentificate a user in a 3-legged auth flow.
A small example is available here.
If it doesnt resolve your problem, drop an update.
If you're juste trying to use your client with already known and valid accessTokens, you don't need to use the .login method! You can use the consumerClient directly.

Thanks, @alkihis! I've tried several combinations with .appLogin() and .login(), but indeed the right thing to do was to use the consumerClient directly.


Keyword conflict in tAlias of tableReference with joinVariant

The tAlias in tableReference conflicts with various joinVariant when using the keyword as tAlias results in a syntactically valid statement.
Here are some examples:
-- "natural" is used as tAlias
select *
  from emp
natural right join dept;

--  "right" is used as tAlias
select *
  from emp
  right join dept on emp.deptno = dept.deptno;

--  "left" is used as tAlias
select *
  from emp
  left join dept on emp.deptno = dept.deptno;

The reason for this behaviour is that we allow all keywords also as identifiers.

I see the following options:

Disallow certain keywords as tAlias, via semantic predicate in the parser or via some other method (alternative identifier)
Document this as a known limitation


[schemaregistry json] Fix esm tests

The vitest file was missing and it is needed to run the tests.

API change check
API changes are not detected in this pull request.


Does It support Inner Join

Hello . I want to know does this package support inner Joins ? if yes then how to use it ? As many time we face the scenario where search result coming from the different tables .

Hi @starkdigital, Thanks for commenting. Unfortunately it doesn't support any joining of tables for search results. It's only a lightweight package and there are much better solutions for doing more intensive searches.


Resizing of windows (responsiveness of new dashboard)

Adjusting screen size leads to adjusted text

fixed most of the responsiveness issues with dashboard -- still need to fix button text

lets leave this up even after button text fixing bc will probably need to fix responsiveness as we add features to dashboard

closing because kind of broad right now -- been working on fixing responsiveness over time, not really any one issue


SecurityPolicyDsc support for Guest Configuration

As discussed here.
Taking Gcpol into account. Though a bit counter intuitive with regards to DSC resources. A filter option could be a nice addition to include filter capability in the following modules:

AuditPolicyDsc
GPRegistryPolicyDsc
SecurityPolicyDsc

The idea is based on what is already available in AzureWindowsBaseline gcpol package. found here
The package contains a module with 3 resources:

ASM_AuditPolicy
ASM_Registry
ASM_SecurityPolicy

These resources are binary but, from what I understand, can not be reused without the complete module. I checked Microsoft, the module will not be made publicly available.  A snippet of all 3 resources are included here:
instance of ASM_Registry as $ASM_Registry24ref
{
RuleId = "{F9C16B7A-4F7C-4947-A2BE-F47483DD2AC7}";
AzId = "AZ-WIN-00120";
BaselineId = "{982a79a8-1c46-4fdf-8cfd-60afedf7ad96}";
OriginalBaselineId = "{9c2bc3d1-8668-48e5-ac5f-281718d52174}";
Name = "Devices: Allow undock without having to log on";
Severity = "Informational";
Hive = "HKEY_LOCAL_MACHINE";
Path = "Software\Microsoft\Windows\CurrentVersion\Policies\System";
Value = "UndockWithoutLogon";
Type = "REG_DWORD";
ExpectedValue = "0";
RemediateValue = "0";
Remediate = true;
AnalyzeOperation = "EQUALS";
ServerTypeFilter = "ServerType = [Domain Member, Workgroup Member]";
OSFilter = "OSVersion = [WS2008, WS2008R2, WS2012, WS2012R2, WS2016]";
Enabled = true;
ResourceID = "Devices: Allow undock without having to log on";
ModuleName = "AzureOSBaseline";
ModuleVersion = "1.0";
ConfigurationName = "AzureOSBaseline";
};
instance of ASM_SecurityPolicy as $ASM_SecurityPolicy156ref
{
RuleId = "{a30f6d7d-f3dc-442c-8a1f-921123c6250c}";
AzId = "AZ-WIN-00184";
BaselineId = "{982a79a8-1c46-4fdf-8cfd-60afedf7ad96}";
OriginalBaselineId = "{9c2bc3d1-8668-48e5-ac5f-281718d52174}";
Name = "Bypass traverse checking";
Severity = "Critical";
Category = "Privilege Rights";
Key = "SeChangeNotifyPrivilege";
Type = "USERRIGHTS";
ExpectedValue = "Administrators, Authenticated Users, Backup Operators, Local Service, Network Service";
RemediateValue = "Administrators, Authenticated Users, Backup Operators, Local Service, Network Service";
Remediate = true;
AnalyzeOperation = "LESSOREQUAL";
ServerTypeFilter = "ServerType = [Domain Member, Workgroup Member]";
OSFilter = "OSVersion = [WS2008, WS2008R2, WS2012, WS2012R2, WS2016]";
Enabled = true;
ResourceID = "Bypass traverse checking";
ModuleName = "AzureOSBaseline";
ModuleVersion = "1.0";
ConfigurationName = "AzureOSBaseline";
};
instance of ASM_AuditPolicy as $ASM_AuditPolicy20ref
{
RuleId = "{7e4d9fe1-eb3f-49ac-bb5b-d417df7e6d6c}";
AzId = "CCE-37856-2";
BaselineId = "{982a79a8-1c46-4fdf-8cfd-60afedf7ad96}";
OriginalBaselineId = "{9c2bc3d1-8668-48e5-ac5f-281718d52174}";
Name = "Audit User Account Management";
Severity = "Critical";
Subcategory = "{0CCE9235-69AE-11D9-BED3-505054503030}";
ExpectedValue = "Success and Failure";
RemediateValue = "Success and Failure";
Remediate = true;
AnalyzeOperation = "EQUALS";
ServerTypeFilter = "ServerType = [Domain Controller, Domain Member, Workgroup Member]";
OSFilter = "OSVersion = [WS2008, WS2008R2, WS2012, WS2012R2, WS2016]";
Enabled = true;
ResourceID = "Audit User Account Management";
ModuleName = "AzureOSBaseline";
ModuleVersion = "1.0";
ConfigurationName = "AzureOSBaseline";
};
I would like to see what would be a viable solution to get these capability.  Allowing a single package to service every OS, ServerType with a single policy. Add filter options to already existing resources or create a new module for GC on par with the Microsoft ASM resources.

IMO, the best way is to make the DSC resources "clean" (no filter), because this does not translate well in the DSC configuration paradigm (we ought to define a state to converge to, specific to a node or configuration name. No ifs and buts.)
GC is slightly different, but the base should be the same, so we should avoid repeating code.
Best is to convert those MOF-based resource to class-based resource, and then extend via inheritance for GC resources.
Here's this pattern in action: https://github.com/SynEdgy/nxtools/blob/main/source/Classes/
In this example the array of strings properties (not supported by GC) are replaced by single string with a value separator.

I have been digging into the classes you mentioned. and LocalGroup contains the exact pattern you advice. To get a clear understanding of how it all flows back and forth between both classes, i have created a simple snippet. Even left out DSC parts.

class DscClass {

    [String] $Name
    [string] $Value

    DscClass ([string]$InputName, [string]$InputValue) {
        $this.Name = $InputName
        $this.Value = $InputValue
    }

    [DscClass] Get() {
        return $this
    }

}

class GC_DscClass : DscClass {

    GC_DscClass() {
    }

    GC_DscClass ([DscClass]$DscClass)  {
        $this.Name = $DscClass.Name
        $this.Value = $DscClass.Value
    }

}

$base = [DscClass]::new('Naam', 'Waarde')
$base
$derived = [GC_DscClass]::New($base)
$derived

My assumption is my order is wrong. Since the GC configuration will invoke GC_DscClass first. but not sure where the starting point within the GC_DscClass would be. Where does GC_DscClass ([DscClass]$DscClass) gets its value from or is it DSC specific?

I'm not sure I understand your question, so apologies in advance if my answer doesn't help.
In this pattern, the DSC resource is a simple resource as we're accustomed to.
For GC we need to extend/change the resource to support a slightly different paradigm more specialised to Azure Policy Guest Configuration.
Instead of duplicating code, we want to base the GC resource on the same behaviour, but add properties such as OS Filter in your case or replace properties using array of strings with properties using a string of coma separated values.
As far as the objects are concerned once you have created them by 'instantiating a class', they just have all the properties and method of their inheritance 'chain'.
In your example above, you don't change anything from the base class with your GC class, thus don't provide any value.
Also understand that there are no back and forth going on. It's only some DSC specific implementation that mandates the DSC (and GC) classes to have the get, set, test methods, and they must return respectively an object of type [class name], [void], [bool].
I think your confusion comes from my example which has one more 'layer' to it.
The GC_linuxGroup class, extends the nxGroup DSC resource.
The third class nxLocalGroup is unrelated to DSC or GC resources, it's used by the functions of the module.
So to your example (on my phone so did not test):

class DscClass {

    [String] $Name
    [string] $Value

    DscClass ([string]$InputName, [string]$InputValue) {
        $this.Name = $InputName
        $this.Value = $InputValue
    }

    [DscClass] Get() {
        return $this
    }

    [Bool] Test().{
        $true
    }

    [DscClass] Get() {
        $this
    }
}

class GC_DscClass : DscClass {

    [String] $OtherProperty = 'someValue'

    GC_DscClass() {
    }

    GC_DscClass([string]$InputName, [string]$InputValue) {
        $this.Name = $InputName
        $this.Value = $InputValue
    }

    [GC_DscClass] Get() {
        $this
    }
}

$base = [DscClass]::new('Naam', 'Waarde')
$derived = [GC_DscClass]::New('Naam', 'Waarde')

# derived class has parents' methods
$derived.Test()

# derived class has overridden the get method to return a different type
$base.Get().GetType().ToString()
$derived.Get().GetType().ToString()

# derived class has an extra property
$derived.OtherProperty

Basically, without rewriting code, I created a new class with same functionality that I could ter and extend.
Depending on my use case (i.e. DSC or GC), I can use either.
Sometimes GC and DSC can use the same class resource so this may not be needed and the configuration script would just use the DSC resource to compile the MOF.
This pattern is only useful when there's a difference between the DSC usage and the GC usage.
Best example is that GC does not (yet) support [string[]] property types to be set, so we extend and use a [string] and we split this in the GC class to set the [String[]] property of the base class...
I hope that helps.

Thank you for you patience and explanation.
I have made a little concept module. here
2 classes :
DscClass : works as one would expect from a DSC resource.
GC_DscClass: inherits DscClass and will parse a yml string of allowed OS's and compares the current OS label to this list.
GC_DscClass Get shall only instantiate DscClass Get if conditions are met. if not provide the reason.
GC_DscClass Test will return $true if the Filter conditions are not met. If conditions are met it will return the the result of the actual DscClass validation.


Replace unordered list markers with an empty string

Closes: #4818
When using --help and list keywords ( * ) are used in markdown, * is displayed in the terminal.
However, since it is originally unnecessary, we would like to replace it with an empty string.
So, In the render_markdown method used in help_section!, added replace chains to replace unordered list markers with an empty string.
For example, mknod --help outputs follow
before
Create the special file NAME of the given TYPE.

Usage: ./target/debug/mknod [OPTION]... NAME TYPE [MAJOR MINOR]

Arguments:
  <NAME>   name of the new file
  <TYPE>   type of the new file (b, c, u or p)
  [MAJOR]  major file type
  [MINOR]  minor file type

Options:
  -m, --mode <MODE>  set file permission bits to MODE, not a=rw - umask
  -h, --help         Print help
  -V, --version      Print version

Mandatory arguments to long options are mandatory for short options too.
-m, --mode=MODE    set file permission bits to MODE, not a=rw - umask

Both MAJOR and MINOR must be specified when TYPE is b, c, or u, and they
must be omitted when TYPE is p.  If MAJOR or MINOR begins with 0x or 0X,
it is interpreted as hexadecimal; otherwise, if it begins with 0, as octal;
otherwise, as decimal.  TYPE may be:

* b      create a block (buffered) special file
* c, u   create a character (unbuffered) special file
* p      create a FIFO

NOTE: your shell may have its own version of mknod, which usually supersedes
the version described here.  Please refer to your shell's documentation
for details about the options it supports.

after
Create the special file NAME of the given TYPE.

Usage: ./target/debug/mknod [OPTION]... NAME TYPE [MAJOR MINOR]

Arguments:
  <NAME>   name of the new file
  <TYPE>   type of the new file (b, c, u or p)
  [MAJOR]  major file type
  [MINOR]  minor file type

Options:
  -m, --mode <MODE>  set file permission bits to MODE, not a=rw - umask
  -h, --help         Print help
  -V, --version      Print version

Mandatory arguments to long options are mandatory for short options too.
-m, --mode=MODE    set file permission bits to MODE, not a=rw - umask

Both MAJOR and MINOR must be specified when TYPE is b, c, or u, and they
must be omitted when TYPE is p.  If MAJOR or MINOR begins with 0x or 0X,
it is interpreted as hexadecimal; otherwise, if it begins with 0, as octal;
otherwise, as decimal.  TYPE may be:

b      create a block (buffered) special file
c, u   create a character (unbuffered) special file
p      create a FIFO

NOTE: your shell may have its own version of mknod, which usually supersedes
the version described here.  Please refer to your shell's documentation
for details about the options it supports.

tbh, i prefer the before version than after :)

I proposed unifying the format for displaying lists, as I believe it would be better.
What do you think?
For example, lists of arguments and options are displayed without using asterisks.

I think the argument lists are different from the other lists and can have a special format. The long-term solution here would be to have nice markdown formatting in the terminal. I was working on this in another project and might be able to make a crate out of that. Maybe in the meantime, instead of stripping, maybe we could replace it with a unicode character like •?

I do think it makes sense to always use the same symbol by the way, so either always use - or always use * in the markdown files. I don't have a strong preference, but consistency would be nice.

I do think it makes sense to always use the same symbol by the way, so either always use - or always use * in the markdown files.

I understand. Thanks.

The long-term solution here would be to have nice markdown formatting in the terminal. I was working on this in another project and might be able to make a crate out of that.

I'm looking forward to it.


Support newer versions of megaparsec, hashable and text

Currently text-ascii only supports older versions of these libraries. It would be nice to perform a revision to allow newer versions.

Should be fixed by #30


Friendbot slows down under heavy load along with increased tx_bad_seq errors

you can see the stretch where I issued 11 in quick succession (req. num. 4 - req. num. 14), the response time slows down from 10.79s to 40s resulting in 3 failures caused by tx_bad_seq. When I re-issue requests it goes back to the 7-13s range until I start bombarding it agaon.
friendbot currently spawns new goroutines for every submission and also assumes that transactions will be submitted in the order in which they were created. These threads are probably taking a toll on the machine and also resulting in tx_bad_seq errors because of message ordering.
We are already locking before creating a new transaction so we only create one request at a time and issue only 1 seq number at a time. we submit using multiple goroutines so we’re not bottlenecked on ledger close times.

tx_bad_seq has been friendbot’s biggest enemy (because of high throughput requirements). we’ve considered using channels in the past etc.
The locking logic explains the slowness when issuing multiple requests. Although I'd imagine it's not that expensive to just make a tx and submit asynchronously so the amount of slowness is unexplained.
possible solutions:

[ ] we should consider making use of stellar channels so we can have different pools of seq numbers to consume. I think if we were to have 10 such stellar channels that would be plenty. they wouldn’t need more than 100 XLM at any given point in time. we can also have friendbot itself monitor it’s own channel accounts and fund it if any of them ever get low. If we don’t want to manage these channel accounts, we can always have friendbot create these throwaway accounts on startup so we don’t have to manage their keys.
[ ] batch requests into 2s chunks so we submit multiple ops / tx (susceptible to DoS attacks by pre-creating an account submitting to friendbot after inclusion in the batch, so tx fails all ops)

startup command can add a -n or --num-channels flag which specifies the total number of channels to initialize friendbot with. We can linearly initialize each channel account in batches of 100 each synchronously to keep things simple. We could artificially limit max number of channels to 1000 using a constant value so startup time is within 1000/100 * 5 seconds = 50 seconds. The faster way to initialize would be to first initialize with 100 channels and then use those hundred channels to then create more channels in a geometric fan-out model. We don't need that kind of scale with friendbot right now.
We would also need a background thread that monitors these source accounts. If any of them ever fall below a certain threshold, say 20 XLM, then this background thread can "top-up" these source accounts with a transaction that does not use a source account. This thread can run once per hour.

Thanks to @tomquisel and @nikhilsaraf for some great discussion; thought I'd post a short sketch of an approach before tackling this issue. The original issue outlines two possible approaches: (1) using multiple Stellar channels to submit transactions, or (2) batching requests. As mentioned above, the second is susceptible to denial-of-service attacks, so let's explore the first.
Let N be the total number of Stellar channels to use on friendbot. The user can define this value through a new flag on the startup command. The maximum possible value can be determined through experiments/benchmarks. The issue suggests 1000, with channels initialized synchronously in batches of 100, resulting in a total startup time of 50 seconds - that seems like a reasonable starting value.
A long-running goroutine would receive an account ID to fund, choose a Stellar channel, and send it to that channel. The channel would be chosen in a manner that appropriately balances load across them. Accordingly, each Stellar channel would have a corresponding Go channel to receive account ID's, and it submits payments to those ID's from the Stellar channel's source account. Each source account can start out with a balance of 500 XLM. We'll keep these source accounts only in-memory, so there won't be cleanup. Plus, we don't need to track their secret keys, because they're testnet lumens, which reduces operational overhead. Finally, a background goroutine would periodically monitor the channel source accounts and tops up their balances when below a certain threshold, say 100 XLM; this can run once per hour.

I'd like to comment on a couple of things that caught my eye:

These threads are probably taking a toll on the machine

Go routines are very "cheap". The peak we observed last week was 168 requests per minute. Such traffic really shouldn't affect performance:

resulting in tx_bad_seq errors because of message ordering

Horizon should handle this, it has tx ordering built in. If a new transaction appears and it's sequence number is higher than account sequence + 1 it will wait for a couple of seconds for previous transactions.

possible solutions:

We shouldn't do batching as it's vulnerable to DoS, as explained in the original comment. Channels seems fine.

@debnil looks great. We could probably select the Stellar channel using a round-robin approach for now.
Testnet will be reset tonight so we will probably get a lot of load on friendbot and a lot of data from that too, just something to keep in mind.

@bartekn thanks for that context. interesting to know about horizon message ordering. would that still work if we hit different app servers for horizon?
I'm wondering if in that case it makes sense to just remove the lock that we have on friendbot and that would fix everything for us?

would that still work if we hit different app servers for horizon?

Good point, it probably doesn't unless there's are sticky sessions configured on the load balancer. Even if it is configured, it doesn't work outside browser (or if cookie jar is not added to server side code - sticky sessions use cookies).

@debnil that plan sounds good to me! Just to double check:

each Stellar channel has its own source account for txns it submits, but the payment comes from the single central friendbot account.
as a result the txns will be signed by both the source account and the central friendbot account
secret keys for the source accounts are stored ephemerally in memory, and if friendbot restarts it just creates new source accounts

Given that there are 100B XLM and friendbot funds 10k at a time, there's a max of 10M transactions that friendbot could possibly execute. You can probably initially fund source accounts with enough to exceed that theoretical maximum (100 XLM / num_channels should do it with constants as they are now), and save the effort of the background account topper-upper.

^yes on all 3 points^


Migrating from 1.14 to 1.15.6

Gitea Version
gitea-1.15.6
Git Version
git-2.29.3
Operating System
centos7
How are you running Gitea?
I am using the binary release downloaded from https://dl.gitea.io/gitea
Database
PostgreSQL
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Description
Hi All,
I am facing issues while trying to upgrade Gitea from release 1.14 to 1.15.6.
Looking at the logs, it seems a db migration-related problem:
ORM engine initialization attempt #5/10 failed. Error: migrate: do migrate: pq: column "message" of relation "task" already exists
I would like to avoid wiping the database, is there anything I could do to fix this issue?
PLease see attached the log file.
giteamigration.txt
Screenshots
No response

Please do not re-install on an installed database.
You should use your old app.ini.
To bypass this error, you may either:

Use your 1.14 backup database and use your old app.ini to do the upgrade again.
Drop the duplicated column and use the old app.ini to continue to migrate.

The old app.ini is a must.

Duplicate of #17328

Please do not re-install on an installed database.
You should use your old app.ini.
To bypass this error, you may either:

Use your 1.14 backup database and use your old app.ini to do the upgrade again.
Drop the duplicated column and use the old app.ini to continue to migrate.

The old app.ini is a must.

Thank you very much for your quick answer, I went for solution (2) and it worked!
Just for information, I was already using the original app.ini file, I simply replaced the gitea executable with the new one.


There is no Success or Failure indication when a Program Manager is made the manager of a Program

 There is no Success or Failure indication when a Program Manager is made the manager of a Program #701


[DO NOT MERGE] Java parser partial reset

Partial reset of the JavaParser to avoid exception urging to call reset()

Wonder what you think of it... seems to work for us.

Actually, no doesn't work for us... at least not yet :-\

The proposed "light" or "partial" parser reset does the following:
       if (!uris.isEmpty()) {
            compilerLog.reset(uris);
        }
        pfm.flush();
        Check.instance(context).newRound();
        Annotate.instance(context).newRound();
        Enter.instance(context).newRound();
        Modules.instance(context).newRound();

However, the attached test and IDE integration seem to work if I limit the above to just:
        if (!uris.isEmpty()) {
            compilerLog.reset(uris);
        }
        Check.instance(context).newRound();

Feels like pfm.flush() is a good thing to do. Check has method to remove compiled: removeCompiled(ClassSymbol csym) which i could have used if we had the ClassSymbol from the previously compiled CU (i have this CU but there is no reference to compilers class symbol...
Anyway, "partial" reset in its current form perform and works fine. Mt test java source takes ~180ms to parse after reset() and takes ~98ms to parse after "pertial" reset (reset(Collection<URI>) that is)

@sambsnyd @jkschneider what do you think of this PR? Is this something that can be merged?

Sorry for the slow review, @BoykoAlex. No problems with this jump out at me. I don't know everything about Java compiler internals, but I see no reason to doubt that this is useful.


navbar links alignment

Describe the bug
On small devices, navbar links should be in middle aligned
To Reproduce
Steps to reproduce the behavior:

Go to https://circuitverse.org/
go to the developer tools and click on inspect(adjust on small size device ex-599px)
click on the navbar icon
you will see all nav links are not in the middle of the page

Expected behavior
it should be in the middle of the page
Screenshots
issue---

Device Information [optional]:

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.
Are you working on this issue? (Yes/No)

I'm working on this issue could you plz assign it to me

gitpod.io/#https://circuitvers-circuitvers-5ouvcrsyy3l.ws-us85.gitpod.io/?workspace=file%3A%2F%2F%2FCircuitVerse.code-workspace

DO you want to align getting started, teachers , blogs in the middle?

yes, I think it will look best

@weberankit thanks for opening the issue but making the elements center will not be appropriate designs, as you can see the text length of elements are different and not standard, a standard way is to align it and that is why we have kept it aligned to left. If you do have a design, feel free to share the designs in #ux channel in slack.
Closing this....

Okay
Thanks


tests: account for multiple available sockets in a single ipc recv

The IPC recv callback assumes that there is only one available socket that can be "uv_accepted".
However, depending on the platform, it is possible for more than one socket to be available for accept in a single recv callback.
The callbacks have been changed to call uv_accept until uv_pending_pipe_count == 0.

LGTM with style nits.  CI: https://ci.nodejs.org/job/libuv-test-commit/71/

@jBarz Can you reword the commit log?  Otherwise LGTM.

squashed all commits into one

LGTM. Please indicate the subsystem (test in this case) in the commit message.

Landed in 00dab91, thanks!


StyleSheetManager with disableVendorPrefixes in jest

Environment

npx envinfo --system --binaries --npmPackages styled-components,babel-plugin-styled-components --markdown --clipboard
System:

OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
Memory: 1.02 GB / 16.00 GB
Shell: 5.3 - /bin/zsh

Binaries:

Node: 12.10.0 - ~/.nvm/versions/node/v12.10.0/bin/node
Yarn: 1.17.3 - ~/.nvm/versions/node/v12.10.0/bin/yarn
npm: 6.10.3 - ~/.nvm/versions/node/v12.10.0/bin/npm

npmPackages:

styled-components: ^5.0.0-beta.9 => 5.0.0-beta.9

Reproduction

https://github.com/blukai/styled-components.StyleSheetManager
Steps to reproduce
create a styled componnet
const Flower = styled.div`
  display: flex;
`;

create a TestRenderer instance with StyleSheetManager with disableVendorPrefixes prop
const tree = render.create(

).toJSON();

let the jest to generate snapshot
expect(tree).toMatchSnapshot();

Expected Behavior
I expected to get snapshot of element and it's styles without vendor prefixes.
Something like this
.c0 {
  display: flex;
}

Actual Behavior
I got a snapshot without styles at all.

Story
In attempt to upgrade to styled-components 5 beta I faced an issue:
when I use StyleSheetManager with disableVendorPrefixes prop and try to generate snapshot - all the styles are being completely removed from existing snapshots.
note that StyleSheetManager without disableVendorPrefixes prop doesn't remove styles and work just fine.
So, I went to styled-components repo in attempt to find the cause.
The root of evil is here
I tried to provide options that are responsible for disabling vendor prefixes to masterSheet without providing disableVendorPrefixes to StyleSheetManager, and it worked fine.
So when the sheet gets reconstructed reconstructWithOptions something is getting broken.

Using disableVendorPrefixes with SSR seem to return empty stylesheets for me as well.

@taikn that should be fixed with the latest RC

@blukai can you try with the latest RC? Made some stylesheet internal changes that should resolve the issue. Thanks!

Checked against your repro and this is fixed with the latest rc and also latest beta of jest-styled-components


issue with array of strings validation

Hello
I use the latest version of swagger-tools(0.10.1).
My swagger.yaml config:
swagger: "2.0"
info:
  version: "0.1.0"
  title: test API
basePath: /
paths:
  /test:
    x-swagger-router-controller: test
    get:
      operationId: operation
      responses:
        "200":
          description: "success"
          schema:
            type: array
            items:
              type: string

if I return in the test operation array of numbers in string representation, for example ["123"], swagger-tools shows an error: Error: Response validation failed: failed schema validation.
It seems that here https://github.com/apigee-127/swagger-tools/blob/master/middleware/swagger-validator.js#L116 swagger-tools converts the array elements to numbers.
Code of my controller(test.js):
exports.operation = function(res, res) {
  res.json(["123"]);
};

I'll look into it.

there is also the same issue with request validation, I've submitted pull request with a test: https://github.com/apigee-127/swagger-tools/pull/387


[#41] Updated to be upload with hexer app to hex.pm package manager

@davecaos (also @elbrujohalcon) I fixed the travis issue in https://github.com/esl/elarm/pull/43. Could you rebase your commit on the top of the master branch?

I think this PR passed all checks https://travis-ci.org/esl/elarm/builds/100340784, but didn't update the state.

Could you push this commit as the PR?
https://github.com/hcs42/elarm/commits/dave.41.upload.to.hex.pm
It will make for a cleaner git history, since it will be a single commit on the top of the current master branch, as opposed to the current "commit+merge commit" combination.

@davecaos What do you think?

@hcs42 didn't he do that already?

didn't he do that already?

No. Compare:

https://github.com/esl/elarm/pull/42/commits
https://github.com/hcs42/elarm/commits/dave.41.upload.to.hex.pm

@hcs42 I see… let me try to work it out myself

@davecaos you were basically missing a git rebase master

@hcs42 check it out now, please


High CPU load on code hovering

Information:

Prism version: latest from the download page
Plugins: none
Environment: Chrome Beta  79.0.3945.45 Windows

One CPU core loads to 100% and scrolling is freezed when i'm hovering code block. Bug exists even on download page.

Thanks to a recent change in Chrome's layout engine, hit tests can take a looooong time. Up to several seconds long depending on the length of the highlighted code and the current machine.
Since it's a chrome-only issue, we decided that this is something Chrome has to fix.
See #2062 for more info (also includes a hacky workaround).


fix: change pk naming in manyToMany models

Description of changes

Change the naming for model PK in manyToMany models:

from ${model_name}ID to ${model_name}${model_primary_key_field_name} in camelCase

This change is behind the feature flag respectPrimaryKeyAttributesOnConnectionField
Issue #, if available

CLI PR: https://github.com/aws-amplify/amplify-category-api/pull/660/files
Description of how you validated changes
yarn test
Checklist

[x] PR description included
[x] yarn test passes
[x] Tests are changed or added
[ ] Relevant documentation is changed or added (and PR referenced)
[ ] Breaking changes to existing customers are released behind a feature flag or major version update
[ ] Changes are tested using sample applications for all relevant platforms (iOS/android/flutter/Javascript) that use the feature added/modified

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #455 (a1c8789) into custom-pk-staging (1d00a22) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@                  Coverage Diff                  @@
##           custom-pk-staging     #455      +/-   ##
=====================================================
+ Coverage              85.26%   85.27%   +0.01%
=====================================================
  Files                    143      143
  Lines                   6836     6841       +5
  Branches                1785     1786       +1
=====================================================
+ Hits                    5829     5834       +5
  Misses                   915      915
  Partials                  92       92

Impacted Files
Coverage Δ

...nc-modelgen-plugin/src/visitors/appsync-visitor.ts
93.15% <100.00%> (+0.08%)
:arrow_up:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more


Carthage - no shared framework schemes

Chartage update fails with message:
*** Skipped building CoreMLHelpers due to the error:
Dependency "CoreMLHelpers" has no shared framework schemes

My Cartfile:
github "hollance/CoreMLHelpers"

I could not find any .xcworkspace file in the repo, maybe that's the problem, anyway I will try copying the files directly into my project!

same problem

Same problem :/


chore: bump ikalnytskyi/action-setup-postgres to v6

fix CI pipeline failures, seeing:
/Users/runner/work/_temp/b78b4be8-0b82-444d-b150-be4b53a8afc4.sh: line 19: initdb: command not found

relates to https://github.com/ikalnytskyi/action-setup-postgres/pull/29

看上游issue ，14不是已经支持了吗？

14, 13 都支持 I will followup on that


The Stickyness of Navigation bar

The Navigation menu is not sticky while scrolling and also it gives a bad user experience sometimes
Please describe the Feature in detail.
What should happen?
The Navbar Should be sticky while scrolling and also the background of it should be blur
https://github.com/user-attachments/assets/806ceb2e-325a-4d3a-b486-a1b80d7d840d
What happens instead?

Add screenshots or other media to help explain the issue.
https://github.com/user-attachments/assets/98f96927-f858-4cb1-8ab1-5852e845bf2e
Additional Information
One thing please change the background color of your substack its looks creepy lol

thank you. there is an issue related to that, they basically provide a fixed  iframe you can't change

solved by #63

yes I guessed so. Thanks for accepting the PR of this issue ( I had already raised that)
Thanks. It's awesome contributing.


Threadpool: take 2

Added an API to support explicit management and fine-grain control of threadpools.
The API supports creating different threadpools for various parts of execution, e.g. batch, single-token, etc. Each threadpool can be created, paused, resumed, and released independently from any other threadpools. This mitigates the overhead of starting/stopping threads for each decode call and helps OSes keep track of scheduling history in order to make better scheduling decisions.
Each threadpool supports:
Setting number of threads (duh)
Setting a CPU mask for threads to be placed on
Support for strict/relaxed placement: pinning specific threads to specific cores, or letting the OS decide
Support for polling/interrupt-driven wait
Setting thread priority
Using threadpools explicitly is optional. If a llama_decode is called with a llama_context that doesn't have a threadpool attached, a disposable threadpool is created (same as the current behavior).
If users choose to explicitly use threadpools, they have to manage them manually. See examples in main.cpp and in speculative.cpp.
With all the bells and whistles enabled, we generally see .25-1 tok/s improvement across the board.

[x] I have read the contributing guidelines
Self-reported review complexity:

[ ] Low
[ ] Medium
[ ] High

On W-2225 Xeon machine: CPU backend:

CPU
Model
Test
t/s master
t/s threadpool-attempt-2
Speedup

Intel(R) Xeon(R) W-2225 CPU @ 4.10GHz
llama 7B Q4_0
pp512
17.57
17.56
1.00

Intel(R) Xeon(R) W-2225 CPU @ 4.10GHz
llama 7B Q4_0
tg128
6.93
7.14
1.03

$ ./build/bin/llama-bench -t 8

model
size
params
backend
threads
test
t/s

llama 7B Q4_0
3.56 GiB
6.74 B
CPU
8
pp512
18.38 ± 0.46

llama 7B Q4_0
3.56 GiB
6.74 B
CPU
8
tg128
8.37 ± 0.01

./scripts/compare-commits.sh master threadpool-attempt-2 -t 1,2,4,6,8,10

CPU
Model
Threads
Test
t/s master
t/s threadpool-attempt-2
Speedup

Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
llama 7B Q4_0
1
pp512
3.93
3.94
1.00

Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
llama 7B Q4_0
1
tg128
2.43
2.44
1.00

Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
llama 7B Q4_0
2
pp512
7.13
7.06
0.99

Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
llama 7B Q4_0
2
tg128
4.37
4.36
1.00

Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
llama 7B Q4_0
4
pp512
11.96
11.99
1.00

Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
llama 7B Q4_0
4
tg128
6.79
6.77
1.00

Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
llama 7B Q4_0
6
pp512
14.96
14.98
1.00

Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
llama 7B Q4_0
6
tg128
7.51
7.53
1.00

Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
llama 7B Q4_0
8
pp512
13.06
13.09
1.00

Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
llama 7B Q4_0
8
tg128
6.88
6.83
0.99

Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
llama 7B Q4_0
10
pp512
14.08
14.06
1.00

Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
llama 7B Q4_0
10
tg128
7.49
7.52
1.00

$ LLAMA_CUDA=1 ./scripts/compare-commits.sh master threadpool-attempt-2 -nkvo 0,1
(No discernible difference between OpenMP and ggml_threadpool with default settings)

GPU
Model
NKVO
Test
t/s master
t/s threadpool-attempt-2
Speedup

RTX 3060 Laptop GPU
llama 7B Q4_0
No
pp512
1644.73
1642.34
1.00

RTX 3060 Laptop GPU
llama 7B Q4_0
No
tg128
65.94
65.89
1.00

RTX 3060 Laptop GPU
llama 7B Q4_0
Yes
pp512
287.28
286.44
1.00

RTX 3060 Laptop GPU
llama 7B Q4_0
Yes
tg128
54.56
54.32
1.00


Update Dependencies

Changes

Updated cargo_metadata, clap and regex to their latest versions
Replaced usage of deprecated cargo_metadata function with new function

Description
cargo_metadata had a minor change in API which the code has been updated for.
clap has had a bug fix and improvement for building on windows. They also changed their minimum required rust to 1.36.0 however I have tested and still works on 1.38.0 which is cargo-binutils current minimum required rust.
regex has had no notable changes.

r? @adamgreig
(rust_highfive has picked a reviewer for you, use r? to override)

Thank you for the PR.
There's no need to mention patch version changes, without Cargo.lock (which we don't have) they'll be used automatically. Since this is often a point of confusion I think it would be better to strip off the the patch versions altogether in the Cargo.toml.

bors r+


Custom validation rules API

Validation rules:
Self-validation(name)
Dependencies validation(test, annotationPrecessor, projects)
Content validation

We really need this feature in our project for checking target dependencies which we using. We have TV and Mobile modules and it will be nice to have an ability to crate path validation rule for dependencies. It will falls if mobile target has dependency with path which contains "tv" substring it module path (easiest but not best solution).


Update TilemapLayer.js

getTile now returns a copy of the results and not a reference.

I can't merge this because it's against master not dev, but have made the change locally, thanks.


Android/mobile issue

Okay so i find some glitch if you connect to Server its say "You are not using the same version as this server." And anyways i use <IP_ADDRESS>.okay so what i want to say its Can you fix it?

Oh anyways i use latest version of plugin

wait update

Yeah you're right its still pre release


Decide on a license

I'd be alright with MIT, thoughts? @janeatcc

We use MIT by default unless there's a compelling reason to use another license so I'm good with it.


Add telemetry for Safepoint statistics

JVM Safepoints can cause pauses + jitter in benchmarks and without any telemetry they are difficult to thoroughly investigate.

In my opinion we should keep the number of telemetry devices low. At best, this would be an option in the gc telemetry device (that should maybe be renamed to jvm-log or something similarand we'd allow to pass logging options there with--telemetry-paramsso only safepoint statistics are gathered (instead of other data as well). However, I think it is sufficient for the time being to specify--telemetry=gc` to gather the necessary data or am I missing something?

As mentioned here, let's keep the number of telemetry devices low thus closing.


"Use Identity as Username"

Environment

VerneMQ Version: N/A
OS: RHEL 7
Erlang/OTP version (if building from source): 19.2

I am using PSKs to connect to my MQTT instance, which includes sending a psk-identity, so it would be perfect for me to securely connect with the PSK and then pull the psk-identity out and use that as a ClientId to restrict access to topics.
In the VerneMQ documentation, it says that "If you use client certificates and want to use the certificates CN value as a username you can set: listener.ssl.use_identity_as_username = on"
Ideally I would like to write a plugin to use the psk-identity as a ClientID. How/where in the code does VerneMQ get the CN value from the certificate? Can you point me in the right direction so that I can see how you did that, and then I can work on pulling out the psk-identity?
Thank you

@PiedPieper thanks for this interesting question/idea!
I see that Erlang SSL and also ranch_ssl directly have the option for psk_identity
From http://erlang.org/doc/man/ssl.html
{psk_identity, string()}

Specifies the identity the client presents to the server.
The matching secret is found by calling user_lookup_fun.

Up to @dergraf to tell us if this could be done in a similar way as with use_identity_as_username.

@ioolkos Just to clarify, I can connect with PSKS. The problem is authenticating users. It would be nice if we could use the psk-identity as the clientId so that we didnt have to send extra data as a username/password

I guess we tried to be Mosquitto compatible. Reading here: https://mosquitto.org/man/mosquitto-conf-5.html, it seems that with pre-shared-key, the use_identity_as_username uses the PSK identity as MQTT Username. Without that, it uses the client certificate common (CN) name as MQTT Username.
@dergraf @larshesel are we 100% compatible there (ie. do we do the same?)
and @PiedPieper's approach is then to use the PSK identity as the ClientID (not the Username, or maybe using ClientID = Username)
If I seem confused, tell me ;)

@ioolkos thank your taking the time to dig that up. That information is very useful, as now we know that the client will pass us the psk-identity as a username. The problem is that if the client sends a false username through mosquitto with a valid psk, then that client would have access to topics that it is not allowed to.
This is why "use_identity_as_username" is so important to be implemented on the server side, so that we force the username=psk_identity. I think that changing the user so that we set its ClientID=Username will be trivial, it's just the Username/ClientID = psk_identity could be tricky.

@ioolkos , vmq uses the function socket_to_common_name to get the certificate from the client:
socket_to_common_name(Socket) ->     case ssl:peercert(Socket) of         {error, no_peercert} ->             undefined;         {ok, Cert} ->             OTPCert = public_key:pkix_decode_cert(Cert, otp),             TBSCert = OTPCert#'OTPCertificate'.tbsCertificate,             Subject = TBSCert#'OTPTBSCertificate'.subject,             extract_cn(Subject)     end.
I have been trying to figure out what was wrong with peercert for a few hours as I keep getting the error {error, unexpected_request} and it dawns on me that this will never work, as psks dont use certificates, they use keys..
Would you happen to know of any way using erlang ssl to get any information about psk credentials?

You can see a client example in the vmq_bridge here:
https://github.com/erlio/vernemq/blob/204f2f7190b1e8b0cb04158ec6c2d9304b4bfc72/apps/vmq_bridge/src/vmq_bridge.erl#L309
The main point is the user_lookup_fun.
This mailing list answer for a similar problem might also clear things a little further: http://erlang.org/pipermail/erlang-questions/2017-July/092799.html
Time permitting, we're very keen to help you get this working! /cc @larshesel @dergraf

@ioolkos, to be clear, I have the psks working. I can connect to my vmq instance with psks using a user_lookup_fun that I have already built, and I actually used that mailing list question to solve that. The problem is that once connected, I need to authenticate users so that they can only view certain topics. So I need some way to see that Psk_identity server side outside of the user_lookup function.
My user lookup function can validate that your connection is secure and connect you. But the vmq server code needs to be able to set that psk_identity to the clientid or username. It can't do this in the user_loookup_fun because it has no information about the socket or monitoring process

@PiedPieper thanks for your explanations! it wasn't in fact clear to me that you already got psks working.
Now let's see. To go further I think we need 3 things, working back from the MQTT session state machine.
1. vmq_mqtt_fsm:
We have the actual ClientID check, that works with the preauth label:
https://github.com/erlio/vernemq/blob/60a8e478b881ca1587664c70851d2c76cbec160a/apps/vmq_server/src/vmq_ssl.erl#L20
We need a clause there that can actually be used as an entry point to check the psk_identity
2. vmq_ranch:
We should take the psk_identity and give it to the MQTT session state machine, similar to this:
https://github.com/erlio/vernemq/blob/204f2f7190b1e8b0cb04158ec6c2d9304b4bfc72/apps/vmq_server/src/vmq_ranch.erl#L55
3. vmq_ssl:
That probably means we need something like vmq_ssl:socket_to_common_name/1 to extract the psk_identity:
https://github.com/erlio/vernemq/blob/60a8e478b881ca1587664c70851d2c76cbec160a/apps/vmq_server/src/vmq_ssl.erl#L20
We also need to check if the proxy_protocol can handle the PSK identity, as we want to be able to let a proxy terminate TSL for VerneMQ.
@larshesel @dergraf does that seem like a correct assessment of the PSK identity situation?

I think this sounds reasonable. Basically it's supporting preauth with another source than a client-certificate. That said I have no knowledge of the mechanics of PSK in Erlang and it's not clear to me if this could be handled with the existing vernemq.conf options (and just work when PSKs are used instead of client certs) or if we'd need to change something there?

Hello @PiedPieper ,
Do you have success with that?
I also need this functionality.
Is it implemented already in vernemq?
thanks


Make sure  can be used as a "Smart" component for a "Dumb" child

See https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0
Currently, in order to fire actions, child needs to "touch" (and know about) fluce instance object. We should somehow provide action creators as callbacks to the child component.
Also we probably need a smarter logic of passing stores' states, rather than simply pass a stores prop (which might be a good default, though).

Here what I'am thinking of (shamelessly borrowing from https://github.com/gaearon/redux):
function addFoo(fluce, foo) {
  fluce.dispatch('fooAdd', foo)
}

function deleteBar(fluce, bar) {
  fluce.dispatch('barDelete', bar)
}

class DumpComp extends React.Component {
  render() {
    return

Foos

        {this.props.foo.map(foo =>
{foo}
)}

      <button onClick={() => this.props.addFoo('a new Foo')}>Add Foo</button>
      {/* ... similar stuff for Bar */}

  }
}

// Default render
<Fluce stores={{foo: 'fooStore', bar: 'barStore'}} actionCreators={{addFoo, deleteBar}}>
  <DumpComp />
</Fluce>

// Custom render
<Fluce
  stores={{foo: 'fooStore', bar: 'barStore'}}
  actionCreators={{addFoo, deleteBar}}
  render={(stores, actionCreators) => <DumpComp {...stores} {...actionCreators} />}
/>

I've updated the readme on the matter.
Also removed section about higher order component, I think we can live without it for a while. The <Fluce/> component seems enough, and the smaller API is the better.


query: read articles revert to unread

Newsboat version (copy the output of newsboat -v or the first line of git show):r 2.28-51-g33117-dirty
Config file (copy from ~/.newsboat/config or ~/.config/newsboat/config):
article-sort-order title
articlelist-title-format "%U"
bind-key J next-feed
bind-key K prev-feed
bind-key j next
bind-key k prev
bind-key o open-in-browser-and-mark-read articlelist
confirm-mark-feed-read no
datetime-format "%F %T"
error-log ~/.local/share/newsboat/error.log
feedlist-format "%4i %n %11u %L - %t"
ignore-mode display
keep-articles-days 365
prepopulate-query-feeds yes
reload-threads 32
run-on-startup reload-all;open
show-read-articles no
show-read-feeds no
unbind-key C

Steps to reproduce the issue:

Run newsboat and let reload-all complete to ensure there is articles in the query view.  I follow 577 feeds (all hidden) and  ![after](https://user-images.githubusercontent.com/430025/193467409-d2a92444-90e0-4d19-8bac-36432f324b63.png) ![before](https://user-images.githubusercontent.com/430025/193467410-5adedd87-3406-401d-a32f-ca46a15caa62.png) "query:Unread:unread = \"yes\"" so the reload takes 30+ seconds.  I mention this is as it's likely timing related.
reload-all again
enter query view which in my case have 51 articles and I marked the first 10 articles as read with 'N'.
wait for reload-all to finish.  I now have 44 articles in the query view.  7 were removed from the query view (#2150) and 3 (article 2, 5, 8) were changed from read to unread (this issue).

Other info you think is relevant:
Attached screenshots (white block is irrelevant so I removed it).

Thanks! Reproduced on current master (07d57d413cf9df97ef4c693fdc6993918692f0b5). The crucial detail that was missing from https://github.com/newsboat/newsboat/issues/2150#issuecomment-1264649093 is that items have to be marked read while the reload is in progress. This indeed seems timing-related, but I couldn't tell at a glance what is wrong; it looks like N immediately updates the database, and those updates ought to be picked up by the reload.


FIX: Install and use roadmaps table

Add missing CLI roadmap link
Line brake on multi items table cells
Your checklist for this pull request
🚨Please review the guidelines for contributing to this repository.

[ ] If the changes in this PR is part of the next future release, make this pull request against the docs-staging branch which will be published at the next release boundary. If the changes in this PR are part of the current release, use the default base branch, master. For more information about branches, see https://github.com/zowe/docs-site/tree/master#understanding-the-doc-branches.

[ ] If this PR relates to GitHub issues in docs-site or other repositories, please list in Description, prefixed with close, fix or resolve keywords.

Description (including links to related git issues)
Please describe your pull request.
:heart:Thank you!

Hi Pavlin, thank you for the update! Only one very minor comment. There is an extra dash - in [Information roadmap for Zowe API Mediation Layer](user-roadmap-apiml.md) <br/>-. Otherwise, this is good to merge.

Hi Ashley, it is actually intentional. Otherwise the renderer would distribute the two rows in the right cell evenly and they do not match the rows in the cell on the left, which has 3 rows, where the bottom one is the comment in parentheses. Maybe there is a better solution to this.


AT-1.3A: System administrator adds an organization

Test Case ID: AT-1.3A
User Story: ALTA-1.3A (#71)
As a system administrator, I want to be able to add a new organization to ALTA so that I can build my clientele.
Acceptance Criteria
Given that the user is logged in as a system administrator,

The user should be redirected to the Manage Organizations page which displays a table containing all organizations subscribed to ALTA.
The user selects the  Add button to redirect to the Organization Creation page.
The user enters the organization's name in the input field.
The user submits the new organization by selecting the Save button.

•	need to be able to include the organization's location upon creation and edit
•	instead of deleting an organization, change status to disabled or inactive
Status - Pending

ACCEPTED

ACCEPTED


Ansible-runner for EDA status 'work in progress' preventing usage

When attempting to use Ansible EDA with the Runner, I receive a 'Work in progress' status message, which prevents me from proceeding.
when I tried to use the Ansible core runner to use for EDA.
ERROR! 'sources' is not a valid attribute for a Play
The error appears to be in '/Ansible/rule.yaml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:

name: Example Rulebook
^ here
Status: failed
RC: 4
ERROR! 'sources' is not a valid attribute for a Play

The error appears to be in '/workspaces/Ansible/rule.yaml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:

name: Example Rulebook

Hi @mohanruva9
I'm not sure what the problem is because there are no clear steps to reproduce it. However, I assume you are trying to run a rulebook with Ansible or Ansible Runner, which is not supported. The rulebook must be executed with ansible-rulebook, the CLI of this project. Please refer to the documentation to learn how to install and use ansible-rulebook.


Update docs on running site locally on Win10

Instructions need updating
Known areas to fix

[ ] Step 1 Docker install

may require more in depth instructions for step-by-step how-to guide; likely okay for tutorial

[ ] Step 3 Running build.sh script (see #78)

Requirements to close issue:
When above items (and any potential future items deemed relevant) are resolved

Docker Install Windows 10
Requirements:

Windows 10 version 2004 or newer
BIOS enabled virtualization
Windows subsystem for Linux (WSL) version 2

If not already using WSL:

Check that Windows 10 is on version 2004 or newer How to check; if not perform Windows update
Enable hardware virtualization in BIOS
Activate WSL feature
Download and install Docker
Open Microsoft Store app and search for 'Linux' and install Ubuntu or Debian if you don't have a specific distribution (distro) you use

If already using WSL:

Open an elevated Powershell terminal
Enter wsl --list -v
If (1) is listed under "VERSION" for  installed distros, continue, otherwise if all distro versions are listed as "2" skip to Step 5
Enter the command wsl --set-default-version 2 to set your default distro to using version 2 of WSL and enter wsl --set version <Distro> 2 for any others you'd like to upgrade (including Docker if already installed)
Download and install Docker


settings_linkifiers: Make edit and delete buttons rounded.

All the buttons in settings have become rounded but these were still square with no border-radius. Added the rounded class for them to have the standard border-radius.

Screenshots and screen captures:
Before:

After:

Self-review checklist

[ ] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[ ] Each commit is a coherent idea.
[ ] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[ ] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

LGTM.

Looks good to me, though just noting we'll probably want to for 10.0 create a singular settings-table-rounded-button class that can be a single class defining the styles for these rather than doing all the inheritance. But that's a big project as part of the broader "remove bootstrap-btn" effort.


can we ue spock/groovy for testing operator-sdk  operator functional tests?

Type of question

General operator-related help

Question
What did you do?
Project specific operator writing
What did you expect to see?
functional tests for operator using groovy/spock
What did you see instead? Under which circumstances?

Environment
Operator type:

/language go

Kubernetes cluster type:
"OpenShift"
$ operator-sdk version
v1.0.0
$ go version (if language is Go)

go 1.15

Additional context

Hey @anusood , looking to understand what are interested in with this question.   First I think we need to establish the meaning of words... What specifically are you looking to do?  what does "functional tests" mean to you?
Most of my experience with spock is BDD unit and integration tests against groovy / java.  I have friends using Geb to provide testing against browsers (wrapper around selenium).   Is this the kind of tests you are looking to do?
Currently as a Go project the unit /integration tests are Go.   Generally speaking testing against the API server / operator is scorecard and KUTTL.   As I think more deeply about it... I do like the idea of a groovy / java wrapper around kube api-server to have spock instrument tests.   But first... is this the level of testing you are asking about?   If so, what you are asking isn't available to my knowledge.


4 make calendar overview

The merge does not seem to cause any conflicts...

how can i access to the home page? Should there be a route redirect to that page in AppRouter?

@YufXiao Yes, but it is in the next branch #45 , to access it, you must either do export REACT_APP_MIRAGE=true before doing npm run dev and do a registration with fake data, or you can locally deactivate the HomeGuard, LoginGuard.

I will add flags, so it also works non-MIRAGE.


[tf] Optimize scope close

We currently synchronously run all added closers, which can take a long time. Common use case for a closer is deleting a YAML file that was applied during a test.
This PR runs all closers in parallel. Significantly improves shutdown time on hosted k8s (e.g. GKE).
Please provide a description of this PR:

This caused a regression I think. do you have time to look into it or should we revert for now?
https://prow.istio.io/view/gs/istio-prow/logs/integ-pilot-multicluster_istio_postsubmit/1511753897725661184
Can see it gets stuck on goroutine 8852 [select, 30 minutes] which is the delete, so I assume this is what is blocking. It probably is a real bug in the test/Istio that its exposing though, so this is still likely a good change


Sync to llama.cpp + GGML version as of 20230407 09:57 AM UTC.

This would have been a pretty interesting first issue.
This also includes nuking the increased_determinism option since it's no longer needed.
I confirmed that it's possible to change the thread/batch sizes with deterministic results. I haven't don't any extensive performance testing but there didn't seem to be an obvious issue.
Other people should probably do some testing before this gets merged as it's a fairly complicated change. I can't say I really understood what I was porting across.
Closes #118
Closes #67

Seems pretty reasonable from what I can see, will need to test but have no objections to merging otherwise

Can you also update https://github.com/rustformers/llama-rs/blob/main/ggml-sys/ggml/CREDITS.txt ?

Can do! By the way, the contributing thing refers to CREDITS.md, I didn't know what it meant until now.

Can do! By the way, the contributing thing refers to CREDITS.md, I didn't know what it meant until now.

made it clearer, ty


crontab-ui in Docker Fails to Start

Pull #139 seems to have broken crontab-ui when running in Docker.
Output when running the Container:

$ docker-compose up crontab-ui
Creating crontab-ui ... done
Attaching to crontab-ui
crontab-ui          | 2021-05-21 23:19:53,582 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
crontab-ui          | 2021-05-21 23:19:53,584 INFO supervisord started with pid 1
crontab-ui          | 2021-05-21 23:19:54,588 INFO spawned: 'crontabui' with pid 8
crontab-ui          | 2021-05-21 23:19:54,592 INFO spawned: 'crontab' with pid 9
crontab-ui          | 2021-05-21 23:19:55,006 INFO exited: crontabui (exit status 1; not expected)
crontab-ui          | 2021-05-21 23:19:56,010 INFO spawned: 'crontabui' with pid 16
crontab-ui          | 2021-05-21 23:19:56,011 INFO success: crontab entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
crontab-ui          | 2021-05-21 23:19:56,428 INFO exited: crontabui (exit status 1; not expected)
crontab-ui          | 2021-05-21 23:19:58,432 INFO spawned: 'crontabui' with pid 23
crontab-ui          | 2021-05-21 23:19:58,853 INFO exited: crontabui (exit status 1; not expected)
crontab-ui          | 2021-05-21 23:20:01,859 INFO spawned: 'crontabui' with pid 30
crontab-ui          | 2021-05-21 23:20:02,272 INFO exited: crontabui (exit status 1; not expected)
crontab-ui          | 2021-05-21 23:20:03,273 INFO gave up: crontabui entered FATAL state, too many start retries too quickly

After a little digging, the issue is with the nullish coalescing operator used in routes.js.
Output when manually running crontab-ui inside the container:

/crontab-ui # node /crontab-ui/app.js
Cron db path: /crontab-ui/crontabs
Path to crond files set using env variables /etc/crontabs
/crontab-ui/routes.js:2
var base_url = process.env.BASE_URL ?? '';
__________________________________^
SyntaxError: Unexpected token ?
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/crontab-ui/app.js:15:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

Nodejs needs to be at least v14.0.0 to support that operator. Version 10.24.1 is installed with Alpine 3.10.
Either removing the coalescing operator or bumping Alpine to v3.13 (and therefore nodejs-14.16.1-r1) allows the container to run again.

Have the same output in logs and have built the image with nodejs (14.16.1-r1) but still have the same problem when starting in Docker

Thanks for reporting the issue. I have fixed this in https://github.com/alseambusher/crontab-ui/pull/156 and should be available in the latest docker image. If you still face issues with it, please feel free to re-open the issue.


User data associated with a WrenVM

I use Wren embedded with C++.  I needed a way to associate a C++ object with each VM so I can have state access during callbacks.
New API functions
void wrenSetUserData(WrenVM* vm, void* userData);
void* wrenGetUserData(WrenVM* vm);
You can also set the user data during VM initialization via the WrenConfiguration struct:
config.userData = this;
Breaking API changes
Added additional vm parameter to WrenErrorFn (The only callback that did not specify the VM).
typedef void (*WrenErrorFn)(     WrenErrorType type, const char* module, int line, const char* message, WrenVM* vm);

What do you think on adding a finalizer function associated to the user data?
Something like:
void wrenSetUserData(WrenVM* vm, void* userData, WmUserDataFinalizerFn finalizer)
{
	vm->config.userData = userData;
	vm->config.userDataFinalizerFn = finalizer;
}

Thus, we can execute a code to release the object in the userData when the VM is terminated:
void wrenFreeVM(WrenVM* vm)
{
	ASSERT(vm->methodNames.count > 0, "VM appears to have already been freed.");

	if(vm->config.userDataFinalizerFn != NULL && vm->config.userData != NULL) {
		vm->config.userDataFinalizerFn(vm->config.userData);
	}

	// ...

I like the finalizer addition.  It provides additional flexibility.

wouldn't it be easier to do that association on your side? like instead of manipulation WrenVM's objects directly, you have a custom struct having 2 fields (the VM and your data).

The tricky part is accessing that struct in the C-style global functions such as WrenBindForeignMethodFn or WrenReallocateFn. One way of doing it storing data in a global data structure, but that becomes tricky if your application uses many VM instances. In that situation you want to store a pointer to your struct in the VM itself 🙂

Awesome, thanks! I don't think it's worth adding a finalizer since the host is responsible for calling wrenFreeVM() anyway. The host can always do any finalizing it wants right before it calls that.


flush protocol object instead of transport

the old code generates this
var GeoLookupClient = exports.Client = function(output, pClass) {
    this.output = output;
    this.pClass = pClass;
    this.seqid = 0;
    this._reqs = {};
};
GeoLookupClient.prototype = {};
GeoLookupClient.prototype.lookup = function(loc, callback) {
  this.seqid += 1;
  this._reqs[this.seqid] = callback;
  this.send_lookup(loc);
};

GeoLookupClient.prototype.send_lookup = function(loc) {
  var output = new this.pClass(this.output);
  output.writeMessageBegin('lookup', Thrift.MessageType.CALL, this.seqid);
  var args = new GeoLookup_lookup_args();
  args.loc = loc;
  args.write(output);
  output.writeMessageEnd();
  return this.output.flush(); <<<<<<<<<<< here should flush protocol, should be return output.flush();
};

var output is the protocol object while this.output is the transport
the generated Client flushes transport which is on the wrong level. (the Process code does the right thing) Instead, it should flush protocol. the builtin protocols such as TBinaryProtocol and TFramedProtocol call transport flush on flush protocol itself. so this change shouldn't break anything. but it makes customized protocol less awkward

lgtm. If you write to the protocol you should flush the protocol.


[V4.1.3] Carousel example code will not show images in IE11

Hi,
I'm using the code from the Carousel example here: https://getbootstrap.com/docs/4.1/examples/carousel/
This works on any browser I tested but on Internet Explorer 11 (tested on Windows 10), the carousel doesn't display the images.
Another user has the same proble on his live website here: http://www.claudiaspaziani.com/
I'm sorry if it is a duplicate but I couldn't find any.
Thanks for your help.

you can't just use  as IE doesn't understand that.
in any case, the problem is not with bootstrap, but with your implementation. in future, it'd be best to ask on StackOverflow or similar first. see https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker

That is sad because I didn't consider it as a personal issue regarding the fact that it is the "official" carousel example that is not working.

the official carousel https://getbootstrap.com/docs/4.1/examples/carousel/ works exactly the same in IE11 as in Chrome etc. the issue on the http://www.claudiaspaziani.com/ site was the wrong use of the  element, which is nothing to do with Bootstrap. unless you have an actual example where you use  properly and it still doesn't work?

Well, indeed, originally the code contains  <img srcset=" which seems to be replaced, once the page is displayed, with <img src=" but not on IE11
Here's a site were I'm using the code: https://www.lapause.be/
So, the main problem seem to be that the code should be replacing this
<picture>               <source srcset="img/cover2000x500.jpg" media="(min-width: 1400px)">               <source srcset="img/cover1400x500.jpg" media="(min-width: 769px)">               <source srcset="img/cover800x500.jpg" media="(min-width: 577px)">                            </picture>
With this

But it does not.