-
Notifications
You must be signed in to change notification settings - Fork 279
Improved Health Endpoint Metadata (DAB Version/App User Agent) #2086
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
Conversation
…om/Azure/data-api-builder into dev/sean/1971_version_health_endpt
…nor version of DAB , the pipeline function Counter() uses major to override the minor with cicd tracked value, which will still allow local builds, tests to have correct major.minor in code.
…mulate ADO pipeline, this is trial and error
…first element from the array resolved from accessing property value
…om/Azure/data-api-builder into dev/sean/1971_version_health_endpt
…or application name.
…om/Azure/data-api-builder into dev/sean/1971_version_health_endpt
can we add a test where we see the app_name as |
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.
It looks good. Few comments about formatting, and some clarifying questions.
…ms. application name in connection string test logic updated to be more readable with fewer params and better named params. Health endpoint tests updated to breaking long lines into more readable 'if' blocks.
…r feedback to exclude unused param.
new changes since last review, so existing review stale.
/azp run |
…ray what test is validating. Improves readability.
…om/Azure/data-api-builder into dev/sean/1971_version_health_endpt
/azp run |
Love it!!!! |
This is awesome! |
Why make this change?
Healthy
. There was no additional information that would be useful such as DAB version.What is this change?
major.minor.patch
ormajor.minor.patch+<commit_hash>
. The only time the version is returned with the commit hash is when the CLI is used with either--version
,--help
or an unrecognized verb/option. All other instances of version printing to console in engine, cli, and tests should NOT include the commit hash.Added the classes
DabHealthCheck : IHealthCheck
HealthReportResponseWriter
-> uses Health Check metadata to fill health check endpoint response contents (JSON String). Because the writer writes raw json and uses values that stay constant through the lifetime of the dab process, the created json is cached after first creation and returned whenever the health endpoint is hit.Updates
Directory.Build.props
with<Version>0.12</Version>
to avoid having to hardcode version numbers in all .csproj files like in add current version number #1995 , and this hardcoded version number (just with Major.Minor) enables the Open Source version of DAB (when forked, built locally, or tested locally without the benefit of having CI/CD injected versioning.)BuildPipeline.yml
to include a powershell script prior to other steps which parses the major/minor version specified in the fileDirectory.Build.props
and uses those values instead of pipeline yml hardcoded values. While we still are hardcoding major/minor, we are doing so in code that will allow the scenarios mentioned (local builds/tests) to have versioning aligning with the current dab development milestone (sans the patch value tracked by ci/cd). This will prevent local builds reporting some default catch all version like 1.0.0$major
and$minor
are removed from the pipeline. The$patch
variable assignment still has thecounter()
function determining its value and *as long as the powershell script parsingDirectory.Build.props
gets executed prior to other steps, then there will be a value set for major/minor for the counter() function to use when the variable is queried. In other words, the variables "major" and "minor" need not be set directly in "variables". This is tested and demonstrated in the pipeline.Reproducible PowerShell script you can run locally in powershell ise:
How was this tested?
Sample Request(s)