Skip to content
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

add warning info to $healthcheck OperationOutcome when deployment update required #3336

Closed
kmbarton423 opened this issue Feb 11, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request P3 Priority 3 - Nice To Have

Comments

@kmbarton423
Copy link
Contributor

kmbarton423 commented Feb 11, 2022

When the database schema is more up-to-date than the code, you receive the following log messages upon executing $healthcheck:

[2/11/22, 17:57:14:821 UTC] 00000047 FHIRRestServl I Received request: tenantId:[default] dsId:[default] user:[fhiruser] method:[GET] uri:[https://localhost:9443/fhir-server/api/v4/$healthcheck] [2/11/22, 17:57:15:065 UTC] 00000047 FHIRPersisten W Deployment update required: database schema version [25] is newer than code schema version [24] [2/11/22, 17:57:15:083 UTC] 00000047 FHIRRestServl I Completed request[0.262488459 secs]: tenantId:[default] dsId:[default] user:[fhiruser] method:[GET] uri:[https://localhost:9443/fhir-server/api/v4/$healthcheck] status:[200]

The $healthcheck is still successful by design:

{
	"resourceType": "OperationOutcome",
	"issue": [
		{
			"severity": "information",
			"code": "informational",
			"details": {
				"text": "All OK"
			}
		}
	]
}

This is an enhancement request to include the warning information for the above situation in the OperationOutcome of the $healthcheck as well as the log.

QA guidance

Verify HTTP 200 is still returned, but when "Prefer" HTTP Header is set to "return=OperationOutcome", the OperationOutcome contains a warning.

{
	"resourceType": "OperationOutcome",
	"issue": [
		{
			"severity": "warning",
			"code": "informational",
			"details": {
				"text": "Deployment update required: database schema version [26] is newer than code schema version [25]"
			}
		}
	]
}
@kmbarton423 kmbarton423 added the enhancement New feature or request label Feb 11, 2022
@lmsurpre
Copy link
Member

lmsurpre commented Feb 14, 2022

team decision: $healthceck should continue to pass (200 OK), but it might be helpful to include it as an informational message in an OperationOutcome response

it might make sense to do this one together with #3031

@lmsurpre
Copy link
Member

please don't make this change until we've updated our config for #3131 so that we don't fill our logs with the "client hung up" exception

@lmsurpre lmsurpre added the P3 Priority 3 - Nice To Have label Feb 14, 2022
@tbieste tbieste self-assigned this Feb 24, 2022
tbieste added a commit that referenced this issue Feb 24, 2022
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue Feb 24, 2022
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue Feb 24, 2022
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue Feb 24, 2022
Signed-off-by: Troy Biesterfeld <tbieste@us.ibm.com>
tbieste added a commit that referenced this issue Feb 28, 2022
Issue #3336 - $healthcheck warning when deployment update required
@tbieste
Copy link
Contributor

tbieste commented Feb 28, 2022

Since #3131 is currently in another PR, I went ahead and worked on this issue.

@tbieste
Copy link
Contributor

tbieste commented Mar 18, 2022

Verified that when the schema version is higher than the code version, HTTP 200 is returned by $healthcheck with the following output:

{
	"resourceType": "OperationOutcome",
	"issue": [
		{
			"severity": "warning",
			"code": "informational",
			"details": {
				"text": "Deployment update required: database schema version [26] is newer than code schema version [25]"
			}
		}
	]
}

@tbieste tbieste closed this as completed Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P3 Priority 3 - Nice To Have
Projects
None yet
Development

No branches or pull requests

3 participants