Rivets function auto-execution in expressions

In this issue, I would like to discuss the auto-execution of functions in Rivets expressions
{ model.myFunction }

If myFunction is a function, Rivets will execute it and send the result in the template.
I think we should turn off this feature. It would allow us to manually call the function with parameters. This would be a powerfull feature for a very small cost. The manual execution would be handled by a formatter like
{ model.myFunction | call model.param1 'param2' }

For backward compatibility reasons we could have a parameter in Rivets configuration
rivets.configure({autoExecuteFunctions: true});

I know it's less user friendly than a JS expression. But it's in the rivets template syntax and would totally benefit of the existing databinding mecanism without any additional work.
I like rivets expression syntax, because it's very easy to learn but very powerful.

This solution could replace what's called Computed properties (http://rivetsjs.com/docs/guide/#computed-properties). Computed properties are a way functions when a property changes in model. If find this concept hard to explain to developpers (not very natural) and it kinda break the layers isolation because the view must know what the function uses to compute the property.
With this issue we could replace
<span rv-text="event.duration < start end">

by

I have used a custom formatter of my own called call in the past. Perhaps we could define a special syntax for this that doesn't use a formatter, to avoid conflicts? Or, it really is just a simple formatter and rivets simply doesn't auto-execute functions by default. It would be up to the developer to define their own call: (func, ...args) => func(...args) formatter. Or, we include this as a built-in formatter?

A specific syntax would be great, but a "simple" formatter would be so easy to implement, with no risk of regression

What do you think about introducing built-in formatters, including call, just like there are built-in binders? There are several that almost every project uses, like equals, gt and lt, not etc.

I agree, in our projects we have included these formatters (exactly the ones you mentionned and some more like append, prepend...) as default for developpers.

Ok so just to clarify/summarise (sorry for repeating): what I think might be the right approach is:

Rivets does not automatically call functions (possible config option to control this)
A call formatter is included by default that basically does (func, ...args) => func(...args)
We also include several other very common formatters by default, just like Rivets already does with standard binders

Does that fit your thinking?

FYI, I took a scan through a few of our projects and asked the other teams during standup if they were using and functions in the sense described here.  Everyone said that they were not doing it, also, most people thought that this was a bad idea anyway and were surprised it was possible.
So, to chime in on behalf of me and all my coworkers, :+1:
As far as including more formatters, I think a few would be good but def not too many. The ones you mentioned also appear in all of our projects.
This will probably be a task for me as I am updating the docs right meow for the 0.9 release.
We should teach people how to write formatters to fit their domain. This will ensure we are not dealing with a ton of bugs around 'the gravatar url formatter does not work in my crazy use case' .
This will essentially render the 'computed properties' feature useless.
So lets get some more support as that will be backwards incompatible.
For the 0.9 I would like to see the computed properties feature stay, for now, we throw a console warning saying the new syntax is preferred and will be deprecated in the 1.0 release.

Aren't 0.x versions well suited to introduce a new syntax?
To reassure those who want to update, we could handle backward compatibility with a rivets parameter. Something like
rivets.configure({
  'autoExecuteFunctions': true/false // I'm not good in parameter naming, so if you have a better idea...
})

Not the prettiest way, but it would give an option to those who want 0.9 (or 1.0) but don't want to add | call in their templates.

FYI semver allows to add breaking changes in 0.x versions

@Duder-onomy i'm really surprised that none of your colleagues use functions that get called by rivets, it's so useful! But – it is sometimes necessary to refer back to the model while you're reading your jade/html/whatever to work out if a property is a function or a value, and having call there will therefore help with readability.
However, I'm a little concerned about the computed properties issue. I use this feature a lot across my projects, here's a quick example:
<button rv-class-highlight="ready < user.password user.confirm">Submit</button>

It should be self-explanatory but essentially it applies the highlight class to the button when the ready() function returns true, and this ready() function checks the password and confirmation for validity and is called every time they are changed.
The only way I can think of doing this without computed properties is:
<button rv-class-highlight="user.password | checkPasswordAndConfirmation user.confirm">Submit</button>

This actually seems less clear to me, and requires a formatter that is overly specific, rather than keeping the checking logic within the view-model where it probably should be.
Couldn't we just say that if a binding has <, Rivets will auto-execute it? So to call a function, you either have computed properties, or you add the | call formatter?
Although semver says we can break everything whenever we like, I think it's debatable whether Rivets should actually be at 0.x right now anyway. We know for a fact that a) this is being used in many production projects and b) it has been "stable" for well over a year. I think we should proceed as if Rivets is already at 1.x.

@Leeds-eBooks i missed you message

Rivets does not automatically call functions (possible config option to control this)
A call formatter is included by default that basically does (func, ...args) => func(...args)
We also include several other very common formatters by default, just like Rivets already does with standard binders

That fits my thinking :+1:
For point 3 as @Duder-onomy said we must define too many. But as they are on this page, maybe we can just let projects choose what they want to include.

@Leeds-eBooks

Couldn't we just say that if a binding has <, Rivets will auto-execute it? So to call a function, you either have computed properties, or you add the | call formatter?

it's a possibility, as < will have no use if function is not executed. But computed properties cause issues as described in #213. Computed properties can be kept for backward compatibility but should be deprecated in favor of | call

@jccazeaux Ok I can live with that. Do you agree that in the example I showed above, computed properties are a good solution? Or is there a better way?

I suggest to create some snippets with the use cases. And implement them using both Approaches. With computed and with call.

Well my example wouldn't use call because you're not binding to a function (ready()), instead you have to bind to a string (user.password) so that it updates every time the string is updated by the user. That's why, in this case, computed properties and an auto-executed function make more sense to me, and I think they should maybe remain. My example above without computed properties actually wouldn't work because it wouldn't update if user.confirm changed. I'll paste it again:
<button rv-class-highlight="user.password | checkPasswordAndConfirmation user.confirm">Submit</button>

How would you make this be evaluated when either user.password or user.confirm changed? I don't think there's a way without computed properties.
I think rivets needs a way to evaluate x when y changes, and the only way to do that currently is computed properties. Unless I'm missing something obvious? I think keeping the computed property feature, and only auto-executing functions when the computed property feature is used, is a good compromise.
Alternatively, and I haven't thought about this in depth because I've only just thought of it, perhaps we could keep the computed property feature but not auto-execute, so it would be something like:
<button rv-class-highlight="ready < user.password user.confirm | call">Submit</button>

@Leeds-eBooks For you example i would have done
<button rv-class-highlight="ready | call user.password user.confirm">Submit</button>

This means the function ready would take two parameters. I like this approach because

With computed properties the view needs to know ready internals
With | call the view calls ready with the arguments it needs to do the work
This is my point of view. I cannot say with | call formatter i would never need computed properties so you're right, we must keep the feature.

For your idea about writing
<button rv-class-highlight="ready < user.password user.confirm | call">Submit</button>

It will work.
@blikblum @Leeds-eBooks
Can we start a branch for this feature? I will send the PR on it and we will be able to test it, create some snippets and finally make our opinion of the results. What do you think?

Ah, my apologies. I did not know that
<button rv-class-highlight="ready | call user.password user.confirm">Submit</button>

would re-call ready every time user.password and user.confirm changed. This is behaviour that I was not fully aware of.
In which case, my use-case for computed properties is completely fulfilled by the call formatter and actually computed properties don't need to remain. Sorry I got this wrong!
If you submit a PR I think we can merge it, personally.

OK I'll submit the PR ASAP

Probably this may be closed


可以兼容一下ios15吗

可以兼容一下ios15吗

Too hard to support.
Because the app is build on the App Intent APIs of iOS 16.


Founders of archived territories are get post notifications when unarchived by new founders

Had this reported today.

On unarchive or transfer, the original territory founder should be unsubscribed.


Explore existing code we could reuse

There is a lot of code out there on creating JSON metadata. Some of it may be useful.
Please add links to resources as comments on this issue.

https://github.com/tdwg/dwc
https://github.com/earthcubearchitecture-project418/gleaner

Could we use some of the GEOME code for validation? https://github.com/biocodellc/geome-db

Maybe http://empusa.org could be of use (I am co-developer), it does listen to a mix of OWL/SheX and can be used for API generation according to schema / property information

Consider wikibase

CEDAR is another one. I broke this into its own ticket: #6

As we are contemplating code, please also include their licensing information in the discussion.
Cheers,
Lynn

