Open baptman21 opened 4 months ago
Hi @baptman21,
Thank you for your interest in contributing to this project. I am going to review this PR next week and come back to you with my comments.
Thank you.
Hi @baptman21,
Thank you again for your interest in contributing to this project.
There are a few things that we need to work on here and I would be happy to assist you with them. Please let me know if you prefer to get a full list or we can go step by step.
To set the right expectation, we won't be able to include your changes in the nearest release since it will happen soon and we have already settled with the list of the changes that will be included in it.
We can start with Workspace CR validation. It aims to catch possible mistakes in the custom resources. Here are two that we can begin with:
TriggerPatterns
or TriggerPrefixes
is allowed since they would conflict with each other.TriggerPrefixes
requires non-empty WorkingDirectory
.Please, update unit tests for validations that you will add. You should be able to run them without accessing TFC. Here you can read how to do that.
Please, let me know if you need assistance.
Thanks!
Thanks for the update. I wasn't sure whether we needed to check here the validity of the settings or let the TF cloud API throw the error. I will make the changes as you requested.
Hello @arybolovlev,
I added the validation for those 3 cases:
TriggerPatterns
or TriggerPrefixes
can be definedTriggerPrefixes
required non-empty WorkingDirectory
TriggerPatterns
or TriggerPrefixes
require FileTriggerEnabled
set to trueThe last one is not a specification of the API but rather a way to avoid mistakes like forgetting to enable the FileTriggerEnabled
but defining the patterns, what do you think ?
Let me know if there are any other changes to make.
Hi @baptman21,
I want to let you know that I remember about this PR and will come back once we cut a new release. Thank you for your patience and great job!
Description
Add the fields
FileTriggersEnabled
,TriggerPatterns
andTriggerPrefixes
to the Workspace CRD to allow the user to manage those fields.The fields are already present in the
go-tfe
package but are currently not editable from the CRD.Usage Example
References
Community Note