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

Explicitly assign status (& operation) #9

Open
achumachenko-cloudinary opened this issue Sep 13, 2023 · 1 comment
Open

Explicitly assign status (& operation) #9

achumachenko-cloudinary opened this issue Sep 13, 2023 · 1 comment

Comments

@achumachenko-cloudinary
Copy link
Collaborator

          Having "MIGRATED' as the default feels risky to me.

Should this not be set after we have the response?

I see there being 4 status':

  • MIGRATED = New upload of an asset
  • OVERWRITTEN = Public id already existed and overwrite was set to true (overwritten is in the response object)
  • ALREADY EXISTED = Public id already existed and overwrite was set to false (existing is in the response object)
  • FAILED = Error occurred

Originally posted by @mgriff in #7 (comment)

@achumachenko-cloudinary
Copy link
Collaborator Author

Initially the tool had been designed for migration flow only.
Now we change the context to allow for any bulk operations.

I think to "support" this context the main loop would need to support the following scenarios:

Have the summary.status set to 'NA'

  • API call succeeds
    • Assign the summary.status to 'OK'
    • Run a custom function (passed to the loop) that takes in API response object and returns "sub-status". Migration would have the four. But then in context of, let's say, bulk metadata updates the "sub-status" may be different
  • API call fails
    • Assign the summary.status to 'ERR'

This will allow to identify records with summary.status set to 'NA' (indicating an anomaly) as well as filter the report for those OK/ERR values. The "sub-status" (name to be determined) field can then be used for further filtering depending on the reporting needs.

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

No branches or pull requests

1 participant