Commit a0491ce9 authored by Mikołaj Wawrzyniak's avatar Mikołaj Wawrzyniak

Merge branch 'jivanvl-add-status-manifest-type' into 'master'

Add status to DependencyProxy::Manifest type in GraphQL

See merge request gitlab-org/gitlab!84200
parents f55e5171 78087a5c
...@@ -15,6 +15,10 @@ module Types ...@@ -15,6 +15,10 @@ module Types
field :image_name, GraphQL::Types::String, null: false, description: 'Name of the image.' field :image_name, GraphQL::Types::String, null: false, description: 'Name of the image.'
field :size, GraphQL::Types::String, null: false, description: 'Size of the manifest file.' field :size, GraphQL::Types::String, null: false, description: 'Size of the manifest file.'
field :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.' field :updated_at, Types::TimeType, null: false, description: 'Date of most recent update.'
field :status,
Types::DependencyProxy::ManifestTypeEnum,
null: false,
description: "Status of the manifest (#{::DependencyProxy::Manifest.statuses.keys.join(', ')})"
def image_name def image_name
object.file_name.chomp(File.extname(object.file_name)) object.file_name.chomp(File.extname(object.file_name))
......
# frozen_string_literal: true
module Types
class DependencyProxy::ManifestTypeEnum < BaseEnum
graphql_name 'DependencyProxyManifestStatus'
::DependencyProxy::Manifest.statuses.keys.each do |status|
value status.upcase, { description: "Dependency proxy manifest has a status of #{status}.", value: status }
end
end
end
...@@ -10100,6 +10100,7 @@ Dependency proxy manifest. ...@@ -10100,6 +10100,7 @@ Dependency proxy manifest.
| <a id="dependencyproxymanifestid"></a>`id` | [`DependencyProxyManifestID!`](#dependencyproxymanifestid) | ID of the manifest. | | <a id="dependencyproxymanifestid"></a>`id` | [`DependencyProxyManifestID!`](#dependencyproxymanifestid) | ID of the manifest. |
| <a id="dependencyproxymanifestimagename"></a>`imageName` | [`String!`](#string) | Name of the image. | | <a id="dependencyproxymanifestimagename"></a>`imageName` | [`String!`](#string) | Name of the image. |
| <a id="dependencyproxymanifestsize"></a>`size` | [`String!`](#string) | Size of the manifest file. | | <a id="dependencyproxymanifestsize"></a>`size` | [`String!`](#string) | Size of the manifest file. |
| <a id="dependencyproxymanifeststatus"></a>`status` | [`DependencyProxyManifestStatus!`](#dependencyproxymanifeststatus) | Status of the manifest (default, pending_destruction, processing, error). |
| <a id="dependencyproxymanifestupdatedat"></a>`updatedAt` | [`Time!`](#time) | Date of most recent update. | | <a id="dependencyproxymanifestupdatedat"></a>`updatedAt` | [`Time!`](#time) | Date of most recent update. |
### `DependencyProxySetting` ### `DependencyProxySetting`
...@@ -18086,6 +18087,15 @@ Weight of the data visualization palette. ...@@ -18086,6 +18087,15 @@ Weight of the data visualization palette.
| <a id="datavisualizationweightenumweight_900"></a>`WEIGHT_900` | 900 weight. | | <a id="datavisualizationweightenumweight_900"></a>`WEIGHT_900` | 900 weight. |
| <a id="datavisualizationweightenumweight_950"></a>`WEIGHT_950` | 950 weight. | | <a id="datavisualizationweightenumweight_950"></a>`WEIGHT_950` | 950 weight. |
### `DependencyProxyManifestStatus`
| Value | Description |
| ----- | ----------- |
| <a id="dependencyproxymanifeststatusdefault"></a>`DEFAULT` | Dependency proxy manifest has a status of default. |
| <a id="dependencyproxymanifeststatuserror"></a>`ERROR` | Dependency proxy manifest has a status of error. |
| <a id="dependencyproxymanifeststatuspending_destruction"></a>`PENDING_DESTRUCTION` | Dependency proxy manifest has a status of pending_destruction. |
| <a id="dependencyproxymanifeststatusprocessing"></a>`PROCESSING` | Dependency proxy manifest has a status of processing. |
### `DeploymentTier` ### `DeploymentTier`
All environment deployment tiers. All environment deployment tiers.
...@@ -5,7 +5,7 @@ require 'spec_helper' ...@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe GitlabSchema.types['DependencyProxyManifest'] do RSpec.describe GitlabSchema.types['DependencyProxyManifest'] do
it 'includes dependency proxy manifest fields' do it 'includes dependency proxy manifest fields' do
expected_fields = %w[ expected_fields = %w[
id file_name image_name size created_at updated_at digest id file_name image_name size created_at updated_at digest status
] ]
expect(described_class).to include_graphql_fields(*expected_fields) expect(described_class).to include_graphql_fields(*expected_fields)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment