Skip to main content

MigrationArgs

Struct MigrationArgs 

Source
#[non_exhaustive]
pub struct MigrationArgs { pub application_type: Option<String>, pub data_bytes_after: i64, pub data_bytes_before: i64, pub error: Option<String>, pub failed_migration: Option<String>, pub target_version: Option<String>, pub target_version_id: Option<Uuid>, pub timings: Vec<MigrationTimingArgs>, pub total_elapsed_seconds: i64, }
Expand description

How the target version’s migrations went against the restored replica.

JSON schema
{
 "description": "How the target version's migrations went against the restored replica.",
 "type": "object",
 "required": [
   "data_bytes_after",
   "data_bytes_before",
   "timings",
   "total_elapsed_seconds"
 ],
 "properties": {
   "application_type": {
     "description": "The type of application whose candidate version was tried, echoed from\nthe worklist entry's `application_type`. Omitted by a consumer that\npredates the entry carrying it, in which case Canopy derives the\napplication from the machine and the version.",
     "type": [
       "string",
       "null"
     ]
   },
   "data_bytes_after": {
     "description": "Size of the data after they ran. The growth between the two is what shows\na migration that backfills heavily.",
     "type": "integer",
     "format": "int64"
   },
   "data_bytes_before": {
     "description": "Size of the data before the migrations ran.",
     "type": "integer",
     "format": "int64"
   },
   "error": {
     "description": "What the migration runner said about that failure: the message, and the\nDETAIL naming the row it refused, which is what tells a deployment what\nto fix. Send no connection strings or credentials. Kept to the first\n2000 characters.",
     "type": [
       "string",
       "null"
     ]
   },
   "failed_migration": {
     "description": "The migration that failed, when one did.",
     "type": [
       "string",
       "null"
     ]
   },
   "target_version": {
     "description": "The version whose migrations were applied, as semver, taken from the\nworklist entry's `target_version`. This is the version the consumer\nactually migrated to; send it in preference to echoing the identifier.",
     "type": [
       "string",
       "null"
     ]
   },
   "target_version_id": {
     "description": "The version whose migrations were applied, as the identifier a consumer\nechoes from the worklist entry's `target_version_id`. Accepted only for\nolder consumers that report the identifier; omit it when `target_version`\nis sent.",
     "type": [
       "string",
       "null"
     ],
     "format": "uuid"
   },
   "timings": {
     "description": "One entry per migration that ran, in the order they ran.",
     "type": "array",
     "items": {
       "$ref": "#/components/schemas/MigrationTimingArgs"
     }
   },
   "total_elapsed_seconds": {
     "description": "Whole seconds the whole migration run took.",
     "type": "integer",
     "format": "int64"
   }
 }
}

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§application_type: Option<String>

The type of application whose candidate version was tried, echoed from the worklist entry’s application_type. Omitted by a consumer that predates the entry carrying it, in which case Canopy derives the application from the machine and the version.

§data_bytes_after: i64

Size of the data after they ran. The growth between the two is what shows a migration that backfills heavily.

§data_bytes_before: i64

Size of the data before the migrations ran.

§error: Option<String>

What the migration runner said about that failure: the message, and the DETAIL naming the row it refused, which is what tells a deployment what to fix. Send no connection strings or credentials. Kept to the first 2000 characters.

§failed_migration: Option<String>

The migration that failed, when one did.

§target_version: Option<String>

The version whose migrations were applied, as semver, taken from the worklist entry’s target_version. This is the version the consumer actually migrated to; send it in preference to echoing the identifier.

§target_version_id: Option<Uuid>

The version whose migrations were applied, as the identifier a consumer echoes from the worklist entry’s target_version_id. Accepted only for older consumers that report the identifier; omit it when target_version is sent.

§timings: Vec<MigrationTimingArgs>

One entry per migration that ran, in the order they ran.

§total_elapsed_seconds: i64

Whole seconds the whole migration run took.

Implementations§

Source§

impl MigrationArgs

Source

pub fn builder() -> MigrationArgsBuilder

Create an instance of MigrationArgs using the builder syntax

Trait Implementations§

Source§

impl Clone for MigrationArgs

Source§

fn clone(&self) -> MigrationArgs

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MigrationArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for MigrationArgs

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for MigrationArgs

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.