Update readme and contribution guidelines

This new format is intended to tie the various aspects of the .NET SDK together into a cohesive whole. Additionally, these changes make the landing pages more visual and accessible, with a goal of better showcasing our excellent SDK resources.
Also, this change updates the contribution guidelines doc to match the formatting in other repos.

This is a great improvement. Consider applying some of the feedback from similar PRs in other repos where appropriate.


Rename LifeCycle Manager PRE and POST CallOuts

Currently the CallOuts in the LifeCycle Manager are named as PREand POST. I would like them to be renamed as

OnActionExecuting (as a replacement for PRE)
OnActionExecuted (as a replacement for POST)

@rufer7 What do you think? I am of the opinion that this is more self-explanatory. This is low priority, but pls have a look into it, on how to solve it.

@dfch I agree that the naming proposal you did is more self-explanatory. I'll rename it. Should not be a big issue.


Add test deployment link in pull_request_template.md

Is your feature request related to a problem? Please describe.
It has been observed many time that contributor make changes but do not provide deployment link for testing
Describe the solution you'd like
Add this heading in pull_request_template.md inside .github folder
Deploy your changes to github page or netlify and mention deployment link:
Additional context
none

Can I add this under LGMSOC?


Added possibility to ignore leaks in browser usage

Hi,
I refactored the run method to handle options. Doing so I moved the currently passed Reporter to the options and also added the possibility to ignore leaks via the options object.
In the browser you can now use the following:
<script>
  $(function() {
    mocha.run({
      ignoreLeaks: true
    })
  })
</script>

With best regards,
Sascha Depold

I think whitelisting globals is a much better option.

well I'm not 100% sure what exactly my problem is, but i guess my problem is the getJSON method of jquery. it seems to do a jsonp request which obviously generates a global function like  jQuery16405157153122127056_1331042016658. And of course this numbers are random for each request. So it's actually pretty hard to define the right whitelist :)

Yeah, I think we need the option of a function that can act as a filter on those.
Your tests would be a ton better if instead of ignoring all globals you could ignore jQuery* ones.

True, that would also help a lot :) But as you have this option for the command line tool, it might be cool to also support it in the browser?

Sure but the implementation would be setting a false lambda for that filter function option.

Sooooo, any chance to get this merged?


Add EventBridge Resources

Description of your changes
Added resources -

aws_cloudwatch_event_api_destination
aws_cloudwatch_event_archive
aws_cloudwatch_event_bus
aws_cloudwatch_event_bus_policy
aws_cloudwatch_event_connection
aws_cloudwatch_event_permission
aws_cloudwatch_event_rule
aws_cloudwatch_event_target

Fixes #167
I have:

[x] Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Deployer resources to a local kubernetes cluster setup(rancher-desktop) with AWS Account credentials for provider setup, and ran make run to run the controller locally to test created resources

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

/test-examples="examples/events/*.yaml"

/test-examples="examples/events/*.yaml"

/test-examples="examples/events/bus.yaml"

/test-examples="examples/events/bus.yaml"

@jeanduplessis Hey! Could my PR be approved  for running workflows? Can't seem to run uptest otherwise
Thanks!

/test-examples="examples/events/*.yaml"

/test-examples="examples/events/bus.yaml"

/test-examples="examples/events/bus.yaml"

@jeanduplessis Could you approve the workflow and re-run the test command?
I've pushed some changes which hopefully fixes the tests

/test-examples="examples/events/*.yaml"

@jeanduplessis Could you approve the workflow once again? Thanks!

/test-examples="examples/events/*.yaml"

@jeanduplessis Could you trigger the workflow? Got the last two failing resources working on the e2e test locally
Need to check if it'd pass this time on GitHub
Thanks!

/test-examples="examples/events/*.yaml"

/test-examples="examples/events/*.yaml"

@jeanduplessis The examples path has been updated to /test-examples="examples/cloudwatchevents/*.yaml"

/test-examples="examples/cloudwatchevents/*.yaml"

Hello @zeresius could you please rebase your change (instead of merging master)? I hope that the report-breaking-changes job will pass after that

Hello @zeresius could you please rebase your change (instead of merging master)? I hope that the report-breaking-changes job will pass after that

@ezgidemirel Rebased and the that resolved the broken CI job


Can you provide an example for functional API?

How to use coral_ordinal (CoralOrdinal, OrdinalCrossEntropy, MeanAbsoluteErrorLabels) with the functional API rather then sequential model?

No problem, added this to the MNIST example in the Colab notebook:
https://colab.research.google.com/drive/1AQl4XeqRRhd7l30bmgLVObKt5RFPHttn?#scrollTo=PAg-gWZED1mR
Cheers,
Chris

Oops, referenced the wrong issue in my commit - should have tagged #1


Add civil asset forfeiture investigation blog

Adds a blog post pointing people to the data archive and the Reader article as well as some thanks to people that have been helping us. This PR also updates our project page to link to the Reader article and the data archive.

Looks great. Thanks for blogging it comrade. I was going to do it and you saved me some labor 👍🏾


Feature/issue 732 comment

Adding comment to markets role
Before

After

Codecov Report

Merging #1114 (2d832e1) into main (2201b2e) will increase coverage by 7.42%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1114      +/-   ##
==========================================
+ Coverage   68.40%   75.82%   +7.42%
==========================================
  Files          18       30      +12
  Lines         269      484     +215
  Branches       25        0      -25
==========================================
+ Hits          184      367     +183
- Misses         75       97      +22
- Partials       10       20      +10

Impacted Files
Coverage Δ

...ce/DataHub.WebApi/Controllers/ChargesController.cs
27.77% <0.00%> (-5.56%)
:arrow_down:

...Api/Controllers/MarketParticipantControllerBase.cs
0.00% <0.00%> (ø)

...stration/JwtTokenSecurityRegistrationExtensions.cs
46.66% <0.00%> (-53.34%)
:arrow_down:

...gistration/HealthEndpointRegistrationExtensions.cs
36.84% <0.00%> (-42.11%)
:arrow_down:

...WebApi/RequireNonNullablePropertiesSchemaFilter.cs
80.00% <0.00%> (-8.00%)
:arrow_down:

apps/dh/api-dh/source/DataHub.WebApi/Startup.cs
93.90% <0.00%> (ø)

...ntegration/Controllers/WholesaleControllerTests.cs
100.00% <0.00%> (ø)

...rce/DataHub.WebApi.Tests/Fixtures/WebApiFactory.cs
90.00% <0.00%> (ø)

...egration/Controllers/ChargeLinksControllerTests.cs
100.00% <0.00%> (ø)

...e/DataHub.WebApi.Tests/Fixtures/WebHostTestBase.cs
0.00% <0.00%> (ø)

... and 8 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Debounce demo doesn't work

In a local installation of the latest version of Fore, the debounce.html demo does not perform as expected. I am able to click the button and immediate trigger a message for each click, with no 800ms delay.
However, it performs as expected in the hosted version.

Tested against dev at 11.05. and working for me.
Can you check with lastest dev please?


Added Rows package and 'rows.map' function

[x] Tests pass (no build errors)
[x] Rebased/mergeable

This was a contrib function so it isn't a formal addition. I don't know how to currently deal with contrib, but if we document them, it needs to be clearly labeled as not part of the stdlib.

The documentation looks good though.


feat(CI): stubs for perf scale jobs

Description
Per title.
Checklist

[ ] Investigated and inspected CI test results

Testing Performed
Here I tell how I validated my change
Jobs run via /test. Clusters are configured appropriately. Nothing is done with them.
Reminder for reviewers
In addition to reviewing code here, reviewers must also review testing and request further testing in case the
performed one does not seem sufficient. As a reviewer, you must not approve the change until you understand the
performed testing and you are satisfied with it.

/test gke-perf-scale-tests
/test ocp-4-14-perf-scale-tests

/test gke-perf-scale-tests
/test ocp-4-14-perf-scale-tests

/test ocp-4-14-perf-scale-tests


Setting player custom data doesn't seem to be working

Unless I don't know how to use it properly?

https://makecode.com/_JdRW8oVghAM1

Okay, this is weird...this is happening in the same game when I add a callout to see who is who...

Maybe I'm not initializing the players correctly?

Looks like an off-by-one error in the player state array: https://github.com/microsoft/pxt-common-packages/blob/a0bcbbee0b53f5e443e5693996904fd9a186ac8a/libs/multiplayer/player.ts#L169
Should read
    while (this._state.length <= key) this._state.push(0);

Workaround is to write to a state key one higher than you actually want to store.

The player number thing looks like a different issue. It isn't converting to the JavaScript I would have expected. I get this:
    mp.getPlayerSprite(p4).sayText(convertToText(mp.getPlayerByNumber(number)))

What I expected:
    mp.getPlayerSprite(p4).sayText(convertToText(p4.number))

Hmm. Is there something I should be doing differently there?  I don't need it for my delivery tomorrow, but I anticipate it will come up again.

Forum user reporting the player custom data issue: https://forum.makecode.com/t/why-doesnt-my-set-player-state-work/27988/2


Customize array format for exported data (CSV)

Is your feature request related to a problem? Please describe.
Currently, CSV data with columns set as arrays of types are returned as { x, y }. Currently we've found no way of changing this so the output is [ x, y ].
Describe the solution you'd like
Add a new exporter setting to customize how to format array columns

Describe alternatives you've considered
Edit the file after the data has been exported.

Thank you for the idea

Hey @E1izabeth, I will be happy to contribute, I am proficient in java. Is this in java? if yes, can you help me understand this requirement better

Hi, @UtkarshSharma2612
Yes, DBeaver is on Java.
Here are prerequisites https://github.com/dbeaver/dbeaver/wiki/Build-from-sources#prerequisites to build the source code.
And we have guides for setting up development environment in IDEA  or [Eclipse](https://github.com/dbeaver/dbeaver/wiki/Develop-in-Eclipse IDE).
The class responsible for csv export is org.jkiss.dbeaver.tools.transfer.stream.exporter.DataExporterCSV.

Sure then let me work on it.

Sure then let me work on it.
you can assign the issue to me 😄

You can assign the issue to me 😄

We assign issues only on team members. It's enough that you stated in comments, that you're working on it.

Hey @E1izabeth just wanted to confirm my understanding about this requirement, that we need to add another option in export csv setting of arrays-format and while exporting csv handle that based on the request, correct me if I am wrong.

@UtkarshSharma2612  you're right

Thanks for taking the task!

Hi @E1izabeth, I am new to open source and I am looking for contributing. Would be happy to be a part of solving this.

@dheeru12
No one provided any Pull Request yet. So, I suppose you can work on this issue. Thank you

Hi @E1izabeth , can you please review this PR and let me know, if any changes are required


Biginners tutorial for implementation

Tutorial for Training in regard to issue (https://github.com/DBD-research-group/BirdSet/issues/177)
as we decide to make 2 seperate tutorial, this pr creat a seperate multilabel training roadmap for biginners
Roadmap

[x] import dataset
[x] prepare Data
[x] prepare trainer
[x] prepare model
[x] initialize model
[x] eval model

also please correct spelling mistakes here :)

@PariaValizadeh What is this PR about? Can you update the description?

I wrote the explanation


feat(partners): support request timeout in BaseCohere

As in #19346, this PR exposes request_timeout in BaseCohere, while max_retires is no longer a parameter of the beneath client (cohere.Client) and it is already configured in langchain_cohere.llms.Cohere.

cc @billytrend-cohere

@baskaryan @billytrend-cohere I've just resolved the conflict with master, in case you wanted to review this again :)


Logo disappears when viewing individual posts

For some reason, the logo image is not rendered when an individual post is viewed or edited. Identify the cause and fix.

Fixed by changing logo source url to static in base.hmtl


tf.train.AdamOptimizer doesn't work with custom TPU training loop

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Colab
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: n/a
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): 1.15
Python version: 3.x
Bazel version (if compiling from source): n/a
GCC/Compiler version (if compiling from source): n/a
CUDA/cuDNN version: n/a
GPU model and memory: n/a

