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

start-proxy: Skip proxy setup if no credentials are available #2724

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

marcogario
Copy link
Contributor

@marcogario marcogario commented Jan 24, 2025

Setting up the proxy can lead to some failures as we need to download and unpack the proxy and start it. To avoid the unnecessary risk and time, we avoid setting it up if no credential was provided.

We cannot do this directly in the workflow file for two reasons. 1) you cannot write a conditional on a secret and 2) we do filter the content of the secret by ecosystem, so we need a bit more logic to do this correctly.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@marcogario marcogario changed the base branch from main to marcogario/start-proxy_tests January 24, 2025 21:33
@marcogario marcogario force-pushed the marcogario/skip_proxy branch from 434735a to f057e79 Compare January 24, 2025 21:45
@marcogario marcogario force-pushed the marcogario/skip_proxy branch from f057e79 to 7d7758b Compare January 24, 2025 21:46
@marcogario marcogario marked this pull request as ready for review January 24, 2025 21:47
@Copilot Copilot bot review requested due to automatic review settings January 24, 2025 21:47
@marcogario marcogario requested a review from a team as a code owner January 24, 2025 21:47

Choose a reason for hiding this comment

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

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

Comments suppressed due to low confidence (1)

src/start-proxy-action.ts:104

  • The new condition for skipping proxy setup may lack test coverage. Consider adding a test to confirm the function returns early when no credentials are found.
if (credentials.length === 0) {

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

aeisenberg
aeisenberg previously approved these changes Jan 24, 2025
Base automatically changed from marcogario/start-proxy_tests to main January 27, 2025 17:26
@aeisenberg aeisenberg dismissed their stale review January 27, 2025 17:26

The base branch was changed.

@marcogario marcogario requested a review from aeisenberg January 28, 2025 19:47
@marcogario marcogario force-pushed the marcogario/skip_proxy branch from dfe3919 to 76622e7 Compare January 28, 2025 19:49
@marcogario marcogario merged commit 54b1c84 into main Jan 28, 2025
266 checks passed
@marcogario marcogario deleted the marcogario/skip_proxy branch January 28, 2025 21:15
@github-actions github-actions bot mentioned this pull request Jan 29, 2025
8 tasks
@github-actions github-actions bot mentioned this pull request Jan 29, 2025
8 tasks
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