Skip to content
This repository was archived by the owner on Aug 4, 2025. It is now read-only.

Add reference descriptions and make them and names updateable [AS-512]#221

Merged
zarsky-broad merged 8 commits intodevfrom
iz-update-references
Feb 9, 2021
Merged

Add reference descriptions and make them and names updateable [AS-512]#221
zarsky-broad merged 8 commits intodevfrom
iz-update-references

Conversation

@zarsky-broad
Copy link
Copy Markdown
Contributor

@zarsky-broad zarsky-broad commented Feb 8, 2021

Once this goes through, I'll publish an updated client and update Rawls.

One note: description is a protected key for flights, so I've standardized on referenceDescription so the name can be the same everywhere.

Copy link
Copy Markdown
Contributor

@davidangb davidangb left a comment

Choose a reason for hiding this comment

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

first-pass comments inline!

new StringJoiner(
", ",
"UPDATE workspace_data_reference SET ",
" WHERE reference_id = :id AND workspace_id = :workspace_id");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

using a StringJoiner here gets the job done and is a clever choice ... but it feels less readable imho than a StringBuilder. I would prefer readability ... but I also won't die on this hill.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I liked the StringJoiner because it's extensible for the future, if we ever have other updatable properties.

Copy link
Copy Markdown
Contributor Author

@zarsky-broad zarsky-broad Feb 9, 2021

Choose a reason for hiding this comment

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

(plus, using StringBuilder would mean doing a whole nested case thing to add the comma...)

'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This satisfies the current Jira ticket, but from an API design perspective it's awkward that we can create and get entire data references, but we can only edit the name/description of those references - we can't edit the innards, such as pointing an existing reference at a different snapshot id. I'm not sure the best way to handle this - possibly just explaining it in the API description.

Copy link
Copy Markdown
Contributor

@ddietterich ddietterich left a comment

Choose a reason for hiding this comment

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

Comment, suggestions, and nits

Copy link
Copy Markdown
Contributor

@ddietterich ddietterich left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@davidangb davidangb left a comment

Choose a reason for hiding this comment

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

thanks for the changes!

@zarsky-broad zarsky-broad merged commit 69fa512 into dev Feb 9, 2021
@zarsky-broad zarsky-broad deleted the iz-update-references branch February 9, 2021 21:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants