- 04 Feb, 2020 40 commits
-
-
Bob Van Landuyt authored
So we can go through them one by one to fix them
-
Bob Van Landuyt authored
This disables the cops for current offences, so we can get to them fixed 1 by 1.
-
Bob Van Landuyt authored
This adds 2 cops for jobs scheduled that will likely miss context information: *CronWorkerContext* Cron-Workers themselves run instance wide, so they aren't scoped to users, namespaces, projects or other resources that should be added to the context. However, they often schedule other jobs that _do_ require context. That is why the there needs to be an indication of context somewhere in the worker. This can be done by using one of the following methods: 1. Wrap the code that schedules jobs in the `with_context` helper: def perform deletion_cutoff = Gitlab::CurrentSettings .deletion_adjourned_period.days.ago.to_date projects = Project.with_route.with_namespace .aimed_for_deletion(deletion_cutoff) projects.find_each(batch_size: 100).with_index do |project, index| delay = index * INTERVAL with_context(project: project) do AdjournedProjectDeletionWorker.perform_in(delay, project.id) end end end 2. Use the a batch scheduling method that provides context def schedule_projects_in_batch(projects) ProjectImportScheduleWorker.bulk_perform_async_with_contexts( projects, arguments_proc: -> (project) { project.id }, context_proc: -> (project) { { project: project } } ) end *BulkPerformWithContext* Often, when scheduling jobs in bulk, these jobs should have a separate context rather than the overarching context. If that is the case, `bulk_perform_async` can be replaced by the `bulk_perform_async_with_context` helper, and instead of `bulk_perform_in` use `bulk_perform_in_with_context`. For example: ProjectImportScheduleWorker.bulk_perform_async_with_contexts( projects, arguments_proc: -> (project) { project.id }, context_proc: -> (project) { { project: project } } ) Each object from the array in the first argument is yielded into 2 blocks: The `arguments_proc` which needs to the return the list of arguments the job needs to be scheduled with. The `context_proc` which needs to return a hash with the context information for the job. When providing objects for a context, please make sure to load the relevant relations. For routables (namespace, project), use `.with_route`, for projects also include the namespace using `.with_namespace`.
-
Bob Van Landuyt authored
Refactor issue update service spec Closes #198012 See merge request gitlab-org/gitlab!23663
-
Achilleas Pipinellis authored
Remove weekly update note See merge request gitlab-org/gitlab!24073
-
Natalia Tepluhina authored
Refactor docker container expiration policy form See merge request gitlab-org/gitlab!24276
-
Nicolò Maria Mezzopera authored
- generate select programmatically - adjust tests - separate fields from form
-
Jan Provaznik authored
Switch between cloud providers in cluster creation screen Closes #34802 See merge request gitlab-org/gitlab!23362
-
Enrique Alcántara authored
In the cluster creation UI, always display the cloud provider links to allow the user to switch between cloud providers.
-
Achilleas Pipinellis authored
Add warning that AWS HA install steps are under revision See merge request gitlab-org/gitlab!24283
-
Collen authored
-
Achilleas Pipinellis authored
Improve container registry API docs See merge request gitlab-org/gitlab!24178
-
Thomas Klausner authored
-
Achilleas Pipinellis authored
Changed dependencies to reflect required array of strings See merge request gitlab-org/gitlab!24230
-
Achilleas Pipinellis authored
Docs: add note on how to bypass overcommit See merge request gitlab-org/gitlab!24304
-
Sanad Liaquat authored
De-quarantine AutoDevOps QA e2e test Closes #198515 and #118481 See merge request gitlab-org/gitlab!24311
-
Shinya Maeda authored
Replace set with let_it_be in EE specs (batch 2) See merge request gitlab-org/gitlab!22990
-
Vitali Tatarintev authored
Contributes to a removal of rspec-set gem
-
Bob Van Landuyt authored
Admin mode in sidekiq jobs Closes #35717 See merge request gitlab-org/gitlab!21792
-
Diego Louzán authored
Add client & server middlewares to support admin mode in Sidekiq jobs Extend CurrentUserMode to enable setting admin user in RequestStore
-
Sean McGivern authored
Rename Storage::HashedProject to Storage::Hashed See merge request gitlab-org/gitlab!24071
-
Mark Florian authored
Step 1 - Fix `job_app` initialization and cleaning up of side-effects See merge request gitlab-org/gitlab!23838
-
Lin Jen-Shin authored
Use 'rules' in '.gitlab/ci/cache-repo.gitlab-ci.yml' See merge request gitlab-org/gitlab!24306
-
Lin Jen-Shin authored
Use 'rules' in '.gitlab/ci/cng.gitlab-ci.yml' See merge request gitlab-org/gitlab!24308
-
Sean McGivern authored
Optimize issue search when sorting by due date and position See merge request gitlab-org/gitlab!24217
-
Rémy Coutable authored
Improves message UI on Microsoft Teams notification integration Closes #198009 See merge request gitlab-org/gitlab!23385
-
Sean McGivern authored
Fix Elasticsearch BadRequest exception See merge request gitlab-org/gitlab!24280
-
Martin Wortschack authored
Resolve "Design discussion note preview is broken" See merge request gitlab-org/gitlab!24288
-
Natalia Tepluhina authored
-
Imre Farkas authored
Package api sorting Closes #35527 See merge request gitlab-org/gitlab!20963
-
Rémy Coutable authored
Pass MR vars to downstream pipelines via `scripts/trigger-build` See merge request gitlab-org/gitlab!24327
-
Rémy Coutable authored
Enable reCAPTCHA check on sign up See merge request gitlab-org/gitlab!24274
-
James Lopez authored
Merge branch '201763-some-examples-in-ee-spec-controllers-projects-tracings_controller_spec-rb-are-only-passing' into 'master' Fix a flaky 'Projects::TracingsController' test Closes #201763 See merge request gitlab-org/gitlab!24301
-
Martin Wortschack authored
Allow submit to event to trigger a new search Closes #201733 See merge request gitlab-org/gitlab!24262
-
Lin Jen-Shin authored
Use 'rules' for all frontend jobs See merge request gitlab-org/gitlab!24061
-
Martin Wortschack authored
Merge branch '33128-cannot-find-projects-within-subgroups-when-you-select-a-top-level-group-in-productivity' into 'master' Resolve "Cannot find projects within subgroups when you select a top-level group in productivity analytics" Closes #33128 See merge request gitlab-org/gitlab!24335
-
Francisco Javier López authored
-
Martin Wortschack authored
Resolve "Productivity Analytics: Limit graph scales to whole numbers" Closes #32075 See merge request gitlab-org/gitlab!23140
-
Ash McKenzie authored
Add API to "Play" a scheduled pipeline immediately Closes #201786 See merge request gitlab-org/gitlab!23718
-
Kushal Pandya authored
Move epic tests to jest See merge request gitlab-org/gitlab!24268
-