Rename job trace to job logs in code
As mentioned in https://docs.gitlab.com/ee/administration/job_logs.html, we renamed job trace to job log in GitLab 12.5, but we still often use the term trace
internally because our code still uses the legacy name. We also use the term live trace
for https://docs.gitlab.com/ee/administration/job_logs.html#enabling-incremental-logging.
How hard is it for us to update this in as many places as possible to avoid this confusion? Potential places where I think we might be able to rename today:
General Code
$ git grep -i job_trace
$ git grep "job trace"
app/services/ci/archive_trace_service.rb: Gitlab::Metrics.counter(:job_trace_archive_failed_total,
spec/services/ci/archive_trace_service_spec.rb: .with(:job_trace_archive_failed_total, "Counter of failed attempts of trace archiving")
spec/tasks/gitlab/artifacts/migrate_rake_spec.rb: let!(:job_trace) { create(:ci_job_artifact, :trace, file_store: store) }
spec/tasks/gitlab/artifacts/migrate_rake_spec.rb: expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::REMOTE)
spec/tasks/gitlab/artifacts/migrate_rake_spec.rb: expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::LOCAL)
spec/tasks/gitlab/artifacts/migrate_rake_spec.rb: expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::REMOTE)
spec/tasks/gitlab/artifacts/migrate_rake_spec.rb: let!(:job_trace) { create(:ci_job_artifact, :trace, file_store: store) }
spec/tasks/gitlab/artifacts/migrate_rake_spec.rb: expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::LOCAL)
spec/tasks/gitlab/artifacts/migrate_rake_spec.rb: expect(job_trace.reload.file_store).to eq(ObjectStorage::Store::LOCAL)
doc/ci/environments/index.md: job page, it's displayed above the job trace:
lib/api/ci/runner.rb: desc 'Appends a patch to the job trace' do
spec/features/projects/jobs_spec.rb: it 'loads job trace' do
spec/requests/api/ci/jobs_spec.rb: it 'returns specific job trace' do
spec/requests/api/ci/jobs_spec.rb: it 'returns specific job trace' do
spec/requests/api/ci/jobs_spec.rb: it 'returns specific job trace' do
spec/requests/api/ci/jobs_spec.rb: it 'does not return specific job trace' do
spec/requests/api/ci/runner/jobs_trace_spec.rb: context 'when the job trace is too big' do
spec/support/shared_examples/lib/gitlab/ci/ci_trace_shared_examples.rb: # We check the before setup actually sets up job trace_chunks
spec/support/shared_examples/lib/gitlab/ci/ci_trace_shared_examples.rb: it 'has job trace_chunks' do
Javascript
$ git grep -i "job.*trace" | grep \.js
app/assets/javascripts/ide/stores/modules/pipelines/actions.js: .get(`${state.detailJob.path}/trace`, { params: { format: 'json' } })
app/assets/javascripts/jobs/store/actions.js: return Promise.all([dispatch('fetchJob'), dispatch('fetchTrace')]);
app/assets/javascripts/jobs/store/actions.js: * Job's Trace
app/assets/javascripts/jobs/store/getters.js: * Checks if it the job has trace.
app/assets/javascripts/jobs/store/getters.js: state.job.has_trace || (!isEmpty(state.job.status) && state.job.status.group === 'running');
app/assets/javascripts/jobs/store/mutations.js: // When the job still does not have a trace
Specs
ee/spec/frontend/environments_dashboard/components/mock_environment.json: "title": "This job does not have a trace."
ee/spec/frontend/security_dashboard/mock_data/jobs.js: downloadPath: '/debug-cov-fuzz-project/-/jobs/1133/artifacts/download?file_type=trace',
ee/spec/frontend/security_dashboard/mock_data/jobs.js: downloadPath: '/debug-cov-fuzz-project/-/jobs/1131/artifacts/download?file_type=trace',
spec/features/projects/jobs_spec.rb: context 'when job is failed but has no trace', :js do
spec/features/projects/jobs_spec.rb: describe "GET /:project/jobs/:id/trace.json" do
spec/frontend/environments/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/components/job_app_spec.js: const setupAndMount = ({ jobData = {}, traceData = {} } = {}) => {
spec/frontend/jobs/components/job_app_spec.js: const findJobTraceScrollTop = () => wrapper.find('[data-testid="job-controller-scroll-top"]');
spec/frontend/jobs/components/job_app_spec.js: const findJobTraceScrollBottom = () =>
spec/frontend/jobs/components/job_app_spec.js: const findJobTraceController = () => wrapper.find('[data-testid="job-raw-link-controller"]');
spec/frontend/jobs/components/job_app_spec.js: const findJobTraceEraseLink = () => wrapper.find('[data-testid="job-log-erase-link"]');
spec/frontend/jobs/components/job_app_spec.js: it('renders empty state when job does not have trace and is not running', () =>
spec/frontend/jobs/components/job_app_spec.js: it('does not render empty state when job does not have trace but it is running', () =>
spec/frontend/jobs/components/job_app_spec.js: it('does not render empty state when job has trace but it is not running', () =>
spec/frontend/jobs/components/job_app_spec.js: setupAndMount({ jobData: { has_trace: true } }).then(() => {
spec/frontend/jobs/components/job_app_spec.js: expect(findJobTraceScrollTop().exists()).toBe(true);
spec/frontend/jobs/components/job_app_spec.js: expect(findJobTraceScrollBottom().exists()).toBe(true);
spec/frontend/jobs/components/job_app_spec.js: expect(findJobTraceController().exists()).toBe(true);
spec/frontend/jobs/components/job_app_spec.js: expect(findJobTraceEraseLink().exists()).toBe(true);
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: title: 'This job does not have a trace.',
spec/frontend/jobs/mock_data.js: downloadPath: '/root/ci-project/-/jobs/2336/artifacts/download?file_type=trace',
spec/frontend/jobs/mock_data.js: downloadPath: '/root/test-job-artifacts/-/jobs/1982/artifacts/download?file_type=trace',
spec/frontend/jobs/store/actions_spec.js: { pagePath: 'job/872324/trace.json' },
spec/frontend/jobs/store/actions_spec.js: [{ type: types.SET_TRACE_OPTIONS, payload: { pagePath: 'job/872324/trace.json' } }],
spec/frontend/jobs/store/getters_spec.js: localState.job.has_trace = true;
spec/frontend/jobs/store/getters_spec.js: localState.job.has_trace = false;
spec/frontend/jobs/store/getters_spec.js: localState.job.has_trace = false;
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/pipelines/linked_pipelines_mock.json: "title": "This job does not have a trace."
spec/frontend/vue_shared/security_reports/mock_data.js: '/gitlab-org/secrets-detection-test/-/jobs/1399/artifacts/download?file_type=trace',
spec/frontend/vue_shared/security_reports/mock_data.js: '/gitlab-org/secrets-detection-test/-/jobs/1400/artifacts/download?file_type=trace',
spec/frontend/vue_shared/security_reports/mock_data.js: '/gitlab-org/secrets-detection-test/-/jobs/1401/artifacts/download?file_type=trace',
spec/frontend/vue_shared/security_reports/mock_data.js: '/gitlab-org/secrets-detection-test/-/jobs/1402/artifacts/download?file_type=trace',
spec/frontend/vue_shared/security_reports/mock_data.js: '/gitlab-org/secrets-detection-test/-/jobs/1399/artifacts/download?file_type=trace',
spec/frontend/vue_shared/security_reports/mock_data.js: '/gitlab-org/secrets-detection-test/-/jobs/1400/artifacts/download?file_type=trace',
spec/frontend/vue_shared/security_reports/mock_data.js: '/gitlab-org/secrets-detection-test/-/jobs/1401/artifacts/download?file_type=trace',
spec/frontend/vue_shared/security_reports/mock_data.js: '/gitlab-org/secrets-detection-test/-/jobs/1402/artifacts/download?file_type=trace',
spec/frontend/vue_shared/security_reports/mock_data.js: * These correspond to any jobs with trace data in the securityReportMergeRequestDownloadPathsQueryResponse above.
spec/frontend/vue_shared/security_reports/mock_data.js: path: '/gitlab-org/secrets-detection-test/-/jobs/1399/artifacts/download?file_type=trace',
spec/frontend/vue_shared/security_reports/mock_data.js: path: '/gitlab-org/secrets-detection-test/-/jobs/1400/artifacts/download?file_type=trace',
spec/frontend/vue_shared/security_reports/mock_data.js: path: '/gitlab-org/secrets-detection-test/-/jobs/1401/artifacts/download?file_type=trace',
spec/frontend/vue_shared/security_reports/mock_data.js: path: '/gitlab-org/secrets-detection-test/-/jobs/1402/artifacts/download?file_type=trace',
Edited by Sam Beckham