Skip to content

Fix updatedAt field and remove id field from services#25

Merged
teemow merged 1 commit intomainfrom
teemow-remove-id-from-service
Jul 6, 2025
Merged

Fix updatedAt field and remove id field from services#25
teemow merged 1 commit intomainfrom
teemow-remove-id-from-service

Conversation

@teemow
Copy link
Member

@teemow teemow commented Jul 5, 2025

This pull request introduces changes to improve the tracking of service instance updates by adding an UpdatedAt field across the codebase. It also removes the ID field from the ServiceInstance struct, simplifying the representation of service instances. Below is a summary of the most important changes grouped by theme.

Improved tracking of service instance updates:

  • Added an UpdatedAt field to the ServiceInstanceInfo struct in internal/orchestrator/orchestrator.go to track the last update time of service instances.
  • Updated the CreateServiceClassInstance and serviceInstanceToInfo methods in internal/orchestrator/orchestrator.go to populate the UpdatedAt field appropriately. [1] [2]
  • Added a GetUpdatedAt method to the GenericServiceInstance struct in internal/services/instance.go to retrieve the last update time.
  • Modified the convertToAPIServiceInstance method in internal/orchestrator/api_adapter.go to include the UpdatedAt field in API conversions.

Simplification of service instance representation:

  • Removed the ID field from the ServiceInstance struct in internal/api/serviceinstance.go to simplify service instance representation.
  • Updated test methods in internal/api/orchestrator_test.go to remove references to the ID field and ensure compatibility with the updated ServiceInstance struct. [1] [2] [3]

…ated methods

- Added UpdatedAt field to ServiceInstance struct for tracking last update time.
- Updated mockOrchestratorHandler methods to set UpdatedAt during service instance creation and retrieval.
- Modified API adapter and orchestrator methods to handle UpdatedAt field appropriately.
- Introduced GetUpdatedAt method in GenericServiceInstance to retrieve the last update time.
- Ensured consistency across service instance management with the new UpdatedAt field.
@teemow teemow requested a review from a team as a code owner July 5, 2025 20:57
@teemow teemow self-assigned this Jul 5, 2025
@teemow teemow changed the title Fix: updatedAt field and remove id field from services Fix updatedAt field and remove id field from services Jul 5, 2025
@teemow teemow merged commit e06f4a1 into main Jul 6, 2025
2 checks passed
@teemow teemow deleted the teemow-remove-id-from-service branch July 6, 2025 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant