Skip to content

Support default values for Secrets even if the action context is provided #96

@fabioz

Description

@fabioz

What is wrong

See: https://sema4ai.slack.com/archives/C0107FK9JR2/p1724759641973369 for details.

Issue: SEMA4AI-VSCODE-X-ACTION-CONTEXT is set from VSCode in any call now (even if there's no OAuth2 info to be passed) and when that's set it'll try to get all the secrets/oauth2 secrets from the context, so, the default values will never be picked up when running from VSCode.

This happens because in sema4ai.actions it doesn't eagerly load the secrets to check if it's valid and just considers that if an action context is available it should always use it (and in this case it turns out that it's invalid).

As a note, the workaround is setting the actual secrets in the devdata/<action_name>.json when running from VSCode (so, not a complete showstopper, but a bit annoying).

System info

Windows, sema4ai-actions 0.10.0

Example script

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions