Checkout API & Payment processing support

An example of expected usage:
ShopifyAPI::Base.site =<EMAIL_ADDRESS>ShopifyAPI::VaultSession.site = 'https://cardsink.myshopify.io/'

checkout_params = {
  email<EMAIL_ADDRESS>  line_items: [{
    variant_id: 3,
    quantity: 1
  }],
  billing_address: {
    first_name: "John",
    last_name: "Smith",
    address1: "126 York St.",
    city: "Ottawa",
    province_code: "ON",
    country_code: "CA",
    phone: "(123)456-7890",
    zip: "K1N5T5"
  },
  requires_shipping: false,
  requires_shipping_method: false,
  requires_shipping_address: false
}
payement_params = {
  payment: {
    amount: "380.00",
    unique_token: "my_idempotency_token",
    credit_card: {
      number: "4242424242424242",
      month: "12",
      year: "2019",
      verification_value: "123",
      first_name: "John",
      last_name: "Smith",
      brand: "visa"
    }
  }
}

# Pay using a credit card (Uses a vaulted session by default)
checkout = ShopifyAPI::Checkout.create(checkout_params)
checkout.pay(payment_params) do |payment|
  # do something
end

# Pay using a credit card with an explicit vaulted session
checkout = ShopifyAPI::Checkout.create(checkout_params)
vaulted_session = ShopifyAPI::VaultSession.create(payment_params)
checkout.pay_with(vaulted_session) do |payment|
  # do something
end

Ping @maximebedard

@ryanbalsdon do you know the status of this PR?
I am looking to implement this exact same feature!

@ryanbalsdon I've updated the PR to use the admin endpoints and tweaked a little how to actually process payments. Next steps:

[ ] Add automatic polling
[ ] Add coded errors support
[ ] Create a separate resource for AbandonedCheckouts?

@dominiquesr @maartenvg could I get 👀 on this?
@ilikeorangutans @awd for sanity check as well, does the channel related api belong here?

This uses the checkout api? If the connecting api client is a channel app its sales channel will automatically get attributed.

@ilikeorangutans Yep, I was just wondering if you were aware about another lib for channel specific apis?

I've updated the PR to remove the has_many and return to the original implementation as it's not supported in earlier version of active_resource. I didn't want to backport the feature, so I believe this make sense for now. We could also hide it behind version conditional and for people to upgrade, but that would add unnecessary complexity IMO.
Any outstanding comments here? @ryanbalsdon @maartenvg ?

🛎

Pull request authors can't approve their own pull request

👍

Should be all good with the comments, maybe another sanity check 👀  @Shopify/api


making language runtime a required flag

Changes

:broom: add check to make language runtime a mandatory flag

/kind enhancement

Fixes #
fixing AC1 of https://github.com/knative-sandbox/kn-plugin-func/issues/553

cc @lkingland

its ready for reviews now - thanks

I have two concerns here. I think we should leave the defaults in place at the library level. As a user of the client library, defaulting as much as possible is preferable as it eases basic usage, tests etc. and the default is clearly visible in code/docs. I would therefore consider leaving in the defaults, and tests, in the core client library and instead focus this change in the CLI.
Since this is a CLI, user-facing request, based on UX feedback, I would recommend we keep this as a CLI change: simply remove the default from the flag. If in "confirm" mode they get a prompt, and if in non-confirm-mode they get an error stating language is required.
Secondly, I am a bit hesitant to create "required flags", because they are by definition optional. If it's required, it should probably be an argument.

Just to follow up on this a bit.  Since we agree the config option is a good final destination, I am completely good with this being our path forward right now, if we can simply error on a missing required flag by default, but add it to the prompts when in "confirm" mode like the other commands.

/lgtm


Not really an application question but a prerequisite question

How is the .deb acquired?
sudo dpkg -i ConnectWiseControl.ClientSetup.deb results in an error using dpkg or trying in debtap

The deb is downloaded from your connectwise control instance when you hit the button in the bottom left to add a device.


Port DevAudit to .NET Core

With the release of .NET Core/Standard 2.0 and the Windows compatibility  pack for .NET Core, enough APIs should have been implemented to make porting the DevAudit audit library and CLI interface to Microsoft's newest .NET implementation possible. I've forked the repo and created the  netcore branch to implement this feature. The main tasks are:

[ ] Create VS 2017 versions of the needed projects targeting .NET Standard and Core
[ ] Build dependent projects like Alpheus and Versatile for .NET Standard
[ ] Ensure .NET Standard or Core versions of the dependent NuGet packages are available
[ ] Make any needed code changes to accommodate building for .NET Standard and Core
[ ] Make the necessary changes to the build scripts for .NET Standard and Core.

Cleanup old issues till we can plan future development in more detail.

If you're going to go down this road, you may want to convert over to the new project format, then multi-target the project so that you get full fx and dotnet core fx as well.


Updating graphql dependency

I think this was likely added as a mistake. Closing.

@RichardLitt The graphql-scalar version bump was unintended but I did intend to send the PR to update the peer-dependency so that graphql-scalar can be used with graphql 14.

Ah, cool. Can you change the name, back, too, if you open a new PR? It shouldn't change scope. I can't reopen for some reason (was the branch changed?).


[flexible-ipam] Optimization on NodeIPAM code path

Avoid running unnecessary code in getIPPoolsByPod function when
no IPAM annotation is present.
Signed-off-by: Anna Khmelnitsky<EMAIL_ADDRESS>

Codecov Report

Merging #3326 (3704158) into main (15de4cf) will decrease coverage by 8.62%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main    #3326      +/-   ##
==========================================
- Coverage   60.95%   52.33%   -8.63%
==========================================
  Files         266      371     +105
  Lines       26508    40819   +14311
==========================================
+ Hits        16159    21362    +5203
- Misses       8597    17184    +8587
- Partials     1752     2273     +521

Flag
Coverage Δ

integration-tests
36.31% <ø> (?)

kind-e2e-tests
48.08% <0.00%> (+0.24%)
:arrow_up:

