-
Notifications
You must be signed in to change notification settings - Fork 363
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
Prepare Annotation Key Column Rename #3402
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FloThinksPi
force-pushed
the
prepare_annotation_key_rename
branch
3 times, most recently
from
August 23, 2023 09:12
05be117
to
22b6ce7
Compare
FloThinksPi
force-pushed
the
prepare_annotation_key_rename
branch
from
August 23, 2023 09:23
22b6ce7
to
089fee6
Compare
johha
reviewed
Aug 23, 2023
app/models/services/service_broker_update_request_label_model.rb
Outdated
Show resolved
Hide resolved
FloThinksPi
added a commit
that referenced
this pull request
Aug 23, 2023
5 tasks
FloThinksPi
added a commit
that referenced
this pull request
Aug 23, 2023
FloThinksPi
force-pushed
the
prepare_annotation_key_rename
branch
from
August 23, 2023 10:26
089fee6
to
acc8a4a
Compare
FloThinksPi
added a commit
that referenced
this pull request
Aug 23, 2023
johha
approved these changes
Aug 23, 2023
This change introduces views on all annotation tables where the column key has the alias key_name. The coding then uses these Views and all occurences of 'key' are replaced by 'key_name' in the CCs code. Later on on can then change the column name of the 'key' column in all annotations tabels to 'key_name' transparently without downtime and remove the view in a third step. This change is a refactoring to streamline annotations and labels and finish tasks proposed in /decitions/0004-adding-key-prefix-to-annotations.md
FloThinksPi
force-pushed
the
prepare_annotation_key_rename
branch
2 times, most recently
from
August 23, 2023 15:29
f6febf2
to
18f4963
Compare
FloThinksPi
added a commit
that referenced
this pull request
Aug 23, 2023
FloThinksPi
added a commit
that referenced
this pull request
Aug 23, 2023
FloThinksPi
added a commit
that referenced
this pull request
Aug 23, 2023
FloThinksPi
force-pushed
the
prepare_annotation_key_rename
branch
from
August 24, 2023 06:58
18f4963
to
9c0749c
Compare
This change fixes the migration tests for the streamlining of annotation keys. The previous test would leave the db in a half migrated state and then following tests would fail due to the rest of the migrations beeing missing. It may make sense to move the begin and after part of the migration test into a helper to make this a proper workflow for every migration test since we must make sure we start the test before the migration we`d like to test. Then just apply one single migration(and not all migrations), then expect certain behaviour and lastly complete the migration to not destroy the DB. This should be in a helper as currently it also requires working down migrations which is not always the case.
FloThinksPi
force-pushed
the
prepare_annotation_key_rename
branch
from
August 24, 2023 07:14
9c0749c
to
e477cca
Compare
This is to prevent warnings due to redefinition of a variable since it looks like the migrations get mashed together inside the sequel library
FloThinksPi
force-pushed
the
prepare_annotation_key_rename
branch
from
August 24, 2023 07:49
e477cca
to
c10eb1f
Compare
johha
approved these changes
Aug 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change introduces views on all annotation tables where the column
key has the alias key_name. The coding then uses these Views and all
occurences of 'key' are replaced by 'key_name' in the CCs code.
Later on on can then change the column name of the 'key' column in all
annotations tabels to 'key_name' transparently without downtime and
remove the view in a third step.
This change is a refactoring to streamline annotations and labels
and finish tasks proposed in
/decitions/0004-adding-key-prefix-to-annotations.md
Also see this ADR for more information https://github.com/cloudfoundry/cloud_controller_ng/blob/main/decisions/0011-make-labels-and-annotations-unique.md
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
main
branchI have run all the unit tests using
bundle exec rake
I have run CF Acceptance Tests