-
Notifications
You must be signed in to change notification settings - Fork 23
Introduce support for step-types #33
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
Introduce support for step-types #33
Conversation
b7c57b8
to
d3d2dcf
Compare
Hi @sandrogattuso! I've took a look at your PR and played a little bit with it. For example:
I've verified it on your latest commit. Seems like resource with a single attribute in form of YAML Step spec (which is from Terraform's point of view is just a wall of text) is not enough to properly track resource's lifecycle. |
@vadimgusev-codefresh thanks for the feedback, I think we have 2 options here:
From a user perspective I think the resource with a single attribute has very little use so I would actually go for the second option, but happy to hear your point of view and then I can make the changes accordingly. |
@sandrogattuso I agree with you on all points:
Since versioned implementation effectively supersedes And since this one is much bigger that previous (that broke quite easily), would you mind writing some minimal tests for it? |
2a46758
to
924ad4a
Compare
924ad4a
to
f84ecea
Compare
@vadimgusev-codefresh I've finished the clean up and added some test cases. Let me know if you would like to have further changes |
@sandrogattuso I've checked out your latest changes. Good job on the tests. Also I was not able to break TF state like in previous implementation. My only nitpick is: please clean up old implementation of data source and docs. Otherwise LGTM, will merge after cleanup. |
@vadimgusev-codefresh Removed the doc for the old implementation of resource.
I thought it could be a useful functionality to be able to get the list of versions available, but if you think is redundant or confusing I'll remove it. I've also updated the docs for the second one since the description was not reflecting what the datasource actually does. |
@sandrogattuso cannot we just query a full list of versions with yaml definitions so |
@vadimgusev-codefresh I've pushed a version with the datasource matching the format of the resource. In general, seems a bit more complicated to navigate the structure (added an example in the README). |
@sandrogattuso thanks for your work! LGTM, merging. |
This PR introduces the ability to manage step-types.
@palson-cf I'm not 100% sure this is the best way to handle this type of configuration in particular for the versioning bit.
I've documented some of the limitations in the docs folder, however, here a summary of the main items:
EDIT: added a second type of resource to manage all the versions of a step from a single resource. I had to add some business logic to handle certain behaviours of the API (maybe it's me misinterpreting how it works, appreciate inputs on this)