If this discussion needs to be continue, please file issues at https://github.com/GenomicsStandardsConsortium/mixs-rdf/issues


Adjust section margins for the application confirmation page

Description
Adjust section margins for the application confirmation page. View spacing mocks
Checklist
General
Read the full guidelines for PRs here

[x] Added the correct label: < feature | enhancement | bug | under-development | dependencies | infrastructure | ignore-for-release | database >
[ ] Assigned to a specific person, civiform/developers, or a more specific round-robin list
[ ] Added an additional reviewer from outside your organization as FYI (if the primary reviewer is in the same organization as you)
[x] Removed the release notes section if the title is sufficient for the release notes description, or put more details in that section.
[x] Created unit and/or browser tests which fail without the change (if possible)
[x] Performed manual testing (Chrome and Firefox if it includes front-end changes)
[x] Extended the README / documentation, if necessary. For user-facing features, consider updating the user docs. For "under-the-hood" changes or things more relevant to developers, consider updating the dev wiki.

User visible changes

[x] Followed steps to internationalize any new strings

[x] Added context strings to new messages
[x] Didn't use a message in applicant facing code that isn't translated yet (unless behind a flag)

[x] Wrote browser tests using the validateAccessibility method
[x] Made equivalent changes in Thymeleaf for applicant-facing features and changes (or created an issue in the Northstar epic to track that it's missing from Thymeleaf)
[x] Tested on mobile view. See mobile device mode
[x] Manually tested at 200% size
[x] Manually evaluated tab order

Issue(s) this completes
Part of #8626

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#8628  👈
#8627 : 1 other dependent PR (#8629 )
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ssandbekkhaug and the rest of your teammates on  Graphite

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#8628  👈
#8639
#8637 : 2 other dependent PRs (#8629 , #8638 )
#8627
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @ssandbekkhaug and the rest of your teammates on  Graphite


b669ea0 breaks old code

b669ea0da1e3db314aad13c47f2dbe812a0f21a9 breaks old code, I need to use constructions like render.element: document.body when I create engine.
Is it bug or not?

This was indeed a bug, should be fixed in c46e915 and master build, can you confirm?

Yep, I confirm.

Maybe should create new branch for node version?
https://github.com/upisfree/matter-server-js
Check it, I remove everything associated with rendering (like render object in Body), demo also there.

Thanks for the confirm. Actually I'm already working on decoupling the renderers and the runner in the main branch, but hopefully at least for now you shouldn't be getting errors from them in node.


Update getting-started.md

Pull request title should be MF-XXX - description or NOISSUE - description where XXX is ID of issue that this PR relate to.
Please review the CONTRIBUTING.md file for detailed contributing guidelines.
What does this do?
Which issue(s) does this PR fix/relate to?
Put here Resolves #XXX to auto-close the issue that your PR fixes (if such)
List any changes that modify/break current functionality
Have you included tests for your changes?
Did you document any new/modified functionality?
Notes

Codecov Report

Merging #912 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #912   +/-   ##
=======================================
  Coverage   83.67%   83.67%
=======================================
  Files          75       75
  Lines        5083     5083
=======================================
  Hits         4253     4253
  Misses        582      582
  Partials      248      248

Continue to review full report at Codecov.

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

@aufawibowo Thank you for your fix but sign your commit properly please, DCO is failing.

@aufawibowo I'm closing this. Please take a look at this comment.


No file generated by homeage after running sudo nixos-rebuild switch --flake .#

Files do not appear until reboot. Is this intended behavior? I think it would make sense to comment on this in the README?

The module description states this behaviour when using the installType = "activation". But it happened to me today as well, even if I'm pretty sure to have it set to "systemd".

I'm also currently seeing issues. It also seems that when you set installType = "systemd" you have to reboot for secrets to change? Is that expected or is there potentially something wrong with my setup?


I want to train my datasets but get the following errors, what should I do?

(tet-fcn) pu@pu:~/Downloads/tet-fcn/fcn/examples/voc$ ./train_fcn32s.py --gpu 0
/home/pu/Downloads/tet-fcn/local/lib/python2.7/site-packages/cupy/core/fusion.py:659: FutureWarning: cupy.core.fusion is experimental. The interface can change in the future.
util.experimental('cupy.core.fusion')
/home/pu/Downloads/tet-fcn/local/lib/python2.7/site-packages/chainer-4.0.0b2-py2.7.egg/chainer/backends/cuda.py:88: UserWarning: cuDNN is not enabled.
Please reinstall CuPy after you install cudnn
(see https://docs-cupy.chainer.org/en/stable/install.html#install-cupy-with-cudnn-and-nccl).
'cuDNN is not enabled.\n'
train:   0%|                                         | 0/100000 [00:00<?, ?it/s]Exception in thread prefetch_loop:[iteration=00000000]:   0%|                       | 0/736 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/pu/Downloads/tet-fcn/local/lib/python2.7/site-packages/chainer-4.0.0b2-py2.7.egg/chainer/iterators/multiprocess_iterator.py", line 330, in _run
alive = self._task()
File "/home/pu/Downloads/tet-fcn/local/lib/python2.7/site-packages/chainer-4.0.0b2-py2.7.egg/chainer/iterators/multiprocess_iterator.py", line 349, in _task
data_all = future.get(_response_time)
File "/usr/lib/python2.7/multiprocessing/pool.py", line 567, in get
raise self._value
IOError: [Errno 2] No such file or directory: '/home/pu/data/datasets/VOC/VOCdevkit/VOC2012/JPEGImages/2007_000033.jpg'

Please run ./download_datasets.py following the README: https://github.com/wkentaro/fcn#training


Fix clipdel cutting timestamps from file cache

The actual bug I encountered was that clipdel apparently re-ordered the clipmenu entries (seen when writing my own clipmenu-del).
Looking into it, I found clipdel cuted the timestamp column from the line cache file!
So, I tried to fix this, and keep the pattern retro-compatible:

still using the pattern in sed
not using sed -E
not break clipdel -d '^exact_match$' (the pattern is matched only against the text, without the timestamp).

Turns out sed is quite powerful, I discovered more sed commands that did the trick. But there could be a better solution I didn't see.
sed command h and g seems standard (at least non-gnu compatible), but I did not actually test it with a non-gnu sed (on bsd ?).
Also, I thought of using sed -i instead of for+mktemp, but I know there might be compatibility issues with non-gnu-sed, so I dropped it...

doing LC_ALL=C sed "\\#^[0-9]\+ ${esc_pattern}#d" do?

I thought of that, but then clipdel -d '^exact_match$' wouldn't work anymore (breaks the regexp: ^[0-9]+ ^exact_match$...).

(Not sure if you were talking about that, but I just re-pushed without a last minute mistake I made in the regex: [0-9]+ instead of [0-9]\+ in s#^[0-9]\+ ##;\\#${esc_pattern}#)

Hmm, you're right. Let me think a bit about this and get back to you.

Sorry, forgot all about this. Clearly I thought too much, so merged. Thanks for your contribution, sorry for the delay.


TypeError: Cannot read property 'top' of undefined

Hi,
I am trying to use this date-picker because this one is accessible. But i am getting this error :
TypeError: Cannot read property 'top' of undefined
I have included all the dependencies. Please let me know if you can help me in this.
Thanks,
Zahra

I get this as well, using Bootstrap 4

Thanks for your reply. I will give it a try.


Improvements in facet logic

tmpFacetConditions in the facet panel must be reset when the result set change.
When all values under a faceted fields are selected, all of them would be made part of the facet condition. It's not required. When all are selected, the field need not be part of the condition and things must work as expected.

Resolved as part of<EMAIL_ADDRESS>


Move to the new ObjectReconciler interface

Remove boilerplate code and adapt unit tests.
Fixes #1001
/cc @mresvanis @yevgeny-shnaidman

/lgtm


Git issues 20210820

closes #81
closes #50
closes #47
closes #44
closes #35 - moved to discussion
partially completes #33
closes #28
closes #22

Ahh! wrong repo


update dma configration file

new feature to ignore error codes.
The errors might be obsolete or the users does not care about this specific error and the error doesn't affect the assessment result, and then the user can use ignoreErrorCodes to ignore those errors.

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

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

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

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


modify tensorflow image classification service to take url param

Something like the following:
http://<ip>:5070/classify?url=https://static01.nyt.com/images/2007/04/02/us/02mormon.600.jpg

duplicate of https://github.com/fluxcapacitor/pipeline/issues/68


MqttServerOptionsBuilder.WithDisconnectedInterceptor NOT work

Describe the bug
I started a server with disconnected interceptor
the DisconnectedInterceptor not called when i powered off my mqtt client
Which project is your bug related to?

Server

To Reproduce
Steps to reproduce the behavior:

Using this version of MQTTnet '3.1.4'.
Run this code:

options .WithConnectionValidator(c =>
 {
    // works well
    logger.LogInformation($"{c.ClientId} is connected");
});
options.WithDisconnectedInterceptor(c =>
{
    // but this not
    logger.LogWarning($"{c.ClientId} is disconnected: [{c.DisconnectType}] ");
});``

### Expected behavior
The interceptor should be called when client disconnected or keepalive timeout;

I find IMqttServerOptions.ClientDisconnectedInterceptor not been used in source, it should be assign to MqttServerEventDispatcher.IMqttServerClientDisconnectedHandler.

The method is used in method CleanUpClient. Please try again with the latest verison.

still not work.

Neither for me. I created a minimal repro to demonstrate the issue: start the server, then run the client. Notice that Validator fired appears on stdout of the server, but Interceptor fired doesn’t.

Ah, okay. I just thought that this is a problem of my implementation :-). I currently have the same problem, too.

I found a solution temporary
Don't use the nuget package, clone the source to project and modify the code like this:
MqttClientSubscriptionsManager.cs   in constructor
        public MqttClientSubscriptionsManager(MqttClientSession clientSession, MqttServerEventDispatcher eventDispatcher, IMqttServerOptions serverOptions)
        {
            _clientSession = clientSession ?? throw new ArgumentNullException(nameof(clientSession));
            _options = serverOptions ?? throw new ArgumentNullException(nameof(serverOptions));
            _eventDispatcher = eventDispatcher ?? throw new ArgumentNullException(nameof(eventDispatcher));

            // ADD this line
            _eventDispatcher.ClientDisconnectedHandler = _options.ClientDisconnectedInterceptor;
        }

have fun!

Thank you @egops. Could you do a pull request so that it can be merged in the main repo easier?
We could also pull your fork in the meantime.

Thank you @egops. Could you do a pull request so that it can be merged in the main repo easier?
We could also pull your fork in the meantime.

Although this bug temporarily solved, but i think this line of code should not be placed here. it just a emergency plan.

Please do not use the handler from the server options. This is the wrong place (I will remove it from there). Please use the handler at the server object.

Why? Why should it behave differently than other handlers (connection validator, message interceptor etc.)? This is a configuration option just like the other handlers.

I close this as it is obsolete with version 4. Only the correct event handlers are available now.


Documentation: Why does passing Host headers "break everything"?

According to this documentation page, forwarding a Host header "obviously breaks everything". Unfortunately, it isn't so obvious to me. Just for experimentation, I added
            PreAuthorisationMiddleware = async (ctx, next) =>
            {
                ctx.DownstreamRequest.Headers.Host = ctx.HttpContext.Request.Headers["Host"];
                await next.Invoke();
            }

and so far, it doesn't break anything in my tests. Therefore, some clarification would be nice, thank you.

Same question raised here. Nginx and other reverse proxies can forward the original host header (at least in the X-Forwarded-Host header key). Why is it a problem in Ocelot? A lot of the times the back-end services behind the API Gateway need the original Host header value (i.e. for generating URLs in the response) so I don't know why his feature has not been implemented here yet.

+1

Just as an update to this, I used a variation of another solution on here to manually pass the original host from the upstream request to the downstream request:
Create the handler that will replace the downstream host header with the upstream value.
        public class HostInjectorDelegatingHandler : DelegatingHandler
        {
            private readonly IHttpContextAccessor _httpContextAccessor;

            public HostInjectorDelegatingHandler(IHttpContextAccessor httpContextAccessor)
            {
                _httpContextAccessor = httpContextAccessor;
            }

            protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
            {
                var host = $"{_httpContextAccessor.HttpContext.Request.Host.Value}";
                request.Headers.Add("Host",  host);
                return base.SendAsync(request, cancellationToken);
            }
        }

Add the handler to Ocelot init:
services.AddHttpContextAccessor(); // This is required to enable access to the HttpContext
services.AddOcelot()
  .AddDelegatingHandler<HostInjectorDelegatingHandler>()

And then on my route:
     "UpstreamHost": "example.com",
      "DelegatingHandlers": [
        "HostInjectorDelegatingHandler"
      ]

I'm looking into options to allow specifying the DownstreamRequest Header Host value based on the route definition within the ocelot.json files. I can confirm that manipulation of Host values is breaking a lot of features. This property is used to transport some central information and is overwritten by the result of the Service Discovery implementation within the LoadBalacing middleware to carry the downstream host address. Letting external configuration or header manipulation alter this value and guarantee it from being kept would required to change the logic how the downstream address is being read and transported over the Middlewares. Whereby this is not impossible it would break the existing behavior hence be a breaking change imho.
I guess the approach of having an extensibility mechanism allowing to overwrite / set this header value prior emitting the DownstreamRequest is the prefered way to go here. I'll built my solution around the example @nadafsak.


Problem with sticky/fixed Navigation bar with scroll (Bug)

When we add a custom sticky/fixed Navigation bar
on clicking the links on the left Sidebar
it scrolls to the id linked but Navigation bar overlaps above the Title
Refer the video

https://user-images.githubusercontent.com/61052566/165499306-a8304743-2e71-43cb-a935-cba1ae18ee56.mov

Hello @albala99 - just to confirm, this is a problem you're seeing on Anvil's website, right? But it's not a problem generally with SpectaQL when you use it?

Hi @newhouse  , the same is happening if i use a custom nav bar in spectaql

@albala99  In SpectaQL 1.2.0 you can now set the scrollPaddingTopPx option to adjust as necessary.
Can you try this and report back?

Closing  as I think this is fixed.


proposal: database/sql: add a common method to unwrap value of sql.Null* types

Proposal
Add an interface to database/sql implemented by sql.Null* types to unwrap the NULL or the value:
// NullUnwrap allows to unwrap sql.Null* types.
type NullUnwrap interface {
	UnwrapNull() (value any, valid bool)
}

(names to be debatted)
Extend sql.Null* types to implement it:
func (n Null[T]) UnwrapNull() (value any, valid bool) {
	if !n.Valid {
		return nil, false
	}
	return n.V, true
}

Why?
There is currently no builtin generic way to unwrap the value of types sql.Null* (sql.NullBool,sql.NullByte, sql.NullInt16, sql.NullInt32sql.NullInt64, sql.NullFloat64, sql.NullString, sql.NullTime).
But at least the list of types was known, so it was possible to use a type switch.
With the addition of sql.Null[T] (#60370) for Go 1.22 the type switch solution will not be enough.
The only ways to unwrap an sql.Null[T] are just hacks using either the driver.Valuer interface or reflect:
(full example: https://go.dev/play/p/DnStyHLekX1?v=gotip)
func UnwrapNullable(val driver.Valuer) (value any, valid bool) {
	v := reflect.ValueOf(val)
	if v.Field(1).Bool() {
		return v.Field(0).Interface(), true
	}
	return nil, false
}

func UnwrapNullable2(val driver.Valuer) (value any, valid bool) {
	value, err := val.Value()
	if err != nil {
		panic(err)
	}
	if value != nil {
		return value, true
	}
	return nil, false
}

A common method available on sql.Null* types would allow to have an efficient unwrapping and be type safe as unwrapping could be done after an interface check.
That interface could also help to distinguish types that are able to represent a NULL value (types that never return valid == false should not implement it).

cc @kardianos @bradfitz

ISTM, it should be called "wrap" not "unwrap" because you are wrapping it in the any type interface.
Also, I think you should return a zero T, not nil interface in the invalid case, so callers can still use a type switch to figure out what type it was supposed to be.
func (n Null[T]) Wrap() (value any, valid bool) {
	if !n.Valid {
		var zero T
		return zero, false
	}
	return n.V, true
}

Also, I think you should return a zero T, not nil interface
I agree. In that case wouldn't it more appropriate to for the return type to be (value T, valid bool) instead of (value any, valid bool) ?

I agree. In that case wouldn't it more appropriate to for the return type to be (value T, valid bool) instead of (value any, valid bool) ?

I thought that at first too, but no because you want to be able to do
type NullWrap interface {
	Wrap() (value any, valid bool)
}

if nw, ok := val.(NullWrap); ok {
    rval, ok := nw.Wrap()
    switch rval.(type) {
    // etc.
    }
}

If the interface were generic, you couldn't do a runtime assert of nw, ok := val.(NullWrap); ok.

I don't think NullWrap needs to be defined in the sql package though. Let callers who need it define it on their end.

If the interface is not declared, it will not be documented. Having documentation for it is part of the proposal.

ISTM, it should be called "wrap" not "unwrap" because you are wrapping it in the any type interface.

I called it Unwrap because it takes one value as input and returns 2 values: one any and one bool.
I think that NullWrap would be unsuited for that reason.

To help understand the motivation behind the proposal, could you give some practical examples of a use-case or a problem, where one wanted to unpack some Null*Like value into a (any, bool) pair?
The current version mentions:

[before Go 1.22] the list of types was known, so it was possible to use a type switch

Note that a user could always define their own nullable types, e.g. NullIPAddr to use as a Scanner/Valuer.


Two new tutorials on C

Hi,
I have added two new tutorials on C: 1) Multidimensional arrays and 2) Arrays and pointers. Would be great if you take a look at them.
Thanks.

This is awesome! Thanks!


Rendering bug using draw tool with background

@ychinghin could you share the steps to reproduce and also a video as well if possible?

Here's the video
https://user-images.githubusercontent.com/72866986/167075101-f504fe43-dd0b-4812-b27c-9e1a5024a38a.mp4


docs: fix code examples for Adding more URLs - Finding new links and Filtering links to same domain

I believe the code examples for https://crawlee.dev/docs/introduction/adding-urls#finding-new-links and https://crawlee.dev/docs/introduction/adding-urls#filtering-links-to-same-domain without enqueueLinks were mixed up.
Additionally I added a comment to why there are no params for filtering with enqueueLinks.

Please update the v3.3 snapshot too, this change would only affect the next version.

Fixed


Incorrect l1 l2 cache data on i7-13700KF

Describe the bug
I use cpuCache() api to get cpu cache and got following data:
{ l1d: 256, l1i: 512, l2: 8388608, l3: 31457280 }

As the description in https://systeminformation.io/cpu.html, the L1 data cache is 256 bytes and L1 instruction cache is 512 bytes. But I found that Task manager shows 1.4MB in L1 cache:

I try to read code and find the data come from "Get-CimInstance Win32_CacheMemory" command in PowerShell. Then I try this command in PowerShell and get the following data:
BlockSize      : 1024
CacheSpeed     :
CacheType      : 4
DeviceID       : Cache Memory 0
InstalledSize  : 384
Level          : 3
MaxCacheSize   : 384
NumberOfBlocks : 384
Status         : OK

BlockSize      : 1024
CacheSpeed     :
CacheType      : 3
DeviceID       : Cache Memory 1
InstalledSize  : 256
Level          : 3
MaxCacheSize   : 256
NumberOfBlocks : 256
Status         : OK

BlockSize      : 1024
CacheSpeed     :
CacheType      : 5
DeviceID       : Cache Memory 2
InstalledSize  : 16384
Level          : 4
MaxCacheSize   : 16384
NumberOfBlocks : 16384
Status         : OK

BlockSize      : 1024
CacheSpeed     :
CacheType      : 5
DeviceID       : Cache Memory 3
InstalledSize  : 30720
Level          : 5
MaxCacheSize   : 30720
NumberOfBlocks : 30720
Status         : OK

BlockSize      : 1024
CacheSpeed     :
CacheType      : 4
DeviceID       : Cache Memory 4
InstalledSize  : 256
Level          : 3
MaxCacheSize   : 256
NumberOfBlocks : 256
Status         : OK

BlockSize      : 1024
CacheSpeed     :
CacheType      : 3
DeviceID       : Cache Memory 5
InstalledSize  : 512
Level          : 3
MaxCacheSize   : 512
NumberOfBlocks : 512
Status         : OK

BlockSize      : 1024
CacheSpeed     :
CacheType      : 5
DeviceID       : Cache Memory 6
InstalledSize  : 8192
Level          : 4
MaxCacheSize   : 8192
NumberOfBlocks : 8192
Status         : OK

BlockSize      : 1024
CacheSpeed     :
CacheType      : 5
DeviceID       : Cache Memory 7
InstalledSize  : 30720
Level          : 5
MaxCacheSize   : 30720
NumberOfBlocks : 30720
Status         : OK

After comparing with the previous screenshot I found that the unit of output data in PowerShell is KBytes (The Cache Memory 7 should be L3 cache memory and the size is 30720).
I also comparing the output data in PowerShell with CPU-Z:

I found that Cache Memory 0's size in PowerShell equals to the 8*48KB in CPU-Z L1 Data:

The same goes for other data.
To Reproduce
Run following code can reproduce:
const si = require('systeminformation');
si.cpuCache().then(data => console.log(data));

Current Output
The L3 cache data is correct
{ l1d: 256, l1i: 512, l2: 8388608, l3: 31457280 }

Expected behavior
The l1d output should be (384+256) * 1024 = 655360
The l1i output should be (256+512) * 1024 = 786432
The l2 output should be (16384+8192) * 1024 = 25165824
{ l1d: 655360, l1i: 786432, l2: 25165824, l3: 31457280 }

Environment (please complete the following information):

systeminformation package version: 5.17.16
OS: Windows11 Pro 22H2 22621.1702
Hardware: i7-13700KF
PowerShell:

Name                           Value
----                           -----
PSVersion                      5.1.22621.963
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.963
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>

@Intro1997 thank you for reporting. I have to make further investigations on one of my machines and will come back with a solution. If I have further questions, I will contact you, OK?

Ok, thanks for your reply! I'm looking forward to your solution!

@Intro1997 ... I refactored the part getting cache information for windows but I am not able to test it right now. Can you check the current master branch?
git clone https://github.com/sebhildebrandt/systeminformation.git
cd systeminformation
npm run test

Then press "c" for CPU information ... can you post the results?

It's correct now! Thanks for fixing it!

@Intro1997 ... thank you for testing! Version 5.18.10 just released


[EDA] Do Not Fax Should Change with Do Not Contact

Note: FOR INTERNAL USE ONLY. For support questions, please use the EDA Chatter group in The Power of Us Hub.
For feature requests, please use the Ideas tab in The Power of Us Hub.

Do you want to request a feature or report a bug?
feature

What is the current behavior?
Currently only 'HasOptedOutOfEmail' and 'DoNotCall' are set/reset when a Contact is 'Deceased' or 'Do Not Contact' is set to true.

What is the expected behavior?
Changing whether or not a contact is "Do Not Contact" should change whether or not it is "Fax Opt Out". Marking the Contact as deceased should also mark 'Fax Opt Out' to TRUE.

What is the motivation / use case for changing the behavior?

Acceptance Criteria

When I create a contact that is marked as deceased, the contact is also automatically marked as follows:

HasOptedOutOfFax

When I create a contact that is marked as Do Not Contact, the contact is also automatically as follows:

HasOptedOutOfFax

When I update a contact that to change whether or not it is deceased, the following fields are synched:
*HasOptedOutOfFax

When I update a contact to change whether or not it is marked as Do Not Contact, the following fields are synched:

HasOptedOutOfFax

**lurch: attach W-042229

Tracking W-042229


[FEATURE]:Implemented Unified log collection solution for CSM modules

This PR includes functionalities w.r.t unified log collection solution under a Kubernetes cluster for a given namespace -
Driver details (namespace, driver name, driver version)
Details of the nodes, namespaces, pods, and sidecars
Detailed description of each pod
Lease details
Customised log collection for specific platforms

@Prabhu-Dell  can you close this feature request, since work is now merged ?

Closing the feature as it's completed and merged.


[Refactoring] Replace 'NOINLINE' with 'OPAQUE'

This replaces all occurrences of NOINLINE with the more reliable OPAQUE. However unlike NOINLINE OPAQUE prevents specialization, so let's benchmark this to make sure there's no unexpected slowdown.
Resolved #6269.

/benchmark validation

/benchmark nofib

/benchmark lists

/benchmark marlowe

OPAQUE is strictly better than NOINLINE for the plugin, but I don't think that is the case for non-Plinth code.

OPAQUE is strictly better than NOINLINE for the plugin, but I don't think that is the case for non-Plinth code.

Sure, but usually when I write NOINLINE I do really mean "don't inline that thing". So I think OPAQUE is a more sensible default and we can replace it with NOINLINE in special cases.

Interesting!

It honestly looks like the benchmarking machine is broken. I'll test that separately.

The benchmarking machine is broken at the moment, so we can't get accurate benchmarking results. I think it's unlikely that we need NOINLINE somewhere, so let's just merge this and be done with it.


Find one enthusiastic person per university/node.

Beginning plan: a) someone at a partner is interested, b) we host a workshop there, c) the person tries to make this a recurring event with in-kind or voluntary contribution after showing it's useful, d) they start coming to our internal meetings, e) more contributions, like SWcarpentry instructor training of their staff.
At least we should document this.

