NVSS 484 - Validate Jurisdiction ID in message and URL param.

This PR adds a check to validate the jurisdiction ID in the message submission parameter resource against the jurisdiction ID in the URL endpoint parameters.
Supports Batch /Bundles which will return response bundle with BadRequest entries and /Bundle which will just return a BadRequest.
Had to update several old tests to conform with this new validation. Most just needed a message with the parameters resource in it, some had inconsistent jurisdiction IDs that needed updating.

Code changes look good, one last thing is to add this validation check to the Validation md file here https://github.com/nightingaleproject/Reference-NCHS-API/blob/main/APIValidationChecks.md that describes the validation so we can share the changes with the STEVE team and they can implement the same validation on their end.

Code changes look good, one last thing is to add this validation check to the Validation md file here https://github.com/nightingaleproject/Reference-NCHS-API/blob/main/APIValidationChecks.md that describes the validation so we can share the changes with the STEVE team and they can implement the same validation on their end.

Updated docs with this


Can not auto scroll with nested components

From : https://github.com/SortableJS/Vue.Draggable/issues/355#issue-298361009
Jsfiddle link
https://jsfiddle.net/6pk7zxLq/18/
Step by step scenario
If i have a draggable group, in which i can drag elements on same list with self scroll and between more lists with outer scroll, auto scrolling only works on inner lists
Expected Solution
Enable auto scroll on both lists or provide an option to choose which element will scroll horizontally and which element will scroll vertically

I think this is more a problem with having nested scrollable containers than sortable.  In your example, 'm able to auto scroll the outer list by dragging an element from the inner list into the area with the blue background.  However the outer-list will not auto scroll if I'm dragging over an inner list because the inner list is trying to scroll.

Maybe I'm missing something. Is there a way to achieve that behavior without having nested containers?

It really depends on the page layout.  I think it'd be less of a problem if your inner scrollable containers are smaller and in the center of the page.  Or don't make the inner containers scrollable and allow them to grow.

It works fine for me...

Hi Flame2057,
Could you please let me know how it works fine for you, what are the differences between the fiddle above and your setup? Or if you could create fiddle with that works, so I can see the difference myself?
Thanks

Never mind, I see your issue. You want it to autoscroll on the X axis even if the element is above another list?

Unfortunately no. Try to move a card from first column to last. Behavior I was hoping for is something like trello.

Try setting the option forceFallback:true. HTML native DnD has it's own autoscroll method that doesn't work the same as the implemented autoscroll.

@mgnjatovic-kushim Have you tried this?

I've resolved issue by adding div around whole component, and implementing the scroll when card is dragged manually. That's the only thing that worked. Force fallback was set to true whole time, not making any difference.

@Flame2057 I think you did it, looks good now


Generate thumbnail URL in MXKAttachment

Rather than random things setting the property on it as & when

Oh yes, I forgot the opening brackets. Hard habit to break. :/


Define default subcommand.

It allows to omit the lint subcommand in a call and makes linting more convenient.
Before:
tuist swiftlint lint
After:
tuist swiftlint

I don't have a strong opinion about it. Do you think it would be better to rename it? 🤔

I don't have a strong opinion about it. Do you think it would be better to rename it? 🤔

no strong opinion, too. But I would probably rename it.
Using just lint is:

easier (shorter)
more flexible (e.g. tomorrow we might add some linting which is not part of swiftlint, or switch to another tool)

One more thing.
When we change the main command to lint then the full call will change to:
tuist lint lint

Of course with default subcommand it will be possible to call it as tuist lint.
We have to consider other subcommands too. After the change it will be:
tuist lint version
tuist lint version-swiftlint

For me it still looks good.
Anyway how does it look like for you? Does it change your mind? @danyf90

The main one could be tuist lint swiftlint.
The version command prints the version of the plugin or of the swiftlint?

The main one could be tuist lint swiftlint.

I like it

The version command prints the version of the plugin or of the swiftlint?

Both. We have the one for plugin version and the one for swiftlint version.


[guide] GCE preemptive instance deployment

This weekend, I just spend some time with GCE and trying to make some great fastai dev environment.
That's with preemptive instances.
This is a set of scripts which I tested many times for different cases.
May be this is useful for others setup a powerful fast.ai node for a very low price.
Guide: https://arunoda.me/blog/ideal-way-to-creare-a-fastai-node
Some features of this:

create a node with the Tesla v100 GPU for just $0.8/hour
create a node with the Tesla K80 GPU for just $0.2/hour
create a node with No GPU for just $0.01/hour
switch between these nodes whenever needed
install new tools and save data (won't get deleted when switching)
run notebooks by just starting the server (no SSH needed)
create a password protected jupyter notebooks environment

I can confirm those GPU prices.
@arunoda nice to see you here - I used to use your tools in Meteor-land. Looking forward to seeing what great things you create!

Thanks for the post! Would be great if you could update your guide to take advantage of the fastai/pytorch instances. https://blog.kovalevskyi.com/google-compute-engine-now-has-images-with-pytorch-1-0-0-and-fastai-1-0-2-57c49efd74bb
I'll close this issue since this discussion is best had on the forum.


[SPARK-34479][SQL] Add zstandard codec to Avro compression codec list

What changes were proposed in this pull request?
Avro add zstandard codec since AVRO-2195. This pr add zstandard codec to Avro compression codec list.
Why are the changes needed?
To make Avro support zstandard codec.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Unit test.

Test build #135535 has started for PR 31673 at commit 136c5b0.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/40116/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/40116/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/40116/

I made a PR. It will unblock this issue.

https://github.com/apache/spark/pull/31674

I verified the new ZSTD JNI library on top of this PR. AvroV1Suite and AvroV2Suite passed.

Could you rebase this PR to the master?

Test build #135535 has finished for PR 31673 at commit 136c5b0.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Test build #135541 has started for PR 31673 at commit 309de76.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/135535/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/40122/

Test build #135541 has finished for PR 31673 at commit 309de76.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/135541/


Add ability to edit Certification so I can change description

version - 0.56.0-rc1
Comments:  Can't edit a cert.  Since there is a description, i think I should be able to change that at the very minimum.

+1 , though I think the description is used as an identifier so changing it might be problematic.
The case I'm thinking of is when you are replacing a soon-to-expire certificate.  In this case, you want to keep the original name and identification if it is referred to by various load balancers, so you cant create a new one with a different name.  It would be helpful to be able to go in and just replace the crt PEM (and then you would do a rolling restart of all the relevant load balancer containers)

@sshipway You may be thinking of Name, which is used in rancher-compose..  Descriptions are always strictly for humans to store arbitrary notes and see it later.
The cert and chain are editable in the API, but not the private key (I think just as a side-effect of it not being readable).  So there's no UI for it but updating a cert theoretically works now if you haven't re-keyed.
In general I think we were thinking you're better off adding a new cert and updating balancers to use it, which you could easily un-do or test on a dummy balancer.  As opposed to editing the cert, immediately breaking everyone if you, say, don't notice that the middle chain cert changed this year, and having no way to easily go back to the previous state.

Ah yes, I'm confusing Name and Description a bit.  It's good that they can be edited via the API (I've just verified that it works fine under 0.51), but it would be easier if they could be edited via the normal UI as well.

Version - v1.0.1-rc3


fix(telegram): telegram sticky file mime type

Fixes #135

Codecov Report

Merging #136 (55d5106) into master (88f6f23) will not change coverage.
The diff coverage is n/a.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@           Coverage Diff           @@
##           master     #136   +/-   ##
=======================================
  Coverage   81.83%   81.83%
=======================================
  Files           1        1
  Lines         424      424
  Branches       86       86
=======================================
  Hits          347      347
  Misses         77       77

💢

啊这


Can you please provide a working example piece of code ?

heres a better alternativ: https://codesandbox.io/s/notistack-redux-example-vk9ik


fix: use proper config for mp

@okhat @Anmol6 fixing a small issue with the way we merged the previous avoid MP PR -- forking should be avoided if either the root or the run config specifies it, not just run config (e.g. if you run it on a no-MP platform it should be set&forget)
(apologies for the import sorter running...)

Happy to merge but I vaguely suspect there’s a cleaner way since the configs typically are merged into one thing that takes precedence

I thought so as well, but it seems like the launcher doesn't care about any config that isn't the run config? Because it's initiated & launched as:
launcher = Launcher(encode)
launcher.launch(self.config, collection, shared_lists, shared_queues, self.verbose)

So it never actually gets passed any config but the Run() config at initialisation time when it runs this:
self.run_config = RunConfig.from_existing(Run().config, run_config)

And then the launch() function only checks self.run_config rather than the Indexer's config that it gets passed... The fix could be to have Launcher take the Indexer config in the first place though!

Maybe this i the missing piece, which can fix other bugs too:
new_config = type(custom_config).from_existing(custom_config, self.run_config, RunConfig(rank=new_rank))

This: ```python
new_config = type(custom_config).from_existing(custom_config, self.run_config, RunConfig(rank=new_rank))
gives precedence to self.run_config, so the problem remains We'd need to do it the other way around so the default `False` doesn't override the avoid_fork parameteR:
```python
new_config = type(custom_config).from_existing(self.run_config, custom_config, RunConfig(rank=0))    # rank=0 as this one is assigned with the if nranks==1

But then we're giving precedence to all custom_config arguments, which is a new behaviour... I think it'd make sense to give precedence to the hard-passed args but is this definitely what we want?

I think precedence ignore DefaultVal. Does that make sense? Only things explicitly set are factored in

Thought so as well... but it doesn't seem to be the behaviour here?
        custom_config.avoid_fork_if_possible = True
        if self.nranks == 1:
            new_config = type(custom_config).from_existing(custom_config, self.run_config, RunConfig(rank=0))
            print(new_config.avoid_fork_if_possible)

prints False, but
        custom_config.avoid_fork_if_possible = True
        if self.nranks == 1:
            new_config = type(custom_config).from_existing(self.run_config, custom_config, RunConfig(rank=0))
            print(new_config.avoid_fork_if_possible)

is appropriately True 🤔

Ok merged while we understand this better

I think I know why that is: run_config is spawned via __new__ in Run, which uses run_config.assign_defaults().
assign_defaults overrides the normal default config assignment, and considers adds every DefaultVal it sets to self.assigned, meaning they don't get overridden later on:
    def assign_defaults(self):
        for field in fields(self):
            setattr(self, field.name, field.default.val)
            self.assigned[field.name] = True

(cc @Anmol6 for the explanation)


Add defaultValue to @MappableField()

I had a use case where I got a null from an API, but my String as not nullable (empty values were expressed as an empty string).
It would be nice if we could set a default value for fields when the JSON is null, something like:
@MappableField(key: "avatar_blur_hash", defaultValue: "")
final String avatarBlurHash;

Default value would work for any type, except DateTime (which cannot be const and thus cannot be expressed in an @attribute).

I have done something like this for when I make breaking changes to my Firestore schema:
class BackwardsCompatibleHook<T> extends MappingHook {
  const BackwardsCompatibleHook(this.defaultValue);

  final T defaultValue;

  @override
  Object? beforeDecode(Object? value) {
    if (value == null) {
      return defaultValue;
    }
    return value as T;
  }
}

I use it like this:
@MappableField(hook: BackwardsCompatibleHook(false))
final bool aboveReportThreshold;

This mostly works, though I'm currently debugging an issue with a List<String> field that comes back as List<dynamic. It actually breaks without this hook in place so I don't think it's the culprit.
In general though I think this would be nice if it's not already implemented and I just missed it.

This is already supported from dart, without hooks.
Just alter your class:
class Foo with FooMappable {
Foo({
    this.shouldNotBeNull = '',
})

@MappableField(key: 'key')
final String shouldNotBeNull;
}

This is already supported from dart, without hooks.
Just alter your class:
class Foo with FooMappable {
Foo({
    this.shouldNotBeNull = '',
})

@MappableField(key: 'key')
final String shouldNotBeNull;
}

The problem with this is the parameter on the constructor then becomes optional which I don't want. Also this would limit you to const only defaults which will probably be fine most of the time but that can't be guaranteed.

For your first point, I have no solution. If you build items programatically you will have to deal with it.
For your second point, annotations can only have const only.

you will have to deal with it

Seriously?
So we can't ask for features, we only have to "deal with"?
The feature is needed and is useful.  You are not required to talk.

you will have to deal with it

I did not mean that in a passive aggressive way :). There is a lot of things you have to "just deal with it" daily in programming.
That said, I am not the maintainer nor am I affiliated with him, but I wouldn't implement this feature into the library as dart_mappable is not just a json serialisable clone. The reason I am using it is because it so nicely fits into everything that the dart can do.
Now that said, your feature request already is feasible 1 way or another, with hooks.
(did not test this code, typed it directly into github, there might be errors)
class DefaultValueHook<T> extends MappingHook {
  const DefaultValueHook(this.defaultValue);

  final T defaultValue;

  @override
  Object? afterDecode(Object? value) {
    if (value == null) {
      return defaultValue;
    }
    return value;
  }
}

Now that said, your feature request already is feasible 1 way or another, with hooks.
(did not test this code, typed it directly into github, there might be errors)
class DefaultValueHook<T> extends MappingHook {
  const DefaultValueHook(this.defaultValue);

  final T defaultValue;

  @override
  Object? afterDecode(Object? value) {
    if (value == null) {
      return defaultValue;
    }
    return value;
  }
}

This is the exact same hook I recommended above with a different name haha.
RE: const only in annotations, that could probably be worked around in using static accessors. I haven't yet had my coffee though so won't go into investigating it until I actually need it :)