unit-tests
41.63% <75.00%> (+<0.01%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/agent/cniserver/ipam/antrea_ipam_controller.go
79.51% <75.00%> (-0.25%)
:arrow_down:

pkg/agent/util/net.go
25.33% <0.00%> (-22.00%)
:arrow_down:

pkg/agent/route/route_linux.go
27.46% <0.00%> (-19.46%)
:arrow_down:

pkg/agent/util/ipset/ipset.go
61.53% <0.00%> (-7.70%)
:arrow_down:

pkg/agent/openflow/pipeline.go
67.23% <0.00%> (-7.16%)
:arrow_down:

pkg/apiserver/certificate/certificate.go
69.44% <0.00%> (-6.95%)
:arrow_down:

pkg/util/k8s/client.go
39.02% <0.00%> (-4.88%)
:arrow_down:

pkg/controller/networkpolicy/status_controller.go
65.89% <0.00%> (-3.47%)
:arrow_down:

pkg/agent/proxy/proxier.go
60.44% <0.00%> (-2.71%)
:arrow_down:

pkg/ovs/openflow/ofctrl_action.go
67.91% <0.00%> (-1.67%)
:arrow_down:

... and 130 more

/test-all

/test-flexible-ipam-e2e
/test-ipv6-all
/test-ipv6-only-all
/test-windows-all

/test-multicluster-e2e

/test-ipv6-only-all


Set envs config

Based on https://github.com/donejs/donejs/issues/57
Should be either server-development or server-production.  Default to NODE_ENV if it exists.

Also will have to see what needs to be done to renderingLoader (probably shouldn't matter)


Sample count affecting results

Different sample count numbers for developing tranche results affect the optimization results.
We tested for Sample_count = 2  and Sample_count = 100 and results were different.

A sample count of 2 isn't a relevant use case. If you're seeing substantially different results (completely different research areas being funded) for sample counts of 100, 500, 1000, then we can look into this. But keep in mind this is stochastic optimization: the exact numerical results will differ every time it's run.

I'm actually curious now if we can figure out what the minimum viable sample size should be. As the sample size increases, results should stabilize, so we may be able to pinpoint a good sample size that provides stable results without taking too long.
I'm going to assign this issue to me and do a little exploration. Will post results when I have them (target end of December).

Evaluating Wind Turbine
Sample count 2
Maximum 0.05000163793496892
Minimum 0.03930898348836945
Mean 0.04673141511154751
Median 0.047295373990512854

Evaluating Wind Turbine
Sample count 102
Maximum 0.05074675103140825
Minimum 0.03921125267261145
Mean 0.047102480332126134
Median 0.04736886642500573

Evaluating Wind Turbine
Sample count 202
Maximum 0.0511012432768915
Minimum 0.03938420211860227
Mean 0.0470669057146053
Median 0.04738120646491502

Evaluating Wind Turbine
Sample count 302
Maximum 0.05130641971005632
Minimum 0.038911519232402866
Mean 0.047062919839617044
Median 0.04738236860035083

Evaluating Wind Turbine
Sample count 402
Maximum 0.05144503853535604
Minimum 0.039086028608004995
Mean 0.04709264628160621
Median 0.04738846193549302

Evaluating Wind Turbine
Sample count 502
Maximum 0.05179165990422748
Minimum 0.038710934528358804
Mean 0.04705942933975828
Median 0.047336310874603535

Evaluating Wind Turbine
Sample count 602
Maximum 0.051396795703752135
Minimum 0.039011913038007724
Mean 0.04706472045440291
Median 0.047340776834623864

Evaluating Wind Turbine
Sample count 702
Maximum 0.0515436962889054
Minimum 0.03890275155955834
Mean 0.04705099849697472
Median 0.04732222800067597

Evaluating Wind Turbine
Sample count 802
Maximum 0.051599654984733546
Minimum 0.03894584304500875
Mean 0.047073738619565327
Median 0.047360723405527355

Evaluating Wind Turbine
Sample count 902
Maximum 0.05153122601926441
Minimum 0.03884336758901155
Mean 0.04706970863901063
Median 0.04738398337558049

Evaluating Wind Turbine
Sample count 2
Maximum 0.05009954496999655
Minimum 0.04311308662525879
Mean 0.04703201735956385
Median 0.04684127876243059

Evaluating Wind Turbine
Sample count 1002
Maximum 0.05143032852602267
Minimum 0.03920714299413558
Mean 0.04706686316443779
Median 0.04735554628879526

Evaluating Wind Turbine
Sample count 2002
Maximum 0.05166260301886622
Minimum 0.038780538927572286
Mean 0.04707645044347494
Median 0.04737317100927385

Evaluating Wind Turbine
Sample count 3002
Maximum 0.05157089781174794
Minimum 0.038471216317050784
Mean 0.04707885884691293
Median 0.04736952898802004

Evaluating Wind Turbine
Sample count 4002
Maximum 0.05169310054428345
Minimum 0.038636731546347766
Mean 0.047079561202335904
Median 0.04736988502500272

Evaluating Wind Turbine
Sample count 5002
Maximum 0.05158003782511042
Minimum 0.03837598793852433
Mean 0.0470726621148148
Median 0.0473722165303716

Evaluating Wind Turbine
Sample count 6002
Maximum 0.051589366675181256
Minimum 0.03839646204441669
Mean 0.04707352957592817
Median 0.047373704877490944

Evaluating Wind Turbine
Sample count 7002
Maximum 0.05157564651707769
Minimum 0.038401844232053846
Mean 0.04707340147832284
Median 0.04735733351731602

Evaluating Wind Turbine
Sample count 8002
Maximum 0.05169668162757991
Minimum 0.03862965491007416
Mean 0.04706520775064487
Median 0.047358853973410844

Evaluating Wind Turbine
Sample count 9002
Maximum 0.05158837596216941
Minimum 0.03839905155584951
Mean 0.047068120569336375
Median 0.04736668340164845

I'm not seeing anything in the above results to cause concern - even the difference between sample count = 2 and sample count = 1000+ is within rounding distance.
@tjlca Did you see cause for concern in any other decision contexts? If not I'll close this issue. We might want to add guidance on choosing sample sizes to the documentation, to recommend only 100+ draws be used per simulation.

To address: add warning message for sample_count < 100


"Every Door" in title is cut off for smaller phones

I'm using the app on an iPhone 12 mini, hence with limited screen space.
The title bar shows "Every Do...", as can be seen in the screenshot.
I think that with some minimization of white space between the icons the whole text could fit.

Thanks for testing the app! The label is ideed useless. With #161 it will be removed.


fix-test-and-hyperlinks

for the PR #3588 for the issue #2519
1.initially  "https://www.wikidata.org/wiki/Property:P670 https://www.wikidata.org/wiki/Property:P669 are now mapped to https://schema.org/streetAddress via https://www.wikidata.org/wiki/Property:P2235 " was not treated as a link ,now each text component inside it is treated as text and each link is uniquely identified.
2. tests added to check if links inside of text snippets are treated as hrefs.

@wetneb  this is the pull request of #3588  ,if i run prettier check ,then will pass all the PR tests ,but then it would increase the number of changes but making changes in all test.spec.js ,so can you please tell me what i should do ?

due to many conflict issues and large number of diffrences added to due to eslint and pretteier i am not able to commit changes in this branch so i am  pushings another PR


subscribe

We mentioned making it a conduit source but I had trouble imagining a clean way to do this. For now WS methods take in a handler.
@blinky3713 Let's discuss how to wrap it as a conduit source when you get a chance


Issue/5001 composer embedded (#5012)

Pull request opened by the merge tool on behalf of #5012

Merged in 9a483b23b6c7adcab24afd0b2936738f171ee4b0


Searching for users with just @ rack timeout

Getting rack timeout errors on https://panoptes.zooniverse.org/api/users?search=@&page_size=10
We should probably only look for users with a character after the @ symbol.

I think this the same problem as #1230, we need to switch from trigram searches to using the normal full-text search methods.

I was thinking about just not running the search if the params are empty.

Aren't the params non-empty though? A display name could have an '@' in it.

yeah sorry, i meant empty like matching just the at mention string /^@$/.

but this is really just a workaround to not run a long query.

Ah yeah, I think we can update the index type and be set. The search point searches both logins and display_names so it should search @ in case the user was looking for someone with the display_name '@'.

just out of interest if I wanted to mention them it'd be @@?

No you mention with the login name, which can't have a '@'.


Deployment commit for prod-stable

Merged prod-beta branch to prod-stable.
Use latest commit to update namespace ref in app-interface repo. Don't use merge commit, SHAs must be unique when images are created for each branch.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 65.72%. Comparing base (8d85b40) to head (9eadaa9).

Additional details and impacted files
@@              Coverage Diff              @@
##           prod-stable    #3888    +/-   ##
=============================================
  Coverage        65.72%   65.72%
=============================================
  Files              515      515
  Lines            10001    10001
  Branches          2198     2357   +159
=============================================
  Hits              6573     6573
+ Misses            3424     3180   -244
- Partials             4      248   +244

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


Fix controlPipe is not closed

Fix #275
It seems controlPipe.Close() is missing
Signed-off-by: Harry Zhang<EMAIL_ADDRESS>

ping @mlaventure @crosbymichael I see the pr was updated PTAL

LGTM.


Add Application Insights telemetry

Description
What's new?

Add application insgihts nuget package

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Tests
[ ] Other

Codecov Report

Merging #212 (efd70c1) into main (86ef1c0) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff            @@
##            main    #212      +/-   ##
========================================
- Coverage   5.92%   5.92%   -0.01%
========================================
  Files         71      71
  Lines       2362    2363       +1
========================================
  Hits         140     140
- Misses      2222    2223       +1

Impacted Files
Coverage Δ

src/AzureIoTHub.Portal/Server/Startup.cs
0.00% <0.00%> (ø)

Continue to review full report at Codecov.

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


Switch the CI to spec-prod, and enable it for PR validation.

This is obsoleted by #171, once my suggestions there are merged.


Merge develop branch to v2 branch

Codecov Report

Merging #2143 into v2 will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##               v2    #2143   +/-   ##
=======================================
  Coverage   92.72%   92.72%
=======================================
  Files          58       58
  Lines       10761    10761
=======================================
  Hits         9978     9978
  Misses        783      783

Continue to review full report at Codecov.

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


Two transitions from single source to single destination?

I want to do something like this:
+ #automaton((
  s1: (s1: "a", s1: "b", s2: "a"),
))

But I got duplicate key error. I know I can do
s1: (s1: ("a","b"), s2: "a")

But that would make it a single curve. I want two curves. Is that possible?
Thanks for your great work!

You will need to draw the states yourself on a CeTZ canvas, but it is possible:
#cetz.canvas({
  import finite.draw: *

  state((0,0), "q0")
  state((4,0), "q1")
  transition("q0", "q1", inputs:1)
  transition("q0", "q1", inputs:0, curve:left)
})

See section II.4 of the manual for more details.

Thanks, but I think it would be great if it's supported without manually calling canvas. Is that planned?
I think we might mainly need to change:
https://github.com/jneug/typst-finite/blob/042cd1f8f154ffba9978e5e649e9128c13f3c8f8/cmd.typ#L116-L147
But I'm too bad in typst that I tried and failed...

This won't be possible, since a Typst dict can't have duplicate keys. I would have to change the structure of the input dict and I don't think this is a common enough thing to warrant this. Especially since it is already possible by using canvas.

Thanks a lot for your work, it's already awesome even if it doesn't support this.
However, I think implementing this doesn't require a dict having duplicate keys. For example,
s1: (s1: ("a","b"), s2: "a")

Here, s1 corresponds to a tuple, and we can expand that to two transitions. Currently we transform the tuple to a string with commas, but maybe we could re-define what a tuple means here?
I tried again and got a prototype: https://github.com/SuperKenVery/typst-finite/commit/1136d65607a1ea3c44acb3b961aaa9396bf74b2c
Maybe you could have a look if you're interested 😄
It's only a draft. Things not working:

Single transition from one src to dst doesn't show up, transitions are only created if there're multiple ones.
Multiple transitions are overlapped

But it shows the possibility 🎉


[Differential evolution:] Support for parallel evaluations of the constraint function.

Is your feature request related to a problem? Please describe.
Currently working on a high-dimensional constrained optimization problem (typical matrix size: ~12,000 × 5,000) with cca. 30-40 parameters to optimize over. Typical number of iterations is 10, and population size of 1 (keyword arg value). Such a size is sufficient because the optimization surface is quite flat. Unfortunately, I am under an NDA and cannot reveal too many details about the problem.
Describe the solution you'd like
In the current implementation, only the objective function evaluations are carried out in parallel (i.e., within "_calculate_population_energies" there is a call to the MapWrapper object instantiated in the constructor which evaluates the i-th population in parallel). However, for constrained optimization, evaluations of the constraint function are carried out in serial mode. The "_calculate_population_feasibilities" method is not parallelized. In the case of my problem, one evaluation of the constraint function is expensive and can last for 4-5 or more mins. Therefore, parallelization would yield computational cost savings.
Describe alternatives you've considered
N/A
Additional context (e.g. screenshots)
I have written an in-house implementation by deriving from the DifferentialEvolutionSolver class and over-riding the "_calculate_population_feasibilities" method. Using the joblib library (Parallel, and delayed), the constraint violation values are calculated in parallel via the following notation:
        constraint_violation = np.array(list(Parallel(n_jobs=self.constraint_workers, verbose=10)(
            delayed(np.concatenate)([c.violation(params) for c in self._wrapped_constraints])
            for params in parameters_pop)))

Such a work-around, instead of a direct call to the "constraint_violation_fn" method is due to the same not being picklable. To employ the multiprocessing package from the standard library would be also possible.
In order to prevent over-subscribing resources, I added a new keyword to the constructor entitled "constraint_workers".
If such a feature would yield significant improvements (still due to be tested), the implementation would be of potential use to other SciPy DE users.

This seems like a good idea. Is it worthbthe addition of the extra keyword, or would parallelising the constraint functions always occur alongside parallelising evaluation of the main objective? Your constraint function sounds enormous, I've only ever experienced cheap constraint functions.

If the resources are released (i.e., the processing pool is not being recycled for each generation), then we may not require a new keyword, as the resources will not get over-subscribed. On the other hand, if in the usual case the constraint function is cheap, then the overhead of including many workers would "eat up" the benefits. Then, a separate keyword for the number of constraint function workers is worthwhile.
Behind both the objective and constraint functions in my problem, there is a machine learning (ML) model underneath which needs to be generated to make predictions. Several constraints are evaluated from such an ML model. To decrease computational costs, I've linked the optimization and constraint functions via a flag as an input argument to the objective function (e.g., constr=True). Objective function is always evaluated, and if the flag is set to True it has an additional call to the constraint function. Re-factoring this may also lead to a more effective solution?
In any case, I will generalize my approach to use the native multi-processing module, and begin a pull request.