This issue is dated and does not quite fit the online format. Still we need to make clearer how to join as organization but I believe we can do this without this issue.


Handling lists of senders/receivers in select_loop!

Here's a trick that might make the Select struct almost completely unnecessary in practice.
In addition to accepting a single receiver rx in recv(rx, msg), let's also accept any list of receivers. i.e. anything that implements IntoIterator<Item = &Receiver<_>>. The same applies to send(tx, msg). This way select_loop! macro could easily handle dynamic cases as well.
An alternative syntax might be recv(rxs, rx, msg), meaning we iterate over the list rxs, and when it fires, we get referecen rx and message msg, meaning msg came from rx.
For example, I need like to do the following in crate ipc-channel. This is currently not possible with select_loop! so I have to resort to Select.
select_loop! {
    recv(
        self.receivers
            .iter_mut()
            .map(|r| r.receiver.get_mut().as_ref().unwrap())
            .enumerate(),
        (index, rx) => rx, // This is how we get the receiver from the tuple.
        msg
    ) => {
        println!("Got message from {}-th receiver: {}", index, msg); // We can use the index here.
    }
}

By turning the iterator into an enumerating one, we can also get an index of the receiver from which the message was received. I'm not completely sure about the syntax - this is just an idea.
@TimNN, any thoughts on all this?

