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

DM-45709: Don't run notebooks in environments that don't have the necessary services #361

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

fajpunk
Copy link
Member

@fajpunk fajpunk commented Jul 19, 2024

  • Parse a 'mobu' section out of notebook metadata
  • Add a list of available services to app config (to be replaced by some kind of service discovery at some point)
  • Don't run the notebook if it declares required services in the metadata and the services aren't available in the environment.

Putting the required services in the notebook metadata can be done in JupyterLab, though is not the nicest UX for this. We now have an in-repo config file (mobu.yaml), maybe it would be better to keep a manifest in there? I like having it closer to the notebook though. I'm open to other suggestions.

@fajpunk fajpunk force-pushed the tickets/DM-45079/add-service-specific-checks branch from 4cf5460 to 9ca39d3 Compare July 19, 2024 20:15
@fajpunk fajpunk requested a review from rra July 19, 2024 20:15
…vices

* Parse a 'mobu' section out of notebook metadata
* Add a list of available services to app config (to be replaced by some
kind of service discovery at some point
* Don't run the notebook if it declares required services in the
metadata and the services aren't available in the environment.
@fajpunk fajpunk force-pushed the tickets/DM-45079/add-service-specific-checks branch from 9ca39d3 to ad6af66 Compare July 19, 2024 20:39
Copy link
Member

@rra rra left a comment

Choose a reason for hiding this comment

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

This change looks good! A couple of general notes:

  • You can set model_config = SettingsConfigDict(env_prefix="MOBU_", case_sensitive=False) in the Config model and then if the environment variable name is the same as the field name except in all caps with MOBU_ prepended, you can leave off the explicit validation_alias.
  • We should at some point (not in this PR) figure out a better test strategy that can tie execution results to specific notebooks and make each new test a bit more succinct rather than having to copy and paste large blocks of status information to compare against.

@fajpunk fajpunk merged commit 34f3d46 into main Jul 19, 2024
4 checks passed
@fajpunk fajpunk deleted the tickets/DM-45079/add-service-specific-checks branch July 19, 2024 21:45
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.

2 participants