Hi, thanks for this request. I have thought of this before, but not added it for the following reasons:

As pointed out already, you can add default values through the constructor. Thats how dart_mappable was initially designed. This ofc. makes the parameter optional, but I consider this a rather small inconvenience.

Also as pointed out, there is a workaround using hooks. Ofc. not as convenient as a annotation property, but at least possible.

I hope you understand that because of this, this feature request doesn't have a high priority right now for me. I'm not saying I will never add it, but probably not anytime soon. Just to manage expectations.

Regarding the limitation of const default values, you can use initializers like this:
class Foo with FooMappable {
  Foo({ String? value }) : value = value ?? computeDefaultValue();

  final String value;
}

String computeDefaultValue() { ... }

This works as long as the parameter has the same name as the field.

import 'package:dart_mappable/dart_mappable.dart';

final class DefaultValueHook<T> extends MappingHook {
  const DefaultValueHook(this.defaultValue);

  final T defaultValue;

  @override
  Object? beforeEncode(Object? value) {
    if (value == null) {
      return defaultValue;
    }

    return value;
  }

  @override
  Object? beforeDecode(Object? value) {
    if (value == null) {
      return defaultValue;
    }

    return value;
  }
}

This solves the issue. For non const primitives (and I can think only of DateTime), we can always do some iso <-> datetime conversion (since I need my classes to have a const constructor).


Update the "Integrate with other plugins" section

added a link to each plugin
visually separated plugins
added instructions to install with packer

I can't figure out what does 'vmlens.lua' file does and what plugin does it relate to so I left it as it is.

Thanks, LGTM.


Redshift data import issues

System information:

Operating system (distribution) and version: Windows 10
DBeaver version: 21.1.4

Connection specification:

Database name and version: Redshift 1.0.29551
Driver name: https://s3.amazonaws.com/redshift-downloads/drivers/jdbc/<IP_ADDRESS>9/RedshiftJDBC42-no-awssdk-<IP_ADDRESS>9.jar
Do you use tunnels or proxies (SSH, SOCKS, etc) SSH

Describe the problem you're observing:
Following 2  scenarios while performing data import

Using an upper-case table name "UPPERFILE" and running an import fails, as Redshift stores that as "upperfile" by default.
Using special characters like "-", " ", "(" escapes the column name with double quotes. For example a column name like "company-name" is escaped. And subsequently, the data import fails in all such scenarios

Steps to reproduce, if exist:
Use the below sample file and try to import it to a new table "test_status_detail"
smallest_file_column_complicated.csv

Use the same sample file and try to import it to a new table "TEST_STATUS_DETAIL"

It is not Redshift-specific issue. It is a side effect of #7911 fix.
Fixed

The Using an upper-case table name "UPPERFILE" and running an import fails, as Redshift stores that as "upperfile" by default.
is still an issue.

Verified

I have the same issue with MySQL to SQLite export/import. On 21.1.4 and 21.1.5, rollback to 21.1.3 works fine as workaround.


Add jQuery 3 compatibility

removeAttr cannot be used with boolean attributes (required).
Instead, use prop('required', false).

@jcrben Rebased and conflicts resolved. Thanks for reviewing!

Are you interested in becoming a maintainer?  I no longer use this library.

I don't use this library much any more either but I'm happy to help out from time to time.


Error when restarting Language Server

When running ".NET: Restart Language Server" vscode command, I get the following error:

Environment data
dotnet --info output:
.NET SDK:
 Version:   7.0.302
 Commit:    990cf98a27

Runtime Environment:
 OS Name:     arch
 OS Version:
 OS Platform: Linux
 RID:         arch-x64
 Base Path:   /usr/share/dotnet/sdk/7.0.302/

Host:
  Version:      7.0.5
  Architecture: x64
  Commit:       8042d61b17

.NET SDKs installed:
  6.0.408 [/usr/share/dotnet/sdk]
  7.0.302 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.16 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.16 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

VS Code version: 1.79.0
C# Extension version: v2.0.206
Steps to reproduce

Install preview version of C# extension
Open any C#/.NET project and wait for language server to start
Open command palette and run ".NET: Restart Language Server" command
See error (screenshot)

Expected  behavior
No error is shown
Actual behavior
See attached screenshot
Additional context
--

@allisonchou Razor bug, FYI


DeepAR + NegativeBinomialOutput performance degradation after upgrading from v0.4.2 to 0.5.0

Continuing the discussion started as a part of #872 regarding the experienced performance degradation of NegativeBinomialOutput (NB) with DeepAR after upgrading from v0.4.2 to v0.5.0,  I thought to open a dedicated issue for this as I've conducted some extra steps to try to understand this without major success except narrowing the problem down to the convergence of the algorithm after the scaling change done in #719 .
With the data I am modelling with NB in 0.5.0, I tried various hyperparameter settings including changing the learning rate, but all of the trained models had the same issue of too high forecasts and poor convergence. This seems to be a problem especially for the time series in the data for which the scale of the series is high.
Today I tried to replicate the issue with some synthetic data, and managed to get similar behaviour rather easily. The code to replicate is attached below. Basically the algorithm with NegativeBinomialOutput doesn't seem to converge very well and I end up with forecasts that are way above the actuals. I compared this with e.g. the StudentTOutput and PoissonOutput which both work fine out of the box (the same is true for the real data I am working on).
The created data (first 16 time series) look like this:

After training the models and comparing the forecasts on the test sets the results (first 64 series) look like this, the NB forecasts are way off even though the other forecasts are fine, and the only change in the model definition is the distr_output:

To try to isolate the problem, I tried changing the line that was changed in #719 for the NB back to what it was in 0.4.2 i.e. alpha = F.broadcast_mul(alpha, F.sqrt(scale + 1.0)), and with this I see better convergence and similar results to Student-t and Poisson outputs. So there seem to be some convergence/other issues with the new scaling that I have not managed to find a way to fix.
This really makes me wonder whether I am missing something important in the optimiser settings or if there is an issue somewhere else. Any help in understanding this is appreciated. In the meanwhile, I am using the Poisson/Student-t Outputs to give me comparable results in v0.5.0 to what I used to get with v0.4.2 and the NB.
The code to produce the results below:
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import mxnet as mx

import gluonts
from gluonts.dataset.artificial import ComplexSeasonalTimeSeries
from gluonts.dataset.common import ListDataset
from gluonts.distribution import PoissonOutput, NegativeBinomialOutput, StudentTOutput
from gluonts.model.deepar import DeepAREstimator
from gluonts.model.predictor import Predictor
from gluonts.trainer import Trainer
from gluonts.evaluation.backtest import make_evaluation_predictions

# versions
print(gluonts.__version__)  # 0.5.0
print(mx.__version__)  # 1.6.0
print(pd.__version__)  # 1.0.3
print(np.__version__)  # 1.18.5

# create toy data
prediction_length = 72
dataset_length_min = 672  # 28*24
dataset_length_max = dataset_length_min + 1

artificial_dataset = ComplexSeasonalTimeSeries(
    num_series=75,
    prediction_length=prediction_length,
    freq_str="H",
    length_low=dataset_length_min,
    length_high=dataset_length_max,
    min_val=0,
    max_val=2000,
    is_integer=True,
    proportion_missing_values=0,
    is_noise=True,
    is_scale=True,
    percentage_unique_timestamps=1,
    is_out_of_bounds_date=False,
    seasonality=24,
)

# plot first 16 series
nrow = 4
ncol = 4
fig, ax = plt.subplots(nrow, ncol, figsize=(20,10))
fig.tight_layout(pad=2.0)
for i in range(nrow):
    for j in range(ncol):
        idx = i * ncol + j
        ax[i,j].plot(artificial_dataset.train[idx].get("target"))
        ax[i,j].set_title(f"series id {idx}")

# get train and test sets
train = ListDataset(artificial_dataset.train, freq="1H")
test = ListDataset(artificial_dataset.test, freq="1H")

print(f"train len: {len(train.list_data)}, train shape: {train.list_data[0].get('target').shape}")
print(f"test len: {len(test.list_data)}, test shape: {test.list_data[0].get('target').shape}")

# helpers for training and evaluation
def train_deepar(train_data, distr_output, epochs=100):
    estimator = DeepAREstimator(
        prediction_length=prediction_length,
        context_length=prediction_length,
        num_layers=1,
        num_cells=32,
        cell_type="gru",
        distr_output=distr_output,
        freq="1H",
        trainer=Trainer(
            ctx="cpu",
            epochs=epochs,
            learning_rate=1e-3,
            num_batches_per_epoch=100,
            batch_size=32,
        ),
    )
    predictor = estimator.train(training_data=train_data)
    return estimator, predictor

def get_forecasts(test_data, predictor):
    forecast_it, ts_it = make_evaluation_predictions(
        dataset=test_data,
        predictor=predictor,
        num_samples=100
    )
    forecasts = list(forecast_it)
    tss = list(ts_it)
    return forecasts, tss

# train models
mx.random.seed(42)
np.random.seed(42)

estimator_nb, predictor_nb = train_deepar(train_data=train, distr_output=NegativeBinomialOutput(), epochs=100)
estimator_poi, predictor_poi = train_deepar(train_data=train, distr_output=PoissonOutput(), epochs=100)
estimator_student, predictor_student = train_deepar(train_data=train, distr_output=StudentTOutput(), epochs=100)

# forecast
forecasts_nb, tss_nb = get_forecasts(test, predictor_nb)
forecasts_poi, tss_poi = get_forecasts(test, predictor_poi)
forecasts_student, tss_student = get_forecasts(test, predictor_student)

# plot first 64 series
nrow = 8
ncol = 8
fig, ax = plt.subplots(nrow, ncol, figsize=(20,10))

for row in range(nrow):
    for col in range(ncol):
        idx = row * ncol + col
        if idx < len(tss_nb):
            true = tss_nb[idx][-prediction_length:]
            nb = forecasts_nb[idx].mean_ts
            poi = forecasts_poi[idx].mean_ts
            student = forecasts_student[idx].mean_ts
            index = tss_nb[idx].index[-prediction_length:]
            ax[row, col].plot(index, true)
            ax[row, col].plot(index, nb)
            ax[row, col].plot(index, poi)
            ax[row, col].plot(index, student)
            ax[row, col].set_title(f"item id {idx}")