Thoughts in no particular order:

I'm in favor of keeping select_loop! as simple as possible.
Adding a new way to pass tx / rx will add six new variants to the macro
I would start by prototyping methods like Select::recv_any<I: IntoIterator<Item=&Receiver>>(...)
Do you actually have a use case for getting the index?
Getting a reference to rx / tx doesn't seem super userful to me, do you have a specific use case?
If we support getting the index we should more generally support getting a second value, e.g. the key in a HashMap -- that would also support getting the rx / tx if the iterator produced tuples like (rx rx).
I don't think we can easily support both iterators with index and multiple without index.
Allowing iterators makes the "same iteration order" guarantee easier to violate.
I would propose the syntax recv(any $rx, ...) for the macro.

The total function signature I envision is something like this:  fn recv_any<M, I: IntoIterator<Item=(M, &Receiver<T>)>(&mut self, it: I) -> (M, T) { ... }

Do you actually have a use case for getting the index?
Getting a reference to rx / tx doesn't seem super userful to me, do you have a specific use case?

Yes. Sometimes we need to know which channel the message came from. Here's an example:
https://github.com/servo/ipc-channel/blob/master/src/platform/inprocess/mod.rs#L195
I agree that this might complicate the macro too much, though.


Add rust_core

rust_core provides a Dart-friendly implementation of Rust's core library, enabling idiomatic programming with predictable control flow. Rust's functionalities are carefully adapted to Dart's paradigms, focusing on smooth and language-compatible integration.

