-
Notifications
You must be signed in to change notification settings - Fork 8
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
[ENG-6650][ENG-6729] Remote Computing / Boa addon #171
[ENG-6650][ENG-6729] Remote Computing / Boa addon #171
Conversation
a6bc04c
to
ba18c3f
Compare
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.
Great work!
I've left some questions, but I am not sure whether any changes are required
operations against the service and to aggregate accounts under a known user. | ||
""" | ||
|
||
default_root_folder = models.CharField(blank=True) # TODO: don't need this! |
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.
Maybe remove this if we don;t need it?
I also don't recall any use of default_root_folder in authorized_storage_account
and authorized_citation_account
Maybe this can be done during cleanup.
|
||
class ConfiguredRemoteComputingAddon(ConfiguredAddon): | ||
|
||
root_folder = models.CharField(blank=True) # TODO: do we still need this? |
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.
This is 100% needed for storage and citations to function, but I am not knowledgable enough about remote computing addon
addon_service/credentials/models.py
Outdated
except ExternalCredentials.authorized_storage_account.RelatedObjectDoesNotExist: | ||
# FIXME: I have doubts that auth_storage_acct is correct. Shouldn't it be storage? | ||
# FIXME: Where is citation and remote_computing? | ||
# FIXME: does that docstring need to be updated? | ||
return None |
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.
I suppose that this except clause is redundant
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.
But on the other hand, authorized account property accounts for all addon types
@@ -22,6 +22,7 @@ aiohttp = "3.9.3" | |||
pyjwe = "1.0.0" | |||
cryptography = "42.0.7" | |||
boto3 = "1.34" | |||
boa-api = "^0.1.14" |
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.
Is it mission critical to include boa client and are we sure that we cannot do all of the work using plain http calls?
d805a81
to
dca84f9
Compare
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.
One potential change from me.
serializer = ConfiguredCitationAddonSerializer( | ||
instance, context={"request": request} | ||
) | ||
else: # computing |
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.
I know this was the pattern from before, but should we elif hasattr(instance, "configuredcomputingaddon")
here and maybe else
an error?
serializer = AuthorizedCitationAccountSerializer( | ||
instance, context={"request": request} | ||
) | ||
else: # computing |
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.
Same comment here.
dca84f9
to
6c02876
Compare
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.
Seems good,
But I believe you have missed removing one extra field from configured compute addon serializer
class ConfiguredComputingAddonSerializer(ConfiguredAddonSerializer): | ||
"""api serializer for the `ConfiguredComputingAddon` model""" | ||
|
||
root_folder = serializers.CharField(required=False, allow_blank=True) |
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.
I beleive this field is redundant for computing addons
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.
I'm good once Oleh is happy with this. Also, based on this conversation, are we setting the wb_key
properly in this PR?
6c02876
to
0f0657d
Compare
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.
I have nothing to add, LGTM!
remote-computing
.GLEEP! I forgot to regenerate the migration. The migration is correct, but the order is wrong!ERRRPP! Now there is a broken test.