-
Notifications
You must be signed in to change notification settings - Fork 10
feat(ODC-466): add status variables to GitSource API type #9
feat(ODC-466): add status variables to GitSource API type #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code wise looks good overall (besides const & var). But the generated code needs some fix.
@@ -25,94 +25,17 @@ import ( | |||
) | |||
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. | |||
func (in *Component) DeepCopyInto(out *Component) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are removing deep copy for Component API? Make sure you have the latest master in your local repo when regenerating deep copy. It looks like it's missing Component API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because I generated the code within the git-service
repository and I didn't copy the component_types.go
there.
The user experience is terrible - copy from types from api
repo to operator
repo to generate code that is needed in git-service
repo. So then copy the generated code to git-service
and every time when any type is changed copy it back to operator
repo, regenerate and copy back... and then, finally, copy the resulting code to api
repo...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... It's not very dev friendly flow :) Maybe we should add some make targets to help with some tasks (like copying stuff around and cleaning it up with package replacement). Or another option would be just to merge everything to one mono repo ;)
But for now we just need to make sure we run make generate
in devconsole-api repo after all these dance with moving apis.
"github.com/redhat-developer/devconsole-api/pkg/apis/devconsole/v1alpha1.GitSource": schema_pkg_apis_devconsole_v1alpha1_GitSource(ref), | ||
"github.com/redhat-developer/devconsole-api/pkg/apis/devconsole/v1alpha1.GitSourceSpec": schema_pkg_apis_devconsole_v1alpha1_GitSourceSpec(ref), | ||
"github.com/redhat-developer/devconsole-api/pkg/apis/devconsole/v1alpha1.GitSourceStatus": schema_pkg_apis_devconsole_v1alpha1_GitSourceStatus(ref), | ||
"github.com/redhat-developer/git-service/pkg/apis/devconsole/v1alpha1.GitSource": schema_pkg_apis_devconsole_v1alpha1_GitSource(ref), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I regenerated the API within the devconsole-operator
repo, then this change disappeared. In addition, the component API is missing there as well.
Btw, @sbose78 why is the component_types.go
(and the whole apis directory) present in the devconsole-operator repo at all. And with different content than in the api
repo? It brings to the whole generate/copy/paste flow additional complications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be moved out in the next couple of days :)
Co-Authored-By: MatousJobanek <matousjobanek@gmail.com>
Co-Authored-By: MatousJobanek <matousjobanek@gmail.com>
Co-Authored-By: MatousJobanek <matousjobanek@gmail.com>
Co-Authored-By: MatousJobanek <matousjobanek@gmail.com>
Adds status variables to GitSource API type to be able to keep information about the state fo the CR and if the last connection attempt was successful or not.
The
initializing
is when the GitSource was tested for the connectivity but the user hasn't finished the UI wizard of importing/creating the GitSource. Old GitSources with this state are ready to be garbage collected.Ready
are those whose creation was completed