Persist pyscript.* states between home assistant restarts

With this change any states set by pyscript in the pyscript domain
will be persisted when home assistant next reboots.
For example when a script runs pyscript.abc = 'foo' then this value
will be persisted.
Fixes #47

I tested this with the follow code:
@service
def testset(**params):
    try:
        cnt = int(pyscript.testsetcnt)
    except:
        pyscript.testsetcnt = 0
        cnt = 0

    if "name" not in params:
        log.error("name required")
        return

    if "value" not in params:
        log.error("value required")
        return

    attributes = params.get("attributes", {})
    if not isinstance(attributes, dict):
        log.error("attributes must be a dict")
        return

    state.set(f'pyscript.{params["name"]}', params["value"], attributes)
    cnt = cnt + 1
    pyscript.testsetcnt = cnt

There is an issue.
If I set a value and then restart, that value is there. However, if I then restart again (without setting it again) that value goes away.
Also, we likely need a way to REMOVE a set value.

According to the home assistant code comments states should be persisted
until some kind of expiry date as long as they were previously persisted.
Which is how i figured to solve both issues, but that clearly isn't working
then. I'll look into it, thanks for testing.
On Sat, Oct 17, 2020, 12:40 Daniel Lashua<EMAIL_ADDRESS>wrote:

I tested this with the follow code:
@service
def testset(**params):
try:
cnt = int(pyscript.testsetcnt)
except:
pyscript.testsetcnt = 0
cnt = 0
if "name" not in params:
    log.error("name required")
    return

if "value" not in params:
    log.error("value required")
    return

attributes = params.get("attributes", {})
if not isinstance(attributes, dict):
    log.error("attributes must be a dict")
    return

state.set(f'pyscript.{params["name"]}', params["value"], attributes)
cnt = cnt + 1
pyscript.testsetcnt = cnt

There is an issue.
If I set a value and then restart, that value is there. However, if I then
restart again (without setting it again) that value goes away.
Also, we likely need a way to REMOVE a set value.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/custom-components/pyscript/pull/48#issuecomment-710808450,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APVGX2EH475WKNAU5E7FAUTSLFYC7ANCNFSM4SUFX4MA
.

@swazrgb - thanks for the PR!
@dlashua - we could extend del to delete a state variable:
del pyscript.var1

There are two scenarios to consider for deleting state variables:

A state variable is registered by pyscript, and the pyscript that registered it has since been uninstalled. Should the state variable stick around forever? Probably not.

A script registers a state variable, and wants to then delete it. This might not necessarily be in-scope for this PR, as it also applies to other kinds of state.

For scenario 1 I am considering the following solutions:

Persist pyscript.* state variables that are either written OR read. So if pyscript writes a state variable, then restarts, and reads it, it's all good. But if for some reason the read were to happen within a conditional, then it wouldn't be persisted.

Provide a function that must be called at the top-level by pyscript for any state variables that should be persisted. This simply bridges to async_restore_entity_added. This method could also add a convenience argument for setting a default value.

Combine both solutions. Automagically persist during write and read, but also provide the function for complex scenarios where the write/read might happen conditionally and not every time home assistant is running. This might perhaps be confusing, since people will assume it "Just Works" until it doesn't.

I'm leaning towards solution 3, as that would still allow succinct scripts for simple cases. So I'll work on updating the PR accordingly. However, do please let me know if you have a different preference or additional thoughts. Thanks!

The example provided by @dlashua will still not automatically work as-is, as the state variable names are entirely dynamic. The only way to support this is to permanently persist all pyscript.* variables, even those of scripts that have since been removed. This might just be the easiest solution, but feels dirty.
This example explicitly registers the state variable, which is static, and works as expected:
state.persist("pyscript.count_restart", default_value=0)

@time_trigger("startup")
def ha_start():
    pyscript.count_restart = int(pyscript.count_restart) + 1

This example doesn't explicitly register the state variable, but does have a state_trigger, so it also works as expected:
@state_trigger("True or pyscript.some_var")
def some_var_changed():
    log.error(f"some_var: {pyscript.some_var}")

@service
def set_some_var(value):
    pyscript.some_var = value

However, the following example DOES NOT work as expected! The state variable is set conditionally, and never read or explicitly registered (because it is dynamic):
@service
def set_var(key, value):
    state.set(f"pyscript.{key}", value)

A user could work around this, though:
for var_name in state.names("pyscript"):
    if var_name.startswith("pyscript.set_var_"):
        log.error(f"Explicitly persisting: {var_name}")
        state.persist(var_name)

@service
def set_var(key, value):
    state.set(f"pyscript.set_var_{key}", value)

Thoughts?

I wound up implementing state.persist_prefix, as this already came up a few times when rewriting my pyscripts.
So now the following can be done:
state.persist("pyscript.some_var", default_value=123)
state.persist_prefix("pyscript.set_var_")

@service
def set_var(key, value):
    state.set(f"pyscript.set_var_{key}", value)

It is now also possible to do the following:
state.persist("pyscript.light", "on", {
  'brightness': 255,
  'color': [255, 255, 255]
})

If the state already existed and a new attribute is added to the default_attributes, then this attribute is patched in.

To make sure I understand what you have here...
In order to be sure a variable persists, I will need to do one of the following at some point after EACH Home Assistant start:

set it using state.set('pyscript.test_me', '123'), or pyscript.test_me = '123'
get it using state.get('pyscript.test_me'), or state.get_attr('pyscript.test_me'), or use it directly like if pyscript.test_me == '123'
call state.persist('pyscript.test_me')
call state.persist_prefix('pyscript.test_')

