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

Refactoring #27

Merged
merged 15 commits into from
Apr 16, 2019
Merged

Refactoring #27

merged 15 commits into from
Apr 16, 2019

Conversation

unguiculus
Copy link
Member

@unguiculus unguiculus commented Mar 17, 2019

This refactors the code to improve testability and so that it can be better integrated into an upcoming GitHub app.

  • Rename the binary to cr (similar to ct for chart-testing) and update package structure along with that
  • Fix incorrect license headers
  • Change default config file locations (analogous to chart-testing)
  • Refactor index and release creation and introduce new Releaser struct
  • Simplify error handling. In particul, I think we should not try and parse GitHub specific error codes. This doesn't gain us anything. The best we can do is log errors and exit
  • No longer check if a release already exists. Just try and create it which will fail if the release exists. So, the result is basically the same with less code
  • No longer download chart packages for index creation. This is unnecessary and does not scale
  • Remove Chart.yaml from releasse assets. Its unnecessary and make things more complicated
  • Encapsulate GitHub API within package without exposing it
  • Expect all charts to be released in a specific directory removing the recursive option
  • Add unit tests

Fixes: #18

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
@unguiculus
Copy link
Member Author

Added a first round of tests. More to follow...

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
@unguiculus
Copy link
Member Author

Updated PR description. Let's move changelog and packaging to a follow-up PR.

@unguiculus unguiculus marked this pull request as ready for review March 29, 2019 22:57
Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Copy link
Member

@scottrigby scottrigby left a comment

Choose a reason for hiding this comment

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

🤩👏

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
@unguiculus unguiculus merged commit ad61bb2 into helm:master Apr 16, 2019
@unguiculus unguiculus deleted the refactoring branch April 16, 2019 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests
3 participants