fig.legend(ax, labels=["true", "NB", "poisson", "student-t"], loc="center right")

Before we do anything about this, I just want to point out that this is a formidable bug report: thank you for putting so much effort into preparing it

The 13th place solution used gluonts==0.4.2 and mxnet==1.4.1.

We faced some issues getting newer versions of gluonts to work, so we just stuck with 0.4.2. We trained on GPU.

When I tried using negative binomial with M5 dataset on version 0.5, my results were much worse than poisson distribution.

Before we do anything about this, I just want to point out that this is a formidable bug report: thank you for putting so much effort into preparing it

Thanks! I hope this is helpful in figuring out the issue. Also good to know I am not the only one experiencing this.

@lostella one minor issue is that when scale=1.0 the transformation https://github.com/awslabs/gluon-ts/blob/master/src/gluonts/mx/distribution/neg_binomial.py#L136
scale = 1.0 + softplus(scale - 1.0) sets the scale to 1.6 which seems which ends up changing the alpha and mu

@kashif Good catch! In the interval [1, 5] the error is introduced by this is quite substantial. Have you tried changing that transformation to just clip at 1.0 (I see this was mentioned in the PR that introduced that change, but not compared/validated)?

thanks @jgasthaus so i am checking with relu etc. I need to make food for the kids and will look again by tonight

On the other hand, the series shown in the plots by @jsirol seem to have have scales in the hundreds (>> 5) where this shouldn't really be an issue.

ok so i an alternative way which i think is easier to think about is that the NB is the discrete form of the Gamma(alpha, beta) in the sense that NB is just poisson with the rate sampled from a Gamma(alpha, beta) so the scaled rate say c*rate needs to be from Gamma(alpha, beta/c). Thus  If I use the total_count and logit parametrizaton of the NB as I have it in pytorch then the scaling only means logit += log(scale). This formulation is simpler to code as well and then the above works:

I can send a PR with this method.

@jsirol can you confirm that #909 fixes this?

@lostella Looks to be working on the latest master, I get expected results with the toy dataset above and my real data which also contains timeseries of varying scales. Thanks @kashif for the fix and the comments on the issue, I think I got a better understanding of what the problem was :+1:


Add Canvas App

This app allows users to connect their Tidbyt to Canvas so they can view their upcoming assignments.  I have tried to do my best at following the instructions on your website but if I have messed something please let me know and I will fix it.

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


UNABLE TO MANAGE LND WALLET : channels inactive on RTL but active on 1ml.com site

I started a Ligthning network 9 months ago, for educational purpose with teenagers. I was able to fund the LND Wallet and open channels. The problem started after an update and a prolonged synchronizing of the LN. The withdrawal of funds becomes impossible. I am not a techie and don't know how to go about the issue.
I have tried various options to closed the channels but they remain active on Iml.com . Whereas on the RTL they all appear inactive:
Ride The Lightning - jokscryptos
Active  0 ;   Pending 0;  Inactive 7: Closing 0
My node's URI is
03443d4d2248e25ed0bc726aaba3a9a858561f452f62e3c3baa36abe5d99e74d65@hth3b3nfasox6r5qhj6ih53yixbag53yl2jxreeeccplfn4jl7fqhcyd.onion:9735
I tried to make the back up and saved the backup file to used in restore. Trying to force all channnels to close and release the funnds, it does not work either.
How do I get access to control the LND again?

Have you tried also the CLOSEALL option in the raspiblitz SSH menus under MAINMENU > LND?

@joksbit  is the issue still relevant?
closing for now, if it still relevant, please re-open the issue. :)


Restoring from snapshot/ Empty db/ Hangs on [metastore] 2015/12/10 22:28:33 temporary accept error: listener closing...

CentOS release 6.7 (Final)
InfluxDB <IP_ADDRESS>
Process:-
wget http://influxdb.s3.amazonaws.com/influxdb-<IP_ADDRESS>-1.x86_64.rpm
sudo yum localinstall influxdb-<IP_ADDRESS>-1.x86_64.rpm
Alter config to allow snapshots..(although when i did this without it still seemed to work?)
Created a DB
Created retention policy
Created some fake data
Check data is present
Create snapshot:-
influxd backup /tmp/mysnapshot-06
 2015/12/10 22:27:31 influxdb backup
 2015/12/10 22:27:31 backup complete

Deleted the db_name
Stopped influx
Restored influx:-
influxd restore -config /etc/influxdb/influxdb.conf /tmp/mysnapshot-06
unpacking: _internal/monitor/1 (516096 bytes)
unpacking: meta (200 bytes)
[metastore] 2015/12/10 22:28:31 Using data dir: /var/lib/influxdb/meta
[metastore] 2015/12/10 22:28:31 Node at <IP_ADDRESS>:8088 [Follower]
[metastore] 2015/12/10 22:28:33 Node at <IP_ADDRESS>:8088 [Leader]. peers=[]
[metastore] 2015/12/10 22:28:33 Created local node: id=1, host=<IP_ADDRESS>:8088
[metastore] 2015/12/10 22:28:33 spun up monitoring for 1
[metastore] 2015/12/10 22:28:33 temporary accept error: listener closing
[metastore] 2015/12/10 22:28:33 temporary accept error: listener closing

While waiting for this i managed to restart influx successfully and noticed the db had been created but with no data?
Has this been solved as found this issue below:-
[0.9.5-nightly] Restore functionality hangs forever

fixed in 0.9.6 #4918


Clean up: ISBN

MINOR changes:

improved instructions
(re)moved schema from miscellaneous to new folder called digitalIdentifier for better grouping and decluttering of the miscellaneous folder

MAJOR changes:
none
SPECIAL ATTENTION:
none

@apdavison or @Peyman-N feel free to merge if you are also happy with the changes

@Peyman-N or @aeidi89 or @apdavison feel free to merge if you also approve now


feat: Updated docker to work with new mariner Azure image

And why is this needed?

Because: https://github.com/dodevops/azure-advanced-backup/actions/runs/12186550669/job/33995311040#step:5:161


chore(deps): upgrade dev dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-dev-dependencies-2.x" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 2870

Questions ?
Please refer to the Backport tool documentation


Fix namespacing for DirectXMath element traits

This commit corrects the namespacing for the DirectXMath element traits as some of the XM types come from the DirectX::PackedVector namespace.

Great, thank you. Sorry about that...
I added a second commit that also includes DirectXPackedVector.h if its available, since the PackedVector namespace is only defined there. Also added the XMUBYTEN and corrected the XMSHORTN specializations.


Copy Screenshots <IP_ADDRESS> not work in <IP_ADDRESS>

all image sizes are only 1k

Interesting, is this onPC? I originally just tested it on the console and that worked, but just tested on Windows and it doesn't, looks like it's only copying the header.
Should be a simple fix.

d4c83c0030a1b91e6f9e6647501a934837359422 should fix the problem.
Take a look at this
To see if it fixes it for you.
If it does I'll merge it in and make a new version.

