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

Global credentials #803

Merged
merged 5 commits into from
Oct 22, 2024
Merged

Global credentials #803

merged 5 commits into from
Oct 22, 2024

Conversation

josephjclark
Copy link
Collaborator

Short Description

This PR adds the capability for what I'm calling "global credentials" in the runtime.

What that means is you can specify a credential on root of the workflow JSON, and it'll automatically be grafted into every step in state.configuration.

This feels like a logical and intuitive feature - but it's also a great use-case for collections. It provides a really neat mechanism for the worker to add system-level credentials.

I mean the alternative is to support credentials as an array, which is sort of covered in #802. But this is gnarly change and too big for what I was looking for with collections.

Fixes #

Implementation Details

If we detect possible use of the collections API in job code (literally just the string collections.), the worker create a global credential on the execution plan, adding collections_token and collections_endpoint. The endpoint is set to the lightning base URL used by the worker.

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

@josephjclark josephjclark marked this pull request as ready for review October 22, 2024 16:20
@josephjclark josephjclark changed the base branch from main to release/collections October 22, 2024 16:20
@josephjclark josephjclark mentioned this pull request Oct 22, 2024
@josephjclark josephjclark merged commit 5b2b1f4 into release/collections Oct 22, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant