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: Improve error message when missing required fields in resource manifest #5578

Merged
merged 2 commits into from
Apr 6, 2021
Merged

fix: Improve error message when missing required fields in resource manifest #5578

merged 2 commits into from
Apr 6, 2021

Conversation

terrytangyuan
Copy link
Member

See #5566.

Signed-off-by: terrytangyuan [email protected]

Checklist:

@terrytangyuan
Copy link
Member Author

Unit tests failed because ExecResource() requires exec.Command("kubectl ..."). Should I move these to e2e tests or should I mock exec.Command? Any preferred approach here?

@terrytangyuan terrytangyuan marked this pull request as draft April 2, 2021 14:45
@terrytangyuan
Copy link
Member Author

terrytangyuan commented Apr 2, 2021

@alexec Any thoughts on testing strategy here? This change is simple so I am not sure if we should introduce a new set of tests in this PR. On the other hand, we currently lack of tests on executor/resources (similarly in #5180) so it might be good to start planning on what the best way is to cover those.

Signed-off-by: terrytangyuan <[email protected]>
@terrytangyuan
Copy link
Member Author

I removed the additional tests for now so this PR simply improves the error message. Adding more tests around the executor/resource templates would be separate work.

@terrytangyuan terrytangyuan marked this pull request as ready for review April 6, 2021 14:57
@codecov
Copy link

codecov bot commented Apr 6, 2021

Codecov Report

Merging #5578 (b90ae08) into master (2b3655e) will increase coverage by 0.03%.
The diff coverage is 23.80%.

❗ Current head b90ae08 differs from pull request most recent head 5f7fb29. Consider uploading reports for the commit 5f7fb29 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5578      +/-   ##
==========================================
+ Coverage   46.94%   46.98%   +0.03%     
==========================================
  Files         240      240              
  Lines       15016    15010       -6     
==========================================
+ Hits         7050     7053       +3     
+ Misses       7070     7060      -10     
- Partials      896      897       +1     
Impacted Files Coverage Δ
cmd/argo/commands/server.go 34.51% <0.00%> (ø)
persist/sqldb/workflow_archive.go 0.00% <0.00%> (ø)
workflow/executor/resource.go 22.94% <0.00%> (-0.70%) ⬇️
workflow/controller/operator.go 70.68% <100.00%> (-0.29%) ⬇️
pkg/apiclient/http1/event-watch-client.go 0.00% <0.00%> (ø)
...kg/apiclient/http1/cron-workflow-service-client.go 0.00% <0.00%> (ø)
...piclient/argo-kube-cron-workflow-service-client.go 0.00% <0.00%> (ø)
...lient/error-translating-workflow-service-client.go 0.00% <0.00%> (ø)
...ient/argo-kube-workflow-template-service-client.go 0.00% <0.00%> (ø)
... and 5 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 2b3655e...5f7fb29. Read the comment docs.

@alexec alexec merged commit 2651bd6 into argoproj:master Apr 6, 2021
@alexec alexec added this to the v3.1 milestone Apr 6, 2021
@terrytangyuan terrytangyuan deleted the improve-resource-get-msg branch April 6, 2021 16:17
@simster7 simster7 mentioned this pull request Apr 19, 2021
50 tasks
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.

None yet

2 participants