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

RFC - [computelogmanager] add fields to pass uri, path or shell cmd #26723

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mlarose
Copy link
Contributor

@mlarose mlarose commented Dec 26, 2024

Summary & Motivation

The Azure Blob Storage Container do not provide direct urls to objects on private storage accounts, even if the user is authenticated.

This PR provide new fields on the captured logs entry that such ComputeLogManager could populate to improve the user experience by providing a path or uri and/or a shell command to access those logs.

How I Tested These Changes

  • tested locally with a modified AzureBlobComputeLogManager
  • TODO:
  • add automated tests
  • test with local host cloud

Changelog

Insert changelog entry or delete this section.

Copy link
Contributor Author

mlarose commented Dec 26, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@mlarose mlarose changed the title [computelogmanager] add fields to pass uri, path or shell cmd RFC - [computelogmanager] add fields to pass uri, path or shell cmd Dec 26, 2024
@mlarose mlarose marked this pull request as ready for review December 26, 2024 16:14
external_stdout_url=log_context.external_stdout_url,
external_stderr_url=log_context.external_stderr_url,
stdout_shell_cmd=log_context.stdout_shell_cmd,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

is adding fields to a LOGS_CAPTURED event payload problematic?

{externalUrl}
</a>
<Icon name="open_in_new" color={Colors.tooltipText()} size={20} style={{marginTop: 2}} />
{externalUrl ? (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this will definitely need css+html rework, i was just passing information and making the click to copy work.

when thinking about this ui, should we provide even more information, such as additional text about to use the shell command (ie, requiring a preconfigured azure cli, for example) ? I stopped short of this because I was already concerned about increasing the event size, but maybe I could add a 'log type' field that the UI could use to render that additional information without producing it from the ComputeLogManager

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's reasonable to have a log_type field or something like that, that the UI could use rather than put that information in the event body itself.

Copy link

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-qhuups8a8-elementl.vercel.app
https://mlarose-azure-blob-compute-log-manager-uri.core-storybook.dagster-docs.io

Built with commit ce0b204.
This pull request is being automatically deployed with vercel-action

@dpeng817 dpeng817 requested a review from prha December 27, 2024 18:26
Copy link
Contributor

@dpeng817 dpeng817 left a comment

Choose a reason for hiding this comment

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

The broad idea is likely reasonable but I think this PR's scope is too broad to be able to talk about coherently (since as you note, there are both storage considerations and UI considerations to be taken here, which will involve two different audiences likely).

Ideally, could we split this PR into a backend and a frontend section? So that we can have that discussion regarding storage implications, and then upstream talk about UI.

A few general things:

  • Would like to see coverage in the integration tests
  • When dealing with full-stack features like this we typically split across backend + frontend - I think in this case it's warranted, and shouldn't be too hard to do given that this is all purely additive? So ideally I'd like the backend and frontend pieces here to be two different PRs
  • Would like to see the UI

@ion-elgreco
Copy link
Contributor

Maybe I've misremembered but I never encountered not being able to download the logs or access them in Azure blob with the direct link🤔

@mlarose
Copy link
Contributor Author

mlarose commented Dec 28, 2024

Maybe I've misremembered but I never encountered not being able to download the logs or access them in Azure blob with the direct link🤔

Good point, but that's a specific to Dagster+ context, in which customers often have a compliance requirements to not ship logs to us.

If the storage account/container is private, the direct url we can generate is not usable (error page). In its current state, the users has to look at the url and manually navigate through the Azure portal to download the logs, which is not a very friendly user experience.
Also, using Shared Access Signature generated urls is not a viable option since it's giving us access to the logs.

@mlarose
Copy link
Contributor Author

mlarose commented Dec 28, 2024

The broad idea is likely reasonable but I think this PR's scope is too broad to be able to talk about coherently (since as you note, there are both storage considerations and UI considerations to be taken here, which will involve two different audiences likely).

Ideally, could we split this PR into a backend and a frontend section? So that we can have that discussion regarding storage implications, and then upstream talk about UI.

A few general things:

  • Would like to see coverage in the integration tests
  • When dealing with full-stack features like this we typically split across backend + frontend - I think in this case it's warranted, and shouldn't be too hard to do given that this is all purely additive? So ideally I'd like the backend and frontend pieces here to be two different PRs
  • Would like to see the UI

Fair points, I meant to get early directional feedback before going too far in a given direction. I will open a PR stack and separate those. As for the current state of the UI: it's not pretty - i hoped to discuss the content AND perhaps gets recommendations of what components/style to use from the frontend folks.

@dpeng817
Copy link
Contributor

Makes sense. I think it's fine now that I understand the intent @mlarose

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