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

chore: add independent submodules #236

Merged

Conversation

craicoverflow
Copy link
Contributor

@craicoverflow craicoverflow commented Aug 16, 2021

Closes #160

This PR introduces sub modules to give us the ability to do independent releases. This is important because the individual clients have their own release schedules and keeping them separate means that SDK consumers will only ever get a change when it is released to stage/production.

Verification

Run the examples:

cd internal
go run ./kafkamgmt/kafka_mgmt.go

Comment on lines +5 to +13
replace github.com/redhat-developer/app-services-sdk-go/kafkamgmt => ../../kafkamgmt

replace github.com/redhat-developer/app-services-sdk-go/kafkainstance => ../../kafkainstance

replace github.com/redhat-developer/app-services-sdk-go/connectormgmt => ../../connectormgmt

replace github.com/redhat-developer/app-services-sdk-go/registrymgmt => ../../registrymgmt

replace github.com/redhat-developer/app-services-sdk-go/registryinstance => ../../registryinstance
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This allows us to reference local unreleased changes in the examples.

@@ -0,0 +1,61 @@
# Releasing
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@secondsun @wtrocki I have added an entire section on releasing independent sub modules. Obviously this method has not been executed yet, so we may find some things that do not work when releasing the next time. Worth to have a read.

@craicoverflow craicoverflow requested a review from wtrocki August 16, 2021 15:32
@wtrocki
Copy link
Collaborator

wtrocki commented Aug 17, 2021

My dream process

  1. Each submodule has a changelog (as long as root) that gets created and updated during PR review.
    The developer writes proper change description on SDK. Notes breaking changes etc.
    This way changelog can be extended with additional info rather than relying on gitchlog that is limited
  2. Dev does tag when wants to release SDK (releases just stub as every sdk is submodules)
  3. Automation check other modules' changelogs and determines what changed.
  4. Automation will create individual tag releases for SDK
  5. Changelog for each module will be pushed to individual SDK release on github.

Why

  1. This way our release process is practically the same and there is the little cost of automating it comparing to manual releases that will take time and will be error prone.

  2. No snowflakes - each SDK works the same and it takes 2 minutes to explain how to release them. Quick onboarding.

  3. We can employ this strategy across fleet without problem (same bash script will work for sdk-js and sdk-java)

@craicoverflow
Copy link
Contributor Author

Each submodule has a changelog (as long as root) that gets created and updated during PR review.

Agreed, this is described in the new release process.

The developer writes proper change description on SDK. Notes breaking changes etc.
This way changelog can be extended with additional info rather than relying on gitchlog that is limited

Yes this may be better to do than relying on git-chglog.

  1. Dev does tag when wants to release SDK (releases just stub as every sdk is submodules)
  2. Automation check other modules' changelogs and determines what changed.
  3. Automation will create individual tag releases for SDK

Can you explain this a bit more? Where does the dev do the tag, on the root?

@wtrocki
Copy link
Collaborator

wtrocki commented Aug 17, 2021

Where does the dev do the tag, on the root?

Yes.

  1. Create v0.3.0 tag
  2. individual module tags are created by automation based on changelogs (changelogs will have different versions)

@craicoverflow
Copy link
Contributor Author

Where does the dev do the tag, on the root?

Yes.

  1. Create v0.3.0 tag
  2. individual module tags are created by automation based on changelogs (changelogs will have different versions)

The root module is completely independent from the submodules. Releasing the root will not include any changes from the submodules. If you create a tag for the root module then this means there are no changes in the submodules.

@wtrocki
Copy link
Collaborator

wtrocki commented Aug 17, 2021

The root module is completely independent from the submodules.

Yes. It will be a nonfunctional stub used to aggregate all releases if needed.
If someone needs to release an individual SDK that would be still possible by creating tag.

Btw. This is just suggestion/discussion, not strongly related to the PR we have here.

@craicoverflow craicoverflow merged commit 2faf56d into redhat-developer:main Aug 17, 2021
@craicoverflow craicoverflow deleted the independent-modules branch August 17, 2021 15:12
@wtrocki
Copy link
Collaborator

wtrocki commented Aug 17, 2021

As part of the verification let's create initial releases (despite no new changes are needed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce go submodules to use independent versioning
2 participants