Skip to content

Conversation

@Fredrik10a
Copy link

@Fredrik10a Fredrik10a commented Nov 5, 2024

Applicable Issues

Fixes #259

Task from the October 2024 community meeting to capture the discussion on how a submodule setup could look like.

Description of the Change

Added a page describing how to model submodules using Eiffel events.

Alternate Designs

Not Applicable

Possible Drawbacks

Nothing that I can think of

Sign-off

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

Signed-off-by:

@Fredrik10a Fredrik10a requested a review from a team as a code owner November 5, 2024 14:58
Copy link
Member

@m-linner-ericsson m-linner-ericsson left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution and glad to have you onboard!

Could I ask you fill in the PR template with some text and put your signature in the form of name and email? You don't need to be very lengthy but some explanation on what the update was. I would probably have added the following:

### Applicable Issues
Task from the [October 2024 community meeting](https://hackmd.io/e5x-6vRGSnio02m8snhn0A) to capture the discussion on how a submodule setup could look like.

### Description of the Change
Added a page describing how to model submodules using Eiffel events.


### Alternate Designs
Not Applicable

### Possible Drawbacks
Nothing  that I can think of

It could be that you only wanted to create a draft PR https://github.blog/news-insights/product-news/introducing-draft-pull-requests/ . In that case we don't require you to fill in the PR template just to get the discussion started.

If you got any question please don't hesitate to ask or reach out to me. No question is too stupid.

@Fredrik10a Fredrik10a changed the title Add example of working with Git submodules [DRAFT] Add example of working with Git submodules Nov 7, 2024
@m-linner-ericsson m-linner-ericsson requested a review from a team December 4, 2024 09:27
@Fredrik10a Fredrik10a changed the title [DRAFT] Add example of working with Git submodules Add example of working with Git submodules Mar 25, 2025
@m-linner-ericsson
Copy link
Member

The test fail due to old versions used by tox, #412 will fix that.

Copy link
Member

@magnusbaeck magnusbaeck left a comment

Choose a reason for hiding this comment

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

LGTM, just a couple of nits and a clarification request.

@@ -0,0 +1,18 @@
# Working with GIT submodules
Copy link
Member

Choose a reason for hiding this comment

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

Nit: We usually refer to the Git program as "Git" and a repository as "git", but we never use "GIT".


Below is a simple image of how it could look in GIT.

![alt text](./submodule-git.png)
Copy link
Member

Choose a reason for hiding this comment

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

If you're going to supply an alternative text for visually impaired, please make it something better than "alt text" :-)


![alt text](./submodules-eiffel.png)

Depending on the solution setup, a Service can be created to listen for SCCs (Source Change Created) that carry a specific identification tag/id for the Parent repository. Upon detecting such an SCC, the Service uses the SourceChange API to read the SHA IDs of contained submodules. It then fetches the related SCCs based on these IDs. Finally, it generates a CompositionDefined (CD) event and publishes it on the bus.
Copy link
Member

Choose a reason for hiding this comment

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

What does "SourceChange API" refer to in this case? I'm not aware of any API that returns the submodules of a given commit from a repository.

Copy link
Member

@m-linner-ericsson m-linner-ericsson left a comment

Choose a reason for hiding this comment

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

You will need to rebase your change or add the fixes we did in #412 to get the PR to pass the checks.

Adding some spelling correction suggestions and links to the event documentation.

![alt text](./submodule-git.png)

## Eiffel solution
This will show you one setup for the Eiffel model on how to get around the use-case where there is a sceanrio where GIT submodules are used.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This will show you one setup for the Eiffel model on how to get around the use-case where there is a sceanrio where GIT submodules are used.
This will show you one setup for the Eiffel model on how to get around the use-case where there is a scenario where GIT submodules are used.


Depending on the solution setup, a Service can be created to listen for SCCs (Source Change Created) that carry a specific identification tag/id for the Parent repository. Upon detecting such an SCC, the Service uses the SourceChange API to read the SHA IDs of contained submodules. It then fetches the related SCCs based on these IDs. Finally, it generates a CompositionDefined (CD) event and publishes it on the bus.

Important drawback from this is that it does not create a linear relationship downwards. Even though one could argue that it does, but it requires knowledge about what SCC one is suposed to query.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Important drawback from this is that it does not create a linear relationship downwards. Even though one could argue that it does, but it requires knowledge about what SCC one is suposed to query.
Important drawback from this is that it does not create a linear relationship downwards. Even though one could argue that it does, but it requires knowledge about what SCC one is supposed to query.


![alt text](./submodules-eiffel.png)

Depending on the solution setup, a Service can be created to listen for SCCs (Source Change Created) that carry a specific identification tag/id for the Parent repository. Upon detecting such an SCC, the Service uses the SourceChange API to read the SHA IDs of contained submodules. It then fetches the related SCCs based on these IDs. Finally, it generates a CompositionDefined (CD) event and publishes it on the bus.
Copy link
Member

Choose a reason for hiding this comment

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

Propose to add a link to the events to help the reader if they want more information.

Suggested change
Depending on the solution setup, a Service can be created to listen for SCCs (Source Change Created) that carry a specific identification tag/id for the Parent repository. Upon detecting such an SCC, the Service uses the SourceChange API to read the SHA IDs of contained submodules. It then fetches the related SCCs based on these IDs. Finally, it generates a CompositionDefined (CD) event and publishes it on the bus.
Depending on the solution setup, a Service can be created to listen for [SCC](https://github.com/eiffel-community/eiffel/blob/master/eiffel-vocabulary/EiffelSourceChangeCreatedEvent.md)s (Source Change Created) that carry a specific identification tag/id for the Parent repository. Upon detecting such an SCC, the Service uses the SourceChange API to read the SHA IDs of contained submodules. It then fetches the related SCCs based on these IDs. Finally, it generates a CompositionDefined ([CD](https://github.com/eiffel-community/eiffel/blob/master/eiffel-vocabulary/EiffelCompositionDefinedEvent.md)) event and publishes it on the bus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Hierarchical source code structures

3 participants