-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Automatically setting new version when updating dependencies #206
Comments
Hi @fzmoment, glad that you find it great! Right now it's not possible as the wrapper around the REST API does not allow for any string values, only Integers are allowed, thus we cannot just send Fetching the latest version and replacing it when parsing the YAML does work though but it's not the same as it will only update the reference whenever you manually run it and not regard any changes from outside like automatically created/updated schemas from a producer. The latter being a bad pattern IMHO, but those cases exist as well. We can certainly implement the first case, but to implement the second case, we'd need to implement our own API wrapper which I would rather avoid right now. |
Got it, appreciate the response! We'll work around it :) |
Hi @domnikl, I am new to the schema-registry-gitops tool, but so far this is looking great! But I was wondering about exactly this issue as I would expect the gitops tooling to also handle schema references without the need to specify a version explicitly (if the referenced schema is managed by the same git repositoy of course), especially as the version is calculated by the schema registry and there is no way to define it declaratively. Previously I was using the confluent terraform provider, but it has a similar issue: confluentinc/terraform-provider-confluent#207 I think it would be nice for the git ops tool to consider the state of the git repository to be the source of truth regarding the desired state of all contained schemas. Therefore I think it should be possible to build a dependency graph between all Schemas in the repository, update all leaf-schemas first and/or fetch their version (even if they are not updated or even were reverted). Then update all dependent schemas, with exactly the schema version, which is checked into the Git repository. The advantage of this approach is that this way it should also be possible to generate libraries for different languages from the same Git repository commit. (At least I hope this works, I still need to build some poc.) If I need to update the version of schemas in multiple commits I fear the risk to generate libraries with SpecificRecord types which might reference actually incompatible schemas. The confluent schema registry version might reference a legacy schema version, but the generated SpecificRecord type always references the version, which was checked into the repository. I am thinking about contributing such a dependency-graph update strategy. What do you think about this approach and would you be open for such a contribution? |
Hi @PSanetra and sorry for the late reply, issue kinda got lost as it was already closed. I totally agree with you that the state of the git repository should be the source of truth not only for schemas but also for their referenced dependencies. I just don't have the time to build it myself currently. But I'd be happy to review and merge a dependency graph update strategy if you would like to work on it. |
Hi, thanks for your work on this tool! It's great.
I wanted to check if there's a way to automatically set the version of a reference to latest? For example, let's say I have schemas A and B where A depends on B and I've made a change in B that I want to upload. It seems like I need to do this in two steps:
instead, it would be nice if
apply
would automatically upload the new B schema and then update A to point to the latest B in one go. Is that currently possible?I've tried setting the version to latest, which seems like it should be possible based on this error when I leave it blank:
but then I get a different error:
The text was updated successfully, but these errors were encountered: