Skip to content

Only try to load .env if it exists#6714

Merged
6543 merged 5 commits into
woodpecker-ci:mainfrom
6543-forks:fix-regression-env
Jun 12, 2026
Merged

Only try to load .env if it exists#6714
6543 merged 5 commits into
woodpecker-ci:mainfrom
6543-forks:fix-regression-env

Conversation

@6543

@6543 6543 commented Jun 9, 2026

Copy link
Copy Markdown
Member

regression of #6707

close #6713

@6543 6543 added the regression fix a bug that was not released yet label Jun 9, 2026
@6543 6543 mentioned this pull request Jun 9, 2026
3 tasks
Comment thread shared/dot_env/dot_env.go Outdated
@6543 6543 added the build_pr_images If set, the CI will build images for this PR and push to Dockerhub label Jun 9, 2026
@woodpecker-bot

woodpecker-bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Surge PR preview deployment was removed

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.76%. Comparing base (31dd64f) to head (4d4696e).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
shared/dot_env/dot_env.go 0.00% 8 Missing ⚠️
pipeline/backend/kubernetes/kubernetes.go 0.00% 2 Missing ⚠️
cmd/agent/main.go 0.00% 1 Missing ⚠️
cmd/cli/main.go 0.00% 1 Missing ⚠️
cmd/server/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6714      +/-   ##
==========================================
+ Coverage   44.75%   44.76%   +0.01%     
==========================================
  Files         436      437       +1     
  Lines       29190    29193       +3     
==========================================
+ Hits        13063    13068       +5     
+ Misses      15023    15021       -2     
  Partials     1104     1104              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@6543 6543 requested a review from a team June 9, 2026 23:49
@qwerty287 qwerty287 changed the title Only try to load .env it it exists Only try to load .env if it exists Jun 10, 2026
@qwerty287

Copy link
Copy Markdown
Contributor

I think there should be a log message if it's not loaded

@6543

6543 commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

at this stage there is no logger setup, and i find it to verbose to print in orod ... debug would be ok ...

eif we let it print it will always look wrong ... i'm aganst it

@qwerty287

Copy link
Copy Markdown
Contributor

What about returning a true/false and logging once the logger is set up?

@6543

6543 commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

I can look into that ... still not sure if it gets into a clean code state

@xoxys

xoxys commented Jun 12, 2026

Copy link
Copy Markdown
Member

Can we improve this later on and merge it as is for now to fix the regression?

@6543 6543 merged commit c776564 into woodpecker-ci:main Jun 12, 2026
9 of 10 checks passed
@6543 6543 deleted the fix-regression-env branch June 12, 2026 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build_pr_images If set, the CI will build images for this PR and push to Dockerhub regression fix a bug that was not released yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NEXT] could not load .env

5 participants