Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
30d7535b
Commit
30d7535b
authored
Oct 09, 2021
by
Chad Woolley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add spring support to rails/rake binstubs"
This reverts commit
28f82411
.
parent
c9ec6e4e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
28 deletions
+20
-28
.gitlab/ci/static-analysis.gitlab-ci.yml
.gitlab/ci/static-analysis.gitlab-ci.yml
+11
-3
bin/rails
bin/rails
+0
-5
bin/rake
bin/rake
+0
-5
lib/gitlab/popen/runner.rb
lib/gitlab/popen/runner.rb
+2
-15
lib/tasks/lint.rake
lib/tasks/lint.rake
+7
-0
No files found.
.gitlab/ci/static-analysis.gitlab-ci.yml
View file @
30d7535b
...
...
@@ -24,11 +24,8 @@ static-analysis:
extends
:
-
.static-analysis-base
-
.static-analysis:rules:ee-and-foss
-
.use-pg12
stage
:
test
parallel
:
4
variables
:
SETUP_DB
:
"
true"
script
:
-
run_timed_command "retry yarn install --frozen-lockfile"
-
scripts/static-analysis
...
...
@@ -38,6 +35,17 @@ static-analysis:
paths
:
-
tmp/feature_flags/
static-analysis-with-database
:
extends
:
-
.static-analysis-base
-
.static-analysis:rules:ee-and-foss
-
.use-pg12
stage
:
test
script
:
-
bundle exec rake lint:static_verification_with_database
variables
:
SETUP_DB
:
"
true"
static-analysis as-if-foss
:
extends
:
-
static-analysis
...
...
bin/rails
View file @
30d7535b
#!/usr/bin/env ruby
begin
load
File
.
expand_path
(
'../spring'
,
__FILE__
)
rescue
LoadError
=>
e
raise
unless
e
.
message
.
include?
(
'spring'
)
end
APP_PATH
=
File
.
expand_path
(
'../config/application'
,
__dir__
)
require_relative
'../config/boot'
require
'rails/commands'
bin/rake
View file @
30d7535b
#!/usr/bin/env ruby
begin
load
File
.
expand_path
(
'../spring'
,
__FILE__
)
rescue
LoadError
=>
e
raise
unless
e
.
message
.
include?
(
'spring'
)
end
require_relative
'../config/boot'
require
'rake'
Rake
.
application
.
run
lib/gitlab/popen/runner.rb
View file @
30d7535b
...
...
@@ -31,7 +31,7 @@ module Gitlab
end
def
all_stderr_empty?
results
.
all?
{
|
result
|
stderr_empty_ignoring_spring
(
result
)
}
results
.
all?
{
|
result
|
result
.
stderr
.
empty?
}
end
def
failed_results
...
...
@@ -40,22 +40,9 @@ module Gitlab
def
warned_results
results
.
select
do
|
result
|
result
.
status
.
success?
&&
!
stderr_empty_ignoring_spring
(
result
)
result
.
status
.
success?
&&
!
result
.
stderr
.
empty?
end
end
private
# NOTE: This is sometimes required instead of just calling `result.stderr.empty?`, if we
# want to ignore the spring "Running via Spring preloader..." output to STDERR.
# The `Spring.quiet=true` method which spring supports doesn't work, because it doesn't
# work to make it quiet when using spring binstubs (the STDERR is printed by `bin/spring`
# itself when first required, so there's no opportunity to set Spring.quiet=true).
# This should probably be opened as a bug against Spring, with a pull request to support a
# `SPRING_QUIET` env var as well.
def
stderr_empty_ignoring_spring
(
result
)
result
.
stderr
.
empty?
||
result
.
stderr
=~
/\ARunning via Spring preloader in process [0-9]+\Z/
end
end
end
end
lib/tasks/lint.rake
View file @
30d7535b
...
...
@@ -12,6 +12,13 @@ unless Rails.env.production?
dev:load
]
do
Gitlab
::
Utils
::
Override
.
verify!
end
desc
"GitLab | Lint | Static verification with database"
task
static_verification_with_database:
%w[
lint:static_verification_env
dev:load
]
do
Gitlab
::
Utils
::
DelegatorOverride
.
verify!
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment