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: move undeclared vars to preconditions in Taskfile.yaml for impro… #6501

Merged

Conversation

osnabrugge
Copy link
Sponsor Contributor

As you know, our infrastructure is very similar, so it's been a little too convenient to leverage your hard work. As solid as your code is, unannounced and/or breaking changes come like Murphy's law! Your recent feature to support multiple clusters came right during a rebuild 😅

Although it is a minor contribution, at least it is something. Moving these undeclared vars into preconditions revealed what changed/broke right away. Hopefully it might help others not to spend countless hours spinning up containers to re-run those task files.

This pull request is a hotfix for the .taskfiles directory, specifically it provides higher reliability and an improved debugging experience with human readable error messages. Main task changes:

  • .taskfiles/ExternalSecrets/Taskfile.yaml: Removed the cluster variable from the ExternalSecrets task and added a precondition to check if the cluster argument is required. [1] [2]
  • .taskfiles/VolSync/Taskfile.yaml: Removed the cluster variable from the VolSync task and added preconditions to check if the cluster argument is required. [1] [2] [3] [4] [5]
  • .taskfiles/Flux/Taskfile.yaml: Removed the cluster variable from the vars section of the Flux task. [1] [2]
  • .taskfiles/Kubernetes/Taskfile.yaml: Removed the cluster variable from the vars section of the Kubernetes task.
  • .taskfiles/Ansible/Taskfile.yaml: Added preconditions to the Ansible task to check if the cluster and playbook arguments are required.

@onedr0p
Copy link
Owner

onedr0p commented Dec 5, 2023

Woah, thanks for the changes. This looks great ❤️

@onedr0p onedr0p merged commit 148c9b3 into onedr0p:main Dec 5, 2023
1 check passed
@onedr0p
Copy link
Owner

onedr0p commented Dec 5, 2023

I just made a few changes post merge: e409cc4

I didn't want to bore you with styling changes so I did it afterwords :)

@osnabrugge
Copy link
Sponsor Contributor Author

Woah, thanks for the changes. This looks great ❤️

Thank you for the kind words! In all honesty, it was a little anxiety inducing to submit a code change PR. I might just be motivated to work on some ideas once my cluster restore is finally done :)

I just made a few changes post merge: e409cc4

I didn't want to bore you with styling changes so I did it afterwords :)

Never boring, I am still learning. You do realize that I am now going to thoroughly review? :)

p.s. did you figure out a work around for this? Environment variables from shell takes precedence over task file definition

@onedr0p
Copy link
Owner

onedr0p commented Dec 7, 2023

p.s. did you figure out a work around for this? Environment variables from shell takes precedence over task file definition

Nope, looks like I'm going to have to keep using --context for now.

@osnabrugge osnabrugge deleted the hotfix/multiple-cluster-support-0.2 branch December 8, 2023 16:09
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.

2 participants