Describe the current behavior
Run this Colab notebook with a TPU accelerator: https://colab.research.google.com/drive/1bsgSNK3aK9sETlplIPVpAa-yc4q1S3sA
When running the above notebook with tf.train.AdamOptimizer, we get:
ValueError: in converted code:

    <ipython-input-22-807c7cf92c68>:21 simple_model_fn  *
        train_op = tf.train.AdamOptimizer().minimize(y)
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/training/optimizer.py:413 minimize
        name=name)
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/training/optimizer.py:569 apply_gradients
        self._distributed_apply, args=(grads_and_vars, global_step, name))
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/distribute/distribute_lib.py:1940 merge_call
        return self._merge_call(merge_fn, args, kwargs)
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/distribute/distribute_lib.py:1947 _merge_call
        return merge_fn(self._strategy, *args, **kwargs)
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/training/optimizer.py:717 _distributed_apply
        non_slot_devices, finish, args=(self, update_ops), group=False)
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/distribute/distribute_lib.py:1577 update_non_slot
        return self._update_non_slot(colocate_with, fn, args, kwargs, group)
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/distribute/tpu_strategy.py:580 _update_non_slot
        result = fn(*args, **kwargs)
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/training/optimizer.py:713 finish
        return self._finish(update_ops, "update")
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/training/adam.py:228 _finish
        beta1_power, beta2_power = self._get_beta_accumulators()
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/training/adam.py:115 _get_beta_accumulators
        return (self._get_non_slot_variable("beta1_power", graph=graph),
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/training/optimizer.py:868 _get_non_slot_variable
        if hasattr(non_slot, "_distributed_container"):
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/distribute/values.py:827 __getattr__
        return super(TPUVariableMixin, self).__getattr__(name)
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/distribute/values.py:389 __getattr__
        return getattr(self.get(), name)
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/distribute/values.py:834 get
        return super(TPUVariableMixin, self).get(device=device)
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/distribute/values.py:324 get
        return self._device_map.select_for_device(self._values, device)
    /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/distribute/values.py:219 select_for_device
        (device, self._devices, device_util.current()))

    ValueError: Device /job:worker/replica:0/task:0/device:CPU:0 not found in ('/job:worker/replica:0/task:0/device:TPU:0', '/job:worker/replica:0/task:0/device:TPU:1', '/job:worker/replica:0/task:0/device:TPU:2', '/job:worker/replica:0/task:0/device:TPU:3', '/job:worker/replica:0/task:0/device:TPU:4', '/job:worker/replica:0/task:0/device:TPU:5', '/job:worker/replica:0/task:0/device:TPU:6', '/job:worker/replica:0/task:0/device:TPU:7') (current device /job:worker/replica:0/task:0/device:CPU:0)

This code runs just fine with tf.train.MomentumOptimizer and tf.keras.optimizers.Adam (run same code with the optimizer_type form variable set to KerasAdam or Momentum).
Describe the expected behavior
Code should run without error using tf.train.AdamOptimizer, just like it does for the other optimizers.
Code to reproduce the issue
https://colab.research.google.com/drive/1bsgSNK3aK9sETlplIPVpAa-yc4q1S3sA

I have tried on colab with TF version 1.15 and was able to reproduce the issue.Please, find the gist here. Thanks!

Is there any reason not to use tf.keras.optimizers.Adam?