In addition to the above requirements, only entities beginning with pyscript. (i.e in the pyscript domain) will be persisted.
In practice, any entity I want persisted should be explicitly persisted using state.persist() or state.persist_prefix() unless I can be certain that code using methods 1 or 2 above will be run shortly after pyscript starts.
There is no need to "delete" persisted entities. Simply removing the pyscript code using that entity and any calls to state.persist() for that entity will cause the entity to be "removed" after two restarts of Home Assistant.
For additional clarity, using the entity in a Home Assistant Automation, Template Sensor/Binary Sensor, or Script will not ensure its persistence. One of the 4 methods listed above must be used in pyscript code.
If this is correct, I think the above text (or something like it) should be included in the Documentation.
We should also consider REQUIRING the use of state.persist() or state.persist_prefix() (i.e. don't automatically persist the entities on set/get). Since the pyscript user will have to know the entity name (or a prefix) anyway, but may not fully realize they've placed a set or get in a code location that is not guaranteed to run shortly after startup, requiring state.persist() will ensure that they do the right thing. Additionally, it'll ensure that no entities are persisted unexpectedly.

@dlashua That is all largely correct.

In order to be sure a variable persists, I will need to do one of the following at some point after EACH Home Assistant start:

Or mention the entity in a @state_trigger

In addition to the above requirements, only entities beginning with pyscript. (i.e in the pyscript domain) will be persisted.

I've decided to limit the scope of all of this to pyscript., since it seems to be unusual in Home Assistant ecosystem to create arbitrary domains that aren't backed by a component, and my purpose here is for pyscript scripts to define their own new states that can then be used as usual.

In practice, any entity I want persisted should be explicitly persisted using state.persist() or state.persist_prefix() unless I can be certain that code using methods 1 or 2 above will be run shortly after pyscript starts.

Yes. Or having a @state_trigger that watches this entity.

There is no need to "delete" persisted entities. Simply removing the pyscript code using that entity and any calls to state.persist() for that entity will cause the entity to be "removed" after two restarts of Home Assistant.

Correct.

For additional clarity, using the entity in a Home Assistant Automation, Template Sensor/Binary Sensor, or Script will not ensure its persistence. One of the 4 methods listed above must be used in pyscript code.

Correct.

If this is correct, I think the above text (or something like it) should be included in the Documentation.

I agree that the documentation should encourage users to always call state.persist or state.persist_prefix. Probably with a default value, since that is very handy.
Disabling the automatic persisting on read/write will make the implementation of persist_prefix a bit more complex. The reason it works right now is:

On the first run, when persist_prefix is ran, it doesn't do anything. The states it should tell home assistant to persist don't yet exist, so it can't enumerate them.

On the first run a write happens, the state is created AND persisted.

Home assistant restarts. During pyscript startup the persisted state is loaded back in. Then once the pyscript script starts, it enumerates the states, finds its prefixed states, and tells home assistant to keep persisting it.

So if we were to completely disable the automatic persisting on read/write, then this would have to be solved otherwise. Possibly by checking the set of states that have been passed to persist_prefix during write, seeing if any of the prefixes match, and then telling home assistant to persist it there.

If having it in @state_trigger also persists it, then it is likely to do the right thing for most of the users most of the time. So, with that, I think you can leave it as it is and just ensure the documentation is good. I'm happy to help with this.

If having it in @state_trigger also persists it, then it is likely to do the right thing for most of the users most of the time.

This is my thinking too.

I think you can leave it as it is and just ensure the documentation is good. I'm happy to help with this.

Thanks! I was hoping for further review from @craigbarratt before writing docs that describe these new features, but I've given you write access to my fork so if you feel so inclined, have at it 😄

Thanks for the progress on this.
I still don't understand the use cases well enough to know what the best solution is. Fixed "persistent" parameters would be done via config. So I presume it's mainly internal states (of anything) that you want to persist so a restart is not so disruptive.
First, stepping back a little, HASS state variables aren't a great way to preserve useful information since they are coerced into strings, although their attributes can be arbitrary types (I presume they at least need to be serializable).  On the plus side, HASS already supports persistence of state variables, so that saves us from having to develop and maintain some other mechanism.
Since the HASS state variable namespace is global, there is also the issue of different pyscript apps colliding if they fail to use unique names.
Combining these pros/cons, I somewhat agree that persisting HASS state variables is the right choice, although the namespace collision risks are a concern.  The alternative of persisting designated global variables in each app's context would avoid the namespace collision, and allow richer data types to be persistent (so long as they are serializable), but then we'd have to come up with a new way to do persistence, which is highly undesirable.  I do worry about the performance also, if even persistent variable setting causes a disk write (at least eventually).  I'm not sure how HASS does that - are they cached and flushed periodically?
I'd prefer not to have several different explicit and implicit mechanisms (eg, get and set) that denote persistence. I think it would be cleaner if there was just one way to do it. For example, state.persist could behave like a set that you simply add names to (or discard them).  Or we could have functions like state.persist_add() and state.persist_stop().  Those wouldn't be restricted to just names starting with pyscript.`, but that would be strongly encouraged.  Each script or app would explicitly add their state variables on startup.  Assuming the set of names itself is not persisted, then when you disable or remove a script, its persisted variables will disappear after the 2nd restart.
Alternatively, we could have a persist attribute on state variables which could be set or cleared.  But then a disabled script doesn't cause its persisted variables to be removed, which is undesirable.
Reactions?

My intention is to create HASS states that can be used in other automations, while also having them be persisted like input_string and friends are. So having a separate variable storage within the context of a pyscript app does sound like a good idea, but a different use-case.
Namespace collisions are a risk, but that is a risk that already exists. Any pyscript app that exists today can already set arbitrary states and collide with other pyscript apps. Adding persistence to these states doesn't change anything about that. Some apps seem to solve this by letting the user configure the state to use, where the user is expected to pre-create a input_* component, which is a hassle.
I want to make it as easy as possible for me, as a developer writing automations for my own home, to declare new persisted state variables that I can use to drive my home. That means I would really prefer to be able to do this all from within pyscript, without having to go through other config files for each state parameter I wish to store. Especially when those state parameters may depend upon auto-discovery of other entities, and as such cannot be predicated ahead of time easily.
I do agree that combining implicit and explicit registration of persisted variables is probably going to be confusing, though the current implementation does the right thing for most use-cases.
My preferred approach to requiring explicit persistence would be to keep the state.persist (with default value & attribute capability) and state.persist_prefix functions, and only persist variables that are registered there. These prefixed state variables must be re-registered as persistent with HASS each time the pyscript component is loaded by HASS, else they will be discarded
This does mean a new set will have to be introduced of all prefixes that get passed to persist_prefix, and this set must be checked during each pyscript.* variable write. The performance of this might not be ideal, although it would only impact non-persisted pyscript. prefixed state variable writes. Probably not too many of those?
Alternatively we could drop persist_prefix entirely, and and simply require the script to also call state.persist when it writes the prefixed variable, but that would be significantly less convenient, since state.persist must then be placed twice within the user's pyscript script, once in a loop on the top-level to re-register previously created dynamic state variables, and once within the code block that actually declares the dynamic state variable. So, that'd be something like this:
for var_name in state.names("pyscript"):
    if var_name.startswith("pyscript.set_var_"):
        state.persist(var_name)

@service
def set_var(key, value):
    state.persist("pyscript.set_var_{key}")
    state.set(f"pyscript.set_var_{key}", value)

I'd probably wind up having to include such a snippet in every pyscript I make, then. So I'd like a solution that keeps the capability of state.persist_prefix

I do worry about the performance also, if every persistent variable setting causes a disk write (at least eventually). I'm not sure how HASS does that - are they cached and flushed only periodically? Presumably it turns into a database write, so it should be relatively efficient.

This shouldn't be that much of a concern, the states are collected and flushed periodically (15 minutes) and upon HASS shutdown. A lot of components are also already utilizing this state storage by using the RestoreEntity mixin class.
So with all that said I propose the following:
# This is required for any state variable that should be persisted. Best practice is to put this on the top-level in a pyscript. If this method is not executed during the pyscript lifecycle the persisted value will eventually be lost.
state.persist("pyscript.my_var", default_value="on", default_attributes={'some_attr': 123})

# Alternatively it is possible to register all states with a certain prefix to be persisted
state.persist_prefix("pyscript.some_prefix_")

The persist function would remain unchanged as in the current PR.
The persist_prefix function would internally do the following:
    @classmethod
    async def persist_prefix(cls, prefix):
        """Ensures all pyscript domain state variable with prefix are persisted."""
        if prefix.count(".") != 1 or not prefix.startswith("pyscript."):
            raise NameError(f"invalid prefix {prefix} (should be 'pyscript.entity')")

        # Store the prefix to ensure the prefixed var is also persisted if it doesn't yet exist
        cls.persisted_prefixes.add(prefix)

        for name in await cls.names("pyscript"):
            if name.startswith(prefix):
                await cls.register_persist(name)

And the set function would do the following to ensure these prefixed vars also get persisted:
    @classmethod
    async def set(cls, var_name, value=None, new_attributes=None, **kwargs):
        """Set a state variable and optional attributes in hass."""
        # ...

        if var_name.startswith("pyscript.") and var_name not in cls.persisted_vars and any(var_name.startswith(prefix) for prefix in cls.persisted_prefixes):
            await cls.register_persist(var_name)

        cls.hass.states.async_set(var_name, value, new_attributes)

And the changes to notify_add and get would be reverted.

I wanted to add that I don't think it would be desirable to allow pyscript to let states outside of the pyscript domain to be persisted. This would let you break other components that do not expect their state to be persisted. Although it would be neat to be able to create arbitrary domains for grouping your state variables, this seems to go against how the home assistant state storage is intended to be used. Maybe I'm wrong though, I only recently started developing for home assistant.
I also am not a big fan of the pyscript.my_important_var.persist = True because that would collide with the syntax in my other PR (https://github.com/custom-components/pyscript/pull/49), and it looks like you're setting an attribute there. And the persist attribute isn't special in HASS, so I don't think it should be in pyscript either.

I still don't understand the use cases well enough to know what the best solution is.

There are several situations where persisting state is useful. I'm sure this list isn't comprehensive.

Storing data that is expensive to recalculate. If I have a pyscript that runs at midnight every night, accesses the Home Assistant events database and determines how many hours my HVAC system was running that day and then stores it using state.set('sensor.yesterday_hvac_hours', calculated_value). This could be used, perhaps, to add some notifications to let me know if I'm using more energy today heating and cooling my house so that, if I'm trying to keep my electric bill down, I can do something about it. When Home Assistant is restarted, that data is lost and now has to be recalculated.

Storing data based on events that can't easily be recalculated. Let say I am automating some kind of plant watering and care system with artificial lights. I need the lights to be on for 8 hours a day, but they are noisy, so I only want to run them when I'm away from home, if possible. So I have:

@state_trigger('binary_sensor.home == 'off')
def grow_lights_trigger():
  if pyscript.performed_grow_lights == "off":
    turn_on_grow_lights(60 * 60 * 8)

@time_trigger('startup')
def grow_lights_startup():
  if pyscript,.last_grow_lights_on == 0:
    return

  seconds = time.time() - pyscript.last_grow_lights + (60 * 60 * 8)
  if seconds > 0:
    turn_on_grow_lights(seconds)

@time_trigger('cron(0 0 * * *)')
def reset_grow_lights():
  pyscript.performed_grow_lights = "off"

def turn_on_grow_lights(seconds)
  task.unique('grow_lights', kill_me=True)

  light.turn_on('light.grow_lights)
  pyscript.last_grow_lights_on = time.time()
  task.sleep(seconds)
  pyscript.last_grow_lights_on = 0
  light.turn_off('light.grow_lights)
  pyscript.performed_grow_lights = "on"

I'm sure I missed something as I'm just making this up in the comment window, but I think you get the idea.
There are ways around this. Primarily, we use input_text to handle something light last_grow_lights_on and we use input_boolean to handle performed_grow_lights. But it would be really nice if pyscript could remember this data without having to take the extra steps to create those "helpers".
As @swazrgb indicated, namespace collisions are a risk. But it's somewhat in the nature of Home Assistant. These days, when there's a collision on, say binary_sensor.test, Home Assistant will create a binary_sensor.test_2 instead. While this prevented the collision, it doesn't do what the user wants because binary_sensor.test may or may not hold the data they want. I can't even count how many times this has bitten me. So in the case of pyscript, it will be entirely up to the user to avoid these collisions. But, at least there are fewer integrations competing in that namespace, so, less likely.
The "right" way to do this is to register each entity using all the entity registry stuff that I've never bothered to unravel the code for. Home Assistant will, then, try to assign an entity_id according to the "name" of the entity, but will name it whatever it wants if it can't. Then the user can change the entity_id in the UI. But, doing this makes it harder to access that entity in other pyscripts because it may have been named differently than you expect.

I also use this functionality to create derived states, which can be based on other state changes & events. Due to them being based on events some kind of persistence is necessary.
An example is the hue dimmer switch, this sends an event for each button press. I'd like to store the dim or scene state in a pyscript state variable (or attribute thereof), which ideally has persistence. Without persistence all the lights reset when HA restarts.

Thanks for the really excellent comments and background.  It's really helpful to understand potential use cases.
Ok, my preference is to keep things as simple as possible, so let's go with just:
# This is required for any state variable that should be persisted. Best practice is to put this on the top-level in a pyscript. If this method is not executed during the pyscript lifecycle the persisted value will eventually be lost.
state.persist("pyscript.my_var", default_value="on", default_attributes={'some_attr': 123})

Scripts that want persistence would have a sequence of calls like this, with the default values being applied only the first time.  And that should be all that you need - there shouldn't be any need to call state.persist later.
While I do hear your points about  the benefits of persist_prefix, I don't like the action and its effect being potentially far apart (if it applies to variables not yet created), so let's not have that.  I also agree using a "special" attribute as I proposed is a bad idea.
It sounds like we should add support for using del on a state variable, which should also remove the persist if present.  I'm happy to do that separately after I merge this PR, or feel free to add that.
Thanks again for your patience - this looks like a very useful feature.

I have updated this branch to include on state.persist(). I have corrected the documentation. I have tested with the following script:
state.persist("pyscript.boot_count", default_value="0")

@time_trigger("startup")
def inc_boot_count():
    try:
        cur = int(pyscript.boot_count)
    except NameError:
        cur = 0

    pyscript.boot_count = cur + 1

Looks great - thanks @swazrgb and @dlashua.


Hide weekends if disabled

Hi!
I want to hide the whole column if all dates are disabled from that column. Example: users won't be able to pick weekends, no matter what, so I want to hide Saturday and Sunday columns.. Is that possible?
Thank you!

Want a hacky CSS solution? ;)
.flatpickr-weekdaycontainer span:nth-child(7n+7),
.dayContainer span:nth-child(7n+7),
.flatpickr-weekdaycontainer span:nth-child(7n+1),
.dayContainer span:nth-child(7n+1) {
    display:none;
}

.flatpickr-day {
  flex-basis: 20%;
  width: 20%;
  max-width: 62px;
}

Closing this due to inactivity. Please reopen if you still have questions or if we can help further


Issue activating LDAP

Hi CMAK team!
I'm implementing this operator right now and I'm having issues on activating LDAP. Here is the chart I'm using to configure that.
# various settings for CMAK UI container and CMAK application
ui:
  port: 9000
  # additional command line arguments
  extraArgs:
    - "-DbasicAuthentication.enabled=true"
    - "-DbasicAuthentication.ldap.enabled=true"
    - "-DbasicAuthentication.ldap.server=corpdsuat.company.com"
    - "-DbasicAuthentication.ldap.port=389"
    - "-DbasicAuthentication.ldap.username=uid=$capturedLogin$,ou=people,o=company.com,o=email"
    - "-DbasicAuthentication.ldap.password='$capturedPassword'"
    - "-DbasicAuthentication.ldap.search-base-dn=ou=people,o=company.com,o=email"
    - "-DbasicAuthentication.ldap.connection-pool-size=10"
    - "-DbasicAuthentication.ldap.ssl=false"
    - "-DbasicAuthentication.ldap.ssl-trust-all=true"
    - "-DbasicAuthentication.ldap.starttls=false"

With this code, when I get to the URL, it prompts me for user and password. Once I enter them I get the "Oops, an error occurred" and on the pod logs I get:
! @8243ilg5n - Internal server error, for (GET) [/] ->

play.api.UnexpectedException: Unexpected exception[LDAPBindException: invalid credentials]
	at play.api.http.HttpErrorHandlerExceptions$.throwableToUsefulException(HttpErrorHandler.scala:247)
	at play.api.http.DefaultHttpErrorHandler.onServerError(HttpErrorHandler.scala:178)
	at play.core.server.AkkaHttpServer$$anonfun$1.applyOrElse(AkkaHttpServer.scala:382)
	at play.core.server.AkkaHttpServer$$anonfun$1.applyOrElse(AkkaHttpServer.scala:380)
	at scala.concurrent.Future.$anonfun$recoverWith$1(Future.scala:417)
	at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
	at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
	at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
	at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
Caused by: com.unboundid.ldap.sdk.LDAPBindException: invalid credentials
	at com.unboundid.ldap.sdk.LDAPConnection.bind(LDAPConnection.java:2273)
	at com.unboundid.ldap.sdk.LDAPConnection.<init>(LDAPConnection.java:670)
	at com.unboundid.ldap.sdk.LDAPConnection.<init>(LDAPConnection.java:563)
	at controllers.LDAPAuthenticator.ldapConnectionPool$lzycompute(BasicAuthenticationFilter.scala:156)
	at controllers.LDAPAuthenticator.ldapConnectionPool(BasicAuthenticationFilter.scala:144)
	at controllers.LDAPAuthenticator.isAuthorized(BasicAuthenticationFilter.scala:195)
	at controllers.LDAPAuthenticator.checkAuthentication(BasicAuthenticationFilter.scala:169)
	at controllers.BasicAuthenticationFilter.apply(BasicAuthenticationFilter.scala:30)
	at play.api.mvc.Filter$$anon$2.apply(Filters.scala:63)
	at play.api.mvc.Filter$$anon$2.apply(Filters.scala:50)
2023-06-28 13:47:30,569 - [ERROR] application -

The credentials are not invalid. I have just changed and tested it on another application that uses the same LDAP server. That one is working fine.
Is there anything I have to change on the username and password configuration for the chart?
Thank you very much!

Hello
Unfortunately I cant help om this issue - I have no experience with LDAP, no LDAP servers available and no time to investigate this particular issue.
I can suggest to try to connect to test LDAP server as suggested by CMAK docs and check the results, maybe you can identify smth useful.

Hi Ievgenii! Thank you for your feedback. Alright, if this ever comes back to your attention and I can help with any additional info or simulating the scenario, please let me know

Hi Ievgenii! Thank you for your feedback. Alright, if this ever comes back to your attention and I can help with any additional info or simulating the scenario, please let me know

thnx,
you are always welcome to investigate and provide PR with possible fixes.


Strange updates

First, I got updates only for the firmwares.
Then, the updates have the same version as the installed firmwares.
There is likely something wrong in the Device.get_updates()'s request.

Fixed by commits https://github.com/abadiet/GarminServerLess/commit/098ca847334ae045d2979beaa0cbab0a53fd498f and https://github.com/abadiet/GarminServerLess/commit/25da9e83d2eb009c635dbbef2346e509e184c03f


ipam/aws: updated EC2 instances ENI limits and added an helper function to make it easier to do so in the future

part of the fix for #14802
On top of #14905, this PR updates the hardcoded EC2 ENI limits to support newly added instance types. I also added as an inline comment the helper I used to recalculate this list dynamically.
ipam/aws: updated EC2 instances ENI limits and added an helper function to make it easier to do so in the future

test-me-please

@mvisonneau can you rebase this PR against master so that we can run the CI? thanks!

there you go @aanm :+1:

test-me-please

@mvisonneau can you make the commit message title shorter? :pray:

absolutely, I need to workout my commit descriptions :sweat_smile:  :+1:


How To - Request Parameters

Hello,
I've been trying to figure this out and I'm sure I've missed something simple. If anyone here could point me in the right direct I'd be very grateful.
I have an Azure Function v3 project built that implements nuget packages from this fork. My csproj is generating the XML doc and Swagger Gen/UI seems to be reading the function summaries. Just for clarity my hosts.json file looks like this...
// removed for brevity //
    "Swashbuckle": {
      "XmlPath": "Functions.xml"
    }

My problem is  XML parameter properties like <param name="Id">Id of menu</param> are not reflected in the Swagger UI as input parameters. The only input parameter I have 'code' which I believe is the function specific API key. I am just trying to get the function input parameters into my Swagger doc.
Does anyone have this working and, if so, can you provide an example? I have tried various settings adjustments and looking through this repo's issues. I also removed my XML configuration and confirmed that all of my summaries / etc went away.
Previously I've implemented this in asp.net core api projects and it always picks up the method model properties as inputs with little issue. In functions the entire request is passed in so I though I would use <param>.
Thanks,
Kevin

I've partially answered my own question and I'm going to keep looking. For GET request query parameters it seems I can use [QueryStringParameter("Id", "Id of menu.", DataType = typeof(int), Required = true)].
I'm still unsure about POST request bodies. It seems that I may be able to use RequestBodyTypeAttribute found here. I'll respond here with updates when I figure it out.


Fix Windows support for coverage

Codecov Report

Merging #142 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master     #142   +/-   ##
=======================================
  Coverage   67.95%   67.95%
=======================================
  Files          36       36
  Lines         958      958
=======================================
  Hits          651      651
  Misses        307      307

Impacted Files
Coverage Δ

src/lib/targets/node.ts
86.66% <ø> (ø)
:arrow_up:

src/lib/utils/mocha.ts
72.97% <100%> (ø)
:arrow_up:

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 f1e1aca...800751a. Read the comment docs.


Reverting video embed and adding link

Coverage remained the same at 94.14% when pulling c685b4764551763419ea93dd09c7304d95016731 on reshma-video-link into 5a1fd29f028b76e9953479d1d326bfcef455eb1c on main.


Compilation flags adjustment

The use of --param=ssp-buffer-size=4 doesn't seem to be necessary, see https://bugs.archlinux.org/task/44361.

Thanks for the hint


Error while training custom dataset, in validation phase:

Hi, thank you for great work. :>
When I try to train custom data, I face this error in validation phase inside an epoch training.

According to the error message, this error supposed to be because of factory.py don't have information of custom dataset's sequences.
Thus I added custom dataset sequence name to factory.py with
# custom data
for split in [
                'video-BzZspxAweF8AnKhWK',
                'video-FkqCGijjAKpABetZZ',
                'video-PGdt7pJChnKoJDt35',
                'video-RMxN6a4CcCeLGu4tA',
                'video-YnfPeH8i2uBWmsSd2',
                'video-dvZBYnphN2BwdMKBc',
                'video-hnbGXq3nNPjBbc7CL',
                'video-msNEBxJE5PPDqenBM']:
    DATASETS[split] = (lambda kwargs: [DemoSequence(**kwargs), ])

But then I face the following error.
Traceback (most recent call last):
  File "/app/TMOT/src/train.py", line 410, in <module>
    train(args)
  File "/app/TMOT/src/train.py", line 353, in train
    val_stats, _ = evaluate(
                   ^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/app/TMOT/src/trackformer/engine.py", line 331, in evaluate
    eval_summary, eval_summary_str = evaluate_mot_accums(
                                     ^^^^^^^^^^^^^^^^^^^^
  File "/app/TMOT/src/trackformer/util/track_utils.py", line 407, in evaluate_mot_accums
    summary = mh.compute_many(
              ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/motmetrics/metrics.py", line 310, in compute_many
    assert names is None or len(names) == len(dfs)
                            ^^^^^^^^^^^^^^^^^^^^^^

My command was this:
python src/train.py with     flir_adas_v2     deformable     multi_frame     tracking     output_dir=models/flir_adas_v2_deformable_multi_frame     resume=/app/TMOT/models/r50_deformable_detr_plus_iterative_bbox_refinement-checkpoint_hidden_dim_288.pth     epochs=20
In the error message I see the error is due to "evaluate_mot_accums'".
My first thought was this function might be related to evaluating mot dataset, not custom dataset, so I may just skip some mot evaluation phase?
Now I going to look into the lines in the error message and try to resolve error line by line, but I think I am missing something here.
Any advice according to the problem will be appreciated.   Thank you in advance.
Best,
Insoo.

@insookim43 hi i am also facing the same issue ! have you resolved it ? can you help me please

@insookim43안녕하세요, 저도 같은 문제에 직면해 있습니다! 해결하셨나요? 도와 줄수있으세요

Hello, I am working on this now. If I solve the error, I will leave comment later. Sorry to reply late.


Mocha breaks under Hapi: something something domains

I filled an issue for what I thought was my issue (async tests timing out on failure https://github.com/visionmedia/mocha/issues/1338) for what I thought was a general failure case. Turns out the problem is related to how Hapi and Mocha domains interact (see https://github.com/hapijs/hapi/issues/1908). Is there anything I can do to work around this, or am I stuck with not using Mocha for some of my tests? (Hapi's maintainer suggested using Lab.)

I can confirm this is still happening with hapi 8.1.0 and mocha 2.1.0.

It may have something to do with the fact that the event listeners are like a FIFO instead of a LIFO. So if Mocha registers first, to get the uncaught errors, whoever registers after Mocha won't get anything.

I'm beginning to experiment with Hapi, and I will try Mocha with it and see if I can nail down a solution.  Unless someone beats me to it.

I'm not familiar with Hapi and how it works, but from my testing the key problem with Mocha and domains is that every function call executed within a domain binds to that domain. Well, the means if you have a domain ever in code that executes a callback and that callback eventually bubbles up to the test, then the done ends up bound to that domain, which in turn makes the next test bound to the domain.
I've submitted a pull request for the problem, there's a chance it may correct your issue as well.
https://github.com/mochajs/mocha/pull/1610
You can try pulling my branch and seeing if that corrects your issue.

PR https://github.com/mochajs/mocha/pull/1610 was closed as not a good fit. No activity on issuefor 2 years, closing.


feat: add device param for running on real iOS device

Description
Allows developers to run on a real device by passing a -d flag to yarn dev:ios e.g: yarn dev:ios -d "Tom's iPhone". Previously running on a real iOS device required launching from Xcode.
Test plan
Tested locally on iOS
Related issues
N/A
Backwards compatibility
Yes

I am seeing some issues when attempting to run on a dev build real iOS device: Slack Thread.


Fix blockquote paddings and remove backedTextInputView

Details
Completely removes backedTextInputView and changes where it gets padding from for blockquotes. It was broken by #199.
Manual Tests
This is a visual change. You can see that the grey block is misaligned without this.

I have read the CLA Document and I hereby sign the CLA

recheck


Binding to hostname throws error

I'm having an issue when I try to bind a cert to a specific hostname. If I use the wildcard, I can bind to the port using the cert. I have included the error below. I may also add a feature request to choose a cert based on thumbprint. Thank you!
#Doesn't work
listen 'server.testing.net:8443' https -cert 'server.testing.net'
#Works
listen '*:8443' https -cert 'server.testing.net'

Binding server.testing.net to server.testing.net... Done
Failed to attach certificate:
The parameter is incorrect.
At C:\Program Files\WindowsPowerShell\Modules\Pode\0.27.2\Tools\Server.ps1:193 char:9
+         throw $_.Exception
+         ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : RuntimeException

Ah, I think I can see why that might be happening: it's trying to bind the certificate to a host:port rather than an ip:port so netsh is throwing a wobbly! What I think I'll do is have it so that by default, for hostnames, it binds the cert to <IP_ADDRESS>:port - unless a new parameter, say HostIP is supplied.
Also, I like the idea of getting a cert based on thumbprint!

Thank you! I would rather bind to the hostname that the wildcard. There are security reasons for this. Here is a PR I submitted to add hostname support to Polaris that may help. https://github.com/PowerShell/Polaris/commit/a0117afb7308273d869167af2b3d8be4f5ed8fe4
Here is the warning about binding to a wildcard. Thank you!
https://docs.microsoft.com/en-us/dotnet/api/system.net.httplistener?view=netframework-4.7.2

Thanks for the PR and link, might put that warning into the Pode docs as well!
I haven't had chance to test it, but what I just pushed into the commit above should allow you to bind certs against hostnames (branched from v0.27.2). I dug a bit deeper, and turns out that netsh also has a hostnameport tag now rather than just ipport 😄

Just managed to test it, and was able to successfully bind a cert to a hostname:port and browse the website 😄 no extra changes to the listen function, so just works as normal.
Unless there's anything else you'd like, I'll try and get this out as a v0.27.3.

I pulled the latest version for github and I am still getting the same error. I did netsh http show sslcert on the server and there is no sslcert added for the host name. Let me know if you need anything else! This is on Server 2016 and PowerShell 5.1.

@jeremymcgee73 Which branch did you use, develop or Issue-217? I was testing with Issue-217 on Win10+PS5.1

Ohhhh. I was testing with master :-)

I was testing with develop. I'll try with Issue-217!

Thanks! It does work!


Get-Help not lists all 'About*' topics

Steps to reproduce
PS /home/maxt> Get-Help About* | Select name
Expected behavior
To provide a list of all available 'About_*' topics.
Actual behavior
Is showing nothing to list.

Environment data
OS = Ubuntu 16.04.1 LTS Desktop

PS /home/maxt> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   <IP_ADDRESS>
GitCommitId                    v6.0.0-alpha.12
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>

That's cause we haven't shipped them yet. :)
There's a bunch of problems with about_ topics that need to be addressed by our new publishing pipeline. They'll likely all get fixed at once (or very close together), but I don't have an ETA yet, unfortunately...

Is the original Issue only on Unix? I cannot reproduce on Windows.
@SteveL-MSFT  If we want fix this in 6.0.0-beta1 we need more details about what @joeyaiello  said. Or will it be an internal solution?

I have experienced this issue using v6.0.0-alpha.17, both on macOS 10.12.3 Sierra and on Ubuntu 16.04 LTS (using the AppImage): Get-Help about_* lists no topics but Get-Help about_Variables does return the appropriate help page.

This doesn't repro on Win10, but does repro on Ubuntu16 with alpha.17 for me.

@chunqingchen Do we ready to close the Issue?

This still repros with #3528.  This one won't make it for beta1.

Next step here is to list any missing about_* topics (it should be a short or non-existent list), so we can validate before closing.

This is verified being fixed by #3852


Selenide tries to decorate SelenideElement without @FindBy annotation even if it is already initialized in ElementsContainer

The problem
Selenide tries to decorate SelenideElement without @FindBy annotation even if it is already initialized in ElementsContainer
Details
I have SelenideElement without @FindBy which is already initialized with $(...) method. It is situated inside ElementsContainer which is declared in some page object -> then try to instantiate PO using page(Page.class) or open(url, Page.class) -> Selenide tries to decorate my SelenideElement despite it is already instantiated.
Similar issue was already fixed for decorating such fields which are declared directly in PO (https://github.com/codeborne/selenide/pull/443)
It was solved by using com.codeborne.selenide.SelenidePageFactory instead of default org.openqa.selenium.support.PageFactory.
But it wasn't changed for ElementsContainer's elements initializing in method
com.codeborne.selenide.impl.SelenideFieldDecorator#initElementsContainer(Class<?> type, SelenideElement self).
It still uses default PageFactory.initElements(...) instead of SelenidePageFactory.initElements(...) which checks whether field is already initialized or not
Tell us about your environment

Selenide Version: 4.7.1
Chrome\Firefox\IE Version: Chrome 61.0.3163.100 but I think it's not browser-dependent
Browser Driver Version: Automatically downloaded by Selenide :)
Selenium Version: 3.5.3
OS Version: Win 10

Code To Reproduce Issue
public class Tmp {

    public static void main(String... args){
        Configuration.browser = "chrome";
        Page page = Selenide.open("http://selenide.org/", Page.class);
        page.whatIsSelenideBlock.title.shouldHave(Condition.text("What is Selenide?"));
    }

    public static class Page{
        @FindBy(xpath="(//div[@class='wrapper-color-content'])[1]") // xpath is just 4 fun :)
        Block whatIsSelenideBlock;
    }

    public static class Block extends ElementsContainer{
        SelenideElement title = $("h3");
        SelenideElement arrowDown = $("img");
    }
}

Error log:
Exception in thread "main" Element not found {by id or name "title"}
Expected: text 'What is Selenide?'
Screenshot: file:/C:/Users/Artsem_Savosik/IdeaProjects/epam-events-autotests/build/reports/tests/1507303101755.0.png
Page source: file:/C:/Users/Artsem_Savosik/IdeaProjects/epam-events-autotests/build/reports/tests/1507303101755.0.html
Timeout: 4 s.
Caused by: NoSuchElementException: no such element: Unable to locate element: {"method":"name","selector":"title"}
	at com.codeborne.selenide.impl.WebElementSource.createElementNotFoundError(WebElementSource.java:31)
	at com.codeborne.selenide.impl.ElementFinder.createElementNotFoundError(ElementFinder.java:82)
	at com.codeborne.selenide.impl.WebElementSource.checkCondition(WebElementSource.java:59)
	at com.codeborne.selenide.commands.Should.should(Should.java:35)
	at com.codeborne.selenide.commands.Should.execute(Should.java:29)
	at com.codeborne.selenide.commands.Should.execute(Should.java:12)
	at com.codeborne.selenide.commands.Commands.execute(Commands.java:143)
	at com.codeborne.selenide.impl.SelenideElementProxy.dispatchAndRetry(SelenideElementProxy.java:87)
	at com.codeborne.selenide.impl.SelenideElementProxy.invoke(SelenideElementProxy.java:63)
	at com.sun.proxy.$Proxy4.shouldHave(Unknown Source)
	at com.epam.events.common.run.Tmp.main(Tmp.java:13)

Fix by PR https://github.com/codeborne/selenide/pull/618. Will be released in Selenide 4.9


Not able to load image from local node js server

i tried the following two ways o loading image and output of the following codes are commemnted
1st try
 var imageAsBase64 = fs.readFileSync(path, 'base64');
          console.log('Exists ' + typeof (imageAsBase64)) // output  :Exists string

          const image = await faceapi.bufferToImage(imageAsBase64)
              .then(res =>{console.log(res)})
              .catch(e=> console.log("Error e "+e)) //output :Error e TypeError: Right-hand side of 'instanceof' is not an object

2nd try
   var imageAsBase64 = fs.readFileSync(path);
            console.log('Exists ' + typeof (imageAsBase64)) // Exists object

            const image = await faceapi.fetchImage(imageAsBase64)
                .then(res =>{console.log(res)})
                .catch(e=> console.log("Error e "+e)) //Error e Type Error: Only absolute URLs are supported

should i missing something or i need to try different way please help..

You should be able to just pass the file path like this faceapi.fetchImage(path). I am not 100% sure, but I am pretty certain.

You should be able to just pass the file path like this faceapi.fetchImage(path). I am not 100% sure, but I am pretty certain.
i tried but the error is same if you want to look at my code will uppload my repo to github

     var location = req.files[0].destination
        var imgFile = req.files[0].filename;
        if(!fs.existsSync(fspath.join(location,imgFile))) {
         console.log("Not exists")
      }else{
        console.log('Exists')  //yes Exists
      }

        const image = await faceapi.fetchImage(fspath.join(location,imgFile))
            .then(res =>{console.log(res)})
            .catch(e=> console.log("Error e "+e)) // Error e TypeError: Only absolute URLs are supported

I am not really sure then. I really do not know this library well enough to answer this question beyond the answer I gave.

i tried but the error is same if you want to look at my code will uppload my repo to github

Could you go ahead and do that?

i tried but the error is same if you want to look at my code will uppload my repo to github

Could you go ahead and do that?

Link to repo

faceapi.bufferToImage returns uses Blob under the hood, so you would need a node polyfill for that.
faceapi.fetchImage as the name implies uses fetch under the hood, thus it doesn't work with filepaths to local files.
I would recommend you to use the node canvas package for reading and writing images as stated in the README and shown in the node examples.

Tech Stack -MERN
I'm am having a similar issue, when attempting to buffer the image sent from the request body express server.
const image= await faceapi.bufferToImage(req.files.image);
ReferenceError: Blob is not defined
To put it simple how can I, buffer the image to perform something as simple as this.
// Detect all faces from buffered image
 const detections =await faceapi.detectAllFaces(image).withFaceLandmarks().withFaceDescriptors();     console.log(detections.length);
@WebDevSimplified
Watched your videos, they are very helpful
@justadudewhohacks
Thanks for contributing to the community.


Reset the session when id is found but session is missing

An application can hang if the cookie has been set, the client makes a request, but the session is not found in the database. This modifies the code to still set a session object even if the session is not found and also reset the cookie so a new session is created.

Also, this fixes #5

👍


special counter: Add special weapon null check

specialAttackHit() expects all its arguments to be non-null, so the
passed special weapon must be null-checked before being passed to it.
This fixes a frequent NPE caused by using any special attack weapon not
defined in the SpecialWeapon enum.

fixed by 3bbfdbbfb0ae9d642fa2585a00dd53e656894d90


Add Dhalion-sensor implementation for heron

PART 2 of 4
Part  1 of 4 merged in #1980
A original PR related to Topology health manager, #1952, may be too big to review. This PR is "subset" of the original PR, and is created to review the following components of topology health manager:

Sensors

@billonahill  any comments or shipit?

Yes, I will review. Apologies, a snafu in my email filters caused me to miss all github emails for 2 days...

@ashvina any updates to Bill's comments?

@billonahill Your comments have been resolved. Could you give shipit?

@ashvina @billonahill Thank you for the great job on this PR. Let's move to the next part.


support: add dep for L Market app for release

📝 Description
Add dep between plugin and Ethereum app
This PR is the equivalent of #334 for the release branch.
❓ Context

Impacted projects: L Market
Linked resource(s): None

✅ Checklist

[ ] Test coverage  n/a
[x] Atomic delivery yes
[x] No breaking changes no breaking changes

📸 Demo
n/a
🚀 Expectations to reach
n/a

/screenshots


Client Side Certificates

Do you know if it's possible to make a request using a client side certificate?
https://github.com/request/request#tlsssl-protocol
http://docs.python-requests.org/en/latest/user/advanced/#ssl-cert-verification

Inquiring minds would like to know :)

Looks like this is possible from the Apache side (see this stackoverflow answer), but isn't implemented in clj-http yet.

+1

:+1:

I was able to get a client certificate request to work, and I saw what looks like client certificate request tests in the repo. It looks like the necessary steps are happening here.
There's a very nice test page linked in the SO answer above, and I got a good response using the supplied JKS keystore. I had to locally tweak clj-http to separate passwords for the keystore and certificate, but this shouldn't be an issue if your passwords are the same.
(core/request
  {:request-method     :get
   :scheme             :https
   :uri                "slsh.iki.fi/client-certificate/protected/"
   :keystore           "test-resources/clientkeystore.jks"
   :keystore-pass      "keystorepass"})

Closing this as I believe it's been implemented with the :keystore functionality. If I'm mistaken please let me know and I'll be happy to re-open.


Query joins for searching in nested object not implemented

Problem
Right now it is not possible to search values in nested objects.
Solution

[ ] In the Query.Run() method, the JSON strings of the nested object should also be retrieved by their primary key.
[ ] To make things a bit faster they possibly can be cached.
[ ] The effective search then has to look up the specified property in one or the other JsonElements.

This will be postponed to a later release.

This will be postponed to a later release.


create non-root krkn-hub images

We've to add in the documentation a tip regarding making the kubeconfig readable by everyone like copy ~/.kube/config ~/kubeconfig && chmod 444 ~/kubeconfig


Slow double click shows rename option

Describe the bug
If the double click on a highlighted folder/file is not very fast, then instead of opening the folder/file, it shows the rename option.
To Reproduce
Steps to reproduce the behavior:

Single click on any file or a folder
Make a normal double click to open that highlighted file
(Change the time gap between the two clicks of a double click)
Unless the double click is not very very fast, it will show the rename option instead of opening the file / folder

Expected behavior
In the normal file explorer (the one that comes with windows) or even on our desktop, even if the time gap between the two clicks of a double click is large, it will be considered as a double click and it opens the files. To enter the rename option, we have to wait like 1-2 seconds before making a single click on a HIGHLIGHTED file / folder to rename it. But in the Files Beat, it's like we have to focus on double click and make the two clicks very very quickly or as on the first click of the double click, it will show the rename option.
Screenshots
None
Desktop (please complete the following information):

OS Version: [Windows 10 2004]
App version: [v<IP_ADDRESS>]

Additional context
None
Log file
None

i can't reproduce it. I use the same time on explorer and Files, and it works the same way for me

i can't reproduce it. I use the same time on explorer and Files, and it works the same way for me

Is the file highlighted before making a double click on it?

Yes

I don't know then.... But for me it definitely shows rename option. Unless I really focus and make the double click very quick. I don't think that i can show it clearly even if i screen recorded it. 😅

This is because of the way the DataGrid is made, an easy work around is to click to the right of the file name and that way you won't run into this issue.


fix: output zero when displaying human results

What does this PR do?
Outputs 0 instead of an empty string (regular or aggregate queries) or null (subqueries) in human result format.
What issues does this PR fix or reference?
Attempts to fix https://github.com/forcedotcom/cli/issues/1892
Notes
I didn't add additional tests as it might not be justified, but let me know otherwise.

Hi @leostewart thanks for the contribution - sorry we missed it until now. Could you add a unit test verifying that a 0 is printed to make sure this won't break again in the future?

Hi @WillieRuemmele, I've added a few unit tests for the mentioned scenarios. As this is a bit of an edge case, I wasn't sure how best to incorporate them into the existing tests, so feel free to make suggestions/changes.

QA Notes
setup:
sfdx data record create -s Opportunity -v "Name=testOpportunity StageName=Prospecting CloseDate=2023-12-31 Amount=0"

✅ : displaying 0
 ➜  sfdx data query -q "SELECT Name, Amount FROM Opportunity WHERE Name='testOpportunity'"
 NAME            AMOUNT
 ─────────────── ──────
 testOpportunity 0

vs
 ➜  sfdx data query -q "SELECT Name, Amount FROM Opportunity WHERE Name='testOpportunity'"
 NAME            AMOUNT
 ─────────────── ──────
 testOpportunity
Total number of records retrieved: 1.

✅ : UTs pass
✅ : NUTs pass
✅ : 0 in csv
✅ : null in csv
✅ : null in human
🏆 : fixes another bug with false
before:
 ➜  sfdx data query -q "SELECT Name, Amount,HasOverdueTask,Description,Id FROM Opportunity WHERE Name='testOpportunity'"
 NAME            AMOUNT HASOVERDUETASK DESCRIPTION ID
 ─────────────── ────── ────────────── ─────────── ──────────────────
 testOpportunity                       null        006DR00000HqjUGYAZ

after:
 ➜  sfdx data query -q "SELECT Name, Amount,HasOverdueTask,Description,Id FROM Opportunity WHERE Name='testOpportunity'"
 NAME            AMOUNT HASOVERDUETASK DESCRIPTION ID
 ─────────────── ────── ────────────── ─────────── ──────────────────
 testOpportunity 0      false          null        006DR00000HqjUGYAZ

Thank you so much @leostewart 🎉 🏆


[FEATURE] add an examples folder with a working scene

Describe the solution you'd like
Thanks for sharing this library. I have spent a lot of time trying to get it to work and so far I can't even get
anything to render on the screen when I place a graph. either trying to render a data frame or using your example files (for the line graph)
It would be super awesome to even just get a simple scene that loads one of your sample files and shows a graph. I'll bet that would be much less work for you too.

related to #49

@curioussavage thanks for the suggestion. With the new refactoring examples will always be available in the /examples folder. Try the ScatterChart one :)


Set-Clipboard -Remote with OSC52

Summary of the new feature / enhancement
Set-Clipboard does not really work over SSH, as it always sets the clipboard of the target machine, not the host. This means that if you SSH e.g. from your PC to a server, then Set-Clipboard will set the server's clipboard, not your PCs, so you cannot paste it anywhere.
This can be resolved by using ANSI escape sequence (same mechanism as for setting colors) OSC52, which sets the clipboard of the host machine, which in our example is the PC, so you can paste it anywhere. This sequence is supported by most terminals, including Microsoft Terminal.
Example:
function Set-RemoteClipboard($text) {
    Write-Host "`e]52;;$([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($text)))`a"
}
# Copy "original" into a clipboard from anywhere
> Set-Clipboard 'changed'
# Press Ctrl+Shift+V to see clipboard still "original"
> Set-RemoteClipboard 'changed'
# Press Ctrl+Shift+V to see clipboard now "changed"

OSC also has similar Get-Clipboard -Remote sequence, but no terminal implements it as it is rightly considered a security and privacy risk, and you ca simply "get" the host clipboard with Ctrl+Shift+V.
Opens:

Should we autodetect when to use the OSC52 instead of xclip or other OS target-implementation? E.g. SSH can be detected by presence of environment variables $env:SSH_CLIENT and $env:SSH_TTY. I would say no, as it could be potentially breaking behavior in case of false positives on terminals which don't support the OSC. If user wants such behavior, they can add $PSDefaultParameters['Set-Clipboard:Remote'] = $env:SSH_CLIENT -or $env:SSH_TTY to their $PROFILE.
Some terminal multiplexers like screen and tmux may require wrapping OSC52 into a different escape, as can be seen in the vim plugin implementation. Should we detect and handle those cases? tmux can be forced to work with default escape by setting set -s set-clipboard on. I would say keep it simple for now, then maybe add -RemoteMethod = auto | osc52 | tmux | screen in separate issue if required.

Proposed technical implementation details (optional)
See example for the escape sequence format.

OSC52 does not work on local linux in either pwsh or bash. At least in those virtual terminals that I use. And which base64-string is in correct format?
$a = "test" | base64
$b = [convert]::ToBase64String([text.encoding]::UTF8.GetBytes("test"))
$a
$b

# dGVzdAo=
# dGVzdA==

I was just about to say something similar to @237dmitry
This is a good idea, but there doesn't appear to be any way for the remote session to know what OSC commands are supported (see also https://github.com/PowerShell/PowerShell/issues/18098#issuecomment-1249224249 ) . It is a useful thing to add but may cause wrong expectations if it is the default
@237dmitry  the two formats
dGVzdAo=     <--- Contains "test" with a trailing Line feed
dGVzdA==    <---  Contains "test" only.
I'm guessing the latter is preferred but the former is mostly harmless.

@237dmitry Vim plugin lists supported terminals, unfortunately GNOME and Konsole which are two popular Linux ones don't support it.
@jhoneill Agreed that without universal support using it as default is not a good idea. However the support is broad enough (I may be biased because Windows Terminal and Chromebook hterm are the only two I use) it would be useful to have it. Just put in help that it may not work on all terminals, so test before relying on it.

@PowerShell/wg-powershell-cmdlets We see utility, although perhaps not common, with this feature.  We propose adding a -AsOSC52 switch to enable this behavior.  Since not all terminals support this and those that do may require additional setting change to enable it, the switch name makes it easier to find relevant documentation.

 I need to circumvent all redirections.

Stole the code from Write-Host, tested it to work

Removing WG-Remoting tag since this does not involve PowerShell remoting.


Github and Gitlab Multi Data Source and Project Ids

Description
I think I heard we need to support many repos per user for Ping Cap requirements? Can you confirm @Startrekzky ?
Describe the solution you'd like
Just like Jira, we need to support several sources of data and several different project ids to collect.
Has the Feature been Requested Before?
I think we had some information in #455 but that ticket is really old.
In the end, users have more that one github or gitlab repo that they are interested in. We need to support that.
However, one thing to think about is that users may want to see grafana data on a per repo basis so we need to make sure we still support that.

@Startrekzky to prioritize and assign to itteration

We need to add parameter projectId for gitlab sub tasks. github has beed resolved


fix: empty values are sent as events

:tada: This PR is included in version 0.11.0-beta.8 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Gen Encrypted PDF file

Feature Request
Feature description

set password and generate a Encrypted PDF file

http://pdfkit.org/docs/getting_started.html#encryption_and_access_privileges


Update manifests/b/Badlion/BadlionClient/3.5.2/Badlion.BadlionClient.locale.en-US.yaml

Fixes an issue where this package has multiple different monikers
Microsoft Reviewers: Open in CodeFlow

[Policy] Reset Labels


Update to allow use of symfony 3.1 components. (only composer.json)

New pull request, issue #22, pull request #23.

Does that composer.json works for you when you install phpqa globally?
I tried to clone your repo and upgrade components, but I wasn't able to upgrade every component:
git clone https://github.com/marcinlawnik/phpqa.git
composer install
composer update symfony/dependency-injection symfony/filesystem symfony/process symfony/finder symfony/yaml
# filesystem was updated to 2.8.8 -> add symfony/config to composer.json and repeat update
composer update symfony/config symfony/filesystem
# filesystem and config still has 2.8 version

symfony/config and symfony/filesystem can't be updated because of robo's dependency: henrikbjorn/lurker 1.1.0 requires symfony/config ~2.2. After updating robo to "~0.7|~1.0.0-beta1" I can update symfony/config and symfony/filesystem. But symfony/console is still in version 2.8 because of phploc. phploc support sf3 only in 3.X versions (php >= 5.6) and that's blocker for me.
Wouldn't be easier to install phpqa without composer? It seems very complicated to support every symfony component in version 3.X. I don't wanna upgrade just some components. I prefer complete solution or nothing (sf3 notice in readme).

I got over it by removing all my global dependencies and just installing phpqa.
If the only way to go forward is to drop 5.4 and 5.5, the decision is up to you.

Closing the PR:

when robo releases v1.0, then components will be updated.


HemisphereLight lights black

HemisphereLight lights my scene in black, and override all other lights.
hemisphereLight = new HemisphereLight( 0xffffbb, 0x080820, 1 );

Yes,
i saw the default position is 0, 100, 0, but i tried other positions and the result is still the same.

Bug is still in 2.0.


Package/Recipe is out of date

Traceback (most recent call last):
  File "/home/bryanloz/TVM/relay_quick_start.py", line 18, in <module>
    from tvm.contrib import graph_executor
ImportError: cannot import name 'graph_executor' from 'tvm.contrib' (/home/bryanloz/anaconda3/envs/tvm/lib/python3.9/site-packages/tvm/contrib/__init__.py)

https://github.com/apache/tvm/blob/main/python/tvm/contrib/graph_executor.py

Should be resolved by #12


Show indicator whether a script is present

I have checked the following:

[X] I've searched existing issues and found nothing related to my issue.

Describe the feature you want to add
When editing a request, the tabs Query, Headers, Vars and Asserts show an indicator when any values are set.
The Tabs Body, Auth, Script and Docs don't show an indicator.
Especially for scripts, this is kind of dangerous when the collections is used by a colleague that was not the author of that request - he might expect that the shown response is the 1:1 plain answer from the webserver and is not aware, that a "Post response" script did modifications.
So I would suggest to show an asterisk in case values have been applied to the mentioned tabs.
THANK YOU!
Mockups or Images of the feature

This is now supported in Bruno


fix for multiple op instance used same variable instance address to j…

fix for multiple op instance used same variable instance address to json.Unmarshal() when call GetAccountHistory()

Thank you for pointing me to this issue. I've changed instantiating operations by using a provider pattern. So we can avoid reflect usage over and over again. See commit
6197b0385fb6739b97f20ddddf2fb693ed8fb3ab


Additional activation functions

Adds additional activation functions supported by Keras (ELU, SELU, PReLU, Leaky ReLU, Threshold ReLU, Softplus, Softsign and Hard Sigmoid).

Hi @vloncar  -- do you already have example Keras models using these activations?

I have tested these functions by changing the activation in models.py of keras-training project. I don't have any other example models.

Ok that works

When you tested, did you run the default build script that includes csynth?
csim_design
csynth_design
cosim_design -trace_level all
export_design -format ip_catalog

Yes, I have used the default build_prj script that includes those steps.

Which model did you modify?  The KERAS_3layer one?
I noticed while testing this PR that the KERAS_1layer example is no longer synthesizing, but I found it is also true in the HEAD.  So a recent merged PR must be causing a problem with something unique to KERAS_1layer (probably the sigmoid?).  Have you tried sigmoid recently?

I have used the three_layer_model. Most of my testing was done before #66 (and later) was merged, however I also quickly tested afterwards and everything was synthesizing properly. I have just tried sigmoid on the project I use for testing the merge layers (concatenate, etc), which is based on sublayer example project, and it synthesized.

@vloncar When you synthesizing the sigmoid, does the HLS try to synthesize the init_sigmoid_table. From my test, it seems HLS start to synthesize this function whenever I use static variable, which takes forever. Surprisingly, it doesn't happen for softmax! And I can't find difference between sigmoid and softmax that would cause this. Thanks!

@zhenbinwu Looking at the logs, I don't see init_sigmoid_table. The synthesis taking forever happened to me as well a few times since the introduction of static variables, but not always.

@vloncar So it comes and goes? Any changes between the two cases?

@zhenbinwu I did not investigate at the time, and unfortunately, I don't have logs of failed synthesization attempts. I will try to reproduce the problem and report back, maybe we'll have to find an alternative for the use of static variables.

@zhenbinwu Weirdly enough, if I change the exp() to expf() in sigmoid_fcn_float, or use the std namespace (e.g., std::exp(), which would be the proper way if we had used <cmath> and not <math.h>), the synthesis completes. But this makes little sense in relation to the static qualifier for the table variable.
BTW, if tables for activations are static, i.e, there is one shared instance, initialized with the size of CONFIG_T::table_size parameter of first activation of that type. In all examples this parameter is the same for all activations, but in general case/future, can it be different? Then the static table would not work as expected. Should we worry about this now?

hi @vloncar @zhenbinwu thanks for digging into this.  @vloncar I agree we should have each of the tables be able to be configured differently.  Can we implement a table_size_N for each activation which defaults to the same table size but can be different?  I don't think we save that much by making the table size static right?

@vloncar Interesting and odd! Both sigmoid and softmax called the exp() function with float as input. But only sigmoid has issue and can be fixed by expf().
Static variables are supported by HLS. So this sounds more like a compiler issue then coding to me.
For the multiple activation functions with same instance, from my discussion with @benjaminkreis , I was told the IO to the BRAM are limited to 2. Once pipeline, the IO might be an issue.

@nhanvtran We can make a static table for every unique config::table_size. For example, if we have 3 sigmoid activations, two with table_size = 1024 and one with 512, we would create two tables, one of size 1024 that would be used by two activations, and one with 512 elements. Don't know how complicated would this be given all the limitations of HLS. A simpler alternative would be to create a static table for every activation that needs it, that would save us from reinitialization on multiple invocations of the top level function (which I assume was the original intent of the static tables), at the expense of increased resource usage.
@zhenbinwu I also think this is a HLS compiler issue. Do you think that we can use the expf or std:: workaround as the solution to this problem, or do you think we should investigate further?

@vloncar I think the expf() or std:: workaround should be fine. Don't think we can/have extra time to dig further. Can you make a PR of this? Thanks!

@zhenbinwu Created #78

with the merging of the static LUT PR, we'll have to resolve these conflicts one more time.  sorry @vloncar !

@benjaminkreis I don't know if it can be incorporated into the existing layer with any syntax similar to the one you posted, but I didn't really explore that option. I have tested it as an additional layer, but keras-to-hls.py should pick up both ways of defining ELU and do the same thing (i.e. there is no additional overhead if activations are defined as layers).
As for the other issue with ELU you noticed, you are right, I will fix that and update the PR when I get back at CERN next week.

I have investigated the hard_sigmoid issue, and strangely enough, the problem was in the way the bounds are checked. if (datareg < -2.5) ... doesn't get optimized away, so some weird conversions happen. If I define data_T left = (data_T) -2.5; and then do if (datareg < left) the latency comes down to 2. Interestingly, if 0 or 1 appear in the if statement, there is no problem, only if we use float values like 2.5. In light of that, I have also made another implementation, like:
datareg = slope * data[ii] + shift;
if (datareg > 1) datareg = 1;
else if (datareg < 0) datareg = 0;
res[ii] = datareg;

Which has the same performance.

The commit above adds the indexing fixes for elu & co, as well as reduces the latency of hard_sigmoid and softsign. I have used the LUT for softsign as suggested, and the change in hard_sigmoid is explained above.
I couldn't solve the different latency of elu and elu_alpha. What I have discovered is that if alpha=1, elu_alpha has the same latency as elu. Analyzing the function (by opening it in analysis perspective in Vivado HLS GUI) shows that the extra multiplication is present if alpha != 1, which is the cause for the bigger latency. Therefore I have made one elu which can be called with or without alpha (if called without, it is the same as calling it with alpha=1). I tried putting alpha into the table initialization, but that blows up latency to 17. On the other hand, in selu the alpha and scale parameters are constants, and can be placed into the LUT, which reduces its latency to 2.

We have merge conflicts here now :(

Rebased. Unfortunately, I made a few mistakes during the rebase (started rebasing twice without completing, git didn't like that), so I had to squash everything into a single commit.

Looks good, @vloncar !
I retested the problematic ones (hard sigmoid, soft sign, elu, alu alpha, and selu), and they all look ok.  Merging!


Short-circuit unnecessary calls to SecTrustEvaluate() in pinning mode

Assuming SecTrustEvaluate() was very slow, it's better to bypass certificate check before those were added to anchor.

Could you create some performance tests demonstrating the difference?

This change has been made separately, thanks.


[FEATURE] Allow user input secret key credential on Lognhorn UI to create encrypted volume

Is your feature request related to a problem? Please describe (👍 if you like this request)
Current LH UI doesn't support input secret key crediential in setting page.
When users create volume using LH UI, we should disable encrypted option if no secret key input in settings page.
Once input secret key, we can allow user to check that encrypted option

Describe the solution you'd like

Describe alternatives you've considered
Remove all encrypted option on LH UI for now.  After LH UI support input secret key crediential, we can add encrypted option back

After sync with @derekbit and @roger-ryao, we don't need UI to have credential input for encypted option.
Close this ticket


QueryHost doesn't support fields=availableMemoryCapacity,availableCpuCapacity

QueryHost  fields=availableMemoryCapacity
API call[org.zstack.header.message.APIReply] failed because [code: SYS.1000, description: An internal error happened in system, details: org.hibernate.QueryException: could not resolve property: availableMemoryCapacity of: org.zstack.header.host.HostVO [select hostinventory.availableMemoryCapacity from org.zstack.header.host.HostVO hostinventory]; nested exception is java.lang.IllegalArgumentException: org.hibernate.QueryException: could not resolve property: availableMemoryCapacity of: org.zstack.header.host.HostVO [select hostinventory.availableMemoryCapacity from org.zstack.header.host.HostVO hostinventory]]
API call[org.zstack.header.message.APIReply] failed because [code: SYS.1000, description: An internal error happened in system, details: org.hibernate.QueryException: could not resolve property: availableMemoryCapacity of: org.zstack.header.host.HostVO [select hostinventory.availableMemoryCapacity from org.zstack.header.host.HostVO hostinventory]; nested exception is java.lang.IllegalArgumentException: org.hibernate.QueryException: could not resolve property: availableMemoryCapacity of: org.zstack.header.host.HostVO [select hostinventory.availableMemoryCapacity from org.zstack.header.host.HostVO hostinventory]]

This is not a bug. it's by design.
availableMemoryCapacity, totalMemoryCapacity, availableCpuCapacity, totalCpuCapacity are not the party of the host table; they are actually in HostCapacityVO table, though we use some trick to put them as the part of host inventory. The premitive fields of an inventory are documented in the user manual, for example, http://zstackdoc.readthedocs.org/en/latest/userManual/host.html#primitive-fields-of-query.
However, I put a fix in below commit so user will get a clear error message.
2d3611772eed74463f75d296e9645afa514c782e


2.5.5 error show when update Atom to 1.19.3

Error show when update atom to 1.19.3:
Some installed packages could not be loaded because they contain native modules that were compiled for an earlier version of Atom.
==========
Error show when try to rebuild:
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| darwin | x64
gyp http GET https://atom.io/download/electron/v1.6.9/iojs-v1.6.9.tar.gz
gyp http 200 https://atom.io/download/electron/v1.6.9/iojs-v1.6.9.tar.gz
gyp http GET https://atom.io/download/electron/v1.6.9/SHASUMS256.txt
gyp WARN install got an error, rolling back install
gyp ERR! install error
gyp ERR! stack Error: connect ETIMEDOUT <IP_ADDRESS>:443
gyp ERR! stack     at Object.exports._errnoException (util.js:1022:11)
gyp ERR! stack     at exports._exceptionWithHostPort (util.js:1045:20)
gyp ERR! stack     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
gyp ERR! System Darwin 16.6.0
gyp ERR! command "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/node-gyp/bin/node-gyp.js" "install" "--runtime=electron" "--target=1.6.9" "--dist-url=https://atom.io/download/electron" "--arch=x64" "--ensure"
gyp ERR! cwd /Users/lin/.atom
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

https://github.com/platformio/platformio-atom-ide-terminal/issues/297


Covering other possible cases in the program

issue #2966
Have you read the Contributing Guidelines on Pull Requests?
Yes
[y] I've read the contribution guidelines.
[y] I've checked the issue list before deciding what to submit.
[there wasn't any need] I've edited the README.md and link to my code.
Related Issues or Pull Requests
yes

@ankitaggarwal23 I have made the changes. I think my code is failing DeepSource: Java (beta) test because it checks code in these languages only Python, Go, Ruby and JavaScript as mentioned when I click on detailed analysis of the test.
Please review it and tell me if there are further changes required.

@ankitaggarwal23 Please check I have made the required changes.

@ankitaggarwal23 Fixed braces alignment and this code is working completely fine.

@ankitaggarwal23 Made the changes

@HarshCasper Sir please check I have implemented every changes that were asked. Review it and merge it please.


Is this related to the sget command under cosign?

Question
It's not clear to me if this is supposed to replace sget under cosign or if it's something completely different.

This should give you the info you need https://docs.google.com/document/d/12BBOXMhA99J3KzNaotT1J4OTSDlNnK110_9FZkPv-A0


⚠ Bofrost.at has degraded performance

In aa999a5, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2677 ms

Resolved: Bofrost.at performance has improved in 94b2a84 after 8 minutes.


FileManagerTest::VerifyFlushedFileContent  deduceType ERROR

TEST(FileManagerTest, VerifyFlushedFileContent) {
    FileManager fileManager(fs::path("test_db"));
    std::vector<KeyValue> kv_pairs = { KeyValue(1, 100), KeyValue(2, 200) };

    FlushSSTInfo info = fileManager.flushToDisk(kv_pairs);

    // Open the SST file and check its content
    std::ifstream file("test_db/" + info.fileName, std::ios::binary);
    ASSERT_TRUE(file.is_open());

    // Deserialize the header
    SSTHeader header = SSTHeader::deserialize(file);
    EXPECT_EQ(header.num_key_values, 2);

    // Deserialize and check the first KeyValue pair
    SerializedKeyValue skv1 = SerializedKeyValue::deserialize(file);
    EXPECT_EQ(std::get<int>(skv1.kv.getKey()), 1);
    EXPECT_EQ(std::get<int>(skv1.kv.getValue()), 100);

    // Deserialize and check the second KeyValue pair
    SerializedKeyValue skv2 = SerializedKeyValue::deserialize(file);
    EXPECT_EQ(std::get<int>(skv2.kv.getKey()), 2);
    EXPECT_EQ(std::get<int>(skv2.kv.getValue()), 200);

    file.close();

    // Clean up: Delete the test directory
    fs::remove_all("test_db");
}

The Problem
The core of the problem was that the deduceType function was expecting primitive types like int, double, std::string, etc., but it was receiving a std::variant instead. std::variant is a container that can hold multiple types, but it's not a primitive type itself. When deduceType tried to deduce the type of the std::variant, it failed because std::variant wasn't one of the types that deduceType could handle. This is what caused the "Unsupported type" exception.
The key issue was that, when the constructor of KeyValue was invoked during deserialization, it was passing a std::variant object to deduceType. But deduceType didn't know how to handle a std::variant, because it was designed to handle basic types like int, double, etc.
The Fix
The fix involved using std::visit to unpack the std::variant and pass the underlying type (such as int, double, std::string, etc.) to deduceType. std::visit is a C++17 feature that allows you to access the actual type stored inside a std::variant.
How It Works

std::variant:

std::variant can hold multiple types (in your case: int, long long, double, char, std::string). However, you can't directly pass a std::variant to a function that expects a specific type like int or double, because std::variant can hold different types at runtime.

std::visit:

std::visit allows you to access the actual value stored in a std::variant and apply a function (or lambda) to that value. This way, you can apply logic based on the specific type inside the std::variant.

In your case, we use std::visit to pass the actual type inside the std::variant (like int, std::string, etc.) to deduceType. This way, deduceType can correctly deduce and return the appropriate enum (KeyValueType::INT, KeyValueType::STRING, etc.).

Key Points:

Original Issue:

deduceType was being called on a std::variant, which is a container for multiple types. Since std::variant is not a recognized primitive type in deduceType, the function threw an "Unsupported type" exception.

Solution:

We used std::visit to unpack the std::variant and pass the actual stored type (like int, std::string, etc.) to deduceType. This allowed deduceType to handle the actual type correctly and return the appropriate KeyValueType enum.

What Happens Now

When you call the KeyValue constructor:
skv.kv = KeyValue(key, value);

The key and value are std::variants holding the actual data types (like int, std::string, etc.).

The constructor now uses std::visit:
keyType = std::visit([&](auto&& arg) {
    return deduceType(arg);  // Deduce the actual type of the key
}, key);

This unpacks the std::variant and passes the actual type (arg, which could be an int, std::string, etc.) to deduceType.

The deduceType function can now correctly identify the type (because it’s receiving the actual type and not the std::variant) and returns the appropriate KeyValueType.

The same process is applied for both the key and the value.

Final Takeaway
In summary, the issue was due to passing the std::variant (which is a container for multiple types) directly to deduceType. Using std::visit allows us to extract the actual type from the std::variant and pass that to deduceType, which solved the problem.

Previous KeyValue Constructor Template
template<typename K, typename V>
KeyValue::KeyValue(K k, V v) :
                    key(convertToVariant(k)),
                    value(convertToVariant(v)),
                    keyType(deduceType(k)),
                    valueType(deduceType(v))
                    {}

Updated KeyValue Constructor Template
template<typename K, typename V>
KeyValue::KeyValue(K k, V v)
    : key(convertToVariant(k)), value(convertToVariant(v)) {
    keyType = std::visit([&](auto&& arg) {
        return deduceType(arg);  // Deduce the actual type of the key
    }, key);
    valueType = std::visit([&](auto&& arg) {
        return deduceType(arg);  // Deduce the actual type of the value
    }, value);
}


Bug report: Missing parameter for OrgAssetType on orgassetslibrary commands

Priority
(Low) Something is a little off
Description
Unless I'm missing something I don't see a way to indicate the type of orgassets library when adding, and the information doesn't show up during listing.
Here's a reference to the related powershell: https://learn.microsoft.com/en-us/sharepoint/organization-assets-library#use-microsoft-powershell-to-specify-a-library-as-an-organization-assets-library
Specifically: Add-SPOOrgAssetsLibrary -LibraryUrl  [-ThumbnailUrl ] [-OrgAssetType ] [-CdnType ]
Steps to reproduce
N/A
Expected results
N/A
Actual results
N/A
Diagnostics
No response
CLI for Microsoft 365 version
6.7.0
nodejs version
N/A
Operating system (environment)
Windows
Shell
bash
cli doctor
No response
Additional Info
No response

Thanks for bringing this up @juliemturner, you're correct that we don't expose that option currently. Time to do some research and add it if possible. 🤙

I can see in the code that we're calling the CSOM function AddToOrgAssetsLibAndCdnWithType. One of the parameters is one called enum with the hardcoded value 1
It's probably this parameter that should be able to influence. At least, i think it's the Microsoft.SharePoint.Administration.OrgAssetType enum referenced here:
https://devblogs.microsoft.com/microsoft365dev/new-sharepoint-csom-version-released-for-sharepoint-online-june-2019/

I checked CSOM for the possible values of the OrgAssetType:
public enum OrgAssetType
{
    Undefined = 0x0,
    ImageDocumentLibrary = 0x1,
    OfficeTemplateLibrary = 0x2,
    OfficeFontLibrary = 0x4
}

We're generating an ImageDocumentlibrary type by default. I propose the following specs:
Proposed specs
Enhancement: Be able to create an OrgAssetsLibaries of a specific OrgAssetType.
Option
Option | Description
-o, --orgAssetType | Specifies the OrgAssets type. Allowed values ImageDocumentLibrary, OfficeTemplateLibrary, OfficeFontLibrary. Defaults to ImageDocumentLibrary.
Implementation
The value of the OrgAssetsType is currently hardcoded in the CSOM call as an enum parameter with the value 1. We'll map the allowed value to its enum value and replace the hardcoded value.

I updated the issue @juliemturner, seems to me this can be fixed fast.

Specs are looking ok to me 👍

Can I work on this?

All yours!

Although it does what it has to do, i get an error back when running this command.
It's not related to this change though, i get this error with the latest main version, can someone test if this happens on their machine too?

Seems like you need to enable CDN on your tenant in order to make an org assets library. You can try this cmdlet https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/add-spoorgassetslibrary, but it will probably give the same error.

That's just the thing, CDN is enabled on my tenant and it still shows the error 'CDN feature is not enabled by the tenant administrator.'

although this error shows, the command executes succesfully since the document library shows up in the image web part:

If we need the CDN feature to be enabled on the tenant, I think it would be good to add this as a remark on our docs.

Good idea! I'll add it along with the remark that the document library needs to contain read permissions for everyone except external users

Seems to be working on my end. Did you by any chance just enabled CDN on your tenant?

Btw @nicodecleyre noticed that thumbnailUrl is marked as required property in the docs of this command while it's an optional property in the code. Could you fix that one as well, please?


Documentation - updated email setup

Updated email setup docs to include sendmail option alongside SMTP option.
Sendmail made default
Added variable MAILER_TYPE to SMTP option for clarity
Added variable IS_TLS_ENABLED to SMTP option for enhanced security.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@288e487). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #10695   +/-   ##
=========================================
  Coverage          ?   43.55%
=========================================
  Files             ?      589
  Lines             ?    82662
  Branches          ?        0
=========================================
  Hits              ?    36000
  Misses            ?    42190
  Partials          ?     4472

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 288e487...fde608f. Read the comment docs.

@mrsdizzie good point!

All suggested changes were commited.


WIP Update heading and typographic styles

Fixes #231 #185

Codecov Report

Merging #254 into next will not change coverage.
The diff coverage is 100%.

@@         Coverage Diff         @@
##           next   #254   +/-   ##
===================================
  Coverage   100%   100%
===================================
  Files        39     39
  Lines       456    451    -5
===================================
- Hits        456    451    -5

Impacted Files
Coverage Δ

src/Radio.js
100% <ø> (ø)
:arrow_up:

src/Text.js
100% <ø> (ø)
:arrow_up:

src/Heading.js
100% <ø> (ø)
:arrow_up:

src/theme.js
100% <100%> (ø)
:arrow_up:

src/ThemeProvider.js
100% <100%> (ø)
:arrow_up:

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 69b8a85...0ca673d. Read the comment docs.


Removal of FlushGeneratedImagesTask was not documented.

This task appears to have been superseded by a new task called RegenerateCachedImagesTask but it was not documented, so FlushGeneratedImagesTask simply appeared to have vanished. This will update the documentation to reflect this change for both v3.2 and v3.3 (separate PR).

PR for the 3.3 branch https://github.com/silverstripe/silverstripe-framework/pull/5275

p.s. Here's the commit where this appears to have changed:
https://github.com/silverstripe/silverstripe-framework/commit/8908a6bcd7d1c6b812ecb12b2213d6f6598fd619
NOTE: I'm not sure if both PR's are necessary (one against 3.2 and another against 3.3) so feel free to close the 3.3 one if this one can be merged up.


Field 'Activated Date' cannot be empty, even after passing ActivatedDate value in Json

Describe the problem
Hi Team,
For few Jira Items, even though the ActivatedDate Field is present in the generated JSON, while and after importing to Azure it is giving the error: Invalid field status 'InvalidType' for field 'Microsoft.VSTS.Common.ActivatedDate'.
below is the Json generated after Exporting from Jira
    {
      "ReferenceName": "System.Title",
      "Value": "Title_Issue "
    },
    {
      "ReferenceName": "System.AssignedTo",
      "Value": "Masked"
    },
    {
      "ReferenceName": "Microsoft.VSTS.Common.Priority",
      "Value": "3"
    },
    {
      "ReferenceName": "Microsoft.VSTS.Common.ActivatedBy",
      "Value": "Masked"
    },
    {
      "ReferenceName": "Microsoft.VSTS.Scheduling.OriginalEstimate",
      "Value": "80"
    },
    {
      "ReferenceName": "Microsoft.VSTS.Common.ActivatedDate",
      "Value": "14/06/2023 10:06:29"
    },
    {
      "ReferenceName": "System.State",
      "Value": "Active"
    }

below is the error while importing

below is the error displaying in Azure board

Debug.zip
@KatteriSharath, give this build of the WorkItem Importer a try and let me know the resuults!

Hi @Alexander-Hjelm , Thanks for the response.
Since i do not have permission to download zip file i could not able to try the debug.
but j have referred https://github.com/solidify/jira-azuredevops-migrator/pull/885/files PR and made changes manually and tried, i am still getting the same issue.

@KatteriSharath Ok!
It looks like ActivatedDate field on your exported work item is on the wrong format. The value is 14/06/2023 10:06:29 when it should be on a format like 2023-06-14T10:06:29.635+00:00.
Could you try and edit the value for Microsoft.VSTS.Common.ActivatedDate in your exported config, just to see if that fixes the error or not? Get back to me with the results.
If so, let me have a look and see if maybe the tool is missing a conversion somewhere.

@KatteriSharath Furthermore, which time zone are you in?

@Alexander-Hjelm i am in BST time zone (UK)

Additionally, I conducted testing on approximately 300 work items, with only 5 of them exhibiting this error. Moreover, I have just attempted this for another work item, and the activation date is as follows:
"ReferenceName": "Microsoft.VSTS.Common.ActivatedDate",
"Value": "11/09/2023 10:55:37"
This item was successfully imported into Azure without encountering any errors.

When using a process that uses "Resolved" there is also "Resolved Date" not being set for resolved issues.


chore(deps): upgrade dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-main" workflow

Codecov Report

Merging #299 (9d9faa4) into main (2974dfe) will increase coverage by 12.10%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##             main     #299       +/-   ##
===========================================
+ Coverage   83.33%   95.44%   +12.10%
===========================================
  Files           2        1        -1
  Lines         126      395      +269
  Branches       31       46       +15
===========================================
+ Hits          105      377      +272
+ Misses         21       18        -3

Impacted Files
Coverage Δ

src/index.ts
95.44% <100.00%> (+13.44%)
:arrow_up:

example/src/main.ts

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 cce25ee...9d9faa4. Read the comment docs.


Add column is showing [object Object] instead of the column name

Describe the bug

To Reproduce
$ npx degit xataio/examples/apps/starter-sveltekit#sveltekit-starter sveltekit-starter-test
$ cd sveltekit-starter-test
$ pnpm install
$ pnpm xata:init
$ pnpm dev

Expected behavior
I should see title, description and url instead of [object Object]

@gimenete You're touching those files in your current PR I believe, can you take a look?


Draw example does not appear to work with Leaflet 0.7.3

Following the example code at https://github.com/tombatossals/angular-leaflet-directive/blob/master/examples/control-draw-example.html does not work if referencing the latest version of the Leaflet library.

I'm going to rework&redesign angular-leaflet-directive to be compatible with Leaflet v1.0. It will mantain almost all its functionality, and will be compatible with the current features of the directive, but I must start from a fresh point, so I'm going to close this issue. If you think it must be worked with the new version, please reopen it.


Documentation and code cleanup for 1.0

What's needed?

[ ] Cleanups
[ ] Check docs

Proposed solution
No response
Use cases
No response
Alternatives and workarounds
No response
Additional context
No response

There is always room for improvement, but the majority of this is done.


PDF rendering is wrong with the lib but right in built in firefox renderer

Attach (recommended) or Link to PDF file here: top-legal-cover.pdf
Description:

Operating system and its version: Ubuntu 21.10
On the left side this is the library output used either via react-pdf or via your online modern demo
On the right this is Firefox ESR 95.0.1 built-in pdf.js renderer that works perfectly

git bisect points to:
2d1f9ff7a3a8e29acd7500add4a1057a5eaba191 is the first bad commit
commit 2d1f9ff7a3a8e29acd7500add4a1057a5eaba191
Author: Brendan Dahl<EMAIL_ADDRESS>Date:   Tue Oct 19 20:14:48 2021 -0700
Use a new method for handling soft masks.

The old method of handling soft masks had a number of issues where the temporary
drawing canvas and the suspended main canvas could get out of sync
(e.g. mismatched save/restores or clip state) or we could end up compositing at
the wrong time. A good example of things getting out sync is the reduced test
case in #9017.

To fix this I've changed two big things:

1) Duplicate all the needed graphics state from the temporary canvas to the
suspended main canvas. This ensure the canvases stay in sync so that when we

switch back to the main canvas the graphics state stack is the same
(e.g. transforms, clip paths).

2) Immediately composite after each drawing operation. This ensures that if
there's an active clip region that we'll still be able to composite the correct
portions of the canvas. Note: This solution could be avoided by using
getImageData and putImageData since those ignore clipping region, but this is
very very slow. Note2: I also think the old way of only compositing at the end
of the soft mask is incorrect and can lead to wrong colors if drawing over the
same region, but in practice this doesn't seem to matter much.

Fixes: #5781
Fixes: #5853
Fixes: #7267
Fixes: #7891
Fixes: #8403
Fixes: #8624
Fixes: #12798
Fixes: #13891
Fixes: #9017 (reduced test case)
Fixes: https://bugzilla.mozilla.org/show_bug.cgi?id=1703683

/cc @brendandahl

Thank you so much for this quick reply.
We do have some of our clients impacted by this rendering issue. I would appreciate so much if you can give me visibility on a time frame for this issue or if there is any workaround for us to fix this?
Thank you in advance

I filed a bug on Bugzilla so we can track the regression, https://bugzilla.mozilla.org/show_bug.cgi?id=1764587.

Any progress with this issue? We got several pdf with the same behavior 😕 today I just tried in firefox 109 and this is still broken, we would love to see a fix 🙏