Flaky spec: ./spec/features/cycle_analytics_spec.rb:70
requested to merge 338011-flaky-spec-spec-features-cycle_analytics_spec-rb-70-value-stream-analytics-as-an-allowed into master
Flaky spec: ./spec/features/cycle_analytics_spec.rb:70 Value Stream Analytics as an allowed user when there's value stream analytics data shows data on each stage
What does this MR do?
The created_before
param is set to before the MR is created, thus it gets filtered out
From: /Users/bwalker/dev/gitlab/ee/gitlab/app/finders/concerns/created_at_filter.rb:6 CreatedAtFilter#by_created_at:
4: def by_created_at(items)
5: binding.pry
=> 6: items = items.created_before(params[:created_before]) if params[:created_before].present?
7: items = items.created_after(params[:created_after]) if params[:created_after].present?
8:
9: items
10: end
[1] pry(#<MergeRequestsFinder>)> params
=> {"current_user"=>#<User id:91 @user1>,
"end_event_filter"=>:finished,
"project_id"=>31,
"created_after"=>2021-07-19 00:00:00 UTC,
"created_before"=>2021-08-18 23:59:59.999999999 UTC,
"assignee_username"=>nil,
"author_username"=>nil,
"milestone_title"=>nil,
"label_name"=>nil,
"project_ids"=>[]}
[2] pry(#<MergeRequestsFinder>)> items.first.created_at
=> Thu, 19 Aug 2021 21:16:08.939290000 UTC +00:00
[5] pry(#<MergeRequestsFinder>)> items.first.created_at.to_time
=> 2021-08-19 16:16:08.93929 -0500
[6] pry(#<MergeRequestsFinder>)> params[:created_before].to_time
=> 2021-08-18 18:59:59.999999999 -0500
[8] pry(#<MergeRequestsFinder>)> params[:created_after].to_time
=> 2021-07-18 19:00:00 -0500
Since created_after
and created_before
span the last 30 days, let's make sure the MR is created within those 30 days by freezing time 5 days before the current time.
Screenshots or Screencasts (strongly suggested)
How to setup and validate locally (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have added/updated documentation, or it's not needed. (Is documentation required?) -
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) -
I have tested this MR in all supported browsers, or it's not needed. -
I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.
Security
Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #338011 (closed)
Edited by Brett Walker