Split change outputs with asset quantities exceeding the maximum

Issue Number
https://github.com/input-output-hk/cardano-wallet/issues/2532
ADP-726
Overview
Although quantities of individual assets are effectively unlimited, a transaction on the blockchain can never include an asset quantity greater than maxBound :: Word64.
This PR tweaks the coin selection algorithm to detect change bundles containing excessively large asset quantities.
If such a change bundle is detected, we now split the change bundle up into smaller bundles using equipartitioning.
Example
Let's suppose the maximum allowable token quantity is 5, and we have a change map with the following quantities:
[("a", 11), ("b", 5), ("c", 12)]

In this case, we must divide the map into at least three smaller maps in order to not exceed the maximum allowable token quantity.
Under the equipartitioning scheme, this would give us:
[("a", 3), ("b", 1), ("c", 4)]
[("a", 4), ("b", 2), ("c", 4)]
[("a", 4), ("b", 2), ("c", 4)]

Note that while the overall sum is preserved, the individual bundles are almost equal, but not quite: this is because 11 and 5 are not divisible by 3. We must therefore accept a small loss of proportionality in the result.
Details
An equipartition of a bundle b is a partition into multiple bundles, where for every asset a in the set of assets contained in b, the difference between the following quantities is either zero or one :

The smallest quantity of asset a in the resultant bundles
The greatest quantity of asset a in the resultant bundles

In order to determine the number of parts in which to split a given bundle, we choose the smallest number of parts that still allows us satisfy the goal of not exceeding the maximum allowable quantity in any given bundle.
Performance
In order to avoid evaluating a partition for every single change output, we short circuit in the event that there is no token quantity greater than the maximum allowable quantity:
equipartitionTokenMapWithMaxQuantity m (TokenQuantity maxQuantity)
    | maxQuantity == 0 =
        maxQuantityZeroError
    | currentMaxQuantity <= maxQuantity =
        m :| []
    | otherwise =
        equipartitionTokenMap m (() :| replicate extraPartCount ())

Testing
Property tests
Equipartitioning behaviour is tested by the following property tests:

prop_equipartitionTokenBundle*
prop_equipartitionTokenMap*

Unit tests
As a sanity check, this PR also provides unit tests for performSelection with inputs containing token quantities that are close to the maximum, and demonstrates that change bundles are correctly partitioned in the results.

@rvl wrote:

So is it possible to adjust this limitSize slightly so that it can be applied to TokenMap?
-- >>> limitSize 5 example
-- [[("a",5),("b",5),("c",5)],[("a",5),("c",5)],[("a",1),("c",2)]]
limitSize :: (Traversable t, Integral n) => n -> [t n] -> [[t n]]
limitSize lim = group . map (fmap (splitNum lim))
  where
    group = L.transpose . map sequence

I deliberately avoided the use of L.transpose here, as from past experience in using this function, it often gives poor performance in comparison to a single strict fold with an appropriately-written accumulator function.
This is what we've done in equipartitionTokenMap:
equipartitionTokenMap m count =
    F.foldl' accumulate (TokenMap.empty <$ count) (TokenMap.toFlatList m)
  where
    accumulate
        :: NonEmpty TokenMap
        -> (AssetId, TokenQuantity)
        -> NonEmpty TokenMap
    accumulate maps (asset, quantity) = NE.zipWith (<>) maps $
        TokenMap.singleton asset <$>
            equipartitionTokenQuantity quantity count

This is called with the appropriate value of count by equipartitionTokenMapWithMaxQuantity.

@rvl wrote:

example :: [(String, Natural)]
example = [("a", 11), ("b", 5), ("c", 12)]

-- >>> limitSize 5 example
-- [[("a",5),("b",5),("c",5)],[("a",5),("c",5)],[("a",1),("c",2)]]
limitSize :: (Traversable t, Integral n) => n -> [t n] -> [[t n]]
limitSize lim = group . map (fmap (splitNum lim))
  where
    group = L.transpose . map sequence

Having looked at this in more detail: your suggestion is different from what this PR is doing, which is to retain the proportionality between quantities of different tokens in a bundle to be partitioned.
So to take your example bundle (above), the equipartition function would split it into the following bundles:
[("a", 3), ("b", 1), ("c", 4)]
[("a", 4), ("b", 2), ("c", 4)]
[("a", 4), ("b", 2), ("c", 4)]

Note that the original proportions are maintained (modulo rounding).

OK thanks for the answers. I am trying to find out why it needs to be much more complicated than the example code I showed. In that example code, the splitNum function could/should be modified to divide the value evenly, and List.transpose can easily be swapped for something efficient. What is this proportionality and why is it needed? I thought that "equipartition" meant that the weights are [1,1,1,..], which is even not proportional.

@rvl wrote:

OK thanks for the answers.

You're welcome.

I am trying to find out why it needs to be much more complicated than the example code I showed. In that example code, the splitNum function could/should be modified to divide the value evenly, and List.transpose can easily be swapped for something efficient.

You're right. Though in doing so, I'm guessing we would still end up with something similar to the already-existing partitionNatural function, which is already well-tested, and has all the properties we need, including:

preservation of the sum
near-proportionality, with rounding in the case where values are not evenly divisible.

Reusing this pre-existing function means we can worry a bit less about checking that rounding is correct.

What is this proportionality and why is it needed?

Short answer
This was the solution proposed in the original discussion thread for this PR. However, Slack threads are bad for recording design decisions, I've copied and pasted the essential part of that discussion into https://jira.iohk.io/browse/ADP-726. (My apologies for copying it over a bit late.)
Longer answer
We're trying, to the greatest extent possible, to retain the ratios between asset quantities in the original outputs. If a user specifies an output of [("assetA", 500), ("assetB", 1000)] (in a 1:2 ratio), then when generating a change bundle for this output, we try to generate a bundle that has assets in the same 1:2 ratio. Usually, this will also mean that the asset quantities themselves are also similar to those in the original outputs, as we aim to select around 200% of each asset during the initial selection phase. The idea behind this is that over time, the user's UTxO set distribution will contain entries that are similar to the payments they commonly make.
If we reach the situation where we absolutely have to split up a change bundle to avoid overflow, then there doesn't seem to be a good reason to break this ratio.
Futhermore, retaining the ratio between assets might help to minimize the production of dust quantities.
To give an illustration: if we overflow by just 1, then we'd probably want to avoid partitioning a token quantity into [maxBound :: Word64, 1], because 1 is a value that isn't likely to be very useful when making future coin selections.

I thought that "equipartition" meant that the weights are [1,1,1,..], which is even not proportional.

You're right, in that the weights are [1, 1, 1 ..]: this means we'll generate bundles that are approximately equal to one another.
But proportionality here refers to the fact that every bundle in the partitioned result has a similar ratio of token quantities. For example, if the original bundle has tokenA:tokenB in a 2:1 ratio, then the partitioned bundles will also have these tokens in a similar ratio.
So let's take an easy example:
[("a", 30), ("b", 24), ("c", 18)]

The tokens 'a', 'b', and 'c' are in a 5:4:3 ratio.
Suppose the maximum token quantity is 10. In this case, we'd need to partition the bundle into three smaller bundles:
[("a", 10), ("b", 8), ("c", 6)]
[("a", 10), ("b", 8), ("c", 6)]
[("a", 10), ("b", 8), ("c", 6)]

The quantities of 'a', 'b', and 'c' in the resulting bundles are still in a 5:4:3 ratio.
Suppose though that the maximum token quantity is 6. In this case, we'd need to partition into five smaller bundles:
[("a", 6), ("b", 4), ("c", 3)]
[("a", 6), ("b", 5), ("c", 3)]
[("a", 6), ("b", 5), ("c", 4)]
[("a", 6), ("b", 5), ("c", 4)]
[("a", 6), ("b", 5), ("c", 4)]

Now we hit the situation where 24 and 18 are not evenly divisible by 5, so we have to round some values down in the result, and some values up. (This is handled automatically by partitionNatural.)

bors retry

I apologize to give you such headache with this issue, i was just testing out the limits. But i think the solution will be worth it. 🙂

bors r+

@gitmachtl wrote:

I apologize to give you such headache with this issue, i was just testing out the limits. But i think the solution will be worth it. slightly_smiling_face

No need to apologise! We are very grateful that you took the time to create a report. It's much better that we can fix this early on, before it inconveniences people attempting to use the wallet.
Thank-you again for your report!


Sat phone support

This PR adds support for satellite phone numbers. Note that the old 'Unsupported Countries' test needed to be changed as it was using the sat phone CC to verify handling of what was then an unsupported CC.

