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

[ENG-6650][ENG-6729] Remote Computing / Boa addon #171

Merged
merged 10 commits into from
Dec 18, 2024

Conversation

felliott
Copy link
Member

@felliott felliott commented Dec 2, 2024

  • Add infrastructure for new type of addons, remote-computing.
  • Add implementation of first remote-computing service, Boa.
  • GLEEP! I forgot to regenerate the migration. The migration is correct, but the order is wrong!
  • ERRRPP! Now there is a broken test.

@felliott felliott force-pushed the feature/boa-addon branch 3 times, most recently from a6bc04c to ba18c3f Compare December 5, 2024 06:48
@felliott felliott requested a review from opaduchak December 5, 2024 07:11
Copy link
Collaborator

@opaduchak opaduchak left a 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!
Copy link
Collaborator

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?
Copy link
Collaborator

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

Comment on lines 107 to 108
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
Copy link
Collaborator

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

Copy link
Collaborator

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"
Copy link
Collaborator

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?

@felliott felliott force-pushed the feature/boa-addon branch 2 times, most recently from d805a81 to dca84f9 Compare December 14, 2024 04:42
@felliott felliott changed the title [ENG-6650] Remote Computing / Boa addon [ENG-6650][ENG-6729] Remote Computing / Boa addon Dec 16, 2024
Copy link
Collaborator

@brianjgeiger brianjgeiger left a 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
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment here.

Copy link
Collaborator

@opaduchak opaduchak left a 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)
Copy link
Collaborator

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

Copy link
Collaborator

@brianjgeiger brianjgeiger left a 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?

Copy link
Collaborator

@opaduchak opaduchak left a 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!

@brianjgeiger brianjgeiger merged commit 3c9221e into CenterForOpenScience:develop Dec 18, 2024
1 check passed
@felliott felliott deleted the feature/boa-addon branch January 8, 2025 13:01
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

Successfully merging this pull request may close these issues.

3 participants