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

fix: fallback to updatecli.yaml or updatecli.d if no manifest specified #1695

Merged
merged 3 commits into from
Oct 15, 2023

Conversation

olblak
Copy link
Member

@olblak olblak commented Oct 13, 2023

Fix #1694

Test

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

I build the binary running go build -o bin/updatecli . then I executed from a directory:

  • with a file named updatecli.yaml then it tried to load it
  • with a directory named updatecli.d then it tried to load manifests from it
  • with both a file named updatecli.yaml and updatecli.d then it tried to load both manifests
  • without a file named updatecli.yaml or updatecli.d then it tried to load autodiscovery

Additional Information

Tradeoff

Potential improvement

…est specified

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added the bug Something isn't working label Oct 13, 2023
@olblak olblak modified the milestone: 0.64.0 Oct 13, 2023
mcwarman
mcwarman previously approved these changes Oct 14, 2023
Copy link
Member

@mcwarman mcwarman left a comment

Choose a reason for hiding this comment

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

Tested the 4 scenarios working as expected.

Also retested project where found #1694 and working as expected.

pkg/core/engine/configuration.go Outdated Show resolved Hide resolved
pkg/core/engine/configuration.go Outdated Show resolved Hide resolved
@olblak
Copy link
Member Author

olblak commented Oct 14, 2023

I reorganize a bit the code as I find it clearer now.
After additional thought, the constant should never have been in a different package, I lost track of that.

@olblak olblak merged commit 5bf98b4 into updatecli:main Oct 15, 2023
6 checks passed
@mcwarman
Copy link
Member

The fact it was there and not reachable makes more sense than it getting removed.

I found the constants when I was first looking into the bug.

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.

Config not being picked up in updatecli.d or updatecli.yaml
2 participants