Make DebugLogger and EventLogLogger externally configurable

Addresses #427 and more.
Right now, only ConsoleLogger can be configured from an IConfiguration instance. This change makes DebugLogger and EventLogLogger configurable via IConfiguration, also supporting automatic reloading.
The changes are mostly additive, but there's a breaking change in that I've removed ConfigurationConsoleLoggerSettings, ConsoleLoggerSettings and IConsoleLoggerSettings.
To prevent duplicating logic across all three loggers, I've replaced ConfigurationConsoleLoggerSettings with ConfigurableLoggerSettings and put that in Microsoft.Extensions.Logging.Abstractions.
Along with that, I've introduced an abstract type named ConfigurableLoggerProvider, which ConsoleLoggerProvider, DebugLoggerProvider and EventLogLoggerProvider now subclass. ConfigurableLoggerProvider contains the configuration logic which used to reside in ConsoleLoggerProvider.
I don't think the filter logger and the TraceSource logger fit into this new model, so I've left them as is.
A few points pending:

For now I've put ConfigurableLoggerProvider and ConfigurableLoggerSettings in Microsoft.Exntesions.Logging.Abstractions, but I think they might warrant their own package (Microsoft.Extensions.Logging.Configuration?). I also thought of putting them in Microsoft.Extensions.Logging, but that would change other loggers' dependencies from depending on that package instead of only depending on the .Abstractions one.

DebugLogger and EventLogLogger now have an IncludeScopes property, but it doesn't do anything right now.

More tests.

cc @kichalla @BrennanConroy @lodejard @davidfowl @Eilon @muratg

Moving this to 1.0.1 as well.

@cesarbs what are we doing with this one?

@muratg I'll get back to it. I think I'll go over another "full iteration" on the idea since I'm not happy with a number of things in this first attempt.

@cesarbs this one good to close then?


Carousel

Carousel arrows not aligned, overlay with navbar (z-index) and not responsive on mobile screens.

I tried to fix it , i think its better now ,more responsive , check it out , i don't know how to set height of  Stack or flex to fit it to screen (its getting bigger then the screen), i tried with height attribute and it doesn't work ,  i added services and its not done just set the services array i'll add icons  and more services more tommorw

Fixed.


tree-sitter-yaml hash listed in Cargo.toml does not exist; cannot build

Lapce Version
Master (as of 2024-05-07 20:04 UTC), as well as v0.4.0 tag.
System information
PopOS (Ubuntu Mantis)
EndeavourOS (Arch)
Describe the bug
In lapce-core the Cargo.toml file lists hash 80c8d76847f03e772c5c524cf29bafb56858a8d1 for tree-sitter-yaml. Specifically it is listed as follows:
tree-sitter-yaml = { git = "https://github.com/panekj/tree-sitter-yaml", rev = "80c8d76847f03e772c5c524cf29bafb56858a8d1", optional = true }

I'm sure this worked at some point but this hash has since been removed from the referenced repository. See: 80c8d76847f03e772c5c524cf29bafb56858a8d1  which now yields a 404.
Additional information
This probably still works for anyone who had already cached a copy of the the tree-sitter-yaml code with that hash, but for a new build it no longer works because the hash cannot be downloaded.  I did try about 40 different commits just to see if I could find one that would build but they all had issues with the Some type.
~/projects/3rdparty/lapce$ cargo build --release
    Updating git repository `https://github.com/panekj/tree-sitter-yaml`
error: failed to get `tree-sitter-yaml` as a dependency of package `lapce-core v0.4.0 (/home/brant/projects/3rdparty/lapce/lapce-core)`

Caused by:
  failed to load source for dependency `tree-sitter-yaml`

Caused by:
  Unable to update https://github.com/panekj/tree-sitter-yaml?rev=80c8d76847f03e772c5c524cf29bafb56858a8d1#80c8d768

Caused by:
  revspec '80c8d76847f03e772c5c524cf29bafb56858a8d1' not found; class=Reference (4); code=NotFound (-3)

@panekj wow that was astonishingly fast :heart:   thanks!

If you care about reproducing the previous release, there is vendor tarball with all dependencies -> https://github.com/lapce/lapce/releases/download/v0.4.0/vendor.tar.gz

