-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure blob in flat folder structure #25078
Conversation
…stom filename prefix
@JunTaoLuo who owns this package now, since it's moved from Extensions? |
Good question for @Pilchie |
@davidfowl do you know who knows about this package? |
Pavel created the package and no one has touched it since. |
Also tagging @javiercn. |
foreach (var eventGroup in eventGroups) | ||
{ | ||
var key = eventGroup.Key; | ||
var blobName = $"{_appName}/{key.Year}/{key.Month:00}/{key.Day:00}/{key.Hour:00}/{_fileName}"; | ||
//var blobName = $"{_appName}/{key.Year}/{key.Month:00}/{key.Day:00}/{key.Hour:00}/{_fileName}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That code was replaced with the logic from line 66 - 74 because it forces nested folder in Azure blob. Line 71 produces a flat folder structure, while line 74 produces the original nested folder structure where the code was commented out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be removed then? Why did you leave the code in but commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you're right, it should be removed. I will remove it and commit my change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidfowl : I removed the commented out code, committed and pushed. This is my first time contributing, and I was not sure whether to leave commented out original code or to delete. But now I know to go ahead and delete when deemed not needed. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidfowl : After removing the commented our code, it would not pass the checks. Could you please advise what might have gone wrong, could this be something on the CI side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidfowl : The build is ready for your review. Could you please revisit this PR? Thank you!
We were having some issues with our selenium tests, they should be fixed now. This should pass on retry |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
still failing? hmmm.... could we try again please? |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
@yogigrantz the CI failures are unrelated, we're having some issues w/ our template tests at the moment. Should hopefully be resolved soon. |
Thank you William! |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
still failing ... I should have deleted that line in the first place :( |
/azp run |
Let's give it another shot. |
Azure Pipelines successfully started running 2 pipeline(s). |
@davidfowl or @javiercn - can one of you review this? |
All checks have passed now :) Thank you All! |
@davidfowl @javiercn @Pilchie @wtgodbe @JunTaoLuo @shirhatti I can put sample Azure application in GitHub if that helps?. Please do let me know. Thank you so much, appreciate your time! |
I strongly recommend not trying to change the PublicAPI.Unshipped.txt files manually. The analyzer has fairly nice fixers that work only in Visual Studio. So,
|
Oh, it may be necessary to repeat the above in VS because the first round didn't get far enough to hit all of the |
public static ILoggingBuilder AddAzureWebAppDiagnostics(this ILoggingBuilder builder) | ||
/// <param name="customPrefix"></param> | ||
/// <returns></returns> | ||
public static ILoggingBuilder AddAzureWebAppDiagnostics(this ILoggingBuilder builder, string customPrefix = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pilchie is this a binary breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overloads are binary breaking safe, optional parameters are not - think about how they work, the method always receives two arguments, it's just that if you don't specify it, the compiler burns in the default value at the call-site.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, I removed the optional parm and went ahead and created an overload instead. But CI still shows this optional parm error, even though I renamed the parameter.
@Pilchie @davidfowl
[SuppressMessage("ApiDesign", "RS0026:Do not add multiple public overloads with optional parameters"
Removed the optional parameter, created overload to handle the extra parameter
Gihub repository did not take my change for removig the optional = null, so I am renaming the parm
Please discard my version of AspNetCore.sln. It was inadvertently pushed to my repository |
Could someone please help me out? I accidentally pushed AspnetCore.sln. Now it is in conflict. I'd appreciate if someone with write access can resolve conflicts by replacing my version with the current master version. Thank you! |
You should be able to fix it fairly easily:
|
@BrennanConroy when I typed git revert --hard HEAD~2 it would not take. it gave me the help menu, shown in this screenshot: |
Whoops, I meant reset. |
Brennan: I followed your steps. Not sure if the .sln file was recovered? But could I have another rebuild please? I think the last build broke with #L39 |
Renamed the parm back. Hoping to get a clean build
@wtgodbe : is there anything I could do to fix this error ?src/Logging.AzureAppServices/src/AzureAppServicesLoggerFactoryExtensions.cs(39,39): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'AddAzureWebAppDiagnostics' is not part of the declared API. |
If you have Visual Studio 16.8 or later installed,
|
@mavasani @sharwell do the public API analyzers and fixers work correctly in 16.7.6❔ I'm surprised @yogigrantz's build was successful. @yogigrantz it's possible VS thought the project was up-to-date. You may need to rebuild instead of build to get the error seen on the CI. Another idea would be to use the public preview version of Visual Studio. Easy way to get that is |
@dougbu : The rebuild works both in 16.7.6 and 16.8 Preview 5.0. When I downloaded preview 3.1 it gave me version 5.0 btw so I could not get 3.1. The .\restore.cmd failed on 16.8 preview 5.0. Also, when I ran this script: .\eng\scripts\InstallVisualStudio.ps1 -Channel Preview -Edition Community it was pointing to version 16.7.6 |
I don't understand this and hope @mavasani or @sharwell can help out here.
I didn't mention a specific preview of VS 16.8. Preview 5 is fine.
What pointed to version 16.7.6❔ If you mean the version of VS that startvs.cmd chose to start, That would mean the default is still your previous VS installation. You can change the association for |
@dougbu @yogigrantz You are likely hitting dotnet/msbuild#3046, which is applicable to every MSBuild warning, not just analyzer warnings. |
@dougbu : What pointed to version 16.7.6❔ Sorry for the confusion. when I copied your command line, it errored out. So I went ahead and opened InstallVisualStudio.ps1 with powershell and ran it manually. At that point it opened up the Installer option dialog for Enterprise edition, 16.7.6 . After that I changed the value for $Edition and $Channel as shown on the screenshot, but all it does is open the installer dialog with items that I already installed checked out. Is this step for verifying whether I have the correct Visual Studio? |
@mavasani : In our case we don't have any warning though. I build with --no-incremental and still, no warning |
@yogigrantz for the questions you asked me: The InstallVisualStudio.ps1 file is intended to run from within PowerShell and we don't have a |
@dougbu ok I followed thru with update and everything went well. I did another build, it built successfully. 0 Warning 0 Error. There is no changed file in my repository, so there is nothing to commit or push. @mavasani : when there is no warning and no error, does this situation in dotnet/msbuild#304 still apply? Could you please advise how I should resolve it? |
Hi, since my repository was too far behind I deleted it and reforked and recloned aspnetcore from the master branch. The current global.json says sdk "version": "6.0.100-alpha.1.20523.3". Should I download this sdk to build the solution, because I have 5.0-rc2 in my machine and it would not build this solution now. If I modify global.json chances are, when I try to merge it would fail the build again. Also I did not see SDK 6.0 being available to download. Please advise and give the link if I should use 6.0, thank you! |
Run the |
Started over from fresh copy of dotnetcore master branch 10/3/2020 -> pull request #27383. I updated / fixed the UnitTest and added the new method definition in src/Logging.AzureAppServices/src/PublicAPI.Unshipped.txt . Now getting only 3 failures |
@yogigrantz you need to use Visual Studio to update the src/Logging.AzureAppServices/src/PublicAPI.Unshipped.txt file. It should include the added You may need to remove the .\artifacts\bin\Microsoft.Extensions.Logging.AzureAppServices\ folder and perhaps .\artifacts\obj\Microsoft.Extensions.Logging.AzureAppServices\ to ensure the VS build actually hits the error. |
Transferring to #27383 -> Fresh reclone |
Added an option to output Azure blob in flat folder structure with custom filename prefix
Summary of the changes (Less than 80 chars)
Addresses #25885
previous discussion: dotnet/extensions#3391