CounterAttribute can provide counter initialisation
Release notes
Problem to solve
The following discussion from !35878 (merged) should be addressed:
-
@ayufan started a discussion: (+2 comments)
I wish that this interface would also define a way to "refresh" counter, fully.
Like:
counter_attribute :commit_count, init: ->(relation) { relation.project.repository.commit_count } counter_attribute :build_artifacts_size, init: ->(relation) { relation.project.job_artifacts.archive.sum(:size) }
Or:
counter_attribute :build_artifacts_size, init: :refresh_build_artifacts_size def refresh_build_artifacts_size(relation) relation.project.job_artifacts.in_batches.sum do |batch| batch.sum(:size) end end
Intended users
User experience goal
Proposal
Further details
Designs
- Show closed items
Relates to
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Kamil Trzciński changed milestone to %13.3
changed milestone to %13.3
- 🤖 GitLab Bot 🤖 added typefeature label
added typefeature label
- Kamil Trzciński assigned to @fabiopitino
assigned to @fabiopitino
- Fabio Pitino mentioned in issue #23327 (closed)
mentioned in issue #23327 (closed)
- Fabio Pitino marked this issue as related to #23327 (closed)
marked this issue as related to #23327 (closed)
- Jason Yavorska added pipeline processing label
added pipeline processing label
- Maintainer
@fabiopitino If this is blocking #23327 (closed), are you actively working on this? And is this issue actually ~"workflow::In dev"?
Collapse replies - Maintainer
@cheryl.li after checking this better I think it's not a blocker but more a related issue of #23327 (closed). We need to have a way to recalculate the artifacts size on-demand and this is what this idea is for. But it's not a blocker for the ~bug. We should first address the ~bug #23327 (closed) and we have already quite some work for it.
This issue is more a feature addition if we want to have a mechanism that force recalculating counters on-demand.
Edited by Fabio Pitino - Maintainer
I've unassigned myself as I'm not actively working on it.
- Maintainer
@fabiopitino Is it appropriate to remove ~performance as well? We typically have severities associated with ~performance issues (or we can denote a lower severity)
- Maintainer
@cheryl.li Yes. Removing the ~performance label. It's not directly related to performance but more a feature enhancement.
- Fabio Pitino removed the relation with #23327 (closed)
removed the relation with #23327 (closed)
- Fabio Pitino marked this issue as related to #23327 (closed)
marked this issue as related to #23327 (closed)
- Fabio Pitino unassigned @fabiopitino
unassigned @fabiopitino
- 🤖 GitLab Bot 🤖 added [deprecated] Accepting merge requests label
added [deprecated] Accepting merge requests label
- Maintainer
@thaoyeager This won't make ~13.3 and hasn't been started. Can I apply ~"candidate::13.5" given that we're probably at capacity with %13.4?
Collapse replies - Contributor
@cheryl.li I'll move to the backlog and applied ~"candidate::13.5" label.
- Thao Yeager changed milestone to %Backlog
changed milestone to %Backlog
- Thao Yeager added candidate14.1 label
added candidate14.1 label
- Thao Yeager changed the description
Compare with previous version changed the description
- Jason Yavorska added workflowplanning breakdown label
added workflowplanning breakdown label
- 🤖 GitLab Bot 🤖 added sectionops label
added sectionops label
- Darby Frey assigned to @fabiopitino
assigned to @fabiopitino
- Developer
@fabiopitino, assigning to you for weighting and refinement for %13.5
Collapse replies - Contributor
Unassigning @fabiopitino since I'm moving this to ~"candidate::13.6" based on Fabio's comment that we should work on ~bug #23327 (closed) first.
- Maintainer
@thaoyeager @darbyfrey changing feature label as this is ~"ci::artifacts"
1
- 🤖 GitLab Bot 🤖 removed [deprecated] Accepting merge requests label
removed [deprecated] Accepting merge requests label
- Thao Yeager added 1 deleted label and removed candidate14.1 label
added 1 deleted label and removed candidate14.1 label
- Thao Yeager unassigned @fabiopitino
unassigned @fabiopitino
- Fabio Pitino added CI artifacts label and removed pipeline processing label
added CI artifacts label and removed pipeline processing label
- Thao Yeager added 1 deleted label and removed 1 deleted label
added 1 deleted label and removed 1 deleted label
- Thao Yeager added candidate13.9 label and removed 1 deleted label
added candidate13.9 label and removed 1 deleted label
- Fabio Pitino removed bugperformance label
removed bugperformance label
- Thao Yeager removed candidate13.9 label
removed candidate13.9 label
- 🤖 GitLab Bot 🤖 added grouppipeline security label and removed grouppipeline execution label
added grouppipeline security label and removed grouppipeline execution label
- James Heimbuck added Category:Build Artifacts label
added Category:Build Artifacts label
- Max Orefice added workflowscheduling label and removed workflowplanning breakdown label
added workflowscheduling label and removed workflowplanning breakdown label
- 🤖 GitLab Bot 🤖 added sectionci label and removed sectionops label
added sectionci label and removed sectionops label
- Jocelyn Eillis added grouppipeline execution label and removed grouppipeline security label
added grouppipeline execution label and removed grouppipeline security label
- Jocelyn Eillis added Category:Job Artifacts label and removed grouppipeline execution label
added Category:Job Artifacts label and removed grouppipeline execution label
- 🤖 GitLab Bot 🤖 added grouppipeline execution label
added grouppipeline execution label