Remove public internet features and fix upstream source UI (#107)
- Remove is_public field from upstream sources (all sources are internal) - Remove allow_public_internet setting from cache settings - Remove seeding of public registry URLs - Fix connectivity test to not follow redirects (fixes Artifactory error) - Add dedicated Test column with OK/Error status badges - Auto-test sources after save - Add error modal for viewing full error details - Fix table layout (no-wrap on source name) - Add ORCHARD_PURGE_SEED_DATA to stage helm values
This commit is contained in:
@@ -531,6 +531,46 @@ def _run_migrations():
|
||||
ON CONFLICT (name) DO NOTHING;
|
||||
""",
|
||||
),
|
||||
Migration(
|
||||
name="021_remove_is_public_from_upstream_sources",
|
||||
sql="""
|
||||
DO $$
|
||||
BEGIN
|
||||
-- Drop the index if it exists
|
||||
DROP INDEX IF EXISTS idx_upstream_sources_is_public;
|
||||
|
||||
-- Drop the column if it exists
|
||||
IF EXISTS (
|
||||
SELECT 1 FROM information_schema.columns
|
||||
WHERE table_name = 'upstream_sources' AND column_name = 'is_public'
|
||||
) THEN
|
||||
ALTER TABLE upstream_sources DROP COLUMN is_public;
|
||||
END IF;
|
||||
END $$;
|
||||
""",
|
||||
),
|
||||
Migration(
|
||||
name="022_remove_allow_public_internet_from_cache_settings",
|
||||
sql="""
|
||||
DO $$
|
||||
BEGIN
|
||||
IF EXISTS (
|
||||
SELECT 1 FROM information_schema.columns
|
||||
WHERE table_name = 'cache_settings' AND column_name = 'allow_public_internet'
|
||||
) THEN
|
||||
ALTER TABLE cache_settings DROP COLUMN allow_public_internet;
|
||||
END IF;
|
||||
END $$;
|
||||
""",
|
||||
),
|
||||
Migration(
|
||||
name="023_delete_seeded_public_sources",
|
||||
sql="""
|
||||
-- Delete the seeded public sources that were added by migration 020
|
||||
DELETE FROM upstream_sources
|
||||
WHERE name IN ('npm-public', 'pypi-public', 'maven-central', 'docker-hub');
|
||||
""",
|
||||
),
|
||||
]
|
||||
|
||||
with engine.connect() as conn:
|
||||
|
||||
Reference in New Issue
Block a user