Also added the tapper package


Example usage of Surrogate Keys with custom values

Hello! I'm trying to understand how to use surrogate keys and can't seem to get it to work by merely following the spec.
My use-case is that I need to associate a group of cached files with a "project ID" so I can purge all files for the project when it is modified. I'm using Caddy and Otter.
Here's my Caddy config (using<EMAIL_ADDRESS>{
	cache {
		ttl 300s
		max_cacheable_body_bytes 1000000
		otter
		api {
			souin
		}
		# This may be required to enable surrogate-keys? https://github.com/darkweak/souin/issues/306#issuecomment-1429744951
		cdn {
			dynamic
			provider souin
		}
		default_cache_control public
	}
}

localhost {
	route {
		cache
		reverse_proxy web:3000
	}
}

When I want to set a surrogate-key, I include the header in the response in my application code (web:3000):
$ curl -ik -H "Host: picouser-www.localhost" https://localhost
HTTP/2 200
alt-svc: h3=":443"; ma=2592000
cache-control: public
cache-status: Souin; fwd=uri-miss; stored; key=GET-https-picouser-www.localhost-/
content-security-policy: script-src 'self'
content-type: text/html
date: Tue, 22 Oct 2024 02:16:29 GMT
etag: 5fddc78468241bf0dc7e721867874288
last-modified: Mon, 21 Oct 2024 20:21:37 GMT
server: Caddy
strict-transport-security: max-age=31536000; preload
surrogate-key: picouser-www                                <------ Project ID surrogate key is set here
x-frame-options: DENY
content-length: 2051

But the surrogate key is never saved:
$ curl 'https://localhost/souin-api/souin/surrogate_keys' | jq
{
  "GET-https-picouser-www.localhost-/": "<omitted>",
  "IDX_GET-https-picouser-www.localhost-/": "\n�\u0001\n\"GET-https-picouser-www.localhost-/\u0012k\n\u000b\b��ܸ\u0006\u0010���Y\u0012\n\b��ܸ\u0006\u0010��\u0004\u001a\n\b��ܸ\u0006\u0010��\u0004* 5fddc78468241bf0dc7e7218678742882\"GET-https-picouser-www.localhost-/"
}

Likewise, purging via the surrogate key I set also does not clear this cache entry.
I searched through the code and is seems like what I'm doing should work, but I may be missing a config value or something: https://github.com/darkweak/souin/blob/2968d51eef04b31925352ac4aaf815ea49f4efbd/pkg/surrogate/providers/common.go#L238
Am I using the feature incorrectly? Or could there be a bug? Happy to provide further info!

Hello @mac-chaffee the change https://github.com/darkweak/storages/pull/17/files#diff-f6400dfc406b7de4482980fec3748055e9bb49739340994735b5ed509a1e49c7L67-R67 should patch your issue you can try it with --with github.com/darkweak/storages/otter/caddy@f6400dfc406b7de4482980fec3748055e9bb49739340994735b5ed509a1e49c7L67 --with github.com/darkweak/storages/otter@f6400dfc406b7de4482980fec3748055e9bb49739340994735b5ed509a1e49c7L67. Btw that will be so great if picosh uses Souin/cache-handler module.


community[patch]: llama cpp stream generation and abort by invoke method

Hi ! Recently, I have been using LangChain to develop my own application.
When using Llama CPP, I noticed that the streaming generation solution mentioned in the documentation cannot be paused.
However, after consulting the official documentation of node-llama-cpp, I found that the streaming and pausing functions can also be achieved using invoke : https://withcatai.github.io/node-llama-cpp/guide/chat-session#response-streaming.
It only requires a slight modification of the onToken method to resolve this issue. Therefore, I made some changes to the LLM CPP part.
and there is test results:

Thank you! Nice catch


Initialization slidesPerView wrong

Check that this is really a bug

[X] I confirm

Reproduction link
Can provide if needed!
Bug description
Hey Guys,
im having a nasty flickering issue on my website. I tried everything, but nothing seems to fix this issue.
In the initalization process swiper renders only 1 slidesPerView instead of the configured 7 slidesPerView.
When the intializiation process is finished (within ms) swiper renders the configured 7 slidesPerView. But the user experiences a pretty bad flickering.
While initializing:

When done initializing:

Code

          Categories

      <Carousel>
        {props.subcategories.map((subcategory) => (
          <SwiperSlide key={subcategory.id}>
            <CategoryCard
              href={`/${props.category.slug}/${subcategory.slug}`}
              category={subcategory}
            />
          </SwiperSlide>
        ))}
      </Carousel>

Carousel Component
const defaultBreakpoints = {
  max: 2.5,
  640: 3.5,
  768: 4.5,
  1024: 7.5,
};
type Breakpoint = keyof typeof defaultBreakpoints;
type Breakpoints = typeof defaultBreakpoints;

