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

Improve local backend detection #4006

Merged
merged 4 commits into from
Aug 7, 2024
Merged

Conversation

zc-devs
Copy link
Contributor

@zc-devs zc-devs commented Aug 5, 2024

Automatically detect Local backend only if Agent is NOT running in container.
Closes #3996.

@qwerty287 qwerty287 added breaking will break existing installations if no manual action happens backend/local labels Aug 6, 2024
@qwerty287 qwerty287 added this to the 3.0.0 milestone Aug 6, 2024
@qwerty287
Copy link
Contributor

This actually makes it impossible to use the local backend in containers. Maybe the better solution is to just drop the auto-detect option and set docker as default value?

@zc-devs
Copy link
Contributor Author

zc-devs commented Aug 6, 2024

Maybe the better solution is to just drop the auto-detect option and set docker as default value?

What's about entirely dropping default and auto-detect option?

@qwerty287
Copy link
Contributor

I'd still set a default as I think most users use the docker backend. If docker is not available it will fail anyways.

@6543
Copy link
Member

6543 commented Aug 7, 2024

This actually makes it impossible to use the local backend in containers. Maybe the better solution is to just drop the auto-detect option and set docker as default value?

oh right ... let me fix it

@6543 6543 enabled auto-merge (squash) August 7, 2024 09:20
@zc-devs
Copy link
Contributor Author

zc-devs commented Aug 7, 2024

backend == "local" || !inContainer

That is exactly what I've just wanted to write! :)

@6543 6543 merged commit 6c9469f into woodpecker-ci:main Aug 7, 2024
7 checks passed
@woodpecker-bot woodpecker-bot mentioned this pull request Aug 7, 2024
1 task
@zc-devs zc-devs deleted the 3996-local-fallback branch August 7, 2024 10:15
@qwerty287
Copy link
Contributor

This breaks it if you use command line args instead of env vars. Please change this to use the CLI context (similar to docker)

6543 added a commit to 6543-forks/woodpecker that referenced this pull request Sep 5, 2024
Co-authored-by: 6543 <6543@obermui.de>
@woodpecker-bot woodpecker-bot mentioned this pull request Sep 8, 2024
1 task
@anbraten anbraten changed the title Improved Local backend detection Improve local backend detection Sep 27, 2024
@woodpecker-bot woodpecker-bot mentioned this pull request Dec 14, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend/local breaking will break existing installations if no manual action happens
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable auto-fallback to Local backend
3 participants