It should build normally now as well as it's restored here: https://github.com/panekj/tree-sitter-yaml/tree/old
(repo was renamed to https://github.com/panekj/tree-sitter-yaml-old)


prometheus how to monitor kube-scheduler/kube-controller-manager by https?

What did you do?
I want to use prometheus-oprator to get metrics of kube-scheduler/kube-controller-manager via https.
I use certificate-authority-data, client-certificate-data and client-key-data in /etc/kubernetes/scheduler.conf to generate a secret. And use this secret to mount them into servicemonitor as caFile, certFile and keyFile.
And the endpoints is https://X.X.X.X:10259/metrics.
BUT, the kube-scheduler target generate a error:
Get https://X.X.X.X:10259/metrics: x509: certificate is valid for <IP_ADDRESS>, not X.X.X.X
(X.X.X.X is host ip)
What did you expect to see?
the kube-scheduler target in prometheus is up, and no errors.
What did you see instead? Under which circumstances?
the kube-scheduler target generate a error:
Get https://X.X.X.X:10259/metrics: x509: certificate is valid for <IP_ADDRESS>, not X.X.X.X
(X.X.X.X is host ip)
Environment
kubernetes v1.13.2

System information:
Linux 3.10.0-862.11.6.el7.x86_64 x86_64

Prometheus version:
prometheus, version 2.2.1 (branch: HEAD, revision:
bc6058c81272a8d938c05e75607371284236aadc)
build user:       root@149e5b3f0829
build date:       20180314-14:15:45
go version:       go1.10

Prometheus configuration file:

global:
  scrape_interval: 30s
  scrape_timeout: 10s
  evaluation_interval: 30s
  external_labels:
    prometheus: alauda-system/kube-prometheus
    prometheus_replica: prometheus-kube-prometheus-0
alerting:
  alert_relabel_configs:
  - separator: ;
    regex: prometheus_replica
    replacement: $1
    action: labeldrop
  alertmanagers:
  - kubernetes_sd_configs:
    - api_server: null
      role: endpoints
      namespaces:
        names:
        - alauda-system
    scheme: http
    path_prefix: /
    timeout: 10s
    relabel_configs:
    - source_labels: [__meta_kubernetes_service_name]
      separator: ;
      regex: kube-prometheus-alertmanager
      replacement: $1
      action: keep
    - source_labels: [__meta_kubernetes_endpoint_port_name]
      separator: ;
      regex: http
      replacement: $1
      action: keep
rule_files:
- /etc/prometheus/rules/*.yaml
scrape_configs:
- job_name: alauda-system/kube-prometheus-exporter-kube-scheduler/0
  honor_labels: true
  scrape_interval: 15s
  scrape_timeout: 10s
  metrics_path: /metrics
  scheme: https
  kubernetes_sd_configs:
  - api_server: null
    role: endpoints
    namespaces:
      names:
      - kube-system
  bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
  tls_config:
    ca_file: /etc/prometheus/secrets/pki-ca/ca.crt
    cert_file: /etc/prometheus/secrets/pki-ca/scheduler.client-certificate.crt
    key_file: /etc/prometheus/secrets/pki-ca/scheduler.client-key.key
    insecure_skip_verify: false
  relabel_configs:
  - source_labels: [__meta_kubernetes_service_label_app]
    separator: ;
    regex: exporter-kube-scheduler
    replacement: $1
    action: keep
  - source_labels: [__meta_kubernetes_service_label_component]
    separator: ;
    regex: kube-scheduler
    replacement: $1
    action: keep
  - source_labels: [__meta_kubernetes_endpoint_port_name]
    separator: ;
    regex: http-metrics
    replacement: $1
    action: keep
  - source_labels: [__meta_kubernetes_namespace]
    separator: ;
    regex: (.*)
    target_label: namespace
    replacement: $1
    action: replace
  - source_labels: [__meta_kubernetes_pod_name]
    separator: ;
    regex: (.*)
    target_label: pod
    replacement: $1
    action: replace
  - source_labels: [__meta_kubernetes_service_name]
    separator: ;
    regex: (.*)
    target_label: service
    replacement: $1
    action: replace
  - source_labels: [__meta_kubernetes_service_name]
    separator: ;
    regex: (.*)
    target_label: job
    replacement: ${1}
    action: replace
  - source_labels: [__meta_kubernetes_service_label_component]
    separator: ;
    regex: (.+)
    target_label: job
    replacement: ${1}
    action: replace
  - separator: ;
    regex: (.*)
    target_label: endpoint
    replacement: http-metrics
    action: replace

Logs:
no error in prometheus log

I think you should fix your TLS setup, as the server is listening on that IP, so the certificate should be valid for it. If you can't, then set the serverName: <IP_ADDRESS> field in the TLSConfig of the ServiceMonitor(s) to make Prometheus validate against that.

not worked for me.
If I started kube-schedeuler/kube-controller-manager with arg --authorization-always-allow-paths=/healthz,/metrics,  the metrics api is not verified anymore, so I can get metrics via https.

In the post(https://octetz.com/posts/secure-port-k8s-cm-sched), I can get metrics from kube-controller-manager via https.
But it is not worked for kube-scheduler witch same mothod, same token.
Is it a bug of Kubernetes?
@brancz

Are you still getting the same error? Note the token has nothing to do with the error you posted in the original issue, it's purely a TLS issue, a token issue would only occur after the TLS communication is successful.

Closing due to inactivity.


Resolve "pgrep: not found" issue

Resolve "pgrep: not found" issue
Added installation of the procps package in the builder stage to ensure the pgrep command is available in the final Docker image. This resolves the "pgrep: not found" issue in the HEALTHCHECK.

Thank you


Tab container Issue after updating AjaxControlToolkit from 15.1 to 16.1

All tabs remain disabled after selected once.
ajax__tab_xp .ajax__tab_disabled .ajax__tab_tab

@cristinadorotan
Would you please provide a sample project that illustrates this issue?

Hy, I have the project but how do I send it to you ? (ASp Web Forms, VB.Net) when I select a TAB, navigate to others, return to the first one selected, the CSSClass for each active and disabled is set on that TAB. This messes up our entire project, because we have specific styles for a disabled tab.

You can attach an archive with the project to your comment.

Essentially my problem is that the ajax__tab_disabled class remains on each tab after I access them.

I cannot upload ZIP files, if you are kind please download from: https://we.tl/HpcOwvo0n9   the project. Thank you!

I downloaded the sample you provided and clicked on tab headers at the About.aspx page, but see no disabled tabs.
Do I need to perform any special action to reproduce this issue?

You need to inspect the tab panel element and see that the disabled CssClass is added on each tab you visited and never removed.
I completed with css to be more, visual, here is the link to the project:
https://we.tl/EeDOKGhazv
Thank you!

@cristinadorotan To work around this issue, you can remove the ajax__tab_disabled CSS class in the OnClientClick event handler.
As this event occurs before the class is applied, a little timeout is required:
<script type="text/javascript">
	function removeDisabledClass() {
		var tabIDs = eval('<%= GetTabIDs()%>');

		setTimeout(function() {
			for(var i = 0; i < tabIDs.length; i++) {
				var header = document.getElementById(tabIDs[i] + "_tab");
				header.classList.remove("ajax__tab_disabled");
			}
		}, 50);
	}
</script>

<ajaxToolkit:TabContainer ID="tab_Container" runat="server">

	<ajaxToolkit:TabPanel ID="tb_A" HeaderText="OPTION_A" runat="server" OnClientClick="removeDisabledClass">
	</ajaxToolkit:TabPanel>

	<ajaxToolkit:TabPanel ID="tb_B" HeaderText="OPTION_B" runat="server" OnClientClick="removeDisabledClass">
	</ajaxToolkit:TabPanel>

	<ajaxToolkit:TabPanel ID="tb_C" HeaderText="OPTION_C" runat="server" OnClientClick="removeDisabledClass">
	</ajaxToolkit:TabPanel>

	<ajaxToolkit:TabPanel ID="tb_D" HeaderText="OPTION_D" runat="server" OnClientClick="removeDisabledClass">
	</ajaxToolkit:TabPanel>

</ajaxToolkit:TabContainer>

GetTabIDs s a utility method that is used to get an array of header IDs.
I have attached the updated sample project AjaxControlToolkitTabIssueUpd.zip

Thank you, how does this work when I want to disable a tab on purpose ?

You need to exclude this tab from the class removal loop like this:
    <script type="text/javascript">
        var disabledTabIndex = 2; // can be set by external code

        function removeDisabledClass() {
            var tabIDs = eval('<%= GetTabIDs()%>');

            setTimeout(function() {
                for(var i = 0; i < tabIDs.length; i++) {
                    if(i === disabledTabIndex)
                        continue;

                    var header = document.getElementById(tabIDs[i] + "_tab");
                    header.classList.remove("ajax__tab_disabled");
                }
            }, 50);
        }
    </script>

...

<ajaxToolkit:TabPanel
    ID="tb_C"
    HeaderText="OPTION_C"
    runat="server"
    OnClientClick="removeDisabledClass"
    Enabled="false" />


Automatic semver versioning not working

semver-release-action v1 failed due to set-env usage.
semver-release-action v2 not updating tags correctly.
See https://github.com/zwaldowski/semver-release-action/issues/12

Fixed upstream


Update circuit.py

ParameterTable has depreciated as a class name since Qiskit v0.21, where it was changed to ParameterReferences.
For Qiskit 1.2, it was again changed to ParameterView, which is my proposed change in circuit.py file.

Thank you for the PR!
I am aware of considerable changes coming from Qiskit in the current and future releases. I suspect we'll need to work on updates. Luckily we do have funded projects to keep the bosonic-qiskit software updated.

Will be fixed by #123

Fixed by #123


Missing required extension in MVK in VulkanSDK <IP_ADDRESS>?

I am getting the validation warning:
Missing extension required by the device extension VK_KHR_portability_subset: VK_KHR_get_physical_device_properties2. The Vulkan spec states: All required extensions for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list (https://vulkan.lunarg.com/doc/view/<IP_ADDRESS>/mac/1.2-extensions/vkspec.html#VUID-vkCreateDevice-ppEnabledExtensionNames-01387)"

VK_KHR_get_physical_device_properties2 is not in the list returned by enumerateDeviceExtensionProperties (vulkan.hpp name) so I can't enable it. What am I doing wrong or is the extension missing?  (I was confusing this and an earlier validation warning telling me I needed to enable VK_KHR_portability_subset when I wrote the original.)

I did an internet search for example using VK_KHR_portability_subset and found nothing.

VK_KHR_get_physical_device_properties2 is not in the list returned by enumerateDeviceExtensionProperties

Of course not. It's an instance extension. Did you enable it on the instance?

Of course not. It's an instance extension. Did you enable it on the instance?

The validation message came during createDevice so I thought it must be a device extension. Furthermore since VK_KHR_portability_subset is a device extension how am I supposed to know when I create the instance that I need to enable VK_KHR_get_physical_device_properties2. Should I just do it on spec. in case the app finds it is running on a Portability implementation?

Should I just do it on spec. in case the app finds it is running on a Portability implementation?

The short answer is yes.
The longer explanation is the portability extension is provisional, and may yet change again. The main purpose is to "alert" you that you are running on a portability implementation and thus your app may be compromised if it is not aware of this. The Validation error you are getting is doing it's job by telling you that you are indeed on a portability extension and you have not made any efforts to check to see if this is the case, and/or accommodate that. Any application that expects to be able to run without issue on a fully conformant Vulkan implementation can leave this unimplemented and a validation error will be thrown if the environment is not what it expects. Conversely, by making use of the extension you are saying your app expects to find itself on a portability implementation (like MoltenVK), and your app has been coded accordingly.
I hope that helps.

how am I supposed to know when I create the instance that I need to enable VK_KHR_get_physical_device_properties2

@MarkCallow You make a good point. As @richard-lunarg indicates, the VK_KHR_portability_subset extension is provisional, so we can possibly modify it before it becomes final. I've posted a discussion question to the portability group about the instance vs device requirement.

I hope that helps.

Yes. Thanks. I now check for VK_KHR_get_physical_device_properties2 and if it exists I enable it assuming doing so is basically harmless if not used. The cost is a loop over the list of enumerated instance extensions and many strncmps.

I'm closing this as answered here. Further followup will occur in the the portability issue listed above.


Subgraphs fail when no traces are returned for a block

Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When a subgraph reaches the head of the chain, it can (or will?) run into a block for which the traces are not yet available. In this case, the subgraph will fail with an error like this one:
Subgraph instance failed to run: Trace stream return no traces for block: number = `7728630`, hash = `0xb1b1…648f`, code: SubgraphSyncingFailure, id: QmVozgjxwKKJWcDmbvv4AEWCj9jDbeGYyAqwiQqawJZMu8, updates: 0

Before that the subgraph already seems to try fetching the traces for the same block over and over again:
...
Requesting traces for block 7728630, component: BlockStream, updates: 0
Requesting traces for block 7728630, component: BlockStream, updates: 0
Requesting traces for block 7728630, component: BlockStream, updates: 0
Requesting traces for block 7728630, component: BlockStream, updates: 0

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

Clone https://github.com/Jannis/gravity-subgraph
Deploy it to a Graph Node that is connected to a Parity archive node with tracing enabled and the "traces" API enabled
Wait for the subgraph to sync all the way, then wait a bit longer

What is the expected behavior?
I'm assuming the expected behavior is that the subgraph handles the absence of traces gracefully and keeps retrying?

Is there any workaround when deploying to api.thegraph.com? This seems to happen consistently when I try to update this subgraph: https://thegraph.com/explorer/subgraph/ziegfried/peepeth

@ziegfried Not yet but we're working on a fix.

Resolved as of #947.


Module not found error

Hi, I'm using ky-universal in a nuxtjs project and at the build there is an error:
Module not found: Error: Can't resolve 'web-streams-polyfill/ponyfill/es2018'```

What can I do to solve this Issue?

Thanks

This is an issue with NuxtJS’s build system. That dependency is marked optional. Open an issue on NuxtJS instead.


[video_player] Add possibility to start video playback from certain position

Use case
I need to start video playback from certain duration.
Proposal
Add duration parameter to initialize method with optional value Duration.zero

Hi @IlyaMax, Thanks for filing the issue. You could use seekTo which allows switching video to any duration. Please take a look at the below code sample which starts the video at 15th second.

_controller.seekTo(const Duration(seconds: 15));

code sample
import 'package:video_player/video_player.dart';
import 'package:flutter/material.dart';

void main() => runApp(VideoApp());

class VideoApp extends StatefulWidget {
  @override
  _VideoAppState createState() => _VideoAppState();
}

class _VideoAppState extends State<VideoApp> {
  late VideoPlayerController _controller;

  @override
  void initState() {
    super.initState();
    _controller = VideoPlayerController.network(
        'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerFun.mp4')
      ..initialize().then((_) {
        _controller.seekTo(const Duration(seconds: 15));
        setState(() {});
      });
    _controller.play();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Video Demo',
      home: Scaffold(
        body: Center(
          child: _controller.value.isInitialized
              ? AspectRatio(
                  aspectRatio: _controller.value.aspectRatio,
                  child: VideoPlayer(_controller),
                )
              : Container(),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: () {
            setState(() {
              _controller.value.isPlaying
                  ? _controller.pause()
                  : _controller.play();
            });
          },
          child: Icon(
            _controller.value.isPlaying ? Icons.pause : Icons.play_arrow,
          ),
        ),
      ),
    );
  }

  @override
  void dispose() {
    super.dispose();
    _controller.dispose();
  }
}

@maheshmnj when I tried to do something like that last time I had seen first frame but I think this shouldn't work like this. Are you sure your code sample doesn't have this behavior ok both android and ios?

Thanks for the info @IlyaMax, I do see an initial frame with the above approach verified on Android.
Labeling this issue as a valid feature request.

Add duration parameter to initialize method with optional value Duration.zero

Adding initialization parameters for things that change over time has generally been a source of confusion in other plugin controllers. (I assume you mean position, not duration, given the description.)
If the issue is the initial frame, perhaps a better solution would be a parameter that prevents drawing until the first play or seekTo call.

Yes, position. What you mean by "source of confusion"? Can you give examples of such cases? You mean to force users of plugin to call play or seekTo after initialising or allow to call seekTo before player is initialized to make it work(is it possible?)?

What you mean by "source of confusion"?

The usual pattern in Flutter is you change things by rebuilding then with different parameters. Plugin controllers like this one map to native objects where that's not the model, and instead everything is based on mutating persistent state.
Providing constructor arguments that correspond to mutating state values on the native side have very unclear semantics. E.g., if I have a video player with a duration value, what happens if I rebuild after three user has started playing the video? Does it reset the position? If so, that's likely unexpected. But what if I try to do the standard Flutter thing and rebuild with a different value? Does that change the position? If not that's unexpected.

Can you give examples of such cases?

The initial URL parameter in the webview plugin has caused this kind of confusion for many people.

You mean to force users of plugin to call play or seekTo after initialising

I don't understand what you mean by "force". You want to seek in the video. There's a method for seeking. Where is the "forcing" happening here?

Providing constructor arguments that correspond to mutating state values on the native side have very unclear semantics. E.g., if I have a video player with a duration value, what happens if I rebuild after the user has started playing the video? Does it reset the position? If so, that's likely unexpected. But what if I try to do the standard Flutter thing and rebuild with a different value? Does that change the position? If not that's unexpected.

You mean I need to beware of this case? That it can lead to unexpected behavior?
controller.initialize(initialPosition:Duration(...)).then((_)=>controller.seekTo(Duration(...));

I don't understand what you mean by "force". You want to seek in the video. There's a method for seeking. Where is the "forcing" happening here?

You said

If the issue is the initial frame, perhaps a better solution would be a parameter that prevents drawing until the first play or seekTo call.

controller.initialize(preventDrawingUntilSeekTo:true).then((_)=>controller.seekTo(Duration(...));
I mean if I enable preventDrawingUntilSeekTo option I force users to call seekTo. Do I understand correctly your idea?

Or maybe it would be better to do like this
controller.initialize(initialPosition:Duration(...))

And inside initialize call seekTo and prevent drawing until seeking is completed

Sorry, I misread the proposal originally; I thought you wanted to make this a new constructor argument.
Looking at the code again, I don't think there's any reason we couldn't just make calling seekTo work before initialize, by storing the value for using during creation.


ARROW-11013: [Rust][DataFusion] Add trim to CsvReader

The current CSV reader cannot parse strings to types with leading/trailing white spaces as the parsers are very strict. This means being able to read and parse the tpch-dbgen included answers files is not possible.
The underlying csv crate supports a four different behaviors for trimming strings:

None (default): does no trimming.
Headers: trim only header fields.
Fields: trim only field values.
All: trim both headers and field values.

Rather than exposing all these options and forcing users to understand the underlying csv crate this PR simplifies this decision to boolean: None (false) or All (true) while retaining the default false behavior.

Thanks for the PR @seddonm1!
Wouldn't it be better to keep the CSV reader simple and do the trim after loading the CSV (in Arrow/DataFusion)? There it could be a simple trim(col) too. I the use case is relatively limited where you actually want to apply trimming on all columns.
I'm hesitant too to depend on the "more advanced" csv crate features, I think at some point it makes sense to utilize csv_core instead (for better performance).

Thanks for the PR @seddonm1!
Wouldn't it be better to keep the CSV reader simple and do the trim after loading the CSV (in Arrow/DataFusion)? There it could be a simple trim(col) too. I the use case is relatively limited where you actually want to apply trimming on all columns.
I'm hesitant too to depend on the "more advanced" csv crate features, I think at some point it makes sense to utilize csv_core instead (for better performance).

Yes it may be so I think this is up for discussion.
I have added the trim function in https://github.com/apache/arrow/pull/8966 but the actual flow is read csv -> trim -> cast.

Are you aware of any other parser that does similar trimming like the csv crate?
Looking at pandas for example it seems that it also doesn't have the option to trim whitespaces from header / values directly.

I was referencing the underlying library that Spark uses: https://github.com/uniVocity/univocity-parsers/blob/master/src/main/java/com/univocity/parsers/csv/CsvParser.java#L116
I am more than happy to kill this PR if we make the decision that it doesn't belong here.

It actually looks like we are missing the ability to read a csv and return the values all strings (similar to how infer schema works) without also trying to parse the values or having to provide an all DataType::Utf8 schema.

@Dandandan I have taken the read -> trim -> parse approach here: https://github.com/apache/arrow/pull/9015
I think I will close this an open a new ticket that allows the CSVReader to infer number of columns (with named from headers if provided) but return all DataType::Utf8. Thoughts?

I think that is a great idea @seddonm1 . We can always revisit later if it turns out we really need it in the parser! Thank you!

Closed in favor of https://issues.apache.org/jira/browse/ARROW-11036


Write select

The select function should take a list of tuples of functions (d_i, f_i) over some index i and return the the value of the function f_j evaluated on that cluster for the first decision d_j which returns true on the cluster or return an empty string.
Given a 3 of these tuples as fs and a cluster xs, this should be something like
def select(fs, xs, default):
    return (d1(xs) and f1(xs)) or (d2(xs) and f2(xs)) or (d3(xs) and f3(xs)) or default

which should be written with a generator so that the tuples do not all get evaluated for each x and only process until the first is accepted
def select(gs, xs, default):
    return g(xs) or select(tail(gs), xs, default)

for gs(xs) a generator for the composition of the decision and function with an and and g(xs) the value of next(gs).
It will need to be much tidier, more complete and type hinted.

I'm dumb, this is probably just head on itertools.compress

The structure of this is complete. Now I just need to write the functions that define the thresholds for the decision points as well as the functions that select the label if the threshold is passed

Issues #28 and #29 spun out from this as extension issues.
TO DO

[X] Edit distance
[X] Wordgram selection
[X] Charactergram selection
[ ] Hypernym selection
[ ] Fallback selection


Categorie an Payee

Hello, all right?
I can not add new categories. The message informed: "Please enter a category name." But i have already entered "Category Name". Also I can not add a new "Payee".
Thanks.

@jowbjj can you post the messages you're getting on the console please. That will help me understand the issue

https://drive.google.com/open?id=0B4fFeWf4GLjSUHRrX1NXWkVxbEk

I found the bug in the logic. I'll fix it this weekend

Okay, I looked for the error, but my knowledge is basic.
If I can add some useful function, I post here.
Thanks.

Hello friend, is there anything new in the project correction? Hug.

I'm starting a full rewrite of the app based on new discoveries and APIs, and of course, utilizing the latest ionic, angular and firebase libraries. Stay tuned!

Amazing!
But when I click on the account it informs the error of the image.
https://drive.google.com/file/d/0B4fFeWf4GLjSOXhwZF9CNXQ5N3c/view
After clicking "close" does not appear the list of expenses / incomes.

I"ll have this fixed very soon!


Kiesowe/04 rag vector db/notebooks/03 rag with opensearch

Description of changes:
moved Hugging Face models to optional and added important usage notes for Jina AI embeddings model, replaced outdated links and resources, added vector store search methods, expanded generative question answering, and added conversational AI with retrieval
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Remove the code block below if it's not needed. Doesn't look like it is needed
region = boto3.Session().region_name

# Mapping for model package names
model_name_map = {
    "jina-embeddings-v2-base-en": "jina-embeddings-v2-base-en-32555da8a0b431d190bf3eca46758b72",
}

# Specify the model name
model_name = model_name_map["jina-embeddings-v2-base-en"]

# Mapping for model packages
model_package_map = {
    "us-east-1": f"arn:aws:sagemaker:us-east-1:865070037744:model-package/{model_name}",
    "us-east-2": f"arn:aws:sagemaker:us-east-2:057799348421:model-package/{model_name}",
    "us-west-1": f"arn:aws:sagemaker:us-west-1:382657785993:model-package/{model_name}",
    "us-west-2": f"arn:aws:sagemaker:us-west-2:594846645681:model-package/{model_name}",
    "ca-central-1": f"arn:aws:sagemaker:ca-central-1:470592106596:model-package/{model_name}",
    "eu-central-1": f"arn:aws:sagemaker:eu-central-1:446921602837:model-package/{model_name}",
    "eu-west-1": f"arn:aws:sagemaker:eu-west-1:985815980388:model-package/{model_name}",
    "eu-west-2": f"arn:aws:sagemaker:eu-west-2:856760150666:model-package/{model_name}",
    "eu-west-3": f"arn:aws:sagemaker:eu-west-3:843114510376:model-package/{model_name}",
    "eu-north-1": f"arn:aws:sagemaker:eu-north-1:136758871317:model-package/{model_name}",
    "ap-southeast-1": f"arn:aws:sagemaker:ap-southeast-1:192199979996:model-package/{model_name}",
    "ap-southeast-2": f"arn:aws:sagemaker:ap-southeast-2:666831318237:model-package/{model_name}",
    "ap-northeast-2": f"arn:aws:sagemaker:ap-northeast-2:745090734665:model-package/{model_name}",
    "ap-northeast-1": f"arn:aws:sagemaker:ap-northeast-1:977537786026:model-package/{model_name}",
    "ap-south-1": f"arn:aws:sagemaker:ap-south-1:077584701553:model-package/{model_name}",
    "sa-east-1": f"arn:aws:sagemaker:sa-east-1:270155090741:model-package/{model_name}",
}

# Specify the model you want to use
if region not in model_package_map.keys():
    raise Exception(f"Current boto3 session region {region} is not supported.")

model_package_arn = model_package_map[region]

Also comment out jina_embeddings = HuggingFaceEmbeddings(model_name="jinaai/jina-embeddings-v2-base-en") # Jina AI model so that customers don't run into issues if they run the cell on a smaller instance


alignment attribute

After doing a git pull I'm now getting this error on any program:
In file included from /work2/00434/eijkhout/hipsycl/installation-intel/bin/../include/CL/../hipSYCL/sycl/libkernel/accessor.hpp(61),
                 from /work2/00434/eijkhout/hipsycl/installation-intel/bin/../include/CL/../hipSYCL/sycl/sycl.hpp(55),
                 from /work2/00434/eijkhout/hipsycl/installation-intel/bin/../include/CL/sycl.hpp(31),
                 from devices.cxx(17):
/work2/00434/eijkhout/hipsycl/installation-intel/bin/../include/CL/../hipSYCL/sycl/libkernel/detail/local_memory_allocator.hpp(162): error: alignment attribute must also appear on definition at line 162
    alignas(alignof(std::max_align_t)) inline static char _static_local_mem

The offending line is
#include <CL/sycl.hpp>

I haven't seen this error yet, can you provide some details on your setup? In particular, which compilers and compiler versions you use hipSYCL with.

Does this contain enough info?
hipsycl.txt

Thanks, it seems that this is caused by incomplete C++17 support in the Intel compiler up to version 19.x. We don't regularly test with this particular compiler. This code compiles with gcc, clang, MSVC and ICX and it was also fixed in newer versions of Intel ICC, at least starting with version 2021: https://godbolt.org/z/x3e4GbT3a
It's therefore not a hipSYCL issue, and I would recommend you upgrade your compiler. Independently, we can also check if there is a possible workaround.


Make position accessible

@daphnecor, I realized that the expert positions were actually not accessible!

I think this is already working with your changes. I did the following and can get an output -
env.scenario.expert_position(env.scenario.getObjects()[0], 0)
returns a tuple like '(9032.836914, -2718.306396)`

Cool, then we can merge it!

Nice, thanks!


ImportError: numpy.core.multiarray failed to import

When attempting to open the GUI I receive an error;
C:\Other\Ultimate Vocal Remover>vocalremover.py
 ** On entry to DGEBAL parameter number  3 had an illegal value
 ** On entry to DGEHRD  parameter number  2 had an illegal value
 ** On entry to DORGHR DORGQR parameter number  2 had an illegal value
 ** On entry to DHSEQR parameter number  4 had an illegal value
ImportError: numpy.core.multiarray failed to import
Traceback (most recent call last):
  File "C:\Other\Ultimate Vocal Remover\VocalRemover.py", line 24, in <module>
    import inference_v2
  File "C:\Other\Ultimate Vocal Remover\inference_v2.py", line 4, in <module>
    import cv2
  File "C:\Users\Username\AppData\Local\Programs\Python\Python37\lib\site-packages\cv2\__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: numpy.core.multiarray failed to import

Running Python 3.7.0 and have all the required applications and packages listed in the readme installed.

Please try:
pip install -U numpy

Please try:
pip install -U numpy

Requirement already up-to-date: numpy in c:\users\lucas\appdata\local\programs\python\python37\lib\site-packages (1.19.4)

Hmm, please look at this thread:
https://stackoverflow.com/questions/20518632/importerror-numpy-core-multiarray-failed-to-import
If it still does not work, please tell me you OS and current Python version.

Look at this thread:
https://stackoverflow.com/questions/20518632/importerror-numpy-core-multiarray-failed-to-import
If it still does not work, please tell me your OS and current Python version.

Following each error I was able to track down the issue to being numpy's incompatibility with latest Windows 10 versions 2004 and above. I went to numpy's folder and removed the whole "Win10 sanity check" (starting at line 305) and after that I managed to open the GUI and everything works fine.

Great, thank you for your cooperation!

Look at this thread:
https://stackoverflow.com/questions/20518632/importerror-numpy-core-multiarray-failed-to-import
If it still does not work, please tell me your OS and current Python version.

Following each error I was able to track down the issue to being numpy's incompatibility with latest Windows 10 versions 2004 and above. I went to numpy's folder and removed the whole "Win10 sanity check" (starting at line 305) and after that I managed to open the GUI and everything works fine.

Could you please give a step by step on how to do this? I'd appreciate it.

@JomSpoons Did you try the other suggestions on the thread?

@JomSpoons Did you try the other suggestions on the stackoverflow thread?

Almost every reply says to update numpy but it doesn't do anything. I'm already running numpy-1.19.4. Same error as before.

Ok I was able to fix this issue by reverting back to version 1.19.3 of numpy by uninstalling 1.19.4 and then running pip install numpy==1.19.3, hopefully this'll be fixed in the next numpy update

Good to know, thanks!


[GUI Editor] Beta release

Turns off the alpha warning message and adds the beta flag to signify the release of the GUI editor beta! Will merge it tomorrow assuming all is well :)

I'll let you merge it when you want


make cart that belongs to a user

make a cart that is for a logged in user and user can see their stored cart

[ ] make a cart slice for the specific user logged in
[ ] user has access to his or her cart when clicks on cart
[ ] editing the cart makes calls to cart database and update it accordingly
[ ] make navbar component for a user
[ ] cart has one-to-one relationship with a user

[ ] make a cart slice for the specific user logged in
[ ] user has access to his or her cart when clicks on cart
[ ] editing the cart makes calls to cart database and update it accordingly
[ ] make navbar component for a user

when a user is logged in, we have access to me object which is in our redux state.
We also have access to a token inside local storage.
me object has id, username and hashed password from our database.
when we have access to products as logged in user, and the user clicks add to cart, we make post request to the cart table with userID and the clicked product.
store the userID of the authenticated user on the carts table.


Document suppliers in Microprocurement process

https://014gc.sharepoint.com/:x:/r/sites/GCDevEx/Shared Documents/GCDevEx supplier outreach list.xlsx?d=wd14b3771527047e5b5345fea6e9b502e&csf=1&web=1&e=ibikPb


Update README

Add a link to TensorFlow GPU pre-requisites
Minor fixes

@alexey-trushkov , could you please take a look?

@alexey-sidnev looks good, but could you, please,  also fix my remark.

@alexey-trushkov , I don't see any remarks :(
Don't you forget to press the submit button during the review?


[Bug] SharedArrayBuffer is not defined

Describe the Bug
When using the @cornerstonejs/nifti-volume-loader library to load nifti files in a non-security context, an error SharedArrayBuffer is not defined will be reported
Steps to Reproduce

In the http environment
The nifti file is loaded using the @cornerstonejs/nifti-volume-loader library
In the type judgment of the invertDataPerFrame function, a ReferenceError is thrown because the constructor of SharedArrayBuffer on the global object is hidden

The current behavior
SharedArrayBuffer is not defined
ReferenceError: SharedArrayBuffer is not defined
The expected behavior
In http environment, avoid Referenceerrors
OS
MAC OS
Node version
16.17.0
Browser
Chrome 120.0.6099.216

Describe the Bug
When using the @cornerstonejs/nifti-volume-loader library to load nifti files in a non-security context, an error SharedArrayBuffer is not defined will be reported
Steps to Reproduce

In the http environment
The nifti file is loaded using the @cornerstonejs/nifti-volume-loader library
In the type judgment of the invertDataPerFrame function, a ReferenceError is thrown because the constructor of SharedArrayBuffer on the global object is hidden

### The current behavior
SharedArrayBuffer is not defined ReferenceError: SharedArrayBuffer is not defined
The expected behavior
In http environment, avoid Referenceerrors
OS
MAC OS
Node version
16.17.0
Browser
Chrome 120.0.6099.216

I have the same problem. How did you solve it？

you should see here, how you can turn it off https://docs.ohif.org/faq/#what-if-my-setup-does-not-support-the-shared-array-buffers-api
but basically it is about the init function inside cornerstone3D core

I have the same problem, have you solved it?

you can turn off the SAB, take a look at the pacakges/core/src/init

you can turn off the SAB, take a look at the pacakges/core/src/init

setUseSharedArrayBuffer(csEnums.SharedArrayBufferModes.FALSE)
Still an error.
headers: {       "Cross-Origin-Embedder-Policy": "require-corp",       "Cross-Origin-Opener-Policy": "same-origin",     }
Setting this does not cause an error, but it does not display the image.

We have moved away from shared array buffers. You can take a look at the migration docs https://www.cornerstonejs.org/docs/migration-guides/intro


Add Transcription Enabled Storage project

Purpose
Adding the transcription enabled storage / post call analytics project to samples/batch
Pull Request Type
What kind of change does this Pull Request introduce?
[ ] Bugfix
[X] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

#sign-off


Formatting: space is not added in parenthesis with arrow function

From @mlewand on April 29, 2017 14:4

VSCode Version: Code - Insiders 1.12.0-insider (0bec115779b11a9d78bdb24ad7918c22524ea2ac, 2017-04-28T18:57:52.518Z)
OS Version: Windows_NT ia32 10.0.15063
Extensions: none

Steps to Reproduce:

Set a following option in your user/workspace settings:
	"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": true
Open a new file, set language to JavaScript.
Paste a following snippet:

foo( () => 1 );
foo( 1 );

Press ctrl/cmd+shift+f.

Expected
The code stays the way it is.
Actual
Initial space gets removed.
foo(() => 1 );
foo( 1 );

Additional Info
Checked also on a regular VSCode installation.
Copied from original issue: Microsoft/vscode#25669

Confirmed with TS 2.3.2. Here's the format response:
[Trace - 12:45:42 PM] Response received: format (7). Request took 60 ms. Success: true
Result: [
    {
        "start": {
            "line": 1,
            "offset": 12
        },
        "end": {
            "line": 1,
            "offset": 12
        },
        "newText": " "
    },
    {
        "start": {
            "line": 2,
            "offset": 5
        },
        "end": {
            "line": 2,
            "offset": 5
        },
        "newText": " "
    },
    {
        "start": {
            "line": 2,
            "offset": 6
        },
        "end": {
            "line": 2,
            "offset": 6
        },
        "newText": " "
    }
]


mobile menu icon missing

Hi there,
The menu icon is missing. Running version 0.5.1. Not sure why but thought I'd let you know. I see you have it in your example page can't figure what's missing

  <top-bar>

my site

||||

    <top-bar-section>

Home

Contact

FAQ

About

    </top-bar-section>
  </top-bar>

The problem is that you need an extra span within the achor.

||||

Thanks. I eventually figured that out.

On Mar 5, 2015, at 4:31 AM, arjendeblok<EMAIL_ADDRESS>wrote:
The problem is that you need an extra span within the achor.
||||
—
Reply to this email directly or view it on GitHub.


[Feature][Plugin] Support spark batch source from apache iceberg

Search before asking

[X] I had searched in the feature and found no similar feature requirement.

Description
Support spark batch source from apache iceberg
Usage Scenario
No response
Related issues
No response
Are you willing to submit a PR?

[X] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

I want to try. Can I configure a pre sql like hive source?


[VS Code] Cannot read property 'sessionId' of undefined

<!--
For Visual Studio problems/feedback, please use the Report

@orhanayd Hey! Thank you for reporting this. Would you give us some details to investigate the issue? it would be great if you can send your logs here by running Live Share : Export Logs command from VS Code command palette. We keep track the issue in #1172 . I will close this as a duplicate. Please add your logs/ comments there


Usage : pass formdata to the getfilename function

hello,
how do you set a the formdata and how do you pass it to the server ?
thanks a lot

You can bind to this event: http://www.dropzonejs.com/#event-sending

Called just before each file is sent. Gets the xhr object and the formData objects as second and third parameters, so you can modify them (for example to add a CSRF token) or add additional data.


Unhandled exception wnen using HttpContextDestructingPolicy

When is using .Destructure.With<HttpContextDestructingPolicy>() and appear some specific log, e.g Warning: AcceptLanguageHeaderRequestCultureProvider returned the following unsupported UI Cultures '["en-GB", "en-DE", "en"]'.
Then such exception is caused:

[ERROR] System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'FileBufferingReadStream'.
at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.ThrowIfDisposed()
at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.set_Position(Int64 value)
at Serilog.AspCoreHttpContextAdapter.DynamicHttpContextRequest..ctor(HttpContext context) in C:\projects\serilog-sinks-sentry\src\Serilog.Sinks.Sentry.AspNetCore\AspCoreHttpContextAdapter.cs:line 76
at Serilog.AspCoreHttpContextAdapter.GetRequestBody() in C:\projects\serilog-sinks-sentry\src\Serilog.Sinks.Sentry.AspNetCore\AspCoreHttpContextAdapter.cs:line 48

When is not using HttpContextDestructingPolicy - then all is fine.
Could you please fix it or add some try/catch that this code doesn't throw exception and don't stop the whole pipeline.
Thanks.

Hi @sashatk,
Could you please specify the version of the NuGet package?
Thanks.

hi @olsh,
Yes, AddSentryContext is added in Startup.Configure
and is using serilog.sinks.sentry.aspnetcore 2.1.6 in .NET Core 2.0
Yes, try/catch is there - should be fine. When I comment the using of HttpContextDestructingPolicy - then app works fine, but when is using HttpContextDestructingPolicy and is using a culture another than in AcceptLanguageHeaderRequestCultureProvider - then the request fails, but should be only warning(about supported culture) and continuation  of pipeline.
Thanks.

When you setup some culture in your Startup.cs and but your browser sends another culture request, then is generated warning by .NET Warning: AcceptLanguageHeaderRequestCultureProvider returned the following unsupported UI Cultures '["en-GB", "en-DE", "en"]'. and when sending this warning to Sentry appear this error.
Example of Startup class that setup culture:
`
public void Configure(IApplicationBuilder app)
{
app.AddSentryContext();
var supportedCultures = new[]
{
	new CultureInfo("en-US")
  , new CultureInfo("de-DE"),
};

app.UseRequestLocalization(new RequestLocalizationOptions
{
	DefaultRequestCulture = new RequestCulture("en-US"),
	SupportedCultures = supportedCultures,
	SupportedUICultures = supportedCultures,
});

}And you have setuped before.Destructure.With()Then such error is appeared, could reproduce it again:
[11:40:16 WRN] AcceptLanguageHeaderRequestCultureProvider returned the following unsupported UI Cultures '["en-US", "en", "de-DE"]'.
[ERROR] System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'FileBufferingReadStream'.
at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.ThrowIfDisposed()
at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.set_Position(Int64 value)
at Serilog.AspCoreHttpContextAdapter.DynamicHttpContextRequest..ctor(HttpContext context) in C:\projects\serilog-sinks-sentry\src\Serilog.Sinks.Sentry.AspNetCore\AspCoreHttpContextAdapter.cs:line 76
at Serilog.AspCoreHttpContextAdapter.GetRequestBody() in C:\projects\serilog-sinks-sentry\src\Serilog.Sinks.Sentry.AspNetCore\AspCoreHttpContextAdapter.cs:line 48
`

Hi Oleg,
I encountered a similar issue even without any language related stuff.
I use the latest versions of Serilog.Sinks.Sentry and Serilog.Sinks.Sentry.AspNetCore (2.4.1).
Target framework is .NET Core 2.2
When app is configured with UseDeveloperExceptionPage() I get the following stack trace:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'FileBufferingReadStream'.
at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.ThrowIfDisposed()
at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.AspNetCore.WebUtilities.HttpRequestStreamReader.ReadIntoBuffer()
at Microsoft.AspNetCore.WebUtilities.HttpRequestStreamReader.Read(Char[] buffer, Int32 index, Int32 count)
at Newtonsoft.Json.JsonTextReader.ReadData(Boolean append, Int32 charsRequired)
at Newtonsoft.Json.JsonTextReader.ReadNullChar()
at Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType)
at Newtonsoft.Json.JsonTextReader.ReadAsString()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter.ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder.BindModelAsync(ModelBindingContext bindingContext)
at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, Object value)
at Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<g__Bind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

When I run app without UseDeveloperExceptionPage() then I get this stack trace:

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'FileBufferingReadStream'.
at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.ThrowIfDisposed()
at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at Microsoft.AspNetCore.WebUtilities.HttpRequestStreamReader.ReadIntoBuffer()
at Microsoft.AspNetCore.WebUtilities.HttpRequestStreamReader.Read(Char[] buffer, Int32 index, Int32 count)
at Newtonsoft.Json.JsonTextReader.ReadData(Boolean append, Int32 charsRequired)
at Newtonsoft.Json.JsonTextReader.ReadNullChar()
at Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType)
at Newtonsoft.Json.JsonTextReader.ReadAsString()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Formatters.JsonInputFormatter.ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder.BindModelAsync(ModelBindingContext bindingContext)
at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, Object value)
at Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<g__Bind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
at Serilog.SentrySinkContextMiddleware.Invoke(HttpContext context) in C:\projects\serilog-sinks-sentry\src\Serilog.Sinks.Sentry.AspNetCore\SentrySinkContextMiddleware.cs:line 26

If I remove Destructure.With<HttpContextDestructingPolicy>() then it works fine.
Also it helps to turn off logs for Microsoft namespace:

config.MinimumLevel.Override("Microsoft", LogEventLevel.Fatal)

(well, not to turn off actually, but to set log level to "Fatal" which in less severe situations works as switch-off effectively).

@olsh I think I know why you can't reproduce it.
By default Sentry configuration has restrictedToMinimumLevel = LogEventLevel.Error.
In my solution I configured it with LogEventLevel.Information:

loggerConfiguration.WriteTo.Sentry(
logsConfig["SentryDsn"],
environment: configuration["ASPNETCORE_ENVIRONMENT"],
restrictedToMinimumLevel: LogEventLevel.Information)
.Destructure.With()
.Filter.ByExcluding(e => e.Exception?.CheckIfCaptured() == true);

Loggers in Microsoft.AspNetCore.* use Information level. So if you allow the library to handle such logs you may be able to reproduce the issue, I hope.
Thanks and regards!

@dmitriifilonenko thanks for the investigation. 👍
I'll take a look soon.

Updated version Serilog.Sinks.Sentry.AspNetCore 2.4.2 was published.
Please try to update it and let me know if the issue fixed.
Feel free to reopen the issue if the bug still exists.
Thanks.

Hi Oleg,
Now everything works fine. Thank you for your efforts!
Regards,
Dmitry


fix tsup domain

this PR fixes the tsup domain as the one used here has expired and is pointing to a badware website

Summary by CodeRabbit

Documentation

Updated the URL for the Tsup tool in the CONTRIBUTING.md file to reflect the new address: https://tsup.egoist.dev/.

Thank you! @egoist appreciate your work on tsup


[Bug] Custom captcha message doesn't evoke a mention if the new user doesn't have a username

Using $fullname variable in a custom message won't evoke a mention. Is there a entity that doesn't care if the new user hasn't a username and mention him/her always? Some people that didn't solve the captcha said they didn't notice my group has this condition, probably cause they weren't mentioned. By the way, can you make available more variables to help further customization this message, like something related to the time that user joined the group?

Thanks for noticing the bug, I'll fix it when I have time. I don't have any plans to add more variables.

Should be fixed now.

Bug terminated! I did some tests here and it's working greatly. Thanks again :D


Trust policy UX in rc.1

This is going to vary based on the user's operating system.  IMO we should consider if we can get a "bare bones" cli implementation which simply writes a template similar to what's there to the user's proper directory (i.e. notation policy create -n default) and possibly opens it up or lists where it is at.  (i.e. notation policy list or notation policy open (optional --name default)

Originally posted by @dtzar in https://github.com/notaryproject/notation/pull/371#discussion_r995097376

Should this be in RC2 ? We can provide commands to open trust policy in documentation and help.

Should this be in RC2 ? We can provide commands to open trust policy in documentation and help.

The purpose of this issue is to agree on what we will do in RC-1. If nothing needs to be done, then we can close it. If not, we can assign people to work on it. IMO, at least documentation work needs to be done, but it's better to figure out what kind of document and where it should be put.

For RC1: yes, we can add documentation on editing the trust policy document. But anything beyond documentation should come after RC1.
We could add documentation in getting started guide.

@priteshbandi Besides documentation, we need to think about some built-in policy for users who are not admin or security experts. Some examples just for inspiring.

The internet explorer doesn't require normal users to manage certificates, there are pre-loaded certificates in the system, and it works by default. Advanced users can manage certificates by themselves. There are also levels of privacy control, users can choose their own and configure other options, but there will be a default one, normal user can just start use it without any configurations.

We could develop default policies for normal users, and even for a system already loaded with public certificates, users even don't need to add certificates to a trust store again (For trust store, this is not the priority right now, just for inspiring purpose).
cc: @dtzar @toddysm @shizhMSFT @vaninrao10 @iamsamirzon @gokarnm

Add one idea from @FeynmanZhou
https://github.com/notaryproject/notation/issues/430#issuecomment-1303124675

Just a thought:
The complexity of getting the trust policy file created, with some default options feels like a great first step.
If we consider a secure by default, without TOFU, I struggle with what default roots we’d want to trust from a notation installation default.
And, even if we did, or a particular company wanted to seed their environments with a default, we likely want to make it “easy” but secure to add more trust roots and policy configurations.
Meaning, you need privileges to modify the store and policy file, but the commands should be easy to edit the files for the user. notation policy add …
Asking the user to hand edit files is likely more dangerous as it’s easy to malform the file with unexpected results.

Proposal of UX improvement for a quick starter:
Currently, notation cert generate-test wabbit-network does the following

create a local key and self-signed certificate
Add the key to signing key list with the name wabbit-network
Add certificate to trust store with the name wabbit-network of type ca

Proposal: add a new step for notation cert generate-test wabbit-network to create a default trust policy file for the quick starter. The policy is quite simple and looks like the following:
{
    "version": "1.0",
    "trustPolicies": [
        {
            "name": "wabbit-networks",
            "registryScopes": [ "*" ],
            "signatureVerification": {
                "level" : "strict"
            },
            "trustStores": [ "ca:wabbit-networks" ],
            "trustedIdentities": [
                "*"
            ]
        }
    ]
}

With this proposal, as a quick starter, the notation signing and verify experience is simplified. No need to consider how to create a trustpolicy.json file and where to store it under different OS. It's easy to do an update of trustpolicy.json for advanced users as well other than creating a new file.
$ docker push localhost:5000/net-monitor:v1
$ notation cert generate-test wabbit-networks
> output message example:
> generate a local key and add as signing key with name "wabbit-networks"
> generate X.509 self-signed certificate, and add it to trust store named "wabbit-networks" of type "ca"
> generate trust policy $HOME/.config/notation/trustpolicy.json, edit this policy file for advanced usage
$ notation sign --key "wabbit-networks" localhost:5000/net-monitor:v1
$ notation verify localhost:5000/net-monitor:v1

cc: @priteshbandi @SteveLasker @dtzar @shizhMSFT @gokarnm @toddysm

We need to have a default template option separate from the cert generate-test command, but I agree this would be good also for the cert generate-test command.

The other aspect of this is making it easier for users trust certificates they have downloaded.  For instance, it could be something like:
notation cert download someregistry.io  # Adds public certificate to trust store, but doesn't add it to the trust policy
notation cert inspect someregistry.io # Displays information about the certificate itself and relevant identity information, to be expanded with future enhancements (i.e. adding SCITT ledger).
notation cert trust someregistry.io # Adds this certificate to the trust policy

If someone wants to "live on the wild side" and just trust whatever is there:
$notation verify someregistry.io/image:tag
Do you want to download and trust the public certificate from someregistry.io to verify? (Y/N)
$Y # Downloads public certificate to trust store, adds to trust policy file, creates trust policy file if it doesn't exist
someregistry.io certificate was downloaded, added to trust store, and trust policy
sha256:########, verification successful

@iamsamirzon I don't think the expectation is to store the certs in the registry (unless I am mistaken here @dtzar). It is an open question how the cert will be obtained. I see the scenarios of adding a cert to the cert store as follows:

Manually created on the machine (for testing purposes only) with notation cert generate-test. For this one, we can add * policy by default (i.e. implicit all scope)
Added with notation cert add for which the help is scarce at the moment :)
For the latter, we could introduce --scope parameter to define the trust scope for the certificate. The scope can be on a registry level (someregistry.io/* as @dtzar proposes above) or on a namespace/repo level like someregistry.io/namespace/repo/*).

The question that remains if what the default trust policy will be for the cert that is added. Would make sense to use the someregistry.io/*` if the cert is issued for that CN.

For cert discovery, there’s work in the DID web group for discovering X.509 certs. Microsoft will be publishing our public keys. Ian can likely add some details

Considering the one-step command, notation cert generate-test is a good option but it might mix the usage of creating the cert only and creating the cert, trust store, and trust policy.
Per today's community, notation init looks more appropriate and straightforward to simplify the starter experience.

Post call @toddysm and I discussed the issue of cert add without a scope. Basically what is the use of having a certificate without a scope.
For example
notation cert add adds it to a trust store but has no policy defined which makes useless until the configuration is complete.
$XDG_CONFIG_HOME/notation/trust-store
    /x509
        /ca
            /acme-rockets
                cert1.pem

The user then has to define a policy with a scope or multiple scopes that uses the cert and hence adding a cert in itself is not useful.
{
    "version": "1.0",
    "trustPolicies": [
        {
            // Policy for all artifacts, from any registry location.
            "name": "wabbit-networks-images",   // Name of the policy.
            "registryScopes": [ "*" ],          // The registry artifacts to which the policy applies.
            "signatureVerification": {          // The level of verification - strict, permissive, audit, skip.
              "level" : "audit"
            },
            "trustStores": ["ca:acme-rockets"], // The trust stores that contains the X.509 trusted roots.
            "trustedIdentities": [              // Identities that are trusted to sign the artifact.
              "x509.subject: C=US, ST=WA, L=Seattle, O=acme-rockets.io, OU=Finance, CN=SecureBuilder"
            ]
        }
    ]
}

Options for discussion

Option one would be to support an optional registry-scope parameter when adding a cert

this has some challenges since there might already be a matching scope existing that is using a trust store and hence will have issues like updating/collisions. If the registry-scopes are wildcards this makes it harder. I think updating the policy object through the cert commands will turn out to much more challenging.

Another option is to make the command output what the user has to do - this results in copy pasting and is as good as docs but docs in tooling.

$ notation cert add
Adding ....
To add this to a new policy run ...

Make notation cert add more interactive.
I understand that this is an RC and we want to keep backward compat as much as possible but given that users will have to explicitly upgrade to RC2 introducing this capability to make this command interactive as a breaking change seems fair since asking them to copy paste a bunch of commands is quite cumbersome and makes the usability hard.

I believe we need some option which creates the actual policy file on the disk in the proper location when one doesn't exist.

As discussed during community meeting, only documentation will be part of RC-1, tracked by https://github.com/notaryproject/notation/issues/438, thus move this issue our of rc.1 scope.

Just a note, #438 is not for rc.1 either. #438 is for discussion of further implementation in trust store and trust policy. The issue we need to track for rc.1 is in the docs project https://github.com/notaryproject/notaryproject.dev/issues/84


fixed documentation: added missing backtick

fixed documentation: added missing backtick

Thanks for the PR. I'm not sure why CI hung...
I reapplied the change here: https://github.com/carllerche/mio/pull/580


Implement some property tests

Using quickcheck.

@skade property tests! :sparkles:

Very cool!

It's a great approach. I think sometimes it needs more control than random, though. E.g. this one 30532c2a444328ee9dbf75eda5445e8ce9a80927 doesn't usually enter the branch where strings are equal while that is actually very inserting. And that's probably a common situation. I guess in the quick check theory there's something for cases like these, but I didn't find anything yet.


C#: Refine UnboundGeneric and ConstructedGeneric

Refine UnboundGeneric to only be those declarations that have type parameters, and ConstructedGeneric to only be those declarations that have type arguments.
This change should not make a difference for ConstructedGeneric, but for UnboundGeneric it means that we no longer (incorrectly) consider non-generic nested types inside constructed types, such as A<int>.B, to be UnboundGenerics. (Such nested types do,  however, still have relevant .getSourceDeclaration()s, for example A<>.B.)
This change means that the relations is_constructed and is_generic no longer are needed, so they have been removed.

CSharp-Differences job: https://jenkins.internal.semmle.com/job/Changes/job/CSharp-Differences/129/. No change in performance nor results.