Commit Graph

500 Commits

Author SHA1 Message Date
Robert Speicher 260c8da060 Whitelist or fix additional `Gitlab/PublicSend` cop violations
An upcoming update to rubocop-gitlab-security added additional
violations.
2017-08-14 12:14:11 -04:00
Mehdi Lahmam 03d199fb10 Ensure `JIRA::Resource::Issue` responds to `resolution` before calling it 2017-08-03 15:25:47 +02:00
Gabriel Mazetto abb878326c Rename many path_with_namespace -> full_path 2017-08-01 07:26:58 +02:00
Yorick Peterse 6ef87a2083
Merge issuable "reopened" state into "opened"
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.
2017-07-28 13:31:51 +02:00
Jarka Kadlecova aa2b3ff1e4 Display specific error message when JIRA test fails 2017-07-27 07:51:36 +02:00
Jarka Kadlecova 1c57299400 Remove project_key from the Jira configuration 2017-07-25 17:25:41 +02:00
Jarka Kadlecova 7bee7b848a Support both internal and external issue trackers 2017-07-24 08:13:43 +02:00
Dimitrie Hoekstra defce26500 Resolve "Clarify k8s service keys" 2017-07-19 10:56:11 +00:00
Felipe Artur 3715c1cfb5 Fix external issue trackers redirect 2017-07-18 11:44:47 -03:00
Douwe Maan c81928cfa7 Include new URL helpers retroactively into includers of Gitlab::Routing 2017-07-07 10:43:37 -05:00
Kamil Trzciński e0b3257b36 Merge branch '33360-generate-kubeconfig' into 'master'
Generate KUBECONFIG in KubernetesService#predefined_variables

Closes #33360

See merge request !12223
2017-07-06 13:05:50 +00:00
Yorick Peterse 8fbbf41e29
Added Cop to blacklist the use of `dependent:`
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).
2017-07-06 12:01:36 +02:00
Lin Jen-Shin e7acc88156 Rename KUBECONFIG_FILE to KUBECONFIG 2017-07-06 15:55:40 +08:00
Lin Jen-Shin ef7deb18df Merge remote-tracking branch 'upstream/master' into 33360-generate-kubeconfig
* 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
  ...
2017-07-06 15:54:41 +08:00
Douwe Maan fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
Adam Niedzielski 9da3076944 Improve support for external issue references 2017-06-30 14:47:53 +02:00
Pawel Chojnacki e00f487049 Fix bug where Service `created_at` time was used instead of deployment time. 2017-06-22 21:19:55 +02:00
Pawel Chojnacki 97c42df3b8 Merge remote-tracking branch 'upstream/master' into 28717-additional-metrics-review-branch 2017-06-22 15:05:52 +02:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Douwe Maan 33d4a6e244 Remove backticks from chat messages because they're not rendered as code 2017-06-19 11:57:03 -05:00
Pawel Chojnacki 9f2c992ff1 Merge remote-tracking branch 'upstream/master' into 28717-additional-metrics-review-branch 2017-06-16 18:19:41 +02:00
Lin Jen-Shin 6eaec942e6 Changelog entry, doc, and only pass KUBECONFIG_FILE 2017-06-16 22:31:36 +08:00
Lin Jen-Shin 07a65da1d9 Generate KUBECONFIG in KubernetesService#predefined_variables 2017-06-16 22:15:40 +08:00
Eric Eastwood ea090291bb Rename "Slash commands" to "Quick actions"
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`
2017-06-15 09:01:56 -05:00
Nick Thomas fc6e3515a6 Backport EE changes to the Kubernetes service 2017-06-14 10:51:18 +01:00
Pawel Chojnacki 0e7e7c2f2b Test Additional metrics parser and fix query checking tests 2017-06-09 22:47:01 +02:00
Pawel Chojnacki f78fd3de5d Fix Additional metrics filtering
+ remove test button that was leftover after a bad merge
2017-06-08 12:29:53 +02:00
Pawel Chojnacki dbb3c28088 Merge remote-tracking branch 'upstream/master' into 28717-additional-metrics-review-branch
# Conflicts:
#	app/models/project_services/prometheus_service.rb
#	app/views/projects/services/_form.html.haml
2017-06-07 10:27:52 +02:00
Pawel Chojnacki a7e1205219 Use explicit instance of prometheus service and add access methods to it 2017-06-07 02:38:52 +02:00
kushalpandya b83a40483a Remove service help, add URL field help 2017-06-01 13:25:16 +05:30
Jarka Kadlecova 84c68bb140 Address MR comments 2017-06-01 07:47:16 +02:00
Jarka Kadlecova b71025c014 Add feature tests for improved JIRA settings 2017-06-01 07:47:15 +02:00
Jarka Kadlecova 33d82ccb45 simplify test&save actions when setting a service integration 2017-06-01 07:47:15 +02:00
Jarka Kadlecova ab8d54b26b Don’t create comment on JIRA if link already exists 2017-05-30 15:37:27 +02:00
Pawel Chojnacki c24d20da49 Merge remote-tracking branch 'upstream/master' into 28717-additional-metrics-review-branch 2017-05-30 10:12:45 +02:00
Jarka Kadlecova 6c17e4f04d Add API URL to JIRA settings 2017-05-26 15:14:38 +02:00
Pawel Chojnacki 61d7b7f117 Finalize refactoring additional metrics query 2017-05-25 15:05:56 +02:00
Pawel Chojnacki 2061414054 Additional metrics initial work, with working metrics listing, but without actoual metrics mesurements 2017-05-25 15:05:56 +02:00
Kamil Trzcinski 911e1c2d07 Fix terminals support for Kubernetes service
It was broken, because we introduced a default namespace, which was not used by terminal methods.
2017-05-25 15:03:39 +02:00
Chris Wilson 8c07184250 Rescue OpenSSL::SSL::SSLError in JiraService and IssueTrackerService
Add OpenSSL::SSL::SSLError to rescue in JiraService & IssueTrackerService. This
will prevent an exception in production and instead display
a message to the user.
2017-05-23 15:19:08 +10:00
Douwe Maan bec9ec9a6e Merge branch '27439-performance-deltas' into 'master'
Expose memory deltas between app deployments and refactor prometheus queries to support more custom queries

See merge request !10981
2017-05-12 17:15:31 +00:00
Douwe Maan ff82acf343 Consistently use monospace font for commit SHAs and branch and tag names 2017-05-12 09:55:25 -05:00
Pawel Chojnacki 693602d957 Keep presentation logic in one place and remove unecessary arguments.
+ fix tests
2017-05-11 23:07:12 +02:00
Pawel Chojnacki 4f824d2aec Custom queries for prometheus
- 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
2017-05-11 23:07:12 +02:00
Rémy Coutable 3db37e0562 Enable the Style/TrailingCommaInArguments cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Rémy Coutable d40e1f547e Enable the Style/TrailingCommaInLiteral cop
Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-05-10 18:25:45 +02:00
Sean McGivern 7ea12d8067 Merge branch 'mrchrisw-fix-slack-notify' into 'master'
Fix notify_only_default_branch check for Slack service

See merge request !11154
2017-05-09 08:18:48 +00:00
Fatih Acet 0151325dac Merge request widget redesign 2017-05-09 04:15:34 +00:00
Chris Wilson 52c8651a6c Fix notify_only_default_branch check for Slack service
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.
2017-05-08 15:55:02 +10:00
Z.J. van de Weg 5d4183e58d Convert seconds to minutes and hours on chat notifations
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.
2017-05-04 08:39:06 +02:00