export const Carousel = (
  props: SwiperProps & {
    children: ReactNode;
    breakpoints?: Breakpoints;
  }
) => {
  const breakpoints = props.breakpoints || defaultBreakpoints;
  const [{ reachedStart, reachedEnd }, setReached] = useState<{
    reachedStart: boolean;
    reachedEnd: boolean;
  }>({ reachedStart: true, reachedEnd: false });
  const slidesLength = React.Children.count(props.children);

  return (
    <Swiper
      autoHeight
      className={cn("select-none", props.className)}
      spaceBetween={2}
      onRealIndexChange={({ activeIndex, currentBreakpoint }) => {
        const breakpoint: Breakpoint = currentBreakpoint as Breakpoint;
        const slidesPerView = breakpoints[breakpoint];
        setReached({
          reachedStart: activeIndex === 0,
          reachedEnd: slidesLength - slidesPerView + 0.5 === activeIndex,
        });
      }}
      breakpoints={{
        280: {
          slidesPerView: breakpoints.max,
          slidesPerGroup: 3,
        },
        640: {
          slidesPerView: breakpoints[640],
          slidesPerGroup: 3,
        },
        768: {
          slidesPerView: breakpoints[768],
          slidesPerGroup: 3,
        },
        1024: {
          slidesPerView: breakpoints[1024],
          slidesPerGroup: 3,
        },
      }}
    >
      {!reachedStart && <PrevHandle />}
      {props.children}
      {!reachedEnd && <NextHandle />}
    </Swiper>
  );
};

You can experience the similar behaviour if you use the demo https://swiperjs.com/demos#slides-per-view and a plain NextJs Project.
Expected Behavior
No response
Actual Behavior
No response
Swiper version
9.3.1
Platform/Target and Browser Versions
macOS, Chrome
Validations

[X] Follow our Code of Conduct
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
[X] Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

[ ] I'm willing to open a PR

I also have this problem, how to fix it?

Don't expect breakpoints to work on server side - it is impossible so apparently you have flickering. You can hide or make slider transparent until it initialized on client

@nolimits4web Here I also have the same problem, with or without breakpoints the same thing happens.
In my case I only have the prop slidesPerView='auto' but in the first render you always see 1 slide for a few seconds and in the second render it just looks normal.


redis-rdb-tools integration into FastoRedis/FastoNoSQL

Hi maintainers, i have idea to integrate rdb into FastoRedis/FastoNoSQL. What you think about it? Pros and Cons of this integration?

@topilski can you elaborate on what exactly you have in mind?
what are features such integration will offer?
and also how you intend to achieve that integration?

Hi @oranagra , i want to start integration usfull tools into FastoRedis application, i think it will help users.
I thinking about execution python script and handling progress of dumping. It will be simple find script , pass needed args , handle execution in GUI. Users should specify path to rdb after that can execute commands.

So if i understand correctly this does not really consist of any integration between the redis client features and the offline rdb parsing features, but rather just having GUI for redis-rdb-tools inside the same GUI that's used as a redis client.

On top of that, maybe you can have a nicer display of some reports (allowing sorting, search, and filtering)
How would you get the redis-rdb-tools code into the FastoRedis runtime? will you download it from pip / github on demand?
Two ways of actually integrating the Redis client features with the rdb parsing features are:
user redis-rdb-tools protocol parser in order to send commands to a target Redis server (effectively loading the rdb into a running redis)
send SYNC command to a Redis server in order to download an rdb over the network and then use redis-rdb-tools to analyze it.

Hi @oranagra , in mostly users use ssh connections, how i can understand rdb can be used only on same machine. I think that user should setup path to rdb and python. The solutions can be load dump file via scp and exec rdb with needed args, or call rdb remotely but it is not GUI side issue. Can you describe  your 2 ways in more details?

regarding 1)
redis-rdb-tools has a tool that converts the RDB file into a stream of redis commands. if you send these commands to a redis server via a client connection, you effectively load that RDB into the target redis (merging it with whatever is already there, unless you FLUSHALL in advance)
regarding 2)
What i mean is that if you're already connected to redis as a client, you can download an RDB file directly form redis (without doing BGSAVE and any ssh/scp).
You do this by sending SYNC command (like slaves do), download the RDB file that you get a response and either save it, or better yet, feed the stream of bytes directly into redis-rdb-tools and avoid the slowdown of writing and reading from the local disk.
Please note that you can send REPLCONF CAPA EOF, and if the master is set with repl-diskless-sync then the master sends you an RDB file without storing it on the master's disk, but note that the response to the SYNC command is slightly different in this case since the master doesn't know the size of the RDB file ahead of time.

regarding 1)
redis-rdb-tools has a tool that converts the RDB file into a stream of redis commands. if you send these commands to a redis server via a client connection, you effectively load that RDB into the target redis (merging it with whatever is already there, unless you FLUSHALL in advance)
regarding 2)
What i mean is that if you're already connected to redis as a client, you can download an RDB file directly form redis (without doing BGSAVE and any ssh/scp).
You do this by sending SYNC command (like slaves do), download the RDB file that you get a response and either save it, or better yet, feed the stream of bytes directly into redis-rdb-tools and avoid the slowdown of writing and reading from the local disk.
Please note that you can send REPLCONF CAPA EOF, and if the master is set with repl-diskless-sync then the master sends you an RDB file without storing it on the master's disk, but note that the response to the SYNC command is slightly different in this case since the master doesn't know the size of the RDB file ahead of time.

how can I feed the stream of bytes directly into redis-rdb-tools ？


StateManager association fails to execute automation due to invalid parameters

