-
Notifications
You must be signed in to change notification settings - Fork 145
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
Restructure Airlock requests & add createdBy field #2779
Restructure Airlock requests & add createdBy field #2779
Conversation
…s://github.com/microsoft/AzureTRE into jjgriff93/2765-bug-airlock_incorrect_initiator
/test |
🤖 pr-bot 🤖 🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/3313797214 (with refid (in response to this comment from @jjgriff93) |
I understand the approach but if the longer term plan is to add an initiator field - shall we not just do that now? I'm also nervous about coupling any logic to the History array as we've previously discussed moving that out to a separate Cosmos collection, so this would have to be updated in that case. |
I don't think there's any plan to add an initiator field to all resource objects - what I discussed with Stuart was the potential of all resources having the field renamed from user to last_updated_by to avoid any confusion, but that's something that needs to be discussed as a bigger group as it affects the whole TRE API On the history array front yes that's true - the logic could be updated at a later date to fetch the history item but would involve a second call to the db by the API (although I imagine it would need to do this anyway) @damoodamoo Happy to go down the initiator field route if you think that backwards compatibility isn't an issue? i.e. requests created before this won't have an initiator field |
Not sure why we'd need to update all Resource types - as the Airlock Request is it's own model? The shape of it is very similar to a For existing requests we could add a migration which would move the top history item user to the initiator field - or we could not worry about it as I can't imagine there are many inflight requests that we need to worry about at this stage? @marrobi ? |
It's an extension of the Resource model (in the UI models) so inherits user from that - however discussed this on the standup this morning and have decided to go ahead and add the additional |
Added migrations to rename several airlock fields Migrate history[0].user to createdBy
Have reworked this as per our discussions:
|
/test |
🤖 pr-bot 🤖 🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/3322722949 (with refid (in response to this comment from @jjgriff93) |
/test |
🤖 pr-bot 🤖 🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/3324592277 (with refid (in response to this comment from @jjgriff93) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great + a much better shape of the object :)
/test |
🤖 pr-bot 🤖 🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/3329913926 (with refid (in response to this comment from @jjgriff93) |
Resolves #2765
What is being addressed
This PR fixes the querying of airlock requests by the initiator of the request by adding a createdBy field to the requests as well as reworking several fields to be more descriptive
How is this addressed