OK it's work
I upgraded your plugin, because I found it a bit intrusive.
With the number of versions of the GMA3 which increases the plug copied in too many directories.
if you can test my version and do some feedback. on console it would be cool (because with the covid I don't have access to it).
https://github.com/ririfonfon/GMA3Plugins/tree/master/grandMA3/shared/resource/lib_plugins/Export_Screen_Shoot

Glad it worked. I'll merge it soon.
Also yours works on my console as well, however I did have to edit the xml. I made an issue

ok cool what was the problem with xml


Added IVPN for Desktop

Closes https://github.com/wimpysworld/deb-get/issues/44

I am taking this PR down .... not sure i like different options to get the URL since everything i try can get messed up if the maintainer puts things in a different order (say the two DEBs and RPMs in a different order than they are currently)

Analysing the download URLs, it seems that they have a fixed pattern where the only thing that changes is the version number, so you could just get the version information from the GitHub release and use it to define the URL variable.


Reset negotiation context on error to avoid invalid cast exception

This commit resolves issue https://github.com/NancyFx/Nancy/issues/2122. Whenever an error occurs and a specific view is requested through Negotiate.WithView, an invalid cast exception can occur if the view inherits NancyRazorViewBase<T>. The default error handler attempts to negotiate content using the existing negotiation context. You can reproduce this issue in https://github.com/jonathanfoster/nancy-demo-errorhandlerinvalidcastexception.

Thanks for this @jonathanfoster! :+1: I guess my train of thought was pretty spot on? :wink:

Version 1.4.3 was just pushed to NuGet.


Create consent-receipt.md

Creating initial draft.

Request to have a number assigned. The supporting images will be added once the folder is created.
Thanks,
JanL


CheckedInputType.ConstructDataSet() ignore Input.Value

Relate #120, CheckedInputType.ConstructDataSet() ignore Input.Value. so Input.Value does't appeared in form dataset even if set by someone.
I think the code should like below,
        public override void ConstructDataSet(FormDataSet dataSet)
        {
            if (Input.IsChecked)
            {
                string value;
                if (!String.IsNullOrEmpty(Input.Value))
                    value = Input.Value;
                else
                    value = Input.GetAttribute(AttributeNames.Value) ?? Keywords.On;
                dataSet.Append(Input.Name, value, Input.Type);
            }
        }

Well, I am not so sure. How should it be handled if it was intentionally set to an empty value? I'll check that.

Obviously empty values need to be transported as empty values. So it makes a difference if it is the empty string or null. Unfortunately currently on the empty string is returned from Value. But I'll find a way.

Thanks!


MD052 triggering in code span inside link

This example shows it being flagged in a link, but not the same code span on its own
https://dlaa.me/markdownlint/#%25m[`WebGLRenderingContext.uniform[1234][uif][v]()`](%2Fen-US%2Fdocs%2FWeb%2FAPI%2FWebGL2RenderingContext%2Funiform)

`WebGLRenderingContext.uniform[1234][uif][v]()`

This may already be fixed by: https://github.com/DavidAnson/markdownlint/commit/c333976a4416e1a80f767bf82d117bb82e2f8b47

OK, I couldn't remember if there the demo site used the latest next code or not, so I opened it when I saw it there still. That might be an interesting troubleshooting step, if there was a demo copy that used the next code to see if there are fixed things when reporting

The demo site does not give you a way to try older or newer versions yet. I thought about this and know how I might do it, but it hasn't bubbled to the top yet.

I'm guessing you already have a custom site setup that has the current demo site, so you could setup https://davidanson.github.com/markdownlint to point to the demo folder in next

I think GitHub raw sets content type to text so people can’t host directly out of the repo. It’s been a while, that may not be true now.

From https://github.blog/2022-08-10-github-pages-now-uses-actions-by-default/ you could probably use https://github.com/actions/starter-workflows/blob/main/pages/static.yml with a tweak to the path to be used

What I'd really like is a way to point to any version of the script. Then I just hardcode the list of release tags and suddenly the demo site can load anyone of them (including next). A simple redirector wouldn't be hard to add to my web site, but it wouldn't natively work for anyone wanting to run the demo locally. That said, this is a pretty niche scenario, so I might only enable it via query string parameter anyway, and this wouldn't really matter. Like I said, it just hasn't been compelling yet.

https://raw.githack.com/ might work for you but when I tried priming the cache with some of the JS files for https://raw.githack.com/DavidAnson/markdownlint/next/demo/default.htm there were a few 404s for some minfied helpers that aren't in the tree


Crud for Repositories ( Busy man scenario )

as you can see on #8 we need a form for a busy man to submit their project.
then he can manage them on his dashboard:

[x] manage repositories
[x] manage pull requests ( we can do nothing for this because it's the same as making a manual review request #12  )

technical

have a model called Repo ( do not name it Repository because conflicts naming with the Repository pattern )
use soft delete for deletion
do this on user dashboard.
for now just store it and do nothing. :)
it will be awesome if we have some test for the crud. ( simple one )

Fetch repo from username with "get user repo list" saloon request

thank you Vasili it's done


Upgrade to CUDNN RNN v8 APIs

This PR updates the code to use cudnnRNNForward/cudnnRNNBackwardxxx_v8 when the CUDNN Version >= 8.0 and CudnnRNNV3 operation is used.
fyi. @nluehr

@sanjoy I have updated the code by placing the host seq_lengths in CudnnRnnSequenceTensorDescriptor to make sure it is still valid when the H2D copy happens. I also updated the comments. PTAL.

@sanjoy I have updated the code by placing the host seq_lengths in CudnnRnnSequenceTensorDescriptor to make sure it is still valid when the H2D copy happens. I also updated the comments. PTAL.

After a second thought, I think we might be able to remove the dependence on the BlockHostUtilDone() in the current PR. Since the sequence_lengths is passed in via .HostMemory("sequence_lengths"), it could be guaranteed it will stay long enough for the H2D copy.
The current implement (before the PR) is to copy it into input_descriptor (which is a local pageable location). And this PR's strategy is to fetche it from the input_descriptor and copy it to device, which requires the sync op.
I think we can do something different by passing the sequence_lengths to the compute method so that we can call H2D copy over it directly, which will require no sync anymore.
I will push a commit later today.

@sanjoy I have refactored the code. PTAL.


RuntimeError: memory access out of bounds

I am currently running into a memory issue trying to decompress a string that is 10,129 characters long.  The string was compressed using the same library.  Trying to decompress gives me issues.  Are there any options I can pass in to adjust the memory allocation size or is this a bug in the code?

Hi James,
I'm sorry to reply so late. I've been busy fixing my life...
Well, yeah, I realized this too. There is another issue with high frequency of changes. This is almost certainly an issue in the WASM transpiled code that isn't easy to fix as it is a result the emscripten output that is given the C source of the original implementation. I'm thinking about switching the default implementation to the JS variant, as this one proofs to be more resilient and for the average input, fast enough.
I'll check, if I can replace the WASM binary with a more recent built to circumvent this, but for the moment, I'd recommend importing from  brotli-unicode/js instead.
Best


Enabling RPA causes bonding failure

I am trying to bond en ESP32-based project with an iPhone SE (but this affects any iOS device). Since there is no user input available I specify Just Works, turn on MiTM, etc. It works fine initially - the phone will pair and bond, then on next connect it won't prompt for pairing. I can restart the ESP32 and it is still all fine. However, once the phone decides to change its public address, any connection results in nothing being transferred. The phone must be told to forget about the ESP and go through the pairing/bonding process again.
I gather that Resolvable Private Addresses are the way around this, and that ESP Nimble 1.2 apparently has this functionality, but when I enable it with:
ble_hs_pvcy_rpa_config(1);
pairing/bonding doesn't take place and, typically, if a characteristic is accessed the connection drops. Since the RPA enabling function wasn't too obvious, I am wondering if this is indeed meant to work or if it's not yet ready.
I've attached two logs which show an overview of where it goes wrong. The 'NimBLE' entries I added to trace what storage calls were being made, but left them in since they provide useful anchors. Cutting to the chase, the log where it goes wrong says:
handle=0 our_ota_addr_type=1 our_ota_addr=57:48:b1:82:9f:a8 our_id_addr_type=0 our_id_addr=4c:11:ae:c9:53:de peer_ota_addr_type=1 peer_ota_addr=4f:9d:c9:74:79:0b peer_id_addr_type=1 peer_id_addr=4f:9d:c9:74:79:0b conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=0 authenticated=0 bonded=0
where the good (non-RPA) log says:
handle=0 our_ota_addr_type=0 our_ota_addr=4c:11:ae:c9:53:de our_id_addr_type=0 our_id_addr=4c:11:ae:c9:53:de peer_ota_addr_type=1 peer_ota_addr=4f:9d:c9:74:79:0b peer_id_addr_type=1 peer_id_addr=4f:9d:c9:74:79:0b conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=0 authenticated=0 bonded=0
The ESP Nimble version is 1.2 but I patched it with the NimBLE_CCCD_overflow_loop_fix.
RPA_disabled.txt
RPA_enabled.txt
(Forgot to say this is using the example bleprph application. The only mod I made to that was to add the RPA enable line, and a command to report the store peer count.)

I just posted a PR that directly fixes this, checkout #7.

Since the RPA enabling function wasn't too obvious

Hi @duncairn Thank you for raising the issue, I can understand that the documentation needs to be improved for this. However we have tried to summarize the functionality in README of bleprph example. Just to be on the same page, I believe you might have already followed below steps while enabling RPA:

own_addr_type needs to be set to BLE_ADDR_RANDOM.
ble_hs_pvcy_rpa_config() should be called in after BLE Host stack starts and NimBLE host and ESP controller are synced. I would recommend to call this function in bleprph_on_sync i.e. sync callback.

Can you please provide sdkconfig as well ? It would be really helpful to get DEBUG prints in the log (menuconfig --> Component config --> Log output --> Default Log verbosity to Debug). Please try make erase_flash before running the app once.

Thanks for getting back to me quickly on this, @prasad-alatkar , and I apologize for not digesting the readme properly - I had mistakenly looked at the readme from the previous version, hence why I missed the instructions.
I made the changes you suggested in bleprph_on_sync():
      own_addr_type = BLE_ADDR_RANDOM;

	ble_hs_pvcy_rpa_config(1);

    /* Figure out address to use while advertising (no privacy for now) */
//    rc = ble_hs_id_infer_auto(0, &own_addr_type);
//    if (rc != 0) {
//        MODLOG_DFLT(ERROR, "error determining address type; rc=%d\n", rc);
//        return;
//    }

Unfortunately, that was a small improvement. The phone would connect and pair OK first time now, but on disconnect and reconnect the ESP would show up as a different device, leaving the phone trying to connect to a device that was no longer there. The log for this is:
reconnect_new_address.txt
I left the previous additional log entries in place for reference, and at suitable pauses (such as when waiting for the phone to accept the user's pair command) grabbed a store peer count as a marker.
I then made the mode that @h2zero had made in checkout #7 (thanks - well timed!). Now I could disconnect and reconnect, and still access characteristice. Great! The log for this:
reconnect_h2zero_mods.txt
I then rebooted the phone to force an address change, and on trying to reconnect it failed with no access to characteristics (this is the continued log from the previous - the ESP wasn't restarted during this):
phone_reboot.txt
Summarising, the own_addr_type fixed the first connect problem, but would cause the ESP to appear as a different device on disconnect/reconnect, @h2zero 's mods fixed that and got me back to where I was originally without RPA  but now with RPA. So it's an improvement but still not working.

The on_sync() function I used while testing was this:
static void
bleprph_on_sync(void)
{
    int rc;
    ble_hs_pvcy_rpa_config(true);
    rc = ble_hs_util_ensure_addr(1);
    assert(rc == 0);

    /* Figure out address to use while advertising (no privacy for now) */
    rc = ble_hs_id_infer_auto(1, &own_addr_type);
    if (rc != 0) {
        MODLOG_DFLT(ERROR, "error determining address type; rc=%d\n", rc);
        return;
    }

    /* Printing ADDR */
    uint8_t addr_val[6] = {0};
    rc = ble_hs_id_copy_addr(own_addr_type, addr_val, NULL);

    MODLOG_DFLT(INFO, "Device Address: ");
    print_addr(addr_val);
    MODLOG_DFLT(INFO, "\n");
    /* Begin advertising. */
    bleprph_advertise();
}

Comapre it to yours and give it a try, I had no issues this way.

@duncairn After taking a look at your logs, I was also a bit confused as why it works for me and not for you. Nevertheless I think I have found the issue, and again I need to be blamed for the poor documentation for this. The issue you are facing is the phone device is not able to resolve the RPA of ESP32. Now if everything else is good, it can only happen when the phone device does not have IRK of our device. This IRK is distributed during key exchange (after pairing). To distribute IRK we have to mention in our host configuration (ble_hs_cfg) that IRK (BLE_SM_PAIR_KEY_DIST_ID) needs to be distributed. So I am attaching patch based on bleprph to try out the RPA feature, please let me know if it resolves your issue. Again, sorry for missing out on mentioning it in my earlier comment.
NimBLE_RPA_Example_use_bleprph.txt
@h2zero Thank you for taking time out and contributing to esp-nimble, I had taken a very quick look at your PR. I will update there my observations, I just think the check if (ble_host_rpa_enabled()) should not be removed, as it can affect Non-RPA cases. Again I will take a closer look by today EOD.

Thanks for trying again, @h2zero .

The on_sync() function I used while testing was this:

Unfortunately, this didn't work at all since it would fail when trying to advertise (rc = 530). I tracked it down to this line:
`rc = ble_hs_id_infer_auto(1, &own_addr_type);
The '1'  was the cause. Changing back to 0 gets it advertising again, but of course then we're back to the start.
@prasad-alatkar - I applied your patch (not your problem that I failed to read the instructions at the start!) but it seemed to make no difference. That is, disconnect/reconnect work fine, but phone reboot and change of address fails. However, I am doing this using the patch that @h2zero provided in #7, so will revert to the pre-patch version and see if it works in that.
Do you need logs for this?

Hi @duncairn  by change of address, Do you mean 'The phone (scanning app) observes same address of ESP32 (paired previously) ' ? If that is the case then we are good. I mean, you can observe the new address from another phone device (scanning app). Apart from that you can configure RPA timeout (time after which new RPA address is assigned) from menuconfig, by default it is set to 900 seconds.

Ah, I'm afraid I might be using the wrong terms and confusing things. By 'change of address' I mean the phone's change so the ESP doesn't recognize it as an already-paired central. iOS devices change their public address periodically (not sure how often but I read somewhere it could be every 15 minutes), so to force that to happen when I need it to I just reboot the phone.
I am fairly sure the phone still recognizes the ESP since it doesn't ask to pair with it, so whether or not the ESP is changing public address, that part of it isn't a problem for me. The problem is purely that the ESP doesn't recognize the phone after the change of phone public address.
Regarding my previous comment, I reverted @h2zero 's #7 patch and retained your most recent patch (of the bleprph example). This time there was no problem with the phone disconnecting and reconnecting, so the issues that enabling RPA provoked (multiple ESP devices appearing, etc) would seem to be down to my changes to main.c. However, the problem of the ESP not recognizing the phone after the phone has been rebooted (i.e. the phone has changed public address, and the reason for enabling RPA) is still there.
Hope I haven't confused things further!

So there's a couple things going on here it seems, could you post your on_sync() and app_main() from your file, or the whole file? There are a few things that need to be set correctly for random addresses to work correctly with bonding etc.
Also, just a heads up, you can just turn bluetooth off and on on your phone to change the address, no need to reboot.

Thanks for the tip, @h2zero - I'm an Android fella so iOS subtleties escape me :)
main.c

For your reference when looking at your logs, this is how mine appear when correct (I do have my patch applied here though). This is with RPA enabled on the esp32. Only difference with it disabled is the our_ota_addr_type and our_ota_addr are the same as the our_id_type/addr.
Initial connection:
LE connection complete. handle=0 role=1 paddrtype=1 addr=61.1c.b8.fd.c4.b5 local_rpa=<IP_ADDRESS>.0.0 peer_rpa=<IP_ADDRESS>.0.0 itvl=24 latency=0 spvn_tmo=72 mca=1
0xb5 0xc4 0xfd 0xb8 0x1c 0x61 connection established; status=0 Revised our id addr:
0x8f 0x6e 0x93 0x0a 0xdc 0x76
handle=0 our_ota_addr_type=1 our_ota_addr=76:dc:0a:93:6e:8f our_id_addr_type=0 our_id_addr=30:ae:a4:cc:24:26 peer_ota_addr_type=1 peer_ota_addr=61:1c:b8:fd:c4:b5 peer_id_addr_type=1 peer_id_addr=61:1c:b8:fd:c4:b5 conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=0 authenticated=0 bonded=0

Encrypted/bonded:
ble_hs_hci_cmd_send: ogf=0x08 ocf=0x001a len=18
0x1a 0x20 0x12 0x00 0x00 0xda 0xaf 0x8d 0x30 0xb9 0xf7 0x2a 0x57 0xba 0xee 0xcd 0x73 0x82 0x99 0xac 0xe4
Command complete: cmd_pkts=5 ogf=0x8 ocf=0x1a status=0 handle=0
Encrypt change: status=0 handle=0 state=1
host tx hci data; handle=0 length=21
ble_hs_hci_acl_tx(): 0x00 0x00 0x15 0x00 0x11 0x00 0x06 0x00 0x08 0xef 0x8d 0xe2 0x16 0x4f 0xec 0x43 0x0d 0xbf 0x5b 0xdd 0x34 0xc0 0x53 0x1e 0xb8
Revised our id addr:
0x8f 0x6e 0x93 0x0a 0xdc 0x76
host tx hci data; handle=0 length=12
ble_hs_hci_acl_tx(): 0x00 0x00 0x0c 0x00 0x08 0x00 0x06 0x00 0x09 0x00 0x26 0x24 0xcc 0xa4 0xae 0x30
Number of Completed Packets: num_handles=1
handle:0 pkts:1
Number of Completed Packets: num_handles=1
handle:0 pkts:1
ble_hs_hci_evt_acl_process(): conn_handle=0 pb=2 len=21 data=0x11 0x00 0x06 0x00 0x08 0x9e 0xb4 0x85 0x05 0x6a 0x41 0xd3 0x62 0xde 0x00 0xf9 0xfe 0x35 0xee 0xbc 0xf5
rxed sm command: id info; conn=0 irk=0x9e 0xb4 0x85 0x05 0x6a 0x41 0xd3 0x62 0xde 0x00 0xf9 0xfe 0x35 0xee 0xbc 0xf5
rx_key_flags=0x08
ble_hs_hci_evt_acl_process(): conn_handle=0 pb=2 len=12 data=0x08 0x00 0x06 0x00 0x09 0x00 0x39 0x15 0x7b 0x45 0x5f 0xe0
rxed sm command: id addr info; conn=0 addr_type=0 addr=e0:5f:45:7b:15:39
rx_key_flags=0x00
encryption change event; status=0 Revised our id addr:
0x8f 0x6e 0x93 0x0a 0xdc 0x76
handle=0 our_ota_addr_type=1 our_ota_addr=76:dc:0a:93:6e:8f our_id_addr_type=0 our_id_addr=30:ae:a4:cc:24:26 peer_ota_addr_type=1 peer_ota_addr=61:1c:b8:fd:c4:b5 peer_id_addr_type=1 peer_id_addr=61:1c:b8:fd:c4:b5 conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=1 authenticated=1 bonded=1

Disconnect:

Notice the change of peer_id_addr and peer_id_type.
Reconnect:
LE connection complete. handle=0 role=1 paddrtype=1 addr=61.1c.b8.fd.c4.b5 local_rpa=<IP_ADDRESS>.0.0 peer_rpa=<IP_ADDRESS>.0.0 itvl=24 latency=0 spvn_tmo=72 mca=1
0xb5 0xc4 0xfd 0xb8 0x1c 0x61 connection established; status=0 Revised our id addr:
0x8f 0x6e 0x93 0x0a 0xdc 0x76
handle=0 our_ota_addr_type=1 our_ota_addr=76:dc:0a:93:6e:8f our_id_addr_type=0 our_id_addr=30:ae:a4:cc:24:26 peer_ota_addr_type=1 peer_ota_addr=61:1c:b8:fd:c4:b5 peer_id_addr_type=0 peer_id_addr=e0:5f:45:7b:15:39 conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=0 authenticated=0 bonded=0

ble_hs_hci_cmd_send: ogf=0x08 ocf=0x0016 len=2
0x16 0x20 0x02 0x00 0x00
Command Status: status=0 cmd_pkts=5 ocf=0x16 ogf=0x8
LE LTK Req. handle=0 rand=00 encdiv=0
Revised our id addr:
0x8f 0x6e 0x93 0x0a 0xdc 0x76
looking up our sec; peer_addr_type=0 peer_addr=0x39 0x15 0x7b 0x45 0x5f 0xe0  ediv=0x00 rand=0x0
ble_hs_hci_cmd_send: ogf=0x08 ocf=0x001a len=18
0x1a 0x20 0x12 0x00 0x00 0xda 0xaf 0x8d 0x30 0xb9 0xf7 0x2a 0x57 0xba 0xee 0xcd 0x73 0x82 0x99 0xac 0xe4
Command complete: cmd_pkts=5 ogf=0x8 ocf=0x1a status=0 handle=0
Encrypt change: status=0 handle=0 state=1
encryption change event; status=0 Revised our id addr:
0x8f 0x6e 0x93 0x0a 0xdc 0x76
handle=0 our_ota_addr_type=1 our_ota_addr=76:dc:0a:93:6e:8f our_id_addr_type=0 our_id_addr=30:ae:a4:cc:24:26 peer_ota_addr_type=1 peer_ota_addr=61:1c:b8:fd:c4:b5 peer_id_addr_type=0 peer_id_addr=e0:5f:45:7b:15:39 conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=1 authenticated=1 bonded=1

For completeness here is the code for app_main() and on_sync() I used:

static void
bleprph_on_sync(void)
{
    int rc;
ble_hs_pvcy_rpa_config(true);
    rc = ble_hs_util_ensure_addr(1);
    assert(rc == 0);

    /* Figure out address to use while advertising (no privacy for now) */
    rc = ble_hs_id_infer_auto(1, &own_addr_type);
    if (rc != 0) {
        MODLOG_DFLT(ERROR, "error determining address type; rc=%d\n", rc);
        return;
    }

    /* Printing ADDR */
    uint8_t addr_val[6] = {0};
    rc = ble_hs_id_copy_addr(own_addr_type, addr_val, NULL);

    MODLOG_DFLT(INFO, "Device Address: ");
    print_addr(addr_val);
    MODLOG_DFLT(INFO, "\n");
    /* Begin advertising. */
    bleprph_advertise();
}

void bleprph_host_task(void *param)
{
    ESP_LOGI(tag, "BLE Host Task Started");
    /* This function will return only when nimble_port_stop() is executed */
    nimble_port_run();

    nimble_port_freertos_deinit();
}

void
app_main(void)
{
    int rc;

    /* Initialize NVS — it is used to store PHY calibration data */
    esp_err_t ret = nvs_flash_init();
    if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
        ESP_ERROR_CHECK(nvs_flash_erase());
        ret = nvs_flash_init();
    }
    ESP_ERROR_CHECK(ret);

    ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init());

    nimble_port_init();
    /* Initialize the NimBLE host configuration. */
    ble_hs_cfg.reset_cb = bleprph_on_reset;
    ble_hs_cfg.sync_cb = bleprph_on_sync;
    ble_hs_cfg.gatts_register_cb = gatt_svr_register_cb;
    ble_hs_cfg.store_status_cb = ble_store_util_status_rr;

    ble_hs_cfg.sm_io_cap = BLE_HS_IO_DISPLAY_ONLY;
//#ifdef CONFIG_EXAMPLE_BONDING
    ble_hs_cfg.sm_bonding = 1;
//#endif
//#ifdef CONFIG_EXAMPLE_MITM
    ble_hs_cfg.sm_mitm = 1;
//#endif
//#ifdef CONFIG_EXAMPLE_USE_SC
    ble_hs_cfg.sm_sc = 1;
//#else
//    ble_hs_cfg.sm_sc = 0;
//#ifdef CONFIG_EXAMPLE_BONDING
    ble_hs_cfg.sm_our_key_dist = 3;
    ble_hs_cfg.sm_their_key_dist = 3;
//#endif
//#endif

    rc = gatt_svr_init();
    assert(rc == 0);

    /* Set the default device name. */
    rc = ble_svc_gap_device_name_set("nimble-bleprph");
    assert(rc == 0);

    /* XXX Need to have template for store */
    ble_store_config_init();

    nimble_port_freertos_init(bleprph_host_task);

 //   ble_hs_pvcy_rpa_config(true);
    /* Initialize command line interface to accept input from user */
    rc = scli_init();
    if (rc != ESP_OK) {
        ESP_LOGE(tag, "scli_init() failed");
    }
}

One last suggestion is to use make (or idf.py if on IDF 4+) erase_flash before flashing your device. The old bond data can mess with things I have found. Also delete the bonds from your phone before trying again.

@duncairn I just tested your file with and without my patch and it works as expected. With RPA on and no patch reconnection and encryption work, with RPA off, when the phone address changes reconnection and encryption do not, must re-pair. With the patch all is well either way.
I suspect my note above about erase_flash and clearing the bonds from your phone will solve your issue.

@h2zero  - thanks for persevering with this. I am not seeing what you do, however, even after erasing the flash and clearing the phone pairing info (which I do before each series of tests anyway). Perhaps I should be more explicit and say that after the phone change of address, it will connect with the ESP and apparently resume, but it is not able to transfer data.
When it first bonds, and after a simple reconnect, I can access the characteristic that sends a random number back (that is, 5c3a659e-897e-45e1-b016-007107c96df6). When I try this after the address change, I can seem to access the characteristic but nothing is read. Can you confirm that when you try this you really receive a new random number?

I will try again and see if I can repro what you're seeing, can you confirm for me that you are using the file as posted and are not patched?

I can't run the exact file you posted because I get error enabling advertisement; rc=530 if the first parameter to ble_hs_id_infer_auto() is 1. However, apart from that I get the same result whichever file version I use. I wonder if the advertisement is the problem here - if you don't get that error then I shouldn't.
The app I tend to use is BLE Scanner by bluepixel, but I get the same with BlueSee.
[Thinks...] It has to be the own_addr_type variable that is being set inappropriately since it works (that is, the advertisement goes OK) if I explicitly set it as per @prasad-alatkar 's suggestion to BLE_ADDR_RANDOM. I'll dig into this...

I’ve been using the file you posted actually. Just so we’re on the same page. Try using nRF connect for your phone app. That’s what I’ve been testing with.

nRF suggests you're using an Android phone? I use that on my Android phone but haven't tested RPA with it yet - the reason for needing RPA was because iOS would constantly pop up the pairing dialog whereas Android, with nRF, didn't. It seemed that nRF (or Android) would just go through the motions of re-bonding without saying anything if there was a problem, whereas iOS wouldn't.
Since I was using Android I was oblivious to the issue until an iOS developer complained...

Just tried with nRF on Android and there was no issue. In fact, I had to closely study the logs to check that the phone had in fact changed its address! On connect after a reboot (I did the BT disable thing but wanted to make sure) I could see that the bonding flag in nRF flicked off and back on, so if there was any problem it was covered up.

@duncairn  Just for a complete answer to your question, after 4 address changes on the esp32 and approx. 8 changes on the phone I am still able to connect and read that characteristic with no trouble.
Good news is I found the issue you have with ble_hs_id_infer_auto(1, &own_addr_type); not that it's a big issue but FYI ble_hs_pvcy_rpa_config(1); needs to be called before ble_hs_id_infer_auto(1, &own_addr_type);. Good for me to know as well. But you should be fine just using own_addr_type = BLE_OWN_ADDR_RANDOM;.
static void
bleprph_on_sync(void)
{
    int rc;
    rc = ble_hs_util_ensure_addr(1);
        assert(rc == 0);

    rc = ble_hs_pvcy_rpa_config(1);
	if (rc != 0) {
		ESP_LOGI(tag, "Error configuring privacy (RPA)");
	}

	/* Configure RPA */
	//own_addr_type = BLE_ADDR_RANDOM;
     /* Figure out address to use while advertising (no privacy for now) */
    rc = ble_hs_id_infer_auto(1, &own_addr_type);
    if (rc != 0) {
        MODLOG_DFLT(ERROR, "error determining address type; rc=%d\n", rc);
        return;
    } ....

I am using an iPhone SE as you are, nRF connect has an iOS app as well.

OK! Sorry for making assumptions, and thanks for pointing out nRF is on the playstore - wish I'd found that to start with ;)
Strangely, I can't get it to pair with the ESP, but I might be mis-using it since the user interface is very different to the Android version.
I changed bleprph_on_synch() to exactly as your post there (a cut'n'paste), but still get the advertisement enabling error, so there is clearly something amiss. I think a re-port of nimble 1.2 into esp-idf might be in order too at this point.

Lol no need to be sorry, most people here use android phones, natural assumption.
It should just popup a message asking to pair when you try to read the characteristic.
That error could likely be due to using an older commit of esp-nimble, I would suggest updating to current if needed and try again.

Sorry for the delay in getting back to you on this - a lot of water has passed under the bridge since!
First, I was using esp-idf 4.1 but updated to include nimble 1.2. So I tried esp-idf 4.2 (dev) and that didn't show the advertising error when own_addr_type was 3. The nimble code was exactly the same, the example app also exactly the same, so the implication is that something outside of nimble would be affecting it. (You don't want to know about the trouble that enabling debug-level logging caused on 4.2!)
But... still there was the fail on address change. So I tried updating to esp-idf 4.2 (release) but couldn't because my setup wouldn't install the new requirement of gdbgui (it would fail on cffi). This is using msys and make (i.e. the legacy development environment), and previously I'd failed to get the cmake environment to install properly. Maybe that had something to do with things.
To make sure it's not my setup, I ran up a brand new fully-patched W7 in a VM and installed 4.2 (release) and the cmake stuff in there. That also failed(!) but eventually I worked through all the workarounds and had a pristine unadulterated 4.2 (release) compiling and programming the ESP.
Still, I get the fail on address change! I can't see how it can be working OK for you when it doesn't for me even with a totally clean system. There has to be something else involved which is screwing things. Maybe the phone? This is a iPhone SE running 13.3.1 and the only stuff I've added has been the bluetooth scanners.

Wow, good effort on your part 👍. Still very strange that you are having such difficulties. I have been using the master branch but 4.2 (release) seems to be on-par with that as far as NimBLE is concerned.
Would you be able to post another log? One that shows a connect->bond->disconnect->change address->reconnect? I'm quite curious to see what you do.

No problem! Attached.
This is using an Adafruit ESP32 Feather, just to make sure it's not something about our hardware setup that's causing this. I'll try the master branch later today - any straw is worth clutching right now :)

Well I can see in your log you are not storing the IRK for either your device or the phone, that's where you need:
+#ifdef CONFIG_EXAMPLE_BONDING
+    ble_hs_cfg.sm_our_key_dist = BLE_SM_PAIR_KEY_DIST_ENC | BLE_SM_PAIR_KEY_DIST_ID;
+    /* Refer components/nimble/nimble/nimble/host/include/host/ble_sm.h for
+     * more information */
+    ble_hs_cfg.sm_their_key_dist = BLE_SM_PAIR_KEY_DIST_ENC | BLE_SM_PAIR_KEY_DIST_ID;
 #endif

from the patch file above that @prasad-alatkar posted.
Try that and post another log, there may still be local id address issues after but lets see before we jump in.

@h2zero thank you for your time and efforts. Just want to touch upon few points here.

but FYI ble_hs_pvcy_rpa_config(1); needs to be called before ble_hs_id_infer_auto(1, &own_addr_type);.

Ideally, we should not call ble_hs_id_infer_auto when using Host based privacy (RPA), the first parameter(privacy) passed is for Controller based privacy (default for NimBLE). You can actually dig into this API to understand what own_addr_type is getting set to  when first parameter is 1 :smiley: . If you see my shared patch, I have actually removed ble_hs_id_infer_auto.  The reason being, as I have mentioned earlier, we have implemented Host based privacy for RPA. Now if it was controller based RPA then setting addr_type to BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT would have made sense, but for our case we have to use BLE_OWN_ADDR_RANDOM. I understand this doesn't look too obvious but this is how we can achieve RPA/privacy without controller's role (or exclusively in host without controller knowing).
So to sum it all, just setting addr_type to BLE_OWN_ADDR_RANDOM before advertising/scanning and calling ble_hs_pvcy_rpa_config(1) should suffice.

However, the problem of the ESP not recognizing the phone after the phone has been rebooted (i.e. the phone has changed public address, and the reason for enabling RPA) is still there.

Can you please provide DEBUG log when you see this issue ? Now, if I understand clearly, if the phone has not changed its IRK (identity key to resolve RPA) then even if it changes the address (RPA) the RPA should be resolvable by our ESP device as it has the IRK which is sufficient to resolve identity of the peer device. I have verified the working behavior with Android phone.

However, the problem of the ESP not recognizing the phone after the phone has been rebooted >(i.e. the phone has changed public address, and the reason for enabling RPA) is still there.

Can you please provide DEBUG log when you see this issue ?

This was resolved by your patch posted early on. I still seemed to have the issue becuase the patch was applied incorrectly, so part of it was inoperative. Entirely my fault, and I'm very sorry for making that mistake and dragging this on. I appreciate the patience exhibited by  yourself and @h2zero .
That said, do you want logs now it works? I thought probably not, but if you want them for comparison I can run them off :)

Hi @duncairn happy that the issue is resolved now.

making that mistake and dragging this on.

I am quite sure this thread might help few users while implementing RPA feature  :smiley:

Ideally, we should not call ble_hs_id_infer_auto when using Host based privacy (RPA), the first parameter(privacy) passed is for Controller based privacy (default for NimBLE). You can actually dig into this API to understand what own_addr_type is getting set to when first parameter is 1 😃 . If you see my shared patch, I have actually removed ble_hs_id_infer_auto. The reason being, as I have mentioned earlier, we have implemented Host based privacy for RPA. Now if it was controller based RPA then setting addr_type to BLE_OWN_ADDR_RPA_PUBLIC_DEFAULT would have made sense, but for our case we have to use BLE_OWN_ADDR_RANDOM. I understand this doesn't look too obvious but this is how we can achieve RPA/privacy without controller's role (or exclusively in host without controller knowing).

@prasad-alatkar you are quite right here, sorry for confusing this. I had that in my code while I was testing things and it was working so I shared it here in-case it helped.
@duncairn Glad to hear you got it working, definitely a good thread for others in the future.

@duncairn Please help to close the issue if resolved.

My apologies @prasad-alatkar - being new to the github way I didn't realise it would be up to me, but it is logical that it should. Done ;)

For your reference when looking at your logs, this is how mine appear when correct (I do have my patch applied here though). This is with RPA enabled on the esp32. Only difference with it disabled is the our_ota_addr_type and our_ota_addr are the same as the our_id_type/addr.
Initial connection:
LE connection complete. handle=0 role=1 paddrtype=1 addr=61.1c.b8.fd.c4.b5 local_rpa=<IP_ADDRESS>.0.0 peer_rpa=<IP_ADDRESS>.0.0 itvl=24 latency=0 spvn_tmo=72 mca=1
0xb5 0xc4 0xfd 0xb8 0x1c 0x61 connection established; status=0 Revised our id addr:
0x8f 0x6e 0x93 0x0a 0xdc 0x76
handle=0 our_ota_addr_type=1 our_ota_addr=76:dc:0a:93:6e:8f our_id_addr_type=0 our_id_addr=30:ae:a4:cc:24:26 peer_ota_addr_type=1 peer_ota_addr=61:1c:b8:fd:c4:b5 peer_id_addr_type=1 peer_id_addr=61:1c:b8:fd:c4:b5 conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=0 authenticated=0 bonded=0

Encrypted/bonded:
LE LTK Req. handle=0 rand=00 encdiv=0
ble_hs_hci_cmd_send: ogf=0x08 ocf=0x001a len=18
0x1a 0x20 0x12 0x00 0x00 0xda 0xaf 0x8d 0x30 0xb9 0xf7 0x2a 0x57 0xba 0xee 0xcd 0x73 0x82 0x99 0xac 0xe4
Command complete: cmd_pkts=5 ogf=0x8 ocf=0x1a status=0 handle=0
Encrypt change: status=0 handle=0 state=1
host tx hci data; handle=0 length=21
ble_hs_hci_acl_tx(): 0x00 0x00 0x15 0x00 0x11 0x00 0x06 0x00 0x08 0xef 0x8d 0xe2 0x16 0x4f 0xec 0x43 0x0d 0xbf 0x5b 0xdd 0x34 0xc0 0x53 0x1e 0xb8
Revised our id addr:
0x8f 0x6e 0x93 0x0a 0xdc 0x76
host tx hci data; handle=0 length=12
ble_hs_hci_acl_tx(): 0x00 0x00 0x0c 0x00 0x08 0x00 0x06 0x00 0x09 0x00 0x26 0x24 0xcc 0xa4 0xae 0x30
Number of Completed Packets: num_handles=1
handle:0 pkts:1
Number of Completed Packets: num_handles=1
handle:0 pkts:1
ble_hs_hci_evt_acl_process(): conn_handle=0 pb=2 len=21 data=0x11 0x00 0x06 0x00 0x08 0x9e 0xb4 0x85 0x05 0x6a 0x41 0xd3 0x62 0xde 0x00 0xf9 0xfe 0x35 0xee 0xbc 0xf5
rxed sm command: id info; conn=0 irk=0x9e 0xb4 0x85 0x05 0x6a 0x41 0xd3 0x62 0xde 0x00 0xf9 0xfe 0x35 0xee 0xbc 0xf5
rx_key_flags=0x08
ble_hs_hci_evt_acl_process(): conn_handle=0 pb=2 len=12 data=0x08 0x00 0x06 0x00 0x09 0x00 0x39 0x15 0x7b 0x45 0x5f 0xe0
rxed sm command: id addr info; conn=0 addr_type=0 addr=e0:5f:45:7b:15:39
rx_key_flags=0x00
encryption change event; status=0 Revised our id addr:
0x8f 0x6e 0x93 0x0a 0xdc 0x76
handle=0 our_ota_addr_type=1 our_ota_addr=76:dc:0a:93:6e:8f our_id_addr_type=0 our_id_addr=30:ae:a4:cc:24:26 peer_ota_addr_type=1 peer_ota_addr=61:1c:b8:fd:c4:b5 peer_id_addr_type=1 peer_id_addr=61:1c:b8:fd:c4:b5 conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=1 authenticated=1 bonded=1

Disconnect:
disconnect; reason=531 handle=0 our_ota_addr_type=1 our_ota_addr=76:dc:0a:93:6e:8f our_id_addr_type=0 our_id_addr=30:ae:a4:cc:24:26 peer_ota_addr_type=1 peer_ota_addr=61:1c:b8:fd:c4:b5 peer_id_addr_type=0 peer_id_addr=e0:5f:45:7b:15:39 conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=1 authenticated=1 bonded=1

Notice the change of peer_id_addr and peer_id_type.
Reconnect:
LE connection complete. handle=0 role=1 paddrtype=1 addr=4d.6c.15.67.f2.c8 local_rpa=<IP_ADDRESS>.0.0 peer_rpa=<IP_ADDRESS>.0.0 itvl=24 latency=0 spvn_tmo=72 mca=1
0xc8 0xf2 0x67 0x15 0x6c 0x4d connection established; status=0 Revised our id addr:
0x8f 0x6e 0x93 0x0a 0xdc 0x76
handle=0 our_ota_addr_type=1 our_ota_addr=76:dc:0a:93:6e:8f our_id_addr_type=0 our_id_addr=30:ae:a4:cc:24:26 peer_ota_addr_type=1 peer_ota_addr=4d:6c:15:67:f2:c8 peer_id_addr_type=0 peer_id_addr=e0:5f:45:7b:15:39 conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=0 authenticated=0 bonded=0

ble_hs_hci_cmd_send: ogf=0x08 ocf=0x0016 len=2
0x16 0x20 0x02 0x00 0x00
Command Status: status=0 cmd_pkts=5 ocf=0x16 ogf=0x8
LE Remote Used Features. handle=0 feat=dd 00 00 00 00 00 00 00
LE LTK Req. handle=0 rand=00 encdiv=0
Revised our id addr:
0x8f 0x6e 0x93 0x0a 0xdc 0x76
looking up our sec; peer_addr_type=0 peer_addr=0x39 0x15 0x7b 0x45 0x5f 0xe0  ediv=0x00 rand=0x0
ble_hs_hci_cmd_send: ogf=0x08 ocf=0x001a len=18
0x1a 0x20 0x12 0x00 0x00 0xda 0xaf 0x8d 0x30 0xb9 0xf7 0x2a 0x57 0xba 0xee 0xcd 0x73 0x82 0x99 0xac 0xe4
Command complete: cmd_pkts=5 ogf=0x8 ocf=0x1a status=0 handle=0
Encrypt change: status=0 handle=0 state=1
encryption change event; status=0 Revised our id addr:
0x8f 0x6e 0x93 0x0a 0xdc 0x76
handle=0 our_ota_addr_type=1 our_ota_addr=76:dc:0a:93:6e:8f our_id_addr_type=0 our_id_addr=30:ae:a4:cc:24:26 peer_ota_addr_type=1 peer_ota_addr=4d:6c:15:67:f2:c8 peer_id_addr_type=0 peer_id_addr=e0:5f:45:7b:15:39 conn_itvl=24 conn_latency=0 supervision_timeout=72 encrypted=1 authenticated=1 bonded=1

For completeness here is the code for app_main() and on_sync() I used:
static void
bleprph_on_sync(void)
{
    int rc;
ble_hs_pvcy_rpa_config(true);
    rc = ble_hs_util_ensure_addr(1);
    assert(rc == 0);

    /* Figure out address to use while advertising (no privacy for now) */
    rc = ble_hs_id_infer_auto(1, &own_addr_type);
    if (rc != 0) {
        MODLOG_DFLT(ERROR, "error determining address type; rc=%d\n", rc);
        return;
    }

    /* Printing ADDR */
    uint8_t addr_val[6] = {0};
    rc = ble_hs_id_copy_addr(own_addr_type, addr_val, NULL);

    MODLOG_DFLT(INFO, "Device Address: ");
    print_addr(addr_val);
    MODLOG_DFLT(INFO, "\n");
    /* Begin advertising. */
    bleprph_advertise();
}

void bleprph_host_task(void *param)
{
    ESP_LOGI(tag, "BLE Host Task Started");
    /* This function will return only when nimble_port_stop() is executed */
    nimble_port_run();

    nimble_port_freertos_deinit();
}

void
app_main(void)
{
    int rc;

    /* Initialize NVS — it is used to store PHY calibration data */
    esp_err_t ret = nvs_flash_init();
    if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
        ESP_ERROR_CHECK(nvs_flash_erase());
        ret = nvs_flash_init();
    }
    ESP_ERROR_CHECK(ret);

    ESP_ERROR_CHECK(esp_nimble_hci_and_controller_init());

    nimble_port_init();
    /* Initialize the NimBLE host configuration. */
    ble_hs_cfg.reset_cb = bleprph_on_reset;
    ble_hs_cfg.sync_cb = bleprph_on_sync;
    ble_hs_cfg.gatts_register_cb = gatt_svr_register_cb;
    ble_hs_cfg.store_status_cb = ble_store_util_status_rr;

    ble_hs_cfg.sm_io_cap = BLE_HS_IO_DISPLAY_ONLY;
//#ifdef CONFIG_EXAMPLE_BONDING
    ble_hs_cfg.sm_bonding = 1;
//#endif
//#ifdef CONFIG_EXAMPLE_MITM
    ble_hs_cfg.sm_mitm = 1;
//#endif
//#ifdef CONFIG_EXAMPLE_USE_SC
    ble_hs_cfg.sm_sc = 1;
//#else
//    ble_hs_cfg.sm_sc = 0;
//#ifdef CONFIG_EXAMPLE_BONDING
    ble_hs_cfg.sm_our_key_dist = 3;
    ble_hs_cfg.sm_their_key_dist = 3;
//#endif
//#endif

    rc = gatt_svr_init();
    assert(rc == 0);

    /* Set the default device name. */
    rc = ble_svc_gap_device_name_set("nimble-bleprph");
    assert(rc == 0);

    /* XXX Need to have template for store */
    ble_store_config_init();

    nimble_port_freertos_init(bleprph_host_task);

 //   ble_hs_pvcy_rpa_config(true);
    /* Initialize command line interface to accept input from user */
    rc = scli_init();
    if (rc != ESP_OK) {
        ESP_LOGE(tag, "scli_init() failed");
    }
}

One last suggestion is to use make (or idf.py if on IDF 4+) erase_flash before flashing your device. The old bond data can mess with things I have found. Also delete the bonds from your phone before trying again.
Edit: correct log, fix bad edit 😄

Hi i tried this solution it still doesn't work for me. I'm using nimble v1.3.0


Parse remainder of URL.

This patch will parse the remainder of the shortcut URL after the first slash (i.e., the path and parameters) and append it to the final URL.
For example, if http://go/issues redirects to http://github.com/kellegous/go/issues/, then http://go/issues/5 will now redirect to http://github.com/kellegous/go/issues/5. (The current behavior is to ignore the "5".)

Hello, this is a useful feature.
Could this be merged?


Kali  OpenVPN   - Virtual Machine Service using 100% CPU

Describe the bug
I'm running kali Linux Machine. When I connect to a VPN Server with  OpenVPN, Virtual Machine Service use 100% CPU.
Is that normal ?
To Reproduce
Run Kali Linux Machine and Connect to a VPN with OpenVPN.
Tested on Mac OS X Ventura 13.3.1  x86 -  I9.
Screenshots

Is the VM still responsive? Take a screenshot of top in Kali so we know what's using the CPU.
Also, please share steps to reproduce this with example client commands.

Sorry that’s my bad.


Consistent ordering in schemas

This specifies a set of rules of how a schema should be ordered and applies them when schemas are generated.
This is to make the output schemas to be less determined by their inputs (which has led to things like this) and instead be predictable in their output.
The rules are:

For an object with a key of "properties" the fields are sorted alphabetically

Otherwise:

A description field is at the top
Followed by any fields prefixed with a $ (eg $ref)
Then we have the type field
Followed by required
Other fields are alphabetical
Any definitions are at the end

The reason this is a somewhat complex ordering rather than a simple alphabetical one is that schema files end up being swamped by "definitions".

@fofr I've addressed both of your comments.


Global 'View' and Workspace 'Add': Unit Default Test Run Data

As an ECMPS user, I want to view Unit Default Test Run data in the Global-View and add new Unit Default Test Run data in the Workspace so that I can look at real-time data or add test information as needed
Acceptance Criteria: (Global-view)
Given a user has selected Unit Default from the Test Type Group dropdown and a data record is available
When the data is displayed for Unit Default Test Run
Then the user can see data displayed as a separate table (see list below for columns and order)
Operating Level for Run
Run Number
Begin Date
Begin Hour
Begin Minute
End Date
End Hour
End Minute
Response Time
Reference Value
Run Used Indicator
Given a user is viewing Unit Default Test Run Data
When the data is displayed in a table
Then the default sort order is alphanumeric descending by the contents in the 1st column
And the user will have the option to sort the columns in ascending or descending alphanumeric order

[x] The fields and their order specified

Pagination?

[ ] Yes
[x] No

Filter by keyword?

[ ] Yes
[x] No

Columns are sortable?

[x] Yes
[ ] No

Nested rows, expandable?

[ ] Yes
[X] No

Acceptance Criteria: (Workspace - Add)
Given the user has selected Unit Default from the Test Type Group dropdown
When the user clicks on 'Add' for Unit Default Test Run Data
Then the system displays a modal
and the user can add new data for:
Operating Level for Run (Text)
Run Number (Text)
Begin Date (Datepicker + Text)
Begin Hour (Dropdown)
Begin Minute (Dropdown)
End Date (Datepicker + Text)
End Hour (Dropdown)
End Minute (Dropdown)
Response Time (Text)
Reference Value (Text)
Run Used Indicator (Dropdown - 0, 1, Blank)
Given the user has added Unit Default Test Run
When the user chooses to save and close
Then the data is saved
And the modal closes
And the user is returned to the Landing screen
And the Unit Default Test Run data record is reflected on the UI
Given the user has added a new Unit Default Test Run data
When the user chooses to Cancel
Then the user is returned to the Landing screen for Unit Default Test Run
And no updates are saved
Testing
Test Case; TC1180
Tester: @mosesdeeCVP

Unit Default Test Run - View Official Table

Unit Default Test Run - View Official Modal

Unit Default Test Run - Add Table Workspace

Unit Default Test Run - Add Modal Workspace

Test Passed


add cloudy tabs

CloudyTabs
Project URL
https://github.com/josh-/CloudyTabs
Category
Menubar
Description
add CloudyTabs from issue #49
Why it should be included to Awesome macOS open source applications  (optional)
Checklist

[x] Only one project/change is in this pull request
[x] Addition in chronological order (bottom of category)
[x] Appropriate language icon(s) added if applicable
[x] Has a commit from less than 2 years ago
[x] Has a clear README in English

@Vict0rSch Can you add Close #(number of an issue) to the description? It will link this PR with this issue and close it after merge.


Backend tests.

[ X ] Basic tests in 'accounts' app

[X] Basic tests in 'accounts' app

[X] Basic test in 'main' app


Make EditorPropertyNameProcessor check EditorSettings validity

EditorSettings is not guaranteed to be initialized at this point, the above access to editor settings uses a check, added a missing check here as well, was causing non-destructive errors on running the editor
Regression from #74264

Doesn't that mean that this code will never run, if EditorInspector is instantiated too early in the normal editor startup?
The previous check mentions specifically that it's when generating docs (godot --doctool) that this case can happen, not at normal runtime. If this error happens at runtime then it hints at a bigger issue, and this setup should likely be moved to NOTIFICATION_READY or similar.

Doing that removes the error as well, would have to confirm that it still does what it is supposed to do as I'm not sure what it does

use_settings_name_style makes the property_name_style property track what the editor setting is set to. Moving the code into READY will leave the property unsynced before entering the tree.
EditorPropertyNameProcessor assumes EditorSettings is always available. The problem still exists as long as you access EditorPropertyNameProcessor helper methods before EditorSettings is initialized. I think the three EDITOR_GETs there should get a default value when EditorSettings is not initialized.
https://github.com/godotengine/godot/blob/74c34aed38cecf502c257938d268d5f522557a0e/editor/editor_property_name_processor.cpp#L38-L58
Something like:
EditorPropertyNameProcessor::Style EditorPropertyNameProcessor::get_default_inspector_style() {
	if (!EditorSettings::get_singleton()) {
		return STYLE_CAPITALIZED;
	}
	const Style style = (Style)EDITOR_GET("interface/inspector/default_property_name_style").operator int();
	if (style == STYLE_LOCALIZED && !is_localization_available()) {
		return STYLE_CAPITALIZED;
	}
	return style;
}

EditorPropertyNameProcessor::Style EditorPropertyNameProcessor::get_settings_style() {
	if (!EditorSettings::get_singleton()) {
		return STYLE_LOCALIZED;
	}
	const bool translate = EDITOR_GET("interface/editor/localize_settings");
	return translate ? STYLE_LOCALIZED : STYLE_CAPITALIZED;
}

bool EditorPropertyNameProcessor::is_localization_available() {
	if (!EditorSettings::get_singleton()) {
		return false;
	}
	const Vector<String> forbidden = String("en").split(",");
	return forbidden.find(EDITOR_GET("interface/editor/editor_language")) == -1;
}

Will test out!

Thanks!

Thank you!


Add auth-with-shared-root example

Demonstrates partial/lazy loading with auth and dynamic routes
See #1941

This looks like an interesting example! I'd love to get it merged. Can you please rebase?

@jrouleau as Michael mentioned, could you make the updates and then we can merge it :smile:

@jrouleau Will you have a chance to rebase this?

@mjackson
I managed to bork the rebase. Had to recreate the PR. See #2309


Using the AGOL item URL within an iframe doesn't load the individual book

Repro
Go to your AGOL item
Get the URL for the item
Imbed in an iframe
It will not load the book. It will only load the gallery

Currently having this very issue with iframe embedding the direct link to the book returning the gallery instead. Is any solution on the horizon?


Adjustments in DowJones Org

Adjustments after the merge from the Wizeline organisation.

Tests passed and ready to merge into master.


Explain how nested tests work with .plan()

From experimenting with tape, it seems that an outer test's .plan() needs to account for all the inner tests too (even if they have their own plans), and also you need to count both t.test() and nested t.plan() calls as assertions when planning tests. Or maybe I'm doing something wrong?
Also I tried first without using .plan(), but using .end() instead, and I couldn't get nesting working at all. A very basic example of nesting would be useful (I know there's one in the ./example dir but it's a very complex example)

Like you said, .plan() needs to take account for all the inner assertions too.
This issue is old and I'm sure you figured it out but here's the example simply explained.
./example/nested.js:
var falafel = require('falafel');
var test = require('../');

test('nested array test', function (t) {
    t.plan(5); // there should be a total of 5 assertions within this test scope

    var src = '(' + function () {
        var xs = [ 1, 2, [ 3, 4 ] ];
        var ys = [ 5, 6 ];
        g([ xs, ys ]);
    } + ')()';

    var output = falafel(src, function (node) {
        if (node.type === 'ArrayExpression') {
            node.update('fn(' + node.source() + ')');
        }
    });

    t.test('inside test', function (q) {
        q.plan(2);  // there should be a total of 2 assertions within this test scope. This is 1st assertion of outer test scope.

        q.ok(true, 'inside ok'); // 2nd assertion in outer test scope. 1st assertion in this test scope.

        setTimeout(function () {
            q.ok(true, 'inside delayed'); // 3rd assertion in outer test scope. 2nd assertion in this test scope.
        }, 3000);
    });

    var arrays = [
        [ 3, 4 ],
        [ 1, 2, [ 3, 4 ] ],
        [ 5, 6 ],
        [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ],
    ];

    Function(['fn','g'], output)(
        function (xs) {
            t.same(arrays.shift(), xs); // 4th assertion in outer test scope.
            return xs;
        },
        function (xs) {
            t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); // 5th assertion in outer test scope.
        }
    );
});

test('another', function (t) {
    t.plan(1);
    setTimeout(function () {
        t.ok(true);
    }, 100);
});

A potential improvement would be to allow plan to increment the number of things being counted. Thus,
  t.plan(2);
  testAsyncThing(..., function() {
    t.ok(true);
    t.notOk(false);
  });

  t.plan(1);
  testAnotherThing(..., function(randInt) {
    t.pass();
    if (randInt % 2 === 0) {
      t.plan(1)
      testOnEven(..., function() {
        t.pass();
      }
    }
  });

Thoughts? (I will test it locally, since by my naive glance, this is trivial to implement.)

+1 I also need it because I run functions that may call sub-functions that plan tap tests.
With best regards

@benfleis @strarsis  A workaround for incremental test plans:
          first_test(t) {
            t.plan(2);
            testAsyncThing(..., function () {
              t.ok(true);
              t.notOk(false);
            });
          }

          second_test(t) {
            t.plan(1);
            testAnotherThing(..., function (randInt) {
              t.pass();
              if (randInt % 2 === 0) {
                t.plan(1)
                testOnEven(..., function () {
                  t.pass();
                }
             }
            });
          }

          tape.test('parent test clause', function(test) {
            test.plan(2)
            test.test('nested test', function(t) {
              first_test(t)
            })
            test.test('nexted test 2', function(t) {
              second_test(t)
            })
          })

do let know if this is not helpful, please.


fix(netlify-cms-widget-text): set correct font family

Summary
Use the same font family in the textarea as in other widgets
Test plan
Before

After

A picture of a cute animal (not mandatory but encouraged)

Deploy preview for netlify-cms-www ready!
Built with commit 6ce4ee35303c52fc6e4e72266a3979b4837e80ba
https://deploy-preview-1916--netlify-cms-www.netlify.com

Deploy preview for cms-demo ready!
Built with commit 6ce4ee35303c52fc6e4e72266a3979b4837e80ba
https://deploy-preview-1916--cms-demo.netlify.com


vext is not working when the interpreter is called directly instead from an active virtualenv

Hi,
I think the logic to determine if the interpreter is called directly instead from an active virtualenv is wrong.
In the in_venv function
https://github.com/stuaxo/vext/blob/adea4b593ae4c82da0965ec1addaa1cd6d5b396c/vext/env/__init__.py#L75-L81
the debug output seems to indicate that _in_venv should be true when the sys.executable interpreter is the same as the first existing one in the path, but line 79 checks the opposite.
Changing the != to == gives the correct result. The debug message should propably also be changed.

import sys
_in_venv = None
python = basename(sys.executable)
for p in os.environ['PATH'].split(os.pathsep):
py_path = join(p, python)
if isfile(py_path):
print(py_path)
_in_venv = sys.executable != py_path
logger.debug("in_venv: [%s], sys.executable is not first python in path [%s]", _in_venv, py_path)
break
_in_venv

I extracted the code and the original logic doesn't seem right.
sys.executable always == the first in the PATH, maybe older versions of virtualenv just prepended their python binary to the path and left the older one there.
# inenv.py
import os
import sys
from os.path import basename, isfile, join

import sys

print(sys.executable)
python = basename(sys.executable)
for p in os.environ['PATH'].split(os.pathsep):
    py_path = join(p, python)
    if isfile(py_path):
        _in_venv = sys.executable != py_path
        print("in_venv: [%s], sys.executable is not first python in path [%s]" % (_in_venv, py_path))
        break

print("in_venv", _in_venv)

Can you let me know:

how you create your virtualenv
which os you are running.
how you hit this codepath.

I guess this detection method has run it's course and needs to be replaced.

Im using Arch Linux, python 3.8.5 and virtualenv 20.0.23.
That my virtualenv interpreter was the first in the path was just a coincidence, trying to recreate the behaviour without that gives a different outcome but also not right, I think.
Running
python -m virtualenv -p python3 venv
venv/bin/pip install vext.pyqt5

VEXT_DEBUG_LOG=1 venv/bin/vext -l

VEXT_DEBUG_LOG=1 venv/bin/python -c "import PyQt5"

outputs
in_venv enter with interpreter /xxx/venv/bin/python
in_venv: [True], sys.executable is not first python in path [/usr/bin/python]
Running in virtualenv [disabled]
pyqt5.vext

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'PyQt5'

I would expect that installing vext.pyqt5 and then running something from the venv would give access to my system installation of PyQt5. This seems not to be the case because vext is disabled because it is running in an virtuelenv? Enabling it with vext -e works.
Running
python -m virtualenv -p python3 venv
venv/bin/pip install vext.pyqt5

PATH="$(pwd)/venv/bin":"$PATH" VEXT_DEBUG_LOG=1 venv/bin/vext -l

outputs
in_venv enter with interpreter /xxx/venv/bin/python
in_venv: [False], sys.executable is not first python in path [/xxx/venv/bin/python]
Not running in virtualenv [disabled]
pyqt5.vext

The same result for the opposite reason? Enabling it with vext -e doesn't work.
One problem seems to be the check for the virtualenv environment. The virtualenv manual states that the activation scripts are not necessary and directly calling programs from the bin directory will work. So the $PATH check can't tell if python is running from an virtualenv.
Is such a check necessary? Installing vext not inside a virtualenv is pointless and maybe should just be an user error?
The other problem is that after installing vext.pyqt5 vext is disabled, my expactation is that it should be enabled. The README states

Mostly you will use vext just by installing a package like 'vext.pygtk'

this might be related to the virtualenv check.

A lot of this can be fixed by vext having decent tests, then hopefully code can be simplified.

Is such a check necessary? ...
As I found out during development, when it goes wrong it can stop python importing anything at all, so I like to have some safety here.

... Installing vext not inside a virtualenv is pointless and maybe should just be an user error?
This would probably be a good feature.

The other problem is that after installing vext.pyqt5 vext is disabled, my expactation is that it should be enabled. The README states
Mostly you will use vext just by installing a package like 'vext.pygtk'

this might be related to the virtualenv check.

This sounds like a reasonable conclusion.

We want the function to return True:
When run:

Inside a virtualenv
Inside a venv

But also, when using the interpreter of either, from outside, e.g.
my-env/bin/python myscript.py
We really need a test framework that creates the different kind of environments then is run with different flags to tell it whether it should be inside or outside (the tests can't actually check, since that would be implementing the same code as we want to test in vext).


add update feature to ballerina CLI

Description:
It is convenient when using the ballerina CLI to know if you're using the latest version, or to be notified of a new version that might be available. Additionally, an auto-update feature would be nice.
Suggested model:
> ballerina --version --update-check
You are currently on version 0.975

Checking for updates...
New version available 0.981.1

To upgrade run:
ballerina --update 0.981.1

--update-check could be abbreviated as -u and --update could default to latest if no version is specified.
Suggested Labels (optional):
enhancements, cli
Suggested Assignees (optional):

This is available with ballerina-1.0.0-beta the command is ballerina dist update


playground: Multi-currency in game and vesting

Fixes #875

How does Campaign work now Jann? You can't get an Ada balance in your wallet anymore, so you won't be able to contribute any funds...

Hm why can't you get an Ada balance in your wallet?

You can specify Ada as an input type, and that will then be converted to Value internally by the contract endpoint (With Ada.toValue)

Ah, okay. 👍


Add .iOS(.v10) as a platform so the package compiles for iOS (os_unfa…

…ir_lock)

Thanks! I noticed a couple of other availability issues, but I'll address them in another PR and tag a release.

Thanks for the great package!


⚠ ClamAV has degraded performance

In b9f9c06, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 175 ms

Resolved: ClamAV performance has improved in 3301de6.


Switch CI script to xcodebuild + xcpretty

As discussed in #516 we see some failures with xctool in order to avoid that we should change to xcodebuild and xcpretty (optionally).

Closing as #516 has addressed the Xcode 7 build issues on Travis


Octal number representation Error

Javascript' octal number representation is 0oxx, while it is 0xx in Python. Transcrypt raises a syntax error:

length & 077 [<-SYNTAX FAULT]

Is there a way to go round this error? I am looking for a solution both accepted by Python and Transcrypt.

I found that Python 3.x used 0oxx representation too. The 0xx representation was  available only before Python 2.x. So, changing to 0oxx represention fixed the problem.