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

Update entities when provisioning config files #968

Merged
merged 37 commits into from
Apr 11, 2023

Conversation

lovromazgon
Copy link
Member

@lovromazgon lovromazgon commented Mar 28, 2023

Description

This PR changes the behavior of the provisioning service to update entities instead of recreating them. This is needed to ensure that the correct connector lifecycle events are triggered.

A big chunk of the code changes in this PR constitutes new tests and refactoring of existing tests.

Fixes #962

Quick checks:

  • I have followed the Code Guidelines.
  • There is no other pull request for the same update/change.
  • I have written unit tests.
  • I have made sure that the PR is of reasonable size and can be easily reviewed.

@lovromazgon lovromazgon changed the base branch from main to lovro/trigger-lifecycle-events March 28, 2023 16:03
.golangci.yml Show resolved Hide resolved
pkg/pipeline/instance.go Show resolved Hide resolved
pkg/provisioning/config/enrich.go Show resolved Hide resolved
pkg/provisioning/export.go Show resolved Hide resolved
pkg/provisioning/test/pipelines1/pipelines.go Outdated Show resolved Hide resolved
pkg/provisioning/service_test.go Show resolved Hide resolved
pkg/provisioning/mock/provisioning_util.go Outdated Show resolved Hide resolved
pkg/provisioning/service_test.go Show resolved Hide resolved
pkg/provisioning/import.go Show resolved Hide resolved
@lovromazgon lovromazgon changed the title WIP: Update entities when provisioning config files Update entities when provisioning config files Mar 30, 2023
@lovromazgon lovromazgon marked this pull request as ready for review March 30, 2023 18:18
@lovromazgon lovromazgon requested a review from a team as a code owner March 30, 2023 18:18
Copy link
Contributor

@maha-hajja maha-hajja left a comment

Choose a reason for hiding this comment

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

lovely work with all the refactoring and test simplifying! most of these comments are nitpicks and method names suggestions, so nothing huge.
note: haven't reviewed the import.go file and its tests yet

pkg/provisioning/config/enrich.go Show resolved Hide resolved
pkg/provisioning/config/enrich_test.go Show resolved Hide resolved
pkg/provisioning/export.go Outdated Show resolved Hide resolved
pkg/provisioning/mock/provisioning_util.go Outdated Show resolved Hide resolved
pkg/provisioning/service.go Outdated Show resolved Hide resolved
Copy link
Contributor

@hariso hariso left a comment

Choose a reason for hiding this comment

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

Great work, Lovro!

pkg/provisioning/config/enrich.go Show resolved Hide resolved
pkg/provisioning/config/enrich_test.go Show resolved Hide resolved
pkg/provisioning/test/pipelines1/pipelines.go Outdated Show resolved Hide resolved
pkg/provisioning/config/enrich.go Show resolved Hide resolved
pkg/provisioning/import.go Outdated Show resolved Hide resolved
pkg/provisioning/import.go Outdated Show resolved Hide resolved
pkg/provisioning/import.go Outdated Show resolved Hide resolved
pkg/provisioning/import.go Outdated Show resolved Hide resolved
pkg/provisioning/import.go Outdated Show resolved Hide resolved
pkg/provisioning/import.go Outdated Show resolved Hide resolved
pkg/provisioning/import.go Outdated Show resolved Hide resolved
pkg/provisioning/import.go Outdated Show resolved Hide resolved
pkg/provisioning/import.go Outdated Show resolved Hide resolved
pkg/provisioning/import.go Outdated Show resolved Hide resolved
Base automatically changed from lovro/trigger-lifecycle-events to main April 3, 2023 13:26
@lovromazgon lovromazgon force-pushed the lovro/provisioning-update branch from 0e08369 to 99148d8 Compare April 3, 2023 13:27
@lovromazgon
Copy link
Member Author

@hariso @maha-hajja I rebased the branch on top of main, the commits added since your review start with 3f1aaad.

Copy link
Contributor

@maha-hajja maha-hajja left a comment

Choose a reason for hiding this comment

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

lgtm

@lovromazgon lovromazgon enabled auto-merge (squash) April 11, 2023 11:13
@lovromazgon lovromazgon merged commit ede3570 into main Apr 11, 2023
@lovromazgon lovromazgon deleted the lovro/provisioning-update branch April 11, 2023 11:14
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.

CLE: Trigger correct connector lifecycle events when provisioning configuration files
3 participants