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

Enhance blueprint validator to check for duplicate phase names #1468

Merged
merged 4 commits into from
Jun 11, 2022

Conversation

viveksinghggits
Copy link
Contributor

Change Overview

Fixes #1463

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E
kanister/pkg/blueprint/validate (bp-name-validate*) » go test
Failed the 'validation of phase 00 in action backup' check.. ❌
Passed the 'validation of phase 10 in action backup' check.. ✅
Passed the 'validation of phase 11 in action backup' check.. ✅
Failed the 'validation of action backup' check.. ❌
Passed the 'validation of phase 30 in action backup' check.. ✅
Failed the 'validation of phase 40 in action backup' check.. ❌
Failed the 'validation of phase 51 in action backup' check.. ❌
Failed the 'validation of phase 61 in action backup' check.. ❌
Passed the 'validation of phase 71 in action backup' check.. ✅
Passed the 'validation of phase 70 in action backup' check.. ✅
{"FallbackVersion":"v0.0.0","File":"pkg/phase.go","Function":"PrepareData","Line":143,"PreferredVersion":"v0.0.1","level":"info","msg":"Falling back to default version of the function","time":"2022-06-09T16:57:40.823230059+02:00"}
Passed the 'validation of phase 00 in action backup' check.. ✅
Passed the 'validation of phase 01 in action backup' check.. ✅
{"FallbackVersion":"v0.0.0","File":"pkg/phase.go","Function":"PrepareData","Line":143,"PreferredVersion":"v0.0.1","level":"info","msg":"Falling back to default version of the function","time":"2022-06-09T16:57:40.823277817+02:00"}
Failed the 'validation of phase 10 in action backup' check.. ❌
Passed the 'validation of phase 20 in action backup' check.. ✅
Failed the 'validation of phase 21 in action backup' check.. ❌
{"FallbackVersion":"v0.0.0","File":"pkg/phase.go","Function":"PrepareData","Line":143,"PreferredVersion":"v0.0.1","level":"info","msg":"Falling back to default version of the function","time":"2022-06-09T16:57:40.823315425+02:00"}
{"FallbackVersion":"v0.0.0","File":"pkg/phase.go","Function":"PrepareData","Line":143,"PreferredVersion":"v0.0.1","level":"info","msg":"Falling back to default version of the function","time":"2022-06-09T16:57:40.823326721+02:00"}
Passed the 'validation of phase 30 in action backup' check.. ✅
Passed the 'validation of phase 31 in action backup' check.. ✅
OK: 3 passed
PASS
ok  	github.com/kanisterio/kanister/pkg/blueprint/validate	0.020s

@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2022

Thanks for submitting this pull request 🎉. The team will review it soon and get back to you.

If you haven't already, please take a moment to review our project contributing guideline and Code of Conduct document.

@infraq infraq added this to In Progress in Kanister Jun 9, 2022
Copy link
Contributor

@ihcsim ihcsim left a comment

Choose a reason for hiding this comment

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

LGTM 👍.

pkg/blueprint/validate/validate.go Outdated Show resolved Hide resolved
Kanister automation moved this from In Progress to Reviewer approved Jun 10, 2022
@mergify mergify bot merged commit 57009e2 into master Jun 11, 2022
Kanister automation moved this from Reviewer approved to Done Jun 11, 2022
@mergify mergify bot deleted the bp-name-validate branch June 11, 2022 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging this pull request may close these issues.

Phases' names should also be checked while validating blueprint
2 participants