Repository navigation
TR-89: GitHub repositories as SourceControlLibrary under a GitHub platform (merge as one unit) - #1122
Merged
Merged
Conversation
…b CloudPlatform A git repository is now a SourceControlLibrary (libraryType "git", deployedImplementationType "GitHub Repository"), made by create_software_capability with class SourceControlLibraryProperties. GitHub is a singleton SoftwareServerPlatform classified CloudPlatform, cached under the new setting egeria.github_platform_guid, linked platform -> repository by SupportedSoftwareCapability once per repository (link_once, idempotent). - Lookup and cache check are an exact qualifiedName read of type SourceControlLibrary; a lookup that cannot be made raises and creates nothing. - Zones ride as an initialClassifications ZoneMembership, never in properties. - _language_forward reads with get_metadata_element_by_guid and updates with update_software_capability, keeping the whole additionalProperties map; _current_additional_properties now reads the real by-GUID shape (a map under elementProperties.propertyValueMap), which it did not before. - A repository's reports are read through ReportSubject; a failed read raises RepoReportsUnreadable (the route answers 502), never "no reports". - trigger_survey_by_guid / _initiate_survey refuse in words: Egeria's survey engine takes only an Asset target. - The platform's deployedImplementationType (and CloudPlatform's) is ONE constant, GITHUB_PLATFORM_DEPLOYED_IMPLEMENTATION_TYPE = "GitHub". UNCONFIRMED: waiting on Mandy's value. The branch must not merge until it is confirmed. A and B (the readers, next commit) are one deploy unit: A alone makes every resync pass call each repository stale. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
Part B of the one deploy unit with Part A. A repository is no longer an Asset, so every Asset-only call on its GUID answers NotFound; left alone, resync would call every repository stale and clear_stale_assets (scheduled) would delete its survey records. - egeria_resync._scan_assets verifies by GUID with ClassificationExplorer .get_element_by_guid, as the file's other scans do. A read that fails is undetermined, never stale. - scripts/sweep_stale_egeria_guids.py decides the same way (_check_cached). - bulk_ops.delete_in_egeria deletes a repository through MetadataExpert.delete_metadata_element, after the existing delete permission check; databases and file systems keep delete_asset. - egeria_reader.find_asset_guid (no callers) is deleted. - no_silent_success_baseline.json moves only downward: four swallow sites gone (_find_or_create_asset x2, _find_or_create_github_scl, _initiate_survey, find_asset_guid). - tests/test_tr89_repo_as_scl.py: 30 tests on a fake that knows a SourceControlLibrary is not an Asset; 25 fail on main. Includes the check that a publish followed by a resync pass loses nothing, which is the coupling of A and B. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…orm_guid The deploy comes with an Egeria reset, and clear_egeria_pointers_after_reset.py removes (or keeps, if live) the app_settings GUID keys that point into the Egeria being replaced. It knew only the pre-TR-89 egeria.github_source_control_library_guid; the new platform key would have been left dangling. The publisher re-registers a platform whose cached GUID is gone, so this is tidiness and honesty of the reset plan rather than a data-loss fix, and the old key stays listed for databases published before TR-89. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
… confirmed The project owner ruled the value "GitHub" (relayed by the Architect, 2026-11-20): the same string on the SoftwareServerPlatform and on its CloudPlatform classification, from the one constant. It is no longer marked unconfirmed and no longer blocks the merge. The repository keeps "GitHub Repository". The test now reads both values back from the created platform. Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…ry now uses Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…tect fix-up 1, R1) _current_display_name carried a pasted copy of _current_additional_properties' by-GUID block: it used the undefined name qualified_name (a NameError on the by-GUID shape) and returned a dict instead of a name. It now returns the displayName string from the Asset shape (properties.displayName) or the type-agnostic by-GUID shape (elementProperties.propertiesAsStrings, then the typed propertyValueMap), and None otherwise. Three tests, which failed first. ruff --select F on the changed modules: 10 findings on main, none from this branch; 9 fixed here (Any, unused AnnotationType, Callable, Collection, unused os and BackgroundTasks, a placeholder-less f-string). The tenth, exc in clear_egeria_pointers_after_reset.py, is a false positive (a lambda run inside the except block that binds it). Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
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.
TR-89, branch 1 (Parts A+B): Resource Explorer publishes a GitHub repository as a SourceControlLibrary, not a plain Asset. The model was confirmed with Mandy:
SourceControlLibrary(libraryType"git", deployedImplementationType "GitHub Repository").SoftwareServerPlatformclassifiedCloudPlatform, with deployedImplementationType "GitHub" from one constant, linked to each repository bySupportedSoftwareCapability.CapabilityAssetUse.clear_stale_assetstreats only NotFound/404 as stale, so a live SourceControlLibrary is never cleared.MERGE AS ONE UNIT, WITH A MERGE COMMIT (never squash, never pick commits). Parts A and B must ship and deploy together. A alone would make resync call every repository stale, and the scheduled clean-up deletes survey records.
Live proof on a throwaway Egeria (Rocky's own stack), through RE's own publisher methods: 8 of 9 checks PASS.
_language_forward, the 6.3 by-GUID shape against the 6.2 fixture, and the five type facts.Read-backs: the audit, the build brief, branch 1 and its fix-up, and the live proof, all PASS (RE/Trellis Architect).
Gate b474 on main 068ac37: RE main suite 15,686 passed, 0 failed; JS harness exit 0; analytics 294/0; other packages no new failures.
Deploy (not part of this PR): the merge tip goes to 8813 together with an Egeria reset per the reset procedure. Afterwards, the clean-up clearing the old repository registrations is expected.
Branch 2 (the Portal resource browser) is already in odpi/egeria-workspaces#904. Part D (branch folders) waits for Egeria's Branch classification (EG-19).
Signed-off-by: Dan Wolfson dan.wolfson@pdr-associates.com
🤖 Generated with Claude Code