The MapWrapper is used for the duration of the minimisation, so it can be reused cheaply.
If your model is expensive to calculate then you may be able to perform some cacheing. The constraint function is called for all the population members, then the objective function is calculated for all the feasible entries. If your constraint function calculates the objective as part of it's calculation, then you could cache the objective value (for a given x) to save time.
The difficulties with reusing workers for both objective and constraint are:

specifying workers means that updating has to be deferred.
what happens if one or other of the objective/constraints functions are not pickleable?

Thank you for the suggestion. I will explore caching to save time.
MapWrapper can still be re-used. However, what would happen in a case that the objective function is expensive, and the constraint function is notably less expensive? Let the number of workers at the same value for both evaluation calls (e.g., 8). The parallel processing overheads may be fine for the expensive objective function. But, they could actually lead to a slowdown for the constraint function. Currently, are there any mechanisms to reduce the number of workers not to over-subscribe resources? For instance, if the population size is 10, and the user sets the number of workers to 32?

Requirement to set the updating to "deferred" is a good reason for having the same keyword in both cases.

In the case of my problem, the constraint function is static and does not have elements that cannot be pickled. Being called from the objective function, since the objective function is pickleable, so is the constraint function. To generalize it, either a failure will occur (an exception/error) when both functions are not pickleable, or parallelization can be disabled for the constraint function by default if the function is not pickleable.

Currently, are there any mechanisms to reduce the number of workers not to over-subscribe resources? For instance, if the population size is 10, and the user sets the number of workers to 32?

That wouldn't make sense for the user to do that. The action taken by the default MapWrapper would be whatever Python itself does. Setting workers=-1 uses the maximum number of CPU.
If the objective function is really expensive then the amount of overhead added by evaluating the constraint function in parallel will probably be minimal in comparison.

Okay then.
Is it safe to say the potential new feature would have:

Shared workers keyword for evaluating both objective and constraint function in parallel (no changes to deferred/immediate mechanism necessary).
Exception if constraint function is not pickleable.
Alternative to 2) to disable parallel processing if the constraint function is pickleable.

for (3) I would try/except PicklingError, falling back to map.

Perfect. Thank you for your comments. I will prepare an update to the DE code and attach a PR to the thread once ready.
@andyfaff  : since this is an addition to the existing DE feature in SciPy, do you think it is required to update the unit tests for DE? Or the current coverage is sufficient... ?

Additional tests will be required, that examine whether the constraints can be called in serial or parallel fashion, and whether the fallback to serial works.

The code changes will be along the lines of:
   try:
        constraint_violation = np.array(list(self._mapwrapper(self._constraint_violation_fn(x), parameters_pop)))
    except (TypeError, ValueError) as e:
            # wrong number of arguments for _mapwrapper
            # or wrong length returned from the mapper
            raise RuntimeError(
                "The map-like callable must be of the form f(func, iterable), "
                "returning a sequence of numbers the same length as 'iterable'"
            ) from e
    except PicklingError as e:
        # deal with constraints that aren't pickleable
        warnings.warn("The constraint functions must be pickleable for parallel evaluation, falling back to map", UserWarning)
        constraint_violation = np.array(list(map(self._constraint_violation_fn(x), parameters_pop)))
    feasible = ~(np.sum(constraint_violation, axis=1) > 0)

Thanks !
I tested this and after correcting the syntax error it works like a charm.
The argument x to _constraint_violation_fn method would be undefined here. Simply remove (x) from both mappers.
In a list comprehension it would be required:
e.g., [self._constraint_violation_fn(x) for x in parameters_pop]
What would be the next step for potentially including this new feature into the DE module?
The code below is within my project (deriving from the DifferentialEvolutionSolver class; in a custom de.py module).
In the same de.py custom module in my project is another de function which just instantiates DifferentialEvolution class instead of DifferentialEvolutionSolver class.
class DifferentialEvolution(DifferentialEvolutionSolver):

    # Over-ride the constructor
    def __init__(self, func, bounds, args=(), strategy='best1bin', maxiter=1000, popsize=15,
                 tol=0.01, mutation=(0.5, 1), recombination=0.7, seed=None,
                 maxfun=np.inf, callback=None, disp=False, polish=True,
                 init='latinhypercube', atol=0, updating='immediate', workers=1, constraints=(),
                 constraint_workers=1):

        super().__init__(func, bounds, args, strategy, maxiter, popsize, tol,
                         mutation, recombination, seed, maxfun, callback, disp, polish,
                         init, atol, updating, workers, constraints)

        self.workers = workers

        """def __del__(self):
            pass"""

        """def __exit__(self, *args):
            pass"""

        # Number of constraint workers
        self.constraint_workers = constraint_workers

    def _calculate_population_feasibilities(self, population):

        """
        Calculate the feasibilities of a population.

        Parameters
        ----------
        population : ndarray
            An array of parameter vectors normalised to [0, 1] using lower
            and upper limits. Has shape ``(np.size(population, 0), len(x))``.

        Returns
        -------
        feasible, constraint_violation : ndarray, ndarray
            Boolean array of feasibility for each population member, and an
            array of the constraint violation for each population member.
            constraint_violation has shape ``(np.size(population, 0), M)``,
            where M is the number of constraints.
        """
        num_members = np.size(population, 0)
        if not self._wrapped_constraints:
            # shortcut for no constraints
            return np.ones(num_members, bool), np.zeros((num_members, 1))

        parameters_pop = self._scale_parameters(population)

        if self.workers > num_members:
            self.workers = num_members
            warnings.warn("Number of workers larger than the number of members, "
                          "decreasing parallel processing pool....", UserWarning)

        try:
            constraint_violation = np.array(list(self._mapwrapper(self._constraint_violation_fn, parameters_pop)))
        except (TypeError, ValueError) as e:
            # wrong number of arguments for _mapwrapper
            # or wrong length returned from the mapper
            raise RuntimeError(
                "The map-like callable must be of the form f(func, iterable), "
                "returning a sequence of numbers the same length as 'iterable'"
            ) from e
        except PicklingError as e:
            # deal with constraints that aren't pickleable
            warnings.warn("The constraint functions must be pickleable for parallel evaluation, falling back to map",
                          UserWarning)
            constraint_violation = np.array(list(map(self._constraint_violation_fn, parameters_pop)))
        feasible = ~(np.sum(constraint_violation, axis=1) > 0)

        return feasible, constraint_violation

Thanks !
Your code had a syntax error. The argument x to _constraint_violation_fn method would be undefined here. Simply remove (x) from both mappers. In a list comprehension it would be required: e.g., [self._constraint_violation_fn(x) for x in parameters_pop].
I tested this, and a PicklingError is raised: pool objects cannot be passed between processes or pickled.
The code below is within my project (deriving from the DifferentialEvolutionSolver class; in a custom de.py module).
In the same de.py custom module in my project is another de function which just instantiates DifferentialEvolution class instead of DifferentialEvolutionSolver class. If the joblib package is employed, a list comprehension can be used instead of a mapping. Instead of calling the private method _constraint_violation_fn, a call can be made to concatenate (from numpy) instead. In this case, no pickling errors are raised and the code runs correctly. Any comments on how to refactor that into a mapper?
class DifferentialEvolution(DifferentialEvolutionSolver):

    # Over-ride the constructor
    def __init__(self, func, bounds, args=(), strategy='best1bin', maxiter=1000, popsize=15,
                 tol=0.01, mutation=(0.5, 1), recombination=0.7, seed=None,
                 maxfun=np.inf, callback=None, disp=False, polish=True,
                 init='latinhypercube', atol=0, updating='immediate', workers=1, constraints=()):

        super().__init__(func, bounds, args, strategy, maxiter, popsize, tol,
                         mutation, recombination, seed, maxfun, callback, disp, polish,
                         init, atol, updating, workers, constraints)

        self.workers = workers

    def _calculate_population_feasibilities(self, population):

        """
        Calculate the feasibilities of a population.

        Parameters
        ----------
        population : ndarray
            An array of parameter vectors normalised to [0, 1] using lower
            and upper limits. Has shape ``(np.size(population, 0), len(x))``.

        Returns
        -------
        feasible, constraint_violation : ndarray, ndarray
            Boolean array of feasibility for each population member, and an
            array of the constraint violation for each population member.
            constraint_violation has shape ``(np.size(population, 0), M)``,
            where M is the number of constraints.
        """
        num_members = np.size(population, 0)
        if not self._wrapped_constraints:
            # shortcut for no constraints
            return np.ones(num_members, bool), np.zeros((num_members, 1))

        parameters_pop = self._scale_parameters(population)
        try:
            **constraint_violation = np.array(list(Parallel(n_jobs=self.workers, verbose=10)(
                delayed(np.concatenate)([c.violation(params) for c in self._wrapped_constraints])
                for params in parameters_pop)))**
        except (TypeError, ValueError) as e:
            # wrong number of arguments for _mapwrapper
            # or wrong length returned from the mapper
            raise RuntimeError(
                "The map-like callable must be of the form f(func, iterable), "
                "returning a sequence of numbers the same length as 'iterable'"
            ) from e

        except PicklingError as e:
            # deal with constraints that aren't pickleable
            warnings.warn("The constraint functions must be pickleable for parallel evaluation, falling back to map",
                          UserWarning)
            constraint_violation = np.array(list(map(self._constraint_violation_fn(x), parameters_pop)))

        feasible = ~(np.sum(constraint_violation, axis=1) > 0)

        return feasible, constraint_violation

The mapwrapper call should look something like the calculate population energies call.

#15439 adds the vectorized keyword (available in 1.9.x onwards). This sends several solution vectors (typically the entire population) to the objective and the constraint functions, with those functions returning arrays corresponding to the outputs of the objective and constraints.
This would allow the user to implement their own parallelisation inside either the objective or constraint functions. The following example shows a user implemented parallelisation inside the objective function
from scipy.optimize import differential_evolution, rosen
from multiprocessing import Pool

bounds = [(0, 10)] * 2
with Pool(4) as p:
    def fun(x):
        # x.shape = (N, S) where N is the number of parameters and S is the
        # number of solution vectors to be considered. So we need to transpose it
        # if we're going to send it to a map-like
        if x.ndim == 1:
            # when polishing is performed
            return rosen(x)
        else:
            return np.array(list(p.map(rosen, x.T)))

    res = differential_evolution(fun, bounds, vectorized=True)

