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 updatecli values filename, move repo info to configs #52

Merged
merged 1 commit into from
May 5, 2023

Conversation

matttrach
Copy link
Contributor

Updatecli is failing because the values.yaml is named 'values.yml', this corrects that and moves the repo data from the values file to the updatecli config.
This addresses k3s-io/k3s#7363

I tested this locally by changing the owner and branch in the updatecli config to mine, adding the github env variables, and running the updatecli diff tool:

Diff Output
updatecli diff -v updatecli/values.yaml -c updatecli/updatecli.d/updatecli.yml


+++++++++++
+ PREPARE +
+++++++++++

Loading Pipeline "updatecli/updatecli.d/updatecli.yml"

SCM repository retrieved: 2


++++++++++++++++++
+ AUTO DISCOVERY +
++++++++++++++++++



++++++++++++
+ PIPELINE +
++++++++++++



################################################################
# INTRODUCE UPDATECLI TO REPO AND VALIDATE BASIC FUNCTIONALITY #
################################################################


SOURCES
=======

goTag
-----
Searching for version matching pattern "^go1\\.20\\.2$"
✔ Git tag "go1.20.2" found matching pattern "^go1\\.20\\.2$"


CONDITIONS:
===========

testVersionShouldMatchGoTag
---------------------------
✗ Key "version", in YAML file "updatecli/validate.yml", is incorrectly set to go1.20.1 and should be "go1.20.2"


TARGETS
========

updateValidateFile
------------------

**Dry Run enabled**

⚠ Key 'version', from file '/tmp/nix-shell.Loa5SD/updatecli/github/matttrach/klipper-lb/updatecli/validate.yml', was updated from 'go1.20.1' to 'go1.20.2'


ACTIONS
========

[Dry Run] An action of kind "github/pullrequest" is expected.

=============================

REPORTS:


⚠ Introduce updatecli to repo and validate basic functionality:
        Source:
                ✔ [goTag] Get Go 1.20.2 tag (kind: gittag)
        Condition:
                ✔ [testVersionShouldMatchGoTag] test version should match go tag (kind: yaml)
        Target:
                ⚠ [updateValidateFile] Update the version in the validate file (kind: yaml)


Run Summary
===========
Pipeline(s) run:
  * Changed:    1
  * Failed:     0
  * Skipped:    0
  * Succeeded:  0
  * Total:      1

Signed-off-by: Matt Trachier <matttrach@gmail.com>
@matttrach matttrach requested review from macedogm and a team May 4, 2023 21:29
@matttrach matttrach self-assigned this May 4, 2023
Copy link
Member

@macedogm macedogm left a comment

Choose a reason for hiding this comment

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

Approved.

Just a comment, isn't better to actually keep updatecli/values.yml with the .yml extension and change it only in the workflow file?

run: "updatecli apply --clean --config ./updatecli/updatecli.d/ --values ./updatecli/values.yaml"

From: --values ./updatecli/values.yaml"
To: --values ./updatecli/values.yml"

This way all Updatecli files will have the same consistent extension of .yml.

@matttrach
Copy link
Contributor Author

I wanna say that was my first thought as well, but it kinda seems like the common choice for most k3s repos is to use the full extension name, with the exception of workflows and updatecli configs. Overall I decided that this way seemed more natural, but honestly it could go either way. I just want to be consistent (across repos) with whatever choice we make, and right now that is 'values.yaml' (there are now about 30 repos set up this way). This seems like a good topic for an ADR.

@matttrach matttrach merged commit 4965354 into k3s-io:master May 5, 2023
@macedogm
Copy link
Member

macedogm commented May 5, 2023

Thanks for the explanation, Matt. Your rationale makes sense.

This seems like a good topic for an ADR.

Agree.

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.

4 participants