Skip to content
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

(nexus-repository-migrator) Fixes Nexus 3.71 Breaking Change Upgrade #2519

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Commits on Sep 30, 2024

  1. (nexus-repository) Adds Migration Logic for Version 3.71

    Nexus' recent update has added some fairly catastrophic breaking changes, and
    necessitated a large addition to the install script for the sake of migrating
    the database to the new H2 format (previously only available to pro customers)
    
    This new migration process:
    - Checks to see if the version we're on can be migrated from (e.g. ==3.70)
    - Checks to see if the install is using OrientDb (and so needs to be upgraded)
    - Checks to see if the machine has sufficient memory and disk space
    - Backs up the OrientDb files from the $DataDir\db directory
    - Downloads the migration tool
    - Migrates the backed up databases
    - Copies the migrated file(s) back to the database directory
    - Updates the Nexus properties to enable the datastore
    - Deletes the entire target folder (there's a separate discussion that we
        may want to be doing this anyway)
    - Continues with the standard upgrade process
    
    This works back to PowerShell v3, largely due to `Compress-ArchiveCompat`
    JPRuskin committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    209a526 View commit details
    Browse the repository at this point in the history
  2. (nexus-repository) Improves Parameter Handling

    Sources all connection variables in Wait-NexusAvailability (other than Hostname) from the on-disk configuration.
    
    Also automatically backs-up and restores the port and SSL configuration if they are defined in the configuration.
    JPRuskin committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    55b0ff4 View commit details
    Browse the repository at this point in the history
  3. (nexus-repository-migrator) Extracts nexus-repository Migration Logic

    It was raised that we should have a separate package for the Nexus Repository Migrator logic.
    This commit removes that code from the Nexus Repository package, and adds it to a separate package that can be installed.
    JPRuskin committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    c1fb44b View commit details
    Browse the repository at this point in the history
  4. (nexus-repository) Removes ProgramDir before Copying Files

    The upgrade to JRE exposed that the package was simply copying new files over the old ones, which can break things when old files combine with new.
    
    This change solidifies the package logic to backup SSL configuration if it's present, and specifically removes the program directory before re-copying the latest files.
    
    This should ensure that Nexus can start, after the upgrade.
    JPRuskin committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    1c00f10 View commit details
    Browse the repository at this point in the history
  5. (nexus-repository-migrator) Adds Longer Timeout to AttemptMigration

    The post-migration launch process can take significantly longer than normal, due to the additional work Nexus is doing.
    
    This change adds a configurable timeout to the Wait-NexusAvailability command, and uses it in the Nexus-Repository-Migrator package to increase the timeout from 3 minutes to 15.
    JPRuskin committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    0ad835a View commit details
    Browse the repository at this point in the history
  6. (squash) Feedback from PR

    JPRuskin committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    1857bc4 View commit details
    Browse the repository at this point in the history