The primary reason, for us, is that Keras' optimizers throw on missing gradients instead of returning None.
It's often the case that we have multiple losses in a model. Not all variables are connected to all losses in the graph. Computing the set of variables that are connected to each loss function a priori is somewhat onerous, so we let TF do it for us. We compute the gradients of each loss with respect to all trainable variables and pull out the gradient/variable pairs that have a non-None gradient. Keras optimizers will throw an exception as soon as they encounter a disconnected variable/loss pair so we can't compute any gradients this way.
While we're on the topic of Keras optimizers, the docs refer to global_step being incremented if it's non-None (https://www.tensorflow.org/api_docs/python/tf/keras/optimizers/Adam#apply_gradients). As far as I can tell, none of the arguments of any method take global_step and the optimizers don't update the global_step tensor created by tf.train.get_or_create_global_step. What am I missing here?

optimizer.iterations is the global_step for each optimizer.
The apply_gradients for v2 optimizer (TF2) should just print a warning for variables without gradients. See: https://github.com/tensorflow/models/blob/master/official/modeling/model_training_utils.py#L258
I indeed have some variables that are not connected to loss inside bert.
minimize() will throw an error if there is None.

@saberkun thanks for the tip on optimizer.iterations.
The exception is thrown when computing gradients, not when applying them. You're right that apply_gradients is just fine, but tf.keras.optimizers.Adam.get_gradients will throw. That's not the case for gradients computed through tf.train.*Optimizer.compute_gradients.

Yes, we have reported this difference. @tanzhenyu
It is very common that variables without gradients and users may not want to take extra effort to organize which loss should take which set of trainable variables.
tf.train.*Optimizer does not work because distribution strategy takes a different way to handle cross-replica sum internally. To correctly use TPU, you need CrossSharedOptimizer, but it cannot be used for keras v2 optimizer: https://github.com/tensorflow/tensorflow/blob/r2.0/tensorflow/python/tpu/tpu_optimizer.py#L58
In my experience, grads = tape.gradient(loss, training_vars) will not assert error for None gradients.
Does it fit to your case?
Here is the TF 1.x customized training example:
https://github.com/tensorflow/tpu/blob/master/models/experimental/resnet50_keras/resnet50_ctl_tf1.py#L131

I suppose we could use GradientTape to compute gradients instead of the optimizer's methods. It's less convenient, and more work on our part to switch everything over but it will work in general. Thanks for the suggestion.
Going back to the original bug report, it's still the case that AdamOptimizer can't be used with custom TPU training loops whereas other tf.train.*Optimizer classes can. It would be really nice to have consistency both in the semantics of gradient computations across APIs (i.e. anything that computes gradients should return None if the xs are not connected to the ys) and implementation behavior (i.e. optimizers can be swapped without introducing failures). Are these reasonable expectations to have of TensorFlow?

I am working with TensorFlow r1.15 and am able to reproduce the same issue.
The custom TPU training loop works only with tf.train.GradientDescentOptimizer but not with any other optimizer.
Also, tf.keras.optimizers.Adam, RMSprop, Adagrad, etc. reports the same error!

@sharvil -- in this case, the behavior of the v2 tf.keras.optimizers are consistent with the behavior of v1 tf.keras.optimizers, which also threw errors for missing gradients. Ideally, we would not break consistency with the tf.train optimizers, but in this case we had to break one way or the other. Given that we had the capacity to raise informative error messages, and that requiring filtering on the user side seems safer than potentially silently ignoring missing grads in user code, we decided to maintain consistency with the v1 tf.keras.optimizers.

@karmel, thanks for the explanation. Ultimately, it's the TF team's decision on the direction to take with the APIs. As a user, my feedback is that the Keras v2 optimizers API is less convenient in this particular case and that friction is why we're choosing to stick with tf.train.*Optimizer.
Back to this bug: I've experimented with other v1 optimizers including MomentumOptimizer, RMSPropOptimizer, and AdagradOptimizer. All of those work just fine. It's only AdamOptimizer that seems to run into issues (see Colab notebook I posted in the initial bug report for reproducible examples).

Hello,
Thanks @karmel for posting the colab notebooks. I'll look into it soon.
Actually, I'm facing similar issues and am curious to know what causes missing gradients to occur in code at the first place.
Any help in this regard of handling missing gradients in code would be appreciated.
Just to be specific, (TensorFlow r1.15, Debian Linux) I'm trying to train two models simultaneously inside the TPU custom training loop and both of them were constructed using simple tf.keras layers only.
tf.train.GradientDescentOptimizer works just fine but not others.

@sharvil @swghosh when you call get_gradients, it should return error information regarding which variable is missing the gradient I think?

Hello @tanzhenyu!
tf.gradients function is not able to provide any information regarding missing gradients. Also, when used with unconnected_gradients argument,
tf.gradients(loss_value, model.trainable_variables, unconnected_gradients='zero')

the same error is raised with with tf.train.AdamOptimizer.

Can we move the discussion about gradients into another topic / bug? I was responding to the original question @martinwicke asked about why we're not using Keras optimizers. That discussion doesn't seem to contribute to the issue at hand, i.e. tf.train.AdamOptimizer not working with custom TPU training loops.

@sharvil we provided tf.keras optimizers for use of eager mode, distribution strategy, etc. Those things are bundled through 2.0. We probably don't have plans to fix this for tf.train optimizer anymore, given there will be no more 1.x major versions to be released.
That said, if you believe the None gradient is truly a hassle, we can consider making it warning instead of error. But might need help on provide concrete examples / use cases before we make make the decision

On the other hand, using GradientTape is the way to go in 2.0. So filtering out variables with None gradient doesn't seem too bad

@tanzhenyu, the specific use-case is what I describe in my comment and a concrete example of it is a BERT model that @saberkun describes in their comment.
I understand that there are no more TF 1.x releases, but the tf.train APIs are still available in TF 2.x  through tf.compat.v1.train. Will bugs in v1.compat still be fixed in new releases of TF?

@sharvil Unfortunately we don't have further 1.x releases (i.e., 1.16), so please keep using keras optimizers. If filtering gradients for not connected variables is desired, which does make sense, maybe file another issue for it. Meanwhile closing this for now.

@tanzhenyu, I don't understand your last comment. I agree that there are no more 1.x releases but this API is also exposed in TensorFlow 2.x and fails unexpectedly, as reported in this bug.
Does your comment mean that bugs in v1.compat will not be fixed in newer TF 2.x releases?

New features (such as TPU support outside of TPUEstimator) will not
necessarily be supported for old (compat.v1) APIs. I believe this is such a
case.

Thanks for clarifying, @martinwicke.

Do we know what's the issue with AdamOptimizer? I'd like to fork it and fix it, because I do need it. keras.optimizers.Adam doesn't work for me. All other tf.train.*Optimizers work.
Here's a simple example where keras's optimizer doesn't work: https://gist.github.com/sherjilozair/db9578005a1520d357e7bd8d4ddc5168
https://hastebin.com/atidadubux.sql


Update setup_cpp_linux and adds missing tools

test_linux_gcc fails due to missing of clang-tidy and cppcheck
test_linux_llvm fails due to missing cppcheck
clang-format added for completion

Hi,
I will point an MR to boilerplate, but shouldn't it be updated here also?
I will set up a public repository with passing CI and add the link.

Hi, I will point an MR to boilerplate, but shouldn't it be updated here also?

cpp_boilerplate_project is upstream of this project. All changes there will reach this project, and all of the other projects derived from it. If you make a PR for both projects, one of them will be an unnecessary duplicate.

I will set up a public repository with passing CI and add the link.

Thanks!

Closing this PR in favor of moving to boilerplate_project. I really wish there was an automated way to do that...


HBASE-24819 Fix flaky test TestRaceBetweenSCPAndDTP and TestRaceBetwe…

…enSCPAndTRSP for branch-2.2

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
1m 57s
Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s
No case conflicting files found.

+1 :green_heart:
hbaseanti
0m  0s
Patch does not have any anti-patterns.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s
The patch appears to include 2 new or modified test files.

_ branch-2.2 Compile Tests _

+1 :green_heart:
mvninstall
5m 15s
branch-2.2 passed

+1 :green_heart:
compile
0m 54s
branch-2.2 passed

+1 :green_heart:
checkstyle
1m 22s
branch-2.2 passed

+1 :green_heart:
shadedjars
4m  1s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
0m 36s
branch-2.2 passed

+0 :ok:
spotbugs
3m  9s
Used deprecated FindBugs config; considering switching to SpotBugs.

+1 :green_heart:
findbugs
3m  7s
branch-2.2 passed

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
4m 44s
the patch passed

+1 :green_heart:
compile
0m 56s
the patch passed

+1 :green_heart:
javac
0m 56s
the patch passed

+1 :green_heart:
checkstyle
1m 18s
the patch passed

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

+1 :green_heart:
shadedjars
4m  8s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
hadoopcheck
25m  9s
Patch does not cause any errors with Hadoop 2.8.5 2.9.2 2.10.0 or 3.1.2 3.2.1.

+1 :green_heart:
javadoc
0m 35s
the patch passed

+1 :green_heart:
findbugs
3m 23s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
167m  8s
hbase-server in the patch passed.

+1 :green_heart:
asflicense
0m 37s
The patch does not generate ASF License warnings.

231m 24s

Subsystem
Report/Notes

Docker
Client=19.03.12 Server=19.03.12 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2199/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/2199

Optional Tests
dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile

uname
Linux c25111737a19 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux

Build tool
maven

Personality
/home/jenkins/jenkins-home/workspace/Base-PreCommit-GitHub-PR_PR-2199/out/precommit/personality/provided.sh

git revision
branch-2.2 / 363a31a5b3

Default Java
1.8.0_181

Test Results
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2199/1/testReport/

Max. process+thread count
4336 (vs. ulimit of 10000)

modules
C: hbase-server U: hbase-server

Console output
https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2199/1/console

versions
git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11

Powered by
Apache Yetus 0.11.1 https://yetus.apache.org

This message was automatically generated.

@saintstack Ping for reviewing.


Version Inquiry

Need to know which Version is Required.

Any version should work fine.

Tried both Games. Grabbed both Games from Google Play, ran APK Extractor, took all the Required Files.
Breakfinity - Just Black Screen after selecting it.
Galcon 2 - Select it, the Logo starts Flashing, then I get the following Error:
Unknown symbol "_get_h_errno" (0x98121298).


Fix default handler overide , when user passed in interceptor should …

This Pull request allows us to overide the default implementations of the interceptor behaviour . This is linked to this bug

@baywet @Ndiritu  can you please review this , i have added a new default interceptor to be in sync with .Net code , Net pull Request

@raghucha can you please accept the license agreement? (see the bot message at second comment)

@microsoft-github-policy-service agree


Create the !mention command. Closes #491

Can you please add an informative description to the PR.
Linting has also failed due to a number of issues; please ensure you have the precommit hook installed with pipenv run precommit so you will be prevented from committing when linting fails.
To see locally your linting results use pipenv run lint.
Your commit history has a PR reference for your own fork at the beginning, can you please rebase to remove that. I'd suggest also fixing your linting issues at the same time to prevent the commit history adding a superfluous fix linting commit.

Hopefully they're all fixed. Not sure position on using asyncio.run to send the message but the alternative is quite messy

Done 👍
I added the ID to the error message if the user was not a staff member - I assumed this might be handy if they ping and run.


How to get Ollama to use my RTX 4090 on windows 11

I have 12600K + 64GB RAM + RTX 4090. I use Ollama + OpenCHat.
For some reason Ollama won't use my RTX 4090. How can I show the program my graphics card?

messages = chat_histories[chat_id]
    options = {
        "num_ctx": 12768,
        "num_thread": 10,
        "num_predict": 300,
        "repeat_last_n": 100,
        "temperature": 0.75
    }
    response = ""

config.json
server.log
app.log
**small bursts of GPU work are the work of Stable Diffusion

Я просто удалил #"num_thread": 10, и всё заработало


ROS2 docs still recommend usage of deprecated ament_export_include_directories, _definitions, _libraries, _link_flags

As part of https://github.com/ament/ament_cmake/issues/365, I noticed all these functions are deprecated, however the docs still recommend users to use them.
Should we start recommending using just native CMake in the migration guide. Also in scope would be the use of ament_target_dependencies.
My proposal is start with recommending to use standard CMake builtin functions whenever possible instead of ament.
I'm happy to submit a PR once the acceptance criteria for this ticket are decided.

So as far as I know, we never actually deprecated those old-style CMake functions.  I think we could do this, but it hasn't yet been done.  However, we still use these functions heavily in the core and in the ecosystem, so deprecating them would be a non-trivial task.
That said, I think that the updates in https://github.com/ros2/ros2_documentation/pull/2915 (along with some of my comments) can reflect the current best practices.  That is, we recommend you use CMake targets, but we also still support the old CMake way of doing things.
I think the way forward for now is to update that PR, and get that in.

Right, any way I can help? Another pass over that PR to verify consistency with your statement above?

Right, any way I can help? Another pass over that PR to verify consistency with your statement above?

Yeah, that's the most we can do and to poke @sloretz with a friendly ping :).

@clalancette Unless you are strongly opposed, I'd like to deprecate some of these calls on rolling with message(AUTHOR_WARNING ..) and help submit PR's against the ROS core to remove these features in time for Jazzy release.

@clalancette Unless you are strongly opposed, I'd like to deprecate some of these calls on rolling with message(AUTHOR_WARNING ..) and help submit PR's against the ROS core to remove these features in time for Jazzy release.

So, first of all, we definitely can't remove these for Jazzy.  Our policy is to tick-tock, where in one release we deprecate a feature, and then in the next release we remove it.  So the earliest that this could possibly be removed is for K-Turtle.
However, I think even that is very ambitious.  Just looking around the packages listed in Rolling, I see the following:
$ grep -rI "ament_export_include_directories" * | wc -l
260
$ grep -rI "ament_export_definitions" * | wc -l
5
$ grep -rI "ament_export_libraries" * | wc -l
242
$ grep -rI "ament_export_link_flags" * | wc -l
8

I don't think we should carelessly do this deprecation and cause a lot of downstream heartache like this.
Instead, I suggest the following:

Make sure that none of the core packages (those listed in https://github.com/ros2/ros2/blob/rolling/ros2.repos) depend on any of these features.  If they do, submit pull requests to fix them.
Make sure that our documentation in this repository doesn't use these features in tutorials/guides.  If it does, update those.
Deprecate only ament_export_definitions and ament_export_link_flags; there are few enough users of that that it won't cause tons of downstream warnings.
Open up a discourse post saying that we are going to deprecate ament_export_include_directories and ament_export_libraries for K-Turtle, and then remove them for L-Turtle.
In June (after the Jazzy release), remove ament_export_definitions and ament_export_link_flags, and deprecate ament_export_include_directories and ament_export_libraries.  That should give downstream consumers a whole year to fix their code before K-Turtle.

@sloretz What do you think?  Does that sound like a reasonable path?

Sounds like a reasonable path to me!


Monitor if any of our DNS entries points to an IP that's not owned by us

Elastic IPs get taken by others after we release them.  If we still have DNS entries that point to those old elastic IPs, it means our dns entry will go to another site owned by someone else.  We need to routinely monitor our dns entries and whether the IPs they point to are owned by us.

Closing. Stale issue.


Better reconnect support

https://github.com/streadway/amqp/blob/master/reconnect_test.go
Looking at how you are doing reconnect it causes a slight issue if you are using go routines. In that case you have to start managing all your goroutines with something like http://stackoverflow.com/a/6807784/2049333 which can be a real mess. I just wanted to open up a discussion to see if this could be improved or if that is not possible.
I was thinking something like not closing the channel when the server stops and allow for a call like TryReconnect attached to amqp.Connection that would try and reopen the connection with the current connection information.
I know overall you don't want to support reconnect but doing so is currently a bit of a mess in my opinion.

After reconnect there are two concerns - establish the topology and establish the messaging pattern.  Both are application concerns.  Do you have an example of what you'd like to see?

I actually figured out a nice way to handle this and instead of trying to bend this library to do this I think adding an example of how you might go about handling failover may be beneficial. I can send you a pull request with that file shortly.

@michaeljs1990 I'm working on implementing reconnecting in my client code. Can you post that file?

@icholy sorry missed this. Here is a small wrapper I wrote for this library that handles reconnect support.

package consumers

import (
	"errors"
	"fmt"
	"log"
	"time"

	"github.com/streadway/amqp"
)

// Consumer holds all infromation
// about the RabbitMQ connection
// This setup does limit a consumer
// to one exchange. This should not be
// an issue. Having to connect to multiple
// exchanges means something else is
// structured improperly.
type Consumer struct {
	conn         *amqp.Connection
	channel      *amqp.Channel
	done         chan error
	consumerTag  string // Name that consumer identifies itself to the server with
	uri          string // uri of the rabbitmq server
	exchange     string // exchange that we will bind to
	exchangeType string // topic, direct, etc...
	bindingKey   string // routing key that we are using
}

// NewConsumer returns a Consumer struct
// that has been initialized properly
// essentially don't touch conn, channel, or
// done and you can create Consumer manually
func NewConsumer(
	consumerTag,
	uri,
	exchange,
	exchangeType,
	bindingKey string) *Consumer {
	return &Consumer{
		consumerTag:  consumerTag,
		uri:          uri,
		exchange:     exchange,
		exchangeType: exchangeType,
		bindingKey:   bindingKey,
		done:         make(chan error),
	}

}

// ReConnect is called in places where NotifyClose() channel is called
// wait 30 seconds before trying to reconnect. Any shorter amount of time
// will  likely destroy the error log while waiting for servers to come
// back online. This requires two parameters which is just to satisfy
// the AccounceQueue call and allows greater flexability
func (c *Consumer) ReConnect(queueName, bindingKey string) (<-chan amqp.Delivery, error) {
	time.Sleep(30 * time.Second)

	if err := c.Connect(); err != nil {
		log.Printf("Could not connect in reconnect call: %v", err.Error())
	}

	deliveries, err := c.AnnounceQueue(queueName, bindingKey)
	if err != nil {
		return deliveries, errors.New("Couldn't connect")
	}

	return deliveries, nil
}

// Connect to RabbitMQ server
func (c *Consumer) Connect() error {

	var err error

	log.Printf("dialing %q", c.uri)
	c.conn, err = amqp.Dial(c.uri)
	if err != nil {
		return fmt.Errorf("Dial: %s", err)
	}

	go func() {
		// Waits here for the channel to be closed
		log.Printf("closing: %s", <-c.conn.NotifyClose(make(chan *amqp.Error)))
		// Let Handle know it's not time to reconnect
		c.done <- errors.New("Channel Closed")
	}()

	log.Printf("got Connection, getting Channel")
	c.channel, err = c.conn.Channel()
	if err != nil {
		return fmt.Errorf("Channel: %s", err)
	}

	log.Printf("got Channel, declaring Exchange (%q)", c.exchange)
	if err = c.channel.ExchangeDeclare(
		c.exchange,     // name of the exchange
		c.exchangeType, // type
		true,           // durable
		false,          // delete when complete
		false,          // internal
		false,          // noWait
		nil,            // arguments
	); err != nil {
		return fmt.Errorf("Exchange Declare: %s", err)
	}

	return nil
}

// AnnounceQueue sets the queue that will be listened to for this
// connection...
func (c *Consumer) AnnounceQueue(queueName, bindingKey string) (<-chan amqp.Delivery, error) {
	log.Printf("declared Exchange, declaring Queue %q", queueName)
	queue, err := c.channel.QueueDeclare(
		queueName, // name of the queue
		true,      // durable
		false,     // delete when usused
		false,     // exclusive
		false,     // noWait
		nil,       // arguments
	)

	if err != nil {
		return nil, fmt.Errorf("Queue Declare: %s", err)
	}

	log.Printf("declared Queue (%q %d messages, %d consumers), binding to Exchange (key %q)",
		queue.Name, queue.Messages, queue.Consumers, bindingKey)

	// Qos determines the amount of messages that the queue will pass to you before
	// it waits for you to ack them. This will slow down queue consumption but
	// give you more certainty that all messages are being processed. As load increases
	// I would reccomend upping the about of Threads and Processors the go process
	// uses before changing this although you will eventually need to reach some
	// balance between threads, procs, and Qos.
	err = c.channel.Qos(50, 0, false)
	if err != nil {
		return nil, fmt.Errorf("Error setting qos: %s", err)
	}

	if err = c.channel.QueueBind(
		queue.Name, // name of the queue
		bindingKey, // bindingKey
		c.exchange, // sourceExchange
		false,      // noWait
		nil,        // arguments
	); err != nil {
		return nil, fmt.Errorf("Queue Bind: %s", err)
	}

	log.Printf("Queue bound to Exchange, starting Consume (consumer tag %q)", c.consumerTag)
	deliveries, err := c.channel.Consume(
		queue.Name,    // name
		c.consumerTag, // consumerTag,
		false,         // noAck
		false,         // exclusive
		false,         // noLocal
		false,         // noWait
		nil,           // arguments
	)
	if err != nil {
		return nil, fmt.Errorf("Queue Consume: %s", err)
	}

	return deliveries, nil
}

// Handle has all the logic to make sure your program keeps running
// d should be a delievey channel as created when you call AnnounceQueue
// fn should be a function that handles the processing of deliveries
// this should be the last thing called in main as code under it will
// become unreachable unless put int a goroutine. The q and rk params
// are redundent but allow you to have multiple queue listeners in main
// without them you would be tied into only using one queue per connection
func (c *Consumer) Handle(
	d <-chan amqp.Delivery,
	fn func(<-chan amqp.Delivery),
	threads int,
	queue string,
	routingKey string) {

	var err error

	for {
		for i := 0; i < threads; i++ {
			go fn(d)
		}

		// Go into reconnect loop when
		// c.done is passed non nil values
		if <-c.done != nil {
			d, err = c.ReConnect(queue, routingKey)
			if err != nil {
				// Very likely chance of failing
				// should not cause worker to terminate
				log.Fatalf("Reconnecting Error: %s", err)
			}
		}
		log.Println("Reconnected... possibly")
	}
}

and this would be a simple implementation using it.
package main

import (
	"encoding/json"
	"flag"
	"io/ioutil"
	"log"
	"net/http"
	"net/url"
	"os"
	"runtime"
	"strings"

	"github.com/file/above"
	"github.com/streadway/amqp"
)

var (
	uri          = flag.String("uri", "amqp://something", "The rabbitmq endpoint")
	formURL      = flag.String("form_url", "http://localhost", "The URL that requests are sent to")
	logFile      = flag.String("log_file", "golang_worker.log", "The file where errors are logged")
	threads      = flag.Int("threads", 1, "The max amount of go routines that you would like the process to use")
	maxprocs     = flag.Int("max_procs", 1, "The max amount of processors that your application should use")
	paymentsKey  = flag.String("payments_key", "secret", "Access key")
	exchange     = flag.String("exchange", "something", "The exchange we will be binding to")
	exchangeType = flag.String("exchange_type", "topic", "Type of exchange we are binding to | topic | direct| etc..")
	queue        = flag.String("queue", "some.queue", "Name of the queue that you would like to connect to")
	routingKey   = flag.String("routing_key", "some.queue", "queue to route messages to")
	workerName   = flag.String("worker_name", "worker.name", "name to identify worker by")
	verbosity    = flag.Bool("verbos", false, "Set true if you would like to log EVERYTHING")

	// Hold consumer so our go routine can listen to
	// it's done error chan and trigger reconnects
	// if it's ever returned
	conn *consumers.Consumer
)

func init() {
	flag.Parse()
	runtime.GOMAXPROCS(*maxprocs)
}

func main() {
	// Open a system file to start logging to
	f, err := os.OpenFile(*logFile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
	defer f.Close()
	if err != nil {
		log.Printf("error opening file: %v", err.Error())
	}
	log.SetOutput(f)

	conn := consumers.NewConsumer(*workerName, *uri, *exchange, *exchangeType, *queue)

	if err := conn.Connect(); err != nil {
		log.Printf("Error: %v", err)
	}

	deliveries, err := conn.AnnounceQueue(*queue, *routingKey)
	if err != nil {
		log.Printf("Error when calling AnnounceQueue(): %v", err.Error())
	}

	conn.Handle(deliveries, handler, *threads, *queue, *routingKey)
}

func handler(deliveries <-chan amqp.Delivery) {

	for d := range deliveries {
		formData := &Data{}

		err := json.Unmarshal(d.Body, formData)
		if err != nil {
			log.Printf("Error unmarshaling data: %s", err.Error())
		}

		resp, err := makeRequest(formData)
		if err != nil {
			log.Printf("Error posting form data: %s", err.Error())
		}

		body, err := ioutil.ReadAll(resp.Body)
		if err != nil {
			log.Printf("Error reading response body %s", err.Error())
		}

		// Turn on verbose if you are having issues and would like to
		// see everything that is being consumed and everything that
		// is being reported back to you by the server.
		if *verbosity {
			log.Println("-------DEBUG--------")
			log.Println("JSON from QUEUE: ", string(d.Body))
			log.Println("Response: ", resp.StatusCode)
			log.Println("Response Body: ", string(body))
			log.Println("------END DEBUG-----")
		}

		// Only ack on 200 or 400
		if resp.StatusCode == 200 || resp.StatusCode == 400 {
			d.Ack(false)
		} else {
			d.Nack(false, true)
		}
	}

	return
}

// Data struct
type Data struct {
	// Secret Stuff
}

func makeRequest(data *Data) (*http.Response, error) {
	// Secret Stuff
}

I don't think reconnect is responsibility of this package. This package it pretty low-level and follow the AMQP protocol in it's API. We should create high-level wrapper around it.

I deal with reconnecting in my high-level library that uses amqp. See here:
https://github.com/RichardKnop/machinery/blob/master/v1/worker.go#L36
I think it should not be responsibility of this package.

so I wrote little but handy wrapper around this issue: https://github.com/assembla/cony

I believe automatic connection recovery is excluded from this library by design. There are examples and other libraries that cover this.

@michaeljs1990 question about your gist, since you're passing the d <- amqp.Delivery into multiple go routines, does that mean all those routines will share reading from d?

My take on the issue: https://github.com/makasim/amqpextra
The approach idea is to add as little abstraction as possible. In your code instead of using *amqp.Connection you should use <-chan *amqp.Connection. The channel returns a healthy connection. You should subscribe to chan *amqp.Error to get notified when a connection is not healthy anymore and you should request a new one via <-chan *amqp.Connection. The channel <-chan *amqp.Connection is closed when you explicitly closed it by calling connextra.Close() method, otherwise, it tries to reconnect in background. Example.

For anyone still interested in this, I am working on a drop-in replacement for this lib with automatic redials
https://github.com/peake100/rogerRabbit-go#readme


mocha 3.2.0 throws error if it is running a spec more than once

taken from https://cdnjs.com/libraries/mocha
> mocha.run();

everything ok!

> mocha.run()

TypeError: Cannot read property 'call' of undefined
    at r (https://cdnjs.cloudflare.com/ajax/libs/mocha/3.2.0/mocha.min.js:2:8563)
    at r.run (https://cdnjs.cloudflare.com/ajax/libs/mocha/3.2.0/mocha.min.js:2:9635)
    at n (https://cdnjs.cloudflare.com/ajax/libs/mocha/3.2.0/mocha.min.js:2:13371)
    at https://cdnjs.cloudflare.com/ajax/libs/mocha/3.2.0/mocha.min.js:2:13710
    at i (https://cdnjs.cloudflare.com/ajax/libs/mocha/3.2.0/mocha.min.js:1:572)

Do you have an example of what necessitated multiple programatic runs of mocha?

I have the same issue:
We have a test framework that runs tests written in mocha after doing some device setup.
We earlier had a repeat feature where we called mocha.run n times if that feature was enabled.
We haven't tested this feature from long time but realized today that it is broken and we get same error as @crishushu mentioned.
Please confirm if Mocha supports repeating tests which can be controlled as an argument?
I am aware of function within it/describe.
thanks

It is really hard to judge what this could be without a code example, including a setup. Out of curiosity have you looked https://github.com/mochajs/mocha/wiki/Using-mocha-programmatically ?
The wiki describes that the run method returns a Runnable, which might help you debug. For  example: try running your second test after the first has completed and see if that helps:
Mocha.run().on('test end', runAgainFunc);

@tgirishkumar

Please confirm if Mocha supports repeating tests which can be controlled as an argument?
I am aware of function within it/describe.

I am not sure what you mean here, could you elaborate?

I meant the retry feature:
https://mochajs.org/#retry-tests , we are aware of it but wanted to retry/repeat tests without code changes.
thanks

Here is another example of someone raising the issue:
https://github.com/adamgruber/mochawesome/issues/79, Look at last comment:
Please note: this error happens in mochawesome but caused by this issue in Mocha inside, i tested by reproducing below issue and then remove mochawesome and then i find current issue.

Here's my code:

import * as path from 'path';
import * as fs from 'fs';
import * as Mocha from 'mocha';
import * as React from 'react';
import * as chokidar from 'chokidar';

let mocha: Mocha = new Mocha(
{
    reporter: 'mochawesome',
    reporterOptions:
    {
        reportDir: __dirname + '/../../public/mochawesome'
    }
});

let testsPath: string = __dirname + '/../../tests/';
let fileList: Array<string> = fs.readdirSync(testsPath).filter(file => file.split('.').pop() == 'js');
fileList.forEach (file =>
{
    console.log(file);
    mocha.addFile(path.join(testsPath, file));
});

function Invalidate()
{
    fileList.forEach (p =>
    {
        let fullPath = path.join(testsPath, p);
        p = path.resolve(fullPath);
        delete require.cache[require.resolve(p)];
    });
}

export default class Tests extends React.Component<{}, {}>
{
    componentWillMount()
    {
        //mocha.run();

        let watcher = chokidar.watch(testsPath, {persistent: true});
        watcher.on('change', path =>
        {
            console.log('change');
            Invalidate();
            mocha.run();
            //this.forceUpdate();
        });

        watcher.on('add', p =>
        {
            if (p.split('.').pop() == 'js')
            {
                console.log('add');
                Invalidate();
                mocha.addFile(p);
                mocha.run();
                //this.forceUpdate();
            }
        });
    }

    render()
    {

        return (
            <html>
                <body>
                    <iframe src='/mocha/mochawesome.html' width='100%' height='100%'/>
                </body>
            </html>
        );
    }
}

And my test code:

"use strict";
const chai_1 = require("chai");
describe('testing', function () {
    it('will equal 1', () => {
        chai_1.expect(1).to.equal(2);
    });
});

When the add or watch event is called more than once, it fails.```

Using 3.2.0 as well
I am getting the same error and  I am running mocha programatically already.  My dept has a shared web component with multiple versions and we are testing that we did not break any version as prior versions of the component could be used by other teams.  So we run the same tests on multiple versions of a component.   As a side note, we use a SemVer check when new tests are added or need to be skipped.
The error seems to occur on the first line of code on the second time the file is run because I cannot get anything including logs. There are no problems or errors when I attempt to run only 1 version (so one run of the tests).
I thought maybe if I didn't use addFile multiple times that would work, but it did not make a difference.
Just a guess, I was wondering if the test is being cached like a require then would it need to be "unregistered" so it can be run again with new information?
Here is a brief output from my tests:
global-nav-module_5.0.0 Component Tests Suite1
√ module should be added and render with option parameters true (12341ms)
1 passing (12s)

Second Run - I noticed that the 5.0.0 (is a var) that is not being updated to display 5.0.1 *
global-nav-module_5.0.0 Component Tests
global-nav-module_5.0.0 Component Tests Suite1
1) "before all" hook
0 passing (3ms)
1 failing

global-nav-module_5.0.0 Component Tests global-nav-module_5.0.0 Component Tests Suite1 "before all" hook:
TypeError: Cannot read property 'call' of undefined

@tgirishkumar thank you for clarifying. I have never used mocha for React tests, nor have had a need for using retries on failed tests. I have generally setup tests to always run in one command (mocha <....>) from the command line. I would imagine it's easier to setup CI scripts that way, but have no way of comparing since I have never tried to do it the other way.
It is possible mocha is relying on something in the global state or loading setup multiple times. Hard to trace without a reproducible unit test / stack trace. Maybe with @elevow and @crishushu we can create a reproducible small unit test, track down the issue, and then submit a PR for the mocha team. They mentioned on their site that they are in dire need of help maintaining the project 😄

Yesterday I was playing with different versions of mocha. AFAIK the latest release where running mocha with same suite/spec setting multiple times is supported, is 2.3.0. @dennisbaskin just out of curiosity is there any reason why the feature (yes, I consider it as one) has been disabled. I assume that it happened deliberately.

I was able to make a small version of the failure.  Hopefully someone can duplicate it.  one.test.js is just a it statement with console.log();
`const Mocha = require('mocha');
const path = require('path');
const async = require('async');
const mocha = new Mocha({
reporter: 'spec',
});
const counter = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
const cwd = process.cwd();
mocha.addFile(path.join(cwd, 'one.test.js'));
async.eachLimit(counter, 1, (iCounter, eachCallback) => {
mocha.run((failures) => {
eachCallback();
});
});
`
TypeError: Cannot read property 'call' of undefined

Hey after some testing the issue seems to be specific to async.eachLimit for me.

@crishushu I would not able to answer your question as to why. I am not directly involved on the contributing team, just trying to help triage issu.es since they need help.
@elevow I will try to play around with your example, thanks for setting that up.

Guys, any update on this? I need this fixed!

I have same problem.  I just tried to set up mocha programmatically and have just one test is expect(1).toBe(1) . No fancy stuff, like react or enzyme is loaded.
I load one test file
mocha.add('my.test.js')
then i run the tests.
mocha.run();
setTimeout(()=>{ mocha.run(); }, 5000);

First time it runs fine, after 5s it throws me an error.  This is the full error  stack
TypeError: Cannot read property 'call' of undefined       at callFn ([__dirname]\node_modules\mocha\lib\runnable.js:348:20)       at Test.Runnable.run ([__dirname]\node_modules\mocha\lib\runnable.js:340:7)       at Runner.runTest ([__dirname]\node_modules\mocha\lib\runner.js:443:10)       at [__dirname]\node_modules\mocha\lib\runner.js:549:12       at next ([__dirname]\node_modules\mocha\lib\runner.js:361:14)       at [__dirname]\node_modules\mocha\lib\runner.js:371:7       at next ([__dirname]\node_modules\mocha\lib\runner.js:295:14)       at Immediate.<anonymous> ([__dirname]\node_modules\mocha\lib\runner.js:339:5)       at runCallback (timers.js:800:20)       at tryOnImmediate (timers.js:762:5)

I think you should have a look at grunt-loop-mocha.
I use it for my Selenium WebDriver tests.
https://github.com/grawk/grunt-loop-mocha
My understanding is that mocha is a unit testing framework and so it creates only one instance/process of your tests. So, when you try to execute the same test, it does not execute before and after statements.
Grunt-loop-mocha on other hand helps you create the new instance for each specification. So, it will even execute before and after statements with the different configuration. I guess that's what you are looking for.

+1
mocha --compilers js:babel-register --allow-uncaught  --full-trace --no-warnings --recursive tests/e2e-tests
got this error

Frontend Testing "before all" hook: open browser:
TypeError: Cannot read property 'call' of undefined
at callFn (/usr/src/app/node_modules/mocha/lib/runnable.js:348:20)
at Hook.Runnable.run (/usr/src/app/node_modules/mocha/lib/runnable.js:340:7)
at next (/usr/src/app/node_modules/mocha/lib/runner.js:309:10)
at Immediate. (/usr/src/app/node_modules/mocha/lib/runner.js:339:5)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)

Frontend Testing "after all" hook: quit browser:
TypeError: Cannot read property 'call' of undefined
at callFn (/usr/src/app/node_modules/mocha/lib/runnable.js:348:20)
at Hook.Runnable.run (/usr/src/app/node_modules/mocha/lib/runnable.js:340:7)
at next (/usr/src/app/node_modules/mocha/lib/runner.js:309:10)
at Immediate. (/usr/src/app/node_modules/mocha/lib/runner.js:339:5)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)

my test
import config from 'config';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import test from 'selenium-webdriver/testing';
import webdriver from 'selenium-webdriver';
import proxy from 'selenium-webdriver/proxy';
import chrome from 'selenium-webdriver/chrome';
// Helper objects for performing actions.
import { WebDriverManager, WebDriverHelper as helper } from 'wp-e2e-webdriver';

// We're going to use the ShopPage and CartPage objects for this tutorial.
import { ShopPage, CartPage } from 'wc-e2e-page-objects';

chai.use( chaiAsPromised );
const assert = chai.assert;
const chromedriver = require('chromedriver');
const chromeCapabilities = webdriver.Capabilities.chrome();
chromeCapabilities.set('chromeOptions', {args: ['--headless --no-sandbox user-agent=Mozilla/5.0 (wp-e2e-tests) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36' ]});
const pref = new webdriver.logging.Preferences();
pref.setLevel( 'browser', webdriver.logging.Level.SEVERE );

let manager;
let driver;

test.describe( 'Frontend Testing', function() {

    // Set up the driver and manager before testing starts.
    test.before( 'open browser', function() {
        driver = new webdriver.Builder()
          .forBrowser('chrome')
          .usingServer( config.get("url") )
          .withCapabilities(chromeCapabilities)
    		.setLoggingPrefs(pref)
    		.setProxy(proxy.direct())
          .build();
        driver.getSession().then( function( sessionid ) {
			driver.allPassed = true;
			driver.sessionID = sessionid.id_;
		} );

        helper.clearCookiesAndDeleteLocalStorage( driver );
    } );
    // Tests will go here.
    test.it( 'Has shop page', () => {

            // Create a new Shop page object.
            const shopPage = new ShopPage( driver, { url: config.get('url').concat( '/shop' ) } );

            assert.instanceOf(shopPage, ShopPage, 'shopPage instance of ShopPage');

        } );
    // Close the browser after finished testing.
    test.after( 'quit browser', () => {
        driver.sleep( config.get('startBrowserTimeoutMs') ).then( () => {
			return driver.quit();
		} );
    } );

} );

I'm running in a docker environment with
node 8.5.0
npm 5.4.2
mocha 3.5.3

This worked for me
const purge = function (allFiles) {
  allFiles.forEach(file => {
    delete require.cache[file];
  });
};

// use this function when rerunning tests
const rerun = function () {
  purge(allFiles);
  mocha.suite = mocha.suite.clone();
  mocha.suite.ctx = new Mocha.Context();
  mocha.ui("bdd");
  mocha.files = allFiles;
};

I am seeing this issue too using Mocha 5.2.0 - here is my stacktrace:
TypeError: Cannot read property 'call' of undefined
  at callFn (/.../node_modules/mocha/lib/runnable.js:372:21)
  at Test.Runnable.run (/.../node_modules/mocha/lib/runnable.js:364:7)
  at Runner.runTest (/.../node_modules/mocha/lib/runner.js:455:10)
  at /.../node_modules/mocha/lib/runner.js:573:12
  at next (/.../node_modules/mocha/lib/runner.js:369:14)
  at /.../node_modules/mocha/lib/runner.js:379:7
  at next (/.../node_modules/mocha/lib/runner.js:303:14)
  at Immediate.<anonymous> (/...node_modules/mocha/lib/runner.js:347:5)
  at runCallback (timers.js:794:20)
  at tryOnImmediate (timers.js:752:5)
  at processImmediate [as _immediateCallback] (timers.js:729:5)

I am writing a library where I want to compare the output to console of a reporter based with and without my library .. which is why I need to be able to re-run the same test twice, programatically.
When inspecting the Mocha.Test objects I see that they are missing a fn property the second time they run, which probably is why runnable.js:372 is calling an undefined function.
It looks like a Mocha.Suite is cleaning up by deleting these fn properties to avoid memory leaks https://github.com/mochajs/mocha/blob/master/lib/runner.js#L817-L819.

I clean the require cache up by using the clear-require component,
and it works every time, the  code  as follows:
 const clearRequire = require('clear-require');
clearRequire.match(new RegExp('mocha'));//must be here
clearRequire.match(new RegExp('your-test-js-file'));//must be here
more details :
const clearRequire = require('clear-require');
 function testMochaClick()
 {
clearRequire.match(new RegExp('mocha'));
clearRequire.match(new RegExp('commtest'));
let Mocha = require('mocha');
 let mocha = new Mocha({
reporter: 'mochawesome',
reporterOptions: {
reportDir: './resources/app/report',
 }
 })
mocha.addFile('./resources/app/case/commtest.js');
 mocha.run();
 }
https://mochajs.org/api/mocha#loadFiles

The current codebase needs mocha to be reinstantiated between runs due to internal implementation issues.

Related: #1938

Looking back at this issue and #1938: fixing it would be a pretty significant internal refactor. I think we can accept PRs for it, but note that per #5027 it'll be a while before we can review them.


Doesn't agree with Google Authenticator

I'm unable to get this to agree with Google Authenticator.  onceler does, however.  The otp var generated by the two samples below should be equal.  The one from onceler agrees with the Google Authenticator app on my iPhone, but speakeasy does not.
onceler
var TOKEN = get_token_used_by_google_authenticator();
var TOTP = require("onceler").TOTP;

var otp = (new TOTP(TOKEN)).now();

speakeasy
var TOKEN = get_token_used_by_google_authenticator();
var speakeasy = require("speakeasy")

var otp = speakeasy.totp({key: TOKEN});

the problem I am facing is with BASE32 decoding.
The Link : https://code.google.com/p/google-authenticator/wiki/KeyUriFormat
The Key : JBSWY3DPEHPK3PXP
otherwise works with any other generated Base32 based on ASCII charset,

+1 @sashimizakana It's fixed by updating thirty-two to 0.0.2

+1 @sashimizakana this fixed the issue for me as well.

Close the issue?

@sashimizakana Thank you for looking into this, and thanks @knoxcard for the ping.
Speakeasy 2.0 no longer depends on thirty-two, and it now depends on base32.js. I haven't seen these issues on Speakeasy 2.0.
If you're seeing this issue, you can

Update to thirty-two 0.0.2 as suggested by @sashimizakana.
Upgrade to Speakeasy 2.0, which is API-compatible with 1.x.

Feel free to comment if you have any other issues.

I am using speakeasy 2.0.0 and having this issue as well. In the browser, it works fine, but if I run it under nodejs it gives the wrong code - which isn't merely a few minutes off. The timezone on my PC and on my server are the same. Google Authenticator is up to date as well.


Question Load Xml SiteMap from external Resource

Hi,
We are using MvcSiteMapProvider in MVC5 project. We have static sitemap in the directory with the following structure:
WebSite
--SiteMapFolder
-----WebMvc.sitemap
-----WebMvcSiteMapSchema.xsd
And we have too defined a Template to load Breadcrumbs, i use this just for Breadcrumbs. Then in a layout i call the Helper:
@Html.MvcSiteMap().SiteMapPath("MyCustomTemplateInSharedViewsFolder")
Until now all ok, but, we will implement multilanguage in a site, and we wana have our xml .sitemap structure y a Resource.resx file.
We would like to have a way to override "BuildSiteMap" method of "XmlSiteMapBuilder" or some specific class just to load XML sitemap from our Source (resources or wathever...) and not from the path specified in "MvcSiteMapProvider_SiteMapFileName" in web.config. I Supose we should too set the schema validation .XSD....
As detail i should mention we do not use DI Contaner in our project...
I appreciate any help. My english is not good, so, sorry for that.
Thanks,
Orney

But If the Resource.resx imported as a Reference in the project, the only way is with external DI Contaner ?


Dynamic --logical-resource-id

I've got a use case where my stack contains a number of autoscaling groups which each needs to be cycled & it would be create if I could override the default autoscaling group name: AutoScalingGroup.
@emilymcafee any objections?

@miccolis do you want to keep AutoScalingGroup as default and add an optional override? Or require logical-resource-id to be provided every time?

yea just an override would be great. Right now in I'm using sed...

no objections, then : )


Fix endless remediation loop caused by PR create conflict

Summary
This PR fixes and issue where we:

create a profile with remediations on for dependabot
minder created a PR
user turned off remediations (note PRs are left open)
then user turned on remediations
Minder failed because it tried to open a PR but it failed because there's already one
This lead the action to failure, which for the actions engine meant we should re-try on the next evaluation because the previous remediation was not success or pending

The changes added are:

list for opened PRs before trying to create one and if we find one, we use it's PR number (handles the usecase nicely where we have 2 profiles with the same ruletypes that try to remediate the same thing)
Change the remediation action to happen only if the previous one was skipped. This saves us from re-trying when the previous remediation failed or errored for some reason.

Fixes #(related issue)
Change Type
Mark the type of change your PR introduces:

[x] Bug fix (resolves an issue without affecting existing features)
[ ] Feature (adds new functionality without breaking changes)
[ ] Breaking change (may impact existing functionalities or require documentation updates)
[ ] Documentation (updates or additions to documentation)
[ ] Refactoring or test improvements (no bug fixes or new functionality)

Testing
Tested this locally with @jhrozek
Review Checklist:

[x] Reviewed my own code for quality and clarity.
[ ] Added comments to complex or tricky code sections.
[ ] Updated any affected documentation.
[ ] Included tests that validate the fix or feature.
[ ] Checked that related changes are merged.

Updated the log message and the unit tests.
The logging now looks like -
{"level":"info","repo":"id:\"3b374e32-ced2-4c61-ade3-028004a317e1\" context:{provider:\"github\" project:\"874f6777-be50-4d9b-aab0-d6d6da3e22cb\"} owner:\"radoslav-dev\" name:\"demo-repo-python-fork-new\" repo_id:787283212 hook_url:\"https://api.github.com/repos/radoslav-dev/demo-repo-python-fork-new/hooks/472874998\" deploy_url:\"https://api.github.com/repos/radoslav-dev/demo-repo-python-fork-new/deployments\" clone_url:\"https://github.com/radoslav-dev/demo-repo-python-fork-new.git\" is_fork:true created_at:{seconds:1713264001 nanos:505438000} updated_at:{seconds:1713264001 nanos:505438000} default_branch:\"main\"","branchBaseName":"minder_add_dependabot_configuration_for_github-actions","pr_origin":"already_existed","pr_number":10,"Timestamp":1713266798541653000,"message":"pull request remediation completed"}


[staging] perlPackages: convert some modules to aliases

Motivation for this change
These modules have been included into other packages and do not have own packages anymore:
https://metacpan.org/pod/Dist::Zilla::Plugin::NoTabsTests
https://metacpan.org/pod/Email::MIME::Modifier
https://metacpan.org/pod/ExtUtils::Command
https://metacpan.org/pod/Parse::CPAN::Meta
https://metacpan.org/pod/Test::Tester
https://metacpan.org/pod/Test::use::ok
@rycee

@volth Does this and #41447 need to be merged in some specific order?

Does this and #41447 need to be merged in some specific order?

I guess, no. Any order is ok.


How to Scan the QR Code on the ESP32S3 Module ? (IDFGH-9351)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report
https://www.espressif.com/sites/default/files/documentation/espressif_module_packaging_information_en.pdf
need to scan the QR Code.
which App does do this good ?
i tested a couple, and none seems to work.
Thanks,
Franz

I'm sorry, this really is not an ESP-IDF related question. Please use https://www.espressif.com/en/contact-us/technical-inquiries/other-technical-issues or https://www.espressif.com/en/contact-us/technical-inquiries/hardware-issues for questions related to the modules or hardware.
(I have personally used https://play.google.com/store/apps/details?id=com.datamatrix.qrscanner which worked okay. It helps if you point the camera at such an angle that the light source reflects off the module surface, resulting in higher contrast.)

Thanks a lot for the Answer!!
i wrote to the Espressif Support:
The Answer was:

Hi Franz,
Thanks for your mail.
Kindly please note that the QR code scanning on the mobile phone is limited by the resolution of the mobile phone camera, so the APP may not scan it sucessfully.
We would recommend you to use a barcode scanner to scan the QR code on the module.
Thank you.
Best regards,
Emily Cai 蔡娟
Business Support | Espressif Systems

i will order a Barcode Scanner, therefore i have sent some Modules to my Barcode House for Evaluation.

But i found another Method:
this App on Android can read the Barcode, (Data Matrix Code)
hard to read, but can:
https://f-droid.org/packages/com.atharok.barcodescanner/
unfortunately it is not official Google Play Store App.
Thanks,
Franz

we found a 2nd way:
https://online-barcode-reader.inliteresearch.com/


not the output in demo

Hello,
First of all, thanks for the repo. It's of great help.
I tried using it with the pretrained model ckpt provided. The outputs are gibberish and not any useful sentence. I am unable to figure out what the issue is. Please help.

I am facing same problem. I have followed the sequence mentioned and trained the model. while training the results shown are relatable with GT. But while running test file, it always shows same sentence for every video and the sentence contains same words repeatably.
I have attached the error file which contains the training results and testing results.
error.txt

Hi @rupeshchandgude, I think the error that you're mentioning is slightly different from what @Aishwaryabaskaran was facing since your predictions are not using the same model that I provided with the repo. Could you please check if your results make more sense when restoring from the checkpoint I provided?
From your output, it seems that your model is overfitting on the training set. Are you sure you are using regularization techniques correctly in the model?

Was this problem solved?? I am using the model weights and checkpoint from the repository but my output is always same (repeated words without ) for any input.
Will be thankful for any hints on this.

Thanks for your interest in the repo, I don't think this is a wrong checkpoint file since I created my demo video with this file. How does the train set output look for you?

I solved the issue by replacing the line in Extract_Feats.py-
frame = skimage.transform.resize(frame,[224,224]) with
frame = skimage.transform.resize(frame,[224,224], preserve_range=True).
I found this solution following this issue-
https://github.com/chenxinpeng/S2VT/issues/5

That's great, thanks for sharing @abhaygargab ! Closing this issue for now, please reopen if the above solution doesn't work for anyone.


goctl generate model  with postgresql engine unsupported enum data type.

So what should we do temporarily ？

Can you please provide a specific data type or table definition?

Hi there!
I had the same issue. And I can provide an example of this. goctl command usage is below:
goctl model pg datasource -url="postgres://user:password@<IP_ADDRESS>:5454/database?sslmode=disable" --schema="public" -style go_zero --table="videos" --dir ./models

Video table definition:
create table videos
(
    id                     bigserial
        primary key,
    title                  varchar(255)                                                not null,
    description            text                      default ''::text                  not null,
    thumbnails             jsonb                     default '{}'::jsonb               not null,
    duration               bigint,
    process_type           video_process_type_enum,
    process_status         video_process_status_enum default 'pending'::video_process_status_enum,
    process_exception      varchar(255)              default ''::character varying,
    created_at             timestamp(0)              default now()                     not null,
    deleted_at             timestamp(0),
    access_type            content_access_type_enum  default 'opened'::content_access_type_enum
);

Custom enum type definition:
CREATE TYPE video_process_type_enum AS ENUM ('download', 'transcode', 'upload');

Error message:
unsupported database type: video_process_type_enum

goctl command doesn't recognize custom enum types of database. how can i resolve this issue for datasource model generation ?
Thanks in advance.


Feat/api provider example

Small HTTP API provider demo.
Easy way to get server state or to controll server.
It is not "ready to publish" rather starting point to discussion.
Endpoints:
http://localhost:5000/Home/SendGlobalMessage?msg=test msg!
http://localhost:5000/Home/ServerState
Issues:
.NET core app does not have logger

Several issues here:

Adding another host with another port is not required. Your controller can be added to the existing host. In the Startup project, simply call builder.Services.AddControllers().AddApplicationPart(typeof(HomeController).Assembly) instead of creating your host in the Program.cs of the Startup project.
The static variable for the game server is not a good idea. It would only work for one of all game servers. Better inject the GameServerContainer or the IDictionary<int, IGameServer> by adding them to the constructor of the controller.


Invert Regular Expression Matches

Challenge http://freecodecamp.com/challenges/waypoint-invert-regular-expression-matches-with-javascript has an issue. Please describe how to reproduce it, and include links to screenshots if possible.
Spaces do not have case so the ignore case flag is superfluous.

Dear camper, your issue is related to: https://github.com/FreeCodeCamp/FreeCodeCamp/issues/2124 and https://github.com/FreeCodeCamp/FreeCodeCamp/issues/2000.
Please see Help I've Found a Bug.


Requests

Hey @DarkTussin i love the application if i may can i suggest a few things?
Instead of having a GUI let the the application be a basic console application where user drops the folder he would like to encrypt over the LiteLock.exe a console window will open up and ask for password once password entered "Are you sure you would like to encrypt this folder Yes or No" on command yes zip up file and encrypt it. this very handy and light

Hi @di48l069 thanks for the suggestion, but I'm not sure that anything is gained by using a console application over a GUI application. I can create a console version, but using drag and drop in a legitimate console is very cumbersome and hacky (See here: http://stackoverflow.com/questions/12662778/how-do-i-get-file-paths-of-items-dropped-onto-a-console-application-window).
One suggestion was to make a GUI application that looks like a console (console emulator), but at that point, it is still a GUI application and you're not gaining anything.

Hi @DarkTussin Yes i was suggesting

After rereading, if you're suggesting that you just drag it directly onto the EXE itself, that might be something worth adding that would be relatively simple.

Honestly will just look cool i'm not big fan of GUI sorry

This functionality has been added in the latest release, however I don't think you will notice too much of a gain in speed and the GUI remains largely unchanged. You can now drag and drop files directly onto the EXE, select (by clicking) either Encrypt/Decrypt and enter your password. It will automatically close when it is complete, so it may be slightly faster, but I think a better solution is implementing context menus which I will add in the next release.

:+1: Thanks


Get rid of org.json

Spring Boot does not provide dependency management for org.json so a migration is in order. If you are using Jackson, it has a nice programmatic API to read/write JSON documents.

Duplicate of #233


Events inside node

Can we have click/mouseover events inside the badge. Clicakble badges. is that possible ?

Sounds reasonable, I will add to list of future enhancements.

Thanks, this one I had done it. Hats off to the clean and optimized code.


fix online softmax where there are inf's in the input

PR Category

Operator
Type of Change

Bug Fix
Description

Fix online softmax where there are inf's in the input. Since online softmax algorithm is used in loop-style softmax-kernel.
The update rule for m & z is(note that we use a binary combine & reduce in epilogue style):
m = tl.full([TILE_N], value=float("-inf"), dtype=tl.float32)
z = tl.full([TILE_N], value=0.0, dtype=tl.float32)
for ...:
  inp = tl.load(input_ptr + n_offsets)
  m_new = tl.maximum(m, inp)
  z = z * tl.exp(m - m_new) + tl.exp(inp - m_new))
  m = m_new

It is possible that the new_new is still -inf, thus m - m_new and inp - m_new are nan. To fix this, we need to skip those -infs, they contribute nothing to the normalizer z.
Here is the fix.
all_neg_inf = m_new == float("-inf")
z = tl.where(all_neg_inf, z, z * tl.exp(m - m_new) + tl.exp(inp - m_new))
m = m_new

Issue

Progress

[ ] Change is properly reviewed (1 reviewer required, 2 recommended).
[ ] Change is responded to an issue.
[ ] Change is fully covered by a UT.

Performance

The heuristics looks pretty heavy. I think libentry could help alleviate that.

Added now.


[Bug]: ci-kafka test workflow started frequently failing

What happened?
ci-kafka test workflow started frequently failing
Steps to reproduce
.github/workflows/ci-kafka.yml
Expected behavior
tests should succeed
Relevant log output
integration.go:203: trace not found
    integration.go:203: trace not found
    integration.go:207:
        	Error Trace:	/home/runner/work/jaeger/jaeger/plugin/storage/integration/integration.go:207
        	Error:      	Should be true
        	Test:       	TestKafkaStorage/GetTrace
    trace_compare.go:57:
        	Error Trace:	/home/runner/work/jaeger/jaeger/plugin/storage/integration/trace_compare.go:57
        	            				/home/runner/work/jaeger/jaeger/plugin/storage/integration/integration.go:208
        	Error:      	Expected value not to be nil.
        	Test:       	TestKafkaStorage/GetTrace
--- FAIL: TestKafkaStorage (10.64s)
    --- FAIL: TestKafkaStorage/GetTrace (10.05s)
FAIL
FAIL	github.com/jaegertracing/jaeger/plugin/storage/integration	10.661s

### Screenshot

_No response_

### Additional context

It could be timing issue, like not waiting long enough for Kafka broker to start properly before running the test. Just a guess though, need to look through the logs to confirm that's the case.

### Jaeger backend version

_No response_

### SDK

_No response_

### Pipeline

_No response_

### Stogage backend

_No response_

### Operating system

_No response_

### Deployment model

_No response_

### Deployment configs

_No response_

We should a step to the workflow to show kafka container logs when the test step fails.

The issue seems to be the the recent versions of bitnami/kafka. I pinned it to 3.1.0 in #4421 and the tests started passing again.


Add Scripting Options

@malave pointed out a library vm2 that allows sandboxed javascript. and suggested that we could implement it two places: pre webhook and post webhook. The goal of pre-webhook would be to format the CSO for webhook and post would be to format the data for responses.
Trying to limit the scope for the first pass:
Pre-Webhook
This should be passed the CSO It can either return a CSO object or a request object. where request is url, method, and payload.
Post-Webhook
This should be passed the original CSO and the webhook response. it is expected to return a response object. This response object is then what is passed to the Agent Responses.
@malave all of the above sounds good? See #151 for how I am envisioning the UI for this.

So it looks like we can pass the CSO in with the sandbox parameter.
Would we want to freeze it? forcing them to return a copy, I don't know.
Obviously we need to be checking for errors.

I am going to put the UI design for this one on #151

Combining with #276


Do not throw error for TypedArrays

Hi @blakeembrey!
This tiny enhancement recognizes typed arrays instead of throwing error.

What's the use-case of having TypedArray's not error? Just wondering, seems like you'd just not run arrayFlatten on them.

Coverage decreased (-1.5%) to 98.485% when pulling 2d33a694779092930ba8515e397d5a735715c3b6 on dfcreative:patch-1 into d5446b9a5e373c3dfa73b9275c53fc9c32ef0979 on blakeembrey:master.

One use case is colormap module.
By default it returns nested colors, and it is handy to have them flattened.
But passing them to webgl requires array to be converted to Float32Array, as it is done in gl-spectrum.
So here the same data can be stored as a nested array, plain array or typed array. And it would be really handy to call flatten to ensure any type of array-like data is flattened.

Though ok, the package is prefixed array-, and it has some old-node support, so maybe makes sense to leave it as is.
I found that flatten fits better for this use-case. Sorry for disturbing.

@dfcreative If you want to flatten anything into an array, just call flatten.from(...).

Ok, thanks. To my misfortune I did not read readme after main use-case.
Is there really a specific need for array-ish structures? What is the point of main entry then, except for checking that the argument is strictly an array? Some performance boost?

No performance difference. It's there for developer UX. In case someone tries to use it with something unexpected (but works) like a string.

But the same may happen with flatten.from, how does...
Ok, array check does not justify 4 methods in API where there really should be one. And that is what makes UX, not the validation with fictive usefulness.
That is just opinion, nevermind.

If you looked at the README, it's one method validated and one method not. I can't quite understand the rest of what you said, sorry.


How to resolve the problem "error  dagnn.DagNN.loadobj (line 26)     block = constr() ;   Could not find an exact match for 'XCorr' (case sensitive)" Thanks!

I   have same problem. Are you solve it?


GitHub

Type: Performance Issue
General comment:  chat gets too far ahead of design, programming, and  testing.  Adds variables names inconsistently, and tries "too hard" to create code.   Just the same, I appreciate it.  But it can be irritating.
 A specific concrete issue would be helpful. You can copy the whole conversation by right-clicking.

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


Receiving notifications in the console but turning into a notifcation on the device

Sorry this is probably an incredibly simple question but i am receiving the notification in the console as per the example. But i cant see a method to display the console logged notification as a notification rather than in the console?

FCM.presentLocalNotification() also behavior depends on type. of payload (notification or data)  and app running in foreground or background

thanks

@hosusan6  can you close this?


Create Command Line tool for mac-os

Certainly! Here are some reasons why you should consider using the command-line tools mentioned above:

Homebrew: Homebrew simplifies software installation and management. It's a quick and efficient way to install, update, and manage open-source software on macOS. You can easily access a wide range of packages and libraries.

Git: Git is essential for version control and collaboration, making it crucial for software development. It allows you to track changes in your code, collaborate with others, and manage projects effectively.

Python: Python is a versatile programming language used for web development, data analysis, automation, and more. It comes pre-installed on macOS, making it readily available for various tasks.

Node.js: Node.js is ideal for server-side JavaScript development. It enables you to build scalable and high-performance applications, particularly for web servers and network applications.

curl and Wget: These tools are excellent for downloading files from the internet, making HTTP requests, and automating web-related tasks, like web scraping or downloading resources.

tmux: tmux is valuable for terminal management. It allows you to create and manage multiple terminal sessions within a single window, making it easier to multitask and work efficiently.

Vim or Neovim: These text editors provide a powerful and efficient editing experience. They are highly customizable and come with a variety of plugins to enhance your productivity. Many developers love them for their speed and extensibility.

jq: jq simplifies the task of parsing and manipulating JSON data. It's a handy tool for processing JSON output from various APIs or log files.

htop: htop is an advanced process viewer that provides a more user-friendly and detailed view of system processes. It's especially useful for monitoring system resource usage.

Midnight Commander (mc): mc is a file manager that helps you navigate and manipulate files and directories in the terminal. It offers a visual and user-friendly alternative to using 'cd' and 'ls' commands.

The Silver Searcher (ag): ag is a faster alternative to 'grep' for code searching. It's valuable for programmers who need to search through codebases quickly and efficiently.

fd: fd is a simple and fast file searching tool that makes finding and working with files in the terminal straightforward. It's more user-friendly than the traditional 'find' command.

 They provide the flexibility, speed, and features needed to perform a wide range of tasks on your macOS command line.

@aryangandhi05 thanks for contribution. Please add apps to application.json instead of readme.  Readme is automatically generated.


Unclear precedence of AND and OR

I couldn't find anything in the documentation with regards to the precedence between AND and OR.
Consider the following test:
[Test]
public async Task And_Or_Precedence_Test()
{
    char[] sut = "CD".ToCharArray();

    await Assert.That(sut)
        .Contains('A').And
        .Contains('B').Or
        .Contains('C').And
        .Contains('D');
}

I would have expected the test to fail, as I would expect the condition to be interpreted as (A && B) || (C && D), to be in line with the operator precedence in C#.
However, this test succeeds, because A && B || C && D seems to be interpreted as (((A && B) || C) && D).

Did the analyzer kick in?

No, I didn't see any analyzer...

Hmm I'll need to check then.
There should be an analyzer flagging mixing of and+or..for the reason you mentioned, it can be confusing how the logic will evaluate.
So the analyzer allows chained ANDs or chained ORs, but should flag if a mix is used.

Hmm, after restarting Visual Studio, I could see the analyzer:

It was probably an issue with the preview version.
However, as this is only an indication (that could be turned off), wouldn't it make sense to make an explicit choice of precedence in these cases?
Or state, that this is not supported and throw an exception when both are mixed, so as not to lead to false positives in tests?

Probably throwing would be better, as:
await Assert.That(sut)
        .Contains('A')
        .And.Contains('B')
        .Or
        .Contains('C');

await Assert.That(sut)
        .Contains('A')
        .And
        .Contains('B')
        .Or.Contains('C');

Both are the exact same code, but due to the formatting/placement of it you might think it means something different to what it does.


Handling quoted-string parameter values correctly

Parameter values can be quoted strings which:

can be empty (currently rejected)
can contain escape sequences (e.g. \") (currently rejected)

At last fixing the later one can cause a problem with Name::is_str(&self) -> str,
which is not returning the underlying string representation (it strips the quotes).
But neither is it returning the content as a string as it can not unescape the
escape sequences. You still can treat it as always returning the inner part
of the value as quoted string, which would be correct, but I fear people won't do that.

For the next braking release I would have following idea:

remove Name::is_str (or better have Name for names and Value for values and do not have is_str on Value)
introduce str_repr(&self) -> &str returning the underlying str representation including quotes if there had been any, this is nice if you e.g. can only allow ascii values as you now do not need to recheck them if they are not quoted
introduce to_content_str(&self) -> Cow<'a, str> which:

returns Borrowed(self.str_repr()) if it's not quoted
returns Borrowed(&self.str_repr()[1..self.str_repr().len()-1]) (+- optimiz) for quoted value not containing escape sequences
returns Owned(unquoteself.str_repr())) which returns the string represented by the quoted-string by undoing any quoting escapes etc.

If this is considered a good solution I can work on this and make a pull request.
The question would be:

go the full way (Name=> Name+Value, etc.) which is a braking change
or add str_repr + to_content_str to Name braking changes can be done later together with others needed for the 1.0 release

Uh, I guess we should go with the second choice?

It also probably should be decided if PartialEq<str> compares the underlying representation or the actual content.
E.g. is mime parameter a="abc" equal to abc or "abc" or both, and what is with "\a\b\c"
I would go with what currently is more or less the case, a content based eq comparsion, i.e.
the param of a="abc", a=abc, a="\a\b\c" are all equals abc but not e.g. \a\b\c as the content does not contain any escapes, only the representation does.

Why can't Name::as_str return the contents if the string is quoted? This should probably be made to work:
let mime: Mime = "text/plain; foo=bar; baz=\"quux\"".parse().unwrap();
assert_eq!(mime.get_param("foo").unwrap(), "bar");
assert_eq!(mime.get_param("baz").unwrap(), "quux");

Because it would not be the content, but a partial representation and would easily lead to bugs.
The only reason why it currently works is because the parser wrongfully rejects quoted-pairs
in quoted-strings (something similar to  \ escapes).
The content of foo in a/b; foo="b\ ar" is b ar not b\ ar.
But the representation of foo is "b\ ar" but could also be e.g. "\b ar".
As you do not want to introduce any unnecessary allocs Name::as_str would still return &str
which means it can not unquote quoted strings correctly as it can only remove the encapsulating
quotes but not unquote quoted pairs.
But it's also not  returning the representation. And even if, many people would probably not be aware of
the fact that it does so and would thing that if get_param("foo").unwrap() == "bar" then get_param("foo").unwrap().as_str() == "bar" but this would not hold up if bar was
represented as e.g. "b\ar".
So not having as_str is to help people to not shoot themself in the foot when it comes to less commen mim-type parameter values.

Also there is no reason why your example should not work, you just can't implement PartialEq<str> with as_str. What basically should work is:
let mime: Mime = r#"text/plain; foo=bar; baz="quux"; foo2="a\ b\"c"; foo3="\abc"; foo4=abc"#.parse().unwrap();
assert_eq!(mime.get_param("foo").unwrap(), "bar");
assert_eq!(mime.get_param("baz").unwrap(), "quux");
assert_eq!(mime.get_param("foo2").unwrap(), r#"a b"c"#);
assert_eq!(mime.get_param("foo3").unwrap(), "abc");
assert_eq!(mime.get_param("foo4").unwrap(), "abc");
assert_eq!(mime.get_param("foo3"), mime.get_param("foo4"));

//things which should fail
//here the content is "\abc" which would be represented by "\\abc"
assert_ne!(mime.get_param("foo3").unwrap(), "\abc");

Uh, I just noticed that the current version does parse escape sequences in the code, either I messed up when testing or it was fixed at some point.
Nevertheless it's still not handling it in a ~acceptable~ good way wrt. as_str.

It also accepts "\\" ( halve a quoted pair ) which is not a valid quoted-string.
(while is is slightly ambiguous in the definition appearing in the rfc for HTTP/1.1
it is much more clearly defined in other RFC's.

This has been merged into master and will be released very soon.


(maint) Add test artifacts to PMT Ignore

Previously some artifacts created from testing, for example Beaker, the DSC
module are accidentally added to the package during a puppet module build.
This commit adds log, junit and tmp to the Puppet Module Tool ignore file.

👍


enabling handlebars view for main page and adding screenshot

Enabled the handlebars view for the main page and commented out the json return so that I could take a screenshot.
Screenshot now included in the repo in the assets folder

amazing!


Icon not showing

When bearing is supplied, the icon will not show & bearing will only show once.

I've attached a sample I have extracted from the websocket sample.txt
This was working in previous versions.

Sorry - how was that sample created ? Doesn't seem to be a format I recognise.

Sorry forgot to mention the sample file contains 4 'streams' I extracted from the web socket output (in chrome developers tool on /worldmap).
Within node-red I am passing the 'worldmap node' and 'tracks node' a payload in this format:
msg.payload = { 		name: 'CE', 		lat: 35.9041603, 		lon: 14.512736, 		speed: 8.38875, 		bearing: 245, 		icon: "ship", 		iconColor: "red" 	}

got it - thanks.
Pushed version 2.1.1 with fix (I think)
please let me know. Thanks

I took the source files from git and replaced the files in the node_modules but the issue still somewhat there. The only thing different this time is that the bearing line is never displayed (and the icon still not visible)

I can see this wi th the original sample you supplied (once edited)

can you try v2.1.1 (now that it is on npm) - make sure you flush local cache etc.

I can confirm that it now works!


Own prefix

Is it possible to add own prefix to standardHeaders?
I would like to use "draft-6"
ratelimit-limit: 15
ratelimit-policy: 15;w=86400
ratelimit-remaining: 0
ratelimit-reset: 81644

But add prefix like 'apiname'
apiname-ratelimit-limit: 15
apiname-ratelimit-policy: 15;w=86400
apiname-ratelimit-remaining: 0
apiname-ratelimit-reset: 81644

Is it possible to change it in handler?
Thanks :)

This is not possible as we are following the draft's RFC, which you can also see here - https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-ratelimit-headers-06#name-ratelimit-header-field-defi
But if you still want to do something like this, you can create a middleware, placed before placing the rate-limiter so that you can run it after the headers have been set. Then you can use the context to modify the headers and return the new response.

Thank you very much, that makes sense. I will go with the new middleware :)