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

HOSTSD-240 Keep removed servers #126

Merged
merged 1 commit into from
Mar 27, 2024
Merged

HOSTSD-240 Keep removed servers #126

merged 1 commit into from
Mar 27, 2024

Conversation

Fosol
Copy link
Contributor

@Fosol Fosol commented Mar 27, 2024

The Data Service will no longer delete removed servers and file systems items. Instead it will update their install status to 0. The service has also been updated to improve the consistency of data between history and current storage values. There is still a difference regrettably, but I haven't figured out what causes the difference.

When requesting historical data it will now include uninstalled items for the prior months, but only installed items for the current month. If the user selects invalid date range it will result in no data returned.

I've also disabled caching to see if it improves various data issues without too much of a hit to performance.

Added DB migration 1.0.3

Run bash do db-migration and bash do refresh api to update your local environment

Add DB migration 1.0.3
@Fosol Fosol added enhancement New feature or request data-service Build and deploy the data-service labels Mar 27, 2024
@Fosol Fosol self-assigned this Mar 27, 2024
@@ -129,7 +129,7 @@ public IActionResult GetForId(string id)
[Produces(MediaTypeNames.Application.Json)]
[ProducesResponseType(typeof(IEnumerable<FileSystemHistoryItemModel>), (int)HttpStatusCode.OK)]
[SwaggerOperation(Tags = new[] { "File System Item" })]
[ResponseCache(VaryByQueryKeys = new[] { "*" }, Location = ResponseCacheLocation.Client, Duration = 1200)]
// [ResponseCache(VaryByQueryKeys = new[] { "*" }, Location = ResponseCacheLocation.Client, Duration = 1200)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disable caching for now.

, "ServerItemServiceNowKey"
, "InstallStatus"
FROM (
SELECT fshi.*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get the most recent values. In the current month only return installed items.

, "ServerItemServiceNowKey"
, "InstallStatus"
FROM (
SELECT fshi.*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get the most recent values. In the current month only return installed items.

, "Version"
, "InstallStatus"
FROM (
SELECT *
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get the most recent values. In the current month only return installed items.

, "Version"
, "InstallStatus"
FROM (
SELECT shi.*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get the most recent values. In the current month only return installed items.

@Fosol Fosol merged commit a8e5397 into bcgov:main Mar 27, 2024
3 checks passed
@Fosol Fosol deleted the 240 branch March 27, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data-service Build and deploy the data-service enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant