Skip to content

Api handler implementation for osupdaterun resource in apiv2#253

Merged
daniele-moro merged 30 commits intomainfrom
api-handler-impl-osupdaterun-br
Jun 13, 2025
Merged

Api handler implementation for osupdaterun resource in apiv2#253
daniele-moro merged 30 commits intomainfrom
api-handler-impl-osupdaterun-br

Conversation

@SushilLakra
Copy link
Copy Markdown
Contributor

@SushilLakra SushilLakra commented Jun 10, 2025

Description

Api handler implementation for osupdaterun resource in apiv2

Fixes ITEP-67236

OS Update Run: stores the information about the update job that run on the Edge Node. This resource is created when the update is started, and stores information about what happened in the Edge Node during the Update. If there are concerns about the size of this table, we can add retention policies for this resource.

status: stores the short description of what happened during the update.
status_indicator: enum field, moder status indicator:
STATUS_INDICATION_ERROR: an error happened during the update.
STATUS_INDICATION_IN_PROGRESS: unused, the progress about the update is kept into the update_status field of the Instance.
STATUS_INDICATION_IDLE: the update was successful.
status_timestamp: timestamp of the last status update. Overlaps with the end_time, but it's kept for consistency with Modern Status. Also, could be used in the future, if we deprecate the Instance update_status.
status_details: detailed description of what happend during the update. For example, the list of packages that were installed or updated, or the reason why the Immutable OS update failed.
start_time: timestamp of when the update job started.
end_time: timestamp of when the update job ended.
applied_policy: the policy that was applied during the update. Provides information of what was the target Update Policy for this update.
Fields should all be read-only from API. ONLY get, delete available

Any Newly Introduced Dependencies

Please describe any newly introduced 3rd party dependencies in this change. List their name, license information and how they are used in the project.

How Has This Been Tested?

Tests will be done using another Jira Tasks.

Checklist:

  • I agree to use the APACHE-2.0 license for my code changes
  • I have not introduced any 3rd party dependency changes
  • I have performed a self-review of my code

Comment thread inventory/Makefile Outdated
Copy link
Copy Markdown
Contributor

@daniele-moro daniele-moro left a comment

Choose a reason for hiding this comment

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

I've reviewed only the apiv2 content. I believe this is built on top of another PR.

Comment thread apiv2/internal/server/os_update_run.go Outdated
Comment thread apiv2/internal/server/os_update_run.go Outdated
Comment thread apiv2/internal/server/os_update_run_test.go
Comment thread apiv2/internal/server/os_update_run.go Outdated
Comment thread apiv2/VERSION Outdated
Comment thread apiv2/internal/server/os_update_run_test.go
SushilLakra and others added 3 commits June 13, 2025 14:30
Comment thread apiv2/internal/server/os_update_run.go Outdated
@daniele-moro daniele-moro merged commit 5d5ab13 into main Jun 13, 2025
21 checks passed
@daniele-moro daniele-moro deleted the api-handler-impl-osupdaterun-br branch June 13, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants