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

Feature/103 move blueprint structs to blueprint-lib #104

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

ppxl
Copy link
Member

@ppxl ppxl commented Jan 20, 2025

This PR resolves #103 by extracting blueprint structs and moving it into the blueprint-lib. See also cloudogu/blueprint-lib#1

This PR also resolves slight fixes as can be seen in the changelog.

ppxl added 6 commits January 16, 2025 10:46
This commit moves all adapter-related blueprint struct code into the new
blueprint-lib. The changes that go beyond simple extraction (like
conversion and deepcopy) were necessary to make the code work like
before.

This also uncovered the fact that the blueprintcr package has relation-
ships towards the serializer adapter which seemed weird. Probably
another disconnect is necessary.
The previously mentioned make target didn't work for me because no
target with that name was found. `make generate-deepcopy` did work out
though.
@ppxl ppxl added enhancement New feature or request security labels Jan 20, 2025
Copy link
Contributor

@alexander-dammeier alexander-dammeier left a comment

Choose a reason for hiding this comment

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

Your extraction of the serializer package is easy to understand and should work this way for now but it leads to some problems in the long run. It is very unfortunate that the deadline for your project is so close, so that we have no real choice here than merging it.

Under normal conditions, we would not accept this as we already have a better but more complex plan to extract the blueprint CRD together with its generation process and its Rest-Client. I think this PR does not help us or makes it even more complicated to achieve this.

Out of the scope of this PR, i think it is also not a good idea that you put the old blueprint and parts of the new blueprint-CR into the same lib. They should be in separate libs as part of our plans was to minimize the dependencies to the old code. This way we maybe can just change your lib when we start with our planned refactoring.

CHANGELOG.md Outdated
- to parse different blueprint versions.

### Fixed
- Fix autogeneration boilerplate text to match with the current make target ``
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Fix autogeneration boilerplate text to match with the current make target ``
- Fix autogeneration boilerplate text to match with the current make target `make generate`

is that what you mean?

Copy link
Member Author

Choose a reason for hiding this comment

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

I did deffo miss hier the actual target. But it was make generate-deepcopy. I will fix this.

Copy link
Member Author

Choose a reason for hiding this comment

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

  • done

hack/boilerplate.go.txt Show resolved Hide resolved
pkg/adapter/serializer/blueprintV2/serializer.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@alexander-dammeier
Copy link
Contributor

Why is there a security label at the PR?

@ppxl
Copy link
Member Author

ppxl commented Jan 21, 2025

Why is there a security label at the PR?

Because an update of an x/stdlib package removed a high CVE

@ppxl
Copy link
Member Author

ppxl commented Jan 21, 2025

--- 8x --- snip --- x8 ---
They should be in separate libs as part...

I agree. With the whole lot of CR stuff and even more about to be extracted this makes sense. I will move the blueprint operator specific code into a new repository and will update the code after moving it there

@ppxl
Copy link
Member Author

ppxl commented Jan 21, 2025

--- 8x --- snip --- x8 ---
They should be in separate libs as part...

I agree. With the whole lot of CR stuff and even more about to be extracted this makes sense. I will move the blueprint operator specific code into a new repository and will update the code after moving it there

  • done

Copy link
Contributor

@alexander-dammeier alexander-dammeier left a comment

Choose a reason for hiding this comment

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

The new compromise with the separate library is way better. We can use it for further refactorings in this form. Like I stated in the last review, your changes are very straight forward. I will approve the changes if you fix the small mistake in the changelog :)

Sorry for the harsh words in the last review!

CHANGELOG.md Outdated

### Fixed
- Fix autogeneration boilerplate text to match with the current make target ``
- Fix autogeneration boilerplate text to match with the current make target `generator-deepcopy`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Fix autogeneration boilerplate text to match with the current make target `generator-deepcopy`
- Fix autogeneration boilerplate text to match with the current make target `generate-deepcopy`

Copy link
Member Author

Choose a reason for hiding this comment

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

  • done

@ppxl
Copy link
Member Author

ppxl commented Jan 22, 2025

The new compromise with the separate library is way better. We can use it for further refactorings in this form. Like I stated in the last review, your changes are very straight forward. I will approve the changes if you fix the small mistake in the changelog :)
I am glad we found a way of handling this matter.

Sorry for the harsh words in the last review!
no sweat! We got this! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move highlevel blueprint structs to blueprint-lib
2 participants