From 4e1af5260dc9187ca0637fcfcf56b450f6443192 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 16 Nov 2022 09:11:23 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .gitpod.yml | 49 ++--- .../explorer/graphql/index.js | 18 ++ .../explorer/pages/details.vue | 8 + .../javascripts/related_issues/index.js | 1 - .../components/state_container.vue | 2 +- .../components/states/new_ready_to_merge.vue | 2 +- .../states/unresolved_discussions.vue | 20 +-- .../components/work_item_detail.vue | 1 + .../components/work_item_links/index.js | 2 - .../work_item_links/work_item_links.vue | 50 +++++- .../work_item_links/work_item_links_form.vue | 142 ++++++++++----- .../javascripts/work_items/constants.js | 5 + .../graphql/project_work_items.query.graphql | 19 +- app/assets/javascripts/work_items/index.js | 9 +- .../stylesheets/framework/dropdowns.scss | 4 + .../page_bundles/merge_requests.scss | 12 ++ app/models/postgresql/detached_partition.rb | 4 + .../projects/issues/_related_issues.html.haml | 1 - .../issues/_work_item_links.html.haml | 2 +- .../creations/_new_submit.html.haml | 8 +- ...15-6-deprecate-runner-register-command.yml | 7 +- doc/api/graphql/index.md | 28 ++- doc/architecture/blueprints/pods/index.md | 5 + .../pods/pods-feature-data-migration.md | 82 +++++++++ .../pods/pods-feature-database-sequences.md | 94 ++++++++++ .../blueprints/pods/pods-feature-graphql.md | 94 ++++++++++ .../pods/pods-feature-organizations.md | 58 ++++++ ...feature-router-endpoints-classification.md | 46 +++++ .../blueprints/pods/pods-feature-template.md | 4 +- doc/development/work_items.md | 15 ++ doc/update/deprecations.md | 7 +- doc/user/tasks.md | 17 ++ lib/api/api.rb | 2 +- lib/api/entities/markdown.rb | 9 + lib/api/markdown.rb | 16 +- .../detached_partition_dropper.rb | 20 +-- locale/gitlab.pot | 12 ++ .../helm/helm_install_package.yaml.erb | 3 +- .../helm/helm_upload_package.yaml.erb | 3 +- .../package_registry/helm_registry_spec.rb | 2 +- .../work_items/work_item_children_spec.rb | 29 ++- .../explorer/pages/details_spec.js | 24 ++- .../work_item_links_form_spec.js | 170 ++++++++++-------- .../work_item_links/work_item_links_spec.js | 24 ++- spec/frontend/work_items/mock_data.js | 27 ++- .../detached_partition_dropper_spec.rb | 8 +- 46 files changed, 918 insertions(+), 247 deletions(-) create mode 100644 doc/architecture/blueprints/pods/pods-feature-data-migration.md create mode 100644 doc/architecture/blueprints/pods/pods-feature-database-sequences.md create mode 100644 doc/architecture/blueprints/pods/pods-feature-graphql.md create mode 100644 doc/architecture/blueprints/pods/pods-feature-organizations.md create mode 100644 doc/architecture/blueprints/pods/pods-feature-router-endpoints-classification.md create mode 100644 lib/api/entities/markdown.rb diff --git a/.gitpod.yml b/.gitpod.yml index 535c60b42c8..3522ea0fca2 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,28 +1,38 @@ +# Gitpod file reference +# https://www.gitpod.io/docs/configure/workspaces/tasks + image: registry.gitlab.com/gitlab-org/gitlab-development-kit/gitpod-workspace:stable tasks: - name: GDK + # "command:" emits gitpod-start + before: | + START_UNIXTIME="$(date +%s)" + echo START_UNIXTIME="$(date +%s)" > /workspace/gitpod_start_time.sh command: | - echo START_TIME_IN_SECONDS="$(date +%s)" | tee /workspace/gitpod_start_time.sh + # send signal to other tasks that Gitpod started gp sync-done gitpod-start + echo "Waiting for other task to copy GDK.." gp sync-await gdk-copied && cd /workspace/gitlab-development-kit && gdk help - - init: | - echo "$(date) – Copying GDK" | tee -a /workspace/startup.log - cp -r $HOME/gitlab-development-kit /workspace/ + - name: GitLab + # "command:" emits gdk-copied + init: | ( set -e + echo "$(date) – Copying GDK" | tee -a /workspace/startup.log + cp -r $HOME/gitlab-development-kit /workspace/ cd /workspace/gitlab-development-kit - # Ensure GitLab directory is symlinked under the GDK + # ensure GitLab directory is symlinked under the GDK ln -nfs "$GITPOD_REPO_ROOT" /workspace/gitlab-development-kit/gitlab - mv /workspace/gitlab-development-kit/secrets.yml /workspace/gitlab-development-kit/gitlab/config + mv -v /workspace/gitlab-development-kit/secrets.yml /workspace/gitlab-development-kit/gitlab/config # ensure gdk.yml has correct instance settings - gdk config set gitlab.rails.port 443 - gdk config set gitlab.rails.https.enabled true - gdk config set webpack.host 127.0.0.1 - gdk config set webpack.static false - gdk config set webpack.live_reload false + gdk config set gitlab.rails.port 443 |& tee -a /workspace/startup.log + gdk config set gitlab.rails.https.enabled true |& tee -a /workspace/startup.log + gdk config set webpack.host 127.0.0.1 |& tee -a /workspace/startup.log + gdk config set webpack.static false |& tee -a /workspace/startup.log + gdk config set webpack.live_reload false |& tee -a /workspace/startup.log # reconfigure GDK echo "$(date) – Reconfiguring GDK" | tee -a /workspace/startup.log gdk reconfigure @@ -36,9 +46,9 @@ tasks: ) command: | ( - gp sync-await gitpod-start set -e gp sync-done gdk-copied + gp sync-await gitpod-start [[ -f /workspace/gitpod_start_time.sh ]] && source /workspace/gitpod_start_time.sh SECONDS=0 cd /workspace/gitlab-development-kit @@ -67,15 +77,14 @@ tasks: make gitlab-db-migrate fi cd /workspace/gitlab-development-kit/gitlab - # Display which branch we're on - git branch --show-current - # Install Lefthook + echo "--- on branch: $(git branch --show-current)" + echo "--- installing lefthook" bundle exec lefthook install + echo "--- resetting db/structure.sql" git checkout db/structure.sql - cd /workspace/gitlab-development-kit - # Waiting for GitLab ... + echo "--- waiting for GitLab" gp ports await 3000 - printf "Waiting for GitLab at $(gp url 3000) ..." + printf "Awaiting /-/readiness on $(gp url 3000) ..." # Check /-/readiness which returns JSON, but we're only interested in the exit code # # We use http://localhost:3000 instead of the public hostname because @@ -86,7 +95,7 @@ tasks: printf "$(date) – GitLab is up (took ~%.1f minutes)\n" "$((10*$SECONDS/60))e-1" | tee -a /workspace/startup.log gp preview $(gp url 3000) || true PREBUILD_LOG=(/workspace/.gitpod/prebuild-log-*) - [[ -f /workspace/gitpod_start_time.sh ]] && printf "Took %.1f minutes from https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitpod.yml being executed through to completion %s\n" "$((10*(($(date +%s)-${START_TIME_IN_SECONDS}))/60))e-1" "$([[ -f "$PREBUILD_LOG" ]] && echo "With Prebuilds")" + [[ -f /workspace/gitpod_start_time.sh ]] && printf "Took %.1f minutes from https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitpod.yml being executed through to completion %s\n" "$((10*(($(date +%s)-${START_UNIXTIME}))/60))e-1" "$([[ -f "$PREBUILD_LOG" ]] && echo "With Prebuilds")" ) ports: @@ -116,5 +125,5 @@ vscode: - karunamurti.haml@1.4.1 - octref.vetur@0.36.0 - dbaeumer.vscode-eslint@2.2.6 - - GitLab.gitlab-workflow@3.48.1 + - GitLab.gitlab-workflow@3.56.0 - DavidAnson.vscode-markdownlint@0.47.0 diff --git a/app/assets/javascripts/packages_and_registries/container_registry/explorer/graphql/index.js b/app/assets/javascripts/packages_and_registries/container_registry/explorer/graphql/index.js index 9694bfd4e77..9b062024d03 100644 --- a/app/assets/javascripts/packages_and_registries/container_registry/explorer/graphql/index.js +++ b/app/assets/javascripts/packages_and_registries/container_registry/explorer/graphql/index.js @@ -4,11 +4,29 @@ import createDefaultClient from '~/lib/graphql'; Vue.use(VueApollo); +export const mergeVariables = (existing, incoming) => { + if (!incoming) return existing; + if (!existing) return incoming; + return incoming; +}; + export const apolloProvider = new VueApollo({ defaultClient: createDefaultClient( {}, { batchMax: 1, + cacheConfig: { + typePolicies: { + ContainerRepositoryDetails: { + fields: { + tags: { + keyArgs: ['id'], + merge: mergeVariables, + }, + }, + }, + }, + }, }, ), }); diff --git a/app/assets/javascripts/packages_and_registries/container_registry/explorer/pages/details.vue b/app/assets/javascripts/packages_and_registries/container_registry/explorer/pages/details.vue index 8b66165a57a..b339c8c8371 100644 --- a/app/assets/javascripts/packages_and_registries/container_registry/explorer/pages/details.vue +++ b/app/assets/javascripts/packages_and_registries/container_registry/explorer/pages/details.vue @@ -31,6 +31,7 @@ import { import deleteContainerRepositoryTagsMutation from '../graphql/mutations/delete_container_repository_tags.mutation.graphql'; import getContainerRepositoryDetailsQuery from '../graphql/queries/get_container_repository_details.query.graphql'; import getContainerRepositoryTagsQuery from '../graphql/queries/get_container_repository_tags.query.graphql'; +import getContainerRepositoriesDetails from '../graphql/queries/get_container_repositories_details.query.graphql'; const REPOSITORY_IMPORTING_ERROR_MESSAGE = 'repository importing'; @@ -145,6 +146,13 @@ export default { query: getContainerRepositoryTagsQuery, variables: { ...this.queryVariables, first: GRAPHQL_PAGE_SIZE }, }, + { + query: getContainerRepositoriesDetails, + variables: { + fullPath: this.config.isGroupPage ? this.config.groupPath : this.config.projectPath, + isGroupPage: this.config.isGroupPage, + }, + }, ], }); diff --git a/app/assets/javascripts/related_issues/index.js b/app/assets/javascripts/related_issues/index.js index 0204613e19c..c77a67c4287 100644 --- a/app/assets/javascripts/related_issues/index.js +++ b/app/assets/javascripts/related_issues/index.js @@ -18,7 +18,6 @@ export function initRelatedIssues(issueType = 'issue') { fullPath: el.dataset.fullPath, hasIssueWeightsFeature: parseBoolean(el.dataset.hasIssueWeightsFeature), hasIterationsFeature: parseBoolean(el.dataset.hasIterationsFeature), - projectNamespace: el.dataset.projectNamespace, }, render: (createElement) => createElement(RelatedIssuesRoot, { diff --git a/app/assets/javascripts/vue_merge_request_widget/components/state_container.vue b/app/assets/javascripts/vue_merge_request_widget/components/state_container.vue index 5c390c675fa..66e33a08a12 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/state_container.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/state_container.vue @@ -83,7 +83,7 @@ export default {
diff --git a/app/assets/javascripts/work_items/components/work_item_detail.vue b/app/assets/javascripts/work_items/components/work_item_detail.vue index a29d0e38570..7e9fa24e3f5 100644 --- a/app/assets/javascripts/work_items/components/work_item_detail.vue +++ b/app/assets/javascripts/work_items/components/work_item_detail.vue @@ -499,6 +499,7 @@ export default { :work-item-type="workItemType" :fetch-by-iid="fetchByIid" :query-variables="queryVariables" + :full-path="fullPath" @error="updateError = $event" /> diff --git a/app/assets/javascripts/work_items/components/work_item_links/index.js b/app/assets/javascripts/work_items/components/work_item_links/index.js index 72a46f16bcf..0251dcc33fa 100644 --- a/app/assets/javascripts/work_items/components/work_item_links/index.js +++ b/app/assets/javascripts/work_items/components/work_item_links/index.js @@ -17,7 +17,6 @@ export default function initWorkItemLinks() { wiHasIssueWeightsFeature, iid, wiHasIterationsFeature, - projectNamespace, } = workItemLinksRoot.dataset; // eslint-disable-next-line no-new @@ -34,7 +33,6 @@ export default function initWorkItemLinks() { fullPath: projectPath, hasIssueWeightsFeature: wiHasIssueWeightsFeature, hasIterationsFeature: wiHasIterationsFeature, - projectNamespace, }, render: (createElement) => createElement('work-item-links', { diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue index c45198bd5d3..3d469b790a1 100644 --- a/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue +++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue @@ -1,5 +1,13 @@ @@ -267,15 +287,26 @@ export default { {{ childrenCountLabel }}
- - {{ $options.i18n.addChildButtonLabel }} - + + {{ $options.i18n.createChildOptionLabel }} + + + {{ $options.i18n.addChildOptionLabel }} + +
diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue index 07a253369bb..095ea86e0d8 100644 --- a/app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue +++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_links_form.vue @@ -1,18 +1,21 @@