[BUG] Azure.Identity DefaultAzureCredential in Visual Studio fails when MFA required

Describe the bug
From within Visual Studio, running code that uses DefaultAzureCredential with an account that requires MFA results in an exception. The credential was used with a BlobContainerClient from the v12 Azure Storage client library. The problem can be reproduced in a Console app running in Debug in Visual Studio but also occurs when using MS Test or ReSharper test runners.
Visual Studio contains the required account in the list of accounts (Account Settings -> All Accounts) and the account was removed and re-added (and thus re-authenticated).
Expected behavior
The DefaultAzureCredential should either just work or move into an OAuth workflow to obtain a token.
Actual behavior (include Exception or Stack Trace)
Exception thrown at the point the first data is attempted to be retrieved:
Azure.Identity.AuthenticationFailedException : DefaultAzureCredential authentication failed.
---- Azure.Identity.AuthenticationFailedException : VisualStudioCodeCredential authentication failed.
-------- Microsoft.Identity.Client.MsalUiRequiredException : AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access 'xxxxxxxx'.
Trace ID: xxxxx
Correlation ID: xxxxx
Timestamp: 2020-04-25 10:43:02Z
   at Azure.Identity.DefaultAzureCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
   at Azure.Identity.DefaultAzureCredential.GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
   at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Storage.Blobs.BlobRestClient.Container.ListBlobsFlatSegmentAsync(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri resourceUri, String version, String prefix, String marker, Nullable`1 maxresults, IEnumerable`1 include, Nullable`1 timeout, String requestId, Boolean async, String operationName, CancellationToken cancellationToken)
   at Azure.Storage.Blobs.BlobContainerClient.GetBlobsInternal(String marker, BlobTraits traits, BlobStates states, String prefix, Nullable`1 pageSizeHint, Boolean async, CancellationToken cancellationToken)
   at Azure.Storage.Blobs.Models.GetBlobsAsyncCollection.GetNextPageAsync(String continuationToken, Nullable`1 pageSizeHint, Boolean async, CancellationToken cancellationToken)
   at Azure.Storage.StorageCollectionEnumerator`1.StorageAsyncPageable.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
   at Azure.Storage.StorageCollectionEnumerator`1.StorageAsyncPageable.GetAsyncEnumerator(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at Matchnet.LabelledModelPopulator.LabellingProjects.LabellingProjectRepository.GetRawProjects()+MoveNext() in C:\Users\josh_\source\repos\matchnet\email-pdf-matching\Matchnet.LabelledModelPopulator\LabellingProjects\LabellingProjectRepository.cs:line 65
   at Matchnet.LabelledModelPopulator.LabellingProjects.LabellingProjectRepository.GetRawProjects()+MoveNext() in C:\Users\josh_\source\repos\matchnet\email-pdf-matching\Matchnet.LabelledModelPopulator\LabellingProjects\LabellingProjectRepository.cs:line 65
   at Matchnet.LabelledModelPopulator.LabellingProjects.LabellingProjectRepository.GetRawProjects()+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at System.Linq.AsyncEnumerable.SelectEnumerableAsyncIterator`2.MoveNextCore() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs:line 199
   at System.Linq.AsyncIteratorBase`1.MoveNextAsync() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs:line 70
   at System.Linq.AsyncIteratorBase`1.MoveNextAsync() in /_/Ix.NET/Source/System.Linq.Async/System/Linq/AsyncIterator.cs:line 75
   at System.Linq.AsyncEnumerable.<ToListAsync>g__Core|620_0[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36
   at System.Linq.AsyncEnumerable.<ToListAsync>g__Core|620_0[TSource](IAsyncEnumerable`1 source, CancellationToken cancellationToken) in /_/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs:line 36
   at  *CLIENT CODE omitted*
--- End of stack trace from previous location where exception was thrown ---
----- Inner Stack Trace -----
   at Azure.Identity.VisualStudioCodeCredential.GetTokenImplAsync(TokenRequestContext requestContext, Boolean async, CancellationToken cancellationToken)
   at Azure.Identity.VisualStudioCodeCredential.GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
   at Azure.Identity.DefaultAzureCredential.GetTokenFromSourcesAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
   at Azure.Identity.DefaultAzureCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
----- Inner Stack Trace -----
   at Microsoft.Identity.Client.OAuth2.OAuth2Client.CreateErrorResponse(HttpResponse response, RequestContext requestContext)
   at Microsoft.Identity.Client.OAuth2.OAuth2Client.CreateResponse[T](HttpResponse response, RequestContext requestContext, Boolean addCorrelationId)
   at Microsoft.Identity.Client.OAuth2.OAuth2Client.ExecuteRequestAsync[T](Uri endPoint, HttpMethod method, RequestContext requestContext)
   at Microsoft.Identity.Client.OAuth2.OAuth2Client.GetTokenAsync(Uri endPoint, RequestContext requestContext)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.SendHttpMessageAsync(OAuth2Client client, String tokenEndpoint)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.SendTokenRequestAsync(String tokenEndpoint, IDictionary`2 additionalBodyParameters, CancellationToken cancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.ByRefreshTokenRequest.ExecuteAsync(CancellationToken cancellationToken)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
   at Microsoft.Identity.Client.ApiConfig.Executors.ClientApplicationBaseExecutor.ExecuteAsync(AcquireTokenCommonParameters commonParameters, AcquireTokenByRefreshTokenParameters refreshTokenParameters, CancellationToken cancellationToken)
   at Azure.Identity.AbstractAcquireTokenParameterBuilderExtensions.ExecuteAsync[T](AbstractAcquireTokenParameterBuilder`1 builder, Boolean async, CancellationToken cancellationToken)
   at Azure.Identity.MsalPublicClient.AcquireTokenWithDeviceCodeAsync(String[] scopes, String storedCredentials, AzureCloudInstance azureCloudInstance, String tenant, Boolean async, CancellationToken cancellationToken)
   at Azure.Identity.VisualStudioCodeCredential.GetTokenImplAsync(TokenRequestContext requestContext, Boolean async, CancellationToken cancellationToken)

To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)
var blobContainerUri = new Uri($"https://{StorageAccount}.blob.core.windows.net/{ContainerName}");
var blobContainerClient = new BlobContainerClient(blobContainerUri, new DefaultAzureCredential());
await foreach (var blob in blobContainerClient.GetBlobsAsync())
{
  Console.WriteLine(blob.Name);
}

Environment:

Azure.Storage.Blobs 12.4.1
Azure.Identity 1.2.0-preview.2
Visual Studio Community 2019 Preview Version 16.6.0 Preview 4.0
donet --info output:

.NET Core SDK (reflecting any global.json):
Version:   3.1.300-preview-015115
Commit:    cd8d468337
Runtime Environment:
OS Name:     Windows
OS Version:  10.0.19613
OS Platform: Windows
RID:         win10-x64
Base Path:   C:\Program Files\dotnet\sdk\3.1.300-preview-015115\
Host (useful for support):
Version: 3.1.3
Commit:  4a9f85e9f8
.NET Core SDKs installed:
2.1.701 [C:\Program Files\dotnet\sdk]
2.1.801 [C:\Program Files\dotnet\sdk]
2.2.301 [C:\Program Files\dotnet\sdk]
2.2.401 [C:\Program Files\dotnet\sdk]
3.1.201 [C:\Program Files\dotnet\sdk]
3.1.300-preview-015115 [C:\Program Files\dotnet\sdk]

I should also note that using new DefaultAzureCredential(true), to attempt to open an interactive browser, does not result in any different behaviour.

Hi @Jawvig ,
Inner stack trace shows failing VisualStudioCodeCredential. Do you have your account in both VS in VSC?

Ah, I had missed the "Code" part of the VisualStudioCodeCredential. I probably did register that account in VS Code before the MFA requirement was added. After going into VS Code, opening "Azure Storage" in the explorer and signing in, the code above works.
So, I'm sorted out. However, should it have fallen back on some other mechanism when that one failed? Visual Studio or Azure CLI?

Visual Studio and Azure CLI are checked first, so they have failed for some reason. However, VisualStudioCodeCredential must handle MsalUiRequiredException, so that's a bug by itself.

Is the VisualStudioCodeCredential the last in the chain, hence why its failure is the one getting bubbled up? Not quite sure where to take this from here. Re-name this bug to "VisualStudioCodeCredential must handle MsalUiRequiredException" or dig further into why the Visual Studio and Azure CLI failed?

Both. Can I ask you to sign out from Visual Studio Code Azure Account and try to reproduce this bug again?

Sure. I ran the "Azure: Sign Out" command in VS Code and re-ran the sample in debug from Visual Studio. I got the following exception. I closed both and reopened Visual Studio to run it again but with the same result.
Azure.Identity.AuthenticationFailedException: DefaultAzureCredential authentication failed.
 ---> Azure.Identity.AuthenticationFailedException: VisualStudioCodeCredential authentication failed.
 ---> System.InvalidOperationException: CredRead has failed but error is unknown.
   at Azure.Identity.WindowsNativeMethods.ThrowIfFailed(Boolean isSucceeded, String methodName)
   at Azure.Identity.WindowsNativeMethods.CredRead(String target, CRED_TYPE type)
   at Azure.Identity.WindowsVisualStudioCodeAdapter.GetCredentials(String serviceName, String accountName)
   at Azure.Identity.VisualStudioCodeCredential.GetTokenImplAsync(TokenRequestContext requestContext, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Azure.Identity.VisualStudioCodeCredential.GetTokenImplAsync(TokenRequestContext requestContext, Boolean async, CancellationToken cancellationToken)
   at Azure.Identity.VisualStudioCodeCredential.GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
   at Azure.Identity.DefaultAzureCredential.GetTokenFromSourcesAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
   at Azure.Identity.DefaultAzureCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Azure.Identity.DefaultAzureCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
   at Azure.Identity.DefaultAzureCredential.GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken)
   at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline)
   at Azure.Storage.Blobs.BlobRestClient.Container.ListBlobsFlatSegmentAsync(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri resourceUri, String version, String prefix, String marker, Nullable`1 maxresults, IEnumerable`1 include, Nullable`1 timeout, String requestId, Boolean async, String operationName, CancellationToken cancellationToken)
   at Azure.Storage.Blobs.BlobContainerClient.GetBlobsInternal(String marker, BlobTraits traits, BlobStates states, String prefix, Nullable`1 pageSizeHint, Boolean async, CancellationToken cancellationToken)
   at Azure.Storage.Blobs.Models.GetBlobsAsyncCollection.GetNextPageAsync(String continuationToken, Nullable`1 pageSizeHint, Boolean async, CancellationToken cancellationToken)
   at Azure.Storage.StorageCollectionEnumerator`1.StorageAsyncPageable.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
   at Azure.Storage.StorageCollectionEnumerator`1.StorageAsyncPageable.GetAsyncEnumerator(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
   at DefaultAzureCredentialMfaRepro.Program.Main(String[] args) in C:\Users\josh_\source\repos\DefaultAzureCredentialMfaRepro\Program.cs:line 17
   at DefaultAzureCredentialMfaRepro.Program.Main(String[] args) in C:\Users\josh_\source\repos\DefaultAzureCredentialMfaRepro\Program.cs:line 17

Ok, let's try to disable VisualStudioCodeCredential explicitly. In your sample, can you change the line that creates blobContainerClient to
var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions() {ExcludeVisualStudioCodeCredential = true});
var blobContainerClient = new BlobContainerClient(blobContainerUri, credential);

I've done that and this time it works without error.
This bug title seems off the mark at this point. 😀

Ok, then we have two bugs related to VisualStudioCodeCredential. Thank you for your help :)

Tried 1.2.0-preview.1-1.2.0-preview.5 works only with interactive auth and AZURE_USERNAME and AZURE_TENANT_ID
var credentialOptions = new DefaultAzureCredentialOptions
{
    ExcludeInteractiveBrowserCredential = false,
    ExcludeVisualStudioCodeCredential = true
};
var credential = new DefaultAzureCredential(credentialOptions);

If ExcludeVisualStudioCodeCredential = false then exception.
If ExcludeInteractiveBrowserCredential = true and ExcludeVisualStudioCodeCredential = true then cannot find my Microsoft Account in cache.


Stack pointer validation for call function/method opcodes

Can it backfire in any way? Plugin compiled in debug configuration throws similar exceptions\error messages when stack pointer is left modified.
Does it make sense to allow scripts in legacy mode to not pop after call?

This is a very complicated area and I would better avoid making changes here. We should encourage people using new foreign function syntax in SB with proper calling convention and clearly defined arguments, and avoid dealing with raw commands like that.

No idea. Possibly not, but I can't guarantee.
Calling external code is a precise operation. You must do it right. This is not something we should correct.

No idea. Possibly not, but I can't guarantee.
Calling external code is a precise operation. You must do it right. This is not something we should correct.

This is how the debug error itself looks:

Might be worth to read more about that (exact circumstances when it occurs) and reflect that behavior.
Topic for further investigation in future.
Feature like that would be beneficial. So far the error did not occurred for me, but I have another project where I mess with RenderWare and it sometimes crashes. Not sure if it could be caused by stack corruption somewhere.

I was about to say after some thinking, maybe we can keep it and see if user would complain.
The error message in VS is much more helpful that what CLEO provides. Maybe we can use the exact wording + usual script info.

Well the VS error message does not seem to be much more helpful. All the script user needs to know it script command and information the pop argument was too small/big.


Adapting _metatags.twig (addition)

Is this addition correct? This did only worked on my Bolt 3.1.4 after decommenting these lines.

Thanks! Merging in, and i'll make some tiny fixes to the markup.


Previously valid migration now requires paid edition

Which version and edition of Flyway are you using?
"6.0.5"
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Gradle Plugin
Which database are you using (type & version)?
Postgresql 12
Which operating system are you using?
Mac OSX
What did you do?
(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
Running gradle flywayMigrate
I have 10 versioned flyway migration files that I can upload, but they are all just SQL
What did you expect to see?
Just like in the previous versions of Flyway, I expected to see a successful migration on this same migration set. Failing that, I expect to see some documentation somewhere about what is a batch migration and what is not.
What did you see instead?

Task :flywayMigrate FAILED

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':flywayMigrate'.

Error occurred while executing flywayMigrate
Flyway Pro Edition or Flyway Enterprise Edition upgrade required: batch is not supported by Flyway Community Edition.

Duplicate of #2528.


Mobile Device Orientation

It would be nice to be able to get and set device orientation.

FYI get device orientation was just added in v0.7 (still supporting PC only)


Update SDK to 1.12.0-rc1

Summary
This PR updates the SDK version to the latest version (1.12.0-rc1), and updates the tests accordingly.

Looks good to me! I have only one suggestion: The methods order inside __init__.py are a bit hard to follow/read. It would be nicer I think if they were positioned in the order they are called. E.g.
1. `export`

2. `_to_dynatrace_metric`
   2.1 `_monotonic_sum_to_dynatrace_metric`
   ...

3. `_histogram_to_dynatrace_metric`
   ...

4 _send_lines
Then the "utilities" one can be at the very bottom, like _log_temporality_mismatch
Also the ones on the very top _get_histogram_max can also be marked as static and placed at the bottom as well (or in a separated file, if you prefer).

I previously held off on moving things to another file as I thought it would blow up the diff too much. Since now two reviewers asked for it, I split this up into exporter, histogram_utils and factory in 82e7561. I also changed the ordering in 3d0c974.


No module named 'setuptools.wheel' after installing

I can't install findatapy. It has the following error. Why is that? Thanks.

Have you tried installing setuptools package? Eg. pip install setuptools

@saeedamen  No, I think it came with anaconda. My setuptools version is 36.5.0.post20170921

@yomoko how have you tried to install findatapy (was it using pip install git+https://github.com/cuemacro/findatapy.git)?

@saeedamen Yes, I did exactly what the instruction says.

I solved the problem by install Visual C++

@saeedamen Is it possible to define dukascopy frequency as 4 hour, 2 hour so on? Now only min, daily is available. Also, is it possible to make the candle interval start at 17:00 New York time, instead of 00:00 GMT?

pip install --upgrade setuptools

pip install --upgrade setuptools

Please insist on executing this command until the terminal tells you 'Successfully installed setuptools-41.0.0 (the newest version at present)'   [ because I upgraded setuptools successfully by several times' attempts ]

pip install --upgrade setuptools

Thanks! It helped me a lot!


Add full test coverage for the writer module

Increases test coverage up to 100% for piptools/writer.py.

Hmm codecov status/comment would be good.
https://codecov.io/github/jazzband/pip-tools/commit/17ffcc448c6c5485407b768a7caa3c08099b02a8 says:

Reports are queued for processing... Please review report with caution, it may change.

Pushed notifications manually on https://codecov.io/gh/jazzband/pip-tools/commit/17ffcc448c6c5485407b768a7caa3c08099b02a8/build ("Notifications are pending CI completion. Waiting for GitHub's status webhook to queue notifications. Push notifications now.").

@blueyed thanks!


APEXMALHAR-2316 Moved suitable code to activate() for initializing tu…

…ple class attribute. @bhupeshchawda @chinmaykolhatkar please review.

@devtagare I analyzed the build failure and it appears to be failing because DocumentBuilder is using String argument instead of InputSource and hence the test application is throwing the same exception multiple times and the log limit is getting exceeded.
Should I remove the test application and add it when I make the code changes for the above scenario?

@devtagare have made the appropriate code changes please review

@bhupeshchawda have made the suggetsed code changes. Please review.


ARROW-8536: [Rust] [Flight] Check in proto file, conditional build if file exists

When a user compiles the flight crate, a build.rs script is invoked. This script recursively looks for the format/Flight.proto path. A user might not have that path, as they would not have cloned the arrow repository, and as such, the build fails.
This change:
a) checks if the ../../format/Flight.proto path exists, and only builds if the file exists, and has been changed.
b) checks in the proto file into the src/ directory, changing the default location from an opaque directory in the target/{debug|release}/build-xxx folder.
The rationale for checking in the proto file is that if the file is not rebuilt, flight users are still able to access the file. It's also beneficial for users to easily view the file, and better understand how the generated code looks like.

@nevi-me This is looking good, but the generated source file needs the ASF header. CI is failing with  apache-rat license violation: rust/arrow-flight/src/arrow.flight.protocol.rs.

@nevi-me This is looking good, but the generated source file needs the ASF header. CI is failing with  apache-rat license violation: rust/arrow-flight/src/arrow.flight.protocol.rs.

I've instead added an exception, I hope that's fine

Let's see what others say on this. Personally, I think it would be better for build.rs to automatically prepend the ASF license header because there is the risk of someone making manual changes to the file as part of a PR.
I know it is extra work, but it seems safer.

@paddyhoran any opinion on this?

@nealrichardson Maybe you have an opinion on this? This is the issue I mentioned on the sync call.

So rust/arrow-flight/src/arrow.flight.protocol.rs is generated from format/Flight.proto? There is precedent for adding generated files to rat_excluded_files.txt, so I think that's fine, though IMO it would be a really good idea to prepend a comment to the generated file that points back to the source and indicates that it should not be edited by hand.

I'll address this later today

@andygrove @nealrichardson I've added the warning. I didn't have a good experience when trying to modify multiple files in Rust (when I was attempting creating a build.rs script for the flatbuffer files), but it seems that things are fine with a single file. I was getting sync issues, where my operations weren't being performed by the OS in order.
I see that there's https://github.com/danburkert/prost/issues/308 which was recently opened. I'll remove the hardcoded name in future if the function that compiles protos adds the warning automatically.

What was the resolution here?  Using most recent version of arrow-flight crate I get the same error as before.

@kyprifog When you say "most recent version" are you referring to the most recent version published on crates.io (0.17.0) or the latest in the repo (1.0.0-SNAPSHOT)?
The fix will be in the 1.0.0 release which should be published pretty soon (there is currently a vote happening on a release candidate).

Sorry I wasn't being clear, I was trying to create a fork of the ballista example by including the ballista crate (v 0.2.5) which was throwing this error on building arrow-flight 0.17.0, but looking at the existing rust example I can see how that won't work now.


Invalid JSON schema on ruff isort settings

Is there any reason I get this warning in my pyproject.toml file, using VS Code?
It seems it's related to the corresponding JSON Schema.

Here are below the textual code and error (for SEO, accessibility, copy pasting, etc.)
Code:
[tool.ruff]
line-length = 90
target-version = "py311"
exclude = ["migrations", "__pycache__"]
per-file-ignores = {}

[tool.ruff.mccabe]
max-complexity = 10 # Unlike Flake8, default to a complexity level of 10

[tool.ruff.isort]
known-first-party = ["common", "boilerplate", "simplevent"]
section-order = [
    "future",
    "standard-library",
    "third-party",
    "django",
    "first-party",
    "local-folder",
]
[tool.ruff.isort.sections]
"django" = ["django"]

Error:
{"known-first-party":["common","boilerplate","simplevent"],"section-order":["future","standard-library","third-party","django","first-party","local-folder"],"sections":{"django":["django"]}} is not valid under any of the given schemas

Ruff settings: default
Ruff version: 0.0.264

Will be fixed by https://github.com/SchemaStore/schemastore/pull/2945.


No way to dynamic images to Symbollayer markers.

New Feature
There should be a way to set dynamic images on the SymbolLayer markers.
For example, we want to show posts from users on the map and we want to show user images on each marker. There is no way to do it.
Why
It is important because we won't need to loop all markers with a point annonation. It would help us save rendering time also.

@sammyoguzhan would this work for you ?
You can create an Mapbox Image
<Mapbox.Images
  images={{
    'user-profile-01': require('../../map/img/user-profile-01.png'),
  }}
/>

and then reference in the Symbol Layer.
<Mapbox.SymbolLayer
  style={{
    iconImage: 'user-profile-01',
  }}
/>

@sammyoguzhan You can dynamically set images using a ShapeSource and a Symbol layer. I can send you the code if you need, but I'm having some issues with styling.
@Gnative

It's not possible to set the absolute height or width or icons/images, you can only scale. My images are uploaded by users and are different sizes, is there a way to solve this?
The images are displayed correctly (sometimes), but change to negatives upon zooming, is there a way to solve this?

Thanks in advance!

As noted in comments there is way to set dynamic images, using images and using expressions in iconImage property. Closing.

I didnt mean icons i mean the pictures users have posted. I want to show dynamically.

@sammyoguzhan You can dynamically set images using a ShapeSource and a Symbol layer. I can send you the code if you need, but I'm having some issues with styling. @Gnative:

It's not possible to set the absolute height or width or icons/images (or style the image at all e.g. border radius), you can only scale. My images are uploaded by users and are different sizes, is there a way to solve this? This is possible using the React mapbox library.
The images are displayed correctly (sometimes), but change to negatives upon zooming, is there a way to solve this?

Thanks in advance!

can you send me the code please ?

@Ballardian you will want to process user uploaded images server side to resize and crop to a format that is useful for you.
@sammyoguzhan would this help you to use image and style them as you would like..
Markers, PointAnnotation can accept child views that you can render as you like and give you the properties of those components. Drag n Drop, Anchor positioning etc.
import React from 'react';
import { View, Text, Image } from 'react-native';
import MapboxGL, {
    MapView,
    Camera,
    ShapeSource,
    LineLayer,
    PointAnnotation,
    AnnotationContent,
    Images,
    SymbolLayer,
    MarkerView,
} from '@rnmapbox/maps';

const MAP_STYLE_OUTDOORS = 'mapbox://styles/mapbox/outdoors-v11'

class BugReportExample extends React.Component {

    render() {
        return (
            <>
                <MapView
                    style={{ flex: 1 }}
                    styleURL={MAP_STYLE_OUTDOORS}
                >
                    <Camera
                        animationDuration={0}
                        center={[10.141653, 47.158206]}
                    />
                    <MarkerView
                        coordinate={[10.141653, 47.158206]}
                        anchor={{ x: 0.5, y: 1 }}
                        id="marker"
                    >
                        <View style={{ backgroundColor: 'white', borderRadius: 5, borderColor: 'white', borderWidth:2, width:60, height:60 }}>
                            <Image source={{uri:"https://s3.eu-central-1.amazonaws.com/contours/photos/100_square/5c3c7d9b8bb09.jpg" }} style={{width:56, height:56, borderRadius: 5, resizeMode: 'stretch'}} />
                        </View>
                    </MarkerView>
                </MapView>
            </>
        );
    }
}

export default BugReportExample;

@Gnative thanks for the quick reply! I have 1000's of user images and I would want to style the icon anyway, so it wouldn't be feasible to style on server side, is there no way to implement styling on icons in a SymbolLayer (now or in future)? I did look at MarkerViews originally, but as I may have many markers it could hurt performance. Also, as you can see from the screenshot, I'm using clustering - is this possible with MarkerViews?
@sammyoguzhan:
`  return (

{!isLoading && (
<MapboxGL.MapView
// {...viewport}
style={styles.map}
rotateEnabled={false}
pitchEnabled={false}
styleURL={
'mapbox://styles/georgeballardsoftware/cl5dfdvsh00cy16p3uvsy41u2'
}
logoEnabled={false}
compassEnabled={false}
scaleBarEnabled={false}
attributionEnabled={false}
ref={mapRef}>
<MapboxGL.Camera
zoomLevel={viewport.zoom}
centerCoordinate={[viewport.latitude, viewport.longitude]}
/>
<MapboxGL.Images
images={images}
onImageMissing={url => {
setImages({...images, [url]: {uri: url}});
}}
style={styles.images}
/>
<MapboxGL.ShapeSource
shape={{type: 'FeatureCollection', features: points}}
id="symbolLocationSource"
hitbox={{width: 20, height: 20}}
clusterRadius={50}
clusterMaxZoom={14}
cluster>
<MapboxGL.SymbolLayer
id="pointCount"
style={styles.clusterCount}
/>
<MapboxGL.CircleLayer
id="clusteredPoints"
belowLayerID="pointCount"
filter={['has', 'point_count']}
style={styles.clusteredPoints}
/>
<MapboxGL.SymbolLayer
id="singlePoint"
filter={['!', ['has', 'point_count']]}
style={styles.singlePoint}
/>
</MapboxGL.ShapeSource>
</MapboxGL.MapView>
)}

);
};
const styles = StyleSheet.create({
page: {
flex: 1,
},
map: {
height: 600,
width: 500,
},
images: {
height: 60,
width: 60,
},
singlePoint: {
iconImage: ['get', 'profile_image'],
iconSize: 0.05,
iconOpacity: 1,
iconAllowOverlap: true,
},
clusteredPoints: {
circlePitchAlignment: 'map',
circleColor: '#A59ADD',
circleRadius: [
'step',
['get', 'point_count'],
20,
100,
25,
250,
30,
750,
40,
],
circleOpacity: 0.84,
circleStrokeWidth: 0,
circleStrokeColor: 'red',
},
clusterCount: {
textField: '{point_count}',
textSize: 14,
textPitchAlignment: 'map',
},
});`
useMap:
`  useEffect(() => {
if (markerData && user) {
const points = markerData.map(marker => ({
type: 'Feature',
properties: {
cluster: false,
id: marker?.id,
profile_image: marker?.friend?.profileImage,
full_name: marker?.friend?.fullName,
username: marker?.friend?.username,
contact_email: marker?.friend?.contactEmail,
contact_instagram: marker?.friend?.contactInstagram,
contact_mobile: marker?.friend?.contactMobile,
},
geometry: {
type: 'Point',
coordinates: [
parseFloat(marker?.friend?.destinations[0]?.longitude),
parseFloat(marker?.friend?.destinations[0]?.latitude),
],
},
}));
const userPoint = {
type: 'Feature',
properties: {
cluster: false,
id: user?.id,
profile_image: user?.profileImage,
full_name: user?.fullName,
username: user?.username,
contact_email: user?.contactEmail,
contact_instagram: user?.contactInstagram,
contact_mobile: user?.contactMobile,
},
geometry: {
type: 'Point',
coordinates: [
parseFloat(user?.destinations[0]?.longitude),
parseFloat(user?.destinations[0]?.latitude),
],
},
};
points.push(userPoint);
setPoints(points);
}
}, [markerData, user]);
return {
mapRef,
markerData,
user,
userLocation,
isLoading,
points,
setIsLoading,
setPoints,
viewport,
setViewport,
selectedMarker,
setSelectedMarker,
fetchFriendDestinations,
fetchUser,
};
};`

    <SafeAreaView>       <View style={styles.page}>         {!isLoading && (           <MapboxGL.MapView             // {...viewport}             style={styles.map}             rotateEnabled={false}             pitchEnabled={false}             styleURL={               'mapbox://styles/georgeballardsoftware/cl5dfdvsh00cy16p3uvsy41u2'             }             logoEnabled={false}             compassEnabled={false}             scaleBarEnabled={false}             attributionEnabled={false}             ref={mapRef}>             <MapboxGL.Camera               zoomLevel={viewport.zoom}               centerCoordinate={[viewport.latitude, viewport.longitude]}             />             <MapboxGL.Images               images={images}               onImageMissing={url => {                 setImages({...images, [url]: {uri: url}});               }}               style={styles.images}             />             <MapboxGL.ShapeSource               shape={{type: 'FeatureCollection', features: points}}               id="symbolLocationSource"               hitbox={{width: 20, height: 20}}               clusterRadius={50}               clusterMaxZoom={14}               cluster>               <MapboxGL.SymbolLayer                 id="pointCount"                 style={styles.clusterCount}               />               <MapboxGL.CircleLayer                 id="clusteredPoints"                 belowLayerID="pointCount"                 filter={['has', 'point_count']}                 style={styles.clusteredPoints}               />               <MapboxGL.SymbolLayer                 id="singlePoint"                 filter={['!', ['has', 'point_count']]}                 style={styles.singlePoint}               />             </MapboxGL.ShapeSource>           </MapboxGL.MapView>         )}       </View>     </SafeAreaView>

<SafeAreaView>       <View style={styles.page}>         {!isLoading && (           <MapboxGL.MapView             // {...viewport}             style={styles.map}             rotateEnabled={false}             pitchEnabled={false}             styleURL={               'mapbox://styles/georgeballardsoftware/cl5dfdvsh00cy16p3uvsy41u2'             }             logoEnabled={false}             compassEnabled={false}             scaleBarEnabled={false}             attributionEnabled={false}             ref={mapRef}>             <MapboxGL.Camera               zoomLevel={viewport.zoom}               centerCoordinate={[viewport.latitude, viewport.longitude]}             />             <MapboxGL.Images               images={images}               onImageMissing={url => {                 setImages({...images, [url]: {uri: url}});               }}               style={styles.images}             />             <MapboxGL.ShapeSource               shape={{type: 'FeatureCollection', features: points}}               id="symbolLocationSource"               hitbox={{width: 20, height: 20}}               clusterRadius={50}               clusterMaxZoom={14}               cluster>               <MapboxGL.SymbolLayer                 id="pointCount"                 style={styles.clusterCount}               />               <MapboxGL.CircleLayer                 id="clusteredPoints"                 belowLayerID="pointCount"                 filter={['has', 'point_count']}                 style={styles.clusteredPoints}               />               <MapboxGL.SymbolLayer                 id="singlePoint"                 filter={['!', ['has', 'point_count']]}                 style={styles.singlePoint}               />             </MapboxGL.ShapeSource>           </MapboxGL.MapView>         )}       </View>     </SafeAreaView>

See Images component and image missing callback

Hi @Ballardian @sammyoguzhan , I'm not a maintainer of this package and also not all knowledgeable on Mapbox. Saying this I don't think this is possible with GeoJson how you would like this with the SymbolLayer and setting the icon. My understanding of the SymbolLayer is to have a small amount of icons (pngs) for performance.
If you have 1000's of user points and worried about performance using the Marker component you could have clustering up to a certain zoom level and then switch to user markers, base on the map boundaries, that you query your database for. You could filter and limit the number of markers based on the current zoom levels, something like how AirB'n'B does this, or a mix of both techniques.
With the amount of points you are talking about it would also be worth looking at uploading your user data to Mapbox as a dataset or running your own tile server as well such as Tegola. This way you are only pulling in the necessary data for the current map boundaries rather than having to load in all your data at once and worrying about rendering performance with React/Native.

Also @Ballardian you'll want to pre-process your uploaded user images server side to resize and crop them to the format you need them to be. Never trust a user to upload an image in the format, size you need.

Okay thanks @Gnative. So just to confirm, styling of icons in a SymbolLayer is not possible?
Is there a clustering library you would recommend that is compatible with rnmapbox?

@Ballardian I'm looking to do the same thing. Have you found any solutions? Thank you so much 🙏

After few days of truing to implement a custom image on each SymbolLayer I got close to the best possible scenario but its not enough. At this moment the library is not good for this purpose. For everything else seems solid, which is not a minor thing but if you are reading this post and want to try to use a custom image per marker, I dont suggest you do it. I have to invoke each thumbnail generated (server side or other library) image then display it withput having the "style" prop to use, thus this make the map look real bad. I suggest to use icons and markers and not images.
i hope in the future they could add the Image component with style props so we can make the round at least.

@eybel we have the Image component that accepts a RN component as a child where you can use style. https://rnmapbox.github.io/docs/components/Image

@eybel we have the Image component that accepts a RN component as a child where you can use style. https://rnmapbox.github.io/docs/components/Image

How do you use it then? I wasnt able to make it work. I was able to use the  component but I have no idea how to use that Images component. Could you guys provide an example? Or update the docs a littble bit on that?
What I am trying to achieve is to have round images as markers and not square ones (they look real bad). That is why I need to style my marker image.


Make username field configurable

Hi,
I'm using mattermost plugin to send alerts for failed jobs to a central Mattermost instance. I have multiple jenkins servers that all end up using the same username "jenkins" in the alerts channel. The alert origin is differentiable by the custom icon I send with the alert but it would be really nice if the plugin would allow to override the default username "jenkins" with a custom one.

I started adding a username field but then thought it might be even better to add it in the channel/room list.
Eg.: jenkins@channelx, otheruser@channely
(You can already list multiple channels in the room field)
This would be a lot less code than what's in my wip-branch, and mean more flexibility.
Omitting the username in the room could default to 'jenkins' in that case.
Thoughts?

This would work for me.

I created a new release, but can't upload it to jenkins-ci (their servers seem to be down).
You can try it manually here: https://github.com/jenkinsci/mattermost-plugin/releases/tag/mattermost-2.1.0

Mattermost plugin 2.1.0 works great! Thank you very much :-)

Published in the Jenkins maven repo too (after going through a lot of trouble ...)


[BUG 🐞] Enhancements to Contact Information Footer (Email and Phone Number)

Description
Reproduce the issue:
"Get in touch" footer links for clicking email or phone didn't open email or phone, but instead, it scrolled to the top of the page.
I'd like to make if user clicking email or phone links opens the corresponding app.
Screenshots
No response
Additional information
Make sure to read the CONTRIBUTING and SETUP docs before proceeding
Happy contributing. 💐
Star my other Repositories here

Hiii @leonyangela I am working on this issue please assign this to me

Hi @vishisht-dubey I have done it and made a PR, this issues should be closed. thanks

@leonyangela i have Assigned you

Hi @warmachine028, thank you, I have made a PR for this on this link(https://github.com/warmachine028/nike/pull/148)

I will be reviewing your PR asap, please read the Pinned issue for the delay

@leonyangela make the necessary changes


Test failure: WebSocketMiddlewareTests.CloseFromCloseSent_Success

    Microsoft.AspNetCore.WebSockets.Test.WebSocketMiddlewareTests.CloseFromCloseSent_Success [FAIL]
      System.Net.WebSockets.WebSocketException : An internal WebSocket error occurred. Please see the innerException, if present, for more details.
      ---- System.Net.Sockets.SocketException : An established connection was aborted by the software in your host machine
      Stack Trace:
           at System.Net.WebSockets.WebSocketBase.ThrowIfConvertibleException(String methodName, Exception exception, CancellationToken cancellationToken, Boole    an aborted)
           at System.Net.WebSockets.WebSocketBase.<CloseAsyncCore>d__56.MoveNext()
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
        WebSocketMiddlewareTests.cs(492,0): at Microsoft.AspNetCore.WebSockets.Test.WebSocketMiddlewareTests.<CloseFromCloseSent_Success>d__15.MoveNext()
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
        ----- Inner Stack Trace -----
           at System.Net.WebSockets.WebSocketConnectionStream.WebSocketConnection.ReadAsyncCore(Byte[] buffer, Int32 offset, Int32 count, CancellationToken canc    ellationToken, Boolean ignoreReadError)
           at System.Net.WebSockets.WebSocketConnectionStream.WebSocketConnection.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancella    tionToken)
           at System.Net.DelegatedStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
           at System.Net.BufferedReadStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
           at System.Net.WebSockets.WebSocketConnectionStream.<>n__0(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
           at System.Net.WebSockets.WebSocketConnectionStream.<ReadAsync>d__21.MoveNext()
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
           at System.Net.WebSockets.WebSocketBase.WebSocketOperation.<Process>d__19.MoveNext()
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
           at System.Net.WebSockets.WebSocketBase.<CloseAsyncCore>d__56.MoveNext()

Another one:
    Microsoft.AspNetCore.WebSockets.Test.WebSocketMiddlewareTests.CloseFromCloseSent_Success [FAIL]
      System.Net.WebSockets.WebSocketException : The remote party closed the WebSocket connection without completing the close handshake.
      Stack Trace:
           at System.Net.WebSockets.WebSocketBase.WebSocketOperation.<Process>d__19.MoveNext()
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
           at System.Net.WebSockets.WebSocketBase.<CloseAsyncCore>d__56.MoveNext()
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
        WebSocketMiddlewareTests.cs(492,0): at Microsoft.AspNetCore.WebSockets.Test.WebSocketMiddlewareTests.<CloseFromCloseSent_Success>d__15.MoveNext()
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

When did these errors occur? I'm seeing all the tests passing right now.

They were occurring very consistently on my machine. Let me check again.

Interesting, I'm not seeing the failures anymore. Maybe they were fixed by a recent change? I was seeing them every time I ran the build script when I filed this issue.

The code that handles this phase of the connection is all code we grab from CoreFX and haven't changed in a while, so I'm not sure what would cause the issue. We'll keep an eye out for it for now.


docker 20.10.11_dind

Start dind through docker desktop, how to change the docker storage-driver in the dind container
When mounting the docker data directory, dind cannot be started normally

What specific errors are you getting?
https://docs.docker.com/storage/storagedriver/select-storage-driver/#supported-storage-drivers-per-linux-distribution

Modifying the storage-driver is not supported on Docker Desktop for Mac and Docker Desktop for Windows, and only the default storage driver can be used. The comparison table below is also not applicable for Rootless mode. For the drivers available in rootless mode, see the Rootless mode documentation.

If you're using Docker Desktop for Windows this thread might help? https://github.com/docker/for-win/issues/4627
But otherwise I would try searching through other Docker Desktop-related issues for any specific errors you're encountering. You could also try asking over at the Docker Community Forums, Docker Community Slack, or Stack Overflow

If you're mounting the data directory for a Docker-in-Docker container from your host through Docker Desktop (on either Windows or Mac), you're probably going to have issues with all the available storage drivers, unfortunately.  I'd suggest using a Docker-managed named volume instead, but you can adjust the storage driver either via --storage-driver in the container command or by bind-mounting (or copying into a new image FROM this one) a suitable daemon config file.

Basic environment: MAC and  windows 10  docker desktop 4.2
kernel version : 5.10.47-linuxkit
mac version  macos monterey 12.1
I changed the working directory of docker to /app/data/docked

Execute the command:
 docker run --privileged -dit -v ~/opt/test:/app/data/dockerd docker_dind_20.10.12
docker  exec -it docker -dind  sh
root@958ccd7adca6:/app/ui# cat /app/logs/dind.log
time="2022-01-06T10:25:37.454848700+08:00" level=warning msg="could not change group /var/run/docker.sock to docker: group docker not found"
time="2022-01-06T10:25:37.701404400+08:00" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.devmapper" error="devmapper not configured"
time="2022-01-06T10:25:37.710841400+08:00" level=warning msg="could not use snapshotter devmapper in metadata plugin" error="devmapper not configured"
time="2022-01-06T10:25:37.982957400+08:00" level=warning msg="Failed to remove check directory /app/data/dockerd/check-overlayfs-support105951048: readdirnames /app/data/dockerd/check-overlayfs-support105951048/work/work: readdirent work: operation not permitted"
time="2022-01-06T10:25:37.983024900+08:00" level=error msg="failed to mount overlay: operation not permitted" storage-driver=overlay2
time="2022-01-06T10:25:37.983105900+08:00" level=error msg="exec: \"fuse-overlayfs\": executable file not found in $PATH" storage-driver=fuse-overlayfs
time="2022-01-06T10:25:37.983244800+08:00" level=error msg="AUFS was not found in /proc/filesystems" storage-driver=aufs
time="2022-01-06T10:25:38.069967600+08:00" level=warning msg="Failed to remove check directory /app/data/dockerd/check-overlayfs-support529935367: readdirnames /app/data/dockerd/check-overlayfs-support529935367/work/work: readdirent work: operation not permitted"
time="2022-01-06T10:25:38.070018900+08:00" level=error msg="failed to mount overlay: operation not permitted" storage-driver=overlay
time="2022-01-06T10:25:38.070045500+08:00" level=error msg="Failed to built-in GetDriver graph devicemapper /app/data/dockerd"
time="2022-01-06T10:25:38.218208900+08:00" level=warning msg="Your kernel does not support cgroup blkio weight"
time="2022-01-06T10:25:38.219418200+08:00" level=warning msg="Your kernel does not support cgroup blkio weight_device"
root@958ccd7adca6:/app/ui# docker info
Client:
 Context:    default
 Debug Mode: false

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 20.10.11
 Storage Driver: vfs
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc version: v1.0.2-0-g52b36a2d
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.10.47-linuxkit
 Operating System: Debian GNU/Linux 9 (stretch) (containerized)
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 7.774GiB
 Name: 958ccd7adca6
 ID: HI77:GNBO:LXXM:JBWZ:7SSM:F76F:VTLJ:OA4C:5WDZ:AG62:XUBU:NHAF
 Docker Root Dir: /app/data/dockerd
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  <IP_ADDRESS>/8
 Registry Mirrors:
  https://dockerhub.azk8s.cn/
  https://docker.mirrors.ustc.edu.cn/
  http://hub-mirror.c.163.com/
 Live Restore Enabled: false
 Product License: Community Engine

docker load -i rainbond.tar(
Mirror package)
error ：Applylayer exit status 1 stdout :  stderr :linnk /usr/share/terminfo/2/2621/usr/share/terminfo/2/2621a:no such or directory

I know that storage-driver can be changed, but it will not take effect in dind
f you do not hang in the /var/lib/docker directory and execute docker load, there will be no error.
docker info view the difference between mounting and not mounting
After mounting /var/lib/docker, storage-driver is changed to vfs
Do not mount /var/lib/docker storage-driver as overlay2
I hope that the /var/lib/docker data directory can be mounted on MAC and windows 10, and the image can be loaded. Thank you very much for your help. thanks


Dashboard UI update: connected nodes

Fixes #661
Changes proposed in this PR:

Showing only the first 10 connected node IDs
Users can click "Show All" if they want to see all of them.

probably we need a table to avoid endless scrolling with many nodes

Yeah good point, a table would be better. We can add that later


Testing

Milestone 7: Testing
In this PR, we have added testing to the components
Type of change

[ ] Added react testing library
[ ] Created a Test folder in the component directory
[ ] Added test for components

Checklist:

[ ]  Our code follows the style guidelines of this project
[ ] We have performed a self-review of my code
[ ] There is no linter error in my code
[ ]  Our changes generate no new warnings

Thank you very much!


🐛 [Bug] Support ITensor type arguments for Batch Norm

Bug Description
While testing tests/py/dynamo/models/test_models.py, there's an error:
>       scale = to_numpy(weight) / np.sqrt(to_numpy(running_var) + eps)
E       TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'
E
E       While executing %_native_batch_norm_legit_no_training : [num_users=1] = call_function[target=torch.ops.aten._native_batch_norm_legit_no_training.default](args = (%convolution, %arg4_1, %arg5_1, %arg2_1, %arg3_1, 0.1, 1e-05), kwargs = {_itensor_to_tensor_meta: {<tensorrt.tensorrt.ITensor object at 0x73f131e20ff0>: ((1, 3, 224, 224), torch.float16, False, (150528, 50176, 224, 1), torch.contiguous_format, False, {}), <tensorrt.tensorrt.ITensor object at 0x73f131e22bb0>: ((64, 3, 7, 7), torch.float16, True, (147, 49, 7, 1), torch.contiguous_format, False, {}), <tensorrt.tensorrt.ITensor object at 0x73f131d92ab0>: ((1, 64, 112, 112), torch.float16, False, (802816, 12544, 112, 1), torch.contiguous_format, False, {}), <tensorrt.tensorrt.ITensor object at 0x73f131e69d30>: ((64,), torch.float16, True, (1,), torch.contiguous_format, False, {}), <tensorrt.tensorrt.ITensor object at 0x73f132272ef0>: ((64,), torch.float16, True, (1,), torch.contiguous_format, False, {}), <tensorrt.tensorrt.ITensor object at 0x73f132270b30>: ((64,), torch.float16, False, (1,), torch.contiguous_format, False, {}), <tensorrt.tensorrt.ITensor object at 0x73f131bbf7b0>: ((64,), torch.float16, False, (1,), torch.contiguous_format, False, {})}})
E       Original traceback:
E       None

This is because current implementation of batch_norm doesn't support ITensor type arguments, but it should based on the schema:
- func: batch_norm(Tensor input, Tensor? weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float momentum, float eps, bool cudnn_enabled) -> Tensor
- func: _native_batch_norm_legit_no_training(Tensor input, Tensor? weight, Tensor? bias, Tensor running_mean, Tensor running_var, float momentum, float eps) -> (Tensor, Tensor, Tensor)

@chohk88 Can you take a look?

@chohk88 Can you take a look?

@zewenli98 Okay!

tests passed in TRT 10.3 upgrade


v2.17.1

Normalized Petfinder data when only 1 pet listing is available, fixing bug that broke the layout

Nice. Good find.

Thanks @MikeiLL! Another org that uses the theme noticed things breaking when only 1 pet was available. I cannot believe how inconsistent the Petfinder API is with the data it returns. There's so much if/then logic you need to use to make it work right.

Yes. API’s can be frustrating.
I made a plugin interfacing with an API for a client and about a week after I had finished it they announced they were going to charge the developers a monthly fee for interfacing with it. Also the images they return are no larger than like 200pixels, making them useless for social shares.
On May 12, 2016, at 10:10 AM, Chris Ferdinandi<EMAIL_ADDRESS>wrote:

Thanks @MikeiLL! Another org that uses the theme noticed things breaking when only 1 pet was available. I cannot believe how inconsistent the Petfinder API is with the data it returns. There's so much if/then logic you need to use to make it work right.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

Oh boy!


move StaticStrings into a library of its own

Scope & Purpose
Right now this doesn't provide any benefits, but it will allow linking things to arango_static_strings in the future without having to link to everything else in lib.

[ ] :hankey: Bugfix
[ ] :pizza: New feature
[ ] :fire: Performance improvement
[x] :hammer: Refactoring/simplification

Checklist

[ ] Tests

[ ] Regression tests
[ ] C++ Unit tests
[ ] integration tests
[ ] resilience tests

[ ] :book: CHANGELOG entry made
[ ] :books: documentation written (release notes, API changes, ...)
[ ] Backports

[ ] Backport for 3.10: -
[ ] Backport for 3.9: -
[ ] Backport for 3.8: -

Related Information

[ ] Docs PR:
[ ] Enterprise PR:
[ ] GitHub issue / Jira ticket:
[ ] Design document:

I think static strings bad practice. We should remove this kludge and use directory and namespace like StaticString with inline constexpr constant = ""; instead of class
Also namespace better because allow to create separate files for different constant

I agree to that using constexpr would be better than using something that is prone to init-order fiascos etc., but that was not the scope of this change.
Re namespaces: yes, why not, but many of these strings here are actually used from a lot of places, including the client-tools (arangosh, arangodump etc.), so we will not be able to move them out of lib easily.


Include deformable convolution module

https://github.com/1zb/deformable-convolution-pytorch
Deformable convolution module (ConvOffset2d)

Done with commit: https://github.com/ritchieng/the-incredible-pytorch/commit/6f7ead695d1bfc486f088ba3bf0078616cb1faef


[8.2] Add container image tab to lambda docs (#204)

Backport
This will backport the following commits from main to 8.2:

Add container image tab to lambda docs (#204)

Questions ?
Please refer to the Backport tool documentation

:grey_exclamation: Build Aborted

Either there was a build timeout or someone aborted the build.

the below badges are clickable and redirect to their specific view in the CI or DOCS

Expand to view the summary

Build stats

Start Time: 2022-06-14T16:09:55.876+0000

Duration: 63 min 53 sec

Test stats :test_tube:

Test
Results

Failed
0

Passed
120

Skipped
3

Total
123

:robot: GitHub comments
To re-run your PR in the CI, just comment with:

/test : Re-trigger the build.

run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)


Add doc for @configu-integrations/cloud-bees

Closes #584

Hi @Ritesh-Udgata,
Here are the details for claiming your Hacktoberfest prizes! 🎉 Check out #465  (comment) for more information or simply fill out the form here: Claim Your Swag.
Remember, you only need to fill out the form once for all your PRs. 😊


Update index.html

Add link to traditional Chinese (Taiwan) translation.

謝謝！🎉

不客氣！
By the way, it’s a really cool and informative website for popularising epidemiology! I wish that it can reach even more people.
Fuhsuan

Nicky Case<EMAIL_ADDRESS>於 2020年5月17日 22:22 寫道：
謝謝！🎉
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/ncase/covid-19/pull/64#issuecomment-629855116, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN4UZLTAYSPCOQTM75BKXTRSBBQBANCNFSM4NDJFUZA.

不客氣！
By the way, it’s a really cool and informative website for popularising epidemiology! I wish that it can reach even more people  💪💪💪🔥🔥🔥


Exercises without names

Content labels: there are a couple of exercises seemingly without names. They happen to be duplicates.
Reported by @julianharty

@julianharty Can not reproduce that problem. It probably has been fixed by @ISNIT0 in April. Please reopen the ticket with a concrete screenshot/example if you still can reproduce the problem.

Will do, I had screenshots at the time, however I agree it's probably better to retest.


green package constants broken?

After updating to 23.0, this code no longer works:
import zmq.green as zmq
zmq.RCVHWM

AttributeError: module 'zmq.green' has no attribute 'RCVHWM'
What is the correct way to reference constants now?  I have tried zmq.SocketOptions.RCVHWM and zmq.constants.SocketOptions.RCVHWM without success.
Any change from the old usage of zmq.RCVHWM would be a painful migration for us.

Definitely a bug. All the old zmq.CONST names should still work, both for top-level zmq and the drop-in zmq.green. I probably missed something in building __all__.
Should be fixed by #1704


docs(hub/prometheus) add prometheus health subsystem label

Summary
Add docs for https://github.com/Kong/kong/pull/7802/files.

Thanks @HCloward - I applied your changes.


I have improve CSS of customer support page ,add custom message and also add good icons for each field issue #387

Pull Request Format
PR Title
Issue #387  : ISSUE NAME want to add custom heading which reflect customer support
Type of PR

Add X in the box to specify the improvement type.
[X] Bug fix
[X] Feature enhancement
[X] Documentation update
[ ] Other (specify): ___________

Description
i have improve CSS of customer support page ,add custom message and also add good icons for each field].
Screenshots / Videos (if applicable)
Before:

After:

[i have improve CSS of customer support page ,add custom message and also add good icons for each field]

Checklist

Add X in the box to specify.
[X] I have performed a self-review of my code.
[X] I have tested the changes thoroughly before submitting this pull request.
[X] I have provided relevant issue numbers, screenshots, and videos after making the changes.
[X] I have commented my code, particularly in hard-to-understand areas.

Additional Context
[Provide any additional context about the changes, such as specific challenges you faced or decisions you made. This can help reviewers understand the rationale behind your changes.]
Thank you for reviewing my pull request!

@rahulbamnuya You didn't change any code. This was implemented by other contributors. Please don't make useless PRs. It takes enough time to check a PR.

@swaraj-das  I have updated the style.css file
And you have merge my code successfully in main branch
Before and after

Before and after image
And I also improve the footer section but you don't give any level to me


Estimate call fee

fixes https://github.com/paritytech/substrate/issues/9247
This will allow us to properly know roughly how much fee will be consumed for a given call within a dispatch, and store it. We then use this later to give an appropriate reward to the signed submissions.
TODO:

[x] clean imports
[x] tests, a mock CallFeeEstimator in eleciton-provider that just assumes score[0] (or some fixed amount) is the correct amount
[x] Make https://github.com/paritytech/polkadot/pull/3465 the companion of this PR, update rewards to a small value, like 1 * DOLLAR
[ ] Test on a dev-chain with staking-miner and make sure that the miner's net profit is positive.

polkadot companion: https://github.com/paritytech/polkadot/pull/3465

/benchmark runtime pallet pallet-staking

/benchmark runtime pallet pallet-staking

bot merge


Too slow on 'big' tables even with cacheByIndexPath

In my app I usually have tables with ~150 rows.
Rows are very simple:

When table view creates I have delay for about 3 seconds before it appears (iPhone 5 iOS 8.3)...
I tried to use new - (CGFloat)fd_heightForCellWithIdentifier:(NSString *)identifier cacheByIndexPath:(NSIndexPath *)indexPath configuration:(void (^)(id cell))configuration;  But seems like it starts caching heights only when I scroll through them for second time.
Also I noticed that - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath is called 3 times on init stage and all these 3 times heights are calculated from scratch... Here's my implementation:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSLog(@"step 1: %@", indexPath);
    return [tableView fd_heightForCellWithIdentifier:@"DetailViewTableViewCell" cacheByIndexPath:indexPath configuration:^(iptvDetailedEPGTableViewCell *cell) {
        // Configure this cell with data, same as what you've done in "-tableView:cellForRowAtIndexPath:"
        NSLog(@"step 2: %@", indexPath); // Should not be called if using cached height, right?
        [self configureCell:cell forIndexPath:indexPath];
    }];
}

I get both log messages (3 * table length) times at init and than 1 more time when scrolling through the tableView. Only when scrolling second time I see only 1 log message.
Is it normal behaviour?
Thanks.

This is UITableView's "bug like" problem in iOS8 (not in iOS7), -tableView:heightForRowAtIndexPath: method will be called many times initially, and re-calculate when cell dequeues even you've scrolled through for more than one time, so this is why I provide a cacheByIndexPath API to avoid a mess of height calculations.
When I implement cacheByIndexPath, I found it's not easy to automatically invalidate caches when data source updates. So I used a tricky way, swizzled a private method who triggers reload ( -reloadData, -insertSection..,-deleteRows... ... all work) and clear all current caches, it's a bit more complex, but makes this cacheByIndexPath API quite easy to use, no need for manual invalidation calls. But it has the "3 times" problem as you pointed, because UITableView itself triggers reload for 2 more times at init when it's being moved to window and layout its subviews. It's hard to solve unless I put the invalidateCaches method public.
So I'm thinking a better solution.

Anything on this? I love the idea of this project and want to use it but without this iOS8 support, it kind of beats the purpose of it.

@SJApps  Just use - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath api for height calculation, it's iOS6+ and pure. New version's coming and I'll close this issue by then.


Route Parameters Are Lost

Hello,
Excellent plugin!
However, I cannot use the breadcrumb with routes that have parameters. When I click on a breadcrumb the route has no parameter in it. For example, what was before 'app/levels/1' simply becomes 'app/levels/'. How do I get the breadcrumb to keep the route parameters?

Hi @ncuillery
if we have search box and if we enter some text and that folder/file exist in ui route than how can we show search path in breadcrumb...could you please provide solution for this.


Package naming improvements

Hello!
I happened to look at your code and I think it would be cool to follow the Package Naming Conventions.
Code itself looks pretty solid but there is even a default package.
My proposal
Start with a co.alphavantage  package and elaborate from there. Also underscores are used as some special character for packages that should start with illegal characters, such as reserved words or numbers:
package int_.mypackage -> int is a reserved word.
package com.example._123name -> 123name is not legal, so we prefix it with an underscore.
Package structure proposal
co.alphavantage
co.alphavantage.input
co.alphavantage.input.technicalindicator
co.alphavantage.input.timeseries
co.alphavantage.output
co.alphavantage.output.technicalindicator
co.alphavantage.output.technicalindicator.data
co.alphavantage.output.timeseries
co.alphavantage.output.timeseries.data
I would start with this =)

Go ahead, if you like to do this, that would be great!


Vertical resize

hello_webgl canvas translates independent from map on a vertical window resize,
as canvasLayerOptions: resizeHandler does not seem to getting called on a window resize event.
workaround:  https://github.com/NeuralSpaz/CanvasLayer/commit/213045e7958077f80c92cecbc88b529db0adee25 for hello_webgl

The resize event must be triggered:
window.addEventListener("resize", function(){google.maps.event.trigger(map, 'resize')});


Cert expiration

What about when those certificates expire? All the options are disabled and I can't update/edit anythingh.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 3d23a57b-1327-786e-f27d-1a52b0e4712d
Version Independent ID: e1050c6a-d3ea-e3b7-c6ca-a0427b1f9379
Content: Create an application gateway with SSL termination - Azure portal
Content Source: articles/application-gateway/application-gateway-ssl-portal.md
Service: application-gateway
GitHub Login: @davidmu1
Microsoft Alias: davidmu

#in-process

Hi @stylerOD,
The portal is being updated to allow you to manage certificates. In the meantime, you can use PowerShell/CLI/ARM to mange a cert. For example, in Azure PowerShell you can use Set-AzureRmApplicationGatewaySslCertificate.
Hope that helps!

#please-close


Cannot attach to process from the command line with only the PID specified

OS: Ubuntu 20.10
VSCode version:  1.55.2
Extension version: 1.6.2
Compiler: clang++ 11
Build target: x86_64-linux-gnu
It used to be possible to attach to a process from the command line using only the given process PID. This is still possible if you create a launch.json with request:"attach", but if I try to do it from command line:

code --open-url "vscode://vadimcn.vscode-lldb/launch/config?{request:'attach', pid:'108998'}"

I get an error that the "program" property is required:

My app has a built-in function to invoke any debugger and attach the debugger to itself, but it passes ONLY its own PID so it can work with other debuggers but NOT with VSCODE/CodeLLDB

In the last version I had changed the parser for these configs from JSON5 to YAML.  As a result, you now need to insert a space after the colon if you are omitting quotes around the key. i.e. code --open-url "vscode://vadimcn.vscode-lldb/launch/config?{request: 'attach', pid: 108998}"

Thanks a lot. It is indeed working so I'm updating my documentation. I really appreciate your work here. I guess this can be closed then.


Changed the janko/vim-test to vim-test/vim-test

Hello!
As I can see, the repo was moved to a new location, and Github redirects https://github.com/janko/vim-test to https://github.com/vim-test/vim-test, so I updated the README file.

Thanks for the PR!


Comment out added argument groups

to avoid DeprecationWarning: Nesting argument groups is deprecated.

https://github.com/python/cpython/issues/66246

I never got around to figuring out how to render help dialogues for sub grouped args. Looks like doing such it never was supported. Any refactoring recommendations? Else we could just omit these extra help dialogue grouping.


I don't like the whole idea of summarizer running later, because unsummarized articles show up very noticably. If you want to keep things split across processes, perhaps we should introduce a concept of a “processing stage”, and only return fully processed articles?

Me neither, I was sort of waiting for us to decide on which summarizer to use because one of the options is the golang implementation.
We could probably use exec to call the python script from newsfetch, but I feel like that is really messy.
Your idea would work as well.


[FEATURE]Support YML format reading

How can I directly read the configuration information in yml format through the program when configuring it on the Apollo web end?

https://github.sheincorp.cn/apolloconfig/agollo/blob/914cd4f9f7eb67be345e3055bde3867bcbe55dd2/client.go#L55
like this feature?


Fix KeepSIngleZero format trait

Formatting on frontend does not handle KeepSingleZero same as native. Native returns 1.0 frontend formats it to 1.. FormatProps:
{
  "type": "Decimal",
  "precision": 6,
  "formatTraits": ["keepSingleZero", "keepDecimalPoint", "showUnitLabel"],
  "composite": { "includeZero": true, "spacer": " ", "units": [{ "label": "", "name": "Units.DELTA_CELSIUS" }] }
}

The reason for this behaviour is, for numbers where fractional part is all zeroes, and the format trait "TrailZeroes" is unset, the frontend code trims all the zeroes including the expected single one, and we're left with just the decimal separator at the end.
The fix checks if the fractional part is all zeroes, and if "keepSingleZero" is set. If so, a single "0" is added after the decimal separator.
The behavior is now in line with how native formats decimals.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Rohit Patankar seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

/azp run

This PR has been abandoned due to a credential mix up.
Will create a new PR.


Add Kafka 3.2.0 Version Number

My first PR in Sarama 😸. Please correct me if I got things wrong 🙌 .

🗒  Description
Add Kafka 3.2.0 version number.

Add a newKafkaVersion
Bump MaxVersion to 3.2.0.

Reference(s)

https://github.com/Shopify/sarama/pull/2119

Ah apologies, I didn't spot this PR before I included the same change under https://github.com/Shopify/sarama/pull/2288 as I was adding a 3.2.0 FVT to the suite


CA1851  doesn't seem to be a legitimate rule recognized by Visual Studio

This page references a rule that doesn't seem to actually be recognized in Visual Studio. After copying the examples over, the rule isn't present by default nor when added to my working .editorconfig file using the format listed on the page (dotnet_diagnostic.CA1851.severity = warning) live or upon build. Is it possible that this page is presenting incorrect information or would the problem be with the Visual Studio product?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 3cc5942f-3f78-8def-7252-3d0a43a1d8e7
Version Independent ID: 64af62bb-d001-75cb-aa40-21646c27144e
Content: CA1851: Possible multiple enumerations of 'IEnumerable' collection - .NET
Content Source: docs/fundamentals/code-analysis/quality-rules/ca1851.md
Product: dotnet-fundamentals
GitHub Login: @gewarren
Microsoft Alias: gewarren

I was able to trigger the warning in a Visual Studio 2022 Preview project (it seems that the analyzer CA1851 did not ship with .NET 6, so you'll have to use a .NET 7 preview version). Here's the code that triggered the warning:
List<int> input = new List<int>() { 1, 2, 3 };
IEnumerable<int> selection = input.Where<int>(input => input > 1);

var count = selection.Count();
foreach (var i in selection) { }
foreach (var i in selection) { }

@gewarren Thank you for the clarification and also for updating the documentation to reflect that. Also, I'm a fan of anyone who uses semi-colons properly. 😄

@gewarren Is there a way that I can add this rule to a .NET 6 project  (better yet, all .NET 6 projects in a solution) any sort of way? It seems like one that could be backwards compatible. I haven't imported any rules explicitly before.

@gewarren Is there a way that I can add this rule to a .NET 6 project (better yet, all .NET 6 projects in a solution) any sort of way? It seems like one that could be backwards compatible. I haven't imported any rules explicitly before.

I thought it might work if you set AnalysisLevel to 7 in your .NET 6 project file. But I just tried it and it didn't seem to work. @Youssef1313 Any ideas on how to use a .NET 7 analyzer in a .NET 6 project?

It should work when using the analyzers from 7.x NuGet package.

@Youssef1313  Is it this one?

I've added it, rebuilt, etc. to no avail just yet. I also tried setting AnalysisLevel to 7.0 in the csproj file

@mavasani @Cosifne Any idea why CA1851 doesn't show up in Solution Explorer? (I checked both Microsoft.CodeAnalysis.NetAnalyzers and Microsoft.CodeAnalysis.CSharp.NetAnalyzers)
I also checked that the dll Microsoft.CodeAnalysis.NetAnalyzers for preview1.22362.3 contains the abstract base class and Microsoft.CodeAnalysis.CSharp.NetAnalyzers contains the actual implementation with DiagnosticAnalyzer attribute

I don't know how Solution explorer works with the analyzer @jmarolf might be an expert in this area.
But for the original question @sjd2021 asked, I can use the analyzer in net6.0 project by adding the preview analyzer package from NuGet.
I am using VS 17.3.3. And you will need to setup this in the editorconfig
dotnet_diagnostic.CA1851.severity = suggestion (or whatever level you like)

@Cosifne  I was just showing the solution explorer view to show that I had pulled in the latest and couldn't see the squigglies inline nor an indication in that view that the rule was being leveraged. I already had that diagnostic line but specified as warning too. It just seems like nothing is picking it up. Also, I've upgraded to the latest version of VS to no avail :(

Hi @sjd2021
Have you set the correct value in editorconfig?
Here is the code sample I used.

The project file (I just create it from template, and add the preview nuget packages)

The editorconfig I added

@Cosifne can you spot any discrepancies?

Does the underlying yellow line give any hints? Also I can see CA1851 under the editorconflig UI

Does that apply to you?


Plugin installation fails for OpenSearch 1.3

Issue:
The Plugin installation fails using the OpenSearch Plugin CLI Tool
bin/opensearch-plugin install file:///usr/share/opensearch/querqy-opensearch.zip

Exception in thread "main" java.nio.file.NoSuchFileException: /usr/share/opensearch/plugins/.installing-12975521533611387320/plugin-descriptor.properties

Plugin installation works with below command tried with OS version 1.3.2
 ./bin/opensearch-plugin install file:///Users/share/querqy-opensearch/build/distributions/opensearch-querqy-<IP_ADDRESS>-SNAPSHOT.zip
-> Installing file:///Users/sgguruda/work/git_codebase/temp/querqy-opensearch/build/distributions/opensearch-querqy-<IP_ADDRESS>-SNAPSHOT.zip
-> Downloading file:///Users/sgguruda/work/git_codebase/temp/querqy-opensearch/build/distributions/opensearch-querqy-<IP_ADDRESS>-SNAPSHOT.zip
[=================================================] 100%
-> Installed opensearch-querqy with folder name opensearch-querqy


restriction for service name and port

In select azure modules step, the service name and port is configurable, but no restriction for input value

Consider configure default port for the user

The add service button will be disabled if basic requirement(value not empty) is not met, but the input format is not checked yet.


beforeEach() not firing.

Version
2.6.0
Reproduction link
https://github.com/RemiKalbe/vue-router-issue
Steps to reproduce
Click on "Login" on the top.
What is expected?
Same loading animation as when you click on the big blue login button.
And you should see a console.log("Hello?").
What is actually happening?
Nothing.

In router.js, beforeEach() is not firing. And I have no idea why.
I can't use CodeSandbox because it just don't work with stylus.

Hey, sorry but that's too much for a repro. I can take a look if you update to latest vue router and provide a boiled down repro. You don't need stylus for the repro BTW :)

Here you are : https://codesandbox.io/s/7zp0q6y390
See, when you click on the login button, there is a loading bar on top, but if you click on the Login text on top, it just change the page.

Also, you need to go on the page /Login or /Signup

That's just the same code in codesandbox. A repro is the minimal code to show a repro. I wouldn't expect to see any of the extra components there for example

It's done, you can check it on the same link.


advertise client URLs are resolved causing SSL verification complications

The advertised client URLs returned from /v2/members and /v2/machines are resolved to IP addresses.
For clients that use these to discover the endpoint to query, this forces one of two conditions:

the SSL client must not verify the hostname it is connecting to against the names in the SSL cert
the server must have it's IP address in the CN or SAN of the SSL cert

Is there any reason we want to resolve the advertise client URLs or would it make sense to leave them unresolved?
The specific problem I am running into is with etcdctl. Lets say that my nodes are called:
https://node0.example.com:4001
https://node1.example.com:4001
https://node2.example.com:4001
And each one is configured with the server certificate that matches the domain "*.example.com"
Etcdctl will make a request against /v2/machines and will get back:
https://<IP_ADDRESS>:4001, https://<IP_ADDRESS>:4001, https://<IP_ADDRESS>:4001
Since the server's certificate does not have an IP address in its CN or SAN, etcdctl will fail to validate the server certificate when it makes the request for /v2/keys/

I have the same problem.
Start server:
netutil: Resolving etcd1.example.com:2380 to <IP_ADDRESS>:2380
netutil: Resolving etcd1.example.com:2379 to <IP_ADDRESS>:2379
etcd: listening for peers on https://<IP_ADDRESS>:2380
etcd: clientTLS: cert = /etc/etcd/certs/server.crt, key = /etc/etcd/certs/server.key, ca =
etcd: listening for client requests on https://<IP_ADDRESS>:2379
netutil: Resolving etcd1.example.com:2380 to <IP_ADDRESS>:2380
etcdserver: name = etcd1
etcdserver: data dir = /var/lib/etcd
etcdserver: member dir = /var/lib/etcd/member
etcdserver: heartbeat = 100ms
etcdserver: election = 1000ms
etcdserver: snapshot count = 10000
etcdserver: advertise client URLs = https://<IP_ADDRESS>:2379
etcdserver: initial advertise peer URLs = https://<IP_ADDRESS>:2380
etcdserver: initial cluster = etcd1=https://etcd1.example.com:2380
etcdserver: start member 163b9e2c155990b9 in cluster d14e42a7105c79a9
raft: 163b9e2c155990b9 became follower at term 0
raft: newRaft 163b9e2c155990b9 [peers: [], term: 0, commit: 0, applied: 0, lastindex: 0, lastterm: 0]
raft: 163b9e2c155990b9 became follower at term 1
etcdserver: added local member 163b9e2c155990b9 [https://etcd1.example.com:2380] to cluster d14e42a7105c79a9
raft: 163b9e2c155990b9 is starting a new election at term 1
raft: 163b9e2c155990b9 became candidate at term 2
raft: 163b9e2c155990b9 received vote from 163b9e2c155990b9 at term 2
raft: 163b9e2c155990b9 became leader at term 2
raft.node: 163b9e2c155990b9 elected leader 163b9e2c155990b9 at term 2
etcdserver: published {Name:etcd1 ClientURLs:[https://<IP_ADDRESS>:2379]} to cluster d14e42a7105c79a9

Try to connect via curl - OK:
curl --cacert /etc/etcd/certs/ca.crt https://etcd1.example.com:2379/v2/keys -v
* Hostname was NOT found in DNS cache
*   Trying <IP_ADDRESS>...
* Connected to etcd1.example.com (<IP_ADDRESS>) port 2379 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/etcd/certs/ca.crt
  CApath: none
* SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA
* Server certificate:
*   subject: CN=*.example.com,OU=EssentialSSL Wildcard,OU=Domain Control Validated
*   start date: фев 04 00:00:00 2015 GMT
*   expire date: фев 04 23:59:59 2016 GMT
*   common name: *.example.com
*   issuer: CN=COMODO RSA Domain Validation Secure Server CA,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB
> GET /v2/keys HTTP/1.1
> User-Agent: curl/7.37.0
> Host: etcd1.example.com:2379
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< X-Etcd-Cluster-Id: d14e42a7105c79a9
< X-Etcd-Index: 2
< X-Raft-Index: 30
< X-Raft-Term: 2
< Date: Thu, 12 Mar 2015 11:07:43 GMT
< Content-Length: 37
<
{"action":"get","node":{"dir":true}}
* Connection #0 to host etcd1.example.com left intact

And etcdctl:
etcdctl --ca-file=/etc/etcd/certs/ca.crt --peers="https://etcd1.example.com:2379" ls /
Error:  501: All the given peers are not reachable (Tried to connect to each peer twice and failed) [0]

etcdctl --ca-file=/etc/etcd/certs/ca.crt --peers="https://etcd1.example.com:2379" --no-sync ls /

I think I am running into this problem.  Same cause, but different symptoms.
In my case, I have CNAME aliases for our nodes that resolve the private IP on the LAN and the public IP on the WAN.
We're using SSL to encrypt the connection and allow clients to connect from separate networks, however, because the servers advertise the private ip addresses instead of the dns name:
# curl -s http://<IP_ADDRESS>:4002/v2/machines
https://<IP_ADDRESS>:2379, https://<IP_ADDRESS>:2379, https://<IP_ADDRESS>:2379

clients that are on the WAN cannot connect to the private IP address and fail.
I'm passing:
--advertise-client-urls https://dns_cname_for_each_node:2379

at startup to each ETCD instance.


large mmio region is mis-handled

Specify a large mmio region, e.g. in the board spec:
        "plic": {
            "start"  : 0x60000000,
            "length" :  0x8000000
        },

The result generates an import table entry for the builtin plic support:
        {
          "kind": "MMIO",
          "length": 134217728,
          "permits_load": true,
          "permits_load_mutable": false,
          "permits_load_store_capabilities": false,
          "permits_store": true,
          "start":<PHONE_NUMBER>
        },

But the loader reports:
loader: Import table: 0x80001e70, 0x88 bytes
loader: Building mmio capability 0x10000000 + 0x100 (permissions: G RW---- -- ---)
loader: Building mmio capability 0x2000000 + 0x10000 (permissions: G RW---- -- ---)
loader: Skipping sealing type import
loader: Building mmio capability 0x60000000 + 0x0 (permissions: G RW---- -- ---)

which results in an invalid cap/ptr being constructed for plicPrios & co in StandardPlic::StandardPlic.
Looks like this is due to:
      /**
       * The size and permissions.  The size is currently used for static
       * sealed objects and MMIO imports.  The permissions part is used
       * only for MMIO regions.
       *
       * The size is stored in the low 24 bits.  We cannot provide
       * fine-grained capabilities beyond that size, leaving the top 8
       * bits free.  These encode a subset of permissions.  MMIO regions
       * cannot be local or executable.
       */
      size_t sizeAndPermissions;

but I don't see where the data are written to identify why the length/size reads back as zero (I assume they are read directly on startup).

There's a slight disagreement between the linker and loader here.  The loader reserves the top 8 bits for future expansion, the linker treats bits 24-27 as part of the length, so that assigning them back to the length does not require a toolchain revision (assigning them to permissions is, but will require more fields in the JSON report anyway).
There's no reason that we couldn't support larger sizes in the loader, but I wanted to reserve space if we wanted to add more fine-grained permissions.
For the PLIC specifically, it appears that you have a PLIC with over 32K HART contexts.  This is almost certainly a lot more than you need.  The PLIC that we have has a lot fewer contexts and so is much smaller.
The masking happens here.  This is called here to build the capability.  Masking the low 24 bits gives a size() of 0, so we construct a 0-length capability.
Do you have a use case for MMIO regions over 2^24 bytes?  On systems with a lot of memory, we may want the heap to be in that space.  We could potentially reclaim some of the unused permission bits.  I'd like to keep at least 1-2 bits in reserve, but I don't think we will need all of the 4 that I've currently reserved.  I we introduced a new relocation, we should keep the size + an exponent in a fixed number of bits, but that's a bit more work.

On Mon, Mar 18, 2024 at 6:26 AM David Chisnall @.***>
wrote:

There's a slight disagreement between the linker and loader here. The
loader reserves the top 8 bits for future expansion, the linker treats bits
24-27 as part of the length, so that assigning them back to the length does
not require a toolchain revision (assigning them to permissions is, but
will require more fields in the JSON report anyway).
There's no reason that we couldn't support larger sizes in the loader, but
I wanted to reserve space if we wanted to add more fine-grained permissions.

Not supporting a size is fine but the behaviour (silently trapping) is not.
For the PLIC specifically, it appears that you have a PLIC with over 32K

HART contexts. This is almost certainly a lot more than you need. The PLIC
that we have has a lot fewer contexts and so is much smaller.

This is real hw. I will double-check the size.
The masking happens here

https://github.com/microsoft/cheriot-rtos/blob/1f097b4aa2fe96b5c751fee7da33a9f43c4137a7/sdk/core/loader/types.h#L929.
This is called here
https://github.com/microsoft/cheriot-rtos/blob/1f097b4aa2fe96b5c751fee7da33a9f43c4137a7/sdk/core/loader/boot.cc#L473
to build the capability. Masking the low 24 bits gives a size() of 0, so
we construct a 0-length capability.
Do you have a use case for MMIO regions over 2^24 bytes? On systems with a
lot of memory, we may want the heap to be in that space. We could
potentially reclaim some of the unused permission bits. I'd like to keep at
least 1-2 bits in reserve, but I don't think we will need all of the 4 that
I've currently reserved. I we introduced a new relocation, we should keep
the size + an exponent in a fixed number of bits, but that's a bit more
work.

At the moment I'm just trying to understand the issues of porting code from
an existing platform to one w/ just cheri(ot) added in the simplest way.  A
real system with cheri support will likely be rather different so it's hard
to say whether or not 2^24 is sufficient.

Not supporting a size is fine but the behaviour (silently trapping) is not.

Completely agreed on the second part.  We should at least have an Invariant in the size() that checks that none of the reserved bits are set.
I expect that anyone doing bring-up on a new board will run with loader debug turned on (as you are doing), at least until first successful boot, and the loader should complain about invalid things, rather than just giving 0-length / untagged capabilities.

This is real hw. I will double-check the size.

The PLIC has different regions for different HART contexts.  My expectation was that a multi-core scheduler (note: ours is not currently multi-HART-aware) would import the different contexts as different MMIO capabilities.  Our existing  targets that use a RISC-V standard PLIC import it with a 0x400000-byte length.

At the moment I'm just trying to understand the issues of porting code from an existing platform to one w/ just cheri(ot) added in the simplest way.  A real system with cheri support will likely be rather different so it's hard to say whether or not 2^24 is sufficient

Please also file issues against the book if there are areas where the documentation is lacking (I am aware that there are quite a few, but help prioritising the ones that people hit first would be very useful).  This is still quite work-in-progress, but it's a priority for me to kick it into a usable state in the next few months.

I've merged a fix that stops this being a silent failure (if you compile with loader-debug enabled), but I'm leaving this open to track whether we should relax these requirements.

Updating the title to reflect the unaddressed part of this.


Can't build version 0.7.0 with conan

Installing linear_algebra with conan fails with the following error:
$ conan install -r linear_algebra linear_algebra/0.7.0@public-conan/testing --build=missing
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=20
compiler.libcxx=libstdc++11
compiler.version=10.2
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

linear_algebra/0.7.0@public-conan/testing: WARN: Package is corrupted, removing folder: /home/rbrugo/.conan/data/linear_algebra/0.7.0/public-conan/testing/package/ce08cfd0c0f8c5c13a09c972c6737a498d5c23fb
Installing package: linear_algebra/0.7.0@public-conan/testing
Requirements
    linear_algebra/0.7.0@public-conan/testing from 'linear_algebra' - Cache
Packages
    linear_algebra/0.7.0@public-conan/testing:ce08cfd0c0f8c5c13a09c972c6737a498d5c23fb - Build

Installing (downloading, building) binaries...
linear_algebra/0.7.0@public-conan/testing: WARN: Build folder is dirty, removing it: /home/rbrugo/.conan/data/linear_algebra/0.7.0/public-conan/testing/build/ce08cfd0c0f8c5c13a09c972c6737a498d5c23fb
linear_algebra/0.7.0@public-conan/testing: Copying sources to build folder
linear_algebra/0.7.0@public-conan/testing: Building your package in /home/rbrugo/.conan/data/linear_algebra/0.7.0/public-conan/testing/build/ce08cfd0c0f8c5c13a09c972c6737a498d5c23fb
linear_algebra/0.7.0@public-conan/testing: Generator cmake created conanbuildinfo.cmake
linear_algebra/0.7.0@public-conan/testing: Calling build()
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: called by CMake conan helper
-- Conan: called inside local cache
-- Conan: Adjusting output directories
-- Conan: Using cmake global configuration
-- Conan: Adjusting default RPATHs Conan policies
-- Conan: Adjusting language standard
-- Conan setting CPP STANDARD: 20 WITH EXTENSIONS OFF
-- Conan: Compiler GCC>=5, checking major version 10.2
-- Conan: Checking correct version: 10.2
-- Conan: C++ stdlib: libstdc++11
Scanning dependencies of target mdspan-populate
[ 11%] Creating directories for 'mdspan-populate'
[ 22%] Performing download step (git clone) for 'mdspan-populate'
Cloning into 'mdspan-src'...
fatal: invalid reference: master
CMake Error at mdspan-subbuild/mdspan-populate-prefix/tmp/mdspan-populate-gitclone.cmake:40 (message):
  Failed to checkout tag: 'master'

make[2]: *** [CMakeFiles/mdspan-populate.dir/build.make:111: mdspan-populate-prefix/src/mdspan-populate-stamp/mdspan-populate-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: CMakeFiles/mdspan-populate.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

CMake Error at /usr/share/cmake-3.18/Modules/FetchContent.cmake:987 (message):
  Build step for mdspan failed: 2
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/FetchContent.cmake:1082:EVAL:2 (__FetchContent_directPopulate)
  /usr/share/cmake-3.18/Modules/FetchContent.cmake:1082 (cmake_language)
  /usr/share/cmake-3.18/Modules/FetchContent.cmake:1125 (FetchContent_Populate)
  CMakeLists.txt:35 (FetchContent_MakeAvailable)

-- Configuring incomplete, errors occurred!
See also "/home/rbrugo/.conan/data/linear_algebra/0.7.0/public-conan/testing/build/ce08cfd0c0f8c5c13a09c972c6737a498d5c23fb/CMakeFiles/CMakeOutput.log".
linear_algebra/0.7.0@public-conan/testing:
linear_algebra/0.7.0@public-conan/testing: ERROR: Package 'ce08cfd0c0f8c5c13a09c972c6737a498d5c23fb' build failed
linear_algebra/0.7.0@public-conan/testing: WARN: Build folder /home/rbrugo/.conan/data/linear_algebra/0.7.0/public-conan/testing/build/ce08cfd0c0f8c5c13a09c972c6737a498d5c23fb
ERROR: linear_algebra/0.7.0@public-conan/testing: Error in build() method, line 48
	self.cmake.build()
while calling 'cmake', line 38
	self._cmake.configure()
	ConanException: Error 1 while executing cd '/home/rbrugo/.conan/data/linear_algebra/0.7.0/public-conan/testing/build/ce08cfd0c0f8c5c13a09c972c6737a498d5c23fb' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCONAN_CMAKE_CXX_STANDARD="20" -DCONAN_CMAKE_CXX_EXTENSIONS="OFF" -DCONAN_STD_CXX_FLAG="-std=c++2a" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="gcc" -DCONAN_COMPILER_VERSION="10.2" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++11" -DCMAKE_INSTALL_PREFIX="/home/rbrugo/.conan/data/linear_algebra/0.7.0/public-conan/testing/package/ce08cfd0c0f8c5c13a09c972c6737a498d5c23fb" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -DLA_BUILD_PACKAGE="True" -DLA_ENABLE_TESTS="False" -Wno-dev '/home/rbrugo/.conan/data/linear_algebra/0.7.0/public-conan/testing/build/ce08cfd0c0f8c5c13a09c972c6737a498d5c23fb'

Try updating the branch you've checked out (presumably master) with a git pull.   The mdspan project changed the name of its primary branch from "master" to "stable" a few months ago.
We adjusted this project for this change with this commit: https://github.com/BobSteagall/wg21/commit/e19ba8f0823b361517659b59f8781806ea79f320

I can see that version 0.7.1 has this change, but it seems that version 0.7.0 does not. Editing the CMakeLists.txt exported from conan solves the problem

Are you working in the "r7" branch?

I'm not sure, I'm just launching
conan install -r linear_algebra linear_algebra/0.7.0@public-conan/testing --build=missing

from my terminal

Hi, thanks for reporting this issue. I've released new linear_algebra/0.7.0@public-conan/testing and linear_algebra/0.7.0@public-conan/stable packages to address this.  I'll close this issue for now.  Please reopen or file a new issue if you run into any further problems.