The state manager association created by the solution has incorrect parameter value for the Parameter 'Action'
https://github.com/aws-ia/cfn-abi-crowdstrike-fcs/blob/main/templates/ssm-association-stackset.yml
The allowed values for the parameter 'Action' according to the above template is AllowedValues: [ "install", "uninstall"]
The automation execution using the above state manager assocation is failing with the below error message:
Excerpts from CloudTrail:
    "eventSource": "ssm.amazonaws.com",
    "eventName": "StartAutomationExecution",
    "awsRegion": "eu-west-1",
    "sourceIPAddress": "ssm.amazonaws.com",
    "userAgent": "ssm.amazonaws.com",
    "errorCode": "InvalidAutomationExecutionParametersException",
    "errorMessage": "Parameter \"Action\" has value \"install\" not found in [Install, Uninstall].",
    "requestParameters": {
        "documentName": "CrowdStrike-FalconSensorDeploy",
        "documentVersion": "2",
        "parameters": {
            "AutomationAssumeRole": [
                "HIDDEN_DUE_TO_SECURITY_REASONS"
            ],
            "Action": [
                "HIDDEN_DUE_TO_SECURITY_REASONS"
            ],
            "FalconClientSecret": [
                "HIDDEN_DUE_TO_SECURITY_REASONS"
            ],
            "SecretsManagerSecretName": [
                "HIDDEN_DUE_TO_SECURITY_REASONS"
            ],
            "FalconClientId": [
                "HIDDEN_DUE_TO_SECURITY_REASONS"
            ],
            "SecretStorageMethod": [
                "HIDDEN_DUE_TO_SECURITY_REASONS"
            ],
            "FalconCloud": [
                "HIDDEN_DUE_TO_SECURITY_REASONS"
            ]
        }

Is it possible to change allowed values accordingly in the 'templates/ssm-association-stackset.yml' template?
AllowedValues: [ "Install", "Uninstall"]

@tomjacobchirayil thank you this has been addressed in the latest PR.
@kkvinjam please link to https://github.com/aws-ia/cfn-abi-crowdstrike-fcs/pull/69 and close.  Thanks!

After the update, the new CloudFormation template fails with the following error on the resource: StagingS3BucketPolicy
CustomResource attribute error: Vendor response doesn't contain organization_id attribute in object arn:aws:cloudformation:eu-west-1:xxxxxxxxxx:stack/stack-org-master-crowdstrike-enable-integrations/xxxxxxx|OrgIdLambdaCustomResource|xxxxxxx

@EylonT I believe your issue was related to a different bug and has since been resolved.  Can you please confirm?


Possibility to add "backoff" to the task interval?

In some situations you may want a job to usually run (say) every minute.
But, assuming your tasks have persistent state, there may be nothing to run (e.g. a workflow might have a scheduleAt date and not be returned from a database call until that date had passed).  In such a situation you may then want to try again five minutes later, then twenty... etc.  If your job detects there is work to do, it would then reset back to the original interval.
I noted somewhere in the issues that it had been suggested to use setTimeout instead of setInterval.  If this were done, then it may be fairly simple to implement a "backoff".
I don't have a lot of spare time but could look into how it might be done.  The biggest issue, as I see it, is that the the actual scheduler and the job really don't have a communication path (not a bad thing - but makes this more difficult to implement).  There would need to be some way for the job to tell the scheduler to backoff as well as reset (function calls to the right part of the scheduler).  Then the "schedule" attached would only need to provide a "backoff" array (or the seconds could be an array or number) giving the successive intervals for each of the backoffs (and if the final one was reached just stay at that interval).
Does anyone using Toad Scheduler have a similar need and would it be something that people are interested in?
Or has anyone already implemented this?

I'll see what I can do.  I have a lot on my plate at the moment and will need to set up a fork for this.  At this point in time, I don't yet have the need for it but it seems to make sense instead of running tight timing on loop that may often not have anything to do.  I would also look up the recommended change from setInterval to setTimeout and apply that as I think that would make the backoff approach easier.

Both changes should be possible and also better managed with the addition of a runTask to the SimpleIntervalJob.  At present, the execute function returns nothing and the SimpleIntervalJob ignores it.  So my proposal is to use the return value from the execute function to provide a new timer value (either in ms or as a SimpleIntervalSchedule), detect that, and set the new timeout based on that value.  This means the backoff strategy is with the actual job handler and not with the Scheduler itself.  This approach should be fully backwards compatible.
I don't think this approach is viable (or relevant) for the LongIntervalJob.  A long running job probably doesn't need a backoff strategy.


we are not able to show the pagination when there is only one item. Is there any solution to this?

Is this a bug report, a feature request, or a question?
(Write your answer here.)

Have you followed the required steps before opening a bug report?
(Check the step you've followed - replace the space character between the square brackets ([]) by an x.)

[ ] I have read the guidelines regarding bug report.
[x] I have reviewed the documentation in its entirety, including the dedicated documentations :books:.
[ ] I have searched for existing issues and made sure that the problem hasn't already been reported.
[ ] I am using the latest plugin version.
[ ] I am following the issue template closely in order to produce a useful bug report.

Have you made sure that it wasn't a React Native bug?
(Write your answer here.)

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
(Write your answer here and specify the iOS/Android versions on which you've been able to reproduce the issue.)
Is the bug reproductible in a production environment (not a debug one)?
(Write your answer here.)

Environment

(Write your answer here.)
Expected Behavior

(Write what you thought would happen.)
Actual Behavior

(Write what happened. Add screencasts/screenshots!)
Reproducible Demo
(Paste the link to a Snack example in which the issue can be reproduced. Please follow the guidelines for providing a Minimal, Complete, and Verifiable example.)

Steps to Reproduce

(Write your steps so that anyone can reproduce the issue in the Snack demo you provided.)

May be its because
https://github.com/archriss/react-native-snap-carousel/blob/master/src/pagination/Pagination.js
if (!dotsLength || dotsLength < 2) {             return false; }

@amitkumar3968 Thank you so much! I needed the same and this worked perfectly. I wish we could get this change in the master since I am afraid it may be overwritten with future updates. Thanks again! 👍


Review artifacts information must be in the API review issue and calendar invite...

When a meeting is scheduled, the issue used to track the work in github is incomplete. Specifically, the way the API Review Board works is via github issues. The issue IS the record of the meeting, e.g. it will be where we assign ownership, take notes etc. It should contain everything necessary to prepare for a review.

Further, the meeting invite text should also contain the information. Right now, if I open up the meeting invite to find out what I will be looking at, e.g. to review the hero scenarios...
Meeting Invite --> GitHub Issue --> Calendar tool.

FYI @praveenkuttappan

Email information has been updated in issue https://github.com/Azure/azure-sdk-tools/issues/3986

Github issue has been updated too


How does vertical fade out work?

I've been trying to enable the scroll bar fade out with setScrollbarFadingEnabled(true) and also tried  setScrollBarFadeDuration and setScrollBarDefaultDelayBeforeFade but the scrollbar is never faded out..

You are talking about methods specific to RecyclerView. These methods apply to the normal scrollbar in the RecyclerView and have nothing to do with this library. There are plans, however, to make the fastscroller fading time customisable. The bubble fades out after one second now, Do you also need the handle to fade out? In all implementations I have seen, the handle is always visible.

@amgdeveloper You can now provide your own show/hide animations and bubble fade time with ScrollerViewProvider and VisibilityAnimationManager. Since you only want to change the hiding delay, I suggest extending DefaultScrollerViewProvider and  overriding:
@Override
   public VisibilityAnimationManager provideBubbleVisibilityManager() {
       return new VisibilityAnimationManager.Builder(bubble).withHideDelay(YOUR_DELAY).build();
   }

For more info, please, consult the example.


[BarChartCard] inconsistent props with TimeSeriesCard

Describe the bug
All chart cards should follow the same prop pattern. Additionally, they have the same functionality overall, but have 2 different ways of doing it.
For example, in TimeSeriesCard, the datasets are explicitly defined by the consumer. In BarChartCard, the datasets are created and defined by the component logic.
Additionally, TimeSeriesCard has the option of being a line or bar chart so duplicate code is being written to accomplish the same task. Also, by defining a BarChartCard specifically, should we not get rid of TimeSeriesCard, and create a LineChartCard that would match the BarChartCard pattern?
Expected behavior
Props are consistent across all charting components.

:tada: This issue has been resolved in version 2.79.7 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


add clusteroperator Upgradeable conditions

We cannot gate upgrading on available, failing, and progressing because if any of those conditions are "wrong", we may need to change the version in order to get them working.  This introduces a new condition that indicates whether or not the operator can accept a payload change.
@bparees
/assign @smarterclayton

this is a little meta.  i know we discussed this previously, but when would
an operator disallow moving to a new version?  do you have a scenario in
mind where you would set this False with your current operator?
On Mon, Feb 11, 2019 at 2:19 PM Ben Parees<EMAIL_ADDRESS>wrote:

@bparees commented on this pull request.
In config/v1/types_cluster_operator.go
https://github.com/openshift/api/pull/206#discussion_r255654727:

@@ -124,6 +124,10 @@ const (
// The binary maintained by the operator (eg: openshift-apiserver for the openshift-apiserver-operator) may still be
// available, but the user intent cannot be fulfilled.
OperatorFailing ClusterStatusConditionType = "Failing"

// OperatorUpgradeable indicates whether or not the operator is in a state where it can accept a new payload.  When
// set to False the CVO will disallow moving to a new version.
OperatorUpgradeable ClusterStatusConditionType = "Upgradeable"

You cannot have the CVO base its decision about whether or not to allow a
version change upon the operator status for the same reason you cannot
allow it make a decision based on operand status.
who's setting this "upgradeable" condition if not the operator?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/openshift/api/pull/206#discussion_r255654727, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AF8dbJYuzdrBwC2SOl-hchaX0xfjfA_eks5vMcIxgaJpZM4a0nQL
.

do you have a scenario in mind where you would set this False with your current operator?

yes.  When the unsupportedConfigOverrides have values in them.

Change the godoc as per my comment.

The current use cases described for this are:

kube-apiserver wants to prevent an update to a new payload (micro) because user has set unsupported changes
CLI and UI wants to display information about failing or non-upgradable ClusterOperators

There are a few future use cases we need to describe:

The MCO needs to block 4.Y updates of kube-apiserver when kubelets older than a specific version
We want to prevent an upgrade based on a specific API condition

@abhinavdahiya and I had a long chat, I think what we allow right now is:

David can set upgradeable false for unsupported version config
CVO will write Upgradeable=False to CV if any operator is failing or if anyone has Upgradeable false and a message
CLI and UI will show upgradeable false as informational message
CVO will not halt on upgradeable false yet

Once we have that much implemented, we'll go back and assess.
Future CVO might have "precondition jobs" that we use to assess whether a version could be started (without actually updating anything).  This would capture most of the "quick and dirty checks", assuming we don't have many of them.
In the short term, the CVO will do the following

Versions takes priority - we will never go past a CO that has cluster operator status versions that don't match
If versions match, Available=False and Failing=True will both block CVO from going past
If no versions are set, in the short term, Progressing=True will also block CVO (but when versions are set Progressing = true is informational)

Operators should be Available=True if they satisfy the "reason they are part of the payload" - i.e. if they expose an API, if the API is deployed they are available true.  If they have a single operand that should always be running, they are Available=true.  If they have an optional (as defined by biz use case) operand, they are available "if they have either created the operand or are waiting on a human".

Operators should be Available=True if they satisfy the "reason they are part of the payload" - i.e. if they expose an API, if the API is deployed they are available true. If they have a single operand that should always be running, they are Available=true. If they have an optional (as defined by biz use case) operand, they are available "if they have either created the operand or are waiting on a human". If they have many operands, they should become available when "the default operands as defined by a human" are created.

So applying this statement to the two devex use cases:

the registry operand should be considered "optional" (your cluster can work without it), thus on platforms where the registry cannot deploy (no storage), the registry operator would still report available=true/progressing=false/failing=false (assuming the operator itself is otherwise happy).  This makes the clusteroperator conditions largely useless for an admin checking the health of the registry, but ensures registry will not block install or upgrade.

the samples operand should also be considered "optional", meaning again, the samples operator should just report "available=true/progressing=false/failing=false" even if it has not created any samples yet.

For both of these, we will want to continue to have actually useful conditions on the operator-specific resource that indicate the state of the operand and why.  Unfortunately this means there's no consistent way to check that all operators and their operands are healthy/stable.  Or at least that the ClusterOperator resource is not that mechanism.
I think this largely goes against the current ClusterOperator api documentation(so that should be fixed) and from the perspective of an operator author trying to report useful status about the state of my operand, I think it's a step backwards, but if we are saying the CVO isn't going to switch to a different mechanism for determining when an operator is sufficiently stable such that the install/upgrade can continue, I guess that's what we have.
/cc @openshift/sig-developer-experience

This makes the clusteroperator conditions largely useless for an admin checking the health of the registry, but ensures registry will not block install or upgrade.

Why?  If you don't have an installed registry your health is "good".

2. the samples operand should also be considered "optional", meaning again, the samples operator should just report "available=true/progressing=false/failing=false" even if it has not created any samples yet.

Why?  The specific condition of you don't have a pull secret to the registry is something the operator should report but requires human intervention (today).  When we ship, it will again be an error.

Why? If you don't have an installed registry your health is "good".

And when i do have an installed registry but the storage isn't configured/available, but the operator still reports available=true/progressing=false so that it doesn't block the install?  I wouldn't consider that a registry that's in good health.

Why? The specific condition of you don't have a pull secret to the registry is something the operator should report but requires human intervention (today). When we ship, it will again be an error.

Because importing the samples takes time(thus making the install take longer) and having the samples available isn't critical to having a working cluster.  We're being asked why we're delaying the install.

And when i do have an installed registry but the storage isn't configured/available, but the operator still reports available=true/progressing=false so that it doesn't block the install?

There is no difference between a registry without configured storage and NetworkOperator Type=None - if you are waiting for human, you are available.

There is no difference between a registry without configured storage and NetworkOperator Type=None - if you are waiting for human, you are available.

That seems like a slippery slope.  When no registry pods can be scheduled because of node issues that require a human to go add more capacity, am I available/healthy?  When the storage is configured to a PVC but the autoprovisioner didn't generate a PV that's claimable, am I healthy because the admin just needs to go create a PV for me?
If anything it seems particularly weird to report available=true when you know the admin needs to take some action to actually make the thing available.
From an admin/end-user perspective, it doesn't matter why the registry isn't running, I need to know that it's not(and then i will care why and see if i need to do something about it).  Clearly the clusteroperator "available=true" condition isn't the thing that tells the admin that.

When no registry pods can be scheduled because of node issues that require a human to go add more capacity, am I available/healthy?

No, you aren't.

When the storage is configured to a PVC but the autoprovisioner didn't generate a PV that's claimable, am I healthy because the admin just needs to go create a PV for me?

No you aren't.
Those both seemed pretty easy?

Those both seemed pretty easy?

I don't think they look that different to an admin.  The difference between "you didn't configure storage at all" and "you configured storage but it's not available, maybe you did it wrong" is pretty subtle, yet you're saying in one case the registry is "available" and in the other it's not.  Not configuring storage is basically a special case of "you configured storage that isn't usable".
  Both of the scenarios I presented are cases where you're also waiting for a human.  So I don't see it as an easy distinction, but more importantly I don't see it as a useful distinction for an administrator who just cares if the thing is actually push/pullable or not (or upgradeable or not).
Which gets to the larger point. There are two concerns:

reporting availability of the operand (clearly available=true isn't for that)

determining when an upgrade is done/can be started:  the operator has to decide, given the state of itself and its operand, whether it is ok with an upgrade proceeding.  For the registry operator, I probably don't care why there are no registry pods running.  Either i'm going to allow you to upgrade when there are no registry pods, or i'm never going to allow you to upgrade when there are no registry pods.  But i'm not going to say "when you haven't configured storage, you can upgrade, but when you've configured invalid storage, i'm not going to let you upgrade" because it makes no difference in what happens during the upgrade.  I might want to block an upgrade when you've configured valid storage but no registry pods are running because I want to ensure storage migration happens correctly (then again I might not if i know it doesn't matter since I think we've only had one actual storage format migration in the history of the registry).

It looks like most of the action in this pull is about the meaning of Available, not the meaning of Upgradeable.
@smarterclayton doc updated

doc may need clarification to indicate that only False does something

I'm late to the game, but I'll add a little more detail to what makes this confusing.  I'm working on the console-operator and deciding how to set the statuses Available, Progressing, Failing when ManagementState:Removed.

If removed, I am deleting all of my resources, including the deployment for my operand (console).
If my operand does not exist, logically Available:False is the correct reporting (to a human). Its not possible to use it, it doesn't exist.
Progressing:false and Failing:false are not hard to reason about here. While I am deleting resources, Progressing: true. So long as I succeed, Failing:false.

It seems very confusing that I should actually be reporting Available: true on my operand, as its supposed to be deleted by user intent, even though it is clearly unavailable.

Gonna add one more.
If I set my operator ManagementState: Unmanaged, I desire to set Available: operatorsv1.ConditionUnknown because the operator doesn't know what a user might be doing.  At present my understanding is that I am still to set it to Available: true because the operator is honoring the user's desired state.  I'm not sure the intention of ConditionUnknown at this point.

However this: https://github.com/openshift/library-go/blob/master/pkg/operator/status/status_controller.go#L116
// if we are unmanaged, force everything to Unknown.
if detailedSpec.ManagementState == operatorv1.Unmanaged {
    clusterOperatorObj.Status = configv1.ClusterOperatorStatus{}
    configv1helpers.SetStatusCondition(&clusterOperatorObj.Status.Conditions, configv1.ClusterOperatorStatusCondition{Type: configv1.OperatorAvailable, Status: configv1.ConditionUnknown, Reason: "Unmanaged"})
    configv1helpers.SetStatusCondition(&clusterOperatorObj.Status.Conditions, configv1.ClusterOperatorStatusCondition{Type: configv1.OperatorProgressing, Status: configv1.ConditionUnknown, Reason: "Unmanaged"})
    configv1helpers.SetStatusCondition(&clusterOperatorObj.Status.Conditions, configv1.ClusterOperatorStatusCondition{Type: configv1.OperatorFailing, Status: configv1.ConditionUnknown, Reason: "Unmanaged"})
    configv1helpers.SetStatusCondition(&clusterOperatorObj.Status.Conditions, configv1.ClusterOperatorStatusCondition{Type: configv1.OperatorUpgradeable, Status: configv1.ConditionUnknown, Reason: "Unmanaged"})
}

makes me question what I previously stated.


Shouldn't read restored data for collation utf8mb4_0900_bin

See https://github.com/pingcap/tidb/issues/46690. Because utf8mb4_0900_bin is no pad, we shouldn't read/write RestoredData for it.

Not an issue for TiFlash. TiFlash doesn't sync index data.


[Storybook8] Migrate Stateful Client stories to V8

What
[Storybook8] Migrate Stateful Client stories to V8
Why
https://skype.visualstudio.com/SPOOL/_workitems/edit/3785953
How Tested

Process & policy checklist

[ ] I have updated the project documentation to reflect my changes if necessary.
[ ] I have read the CONTRIBUTING documentation.

Is this a breaking change?

[ ] This change causes current functionality to break.

Approving but I wonder if there is some space here with more love coming to the stateful client with new samples (breakout rooms and inbound calling) if there is space to make some of these images a live example to play with using mocks? (seperate item from sb8 updates)

We can always add more stories inside call and chat with the previews for each as we have done for composites.