-
Notifications
You must be signed in to change notification settings - Fork 122
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
feat: add Relation.active, exclude inactive relations from Model.relations #1091
Merged
Merged
Changes from 13 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
7dc4f06
Add Relation.active, and exclude relations that are not active from M…
tonyandrewmeyer 9c4c793
Merge branch 'main' into relation-broken-940
tonyandrewmeyer cd8416a
Add changelog entry.
tonyandrewmeyer 56b6773
Ensure that when Harness.remove_relation() is called, the relation is…
tonyandrewmeyer f6d856c
Test that harness works correctly for relation-broken.
tonyandrewmeyer bdfc95e
Add main tests to verify that active and relations are set properly.
tonyandrewmeyer 1633f15
Add tests for the broken relation specifying.
tonyandrewmeyer 965f591
Undo overly aggressive wrapping.
tonyandrewmeyer 8d98923
Apply suggestions from code review
tonyandrewmeyer ce1e108
Make active=True the default.
tonyandrewmeyer aeda7a3
Add comment.
tonyandrewmeyer 277eb4e
Merge branch 'main' into relation-broken-940
tonyandrewmeyer c3e7c9b
Fix bad undo.
tonyandrewmeyer 8dc1836
Update ops/model.py
tonyandrewmeyer c83e5a6
Merge branch 'main' into relation-broken-940
tonyandrewmeyer 699a324
Make quotation marks consistent.
tonyandrewmeyer 3476f94
Make quotation marks consistent.
tonyandrewmeyer 580e16d
Merge branch 'main' into relation-broken-940
tonyandrewmeyer 8b38f54
Merge branch 'main' into relation-broken-940
tonyandrewmeyer 42fbf72
Merge branch 'main' into relation-broken-940
benhoyt 7d8a000
Comment out postgresql-operator tests for now
benhoyt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems a little strange to pull this out as a helper when it is next to all the other functions that are looking directly at ENV vars.
I suppose there is a bit of parsing and casting vs just reading the string which makes it relevant to split out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Splitting it out was actually a code review suggestion from @benhoyt 😄. I'm weakly in favour of splitting it out for the reasons you mention.
Note that we have tentative plans to refactor the env parsing (#1075) and if that goes ahead then this would presumably end up in the initialisation of that context object and no longer need this little helper.