It should be possible to parallelise constraints in a similar manner.


WIP: New SAIC API

This migrates the current python gateway to the new SAIC API.

Blocked by https://github.com/SAIC-iSmart-API/saic-python-client-ng/issues/1

Hello as issues are not available on @nanomad repo
I will use this PR to transmit a "bug"
If a phone logs in ismart app, the gateway in this new version sees the token expiry and says it will wait (normally 15 minutes) but despite the message it keeps trying to get new messages each minutes without relogin in and throws error
2024-01-24 12:25:51,024 [WARNING ] Waiting since we got logged out: 401: {"code":401,"message":"Token expired"} - saic_ismart_client_ng.api.base 2024-01-24 12:26:39,061 [  INFO  ] Running job "Check for new messages (trigger: interval[0:01:00], next run at: 2024-01-24 12:27:39 CET)" (scheduled at 2024-01-24 12:26:39.047121+01:00) - apscheduler.executors.default 2024-01-24 12:26:39,062 [ ERROR  ] MessageHandler poll loop failed - __main__ Traceback (most recent call last):   File "/usr/src/app/./mqtt_gateway.py", line 447, in __polling     unread_count = await self.saicapi.get_unread_messages_count()                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/saic_ismart_client_ng/api/message/__init__.py", line 59, in get_unread_messages_count     return await self.execute_api_call(            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/saic_ismart_client_ng/api/base.py", line 89, in execute_api_call     response = await self.api_client.client.send(req)                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1646, in send     response = await self._send_handling_auth(                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1674, in _send_handling_auth     response = await self._send_handling_redirects(                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1709, in _send_handling_redirects     await hook(request)   File "/usr/local/lib/python3.12/site-packages/saic_ismart_client_ng/net/client/api.py", line 47, in __encrypt_request     raise SaicApiException("Client not authenticated, please call login first") saic_ismart_client_ng.exceptions.SaicApiException: Client not authenticated, please call login first 2024-01-24 12:26:39,066 [  INFO  ] Job "Check for new messages (trigger: interval[0:01:00], next run at: 2024-01-24 12:27:39 CET)" executed successfully - apscheduler.executors.default

Hello as issues are not available on @nanomad repo
I will use this PR to transmit a "bug"
If a phone logs in ismart app, the gateway in this new version sees the token expiry and says it will wait (normally 15 minutes) but despite the message it keeps trying to get new messages each minutes without relogin in and throws error

The exception stacktrace can be ignored, the current implementation works like this:

The  first API call that detects a 401 "waits" for the wait time, then logs back in, then throws the exception forward (since it doesn't make sense to retry an old command after 15 minutes)
The "message poller" is configured with max 1 pending check, so all the other checks are ignored (you can see that in the apscheduler logs)
If a command is requested during the "wait" period, the commands fails since the user token is not set (it will be set after the login)

Hello as issues are not available on @nanomad repo
I will use this PR to transmit a "bug"
If a phone logs in ismart app, the gateway in this new version sees the token expiry and says it will wait (normally 15 minutes) but despite the message it keeps trying to get new messages each minutes without relogin in and throws error

The exception stacktrace can be ignored, the current implementation works like this:

The  first API call that detects a 401 "waits" for the wait time, then logs back in, then throws the exception forward (since it doesn't make sense to retry an old command after 15 minutes)
The "message poller" is configured with max 1 pending check, so all the other checks are ignored (you can see that in the apscheduler logs)
If a command is requested during the "wait" period, the commands fails since the user token is not set (it will be set after the login)

Thats what i understood but looking AT my logs it happened more than 10 Times in a row (one minute each)
I was thinking that After the first one (which IS already scheduled, im ok with that) it wont try gain until the wait Time.
You Can see at the end of my log that it rescheduled it one minute After.
But i think After re Reading your answer that this IS normal and the message poller will check each minutes failing until the waiter will relogin.

@nanomad
I also often get
`2024-01-25 13:41:05,346 [ ERROR  ] MessageHandler poll loop failed - main
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/saic_ismart_client_ng/api/base.py", line 130, in deserialize
json_data = response.json()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/httpx/_models.py", line 762, in json
return jsonlib.loads(self.content, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/app/./mqtt_gateway.py", line 447, in __polling
unread_count = await self.saicapi.get_unread_messages_count()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/saic_ismart_client_ng/api/message/init.py", line 59, in get_unread_messages_count
return await self.execute_api_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/saic_ismart_client_ng/api/base.py", line 90, in execute_api_call
return await self.deserialize(req, response, out_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/saic_ismart_client_ng/api/base.py", line 179, in deserialize
raise SaicApiException(f"Failed to deserialize response: {e}. Original json was {response.text}") from e
saic_ismart_client_ng.exceptions.SaicApiException: Failed to deserialize response: Expecting value: line 1 column 1 (char 0). Original json was
504 Gateway Time-out

504 Gateway Time-out

`
I never had this message before.
And when this happens even a force refresh disent work

also got this one
Traceback (most recent call last):   File "/usr/src/app/./mqtt_gateway.py", line 91, in handle_vehicle     vehicle_status = await self.update_vehicle_status()                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/src/app/./mqtt_gateway.py", line 121, in update_vehicle_status     vehicle_status_response = await self.saic_api.get_vehicle_status(self.vin_info.vin)                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/saic_ismart_client_ng/api/vehicle/__init__.py", line 13, in get_vehicle_status     return await self.execute_api_call_with_event_id(            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/saic_ismart_client_ng/api/base.py", line 120, in execute_api_call_with_event_id     return await execute_api_call_with_event_id_inner(event_id='0')            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped     return await fn(*args, **kwargs)            ^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/tenacity/_asyncio.py", line 47, in __call__     do = self.iter(retry_state=retry_state)          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/tenacity/__init__.py", line 314, in iter     return fut.result()            ^^^^^^^^^^^^   File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 449, in result     return self.__get_result()            ^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result     raise self._exception   File "/usr/local/lib/python3.12/site-packages/tenacity/_asyncio.py", line 50, in __call__     result = await fn(*args, **kwargs)              ^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/saic_ismart_client_ng/api/base.py", line 111, in execute_api_call_with_event_id_inner     return await self.execute_api_call(            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/saic_ismart_client_ng/api/base.py", line 89, in execute_api_call     response = await self.api_client.client.send(req)                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1646, in send     response = await self._send_handling_auth(                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1674, in _send_handling_auth     response = await self._send_handling_redirects(                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1732, in _send_handling_redirects     raise exc   File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1714, in _send_handling_redirects     await hook(response)   File "/usr/local/lib/python3.12/site-packages/saic_ismart_client_ng/net/security.py", line 57, in decrypt_response     original_response_key = app_send_date + "1" + original_content_type

In fact it seems that this is saic server that is down

@sarakha63
504: is due to a container crashing on SAIC end that handles the translation between the old and new API. It has been crashing randomly for at least a day.
The second crash has the same underlying issue. I've updated the api code to handle it  a bit more gracefully.
I also see a coroutine that wasn't awaited in the MQTT library code, so I'll analyze that as well

@sarakha63 504: is due to a container crashing on SAIC end that handles the translation between the old and new API. It has been crashing randomly for at least a day. The second crash has the same underlying issue. I've updated the api code to handle it a bit more gracefully. I also see a coroutine that wasn't awaited in the MQTT library code, so I'll analyze that as well

Great thanks for your feedback.
I'll keep testing and report what i notice ;)


gitflow: merge release/3.4.2 into master

Deployed to production. Ready to merge into master.

Should I squash and merge, rebase and merge or create a merge commit ?
@VaiTon @philippeauriach


[Bug]: Base URL does not reset to empty after setting it once

Is there an existing issue for the same bug?

[X] I have checked the troubleshooting document at https://docs.all-hands.dev/modules/usage/troubleshooting
[X] I have checked the existing issues.

Describe the bug
The Base URL does not get set to empty if you have set it once
Current OpenHands version
main

Installation and Configuration
make build
make run

Model and Agent
N/A
Operating System
MacOS
Reproduction Steps

In the Settings UI, toggle Advanced Options and set Base URL to "https://test.com"
Set some random custom_model "openai/gpt-4o"
If you print the logs for Base URL (I have additional logging PR up which you can use when merged), you will see that base_url is set correctly
Now remove Base URL and press Save

You will see that Base URL is still set to "https://test.com" when it gets passed into the AgentSession (But appears empty in the UI)
Logs, Errors, Screenshots, and Additional Context
No response

I just ran in to this exact same problem, really annoying. Maybe we need to clear the browser cache. @amanape it'd be great if you can take a quick look, I imagine it's pretty simple to fix.

Are you clearing the base URL mid session?

@amanape what do you mean mid session? I launch OpenHands. Open Settings. Make the modifications.

@mamoodi After a little investigation, the initial settings is sent as soon as the session starts. Unless you change the settings and the RESTART or reinitialize the session/OpenHands, the changes will not be reflected.
Instead of taking care of this now, I'll focus on it after #3603 is merged (since it introduces some changes that may solve or require a different approach to solve this problem). It should be ready for your thorough review soon

This is not actually fixed--I just confirmed on main. Will take a look

Confirmed this works. Thanks for fixing!


Turbine can't aggregate from two microservices running on the same host on a different port

I have two services running on the same host on a different port. Turbine Instance class doesn't uses port in the equals() and hashCode() only the host and cluster name. This causes problem when storing the two instances in a hashSet of the hostsUp.
Is there a workaround for this?

In v1 I don't think so, not easily at least. In v2 (which I have not had time to prove as production ready) it is easy since the stream of connections is far more abstracted and each can have their own host:port.

How about a solution for this problem?
I'm using Spring Cloud Turbine:
<dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-turbine</artifactId>
        <version>1.0.1.BUILD-SNAPSHOT</version>
</dependency>

And have the next configuration for Turbine:
InstanceDiscovery.impl: com.netflix.turbine.discovery.EurekaInstanceDiscovery.class

turbine:
  appConfig: clientsample
  instanceUrlSuffix: /admin/hystrix.stream
  clusterNameExpression: new String("default")

As you can see, I'm using Eureka Discovery service. My 'clientsample' instances start at localhost with server.port 8181 and 8282.
When I start Turbine it logs:
Retrieved hosts from InstanceDiscovery: 2
Found hosts that have been previously terminated: 0
Hosts up:1, hosts down: 0

And it shows hystrix logs only for one 'clientsample' host (random choose) and ignore another.
When I try to configure host explicitly:
turbine:
  appConfig: clientsample
  instanceUrlSuffix: /admin/hystrix.stream
  aggregator:
    clusterConfig: CLIENTSAMPLE
  ConfigPropertyBasedDiscovery:
    CLIENTSAMPLE:
      instances: localhost:8181,localhost:8282

it has no effect and the result is same.
How can I solve my problem?

This still does not have an official solution as it was not an original design requirement of Turbine which assumed a single process per machine (the norm in AWS cloud deployments which this was originally built against).
I want there to be a solution but it is not something getting any attention right now. If you want to submit a pull request that would be great. I personally think the work should be done on the new Turbine 2 branch though.

I have ended up here after posting on Stackoverflow with this same problem. Any advance about this in v1?

@benjchristensen  @xxlabaza @BertDuerinck I just submited a pull request solving this Issue.
Waiting for your feedback


Improve CMakeLists.txt

The CMakeLists has been hacked together by me in a single file.
It needs to be rewritten for a CMakelists file per folder.
The following features have to work:

MingW64, MSYS, GCC and MSVC compiler support.

The different libraries in this project: ncurses/pdcurses, libpcap/npcap, google test, google mock, boost_thread & boost program_options have to be imported properly and based on platform (only windows and linux officially supported)

Source files need to be found in their subfolders instead of it being a long list of linker files like it is now

Source files need to be automatically included for the unittest target

Doxygen needs to be able to be generated

Doxygen and Unittest building is optional

Bonus points if you add automatic file formatting through clang format.

The different libraries in this project: ncurses/pdcurses, libpcap/npcap, google test, google mock, boost_thread & boost program_options have to be imported properly and based on platform (only windows and linux officially supported)
Now added a cmake subfolder for finding modules, this improved the file a little bit already

The different libraries in this project: ncurses/pdcurses, libpcap/npcap, google test, google mock, boost_thread & boost program_options have to be imported properly and based on platform (only windows and linux officially supported)
Now added a cmake subfolder for finding modules, this improved the file a little bit already


Labeled maps, set and records

Suggestion
Following on the idea of labeled tuples and parameter names, would it be possible to label Map, Set and Record?
Use Cases
It would help to communicate the intent of the different parts.
Examples
Map<tabId: number, annotationCount: number>
Record<tabId: number, annotationCount: number>
Set<tabId: number>
Checklist
My suggestion meets these guidelines:

[ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[ ] This wouldn't change the runtime behavior of existing JavaScript code
[ ] This could be implemented without emitting different JS based on the types of the expressions
[ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[ ] This feature would agree with the rest of TypeScript's Design Goals.

I'm always using comments to say what the key and what the value means. This could absolutely help make the intent clearer.


Fix filter_stats

Summary
This PR addresses the bug found in https://github.com/LLNL/thicket/issues/147. The fix leverages the old_to_new mapping created in squash to synchronize the node objects in the statsframe.dataframe with the graph and dataframe. This introduces a new capability in Thicket.squash to update the statsframe instead of creating a new one every time (new_statsframe=False/True). Additionally, a utils function is added and called in filter_stats to check for the invalid state observed in the bug. This PR also migrates hatchet squash code to Thicket squash to expose the old_to_new object and is a part of a decoupling effort for Thicket dependencies on Hatchet.
Example output from the utility:

depends on https://github.com/LLNL/hatchet/pull/121

@michaelmckinsey1 Can you fix conflicts in thicket.py?


Change UA to Gecko on Windows 10. fix #46

It seems to work well on my machine.
But I'm not sure, because I don't know why Waterfox UA is used.

Sorry, my test was broken (maybe cache problem).
This PR remove tha banner, but make another banner...


Add logging for PowerRename

Move call tracer to common/utils/logger
Add logging to both PowerRename dll and PowerRenameUIHost
Add PowerRename to BugReportTool event viewer collection
Summary of the Pull Request
What is this about:
Logging general PowerRename logic. Not logging any file names to avoid collecting sensitive user data.
What is include in the PR:
How does someone test / validate:
Quality Checklist

[X] Linked issue: #14181
[ ] Communication: I've discussed this with core contributors in the issue.
[ ] Tests: Added/updated and all pass
[ ] Installer: Added/updated and all pass
[ ] Localization: All end user facing strings can be localized
[ ] Docs: Added/ updated
[ ] Binaries: Any new files are added to WXS / YML

[ ] No new binaries
[ ] YML for signing for new binaries
[ ] WXS for installer for new binaries

Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.

@stefansjfw
There is another list for bugreport on compat flags method. Dont ask me how it's called.

@stefansjfw
Are unhandled exceptions in code/execution logged too?

@stefansjfw There is another list for bugreport on compat flags method. Dont ask me how it's called.
See #11561.
@jaimecbernardo Can you plz block merging for this PR. Thanks.

@htcfreek Let's do this one first then:
https://github.com/microsoft/PowerToys/pull/14269

Are unhandled exceptions in code/execution logged too?
I'll go through code and check out what could throw and add logs

Now that #14296 is merged we can fix conflicts here, review it and unblock/merge it.

Now that #14296 is merged we can fix conflicts here, review it and unblock/merge this PR.

Done. Let's do another round of review before merging.

Can try it tomorrow. Maybe I get logs for #14180.

Can try it tomorrow. Maybe I get logs for #14180.

That would be great, as I can't repro that one. Thanks!

Can try it tomorrow. Maybe I get logs for #14180.

That would be great, as I can't repro that one. Thanks!

Are there any dev builds I can install without needing to build the installer?

Can try it tomorrow. Maybe I get logs for #14180.

That would be great, as I can't repro that one. Thanks!

Are there any dev builds I can install without needing to build the installer?

No, but you can run PowerRename directly but setting PowerRenameUIHost as a startup project. If you want to include items to rename , just add path here:
https://github.com/microsoft/PowerToys/blob/main/src/modules/powerrename/PowerRenameUIHost/PowerRenameUIHost.cpp#L55

@stefansjfw
The log is correctly saved to the log folder.
There is a bug in the logging feature. I could reproduce the crash in #14180 and there is no exception in log file.

@stefansjfw The log is correctly saved to the log folder. There is a not logged crash. I could reproduce the crash in #14180 and there is no exception in log file.

Well, I added exception logging where I was expecting them.. :) This shouldn't have happened there,

@stefansjfw The log is correctly saved to the log folder. There is a not logged crash. I could reproduce the crash in #14180 and there is no exception in log file.

Well, I added exception logging where I was expecting them.. :) This shouldn't have happened there,

I am okay with what we have.


OH - Timestamp Offset Failures

ReportStream team learned from SimpleReport users that SR results may not be reaching OH-DOH via RS. Upon further inquiry with OH-DOH, it was found that OH has concerns with the timestamp contained in RS messages.
It seems OH may not be able to work with the UTC offset that is currently part of our messages.
Example message where OH has concerns: a108cdd5-a97b-4a16-b529-5910e260fd5a
OBR|1|a108cdd5-a97b-4a16-b529-5910e260fd5a^CAA East Liverpool Campus Building #1 ^36D0709053^CLIA|a108cdd5-a97b-4a16-b529-5910e260fd5a^CAA East Liverpool Campus Building #1 ^36D0709053^CLIA|95409-9^SARS-CoV-2 (COVID-19) N gene [Presence] in Nose by NAA with probe detection^LN^^^^2.68|||202111301827+0000|202111301827+0000||||||||1124469408^Sharma^Abhay^^^^^^NPI&2.16.840.1.113883.4.6&ISO^^^^NPI|(330)424-5686^WPN^PH^^1^330^4245686|||||202111301842+0000|||F
OBX|1|CWE|95409-9^SARS-CoV-2 (COVID-19) N gene [Presence] in Nose by NAA with probe detection^LN^^^^2.68||260373001^Detected^SCT|||A^Abnormal (applies to non-numeric results)^HL70078^^^^2.7|||F|||202111301827+0000|36D0709053^CAA East Liverpool Campus Building #1 ^CLIA||Accula SARS-Cov-2 Test_Mesa Biotech Inc._EUA^Accula SARS-Cov-2 Test*^99ELR^^^^2.68^^Accula SARS-Cov-2 Test_Mesa Biotech Inc._EUA||202111301842+0000||||CAA East Liverpool Campus Building #1 ^^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^36D0709053|16480 Saint Clair Ave^^East Liverpool^OH^43920^^^^39029
SPM|1|a108cdd5-a97b-4a16-b529-5910e260fd5a&CAA East Liverpool Campus Building #1 &36D0709053&CLIA^a108cdd5-a97b-4a16-b529-5910e260fd5a&CAA East Liverpool Campus Building #1 &36D0709053&CLIA||445297001^Swab of internal nose^SCT^^^^2.67||||53342003^Internal nose structure (body structure)^SCT^^^^2020-09-01|||||||||202111301827+0000|20211130182706.0000+0000
Another message from a different lab that is fine for OH:
OBR|1||8885a219-5829-4d10-8171-7f9414d42fef^eMed^2.16.840.1.113883.3.2611^ISO|94558-4^SARS-CoV-2 Ag Resp Ql IA.rapid^LN^94558-4^SARS-CoV-2 (COVID-19) Ag [Presence] in Respiratory specimen by Rapid immunoassay^L|||20211129000000|||||||||1922607886^Magistri^Marco^^^^^^NPI&2.16.840.1.113883.4.6&ISO^^^^NPI|^WPN^PH^^1^888^7955826|||||20211129114906|||F|
OBX|1|CWE|94558-4^SARS-CoV-2 (COVID-19) Ag [Presence] in Respiratory specimen by Rapid immunoassay^LN^94558-4^SARS-CoV-2 (COVID-19) Ag [Presence] in Respiratory specimen by Rapid immunoassay^L||260373001^Detected^SCT|||A^Abnormal^HL70078|||F|||20211129000000|||BinaxNOW COVID-19 A#^^99ELR||20211129114906||||eMed Labs, LLC^D^^^^CLIA&2.16.840.1.113883.4.7&ISO^XX^^^10D2194742|990 Biscayne Blvd^Suite 1501^Miami^FL^33132^USA^B|
NTE|1|L|BinaxNOW COVID-19 Ag Card Home Test_ Abbott Diagnostics Scarborough, Inc._EUA|
SPM|1|^8885a219-5829-4d10-8171-7f9414d42fef&eMed&2.16.840.1.113883.3.2611&ISO||258500001^Nasopharyngeal swab^SCT|||||||||||||20211129000000|20211129114906|

@MauriceReeves-usds @RickHawesUSDS OH raised an issue similar to WA with the time offset. OH reports that removing the offset solves the issue.
No next steps or timeline has been promised yet to OH.

Blocked by https://app.zenhub.com/workspaces/onboarding--operations-6166edbd409257001e09f1b2/issues/cdcgov/prime-reportstream/3243

@MauriceReeves-usds with the fix for WA created, can we do the same for OH and IL as well?


Allow shaders to be accidentally specified with trailing .oso

One way you could bump into this is if you
testshade ... test.oso

it would complain about the shader not being found.

LGTM


Move to Pigeon for native code generation

Android native uses pigeon
iOS native uses pigeon

This implements https://github.com/EXXETA/Flutter-Security-Toolkit/issues/18

lgtm


nrf: nrf_power_gpregret2_get: u32_t or u8_t

Dear All,
I'm not really sure if this CAN be enhanced, but I wonder why nrf_power_gpregret2_set and nrf_power_gpregret2_get handle a uint8_t - shouldn't that be u32_t?
At least in the doc it seems it has 4 bytes

Each of these registers can hold only an 8-bit value. The registers occupy 32-bit locations but only lowest 8 bits in each is implemented. See for instance the documentation for nRF52840 (row "ID" in the table, only bits marked with A are implemented).

At least in the doc it seems it has 4 bytes

Did you find any other information suggesting that these registers can hold 32-bit values?

Understood.
Well, I‘ve seen a few posts (by users) in DevZone which are stating that they‘re 32bit.
However, can be closed :)


[Idea] Simple generation of data with some fixed values

Some time ago I created a library we use internally which also sits on top of Bogus. It is broadly very similar to AutoBogus, but AutoBogus is better and more comprehensive. In fact we have migrated the internals of the library to AutoBogus recently.
One thing though that we have is the ability to generate data via a delimited string, where fields that are in the string use the values from the string, but everything else is auto generated.
e.g.
The string looks like this
var testData =
    " Name | DateOfBirth \r\n" +
    " X    | 2000-01-01 \r\n" +
    " Y    | 1987-02-03 ";

and is used like this
var people = generator.CreateData(testData );

We find this useful in some unit tests, because the tests can succinctly set up their test data and they only need to set up the values they care about. It is easier to see at a glance the test data.
Anyway, I am mentioning it because I wanted to share it and I wanted to get your opinion on it and where it should live. Should it be a separate nuget package, and if so what should I call it?
e.g. it could be used like new AutoFaker<Person>().CreateData();
Thanks
Ian

I've created a PR showing how it works
https://github.com/nickdodd79/AutoBogus/pull/64

Hey @Ian1971
Thanks for your contribution. I have just pushed 2.13.0 which includes you template PR 👍
Nick.

@nickdodd79
Just noticed the docs you added are missing the new lines, so it would fail.

Hey @Ian1971
Because the string starts with @ it honors the new lines. I also have a test in the playground to check this above worked.
https://github.com/nickdodd79/AutoBogus/blob/8c182f937b65719e7b59bc479546caf3a97fc135/src/AutoBogus.Playground/TemplateFixture.cs#L1-L42
Nick.

Brilliant. I never knew that. That makes our usages tidier.
On Mon, Mar 15, 2021 at 8:31 PM Nick Dodd @.***> wrote:

Hey @Ian1971 https://github.com/Ian1971
Because the string starts with @ it honors the new lines. I also have a
test in the playground to check this above worked.
https://github.com/nickdodd79/AutoBogus/blob/8c182f937b65719e7b59bc479546caf3a97fc135/src/AutoBogus.Playground/TemplateFixture.cs#L1-L42
Nick.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/nickdodd79/AutoBogus/issues/63#issuecomment-799730618,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACN2SK5PC3AA5Q5J4U27GLTDZVBBANCNFSM4X4LYLCA
.


Issue with k8s.io/docs/tutorials/kubernetes-basics/create-cluster/cluster-interactive/

Trying simple kubectl commands is giving an error:
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-18T16:12:00Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?

Thanks for reporting this
/kind bug
/label team/katacoda

Hi @kenahoo it's working fine got the output as
kubectl version Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.4", GitCommit:"e87da0bd6e03ec3fea7933c4b5263d151aafd07c", GitTreeState:"clean", BuildDate:"2021-02-18T16:12:00Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-13T13:20:00Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
kubectl get nodes NAME       STATUS   ROLES                  AGE   VERSION minikube   Ready    control-plane,master   41s   v1.20.2

@kenahoo So in that case would you mind to close this issue.


Is it possible and should I set parallel_requests on Geocoder whe using Maxmind (Rails 4/geocoder/maxmind)

I have opted for Maxmind among Geocoder's choices to do ip lookup (given ip i find the country):
/config/initializers/geocoder.rb
Geocoder.configure({
    ip_lookup: :maxmind,
    :maxmind => { :service => :country },
    :api_key => ENV['MAXMIND_APIKEY'],
    # this is very important option for configuring geocoder with API key
    :use_https => true,
    # geocoding service request timeout, in seconds (default 3):
    timeout: 3,
    # use cache in order not to send every page load a request to maxmind
    cache:  Rails.cache
})

I saw that when people use directly a Maxmind ruby gem , they have the option of setting the option parameter parallel_requests : see http://www.rubydoc.info/gems/geoip2/frames
I haven't seen anything about how to set concurrent requets. Should I do it ? how?
Can i just add this to my initializer like below?
Geocoder.configure({
 parallel_requests: 5
})

thanks

The way to do this is just to configure the gem as shown in the geoip2 documentation. I think adding such configuration to geocoder is overkill.

Hi I'm a newbie and don't really understand.
Could you be more explicit?
I'd like to continue using in my files geocoder great functions and methods.

So do you mean I have to use geocoder gem , but also AT THE SAME TIME add geoip gem to my gem file and in that case inside geoip configure, set
{ parallel_requests: 5 }.
Would these parameters apply on my existing codes where I use geocoder country methods ?

or do you mean i should remove geocoder gem and replace it by geoip gem (and in that case use geoip methods), if I want to use { parallel_requests: 5 }.

or do you mean I can actually use { parallel_requests: 5 }. directly inside Geocoder.configure ?

thanks for your help
M.

Sorry, I think I misunderstood how the parallel requests worked in the geoip2 gem. Basically that configuration is not relevant to Geocoder as it has no parallel lookup feature. If you want to do parallel lookups you'll have to execute multiple requests at the same time (in multiple threads, or whatever).

SoThanks for your answer. It means i can't use use { parallel_requests: 5 }. directly inside Geocoder.configure so what way could I use geoip's parralel requets configuration while keeping using geocoder cool methods i already use in my code ? is it possible to use both at the same time ?


Security notification: Heapless crate use after free

https://github.com/foresterre/cargo-msrv/security/dependabot/1

Fixed by #423


load optional shared JavaScript helper functions from dashboards.js

Resolves: #14

Thanks for this! Are we considering merging it?

@skfarhat Can you give this PR a try?
You can define an external JavaScript file in utils.path in dashboards.yaml and then access it via utils.xxx(), for example:
dashboards.yaml
dashboards:
- name: Overview
  panels:
  - title: Example
    type: html
    script: |
      return utils.hello_world();

utils:
  path: utils.js

utils.js
function hello_world() {
  return "hello world";
}

return { hello_world };

Just did and it works, thanks!

Thanks for checking!


LDAP/AD Authentication and custom role mapping

How do we enable LDAP/AD authentication for shield and add custom role mapping?

To configure AD for x-pack security please have a look at: https://www.elastic.co/guide/en/x-pack/current/active-directory-realm.html. The corresponding documentation for LDAP can be found under: https://www.elastic.co/guide/en/x-pack/current/ldap-realm.html. Please note that shield is now called x-pack security, post 5.0.0.
If you don't want to build your own image based on the Dockerfile, you can create a custom elasticsearch.yml as well as your custom role mapping file (role_mapping.yml) and map those inside the container using a volume bind mount. So you'd need to create and distribute your role_mapping.yml and elasticsearch.yml file on the hosts and mount those inside the containers using -v <path_to_yml_files>/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml and -v <path_to_yml_files>/role_mapping.yml:/usr/share/elasticsearch/config/x-pack/role_mapping.yml -- you'll need to check the documentation of your docker orchestration framework on how to do volume mounts.
Depending on how static your configuration is, you may wish to use the Dockerfile as a basis, build your own images and bake in your own elasticsearch.yml and role_mapping.yml files with COPY commands -- just make sure they end up in the right directory under /usr/share/elasticsearch/config after as shown above.
Hope that helps!

Closing to keep things tidy. Please re-open if you need any more help.


[Gekidou MM-45792] Remove recent searches title if there are no recent searches for the team.

Summary
This PR adds a check to see if the current team has any recent searches and if there are none, the Title and divider are removed, until at least one stored search is available. the there are no recent searches for the team, return null.
Ticket Link
https://mattermost.atlassian.net/browse/MM-45792
Checklist

[ ] Added or updated unit tests (required for all new features)
[ ] Has UI changes
[ ] Includes text changes and localization file updates
[ ] Have tested against the 5 core themes to ensure consistency between them.

Device Information
This PR was tested on:
Screenshots
Before:

After:

Release Note

NONE

I'm not sure this is the correct method, because the RecentSearches component will render, but will return null.  The other alternative would be to get the recent searches in the parent component Searches and then pass them as props to RecentSearches.  Searches could then check recentSearches.length to determine if it should mount the RecentSearches component.  The current method is nice because the RecentSearches component values are observed and reduce the amount of extra logic needed in the parent Searches component.
Any feedback on this would be appreciated.

I'm not sure this is the correct method, because the RecentSearches component will render, but will return null. The other alternative would be to get the recent searches in the parent component Searches and then pass them as props to RecentSearches. Searches could then check recentSearches.length to determine if it should mount the RecentSearches component. The current method is nice because the RecentSearches component values are observed and reduce the amount of extra logic needed in the parent Searches component.
Any feedback on this would be appreciated.

Here's my thought on it.
The parent (Search) should call this child component if there's something to show and to do that we just observe the query at this level.
The child component (RecentSearches) should only care about the display+logic when there is 'data'.  That way, we are running this code ( although the cost of running it might be low ) to do something useful in the grand scheme of things.

I'm not sure this is the correct method, because the RecentSearches component will render, but will return null. The other alternative would be to get the recent searches in the parent component Searches and then pass them as props to RecentSearches. Searches could then check recentSearches.length to determine if it should mount the RecentSearches component. The current method is nice because the RecentSearches component values are observed and reduce the amount of extra logic needed in the parent Searches component.
Any feedback on this would be appreciated.

Here's my thought on it.
The parent (Search) should call this child component if there's something to show and to do that we just observe the query at this level.
The child component (RecentSearches) should only care about the display+logic when there is 'data'. That way, we are running this code ( although the cost of running it might be low ) to do something useful in the grand scheme of things.

This makes sense to me, although, I'm not sure of the implementation.  I added a commit that will fetch the recent searches any time teamId changes and when a new search is performed.

@larkox, I reorganized as we discussed in our zoom.  The new component Initial will get the recentSearches from the database and determine if RecentSearches should show.
I also made a slight change to RecentSearches  It needs the teamname which was getting it from the DB based on the teamID.  I now get that with the Initial component and pass it as a prop.  This allowed moving recent_searches/recent_searches.tsx to index.tsx


Write a Java program to convert miles to meters

Description
Write a Java program to convert miles to meters
1 mile = 1609 meters
Input  : 5
Output : 8046.72

How to contribute

Save the solution in program/ConvertMilesToMeters.java file
Add ConvertMilesToMeters.java file in convert-miles-to-meters folder

!assign

!assign

Hey @grraghav120, this issue is already assigned to @grraghav120 !!!
Please choose another issue.
Thanks for your interest in contributing to this project.


BUG: date_range closed keyword with timezone aware start/end (GH12684)

closes #12684

lgtm

[Current coverage][cc-pull] is 84.33%

Merging [#13510][cc-pull] into [master][cc-base-branch] will increase coverage by <.01%

@@             master     #13510   diff @@
==========================================
  Files           138        138
  Lines         51107      51111     +4
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits          43103      43107     +4
  Misses         8004       8004
  Partials          0          0

Powered by Codecov. Last updated by [bf4786a...d5744f7][cc-compare]
[cc-base-branch]: https://codecov.io/gh/pydata/pandas/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/pydata/pandas/compare/bf4786a15f51d14ccf1318e44ae080868d8595ee...d5744f7f8df643b6aaf1befeeafcd33d4ed0a831
[cc-pull]: https://codecov.io/gh/pydata/pandas/pull/13510?src=pr


fix: remove test private ssh keys from manifests

What this PR does / why we need it:
fix: remove test private ssh keys from manifests
remove all test private ssh keys from manifests, because they are triggering false positive warnings
Release note:
NONE

Thanks!
/lgtm

/approve


Reintroduce 'SleepImpl' sleep implementation

Fixes #1962.

Is this_thread::sleep_for() only broken on MinGW, or Windows in general?
One option would be to use standard implementation on those platforms where it's reliable, but I also see that this may be an unnecessary risk for bugs/regressions in the future. Maybe we should just stick to something we know to work.

Is this_thread::sleep_for() only broken on MinGW, or Windows in general?

This problem is specific to the winpthreads library that is bundled with any MinGW-w64 distribution, including MSYS2, Nuwen, and the CodeBlocks ones, which are the most popular. I don't think it's "broken", it's just not implemented optimally. For example,
a one-line change might fix the issue, but I have not tried it yet. It also seems that Visual Studio/MSVC suffers from similar issues.

One option would be to use standard implementation on those platforms where it's reliable, but I also see that this may be an unnecessary risk for bugs/regressions in the future. Maybe we should just stick to something we know to work.

I don't really know how to test reliability. I think that the latter is a better option, unless someone else wants to try other possibilities.

I did some more research and I'm not sure this PR is a good idea. Check https://github.com/SFML/SFML/issues/1962.

I did some more testing/research and this PR is probably the best way to go if we don't want to change how setFramerateLimit works.


Implementation of flush procedure added

Summary: Implementation of flush procedure
Type: Feature
Test Plan: Unittests, Component Tests, YT Conformance Tests
Jira: RIALTO-264

https://jenkins.code.rdkcentral.com/job/github-triggered/49339/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/49343/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/49345/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/49347/ started

build-brcm-refboard2 Console Log uploaded to Gist URL: https://gist.github.com/rdkcmf-jenkins/a14e0da7732b5586011a698ee8c836c9

https://jenkins.code.rdkcentral.com/job/github-triggered/49387/ started

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/github-triggered/14425/ started

https://jenkinsrdkm.cmf.code.rdkcentral.com/job/build-component-platform/21075/ started.

build-brcm-refboard2 Console Log uploaded to Gist URL: https://gist.github.com/rdkcmf-jenkins/6d317048c7825c4cac6baf1283ceed90


Got "ERROR Local hexo not found in /github/workspace ERROR Try running: 'npm install hexo --save" message when Deploy

Error:

The solution:
Add command npm install hexo --save to entrypoint.sh, Deploy is ok.

I found though testing that after exectueing the command npm install hexo-cli -g, the hexo has been successfully installed.

Two question:

What the difference between hexo-cli and hexo? Why happen this error?
The  command npm install hexo --save need to add entrypoint.sh?

This issuse all images can display properly on your computer? by the way.

@DeppWang
1. Difference between hexo-cli and hexo

hexo-cli is a cli service for create a project. When project was created, all the things doing with hexo module.
hexo module handle project management (generate static pages, serve for preview, etc).
They just share the hexo command (hexo not means module here).

2. A potential cause of this error
Check out line 20 in your error screenshot, there is an info "removed 50 packages". Most likely the hexo module was removed by other process. So in your solution, you try to reinstalled a latest version of hexo by npm install hexo --save seems just working. This seems like an exception in early version of npm. Please refer to issue #https://github.com/npm/npm/issues/17379#issue-237805333. This is fixed as of<EMAIL_ADDRESS>Because hexo-action is built from node:13-alpine docker image, the cause of npm version can be excluded. In a new virtual machine, this error can't be reproduced. So I can just speculate that this problem may be related to the early generated package-lock.json file.
The hexo-action install dependencies by specified package-lock.json file, which may install and cache a same node module version with your local project. If your project create early, the hexo module will be locked at an early version. Referring line 19 in your error screenshot, the<EMAIL_ADDRESS>version was installed. Without specifing in package-lock.json file, it should install a @2.1.0 version for now.
If possible, you can try this solution to make this action work without duplicate module installation, STEP following:
step 1: Update your local Node.js vertion, recommends 10.0 or higher.
step 2: Check your package.json file. Remove hexo-deployer-git dependency if it is exist.
step 3: Delete your package-lock.json (or you need backup first). Then regenerate it by command npm install in your project directory.
step 4(Optional): Update your hexo to the latest version.
3. Where npm install hexo --save to add
If you want add this installation command, you need to add this into entrypoint.sh. Because docker image is built before "Checkout" step. If in dockerfile, hexo module won't be installed as your blog project node module.
By the way
If you would like to use your own branch of hexo-action, I recommend that you manually add the hexo-deployer-git and other third party dependencies into package.json file and regenerate package-lock.json locally. Then you can remove them from entrypoint.sh file and cache these dependencies before "Deploy" step.

Thanks for your reply, detailed and professional. I though 4 steps solved this issue. As your say, The main problem of this issue is the package-lock.json. Thranks again!!!


ha

Is your feature request related to a problem? Please describe.

Describe the solution you'd like:

Describe alternatives you've considered:

Additional context:

thank you


Stable 0.0.1

to 0.0.2

Pull Request Test Coverage Report for Build 30

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 98.658%

Totals

Change from base Build 7:
0.0%

Covered Lines:
294

Relevant Lines:
298

💛  - Coveralls

Pull Request Test Coverage Report for Build 30

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 98.658%

Totals

Change from base Build 7:
0.0%

Covered Lines:
294

Relevant Lines:
298

💛  - Coveralls


In ClusterStamp.json in saved searches section "traefik_entrypoint_requests_total" is used where as we are not using Traefik ingress

Hello Team,
I just noticed, in clusterstamp.v2.json if I go to the saved searches section at line 888, in query "traefik_entrypoint_requests_total" filter is used.
Please check it's still relevant to this implementation? as we are using NGINX ingress in this.
Regards,

Thank you, that was indeed an oversight after the ingress change.  I'll add it to our backlog to remove/change.

@nitinkhandelwal26 I've captured this in our internal backlog (Ref 468514), and have scheduled that change for about two weeks from now (next sprint).  I'll leave this issue open until it is resolved though.


tracker validations

I went through the Tracker model and introduced data migrations which I could think about for now. It resulted in a refactoring of a huge number of tests as they used trackers without all the necessary context set and not all was easy to be done through the factories.
Closes OSIDB-787

@Elkasitu thank you for the review! All should be updated according to your feedback.


Final EUSS journey (v4) merged into master branch

Is the thinking with title, to use Mr specifically for EUSS, but still Master for all other child applications?

@enoranidi Before I merge this in, please can the following be updated?

Mr title back to Master for all child applications, including EUSS.
Playback I don’t know, instead of Unknown for the EUSS question in the summary page.
Parents’ information back to Parents’ documents on the documents page.


Reduce syscalls

Context
Syscall overhead is a major performance bottleneck, especially in high-throughput environments. We can reduce this overhead by batching (as discussed in #11), but this in turn increases latency.
Are there any technologies we could use to improve this?
To research

io_uring
AF_XDP
Kernel bypass

A good starting point here would be to run strace or get a flamegraph going to understand what syscalls we're doing most and how much time is spent on them. my intuition is that for network I/O the default epoll implementation will be hard to beat with io_uring, but I'm curious as well!


Printing at Highest quality results in black background with raster layer

On Windows, when printing at Highest Quality (using defaults for other print settings), instead of a white background, a black background is rendered in the Image, HTML, and PDF options.  Using Higher and Standard resolution correctly renders a white background.
To test, turn on the Weather Radar layer in the demo and do Print.

So I can confirm your result, but can also confirm there is no bug. The error message that is generated is:
WMS server error. Image size out of range, WIDTH and HEIGHT must be between 1 and 2048 pixels.
This is simply a server build issue - if the server were compiled to generate images that go to say, 4000 pixels, this error would not occur.

Future item might be to automatically tile the layer for the printout when
this happens.
(If the WMS server is MapServer there is a MAXSIZE parameter in the mapfile
that can be adjusted.)
On May 18, 2016 13:42, "TC Haddad"<EMAIL_ADDRESS>wrote:

So I can confirm your result, but can also confirm there is no bug. The
error message that is generated is:
WMS server error. Image size out of range, WIDTH and HEIGHT must be
between 1 and 2048 pixels.
This is simply a server build issue - if the server were compiled to
generate images that go to say, 4000 pixels, this error would not occur.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/geomoose/geomoose/issues/148#issuecomment-220120451

Sounds like a good approach.


Add support for mocked events

As mentioned in the issue #6, right now:
isKeyHotkey('enter', { key: 'Enter' })

returns false. This PR fixes this use case to return true.

Thanks @czechdave!


rspack "process not defined" error when trying to use process.env

Currently the rspack plugin seems not to support process out of the box, so the normal configuration approach of .env files in Nx does not work.

Currently the rspack plugin seems not to support process out of the box, so the normal configuration approach of .env files in Nx does not work.

https://www.rspack.dev/guide/language-support.html#node-polyfills

I stumled upon the same problem. The env files are read properly, but the define plugin is missing.
My workaround:
const defines = {}
  Object.keys(process.env).forEach(function(key) {
    if(key.startsWith("NX_")) {
      defines['process.env.' + key] = JSON.stringify(process.env[key])
    }
  });
  config.plugins.push(new rspack.DefinePlugin(defines))

This will replace all process.env.NX_* variables in the frontend code.


[DOCS] Describe the role of use_proxy_proto: true in Envoy sample config 👺👺👺

Hi there.
In a quest to make Limitador working on OpenShift, I have spent some good hours trying to understand what I was doing wrong in adapting the kubernetes example.
It turned out that the source of the issue was use_proxy_proto: true !!!
I've searched in your repo and I have found a reference to that in the kind setup script: https://github.com/3scale-labs/limitador/blob/ace7dd773300b8ab76d95a528380dd3cf53a531e/limitador-server/script/kind-setup.sh
My suggestion would be to mention it's role explicitly in the docs with the correct setting required.
FWIW, this is the output from curl when the flag is set to true:
curl: (52) Empty reply from server

The instructions that we have in https://github.com/3scale-labs/limitador/tree/master/limitador-server/kubernetes describe how to deploy on AWS via an ELB. In that case, use_proxy_proto needs to be set to true as specified in the Envoy docs:

use_proxy_proto
(BoolValue) Whether the listener should expect a PROXY protocol V1 header on new connections. If this option is enabled, the listener will assume that that remote address of the connection is the one specified in the header. Some load balancers including the AWS ELB support this option. If the option is absent or set to false, Envoy will use the physical peer address of the connection as the remote address.

That's why it's set to true in the templates, but in the script that uses Kind is set to false.
I agree that this should be documented in the README linked above.


Update FastAPI version constraint

Adjusted the version range for FastAPI in pyproject.toml to "<0.116.0" to ensure compatibility with future releases. Updated the content hash in poetry.lock to reflect this change.

Pull Request
Description
The highest version of fastapi has been restricted to 115.2 in the pyproject.toml, it is not allowed to upload at least the patch version
Changes Made
We updated the constraint of the fastapi version in the toml to any version below 0.116.0
fastapi = ">=0.88.0,!=0.89.0,<0.116.0"
Related Issues
fixes https://github.com/SeldonIO/MLServer/issues/1953
Screenshots (if applicable)
N/A
Checklist

[ ] Code follows the project's style guidelines
[ ] All tests related to the changes pass successfully
[ ] Documentation is updated (if necessary)
[ ] Code is reviewed by at least one other team member
[ ] Any breaking changes are communicated and documented

Additional Notes


Find a third party API to use

going to use opentdb for this api.  pretty simple to use and can use random as an option for end point.


[Website Component] Back to top button

Need Back to top button like below for users to go back up to top of page at any point in the scroll. We can follow DL design exactly.

What icon should we use for this? I only see this one in our library which is different from IDL.


deps: Don't include pybind if ZSWAG_BUILD_WHEELS is not set.

Changes
It's seems that the pybind dependency is only needed when zswag is instructed to build wheels - therefore I have included the option in the condition for including pybind.

Oops, thanks!


Scan job migrate

Coverage decreased (-3.05%) to 57.659% when pulling b8ec419c8e6647bd4ec2378fe04427900275fb76 on reasonerjt:scan-job-migrate into 5edbd0031832c0c9c30b0269a8de72c60d9d3be6 on vmware:master.


Broken Link in MLIR docs

URL(s) with the issue:
https://www.tensorflow.org/mlir

MLIR on GitHub box link is broken. That link is pointing https://github.com/llvm/llvm-project/tree/master/mlir that returns 404. I think https://github.com/llvm/llvm-project/tree/main/mlir is valid link.

@jeongukjae
Created a PR to fix this issue, this issue will be closed once the PR is merged.


0.16.0 panics on M1 when RapierDebugRenderPlugin added to app

Adapter:
2022-08-14T20:35:56.908864Z  INFO bevy_render::renderer: AdapterInfo { name: "Apple M1", vendor: 0, device: 0, device_type: IntegratedGpu, backend: Metal }

Error message:
2022-08-14T20:35:57.080977Z ERROR wgpu::backend::direct: Shader translation error for stage VERTEX | FRAGMENT | VERTEX_FRAGMENT: new_render_pipeline_state: "depthAttachmentPixelFormat is not valid and shader writes to depth"
2022-08-14T20:35:57.080985Z ERROR wgpu::backend::direct: Please report it to https://github.com/gfx-rs/naga
2022-08-14T20:35:57.080991Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default
thread 'main' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_render_pipeline
    Internal error in VERTEX | FRAGMENT | VERTEX_FRAGMENT shader: new_render_pipeline_state: "depthAttachmentPixelFormat is not valid and shader writes to depth"

Hi! This was reported in #230 and #226. Fixed by #235.
Please reopen if the problem persists when using the master branch.


Shutdown request causes a crash

Hey,
I started using rust-analyzer with emacs yesterday and there's a crash happening during shutdown request. Which is particularly annoying because lsp-mode asks me to restart the lsp and doesn't close the app till I answer.
Output from lsp-mode:
LSP :: rust-analyzer:723118 initialized successfully
LSP :: rust-analyzer has exited (exited abnormally with code 101)
LSP :: Sending to process failed with the following error: Process rust-analyzer not running

rust-analyzer bt indicating that it crashes in lsp-server:
thread 'main' panicked at 'Invalid request
Method: shutdown
 error: invalid type: map, expected unit', /rustc/5c1f21c3b82297671ad3ae1e8c942d2ca92e84f2/src/libstd/macros.rs:16:9
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1076
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1537
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:198
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:218
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:486
  11: rust_begin_unwind
             at src/libstd/panicking.rs:388
  12: std::panicking::begin_panic_fmt
             at src/libstd/panicking.rs:342
  13: lsp_server::msg::Request::extract::{{closure}}
  14: lsp_server::msg::Request::extract
  15: rust_analyzer::main_loop::<impl rust_analyzer::global_state::GlobalState>::on_request
  16: rust_analyzer::main_loop::<impl rust_analyzer::global_state::GlobalState>::handle_event
  17: rust_analyzer::main_loop::<impl rust_analyzer::global_state::GlobalState>::run
  18: rust_analyzer::main_loop::main_loop
  19: rust_analyzer::main
  20: std::rt::lang_start::{{closure}}
  21: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
  22: std::panicking::try::do_call
             at src/libstd/panicking.rs:297
  23: std::panicking::try
             at src/libstd/panicking.rs:274
  24: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  25: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  26: main
  27: __libc_start_main
  28: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Process rust-analyzer stderr finished

Request that I assume crashed it:
[Trace - 06:19:30 ] Sending request 'shutdown - (4)'.
Params: {}

Happens with both latest release and e96bfd8.
It seems that the issue comes from the fact that lsp-mode sends Params: {} in shutdown request. Similar issue was documented in rls (https://github.com/rust-lang/rls/blob/master/rls/src/server/mod.rs#L532).

I did some more digging, apparently they send {} instead of null for reasons stated here: https://github.com/emacs-lsp/lsp-mode/pull/1074 while https://www.jsonrpc.org/specification proposes that params may be omitted instead.
I fixed this by changing the definition in lsp-types to:
impl Request for Shutdown {
    type Params = Option<serde_json::Map<String, serde_json::Value>>;
    type Result = ();
    const METHOD: &'static str = "shutdown";
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_shutdown_deserialize() {
        use serde_json::json;

        serde_json::from_value::<<Shutdown as Request>::Params>(json!(null))
            .expect("Expected success");

        serde_json::from_value::<<Shutdown as Request>::Params>(json!({}))
            .expect("Expected success");
    }
}

I have not tried a client that sends a null so my above representation may be incorrect.
If this solution is acceptable, I can make a PR to lsp-types and then bump the version here.

The LSP spec says that it should be void which i think means "not present". See: https://microsoft.github.io/language-server-protocol/specification#shutdown
You may want to raise the issue in the language-server-protocol repo.

@kjeremy "not present" does not work for RA too. Please see https://github.com/rust-analyzer/lsp-server/pull/17

same issue here, exactly the same error (after updating my lsp-mode ...)
thanks @DanielChabrowski for submitting this issue!

I can't reproduce this in my Emacs. @DanielChabrowski is this still happening?

I just started experiencing something very similar to this, but not specifically during shutdown.
When opening any .rs file, I get: LSP :: rust-analyzer has exited (exited abnormally with code 101) (in the *Messages* buffer).
rust-analyzer version: 20201221-1 (on Arch Linux).
I've got the latest versions of Rust installed via rustup update as of today:
stable-x86_64-unknown-linux-gnu - Up to date : 1.48.0 (7eac88abb 2020-11-16)
nightly-x86_64-unknown-linux-gnu - Up to date : 1.50.0-nightly (11c94a197 2020-12-21)

Not much else to go on.

@joncol having the same issue on Arch Linux after upgrading to rust-analyzer - 20201221-1.
If you still have the old package in your cache (/var/cache/pacman/pkg/) you can downgrade to version 20201214-1, which works just fine.

@joncol having the same issue on Arch Linux after upgrading to rust-analyzer version 20201221-1.
If you still have the old package in your cache (/var/cache/pacman/pkg/) you can downgrade to version 20201214-1, which works just fine.

I'll do just that, thanks for the tip. Do you think a new issue should be opened, or?

That's probably #6979.