Skip to content

fix(autodiscovery/updatecli): correctly use relative file path - #9759

Merged
olblak merged 3 commits into
updatecli:mainfrom
olblak:fix/file/test
Aug 2, 2026
Merged

olblak merged 3 commits into
updatecli:mainfrom
olblak:fix/file/test

Conversation

@olblak

@olblak olblak commented Jul 31, 2026 •

Copy link
Copy Markdown
Member

Test

To test this pull request, you can run the following commands:

cd pkg/plugins/resources/file/
go test

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.

Tradeoff

Potential improvement

Signed-off-by: Olblak <me@olblak.com>
@olblak
olblak enabled auto-merge (squash) July 31, 2026 07:53
@olblak olblak changed the title fix: file UT fix: file plugin unit test Jul 31, 2026
@olblak olblak added the skip-changelog Used by release-drafter to ignore pullrequest in changelog label Jul 31, 2026
@olblak

olblak commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

Next error can be reproduced running

./bin/updatecli diff --config e2e/updatecli.d/success.d/autodiscovery/updatecli/git.yaml

Which return

ERROR: something went wrong in "target#compose" :
	init files: absolute path "/tmp/updatecli/github_com_updatecli_website_git/updatecli-compose.yaml" is not allowed: files must stay within the working directory "/tmp/updatecli/github_com_updatecli_website_git"

@olblak olblak changed the title fix: file plugin unit test fix(autodiscovery/updatecli): correctly use relative file path Jul 31, 2026
@olblak olblak added bug Something isn't working and removed skip-changelog Used by release-drafter to ignore pullrequest in changelog labels Jul 31, 2026
Signed-off-by: Olblak <me@olblak.com>
@olblak

olblak commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

I can't reproduce the gitea issue locally

 --- FAIL: TestSource (37.60s)
    --- FAIL: TestSource/repository_should_exist_with_latest_branch_v3 (37.00s)
        source_test.go:81: 
            	Error Trace:	/home/runner/work/updatecli/updatecli/pkg/plugins/resources/gitea/branch/source_test.go:81
            	Error:      	Received unexpected error:
            	            	searching gitea branches: Get "https://codeberg.org/api/v1/repos/updatecli/updatecli-action/branches?limit=30": context deadline exceeded
            	Test:       	TestSource/repository_should_exist_with_latest_branch_v3

I am suspecting an issue on the github runner

@olblak
olblak merged commit c4a0385 into updatecli:main Aug 2, 2026
8 of 13 checks passed
@olblak
olblak deleted the fix/file/test branch August 2, 2026 11:16
olblak added a commit that referenced this pull request Aug 26, 2026
…fests (#10109)

* fix(autodiscovery/helmfile): use relative file path in generated manifests

The File field in the generated condition and target was set to
foundHelmfile (absolute path within the SCM clone) instead of
relativeFoundChartFile. This caused every helmfile-derived pipeline
to fail at the condition step with:

  init yaml files: absolute path "..." is not allowed:
  files must stay within the working directory "..."

As a result the target was always skipped, silently preventing any
helmfile release from being updated.

ManifestName and ConditionName already used relativeFoundChartFile
correctly — File was the only field that did not.

Fixes #10108

Related to #9759, which fixed the identical pattern in the updatecli
autodiscovery plugin.

* test(autodiscovery/helmfile): fix expected file paths after relative path fix

Update test expectations to match the new behavior introduced in
aaba087: file paths in generated manifests are now relative to rootDir,
not to the test's working directory.

---------

Co-authored-by: Olivier Vernin <olivier@vernin.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant