1. 04 Jan, 2022 1 commit
    • Stan Hu's avatar
      Fix 500 errors when renaming projects with underscores · 4a70f4ef
      Stan Hu authored
      https://gitlab.com/gitlab-org/gitlab/-/merge_requests/68357 added the
      `container_registry_migration_phase1` feature flag. When enabled, this
      change caused a `ContainerRepository` model to be instantiated every
      time the registry client checked for tags. For projects that had
      trailing/leading underscores in their paths, this would trigger a
      validation error and cause a
      `ContainerRegistry::Path::InvalidRegistryPathError` exception to be
      raised while trying to generate the `migration_eligible` flag in the
      access token.
      
      Previously this would not cause a 500 error because the access token was
      still generated, but the manifest would return empty since registry
      images cannot exist for project paths with trailing/leading underscores.
      
      To preserve the previous behavior, we now catch and log this exception
      in `ContainerRegistryAuthenticationService.migration_eligible`.
      
      Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/27483
      
      Changelog: fixed
      4a70f4ef
  2. 03 Jan, 2022 6 commits
  3. 02 Jan, 2022 1 commit
    • Stan Hu's avatar
      Fix date-dependent failing spec in export_service_spec.rb · fde96345
      Stan Hu authored
      The test used a hard-coded 2021-01-01 as an expiration date, but once
      the current date reaches that date this is no longer valid since it's
      not in the past. We fix this by using a date always one month from the
      current date.
      fde96345
  4. 01 Jan, 2022 2 commits
  5. 31 Dec, 2021 29 commits
  6. 30 Dec, 2021 1 commit