Skip to content

[Feature Request] Helpers to prevent accidental non-passed-through imports #790

@cretz

Description

@cretz

Describe the solution you'd like

Sometimes third party libraries, even passed through ones, import things lazily at runtime which causes them to be imported in the sandbox which users can't see and, if they don't do anything illegal, just cause memory overhead. Add a opt-out-able warning if we see any imports after the workflow file is loaded.

We should also consider a way for people to opt-in to warning if any imports occur that are not passed through. But of course they could then mark the ones that are safe explicitly, e.g. with workflow.unsafe.imports_intentionally_reloaded():.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions