Repository navigation
Conversation
…e table Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Intelligently detecting it based on key presence at first startup is just too niche a condition/too rare and will make user support more painful. Instead the "whether we queue these tasks" logic should rely on both "is the instance enabled" AND "do we have keys" separately Signed-off-by: Adrian Edwards <adredwar@redhat.com>
…SS instances Signed-off-by: Adrian Edwards <adredwar@redhat.com>
…table This covers existing instances. Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Signed-off-by: Adrian Edwards <adredwar@redhat.com>
|
|
||
| from collectoss.application.db.models.operations import ForgeInstance | ||
| from collectoss.util.enums import ForgePlatformType | ||
| from sqlalchemy.orm.attributes import get_history |
There was a problem hiding this comment.
[pylint] reported by reviewdog 🐶
W0611: Unused get_history imported from sqlalchemy.orm.attributes (unused-import)
Codecov Report❌ Patch coverage is
Additional details and impacted files🚀 New features to boost your workflow:
|
force_instance table at startupforge_instance table at startup
Contributor
Author
|
I need to add automated tests for this.... |
Contributor
Author
|
i have run the migrations for this on my local instance and confirmed they work. just waiting to set up testing for the above (to ensure first instance startup/init behavior is okay (for when we eventually rely on that) |
This file contains hidden or 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
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.
Description
This PR populates the initial contents of the
forge_instancestable with the two built-in default instances: github.com and gitlab.com.It does this via two mechanisms:
This has to be done with a migration because I anticipate future migrations will update database structure/constraints to "creatively reinterpret" existing forge type fields as instances (they conveniently share the same number space for now). As a result, we need to basically guarantee these records exist in every existing instance so that future db migrations dont fail.
This is another step towards resolving #293
this PR also unblocks work to migrate collection tasks, such as pull request collection, to utilize instance IDs as part of their unique identity
Notes for Reviewers
Signed commits
Generative AI disclosure
Please select one option:
If AI tools were used, please provide details below:
- What tools were used? Possibly code autocomplete in cursor. but this code was mostly written a long time ago so im inclined to trust my lack of AI disclosures as a sign there wasnt much AI use
- How were these tools used? maybe coding?
- Did you review these outputs before submitting this PR? yes, extensively code reviewed etc