Skip to content

Jobs submition with key#23

Open
mgorkii-nlplogix wants to merge 5 commits into
mainfrom
jobs-submition-with-key
Open

Jobs submition with key#23
mgorkii-nlplogix wants to merge 5 commits into
mainfrom
jobs-submition-with-key

Conversation

@mgorkii-nlplogix
Copy link
Copy Markdown
Contributor

This pull request introduces minor improvements and bug fixes related to authentication and API entitlement checks, as well as updates to how API keys are handled when listing container groups. The changes enhance error logging, improve API key usage flexibility, and update the package version.

Authentication and API key handling:

  • Updated listContainerGroups to accept an optional apiKey parameter, allowing dynamic selection of the API key instead of always using the environment variable. This change is reflected in both the function signature and its usage in middleware.ts.

Error handling and logging:

  • Improved entitlement check logic by replacing a thrown error with a console log when an organization is not entitled to use the Kelpie API, allowing for better visibility without interrupting execution.

Version update:

  • Bumped the package version from 0.7.0 to 0.7.1 in package.json to reflect the new changes.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates authentication-related flows to support passing a request-provided Salad API key through to Salad API calls (instead of always using env.SALAD_API_KEY), adjusts entitlement handling, and bumps the package version.

Changes:

  • Add an optional apiKey parameter to listContainerGroups and use it for the Salad-Api-Key header.
  • Update validateAuth to call listContainerGroups with the inbound Salad API key and adjust org resolution behavior.
  • Change entitlement handling in validateSaladApiKey from throwing to logging; bump package.json version to 0.7.1.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/utils/salad.ts Allow listContainerGroups to use a caller-supplied Salad API key for Salad requests.
src/middleware.ts Pass request Salad API key into project validation; adjust entitlement behavior and org resolution logic.
package.json Version bump to 0.7.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/middleware.ts
Comment thread package.json
Comment thread src/middleware.ts
@SaladTechnologies SaladTechnologies deleted a comment from Copilot AI Mar 4, 2026
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.

2 participants