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 mapstructure tag to backup task spec and fix conversion funcs #1854

Merged

Conversation

rzetelskik
Copy link
Member

@rzetelskik rzetelskik commented Mar 20, 2024

Description of your changes: This PR addresses a missing mapstructure tag in BackupTaskStatus, causing the conversion between our and manager api to miss task properties entirely.

The mapstructure is used in functions converting managerclient structs to our internal specs:

props := t.Properties.(map[string]interface{})
.

At this point this is one of the issues behind unnecessary updates #1827, but it's also required for fixing status synchronisation: #1850, hence the priority.

This PR also fixes manager task conversion func bug and adds unit tests covering the conversion.

Which issue is resolved by this Pull Request:
Resolves #1852

/kind bug
/priority critical-urgent

@scylla-operator-bot scylla-operator-bot bot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 20, 2024
@scylla-operator-bot scylla-operator-bot bot requested review from tnozicka and zimnx March 20, 2024 13:16
@scylla-operator-bot scylla-operator-bot bot added priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 20, 2024
@rzetelskik rzetelskik changed the title Add mapstructure tag to backup task spec in status and fix conversion funcs Add mapstructure tag to backup task spec and fix conversion funcs Mar 20, 2024
Copy link
Contributor

@tnozicka tnozicka left a comment

Choose a reason for hiding this comment

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

/approve
/assign @zimnx

@scylla-operator-bot scylla-operator-bot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 20, 2024
@rzetelskik rzetelskik force-pushed the manager-task-spec-mapstructure branch from 36d3d3f to b897735 Compare March 20, 2024 13:56
Copy link
Collaborator

@zimnx zimnx left a comment

Choose a reason for hiding this comment

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

/lgtm

@scylla-operator-bot scylla-operator-bot bot added the lgtm Indicates that a PR is ready to be merged. label Mar 20, 2024
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rzetelskik, tnozicka, zimnx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@scylla-operator-bot scylla-operator-bot bot merged commit fefabc3 into scylladb:master Mar 20, 2024
12 checks passed
@rzetelskik rzetelskik deleted the manager-task-spec-mapstructure branch March 26, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing mapstructure tag in BackupTaskStatus
3 participants