Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-12 12:09:55 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-12 12:09:55 +0300
commit18f7828977b74bf6e5153594a098ef90e773b3b7 (patch)
tree49cb1e16d5341d773807ee583357ae6eb167d61f /lib/tasks
parent8191b1571c017378eac33b3ed296ad5216d0a410 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/gitlab/graphql.rake19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/tasks/gitlab/graphql.rake b/lib/tasks/gitlab/graphql.rake
index 568761edb33..5a583183924 100644
--- a/lib/tasks/gitlab/graphql.rake
+++ b/lib/tasks/gitlab/graphql.rake
@@ -8,13 +8,14 @@ namespace :gitlab do
OUTPUT_DIR = Rails.root.join("doc/api/graphql/reference")
TEMPLATES_DIR = 'lib/gitlab/graphql/docs/templates/'
- # Consider all feature flags disabled
- # to avoid pipeline failures in case developer
- # dumps schema with flags enabled locally before pushing
- task disable_feature_flags: :environment do
+ # Make all feature flags enabled so that all feature flag
+ # controlled fields are considered visible and are output.
+ # Also avoids pipeline failures in case developer
+ # dumps schema with flags disabled locally before pushing
+ task enable_feature_flags: :environment do
class Feature
def self.enabled?(*args)
- false
+ true
end
end
end
@@ -25,7 +26,7 @@ namespace :gitlab do
# - gitlab:graphql:schema:json
GraphQL::RakeTask.new(
schema_name: 'GitlabSchema',
- dependencies: [:environment, :disable_feature_flags],
+ dependencies: [:environment, :enable_feature_flags],
directory: OUTPUT_DIR,
idl_outfile: "gitlab_schema.graphql",
json_outfile: "gitlab_schema.json"
@@ -33,7 +34,7 @@ namespace :gitlab do
namespace :graphql do
desc 'GitLab | GraphQL | Generate GraphQL docs'
- task compile_docs: :environment do
+ task compile_docs: [:environment, :enable_feature_flags] do
renderer = Gitlab::Graphql::Docs::Renderer.new(GitlabSchema.graphql_definition, render_options)
renderer.write
@@ -42,7 +43,7 @@ namespace :gitlab do
end
desc 'GitLab | GraphQL | Check if GraphQL docs are up to date'
- task check_docs: :environment do
+ task check_docs: [:environment, :enable_feature_flags] do
renderer = Gitlab::Graphql::Docs::Renderer.new(GitlabSchema.graphql_definition, render_options)
doc = File.read(Rails.root.join(OUTPUT_DIR, 'index.md'))
@@ -56,7 +57,7 @@ namespace :gitlab do
end
desc 'GitLab | GraphQL | Check if GraphQL schemas are up to date'
- task check_schema: :environment do
+ task check_schema: [:environment, :enable_feature_flags] do
idl_doc = File.read(Rails.root.join(OUTPUT_DIR, 'gitlab_schema.graphql'))
json_doc = File.read(Rails.root.join(OUTPUT_DIR, 'gitlab_schema.json'))