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

Error when template for workflow doesn't exist #631

Merged

Conversation

chrisdoherty4
Copy link
Member

When the template referenced by a workflow doesn't exist we need to
throw an error to trigger requeueing continuously until the template
becomes available. If it doesn't, logging will indicate as much as it
will note the errors.

@@ -36,6 +36,9 @@ func NewController(kubeClient client.Client) *Controller {
// +kubebuilder:rbac:groups=tinkerbell.org,resources=workflows;workflows/status,verbs=get;list;watch;update;patch;delete

func (c *Controller) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error) {
logger := controllerruntime.LoggerFrom(ctx)
logger.Info("Reconciling")
Copy link
Member Author

@chrisdoherty4 chrisdoherty4 Jun 21, 2022

Choose a reason for hiding this comment

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

This adds some useful information about the object under reconciliation. I intend on expanding this throughout the workflow controller.

jacobweinstock
jacobweinstock previously approved these changes Jun 21, 2022
@jacobweinstock jacobweinstock added the ready-to-merge Signal to Mergify to merge the PR. label Jun 21, 2022
When the template referenced by a workflow doesn't exist we need to
throw an error to trigger requeueing continuously until the template
becomes available. If it doesn't, logging will indicate as much as it
will note the errors.

Signed-off-by: Chris Doherty <[email protected]>
@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #631 (0bb94d6) into main (88798fa) will increase coverage by 0.09%.
The diff coverage is 100.00%.

❗ Current head 0bb94d6 differs from pull request most recent head 19b68be. Consider uploading reports for the commit 19b68be to get more accurate results

@@            Coverage Diff             @@
##             main     #631      +/-   ##
==========================================
+ Coverage   44.54%   44.63%   +0.09%     
==========================================
  Files          61       61              
  Lines        3518     3524       +6     
==========================================
+ Hits         1567     1573       +6     
  Misses       1869     1869              
  Partials       82       82              
Impacted Files Coverage Δ
pkg/controllers/workflow/controller.go 76.19% <100.00%> (+2.50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88798fa...19b68be. Read the comment docs.

@mergify mergify bot merged commit fe1eba2 into tinkerbell:main Jun 21, 2022
@displague displague added this to the 0.7.0 milestone Aug 15, 2022
mergify bot added a commit that referenced this pull request Aug 29, 2022
I'm a maintainer of several other services often related to the Kuberenetes back-end/Kubernetes controllers and I'm taking ownership for a lot of release synchronization making it both appropriate and necessary for me to maintain aspects of the Tink repository.

Requirements:

- I have reviewed the [community membership guidelines](https://github.com/tinkerbell/proposals/blob/main/proposals/0024/GOVERNANCE.md)
- I have [enabled 2FA on my GitHub account](https://github.com/settings/security)
- I have subscribed to the [tinkerbell-contributors e-mail list](https://groups.google.com/g/tinkerbell-contributors)
- I am actively contributing to 1 or more Tinkerbell subprojects

Here is a list of non-trival PRs I have been the primary reviewer on:

#596
#628
#614

I have also made a number of code contributions to this repository, here are a few of them:

#638
#631
#626
#622
#612

I have also raised various issues and am driving the releasing across Tinkerbell including in this repository.

Requesting consideration of expedited responsibilities: yes

Sponsors:

- @mmlb (Maintainer)
- @micahhausler (Maintainer)
- @jacobweinstock (Core contributor in other Tinkerbell repositories)
@chrisdoherty4 chrisdoherty4 deleted the fix/workflows-not-reconciling branch May 15, 2023 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Signal to Mergify to merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants