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

Add WorkflowContext methods to Workflow CRD #600

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

micahhausler
Copy link
Contributor

Signed-off-by: Micah Hausler [email protected]

Description

  • Add WorkflowContext methods to Workflow type
  • Add WorkflowContext conversion func
  • Relocate FrozenTime for usage outside /pkg

Why is this needed

This creates reusable logic for the gRPC server and other K8s client code (like boots).

Fixes: #

How Has This Been Tested?

Added unit tests for new methods and functions

How are existing users impacted? What migration steps/scripts do we need?

N/A

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

@micahhausler micahhausler requested review from displague and mmlb March 22, 2022 21:18
@micahhausler micahhausler force-pushed the feature/workflow-methods branch from fe5afaf to 87ffc62 Compare March 22, 2022 21:20
@codecov
Copy link

codecov bot commented Mar 22, 2022

Codecov Report

Merging #600 (08991a2) into main (07cf28c) will decrease coverage by 1.60%.
The diff coverage is 77.14%.

❗ Current head 08991a2 differs from pull request most recent head 9485aef. Consider uploading reports for the commit 9485aef to get more accurate results

@@            Coverage Diff             @@
##             main     #600      +/-   ##
==========================================
- Coverage   45.59%   43.98%   -1.61%     
==========================================
  Files          53       51       -2     
  Lines        3143     3167      +24     
==========================================
- Hits         1433     1393      -40     
- Misses       1624     1689      +65     
+ Partials       86       85       -1     
Impacted Files Coverage Δ
pkg/apis/core/v1alpha1/workflow_types.go 100.00% <ø> (ø)
pkg/apis/core/v1alpha1/workflow_methods.go 76.27% <70.83%> (-23.73%) ⬇️
pkg/controllers/workflow/controller.go 73.68% <75.00%> (-3.11%) ⬇️
pkg/convert/workflow.go 100.00% <100.00%> (ø)
cmd/tink-worker/worker/container_manager.go
pkg/apis/core/v1alpha1/template_types.go
cmd/tink-worker/worker/worker.go
cmd/tink-worker/worker/log_capturer.go
cmd/tink-worker/worker/registry.go
... and 3 more

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 07cf28c...9485aef. Read the comment docs.

@micahhausler micahhausler force-pushed the feature/workflow-methods branch 4 times, most recently from e7c107e to 24e36a9 Compare March 30, 2022 15:29
@mmlb
Copy link
Contributor

mmlb commented Apr 4, 2022

I love the stuff in workflow_methods.go. I've been growing increasingly more annoyed at slinging pb types around instead of proper go types and this file makes it more obvious why. Going to create an issue for dropping that and maybe lifting some of the stuff from workflow_methods.go over and out of just here.

mmlb
mmlb previously approved these changes Apr 4, 2022
* Add WorkflowContext conversion func
* Move FrozenTime to root of module

Signed-off-by: Micah Hausler <[email protected]>
@micahhausler micahhausler force-pushed the feature/workflow-methods branch from 24e36a9 to 9485aef Compare April 4, 2022 21:59
@mmlb mmlb added the ready-to-merge Signal to Mergify to merge the PR. label Apr 4, 2022
@mmlb mmlb removed the request for review from displague April 4, 2022 22:20
@mergify mergify bot merged commit 1d4fd95 into tinkerbell:main Apr 4, 2022
@micahhausler micahhausler deleted the feature/workflow-methods branch April 4, 2022 22:40
@micahhausler micahhausler restored the feature/workflow-methods branch April 4, 2022 22:40
@micahhausler micahhausler deleted the feature/workflow-methods branch April 4, 2022 22:40
@displague displague added this to the 0.7.0 milestone Aug 15, 2022
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.

4 participants