Having two states that essentially mean the same thing is very much like
having a boolean "true" and boolean "mostly-true": it's rather silly.
This commit merges the "reopened" state into the "opened" state while
taking care of system notes still showing messages along the lines of
"Alice reopened this issue".
A big benefit from having only two states (opened and closed) is that
indexing and querying becomes simpler and more performant. For example,
to get all the opened queries we no longer have to query both states:
SELECT *
FROM issues
WHERE project_id = 2
AND state IN ('opened', 'reopened');
Instead we can query a single state directly, which can be much faster:
SELECT *
FROM issues
WHERE project_id = 2
AND state = 'opened';
Further, only having two states makes indexing easier as we will only
ever filter (and thus scan an index) using a single value. Partial
indexes could help but aren't supported on MySQL, complicating the
development process and not being helpful for MySQL.
This is allowed for existing instances so we don't end up 76 offenses
right away, but for new code one should _only_ use this if they _have_
to remove non database data. Even then it's usually better to do this in
a service class as this gives you more control over how to remove the
data (e.g. in bulk).
* upstream/master: (888 commits)
Fix Rubocop offense
Use a previous approach for cycle analytics dummy pipeline
Allow admin to disable all restricted visibility levels
Removes file_name_regex from Gitlab::Regex
Remove IIFEs around several javascript classes
Update CHANGELOG.md for 9.3.5
Add ProjectPathHelper cop
Create and use project path helpers that only need a project, no namespace
Handles realtime with 2 states for environments table
Revert "Merge branch '18000-remember-me-for-oauth-login' into 'master'"
Allow creation of files and directories with spaces in web UI
Disable Flipper memoizer in tests to avoid transient failures
Introduce cache policies for CI jobs
fix sidebar padding for full-width items (Time Tracking help)
Replace 'snippets/snippets.feature' spinach with rspec
Rename ci_config_file to ci_config_path
Add back Pipeline#ci_yaml_file_path due to all the troubles
Revert change to design. Go back to scrollable page
Fix cycle analytics tests by making pipeline valid
Fixes the column widths for the new navigation options in settings
...
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/27070
Deprecate "chat commands" in favor of "slash commands"
We looked for things like:
- `slash commmand`
- `slash_command`
- `slash-command`
- `SlashCommand`
Add OpenSSL::SSL::SSLError to rescue in JiraService & IssueTrackerService. This
will prevent an exception in production and instead display
a message to the user.
- Tests for prometheus queries
- fix rubocop warnings
- Remove unused method. Add more queries to deployment queries.
- Wrap BaseQuery in module hierarchy
Renname Prometheus class to PrometheusClient
The notify_only_default_branch property is using boolean_accessor
this means we need to check it using a question methods.
Also add specs for disabling this option.
In the pipeline message, the duration of the pipeline was shown as:
> gitlab-org/gitlab-ee: Pipeline #8002259 of master branch by Douwe Maan
failed in 8612 seconds
But this many seconds only gave me a clue how long the pipeline took,
so now this will be shown as something like: 02:20:12 which gives a much
better measure of time.