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 @@