@scottfromsf Thanks for the Nice PR and especially for your excellent and helpful explanation (in #404) 🎉Released in 2.16.4 🚀


Transactional behavior for template deployments

This issue has been brought up internally a few times and again in issue #3574.
If you have an ARM template deployment (such as VM create) and it fails midway through, several resources may have already been created for you. In many cases, this is what you want--you'd tweak your parameters, redeploy the template and achieve your desired end-state without needing to delete those resources or recreate them.
However, it is certainly reasonable that a user would want to have some kind of transactional behavior for a command where, if the command fails, the user can assume they were in the same state they were before the ran the command.
This would be easy for template-based creates. We know what resources we plan to create. We could include a --transaction flag (or something) to signify that if any of the resources fail to deploy, clean up anything that was created.
It might get a little trickier for the generic group deployment create command, but still, conceptually, a --transaction flag makes sense.
Thoughts?

This behavior is not supported by ARM and we cannot build this into CLI itself.


Update README with Ember provider

Follow up to https://github.com/thegreenwebfoundation/grid-intensity-exporter/pull/8 to update the README to cover the new default provider with Ember.
@mrchrisadams We could also convert the Nomad manifest to a Pack so we can template the GRID_INTENSITY_REGION and GRID_INTENSITY_PROVIDER env vars. WDYT?
https://github.com/thegreenwebfoundation/grid-intensity-exporter/blob/0f421a08fccf7482477a8a0230fd724016d495c1/nomad/grid-intensity-exporter.nomad#L36

Hi Ross!

@mrchrisadams We could also convert the Nomad manifest to a Pack so we can template the GRID_INTENSITY_REGION and GRID_INTENSITY_PROVIDER env vars. WDYT?

Would this allow someone running Nomad to basically execute a pack / job thing, to add the carbon reporting on all the clients nodes?

Would this allow someone running Nomad to basically execute a pack / job thing, to add the carbon reporting on all the clients nodes?

My thinking was using Pack for templating the env vars like we do in the Helm chart but I think that's over-engineering things. I've extended the README to cover editing the 2 env vars before starting the job.
We only need a single instance of the exporter per Nomad region so Prometheus can scape it. More complex multi region setups might span countries but those users are probably using something already to manage their Nomad jobs.


OS Refactor Runner

[ ] I have added the tests to cover my changes.
[ ] I have updated the documentation, VERSION, and CHANGELOG accordingly.
[ ] I have read the CONTRIBUTING document.

Implementing the functionality of Runner.

@kessler-frost was there an issue for this runner refactor?

@scottwn No, I hadn't created an issue for this. I can create one if needed and then link that to this PR.

@kessler-frost I don't think it's needed, just wanted to check


pear dev . fails silently on a failed import

~/apps/langchain-pear via  v18.14.1 took 25s
🐟 bare index.js
Uncaught ModuleResolveError: PACKAGE_PATH_NOT_EXPORTED: Package subpath '.' is not defined by "exports" in [object Object]
    at exports.packageExports (file:///bare.bundle/node_modules/bare-module-resolve/index.js:243:16)
    at exports.packageExports.next (<anonymous>)
    at exports.package (file:///bare.bundle/node_modules/bare-module-resolve/index.js:166:32)
    at exports.package.next (<anonymous>)
    at exports.module (file:///bare.bundle/node_modules/bare-module-resolve/index.js:97:26)
    at exports.module.next (<anonymous>)
    at [Symbol.iterator] (file:///bare.bundle/node_modules/bare-module-resolve/index.js:21:28)
    at Generator.next (<anonymous>)
    at Module.resolve (file:///bare.bundle/node_modules/bare-module/index.js:354:16)
    at Module._onimport (file:///bare.bundle/node_modules/bare-module/index.js:188:22)

vs
❯ pear dev .

~/apps/langchain-pear via  v18.14.1

tbh I was messing around with the import, but the one I had was

import Ollama from "@langchain/community"

So to be clear, that import is busted on my end. Just pointing out that pear dev should output the error like bare does

You also shouldn't be seeing [object Object] in the error message, that has been fixed here: https://github.com/holepunchto/bare-url/commit/f03147ccb6c87a02df079cb5d18c73b10de8f916


Remove moot version property from bower.json

Per bower/bower.json-spec@a325da3

Yeah, why not. I always found it useful when you checkout a bower component, that you can sport the version there. Even if it's not for any use in bower. However, bumping the version there on every release for nothing also sucks :-) Let's get rid of it!


Initial implementation of FieldBuilder

Fixes #11166. This is a port of the original track 1 FieldBuilder, which was merely a sample for track 2 GA.

Moving to PR targeting upstream now that original base is merged.


ORION-1170: add --stable flag for push and validate + cleanup [WIP]

Description
Adding functionality for providing a --stable flag to push and validate that supplies tag: stable.  Also improved the --help command output.  Still TODO: add link to placeholder page for solution tagging documentation for the output of the push and validate --help commands.
Type of Change

[ ] Bug Fix
[ ] New Feature
[ ] Breaking Change
[X] Refactor
[ ] Documentation
[ ] Other (please describe)

Checklist

[ ] I have read the contributing guidelines
[ ] Existing issues have been referenced (where applicable)
[ ] I have verified this change is not present in other open pull requests
[ ] Functionality is documented
[ ] All code style checks pass
[ ] New code contribution is covered by automated tests
[ ] All new and existing tests pass

@nishant-handa

Codecov Report

Merging #89 (d4a012f) into main (317f4d1) will not change coverage.
The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@           Coverage Diff           @@
##             main      #89   +/-   ##
=======================================
  Coverage   32.45%   32.45%
=======================================
  Files          27       27
  Lines        3556     3556
=======================================
  Hits         1154     1154
  Misses       2312     2312
  Partials       90       90

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


Touch events not firing inside ios - includes fix

inside selectize.js (v0.8.5) you use the events mouseenter and mouse down, in which these events do not get fired within ios. So if someone attempts to choose something from the dropdown list it won't update the new one (although you can certainly add new ones all the other events seem to fire properly)
On line 1177 - 1178 you will see
		$dropdown.on('mouseenter', '[data-selectable]', function() { return self.onOptionHover.apply(self, arguments); });
		$dropdown.on('mousedown', '[data-selectable]', function() { return self.onOptionSelect.apply(self, arguments); });

add this line right below to enable the click events within iOS devices!
		$dropdown.on('click', '[data-selectable]', function() { return self.onOptionSelect.apply(self, arguments); });

@brianreavis this is a pretty annoying bug, please accept the PR referenced above. Like others, I'd rather not maintain my own fork just for fixing this. It's been a year! :) Thanks!

Thanks!


Cache invalidation

I just deployed Erin when I back to home. And the experience is good.
However latter seems I encounter another issue related to cache. (seems there is one because when I moved file to another and restart the container, it still can play)
How can I force refreshing the video cache (especially when I need to update the metadata), could you help on this?
_Originally posted by @hyyin

Closing that issue as I think it's solved (because you reacted with a ❤ ).
Please feel free to reopen it if there's anything else.


ci(node): Fixed semantic release action

:tada: This PR is included in version 1.1.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Webpack update, babel update, storybook, general cleanup

Title of change
Webpack update, babel update, storybook, general cleanup
Checklist

[ ] Unit tests written
[ ] Manually tested
[ ] Prettier & ESLint were run
[ ] New dependencies are included in package-lock.json

Screenshot
insert screenshot if needed

rebuild

Deployed to: http://staging.quran.com:32823

Deployed to: http://staging.quran.com:32824


[FRONTEND] Expose CompiledKernel to grid

Exposing the CompiledKernel object to the grid callable so that it can be used to decide launch size for persistent kernels.
An example usage:
def grid(META):
      kernel = META["COMPILED_KERNEL"]
      num_warps = kernel.metadata.num_warps
      n_regs = kernel.n_regs
      size_smem = kernel.metadata.shared
      occupancy = NUM_REGS // (n_regs * WARP_SIZE * num_warps)
      occupancy = min(occupancy, SIZE_SMEM // size_smem)
      num_programs = NUM_SM * occupancy
      return (num_programs, 1)

META["COMPILEDKERNEL"]

This is probably not the right name; I don't see us using CAPSWITHNOUNDERSCORES anywhere else inside Triton?

As the commit template asks, please write a test, and please add the appropriate documentation.

Can you please point me to which document I should update?

Can you please point me to which document I should update?

Possibly here?  It looks like the META parameter is not documented at all.
https://triton-lang.org/main/python-api/generated/triton.jit.html#triton.jit

@htyu I noticed that there is a hanging issue for the AMD CI. More specifically,
pytest -s test_launch.py && pytest -s test_subproc.py

works fine, but
pytest -s test_launch.py test_subproc.py

will hang in test_subproc.py.
Sorry about the inconvenience. I don't have an explanation for this issue yet. To not blocking the CI, can you put test_grid in the beginning (before the two existing tests) of test_launch.py while we are working on this issue?

Possibly here? It looks like the META parameter is not documented at all.

https://triton-lang.org/main/python-api/generated/triton.jit.html#triton.jit

It looks like the META parameter is mentioned here: https://triton-lang.org/main/python-api/generated/triton.heuristics.html#triton.heuristics . But I'm not sure that's a good place to document COMPILED_KERNEL as it is only used by grid. Alternatively I can tweak the softmax tutorial to use the new feature. WDYT?

The triton.heuristics documentation should also point to the centralized place where we document the META parameter.  However, the tutorial should not be the only place where we document how this works.

The triton.heuristics documentation should also point to the centralized place where we document the META parameter. However, the tutorial should not be the only place where we document how this works.

I added a brief documentation for the META parameter in triton.jit. Please see if it is accurate. However, I'm still not sure where to document COMPILED_KERNEL as it is only available to grid and we don't seem to have a documentation for grid.

I feel kind of weird about passing CompiledKernel into the grid callback. It feels like kind of a wrong abstraction. I'd feel a bit better about passing the metadata in explicitly with the dictionary (e.g., I could see a case that num_warps, num_stages, and now maybe n_regs and n_spills should be passed in with the meta-dictionary.

Passing individual fields into metadata does sound a better abstraction. Let me work on that.

The documentation is out-of-date. META used to be how we passed metaparameters when we didn't have constexprs 2 years ago.

I don't think this PR is the right solution to the problem; we shouldn't lump in num_warps with constexpr arguments. Maybe what you want is for the grid function to take in arguments and compilation options?

I don't think this PR is the right solution to the problem; we shouldn't lump in num_warps with constexpr arguments. Maybe what you want is for the grid function to pass bound_args and metadata separately?

Ideally yes, but that's going to fail existing user code where grid takes only one arg?

closing this as stale and is probably not the right solution. Feel free to reopen


Visium FFPE dataset => multi-slide per h5ad support

Cell2location processed h5ads tends to have data from multiple slides
Individual slides is identifiable via adata.obs["sample"].
Visium spot metadata are saved in adata.uns['spatial'] and coordinates in adata.obsm.spatial

I've seen adata.obs["sample"] but also adata.obs["library_id"] going around for identifiny slides.

We may add an extra entry to let user provide a multislide h5ad -> split into several h5ads -> generate a csv file with metadata for the conversion pipeline.

According to our last chat, it seems that this is no more an issue.
One conversion will only take one sample or library id. If there are several, we default to the first one.
And if the user wants to convert all, just pass the same h5ad object several times, and each time with a different sample or library id.


add hdm cover activity values

hdm based blinds (basically all "ease" blinds https://homematic-ip.com/en/product/ease-powered-homematic-ip) seem to report different ACTIVITY_STATE values compared to other HMIP blinds. Instead of using "OPENING" and "CLOSING" it uses 1 and 2 integers as displayed in my screenshots below.
opening:

closing:

See my suggested changes. Happy to change if needed.
Also, is there a way to test this locally ? (I have ease blinds available.)
Sander.

Codecov Report
Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (ec5d62b) 90.42% compared to head (b74560c) 90.47%.
Report is 4 commits behind head on devel.

Files
Patch %
Lines

hahomematic/platforms/custom/cover.py
90.47%
2 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #1429      +/-   ##
==========================================
+ Coverage   90.42%   90.47%   +0.05%
==========================================
  Files          49       49
  Lines        6037     6071      +34
==========================================
+ Hits         5459     5493      +34
  Misses        578      578

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Thanks for contributing.
I made some changes (sort enums, extra type for hdm, add test)
Are you able to test it locally, or should i just merge it?

Hi,
i checked the definition of the HDM1 and ACTIVITY_STATE (used for direction is used like this):
      "ACTIVITY_STATE": {
        "MIN": "UNKNOWN",
        "OPERATIONS": 5,
        "MAX": "STABLE",
        "FLAGS": 1,
        "ID": "ACTIVITY_STATE",
        "TYPE": "ENUM",
        "DEFAULT": "UNKNOWN",
        "VALUE_LIST": [
          "UNKNOWN",
          "UP",
          "DOWN",
          "STABLE"
        ]
      }

I wonder if this PR is needed.
Has the activity not been displayed correctly yet?
Otherwise, thanks to the stored value_list, the ACTIVITY_STATE should also function correctly without the need for an additional enum for the HDM.

I have these devices at home so I can check.
Am I assuming correctly the Avtivity_State should be displayed as the state attribute in hass when my shade is either moving up or down? Currently the only states I get are "open" or "close".

I tested a bit more and the problem is not the misinterpreted activity_state .
The problem is a wrong mapping in definitions.py where activity_state is not correctly mapped to direction.
I think this one can be closed.

See #1430

Please come back, if next version still has the issue.

Hi,
i checked the definition of the HDM1 and ACTIVITY_STATE (used for direction is used like this):
      "ACTIVITY_STATE": {
        "MIN": "UNKNOWN",
        "OPERATIONS": 5,
        "MAX": "STABLE",
        "FLAGS": 1,
        "ID": "ACTIVITY_STATE",
        "TYPE": "ENUM",
        "DEFAULT": "UNKNOWN",
        "VALUE_LIST": [
          "UNKNOWN",
          "UP",
          "DOWN",
          "STABLE"
        ]
      }

I wonder if this PR is needed.
Has the activity not been displayed correctly yet?
Otherwise, thanks to the stored value_list, the ACTIVITY_STATE should also function correctly without the need for an additional enum for the HDM.

So where do you get these values from?

You can export the definition with HA.
We collect these definitions in pydevccu to have a virtual CCU for testing.

Please come back, if next version still has the issue.

I will. Thanks!

Can be tested with 1.56.0b0 .
Beta use can be activated in HACS (Integration/re-download/activate beta)


New Lint/AmbiguousOperatorPrecedence: problems with shift operator

Please create file sample.rb:
a = 1 + 2 * (3 << 4)

rubocop --only="Lint/AmbiguousOperatorPrecedence" sample.rb

Expected behavior
Everything is fine.
Actual behavior
W: [Correctable] Lint/AmbiguousOperatorPrecedence: Wrap expressions with varying precedence with parentheses to avoid ambiguity.
a = 1 + 2 * (3 << 4)
        ^^^^^^^^^^^^

RuboCop version
$ [bundle exec] rubocop -V
1.21.0 (using Parser <IP_ADDRESS>, rubocop-ast 1.11.0, running on ruby 3.0.2 x86_64-linux)

See also #10047.

I'm not sure what the bug is here? The offense is not because of the << operator, but because of the + operator. Since * has higher precedence than +, the parentheses deambiguate the right side of the + operation.
The idea is that the parentheses will make it obvious that this expression can be expressed as:
b = 2 * (3 << 4)
a = 1 + b

Ok, thank you. I am going to disable this cop.
So this is not a bug.


Add JanBrzez's file 2

I created a branch, created a file and made a commit, and opened a pull request.

Ok.


WIP: Validate position values are unique for action parameters

Fixes: https://github.com/StackStorm/st2/issues/3317
Non-unique positions:
2017-06-13 12:42:50,387 WARNING [-] Failed to register actions: Failed to register action "/opt/stackstorm/packs/examples/actions/position_test.yaml" from pack "examples": Parameters random and max_pause have same position 0. Position values have to be unique.
Traceback (most recent call last):
  File "./st2common/bin/st2-register-content", line 22, in <module>
    sys.exit(content_loader.main(sys.argv[1:]))
  File "/mnt/src/storm/st2/st2common/st2common/content/bootstrap.py", line 387, in main
    register_content()
  File "/mnt/src/storm/st2/st2common/st2common/content/bootstrap.py", line 338, in register_content
    register_actions()
  File "/mnt/src/storm/st2/st2common/st2common/content/bootstrap.py", line 219, in register_actions
    raise e
ValueError: Failed to register action "/opt/stackstorm/packs/examples/actions/position_test.yaml" from pack "examples": Parameters random and max_pause have same position 0. Position values have to be unique.

Non-contiguous positions:
2017-06-13 12:46:42,948 WARNING [-] Failed to register actions: Failed to register action "/opt/stackstorm/packs/examples/actions/position_test.yaml" from pack "examples": Positions supplied [0, 3] for parameters are not contiguous.
Traceback (most recent call last):
  File "./st2common/bin/st2-register-content", line 22, in <module>
    sys.exit(content_loader.main(sys.argv[1:]))
  File "/mnt/src/storm/st2/st2common/st2common/content/bootstrap.py", line 387, in main
    register_content()
  File "/mnt/src/storm/st2/st2common/st2common/content/bootstrap.py", line 338, in register_content
    register_actions()
  File "/mnt/src/storm/st2/st2common/st2common/content/bootstrap.py", line 219, in register_actions
    raise e
ValueError: Failed to register action "/opt/stackstorm/packs/examples/actions/position_test.yaml" from pack "examples": Positions supplied [0, 3] for parameters are not contiguous.

Looks good. Messages seem clear enough.

Can you get rid of the trace just before the error message and just print the error message a hundred times....this way it won't confuse anyone. :trollface:

Nice work, additional validation for user-friendliness, etc. is always good.

LGTM, but let's wait with merging till v2.3.0 is out.

It looks like this is done so I will go ahead and merge it into master so it can be included in v2.3.1.


Add drag-and-drop feature

Fixes #14

Support dragging events around the canvas
Added two props: areEventsDraggable and onDragEvent
See caveats described on the issue
I have not tested this in iOS, only android
I used hooks in Event.js and the new component Draggable.js (useCallback, useRef, useMemo, useLayoutEffect). I hope that's ok. Maybe we have to restrict the react version to >= 16.8?
Any improvement on the code or documentation is welcomed!

I was thinking the isDraggable prop could be: (1) renamed to areEventsDraggable (more accurate name) or (2) removed, and make events draggable if and only if onEventDrag is provided.
@hoangnm what do you think?

Another improvement I'm thinking: instead of relegating the dragging functionality to the Draggable component, implement it on the Event component itself, avoiding this if condition. Hence, the Event would handle both the dragging and pressing functionality.

I could also refactor the code to be a class component, instead of using hooks (to avoid restricting the versions).

let me know what you think!
I will mark the PR as draft for now.

I finished the latest changes:

I did not use hooks functions, I used a class component instead (Event component)
The Event component handles both dragging and pressing behaviors (I removed the Draggable component I had created)

I marked the PR as ready :slightly_smiling_face:

Hi @pdpino , I tried to test on local, but the event couldn't move while I'm dragging.

I was thinking the areEventsDraggable prop could be removed, and make events draggable if and only if onDragEvent is provided.
@hoangnm what do you think?

I agree to use onDragEvent only to allow dragging.

From my experience, there's also an issue when using PanResponder inside ScrollView, https://stackoverflow.com/questions/51705343/react-native-using-a-panresponder-inside-of-a-scrollview-broken-on-android. I had to turn off the scroll of parent view while an item is dragging inside.

I agree to use onDragEvent only to allow dragging.

Ok, I will change that.

I tried to test on local, but the event couldn't move while I'm dragging.
From my experience, there's also an issue when using PanResponder inside ScrollView, https://stackoverflow.com/questions/51705343/react-native-using-a-panresponder-inside-of-a-scrollview-broken-on-android. I had to turn off the scroll of parent view while an item is dragging inside.

Interesting. @hoangnm are you using iOS or android? And what version of react/react-native are you using? I'm using an emulator with android 9, running the example/ app, with react-native v0.62.0 and react v16.11.0, and the scrolling works. Although, sometimes when I try to drag an event, I end up dragging the whole component instead (vertically or horizontally); not really sure why, and I cannot reproduce it always.
What could be happening is that either the vertical ScrollView or the horizontal VirtualizedList steal the dragging touch, and do not allow the Event to handle it. I have some ideas to solve it:

In the parent ScrollView and/or in the parent VirtualizedList set the prop onMoveShouldSetResponderCapture={() => false}, to avoid them from stealing the touch in the capturing phase.
In the PanResponder, use onPanResponderTerminationRequest: (evt, gestureState) => false, to avoid the other views stealing the touch once it started.
Remove hasMovedEnough(); maybe this is preventing the Event component from handling the touch correctly.

Could you try these solutions? I will try to reproduce the behavior and try them.

@hoangnm, I removed the areEventsDraggable prop.
I'm still not able to reproduce what you are seeing (event not moving on drag). I'm able to drag and move the events :confused:.
I applied the solutions mentioned in the comment above, could you test this again?

I'm still seeing something weird, see this gif (I'm not sure if it can be noted from the gif) (this is tested with the latest code from :

I'm able to drag the event multiple times.
However, when I try to drag it very very fast, sometimes, the whole component gets dragged horizontally instead (not that it only happens sometimes).
This has also happened to me sometimes scrolling vertically very fast (it does not appear on the gif)

This is weird, but I guess is natural when you have multiple views with drag gestures conflicting. I do not think there is much we can do about it. Do you see something like this?

On a separate note, I found and fixed a small bug in this PR (the latest commit). The left is the wrong behavior, and the right is the expected:

Occurs when an event spanning more than 1 day is dragged (in the example, the "Event 3" goes from saturday 10pm to sunday 2am, lasting 4 hours in total).
In this example, the second half (the one from sunday 12am to 2am) is dragged
Result: the event gets shortened to only 2 hours (gif from the left)
Expected: the event should still last 4 hours, as the original (gif from the right)

Why did this happen?

The onDragEvent() callback comes with newStartDate and newEndDate as parameters
The newStartDate gets calculated as the point where the event is dropped. This is correct.
The newEndDate is calculated as newStartDate + eventDuration, where eventDuration is calculated with the event's startDate and endDate.
The duration is incorrect because the startDate and endDate are changed when the event is splitted in two days (the result is the shortened duration, in the example is 2 hours).
Hence, the resulting newEndDate is incorrect when the event spans more than one day.

Solution
When sorting the events by date, I added a key originalDuration, which saves the original duration of the event (before it is splitted). I think the solution may be a little hacky, but it does the trick. If you think of a better solution let me know!

Hi @hoangnm
Could you check this PR again? I tested it again using the current example app (react 17.0.1, react-native 0.64.2), in an android emulator (android 9) and in an android device (moto g6 android 9), and the dragging works for me.
To drag an event I press it a bit longer than a regular press, but less time than a long-press.

actually, I tried before and it didn't work, it worked when I set the animated values to the transform property. I'm checking again.

Hi @pdpino , I resolved the conflicts and migrated the logic from the class component Event in this PR to functional Event component that you refactored, https://github.com/hoangnm/react-native-week-view/pull/143/files.

The drag-drop with react hook was merged so I'm closing this PR, thanks again @pdpino !


Removed PlaySettingsModal

Also, better indented soundJS-NEXT.combined.js

Hmm, I think we might still want to put this in at some point–we never got around to it, but it would be nice to be able to control things like volume, music, and a few other things in there, so I was going to leave it around until then. But maybe it isn't needed. More though is required.

I just saw it there and thought that it was left unnoticed. And because AccountModal exists, I didn't get what it was for.

So, it is up to you :)


Update fr_FR.lang for v9

Hi, I tried to update the translation as far as I found differences. Feel free to tell me or correct yourself if I missed any change or made a mistake.

Thats it?
Sorry im offtopic but if there is no one to do Swedish and Polish translation then i guess that i'll sign up for it ^^, If there is any need or interest in this.


Lazy Load Images doesn't show until click next arrow

I have slick slideshows featuring Instagram images. For few of the slideshows, the image doesn't load and will require clicking next arrow for it to load.
From my investigation, the images that fails to load did actually load but slick weren't able to convert them from using attribute data-lazy and class slick-loading to the actual attribute src with opacity 1.
====================================================================
I would like to reproduce the bug but I'm not sure how.
====================================================================
More Details

Which browsers/versions does it happen on?
Chrome and Safari
Which jQuery/Slick version are you using?
1.5.9

To reproduce, @marcelc63 you can use the jsfiddle that is linked in the  contribution guidelines  ... just use placeholder images, the instagram images are not important :)

I'll reopen this if you can reproduce.


Unable to identify which Clause Data element resulted in the match

For reporting purposes it is valuable to identify which of N number of patterns in a Clause represented in the Data list were actually responsible for the capture.  There doesn't appear to be a way to determine that today.  For example:
        var trueRegexObject = "zcash";

        var regexRule = new Rule("Regex Rule")
        {
            Clauses = new List<Clause>()
            {
                new Clause(Operation.Regex)
                {
                    Data = new List<string>()
                    {
                        "cardano|ethereum|cryptocurrency",
                        "p2pool|miner|ripple|nxt|tether|ether|btc|zcash|monero|merkleroot|xmr|eth"
                    }
                }
            }
        };

        var regexAnalyzer = new Analyzer();
        var ruleList = new List<Rule>() { regexRule };
        IEnumerable<RuleCapture> captures = regexAnalyzer.GetCaptures(ruleList, trueRegexObject);

Note if I set the Clause Capture to true I can see the actual matching text but if I wanted to report which regex pattern was used that is not available it appears.  An index indicating which of the items in the Data list would be helpful.

This is currently non-trivial because we actually combine the provided regexes together here: https://github.com/microsoft/OAT/blob/ff3787ff5a8e7d66b7ba54ccb29e61ff686bf518/OAT/Operations/RegexOperation.cs#L68
Assuming this were possible what is the use case you see?
My recommendation is to take the RegexOperation and tweak it to return the index you want in addition to the match.  I don't think this makes sense as core functionality.

The use case is easier detection of a pattern that produces a given result for modification, correction.  Imagine a false positive or other miss, knowing which index narrows it down.  If it is aggregating and therefore not easy to fix, I'll use the suggestion.  Thanks.

Let me know if you need help implementing this as a custom operation. It isn't a difficult change, but I'm unsure how it would be possible without changing what Capture Type gets returned - not a problem for a custom operation.

I implemented this as a custom operation.
using Microsoft.CST.OAT.Utils;
using Serilog;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;

namespace Microsoft.CST.OAT.Operations
{
    /// <summary>
    /// The default Regex operation
    /// </summary>
    public class RegexWithIndexOperation : OatOperation
    {
        private readonly ConcurrentDictionary<(string, RegexOptions), Regex?> RegexCache = new ConcurrentDictionary<(string, RegexOptions), Regex?>();

        /// <summary>
        /// Create an OatOperation given an analyzer
        /// </summary>
        /// <param name="analyzer">The analyzer context to work with</param>
        public RegexWithIndexOperation(Analyzer analyzer) : base(Operation.Custom, analyzer)
        {
            CustomOperation = "RegexWithIndex";
            OperationDelegate = RegexWithIndexOperationDelegate;
            ValidationDelegate = RegexWithIndexValidationDelegate;
        }

        internal IEnumerable<Violation> RegexWithIndexValidationDelegate(Rule rule, Clause clause)
        {
            if (clause.Data?.Count == null || clause.Data?.Count == 0)
            {
                yield return new Violation(string.Format(Strings.Get("Err_ClauseNoData"), rule.Name, clause.Label ?? rule.Clauses.IndexOf(clause).ToString(CultureInfo.InvariantCulture)), rule, clause);
            }
            else if (clause.Data is List<string> regexList)
            {
                foreach (var regex in regexList)
                {
                    if (!Helpers.IsValidRegex(regex))
                    {
                        yield return new Violation(string.Format(Strings.Get("Err_ClauseInvalidRegex"), rule.Name, clause.Label ?? rule.Clauses.IndexOf(clause).ToString(CultureInfo.InvariantCulture), regex), rule, clause);
                    }
                }
            }
            if (clause.DictData != null && clause.DictData?.Count > 0)
            {
                yield return new Violation(string.Format(Strings.Get("Err_ClauseDictDataUnexpected"), rule.Name, clause.Label ?? rule.Clauses.IndexOf(clause).ToString(CultureInfo.InvariantCulture), clause.Operation.ToString()), rule, clause);
            }
        }

        internal OperationResult RegexWithIndexOperationDelegate(Clause clause, object? state1, object? state2, IEnumerable<ClauseCapture>? captures)
        {
            (var stateOneList, _) = Analyzer?.ObjectToValues(state1) ?? (new List<string>(), new List<KeyValuePair<string, string>>());
            (var stateTwoList, _) = Analyzer?.ObjectToValues(state2) ?? (new List<string>(), new List<KeyValuePair<string, string>>());
            if (clause.Data is List<string> RegexList && RegexList.Any())
            {
                var options = RegexOptions.Compiled;

                if (clause.Arguments.Contains("i"))
                {
                    options |= RegexOptions.IgnoreCase;
                }
                if (clause.Arguments.Contains("m"))
                {
                    options |= RegexOptions.Multiline;
                }
                var outmatches = new List<(int,Match)>();

                for (int i = 0; i < RegexList.Count; i++)
                {
                    var regex = StringToRegex(RegexList[i], options);

                    if (regex != null)
                    {
                        foreach (var state in stateOneList)
                        {
                            var matches = regex.Matches(state);

                            if (matches.Count > 0 || (matches.Count == 0 && clause.Invert))
                            {
                                foreach (var match in matches)
                                {
                                    if (match is Match m)
                                    {
                                        outmatches.Add((i,m));
                                    }
                                }
                            }
                        }
                        foreach (var state in stateTwoList)
                        {
                            var matches = regex.Matches(state);

                            if (matches.Count > 0 || (matches.Count == 0 && clause.Invert))
                            {
                                foreach (var match in matches)
                                {
                                    if (match is Match m)
                                    {
                                        outmatches.Add((i,m));
                                    }
                                }
                            }
                        }
                    }
                }
                return new OperationResult(true, !clause.Capture ? null : new TypedClauseCapture<List<(int,Match)>>(clause, outmatches, state1));
            }
            return new OperationResult(false, null);
        }
        /// <summary>
        /// Converts a strings to a compiled regex.
        /// Uses an internal cache.
        /// </summary>
        /// <param name="built">The regex to build</param>
        /// <param name="regexOptions">The options to use.</param>
        /// <returns>The built Regex</returns>
        public Regex? StringToRegex(string built, RegexOptions regexOptions)
        {
            if (!RegexCache.ContainsKey((built, regexOptions)))
            {
                try
                {
                    RegexCache.TryAdd((built, regexOptions), new Regex(built, regexOptions));
                }
                catch (ArgumentException)
                {
                    Log.Warning("InvalidArgumentException when creating regex. Regex {0} is invalid and will be skipped.", built);
                    RegexCache.TryAdd((built, regexOptions), null);
                }
            }
            return RegexCache[(built, regexOptions)];
        }
    }
}

Very appreciated -I've need a bit of help even after reviewing wiki for operations again.  I'll ping.

P.S. another reason it is helpful to have the index known for the match is to help select a final result in cases where there is more than one, each matching a different pattern in the same rule Clause.Data i.e. regex patterns and I want to only include one of them based on a criteria like "Confidence" value for instance where the "highest" value wins.

So I would add it using something like  analyzer.SetOperation(new RegexWithIndexOperation (analyzer));

Yes


Fix README.md errors

because: Some links in the README.md file were not working properly.
this commit: fixes those errors.
Also quotes a command for YouTube that otherwise doesn't work well unescaped in all shells/terminals.
What this Pull Request (PR) does
Fixes README errors.

Please update/remove.


JBPM-5403: work item for per process instance test coverage

Contains partial fix - fixed getWorkItem() functionality.
Minor refactoring to avoid duplicities.

@sutaakar I think the other case - when per process instance throws the SessionNotFound for context error we should transform it to ProcessInstanceNotFound exception
let me know if you'd like to take care of that too in jbpm services

@mswiderski I will try to take care about that

jenkins retest this

jenkins retest this

@sutaakar I believe we are good with this to be merged after your improvements in jbpm that were already merged, correct?

@mswiderski Right.


Rename orchestration template ems_ref to md5

Rename orchestration template ems_ref to md5
@gmcculloug and @Fryguy This change is per our conversation. Please review

Looks good


python311Packages.psycopg: 3.1.11 -> 3.1.12

https://github.com/psycopg/psycopg/blob/3.1.12/docs/news.rst#current-release
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[x] aarch64-linux
[x] x86_64-darwin
[x] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 263041 run on x86_64-linux 1

4 packages failed to build:

pgadmin4
pgadmin4-desktopmode
pgadmin4-desktopmode.dist
pgadmin4.dist

28 packages built:

pentestgpt
pentestgpt.dist
pgcli (python311Packages.pgcli)
pgcli.dist (python311Packages.pgcli.dist)
python310Packages.langchain
python310Packages.langchain.dist
python310Packages.pgcli
python310Packages.pgcli.dist
python310Packages.pgspecial
python310Packages.pgspecial.dist
python310Packages.pgvector
python310Packages.pgvector.dist
python310Packages.psycopg
python310Packages.psycopg.dist
python310Packages.psycopg.doc
python310Packages.pytest-postgresql
python310Packages.pytest-postgresql.dist
python311Packages.langchain
python311Packages.langchain.dist
python311Packages.pgspecial
python311Packages.pgspecial.dist
python311Packages.pgvector
python311Packages.pgvector.dist
python311Packages.psycopg
python311Packages.psycopg.dist
python311Packages.psycopg.doc
python311Packages.pytest-postgresql
python311Packages.pytest-postgresql.dist


imp deprecated

/opt/conda/lib/python3.6/site-packages/CVXcanon.py:15: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp

is there any update to this issue? it is at the root of a bug whose error starts as:
ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found
the common fix is to do conda update libgcc, however this does not work on my linux system
when looking at the error trace, i find that the problem is when importing CVXcanon...
it is using imp.py which says it is deprecated, perhaps this is connected?

To clarify, are you running 1.0 or 0.4?
We're about to switch to 1.0, so we're really interested in making installation / deployment painless in 1.0.

Closing due to lack of response.

I can verify this problem.
$ python -Wonce
Python 3.7.1 (default, Nov  6 2018, 18:45:35)
[Clang 10.0.0 (clang-1<IP_ADDRESS>)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from cvxpy import __version__; print(__version__)
/Users/billy/Documents/assigner/venv/lib/python3.7/site-packages/cvxpy/cvxcore/python/cvxcore.py:15: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
1.0.10

I can verify this problem.
$ python -Wonce
Python 3.7.1 (default, Nov  6 2018, 18:45:35)
[Clang 10.0.0 (clang-1<IP_ADDRESS>)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from cvxpy import __version__; print(__version__)
/.../venv/lib/python3.7/site-packages/cvxpy/cvxcore/python/cvxcore.py:15: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
1.0.10

The problem is here:
https://github.com/cvxgrp/cvxpy/blob/8ceacfec7dc2c8c5d26eb49973fdb3d1938cf835/cvxpy/cvxcore/python/cvxcore.py#L15

I am also having this problem, and I would also like to find a resolution to this. Can we reopen it?

Look like SWIG 4.0 will fix the problem: https://github.com/swig/swig/issues/1621#issuecomment-527250111

Fixed in 1.1.


ES2015ify

Did some minor improvements to the module.
Not sure about Returns a promise that resolves to a result object. in the readme. I remember something that you write those statements differently these days? Couldn't find an example of them quickly.

Returns a promise that resolves to a result object.

It's:

Returns a promise for the result object.

Woot. Here's your prize. A cute red panda:

Can I collect him in Cambodja then?

I'm in Thailand now.

Wow, moving fast :p


Add-DbaAgReplica - Use $Endpoint as name of created endpoint

Type of Change

[x] Bug fix (non-breaking change, fixes #6795 )
[ ] New feature (non-breaking change, adds functionality, fixes # )
[ ] Breaking change (effects multiple commands or functionality, fixes # )
[ ] Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
[ ] Adding code coverage to existing functionality
[ ] Pester test is included
[ ] If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
[ ] Nunit test is included
[ ] Documentation
[ ] Build system

Thanks so much btw. I'll be getting to all of the AG commands, hopefully tomorrow night.

good catch 👍  thank you!


ensure that taget directory for file report exists before creating a …

…report file, affects XMLReporter
Unlike SuiteHTMLReporter, JUnitXMLReporter and other reports the XMLReporter uses writeUtf8File method from Utils class that does not check whether report directory is present or not. This leads to problems described in the issue https://github.com/cbeust/testng/issues/592.
This pull request adds a check and directory creation logic to the method used in the XMLReport class and intended to fix such kind of issues.

:+1:

Thanks @darklynx !


Runtime error messages

Hello,
I'm able to serve the built index.html generated by pygbag. However, when a runtime error occurs, the message is not shown. In a pure pygame app, it would crash and an exception message will be shown in the cmd. I know about the debug mode, but i can not use it because i'm running my own server.
Any ideas on how to get the error messages from pygbag during game
Execution and without using debug mode?
Thank you

Telemetry is not provided. You are free to implement your own but if you do so : please do not use pygame-web or pygbag terms. Thank you.


Complete remaining optional modules

Such as vulkan, nuklear, etc.

Completed as of<PHONE_NUMBER>04222160ba658fb4e368416c423f70 but not yet completely tested.


Fix offset between data and times and durations

I'm not sure how useful this really is as what we really need to know is the requested time bin size. As long as the time bins are >= the requested time bin size should be safe of shift otherwise not.

Discussed today and decided we should do where we know we can (most spectrogram and flare data) and add a flag or comment when we can't but need to.

Codecov Report
Base: 81.03% // Head: 77.05% // Decreases project coverage by -3.97% :warning:

Coverage data is based on head (5f1b157) compared to base (1a9bb1b).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #293      +/-   ##
==========================================
- Coverage   81.03%   77.05%   -3.98%
==========================================
  Files          62       62
  Lines        5910     5932      +22
==========================================
- Hits         4789     4571     -218
- Misses       1121     1361     +240

Impacted Files
Coverage Δ

stixcore/products/product.py
76.01% <100.00%> (-9.30%)
:arrow_down:

stixcore/products/levelb/binary.py
55.29% <0.00%> (-39.42%)
:arrow_down:

stixcore/processing/LBtoL0.py
43.61% <0.00%> (-26.60%)
:arrow_down:

stixcore/config/config.py
81.48% <0.00%> (-18.52%)
:arrow_down:

stixcore/processing/L1toL2.py
51.72% <0.00%> (-17.25%)
:arrow_down:

stixcore/io/fits/processors.py
60.16% <0.00%> (-15.60%)
:arrow_down:

stixcore/processing/L0toL1.py
56.81% <0.00%> (-14.78%)
:arrow_down:

stixcore/products/common.py
70.10% <0.00%> (-4.13%)
:arrow_down:

stixcore/products/level0/scienceL0.py
82.55% <0.00%> (-2.13%)
:arrow_down:

... and 2 more

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

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

I think the only aspect missing is adding a comment when we know it should be fixed but we can't but this will be a fair but of work as have to add comments to the products and IO

there is a "header" property on products if it was open from fits
i am not sure at what level
but you could test if the property is around  and if so you can add the comment fairly easy

I don't quiet follow, what do you meant add the comment?

Closes #291


Unknown tag 'asset_path' on master

After changing my Gem file from:
gem 'jekyll-assets'
to
gem 'jekyll-assets', :git => 'https://github.com/jekyll/jekyll-assets.git'
and installing the new version, I get this when trying to build the project:
bundle exec jekyll build --trace
Liquid Exception: Liquid syntax error (/home/user/folder_includes/image.html line 1): Unknown tag 'asset_path' included in /home/user/folder/_posts/post.md
/var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/document.rb:23:in `unknown_tag': Liquid syntax error (/home/user/folder/_includes/image.html line 1): Unknown tag 'asset_path' included  (Liquid::SyntaxError)
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/document.rb:11:in `block in parse'
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:33:in `parse'
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/document.rb:10:in `parse'
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/document.rb:5:in `parse'
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/template.rb:132:in `parse'
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/template.rb:116:in `parse'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:13:in `block in parse'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:12:in `parse'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/tags/include.rb:168:in `load_cached_partial'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/tags/include.rb:134:in `render'
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:109:in `render_node'
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:88:in `block in render'
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:75:in `each'
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/block_body.rb:75:in `render'
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/template.rb:208:in `block in render'
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/template.rb:242:in `with_profiling'
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/template.rb:207:in `render'
        from /var/lib/gems/2.3.0/gems/liquid-4.0.0/lib/liquid/template.rb:220:in `render!'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:30:in `block (2 levels) in render!'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:42:in `measure_bytes'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:29:in `block in render!'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/liquid_renderer/file.rb:28:in `render!'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/renderer.rb:123:in `render_liquid'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/renderer.rb:76:in `render_document'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/renderer.rb:62:in `run'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:455:in `block (2 levels) in render_docs'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:453:in `each'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:453:in `block in render_docs'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:452:in `each_value'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:452:in `render_docs'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:192:in `render'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:73:in `process'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/command.rb:28:in `process_site'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/commands/build.rb:65:in `build'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/commands/build.rb:36:in `process'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
        from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        from /var/lib/gems/2.3.0/gems/jekyll-3.6.2/exe/jekyll:15:in `<top (required)>'
        from /usr/local/bin/jekyll:22:in `load'
        from /usr/local/bin/jekyll:22:in `'

image.html

post.md (relevant part)
{% include image.html path="image.png" %}

OS: Ubuntu 17.10
Jekyll: 3.6.2
Jekyll-Assets: current master - https://github.com/jekyll/jekyll-assets/commit/c2616b8625c500176225eb26447eeaad519566f3

We do not support {% asset_path %} anymore. https://github.com/jekyll/jekyll-assets#tag

You can do
{% asset img.png @path %}

But really you should do

    {% asset "{{ include.path }}" %}

We recently increased the scope of the context we give you from our Liquid processing.  So if that's inside of your --- then it should work, if it's inside of your _config.yml it should work, if it's set inside of a Hook (that's done on :pre_render) it should also work!

Appreciate the quick response!
I started using asset_path mainly for script and link tags, to avoid the extra attributes that are added via jekyll-assets, namely type="text/javascript" and type="text/css", which are unnecessary for HTML5. Any plans on dropping them?
I'll be testing these new changes now, the "responsive" images are well worth using the alpha.

You should be able to do {% asset my.js !type %} and have no type.  While this was unintentional, it's a side affect of our extensible HTML defaults that deep_merge our values into yours, so if you set it to false, not only will our default not show up, but our HTML attribute builder will skip over it because it's false, and HTML doesn't support false attributes.

Thanks for the feedback, just added the unset.
Still trying to debug it, but using {% asset file.js %} throws a Liquid Exception: unknown keyword: hash in myfile.
/var/lib/gems/2.3.0/gems/liquid-tag-parser-1.7.0/lib/liquid/tag/parser.rb:80:in `to_html': unknown keyword: hash (ArgumentError)
        from /home/user/.bundle/ruby/2.3.0/jekyll-assets-c2616b8625c5/lib/jekyll/assets/plugins/html/js.rb:17:in `block in run'

Update Jekyll-Assets

Latest commit fixed that one.
Sorry to bug you with this, but still having another issue:
When using {% asset '{{ include.path }}' %}, with a valid path, the following error is thrown:
Liquid Exception: couldn't find file '' Checked in thesepaths: (...)
/var/lib/gems/2.3.0/gems/sprockets-3.7.1/lib/sprockets/resolve.rb:65:in `resolve!': couldn't find file '' (Sprockets::FileNotFound)

Is the var not being handled?

Probably not because Jekyll treats context like garbage, so if we can't easily extract it in an obvious way we don't bother, and move on a case by case basis. File a ticket and I'll decide if it's worth it later, for now you can work around that problem with {{ include.page | asset }}.

The workaround also throws an exception:
Liquid Exception: uninitialized constant Jekyll::Assets::Filters::Context in /home/user/_posts/post.md
/home/user/.bundle/ruby/2.3.0/jekyll-assets-e8a8ba847e49/lib/jekyll/assets/filters.rb:12:in `asset': uninitialized constant Jekyll::Assets::Filters::Context (NameError)

Will open a new issue for this.

@envygeeks, just checked that the suggested way of removing attributes from the assets doesn't seem to work.
When using {% asset main.js !type %} I get:

What if my asset is a file other than img, js, css?
For example, I use asset_path to get a PDF file before. What's the alternative for the asset_.path tag? I tried {% asset xxx.pdf %}, it doesn't work.

We never supported PDF's, but the documentation mentions how to get the path of an asset.

@envygeeks Yes, I know. Can you tell me how to get the path of an asset. I did not find the details in the readme. (maybe due to my careless)


Support for Java enum classes?

Java enum classes seem like they'd be fairly straightforward to support, but they're not currently supported in jnigen, and awkward in smjni.  How hard would this be to add?

Good question! I've been away from Java world for quite a bit so will need to take a look at how these look from JNI side and what would be a good way to expose them.
Thank you!

Ok, at the first blush it seems that adding enums to jnigen shouldn't be too hard. On the C++ side enum members will be exposed simply as static fields with their original names. I'll try to add it to jnigen and see how it goes.

And after digging through the code turns out that non-handling of enums is a bug, not a feature. 🙂 Caused by not handling an enum member of all things! Fix should be out in a couple of days.

Since the values of the enum fields are static final members, I think it should be possible to actually get the enum object itself (presumably with a global ref) rather than just the field that holds it.

Ok this functionality is now available in release 3.9. It should appear on Maven central shortly. You use it just like regular static fields, e.g.
@ExposeToNative
enum AnEnum {
   @CalledByNative FIRST,
   @CalledByNative SECOND
}

auto cls = java_classes::get<AnEnum>();
auto firstObj = cls.get_FIRST(env);

The reference you get back is a local ref - as always with JNI. Making a global ref is always a C++ code choice as it has non-trivial implications. (the total amount of global references may be limited on some JVMs and they preclude GC).
Hope it works for your use case!

Is this resolved now? 🙂
Thank you!

Yes, looks good!
I'm able to get the global refs myself based on the generated classes, and it's pretty easy.
Thank you!


2.43.0 azcli - no file copy via rdp?

It seems like when I went from 2.42.0->2.43.0, my rdp file copy capability seems to have disappeared.  Has anyone else observed this?
F:>az --version
azure-cli                         2.43.0
core                              2.43.0
telemetry                          1.0.8
Dependencies:
msal                              1.20.0
azure-mgmt-resource             21.1.0b1
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\kgould.azure\cliextensions'
Python (Windows) 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:37:59) [MSC v.1933 32 bit (Intel)]

@bebound for awareness

I can't repro. This is out of CLI's scope, please check you VM and RDP client configuration.

I can't repro. This is out of CLI's scope, please check you VM and RDP client configuration.

Discovered a reboot is required.
Failing at 2.43.
Downgraded ->2.42
Still failing.
Rebooted.
Copy/paste file works.
Upgraded. 2.42->2.43
Copy/paste file does not work.
Rebooted.
Copy/paste file works.

@kgouldsk Thanks for the update. Please let us know if any further assistance is required on this.


Feat: Repayment With Post Dated Checks

Description
See Issue-493
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!

[x] Write the commit message as per https://github.com/apache/fineract/#pull-requests

[x] Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.

[x] Create/update unit or integration tests for verifying the changes made.

[x] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.

[x] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/api-docs/apiLive.htm with details of any API changes

[x] Submission is not a "code dump".  (Large changes can be made "in repository" via a branch.  Ask on the developer mailing list for guidance, if required.)

FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.

@thesmallstar Please take a look

@thesmallstar Please review.

@thesmallstar Please review

@thesmallstar @ptuomola @luckyman20 Would you mind reviewing this?  Thanks :)

@ptuomola Could you please review this as well?

Hi @BLasan - looks good, left some comments. Can you have a look, and also rebase & squash please?

Hi @BLasan - looks good, left some comments. Can you have a look, and also rebase & squash please?

Done. Please review

@ptuomola Would you mind reviewing this as well? Thanks


Improve UX for multiple split masterIdentities

Fixes #24.
Changes
First, the implementation introduces a new syntax for specifying identities in age.rekey.masterIdentities:
{
  # This has the same type as the old way to specify an identity.
  identity = ./path-to-identity;
  # Optional; This has the same type as `age.rekey.hostPubkey`
  # and allows explicit association of a pubkey with an identity.
  pubkey = "age1yubikey1<pubkey>";
}

The old syntax continues to be supported through automatic coercion into the new format. If pubkey is specified, it will be used to encrypt files, instead of trying to extract a pubkey from the identity file.
Second, the implementation may extract an "implicit" pubkey from the identity file to use instead of the identity itself. This will only happen if the following conditions are met:

The identity does not already specify pubkey using the above syntax.
The identity file contains exactly one identity.
The identity is of the form AGE-PLUGIN-YUBIKEY-<...>.
The pubkey is specified in the form Recipient: age1yubikey1<pubkey>.
Exactly one pubkey is found in the identity file. If there is more than one pubkey found, it is considered ambiguous and a hard error, since it may risk encrypting to unwanted (and possibly unsafe) pubkeys.

Every identity file that does not match all of the above criteria will be passed to (r)age without further processing, in order to let the program itself deal with the identity at runtime.
Third, the implementation adds support for the new environment variable AGENIX_REKEY_PRIMARY_IDENTITY, which is used during decryption. If set to a pubkey, agenix-rekey will attempt to locate the key amongst the explicitly and implicitly specified pubkeys:

If the pubkey can be successfully matched, the associated identity file is specified in first place of the arguments passed to (r)age and will thus get the first attempt at decrypting the file. The order of the identities that follow remains untouched.
If the pubkey cannot be matched, all identities are simply tried in order. A warning is printed during both encryption and decryption operations to inform the user about a potentially inconsistent configuration.

Implementation
I ended up writing a wrapper script for (r)age in ./nix/lib.nix  that is shared between for the encrypt and decrypt phases and decides what phase to run based on the first argument it receives. The remaining arguments are directly passed to (r)age. Warnings are deferred to stderr in order to not mess with generators that use the decrypt command in a piping fashion, e.g.:
generator.script = "cat ${./secret.age} | ${decrypt}";

Testing
The current code can successfully handle the following flake.nix. See the comments next to the different masterIdentities and age.secrets for further details:
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";

    agenix = {
      url = "github:ryantm/agenix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    agenix-rekey = {
      #url = "github:oddlama/agenix-rekey";
      url = "github:Lukas-C/agenix-rekey";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = inputs@{ self, nixpkgs, agenix, agenix-rekey, ... }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs { inherit system; };
    in {
      nixosConfigurations."test" = nixpkgs.lib.nixosSystem {
        modules = [
          agenix.nixosModules.default
          agenix-rekey.nixosModules.default
          {
            nixpkgs = { inherit system; };

            age.rekey = {
              storageMode = "local";
              localStorageDir = ./rekey;

              masterIdentities = [
                # Yubikey A, not plugged in
                ./identities/yubikey-a.pub

                # Yubikey B, plugged in
                ./identities/yubikey-b.pub

                ## Yubikey B, multiple pubkeys for one identity.
                ## Confirmed to fail, since this is not supported.
                #./identities/yubikey-b-multiple-pubkey.pub

                # Unencrypted plain `age` identity with a wonky name.
                # Can be used as-is, since the identity does not require further action,
                # even though this configuration should not be used.
                (./identities + "/test -i key.key")

                # Encrypted plain `age` identity, without an available pubkey.
                # Prompts for the passphrase, during both encryption and decryption.
                ./identities/testkeypass.key

                # (Same) encrypted identity with a pubkey.
                # Would only prompt for the passphrase during decryption.
                {
                  identity = ./identities/testkeypass.key;
                  pubkey = "age1w0reymggaakqgck6d8ndy635deh8p7eavaskpz0u48yqlad8v55qqum065";
                }
              ];
            };

            age.secrets = {
              # Basic secret file created with `agenix edit`.
              test = { rekeyFile = ./test.txt.age; };

              # Basic generated file to test `agenix generate`.
              test-generate = {
                rekeyFile = ./generate.age;
                generator.script = { ... }: "echo generator";
              };

              # Test proper behavior when piping into the `decrypt` command,
              # which is now a wrapper script around (r)age.
              # Requires setting AGENIX_REKEY_PRIMARY_IDENTITY to an invalid pubkey to test properly.
              # The resulting warning should not appear in the file as it is directed to stderr instead.
              test-generate-stdio = {
                rekeyFile = ./generate-stdio.age;
                generator.script = { decrypt, ... }: ''
                  cat ${./generate.age} | ${decrypt}
                '';
              };
            };
          }
        ];
      };

      agenix-rekey = agenix-rekey.configure {
        userFlake = self;
        nodes = self.nixosConfigurations;
      };

      devShells."x86_64-linux".default = pkgs.mkShell {
        packages = [ agenix-rekey.packages."x86_64-linux".default ];
      };
    };
}

AGENIX_REKEY_PRIMARY_IDENTITY set to pubkey of Yubikey B

agenix edit:

Prompts for Yubikey B PIN for decryption.
Prompts for testkeypass.key during encryption.

agenix generate -f:

Prompts once for Yubikey B PIN for decryption. The PIN is only prompted for once.
Prompts for testkeypass.key for each generated secret during encryption.

agenix rekey -f:

Prompts once for specified Yubikey for decryption. The PIN is only prompted for once.

AGENIX_REKEY_PRIMARY_IDENTITY unset

agenix edit:

Prompts for Yubikey A PIN for decryption. Prompts for Yubikey B PIN if the first is skipped and (r)age does not fail.
Prompts for testkeypass.key during encryption.

agenix generate -f:

Prompts for Yubikey A PIN for decryption. Prompts for Yubikey B PIN if the first is skipped and (r)age does not fail. Will prompt for PIN of Yubikey B every time Yubikey A is skipped.
Prompts for testkeypass.key for each generated secret during encryption.

agenix rekey -f:

Prompts for Yubikey A PIN for decryption. Prompts for Yubikey B PIN if the first is skipped and (r)age does not fail. Will prompt for PIN of Yubikey B every time Yubikey A is skipped.

AGENIX_REKEY_PRIMARY_IDENTITY set to invalid pubkey
Behavior is the same as if unset. The following warning is printed at least once for every one of the three operations:
warning: Environment variable AGENIX_REKEY_PRIMARY_IDENTITY is set, but matches none of the pubkeys found by agenix-rekey.
warning: Please check that your pubkeys and identities are set up correctly.
warning: Value of AGENIX_REKEY_PRIMARY_IDENTITY: "test"
warning: Pubkeys found:
warning:   age1yubikey1<pubkey-a> for file "/nix/store/<hash>-source/identities/yubikey-a.pub"
warning:   age1yubikey1<pubkey-b> for file "/nix/store/<hash>-source/identities/yubikey-b.pub"
warning:   age1<pubkey> for file "/nix/store/<hash>-source/identities/testkeypass.key"

TODO

[x] Documentation

I was originally considering warnings that indicate a "potentially degraded" user experience, e.g. a warning if a Yubikey identity does not have an associated pubkey. However I think now that a proper explanation in the manual/readme is required anyways and will be sufficient. No need to create additional complexity where there doesn't have to be.
So if you are happy with the current state, I will only add the remaining documentation and leave the PR otherwise as is.

I have now expanded the README and hope the explanations are clear enough so that people know what is possible, what to do and where to look.
Minor remarks:

I had to omit some of the details of the new masterIdentities type signature, since readability otherwise would have suffered even more. Instead I made due with a link to the actual lines of code. At the moment it points to the location where the corresponding lines should end up after the merge, so we should probably update this to a proper permalink afterwards.
I added a separate section for the new environment variable (and potential future ones). Since we're somehow still missing a terminal prompt emoji in the Unicode standard, I made due with a keyboard (⌨) as the section logo.

I have now expanded the README and hope the explanations are clear enough so that people know what is possible, what to do and where to look.

Looks good, thanks.

Minor remarks:
* I had to omit some of the details of the new `masterIdentities` type signature, since readability otherwise would have suffered even more. Instead I made due with a link to the actual lines of code. At the moment it points to the location where the corresponding lines should end up after the merge, so we should probably update this to a proper permalink afterwards.

I'll probably switch to mdbook rendered documentation at some point, then it will hopefully be more readable.

* I added a separate section for the new environment variable (and potential future ones). Since we're somehow still missing a terminal prompt emoji in the Unicode standard, I made due with a keyboard (⌨) as the section logo.

Good idea!
I think this is good to now, thanks again for all your work!

Happy to contribute, thank you for your openness towards my suggestions and for the constructive discussion and feedback :D


libcontainer: kill all processes in container' cgroup

reproduce:
cid=$(crictl runp examples/untrusted-podsandbox-config.json)
crictl create  $cid examples/container-config.yaml examples/untrusted-podsandbox-config.json
crictl start $cid
crictl exec -ti  $cid sh
Don't exit sh and in another console, run crictl stop.
crictl stop $cid
Fixes: #837.
the root cause is that container exit , but it don't kill the processes in its cgroup, so the cgroup path is busy, and the cgroup path
cannot be deleted.
runc has fix the issue, details for opencontainers/runc#2085
go dep and go modules are not compatible
To import v2 or a version after v2 of a dependency package, go module need to add /v2(or a higher version) to the path of import path. take runc for example,
require (
        github.com/checkpoint-restore/go-criu/v4 v4.1.0
		...

this means runc need github.com/checkpoint-restore/go-criu, and the version of go-criu is v4.1.0, runc import go-criu like this,
criu "github.com/checkpoint-restore/go-criu/v4/rpc"

if use dep to update vendor fo agent, agent need runc，and runc need go-criu, so dep will try to get github.com/checkpoint-restore/go-criu/v4
but it is not exist. dep will fail. So we can't use dep to update vendor anymore.
so I change runc code directly in the vendor dir.
Signed-off-by: Shukui Yang<EMAIL_ADDRESS>

@keloyang, the right way to approach this will be updating the vendored code here: https://github.com/kata-containers/agent/blob/master/Gopkg.toml and then running dep ensure -update.
This will generate the changes we need and we can, then, have that added to a commit then opened as a PR.
Please, would you mind to do that and force-push that into this very same branch?

@keloyang, the right way to approach this will be updating the vendored code here: https://github.com/kata-containers/agent/blob/master/Gopkg.toml and then running dep ensure -update.
This will generate the changes we need and we can, then, have that added to a commit then opened as a PR.
Please, would you mind to do that and force-push that into this very same branch?

Ouch, now I see the whole explanation on your PR body. :-/
@kata-agent, opinions?

@bergwolf, do you think this one is needed on the 2.0-dev branch?

@keloyang, in any case, @egernst re-worked the runtime part in order to, at least for now, not apply cgroups within the VM.
So, for now, this issue is fixed / workedaround.

Ok, I see the reason behind the direct vendor update. However, it is still not acceptable to just modify vendor code directly. Next time we run dep ensure, all the changes will be lost.
If dep is so broken as shown here, we should consider migrating to go dep instead.

@bergwolf, you did the whole migration for 2.x repo. How do-able would be to backport / rewrite those patches to the 1.x branch?

@bergwolf @jodh-intel  @fidencio I have a try and use "dep ensure -v" to update vendor before I raising this pr, but it always failed,
the reason is go dep and go modules are not compatible, to import v2 or a version after v2 of a dependency package, go module need to add /v2(or a higher version) to the import path. take runc for example,
require (
        github.com/checkpoint-restore/go-criu/v4 v4.1.0
	...

this means runc need github.com/checkpoint-restore/go-criu, and the version of go-criu is v4.1.0, runc import go-criu like this,
criu "github.com/checkpoint-restore/go-criu/v4/rpc"

if use dep to update vendor fo agent,  dep will try to get github.com/checkpoint-restore/go-criu/v4, but it is not exist, only github.com/checkpoint-restore/go-criu exist, so dep will fail.
I think we can't use dep to update vendor anymore and use go mod is a choice.

@keloyang, in any case, @egernst re-worked the runtime part in order to, at least for now, not apply cgroups within the VM.
So, for now, this issue is fixed / workedaround.

Actually -- this is still a real issue. My change was specific setting cpuset.cpus/mems in the guest. We do (and should!) set the cgroups still.
What are next steps here for 1.x? Can we confirm this is not an issue in 2.x agent?

Folks, this PR has been stale and I'm closing it as we're walking towards the final 1.13.0 release of the kata-containers-1.x.
From now on, all the development will happen as part of https://github.com/kata-containers/kata-containers/ and fixes should be provided to that repo.
Thanks a lot for your contribution, we're sorry that for some reason it got stale, and we hope to see you around for new adventures in the kata-containers-2.x land.


Fix usage text formatting

This uses a heredoc to make the help function clearer and not require escape sequences which may or may not require the -e switch to echo depending on the shell.

Thanks!


add support for rustc's --error-format short

As implemented in https://github.com/rust-lang/rust/pull/44636, this exposes the --error-format short in Cargo's --message-format flag.

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.

implementation looks good to me!
One thing I am not certain about is that names human and short don't really fit together. Should we rename (with deprecation) human to long?
Am I correct that current human should be preserved as a default?
cc @rust-lang/cargo

That makes sense, but may also require intervention in rustc as well, since human is also used there.
As for being default, human is still the default in rustc, so i codified that here. The Default impl was needed to bring it into BuildConfig, so its #[derive(Default)] would work.

I think this option to rustc was supposed to be unstable? If so I'm somewhat wary of landing this now...

Since https://github.com/rust-lang/rust/pull/46005 was merged, making that parameter unstable, should i just close this?

Ah yes, let's do that for now.

should i just close this?

Hm, I think it would be beneficial to expose this feature to Cargo users somehow: I am afraid rustc only option wouldn't get much testing without being able to enable it with Cargo. Or will it be possible to add RUST_FLAGS=["--message-format", "short"] to .cargo/config to achieve this effect? Will it work with tools which want to pass --message-format=json?

We could consider adding an unstable cargo option?

@matklad: ping, see previous message. Seems like low-hanging fruit?

Maybe we should change the arguments to be the same?


Apex Legends

Game Title
Apex Legends
Game Website
https://www.ea.com/games/apex-legends
Anti-Cheat Software
Easy Anti-Cheat
Status of the Anti-Cheat
⭐ Supported
Proof of Mention
https://steamdb.info/depot/1172471/

Search for easyanticheat_x64.so

Duplicate of #366
Can you guys please just look at the existing issues before making a new one

Duplicate of #366 Can you guys please just look at the existing issues before making a new one Also please properly set the title for gods sake

Sorry, first time, didn't realize and forgot about some things. Closing at it's duplicate. I've just been through a match, everything works as expected.


.NET 4.6.2 support

Which is the last version supported by .NET 4.6.2 framework?

Seems to be answered in the readme now:

Get latest version from NuGet
.NETCore2.0, NETStandard2.0 or NET 4.6.1 with NHibernate 5.x


Build image on the destination server

They are kind of, it would soak up the cpu for around 5-10mins for the whole server.

Well, I'm pretty sure the resource limits only apply to a running container. Not the building process.

In that case ill request changes soon.

Ok, I'll merge this, hope nothing breaks or dies :scream:


Roadmap

This issue is a request to the community to submit what their vision of plotly-resampler is, which features are still worth implementing?
Some features which I find worth pursuing:

Summary dataset statistics of the respective view (initially in a table)
-> e.g. a Table with df.describe() for each series that is shown.
Options to annotate your data
No idea how to implement this with plotly, would think that you would need to define your own OO structure to do so (which re-uses underlying annotations), but this would still imply a lot of logic and design decisions (e.g. loading annotations, saving annotations, ...)
Other aggregation methods (e.g. using width of trace for uncertainty / downsampling rate)
just a gist, but using a plot-per-pixel ratio of 2 with LTTB seems a rather good IDEA to me.
Also, playing with the line-width seems a valid path to embark upon.

Hi, thanks for the great work.
I'm currently working on a data viz app and came accross plotly_resampler a couple of weeks ago. I'm trying to find a way to incorporate it in my already existing Dash app. Would there be a straightforward way to do that ?
Thanks for your time.

Hi @szkjn,
Lovely to hear that!
Valid question, actually there is a (straightforward) way!
Look at this example: https://github.com/predict-idlab/trace-updater/blob/master/usage.py, here we use the register_update_graph_callback on a new, standalone dash-app layout. I acknowledge that this is not yet documented that well, so thanks for pointing this out, I will handle the documentation issue in #17 .
Hope this helps you further!
Kind regards,
Jonas

Hi,
I think that I understand your problem. You have multiple callback functions, which want to output/update the figure-related components. I would suggest that you create a separate issue, where you describe / copy-paste the text above!
You can also DM me on Twitter so we can chat further on discord :)!

@szkjn, we added a dash-example on how to use plotly-resampler within a dash app! 😃

Annotations in a sense of being able to mark some arbitrary x_start and x_end? Very useful but maybe out of scope with this package as that would require a database + some messy plotly code (for now). Happy to hack on that and this in the future....
One thing I know will be useful is similar to the min max aggregator where you would still want to downsample a large dataset but not remove outliers in the downsample, implying there is some smart way to select min and max values in some bucket but then still plot a subset of that bucket, keeping the outlier in that downsample.

Additionally, a new release this week will also support non-scatter-like traces (e.g., bar-charts, histograms) in your figure 🔥.

may I ask, does that mean bar-charts are not yet supported? this post was quite a while ago.
I'm testing this out on a dash app and seems to work fine for area and lines, but bar charts are
I'm using plotly express to build my charts
fig.replace(px.bar(noisy_sin))

Hi @cjstudioz,
Plotly-Resampler (at the moment) only aggregates data for scatter-like traces.
I believe earlier versions of plotly-resampler crashed when non-scatter-like traces were present in the figure - which the release @jonasvdd is talking about solved.
P.S. If you have any proposal of how bar charts should be rendered (with aggregation functionality), you may always create a seperate issue or pull request :pray:

happy to create a new feature request / bug report but just wanted to check. Does plotly-resampler currently meant to support bar charts? so I know whether to raise a bug or feature req.
also thanks for this great tool obviously

We intended to focus initially on scatter traces (as we mainly work on very large time series datasets in our job). However, we are open to extending the functionality of plotly-resampler :) (although this is less of a priority for us)

Hi @cjstudioz, feel free to do so! 😄 Could you then also provide a minimal (slow-)working example?
Normally plotly-resampler Figures allows using other visualization types, but as @jvdd stated, we only focused (so far) on the scalability of the scatter traces and have not found significant use-cases for adding scalability to other ones.

Hi! I love your work; it's making my work so much easier!
As for the road ahead, I really wish there was a way to avoid the gaps in line plots. Some sort of interpolation between the rendered points could maybe work.

Do you  mean: setting interleave_gaps to False in for the AbstractSeriesAggregators?
This would boil down to this:
# create a x-index with a gap
x = np.concatenate((np.arange(0, 1_000_000), np.arange(2_000_000, 3_000_000)))
y = np.random.randn(2_000_000)

# Default figure -> uses the default aggregation method with interleave gaps set to True
fr_autogap = FigureResampler(default_downsampler=EfficientLTTB(interleave_gaps=True))
fr_autogap.add_trace({}, hf_x=x, hf_y=y)
fr_autogap.show()

# Interleave gaps set to False
fr_nogap = FigureResampler(default_downsampler=EfficientLTTB(interleave_gaps=False))
fr_nogap.add_trace({}, hf_x=x, hf_y=y)
fr_nogap.show()

Maybe we can add this to the FAQ section of our docs? @jvdd @AdrianSkib

I do not know it this is already possible, sorry if I missed it in the documentation. I have an existing figure and I want to replace the data of a particular trace.
This would be useful in the following case: There is a figure with two subplots, in the top one the original signal is shown, while on the bottom one a denoised version of the original signal. The denoising can be adjusted by changing the value of a parameter, in a slider for example, the denoised signal should then be recalculated (so a new signal) and the trace data should be replaced with the new one.
The only approach that comes to my mind right now is taking the previous figure as a State in a callback, deleting the previous trace and with the add_trace method add the updated one. Finally, return the new figure.
Great work on the library btw 😁

@Juasmis you can use the FigureWidget class instead of Figure and update the data series in it to redraw. The FigureResampler works great with it.

Hey @Juasmis
That is a very cool use case you are describing!! :eyes:
If you are working in a notebook environment I would also suggest using the FigureWidgetResampler (as @alyashenko suggested).
To support reloading when data is added / changed we added the reload_data and reset_axes methods to the FigureWidgetResampler
P.S.: You can see an example of FigureWidgetResampler being used to dynamically update the trace data in this (old) issue https://github.com/predict-idlab/plotly-resampler/issues/58

I am trying to implement this functionality in a Dash app and not sure what is the alternative to the reload_data method. If I understand correctly the dynamic updating in Dash is carried out by TraceUpdater. From the Dash app example the updated data needs to be processed by construct_update_data function and it only handles relayoutData like datatype (I think? 😅).
Maybe I am polluting this thread with these questions, if it is the case, I am happy to move the conversation to a different place
Thanks for the help! @alyashenko  @jvdd

Hi @Juasmis,
I found it a fun challenge to create a dash app concerning your problem!
I think the dash app example which I made in #159 meets your requirements.
Kind regards,
Jonas

Sort of an out there feature but lets say I did have an infinite stream of timeseries data that I wanted to plot and use the functionality of this library.

Could we suggest optimal ways to partition that data given we know the frequency of it?
Could actually give plotly-resampler a directory of these partitioned files to draw from and plot.

Lots of unknowns there but I think interesting


Buttons Disappear When Resizing the Chrome Window

I've noticed that the TMDb and Letterboxd buttons are displayed correctly when the Chrome window is in full-screen mode. However, when I resize the window or split it (e.g., aligning it to the left or right of the screen), the TMDb and Letterboxd buttons completely disappear. This is only a problem in imdb sites
Steps to Reproduce:
Open the application in Chrome.
Ensure the window is in full-screen mode – all buttons are displayed correctly.
Resize the window or split it to one side of the screen (e.g., left or right).
Observe that the TMDb and Letterboxd buttons disappear.
Expected Behavior: The buttons should remain visible regardless of the window size, or there should be an alternative way to access them (e.g. becoming smaller, a responsive layout)

Ah, never thought of this test case. Thx for reporting, its a minor bug.
This script works on both mobile (small display) and desktop (big display). But I never thought of someone will resize the window or use small window on a desktop.
Fixed it!

Thanks! Works perfect now. Yeah for workflow reasons I often have 2 or even 3 windows open on one screen.