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

Custom DABs Template Documentation Additions #1802

Open
bmswatli opened this issue Oct 1, 2024 · 8 comments
Open

Custom DABs Template Documentation Additions #1802

bmswatli opened this issue Oct 1, 2024 · 8 comments
Labels
DABs DABs related issues Enhancement New feature or request

Comments

@bmswatli
Copy link

bmswatli commented Oct 1, 2024

Enhancement Request:

When creating Custom Asset Bundle Templates, I would like to see additional documentation. I have to look at existing template code and try to copy that functionality.

For example, when defining template variables that the user must select, there isn't any documentation about how to use enums for the user to select from a list. That would be very helpful for users to know.

Also

I'd also like an easy way to export custom bundle templates for other members of my team. Any ideas here (besides using git) would be appreciated!

@bmswatli bmswatli added the DABs DABs related issues label Oct 1, 2024
@shreyas-goenka
Copy link
Contributor

@bmswatli Thanks for your feedback! We'll look into adding more documentation on authoring custom templates.

I'd also like an easy way to export custom bundle templates for other members of my team. Any ideas here (besides using git) would be appreciated!

The only other option is to use the --template-dir flag to point to a local path where your template definition lives. We recommend this flag normally for developing the template. Could you please elaborate on why hosting your template as a Git repository does not work for you?

@bmswatli
Copy link
Author

bmswatli commented Oct 2, 2024

@shreyas-goenka git works - it just takes more time. Imagine a feature where the custom template shows up as part of the list with the default templates. There would still likely be exporting and importing - but once it got imported, it would be a lot easier to select than referencing a directory.

@shreyas-goenka
Copy link
Contributor

shreyas-goenka commented Oct 2, 2024

@bmswatli Could you please elaborate on what you mean by git taking more time? Is it that you have to setup a git repository in the first place to share the template or is it that you have to type the full URL when you do databricks bundle init ....

@bmswatli
Copy link
Author

bmswatli commented Oct 2, 2024

@shreyas-goenka

On the first one: If there was a clean way to export a custom template without git - that would be awesome. Then I could share that export (via email, teams, slack, etc.) and have other team members easily bring it in.

I actually didn't know we could reference the custom template by URL. I was using a local file path (another idea for documentation here).

A potential workflow:

  1. Create a custom template bundle
  2. Run something like databricks bundle export {bundle_path} to export the custom bundle.
  3. Share exported file with team
  4. Team members run something like databricks bundle import {file_path}.
  5. Custom bundle template shows up databricks bundle init

Some challenges to this approach could be:

  1. What happens when the custom bundle gets an update? Would a re-export overwrite the previous custom template? (probably)
  2. How to export custom templates, as there are multiple files and directories involved.

@shreyas-goenka
Copy link
Contributor

Thanks for outlining the suggesting in detail @bmswatli. I still don't follow why you would like to share the template as an exported file instead of creating a private repository with the template and giving the relevant users access. Could you please elaborate?

As for the Git URL functionality, while it is not documented in our public docs, it already exists in the CLI docs, ie when you run databricks bundle init -h. Was that in your experience not easy to find or understand?

@bmswatli
Copy link
Author

bmswatli commented Oct 3, 2024

It's for ease of use. A URL or local file directory is typically a long string.
Idea: The custom template could be mapped into the databricks bundle template selection.
Ex: custom-python-tmpl maps to https://github.com/repo-name.
The goal here is to make it easier to import and use other's generated custom templates. Knowing that we can reference a direct URL is probably sufficient, but figured I'd share some ideas anyway.

Public docs are the easiest way for me to find supported features. I don't typically use command line docs to search for features.

@shreyas-goenka shreyas-goenka self-assigned this Oct 3, 2024
@shreyas-goenka
Copy link
Contributor

shreyas-goenka commented Oct 3, 2024

Thanks for elaborating @bmswatli. The ROI for this feature does not sound convincing to me when stacked against other features we are working on, since we'll need to add additional state management to the CLI for what seems like a relatively minor UX improvement. I'll keep this issue open though incase this other users also echo your concerns.

Please correct me if you it's actually blocking/slowing down your workflows and is not an ease of use enhancement.

@shreyas-goenka shreyas-goenka removed their assignment Oct 3, 2024
@bmswatli
Copy link
Author

bmswatli commented Oct 3, 2024

All good. Most of this issue was just about additional documentation for custom asset bundles templates - so as long as that improves, we're all happy.

@andrewnester andrewnester added the Enhancement New feature or request label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DABs DABs related issues Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants