Add rubocop

Done! :)
Inspecting 45 files
CCCCCCW...WCCCCCC..CC.W.CC.WCCCCCC.CCCWW.CCCC

Offenses:

Gemfile:20:1: C: Extra blank line detected.
Gemfile:52:81: C: Line is too long. [83/80]
# gem 'bootstrap-sass'   # uncomment and $ rails generate layout:install bootstrap3
                                                                                ^^^
Gemfile:53:81: C: Line is too long. [85/80]
# gem 'foundation-rails' # uncomment and $ rails generate layout:install foundation5
                                                                                ^^^^^
Gemfile:53:85: C: Trailing whitespace detected.
# gem 'foundation-rails' # uncomment and $ rails generate layout:install foundation5
                                                                                ^
Gemfile:74:81: C: Line is too long. [88/80]
  gem 'sdoc', require: nil # bundle exec rake doc:rails generates the API under doc/api.
                                                                                ^^^^^^^^
Gemfile:83:81: C: Line is too long. [82/80]
gem 'figaro', github: 'laserlemon/figaro' # set env vars in config/application.yml
                                                                                ^^
Gemfile:100:3: C: Inconsistent indentation detected.
  gem 'hirb-unicode'
  ^^^^^^^^^^^^^^^^^^
Gemfile:102:3: C: Inconsistent indentation detected.
  gem 'byebug'
  ^^^^^^^^^^^^
Rakefile:2:81: C: Line is too long. [90/80]
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
                                                                                ^^^^^^^^^^
Rakefile:8:6: C: Use the new Ruby 1.9 hash syntax.
task :default => :spec
     ^^^^^^^^^^^
app/controllers/application_controller.rb:1:1: C: Missing top-level class documentation comment.
class ApplicationController < ActionController::Base
^^^^^
app/controllers/concerns/ensure_security_headers.rb:2:3: C: Missing top-level module documentation comment.
  module EnsureSecurityHeaders
  ^^^^^^
app/helpers/application_helper.rb:1:1: C: Missing top-level module documentation comment.
module ApplicationHelper
^^^^^^
app/helpers/date_format_helper.rb:3:1: C: Missing top-level module documentation comment.
module DateFormatHelper
^^^^^^
app/helpers/date_format_helper.rb:5:3: C: Use module_function instead of extend self.
  extend self
  ^^^^^^^^^^^
app/helpers/date_format_helper.rb:13:3: C: Assignment Branch Condition size for humanize is too high. [25.71/15]
  def humanize(secs)
  ^^^
app/helpers/date_format_helper.rb:13:3: C: Cyclomatic complexity for humanize is too high. [8/6]
  def humanize(secs)
  ^^^
app/helpers/date_format_helper.rb:13:3: C: Method has too many lines. [12/10]
  def humanize(secs)
  ^^^
app/helpers/date_format_helper.rb:13:3: C: Perceived complexity for humanize is too high. [8/7]
  def humanize(secs)
  ^^^
app/helpers/date_format_helper.rb:17:6: C: Space inside square brackets detected.
    [ [:millennium, 1000.years], [:century, 100.years], [:decade, 10.years], [:year, 1.year],
     ^
app/helpers/date_format_helper.rb:17:81: C: Line is too long. [93/80]
    [ [:millennium, 1000.years], [:century, 100.years], [:decade, 10.years], [:year, 1.year],
                                                                                ^^^^^^^^^^^^^
app/helpers/date_format_helper.rb:18:81: C: Line is too long. [94/80]
      [:month, 1.month], [:week, 1.week], [:day, 1.day], [:hour, 1.hour], [:minute, 1.minute],
                                                                                ^^^^^^^^^^^^^^
app/helpers/date_format_helper.rb:20:11: C: Avoid using {...} for multi-line blocks.
    ].map { |name, count|
          ^
app/helpers/date_format_helper.rb:22:81: C: Line is too long. [92/80]
      result << "#{n} #{name.to_s.pluralize(n)}" if (n > 0) || (count == 1 && result.empty?)
                                                                                ^^^^^^^^^^^^
app/models/singleton_process.rb:3:1: C: Class definition is too long. [209/100]
class SingletonProcess < ActiveRecord::Base
^^^^^
app/models/singleton_process.rb:13:81: C: Line is too long. [93/80]
  scope :dead_processes,  -> { where('updated_at < ?',  Time.now - CONSIDERED_DEAD_TIMEOUT) }
                                                                                ^^^^^^^^^^^^^
app/models/singleton_process.rb:14:81: C: Line is too long. [93/80]
  scope :alive_processes, -> { where('updated_at >= ?', Time.now - CONSIDERED_DEAD_TIMEOUT) }
                                                                                ^^^^^^^^^^^^^
app/models/singleton_process.rb:15:60: C: Redundant self detected.
  scope :processes_on_this_box, -> { where('hostname = ?', self.get_hostname) }
                                                           ^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:24:81: C: Line is too long. [82/80]
  # If not, somewhere within &block must call SingletonProcess.ping <process_type>
                                                                                ^^
app/models/singleton_process.rb:26:3: C: Method has too many lines. [22/10]
  def self.watchdog_loop(process_type, &block)
  ^^^
app/models/singleton_process.rb:27:5: C: Do not introduce global variables.
    $watchdog_loops ||= 0
    ^^^^^^^^^^^^^^^
app/models/singleton_process.rb:28:5: C: Do not introduce global variables.
    $watchdog_loops += 1
    ^^^^^^^^^^^^^^^
app/models/singleton_process.rb:29:47: C: Do not introduce global variables.
    $stderr.puts "watchdog_loop start count=#{$watchdog_loops} process_type=#{process_type}"
                                              ^^^^^^^^^^^^^^^
app/models/singleton_process.rb:29:81: C: Line is too long. [92/80]
    $stderr.puts "watchdog_loop start count=#{$watchdog_loops} process_type=#{process_type}"
                                                                                ^^^^^^^^^^^^
app/models/singleton_process.rb:32:38: C: Trailing whitespace detected.
        if acquire_lock(process_type)
                                     ^
app/models/singleton_process.rb:41:14: C: Trailing whitespace detected.
          end
             ^^
app/models/singleton_process.rb:48:5: C: Do not introduce global variables.
    $watchdog_loops -= 1
    ^^^^^^^^^^^^^^^
app/models/singleton_process.rb:56:3: C: Method has too many lines. [12/10]
  def self.dead_process_destroyer
  ^^^
app/models/singleton_process.rb:57:20: C: Do not introduce global variables.
    return true if $dead_process_destroyer_started
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:60:23: C: Trailing whitespace detected.
        (Thread.new do
                      ^
app/models/singleton_process.rb:62:13: C: Redundant self detected.
            self.dead_process_destroyer_foreground
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:76:65: C: Redundant self detected.
    alive_processes.where(process_type: process_type, hostname: self.get_hostname, pid: self.get_pid).first
                                                                ^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:76:81: C: Line is too long. [107/80]
    alive_processes.where(process_type: process_type, hostname: self.get_hostname, pid: self.get_pid).first
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:76:89: C: Redundant self detected.
    alive_processes.where(process_type: process_type, hostname: self.get_hostname, pid: self.get_pid).first
                                                                                ^^^^^^^^^^^^
app/models/singleton_process.rb:80:49: C: Redundant self detected.
    where(process_type: process_type, hostname: self.get_hostname, pid: self.get_pid).first
                                                ^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:80:73: C: Redundant self detected.
    where(process_type: process_type, hostname: self.get_hostname, pid: self.get_pid).first
                                                                        ^^^^^^^^^^^^
app/models/singleton_process.rb:80:81: C: Line is too long. [91/80]
    where(process_type: process_type, hostname: self.get_hostname, pid: self.get_pid).first
                                                                                ^^^^^^^^^^^
app/models/singleton_process.rb:88:16: W: Assignment in condition - you probably meant to use ==.
    if process = process_alive(process_type)
               ^
app/models/singleton_process.rb:94:16: W: Assignment in condition - you probably meant to use ==.
    if process = my_process_dead_or_alive(process_type)
               ^
app/models/singleton_process.rb:100:81: C: Line is too long. [88/80]
    return false unless hostname == self.class.get_hostname && pid == self.class.get_pid
                                                                                ^^^^^^^^
app/models/singleton_process.rb:101:1: C: Incorrect indentation detected (column 0 instead of 4).
#    $stderr.puts "Ping #{hostname}.#{pid}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:106:31: C: Redundant self detected.
    self.class.process_alive?(self.pid)
                              ^^^^^^^^
app/models/singleton_process.rb:113:1: C: Indent access modifiers like protected.
protected
^^^^^^^^^
app/models/singleton_process.rb:115:12: C: Do not prefix reader method names with get_.
  def self.get_hostname
           ^^^^^^^^^^^^
app/models/singleton_process.rb:119:12: C: Do not prefix reader method names with get_.
  def self.get_pid
           ^^^^^^^
app/models/singleton_process.rb:120:5: C: Prefer $PROCESS_ID or $PID from the English library over $$.
    $$
    ^^
app/models/singleton_process.rb:123:3: C: Method has too many lines. [12/10]
  def self.start_worker(process_type, &block)
  ^^^
app/models/singleton_process.rb:123:40: W: Unused method argument - block. If it's necessary, use _ or _block as an argument name to indicate that it won't be used.
  def self.start_worker(process_type, &block)
                                       ^^^^^
app/models/singleton_process.rb:124:5: C: Use fail instead of raise to signal exceptions.
    raise ArgumentError, 'Block missing' unless block_given?
    ^^^^^
app/models/singleton_process.rb:131:81: C: Line is too long. [94/80]
          $stderr.puts "SingletonProcess worker exception process=#{process_type} #{$!} #{$@}"
                                                                                ^^^^^^^^^^^^^^
app/models/singleton_process.rb:131:85: C: Prefer $ERROR_INFO from the English library over $!.
          $stderr.puts "SingletonProcess worker exception process=#{process_type} #{$!} #{$@}"
                                                                                ^^
app/models/singleton_process.rb:131:91: C: Prefer $ERROR_POSITION from the English library over<EMAIL_ADDRESS>          $stderr.puts "SingletonProcess worker exception process=#{process_type} #{$!} #{$@}"
                                                                                ^^
app/models/singleton_process.rb:139:81: C: Line is too long. [95/80]
    "SingletonProcess <hostname:#{hostname} pid:#{pid} age:#{humanize(Time.now - updated_at)}>"
                                                                                ^^^^^^^^^^^^^^^
app/models/singleton_process.rb:142:3: C: Method has too many lines. [17/10]
  def self.start_supervisor(worker_thread, process_type)
  ^^^
app/models/singleton_process.rb:155:66: C: Prefer $ERROR_INFO from the English library over $!.
          $stderr.puts "SingletonProcess supervisor: exception #{$!}"
                                                                 ^^
app/models/singleton_process.rb:173:14: W: Assignment in condition - you probably meant to use ==.
    if alive = my_process_alive(process_type)
             ^
app/models/singleton_process.rb:179:5: C: Redundant begin block detected.
    begin
    ^^^^^
app/models/singleton_process.rb:186:58: C: Prefer $ERROR_INFO from the English library over $!.
      $stderr.puts "acquire_lock FAILED temporarily $!=#{$!} $@=#{$@}"
                                                         ^^
app/models/singleton_process.rb:186:67: C: Prefer $ERROR_POSITION from the English library over<EMAIL_ADDRESS>      $stderr.puts "acquire_lock FAILED temporarily $!=#{$!} $@=#{$@}"
                                                                  ^^
app/models/singleton_process.rb:192:5: C: Do not introduce global variables.
    $dead_process_destroyer_started ||= false
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:193:20: C: Do not introduce global variables.
    return true if $dead_process_destroyer_started
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:194:5: C: Do not introduce global variables.
    $dead_process_destroyer_started = true
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:196:7: C: Avoid using rescue in its modifier form.
      destroy_dead_processes rescue nil
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:201:5: C: Do not introduce global variables.
    $dead_process_destroyer_started = false
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:208:3: C: Assignment Branch Condition size for destroy_dead_processes is too high. [17.69/15]
  def self.destroy_dead_processes
  ^^^
app/models/singleton_process.rb:208:3: C: Cyclomatic complexity for destroy_dead_processes is too high. [7/6]
  def self.destroy_dead_processes
  ^^^
app/models/singleton_process.rb:208:3: C: Method has too many lines. [29/10]
  def self.destroy_dead_processes
  ^^^
app/models/singleton_process.rb:211:7: C: Do not introduce global variables.
      $destroying_dead_processes ||= false
      ^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:212:22: C: Do not introduce global variables.
      return true if $destroying_dead_processes
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:213:7: C: Do not introduce global variables.
      $destroying_dead_processes = true
      ^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:222:15: C: Avoid using {...} for multi-line blocks.
      np.each { |process|
              ^
app/models/singleton_process.rb:229:5: W: Avoid rescuing the Exception class. Perhaps you meant to rescue StandardError?
    rescue Exception
    ^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:230:33: C: Prefer $ERROR_POSITION from the English library over<EMAIL_ADDRESS>      $stderr.puts "exception #{$@} #{$!}"
                                ^^
app/models/singleton_process.rb:230:39: C: Prefer $ERROR_INFO from the English library over $!.
      $stderr.puts "exception #{$@} #{$!}"
                                      ^^
app/models/singleton_process.rb:233:58: C: Prefer $ERROR_POSITION from the English library over<EMAIL_ADDRESS>      $stderr.puts "destroy_dead_processes: exception! #{$@} #{$!}"
                                                         ^^
app/models/singleton_process.rb:233:64: C: Prefer $ERROR_INFO from the English library over $!.
      $stderr.puts "destroy_dead_processes: exception! #{$@} #{$!}"
                                                               ^^
app/models/singleton_process.rb:237:5: C: Do not introduce global variables.
    $destroying_dead_processes = false
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/singleton_process.rb:240:1: C: Extra blank line detected.
app/models/singleton_process.rb:243:9: C: Trailing whitespace detected.
  rescue
        ^
config/application.rb:4:9: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "active_record/railtie"
        ^^^^^^^^^^^^^^^^^^^^^^^
config/application.rb:5:9: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "action_controller/railtie"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/application.rb:6:9: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "action_mailer/railtie"
        ^^^^^^^^^^^^^^^^^^^^^^^
config/application.rb:7:9: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "sprockets/railtie"
        ^^^^^^^^^^^^^^^^^^^
config/application.rb:9:1: C: Use 2 (not 0) spaces for indentation.
require "factory_girl_rails"

config/application.rb:9:9: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
require "factory_girl_rails"
        ^^^^^^^^^^^^^^^^^^^^
config/application.rb:10:1: W: Do not suppress exceptions.
rescue LoadError
^^^^^^^^^^^^^^^^
config/application.rb:21:3: C: Missing top-level class documentation comment.
  class Application < Rails::Application
  ^^^^^
config/application.rb:22:81: C: Line is too long. [82/80]
    # Settings in config/environments/* take precedence over those specified here.
                                                                                ^^
config/application.rb:26:1: C: Extra blank line detected.
config/application.rb:28:81: C: Line is too long. [152/80]
      config.cache_store = :redis_store, "#{::Configuration::Redis.url}1/cache_store", { expires_in: ::Rails.env.production? ? 90.minutes : 15.seconds }
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/application.rb:34:66: C: Avoid comma after the last item of a hash.
        entitystore: "#{::Configuration::Redis.url}3/entitystore",
                                                                 ^
config/application.rb:40:81: C: Line is too long. [126/80]
    config.static_cache_control = ENV['RAILS_STATIC_CACHE_CONTROL'] || "public, max-age=#{1.month}" # expire assets in 1 month
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/application.rb:45:81: C: Line is too long. [99/80]
    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
                                                                                ^^^^^^^^^^^^^^^^^^^
config/application.rb:46:81: C: Line is too long. [89/80]
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
                                                                                ^^^^^^^^^
config/application.rb:50:81: C: Line is too long. [98/80]
    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
                                                                                ^^^^^^^^^^^^^^^^^^
config/application.rb:51:81: C: Line is too long. [87/80]
    # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
                                                                                ^^^^^^^
config/application.rb:59:81: C: Line is too long. [99/80]
    config.log_level = (ENV['RAILS_LOG_LEVEL'] || (::Rails.env.production? ? :info : :info)).to_sym
                                                                                ^^^^^^^^^^^^^^^^^^^
config/boot.rb:2:81: C: Line is too long. [87/80]
Dir[::File.expand_path('../../lib/hacks/early/**/*.rb',  __FILE__)].each do |hack_file|
                                                                                ^^^^^^^
config/environment.rb:8:55: C: Surrounding space missing for operator '+'.
Dir[File.expand_path('../../lib/hacks/late', __FILE__)+'**/*.rb'].each do |hack_file|
                                                      ^
config/environment.rb:8:81: C: Line is too long. [85/80]
Dir[File.expand_path('../../lib/hacks/late', __FILE__)+'**/*.rb'].each do |hack_file|
                                                                                ^^^^^
config/environments/development.rb:2:81: C: Line is too long. [85/80]
  # Settings specified here will take precedence over those in config/application.rb.
                                                                                ^^^^^
config/environments/production.rb:2:81: C: Line is too long. [85/80]
  # Settings specified here will take precedence over those in config/application.rb.
                                                                                ^^^^^
config/environments/production.rb:19:81: C: Line is too long. [104/80]
  # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^
config/environments/production.rb:42:81: C: Line is too long. [96/80]
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
                                                                                ^^^^^^^^^^^^^^^^
config/environments/production.rb:62:81: C: Line is too long. [95/80]
  # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
                                                                                ^^^^^^^^^^^^^^^
config/environments/production.rb:66:81: C: Line is too long. [100/80]
  # Set this to true and configure the email server for immediate delivery to raise delivery errors.
                                                                                ^^^^^^^^^^^^^^^^^^^^
config/environments/test.rb:2:81: C: Line is too long. [85/80]
  # Settings specified here will take precedence over those in config/application.rb.
                                                                                ^^^^^
config/environments/test.rb:17:33: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  config.static_cache_control = "public, max-age=3600"
                                ^^^^^^^^^^^^^^^^^^^^^^
config/initializers/backtrace_silencers.rb:3:81: C: Line is too long. [107/80]
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/initializers/backtrace_silencers.rb:6:81: C: Line is too long. [112/80]
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/initializers/high_voltage.rb:4:81: C: Line is too long. [99/80]
  config.action_caching = config.action_caching_layout = true if defined? ActionPack::ActionCaching
                                                                                ^^^^^^^^^^^^^^^^^^^
config/initializers/i18n.rb:1:8: C: Do not introduce global variables.
unless $i18n_configured ||= false
       ^^^^^^^^^^^^^^^^
config/initializers/i18n.rb:2:3: C: Do not introduce global variables.
  $i18n_configured = true
  ^^^^^^^^^^^^^^^^
config/initializers/i18n.rb:4:81: C: Line is too long. [210/80]
  # [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/initializers/i18n.rb:5:3: C: Missing space after #.
  #I18n.enforce_available_locales = false
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/initializers/i18n.rb:8:81: C: Line is too long. [139/80]
  I18n.backend = I18n::Backend::Chain.new(I18n::Backend::Redis.new, I18n.backend) if Rails.env.production? && defined? I18n::Backend::Redis
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/initializers/livereload_detect.rb:3:30: C: Separate every 3 digits in the integer portion of a number with underscores(_).
  TCPSocket.new('localhost', 35729).close
                             ^^^^^
config/initializers/livereload_detect.rb:5:1: W: Do not suppress exceptions.
rescue Errno::ECONNREFUSED
^^^^^^^^^^^^^^^^^^^^^^^^^^
config/initializers/secret_token.rb:12:81: C: Line is too long. [174/80]
MyApp::Application.config.secret_key_base = '254ab70b7cab26d3b98a782c9185c2bef9548a002d25532a9c11b0643da4967109bc52756dbf804a506513a833b820fbe9f78758fc4a57220b336da97fc276c4'
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/initializers/secure_headers.rb:3:17: C: Space inside { missing.
  config.hsts = {max_age: 20.years.to_i, include_subdomains: true}
                ^
config/initializers/secure_headers.rb:3:66: C: Space inside } missing.
  config.hsts = {max_age: 20.years.to_i, include_subdomains: true}
                                                                 ^
config/initializers/secure_headers.rb:6:29: C: Space inside { missing.
  config.x_xss_protection = {value: 1, mode: 'block'}
                            ^
config/initializers/secure_headers.rb:6:53: C: Space inside } missing.
  config.x_xss_protection = {value: 1, mode: 'block'}
                                                    ^
config/initializers/sidekiq.rb:13:3: W: Do not suppress exceptions.
  rescue LoadError
  ^^^^^^^^^^^^^^^^
config/initializers/sidekiq.rb:16:1: C: Trailing whitespace detected.
config/initializers/sidekiq.rb:17:81: C: Line is too long. [81/80]
  sidekiq_namespace = ENV['SIDEKIQ_JOB_QUEUE_REDIS_NAMESPACE'] || 'sidekiq_myapp'
                                                                                ^
config/initializers/sidekiq.rb:20:81: C: Line is too long. [84/80]
    config.redis = { url: ::Configuration::Redis.url, namespace: sidekiq_namespace }
                                                                                ^^^^
config/initializers/sidekiq.rb:24:81: C: Line is too long. [84/80]
    config.redis = { url: ::Configuration::Redis.url, namespace: sidekiq_namespace }
                                                                                ^^^^
config/initializers/sidekiq.rb:27:3: C: Incorrect indentation detected (column 2 instead of 4).
  #  end
  ^^^^^^
config/initializers/wrap_parameters.rb:6:81: C: Line is too long. [96/80]
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
                                                                                ^^^^^^^^^^^^^^^^
config/puma.rb:15:56: C: Redundant curly braces around a hash parameter.
    activate_control_app ENV['PUMA_CONTROL_ENDPOINT'], { auth_token: ENV['PUMA_CONTROL_ENDPOINT_AUTH_TOKEN'] }
                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/puma.rb:15:81: C: Line is too long. [110/80]
    activate_control_app ENV['PUMA_CONTROL_ENDPOINT'], { auth_token: ENV['PUMA_CONTROL_ENDPOINT_AUTH_TOKEN'] }
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config/puma.rb:17:56: C: Redundant curly braces around a hash parameter.
    activate_control_app ENV['PUMA_CONTROL_ENDPOINT'], { no_token: true }
                                                       ^^^^^^^^^^^^^^^^^^
config/routes.rb:2:81: C: Line is too long. [84/80]
  # The priority is based upon order of creation: first created -> highest priority.
                                                                                ^^^^
config/routes.rb:14:81: C: Line is too long. [81/80]
  # Example resource route (maps HTTP verbs to controller actions automatically):
                                                                                ^
db/migrate/20140309055336_create_singleton_processes.rb:1:1: C: Missing top-level class documentation comment.
class CreateSingletonProcesses < ActiveRecord::Migration
^^^^^
db/schema.rb:4:81: C: Line is too long. [81/80]
# incrementally modify your database, and then regenerate this schema definition.
                                                                                ^
db/schema.rb:9:81: C: Line is too long. [86/80]
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
                                                                                ^^^^^^
db/schema.rb:12:81: C: Line is too long. [86/80]
# It's strongly recommended that you check this file into your version control system.
                                                                                ^^^^^^
db/schema.rb:14:38: C: Separate every 3 digits in the integer portion of a number with underscores(_).
ActiveRecord::Schema.define(version:<PHONE_NUMBER>5336) do
                                     ^^^^^^^^^^^^^^
db/schema.rb:15:1: C: Extra empty line detected at block body beginning.
db/schema.rb:17:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  enable_extension "plpgsql"
                   ^^^^^^^^^
db/schema.rb:19:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  create_table "singleton_processes", force: true do |t|
               ^^^^^^^^^^^^^^^^^^^^^
db/schema.rb:20:13: C: Put one space between the method name and the first argument.
    t.string   "process_type", null: false
            ^^^
db/schema.rb:20:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
    t.string   "process_type", null: false
               ^^^^^^^^^^^^^^
db/schema.rb:21:13: C: Put one space between the method name and the first argument.
    t.string   "hostname",     null: false
            ^^^
db/schema.rb:21:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
    t.string   "hostname",     null: false
               ^^^^^^^^^^
db/schema.rb:22:14: C: Put one space between the method name and the first argument.
    t.integer  "pid",          null: false
             ^^
db/schema.rb:22:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
    t.integer  "pid",          null: false
               ^^^^^
db/schema.rb:23:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
    t.datetime "created_at"
               ^^^^^^^^^^^^
db/schema.rb:24:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
    t.datetime "updated_at"
               ^^^^^^^^^^^^
db/schema.rb:27:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  add_index "singleton_processes", ["process_type", "hostname", "pid"], name: "index_singleton_processes_on_process_type_and_hostname_and_pid", using: :btree
            ^^^^^^^^^^^^^^^^^^^^^
db/schema.rb:27:36: C: Use %w or %W for array of words.
  add_index "singleton_processes", ["process_type", "hostname", "pid"], name: "index_singleton_processes_on_process_type_and_hostname_and_pid", using: :btree
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
db/schema.rb:27:37: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  add_index "singleton_processes", ["process_type", "hostname", "pid"], name: "index_singleton_processes_on_process_type_and_hostname_and_pid", using: :btree
                                    ^^^^^^^^^^^^^^
db/schema.rb:27:53: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  add_index "singleton_processes", ["process_type", "hostname", "pid"], name: "index_singleton_processes_on_process_type_and_hostname_and_pid", using: :btree
                                                    ^^^^^^^^^^
db/schema.rb:27:65: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  add_index "singleton_processes", ["process_type", "hostname", "pid"], name: "index_singleton_processes_on_process_type_and_hostname_and_pid", using: :btree
                                                                ^^^^^
db/schema.rb:27:79: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  add_index "singleton_processes", ["process_type", "hostname", "pid"], name: "index_singleton_processes_on_process_type_and_hostname_and_pid", using: :btree
                                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
db/schema.rb:27:81: C: Line is too long. [157/80]
  add_index "singleton_processes", ["process_type", "hostname", "pid"], name: "index_singleton_processes_on_process_type_and_hostname_and_pid", using: :btree
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
db/schema.rb:28:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  add_index "singleton_processes", ["process_type"], name: "index_singleton_processes_on_process_type", unique: true, using: :btree
            ^^^^^^^^^^^^^^^^^^^^^
db/schema.rb:28:37: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  add_index "singleton_processes", ["process_type"], name: "index_singleton_processes_on_process_type", unique: true, using: :btree
                                    ^^^^^^^^^^^^^^
db/schema.rb:28:60: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
  add_index "singleton_processes", ["process_type"], name: "index_singleton_processes_on_process_type", unique: true, using: :btree
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
db/schema.rb:28:81: C: Line is too long. [131/80]
  add_index "singleton_processes", ["process_type"], name: "index_singleton_processes_on_process_type", unique: true, using: :btree
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
db/schema.rb:29:1: C: Extra empty line detected at block body end.
db/seeds.rb:1:81: C: Line is too long. [103/80]
# This file should contain all the record creation needed to seed the database with its default values.
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^
db/seeds.rb:2:81: C: Line is too long. [96/80]
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
                                                                                ^^^^^^^^^^^^^^^^
lib/configuration/active_record.rb:2:3: C: Missing top-level module documentation comment.
  module ActiveRecord
  ^^^^^^
lib/configuration/active_record.rb:3:5: C: Cyclomatic complexity for connect is too high. [7/6]
    def self.connect(pool_size = nil, reap_time = nil)
    ^^^
lib/configuration/active_record.rb:6:81: C: Line is too long. [87/80]
      config['dead_connection_timeout'] = ENV['AR_DB_DEAD_CONN_TIMEOUT'] || 2 # seconds
                                                                                ^^^^^^^
lib/configuration/active_record.rb:7:81: C: Line is too long. [88/80]
      config['reaping_frequency'] = reap_time || ENV['AR_DB_REAP_FREQ'] || 10  # seconds
                                                                                ^^^^^^^^
lib/configuration/processors.rb:3:3: C: Missing top-level module documentation comment.
  module Processors
  ^^^^^^
lib/configuration/processors.rb:4:5: C: Cyclomatic complexity for count is too high. [7/6]
    def self.count
    ^^^
lib/configuration/processors.rb:4:5: C: Method has too many lines. [15/10]
    def self.count
    ^^^
lib/configuration/processors.rb:9:81: C: Line is too long. [85/80]
        ((`which hwprefs` != '') ? `hwprefs thread_count` : `sysctl -n hw.ncpu`).to_i
                                                                                ^^^^^
lib/configuration/processors.rb:16:32: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
        wmi = WIN32OLE.connect("winmgmts://")
                               ^^^^^^^^^^^^^
lib/configuration/processors.rb:17:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols.
        cpu = wmi.ExecQuery("select NumberOfCores from Win32_Processor") # TODO count hyper-threaded in this
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/configuration/processors.rb:17:76: C: Annotation keywords should be all upper case, followed by a colon and a space, then a note describing the problem.
        cpu = wmi.ExecQuery("select NumberOfCores from Win32_Processor") # TODO count hyper-threaded in this
                                                                           ^^^^
lib/configuration/processors.rb:17:81: C: Line is too long. [108/80]
        cpu = wmi.ExecQuery("select NumberOfCores from Win32_Processor") # TODO count hyper-threaded in this
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/configuration/redis.rb:2:3: C: Missing top-level module documentation comment.
  module Redis
  ^^^^^^
lib/configuration/redis.rb:5:7: C: Use 2 (not 0) spaces for indenting an expression spanning multiple lines.
      ENV['REDISCLOUD_URL'] ||
      ^^^^^^^^^^^^^^^^^^^^^
lib/configuration/redis.rb:6:7: C: Use 2 (not 0) spaces for indenting an expression spanning multiple lines.
      ENV['REDIS_URL'] ||
      ^^^^^^^^^^^^^^^^
lib/configuration/redis.rb:7:7: C: Use 2 (not 0) spaces for indenting an expression spanning multiple lines.
      'redis://localhost:6379/'
      ^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hacks/late/sidekiq_cli.rb:5:3: C: Missing top-level class documentation comment.
  class CLI
  ^^^^^
lib/hacks/late/sidekiq_cli.rb:10:5: C: Assignment Branch Condition size for run_in_thread is too high. [40.24/15]
    def run_in_thread
    ^^^
lib/hacks/late/sidekiq_cli.rb:10:5: C: Cyclomatic complexity for run_in_thread is too high. [8/6]
    def run_in_thread
    ^^^
lib/hacks/late/sidekiq_cli.rb:10:5: C: Method has too many lines. [27/10]
    def run_in_thread
    ^^^
lib/hacks/late/sidekiq_cli.rb:10:5: C: Perceived complexity for run_in_thread is too high. [9/7]
    def run_in_thread
    ^^^
lib/hacks/late/sidekiq_cli.rb:32:27: W: Assignment in condition - you probably meant to use ==.
        while readable_io = IO.select([@self_read])
                          ^
lib/hacks/late/sidekiq_cli.rb:39:64: C: Trailing whitespace detected.
        send(:fire_event, :shutdown) if respond_to? :fire_event
                                                               ^
lib/hacks/late/zzz_threads.rb:2:81: C: Line is too long. [150/80]
if ENV['START_THREADS'] == 'y' || ((ENV['RACK_ENV'] || ENV['RAILS_ENV']) && ENV['PUMA_LOADED'] && ENV['START_THREADS'] != 'n') && $thread_procs == nil
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/hacks/late/zzz_threads.rb:2:131: C: Do not introduce global variables.
if ENV['START_THREADS'] == 'y' || ((ENV['RACK_ENV'] || ENV['RAILS_ENV']) && ENV['PUMA_LOADED'] && ENV['START_THREADS'] != 'n') && $thread_procs == nil
                                                                                ^^^^^^^^^^^^^
lib/hacks/late/zzz_threads.rb:2:145: C: Prefer the use of the nil? predicate.
if ENV['START_THREADS'] == 'y' || ((ENV['RACK_ENV'] || ENV['RAILS_ENV']) && ENV['PUMA_LOADED'] && ENV['START_THREADS'] != 'n') && $thread_procs == nil
                                                                                ^^
lib/hacks/late/zzz_threads.rb:3:3: C: Do not introduce global variables.
  $thread_procs = {}
  ^^^^^^^^^^^^^
lib/hacks/late/zzz_threads.rb:5:53: C: Surrounding space missing for operator '+'.
  Dir[File.expand_path('../../../threads', __FILE__)+'**/*.rb'].each do |thread_file|
                                                    ^
lib/hacks/late/zzz_threads.rb:5:81: C: Line is too long. [85/80]
  Dir[File.expand_path('../../../threads', __FILE__)+'**/*.rb'].each do |thread_file|
                                                                                ^^^^^
lib/hacks/late/zzz_threads.rb:7:5: C: Do not introduce global variables.
    $thread_procs[thread_file] = proc do
    ^^^^^^^^^^^^^
lib/hacks/late/zzz_threads.rb:10:7: W: Avoid rescuing the Exception class. Perhaps you meant to rescue StandardError?
      rescue Exception
      ^^^^^^^^^^^^^^^^
lib/hacks/late/zzz_threads.rb:11:59: C: Prefer $ERROR_POSITION from the English library over<EMAIL_ADDRESS>        STDERR.puts "exception in thread #{thread_file} #{$@} #{$!}"
                                                          ^^
lib/hacks/late/zzz_threads.rb:11:65: C: Prefer $ERROR_INFO from the English library over $!.
        STDERR.puts "exception in thread #{thread_file} #{$@} #{$!}"
                                                                ^^
lib/hacks/late/zzz_threads.rb:13:8: C: Trailing whitespace detected.
    end
       ^
lib/hacks/late/zzz_threads.rb:15:3: C: Do not introduce global variables.
  $threads = {}
  ^^^^^^^^
lib/hacks/late/zzz_threads.rb:17:3: C: Do not introduce global variables.
  $thread_procs.each { |thread_file, thread_proc|
  ^^^^^^^^^^^^^
lib/hacks/late/zzz_threads.rb:17:22: C: Avoid using {...} for multi-line blocks.
  $thread_procs.each { |thread_file, thread_proc|
                     ^
lib/hacks/late/zzz_threads.rb:17:38: W: Unused block argument - thread_proc. If it's necessary, use _ or _thread_proc as an argument name to indicate that it won't be used.
  $thread_procs.each { |thread_file, thread_proc|
                                     ^^^^^^^^^^^
lib/hacks/late/zzz_threads.rb:19:5: C: Do not introduce global variables.
    $threads[thread_file] = Thread.new(&$thread_procs[thread_file])
    ^^^^^^^^
lib/hacks/late/zzz_threads.rb:24:7: C: Do not introduce global variables.
      $threads.each { |thread_file, thread|
      ^^^^^^^^
lib/hacks/late/zzz_threads.rb:24:21: C: Avoid using {...} for multi-line blocks.
      $threads.each { |thread_file, thread|
                    ^
lib/hacks/late/zzz_threads.rb:27:11: C: Do not introduce global variables.
          $threads[thread_file] = Thread.new(&$thread_procs[thread_file])
          ^^^^^^^^
lib/hacks/late/zzz_threads.rb:30:81: C: Line is too long. [90/80]
      sleep 1 # prevent threads from respawning too quickly, and us from using 100% of CPU
                                                                                ^^^^^^^^^^
lib/threads/clockwork_runner.rb:10:12: C: Do not use :: for method calls.
  Clockwork::run
           ^^
lib/threads/sidekiq_runner.rb:5:14: C: Space inside square brackets detected.
  cli.parse [ ]
             ^
lib/workers/example_worker.rb:1:1: C: Missing top-level class documentation comment.
class ExampleWorker
^^^^^
lib/workers/example_worker.rb:6:5: C: Do not write to stdout. Use Rails' logger if you want to log.
    puts "IT WORKS = #{name} #{count}"
    ^^^^
spec/spec_helper.rb:58:1: C: Do not use block comments.
=begin
^^^^^^

45 files inspected, 223 offenses detected


Error Quick Start

Describe the bug
I ran the command using the 'QuickStart' procedure as a reference.
However, I confirmed an error output.
Could you please let me know how to solve this problem?
To Reproduce
Steps to reproduce the behavior:

git clone https://github.com/International-Data-Spaces-Association/IDS-AppStore.git
cd / && mkdir -p /data/search
cd IDS-AppStore && chmod +x mvnw
./mvnw clean package -DskipTests -Dmaven.javadoc.skip=true ← ERROR!!!

Screenshots & Logs
$ ./mvnw clean package -DskipTests -Dmaven.javadoc.skip=true
./mvnw: line 276: /home/ec2-user/IDS-AppStore/.mvn/wrapper/maven-wrapper.properties: No such file or directory
/home/ec2-user/IDS-AppStore/.mvn/wrapper/maven-wrapper.jar: No such file or directory
Error: Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain
Caused by: java.lang.ClassNotFoundException: org.apache.maven.wrapper.MavenWrapperMain

Desktop (please complete the following information):

OS
$ cat /etc/os-release

NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"

java version
$ java --version

openjdk 11.0.13 2021-10-19 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.13+8-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.13+8-LTS, mixed mode, sharing)

Additional context
Add any other context about the problem here.

Hi I'm facing the same error right now. How did you fix it? Thanks in advance!


Cannot change the coordinates in Cast To in RayCast2D

Godot version:

3.0.6
OS/device including version:

Windows 10 64 bit
Issue description:

I cannot set the x and y co ordinates to anything other than 0 and 50 respectively, in the 'Cast To' in RayCast2D.
Steps to reproduce:
Change the coordinates in 'Cast To' for RayCast2D to anything other than (0,50)
Minimal reproduction project:

It works only if you press enter after setting the corodinates.


Please hide Profile Analytics Menu Point under Profile for now

Burger Menu, hide Profile Analytics for now

Fixed. Reviewed by @alexsirbu04 and @Shadyzpop.


Dependabot configuration

Define dependabot to keep npm dependencies and github action up-to-date

@HenriPro, on the matter of dependencies update, it seems that Renovate is better than dependabot for yarn, see https://github.com/babel/babel/pull/13337
If you choose to stick to yarn it's also recommended to not persist the package-lock.json and just keep yarn.lock


Adding images on the deals and offer cards

As I checked that there are no images are added on the cards of deals and offers, I can add images on the card from my end.

@Kratika-Solanki Thanks for creating the issue in BuddyTrail!!! The issue has been assigned to you.
Before you start working on your PR, please make sure to:

⭐ Star the repository if you haven't already.
Pull the latest changes to avoid any merge conflicts.
Attach before & after screenshots in your PR for clarity.
Include the issue number in your PR description for better tracking.

Contributors will start at Level 1, and their level will increase based on the quality and quantity of their contributions. The more effort and value you bring, the faster you'll progress. Put forth your best effort to unlock new levels and opportunities!
I'm excited to see your contribution as part of GSSOC EXTENDED 2024! 🎉
Don't forget to follow me on GitHub for more updates.
Happy open-source contributing! 🚀


Mark Domain as disabled in UI.

Show (Disabled) suffix next to disabled domains in UI and line-through the node on the tree to make disabled domain nodes stand out.
https://bugzilla.redhat.com/show_bug.cgi?id=1201883
@dclarizio please review/test
@epwinchell please review, and suggest if anything needs to be changed in css.
before:

after:

@h-kataria I would think we would want to use the info message styling rather than the "success" flash message styling, unless it follows a "lock and disable" action.
Info styling:

@dclarizio @h-kataria I think it looks fine.


Fix display name for direct chat with one active member

Solution for #923
Signed-off-by: Denis Morozov<EMAIL_ADDRESS>@giomfo : What do you think about using  "Empty room" as a default display name instead of an empty string?
Documentation encourages us to use "Empty room" as a default display name:

A complete absence of room name, canonical alias, and room members is likely to indicate a problem with creating the room or synchronising the state table; however clients should still handle this situation. A display name such as "Empty room" (or a localised variant thereof) should be used in this situation.

@morozkin: About riotDisplayname property, I would prefer to return an empty string (instead of the "Empty room" string). In some parts of the code, we consider this empty string to customise the room name display (see https://github.com/vector-im/riot-ios/blob/master/Riot/Views/RoomTitle/RoomTitleView.m#L121).
BTW #923 cannot be reproduced anymore (except with an old account in which the user has a direct chat with himself). Indeed the user is not able to create a direct chat with himself with the current Riot clients (ios, android and web). I just commented this issue, we have to remove the section "Direct Chat" in the room member details view of the current user (like on the Riot web client).
Sorry, but I won't accept your PR


[Question] Linked sliders

Hello, is it possible to link multiple sliders? I mean: total value of all sliders must be a specific value. And when one is changed other are changed too.

Hello, the component does not provide this feature, but you can do it with an extra script.

Thank you, is it possible to you write this kind of script? Some kind of this: https://github.com/heap-of-jquery/jquery-interconnected-sliders

If you want to make this kind of difficult, sorry I can't help you.


Make print_profile_docs work in dbt cloud

Description & motivation
Hi @stumelius,
In our current project, we have implemented your dbt-profiler package and it’s wonderful to give our developer and QA ability to quickly view the relation profile.
But we’re using dbt Cloud and developing our dbt project here and it’s the pity that print_profile_docs  doesn’t work in Cloud due to print_table method.
That why I came up with the macro print_profile_docs_dbtc which makes use of dbt_profiler.get_profile_table to make it compatible to dbt Cloud. And I would like to contribute that as a workaround for people who are developing in dbt Cloud.
Checklist

[x] I have verified that these changes work locally on the following warehouses (Note: it's okay if you do not have access to all warehouses, this helps us understand what has been covered):

[ ] Postgres
[ ] BigQuery
[x] Snowflake
[ ] Redshift
[ ] SQL Server
[ ] Databricks

[ ] I have written tests for new macros (either as dbt schema tests in integration_tests/models, dbt data tests in integration_tests/tests or integration tests in the CI workflow)
[ ] I have updated the README.md (if applicable)

@ngocanhtt0805 Wow, this is awesome! 💯 One suggestion: If there's a way to check if the macro is being called in dbt Cloud then I'd propose doing something like this in the existing print_profile_docs macro:
{% macro print_profile_docs(relation=none, relation_name=none, docs_name=none, schema=none, database=none, exclude_measures=[], include_columns=[], exclude_columns=[], max_rows=none, max_columns=13, max_column_width=30, max_precision=none, where_clause=none) %}

{%- set results = dbt_profiler.get_profile_table(relation=relation, relation_name=relation_name, schema=schema, database=database, exclude_measures=exclude_measures, include_columns=include_columns, exclude_columns=exclude_columns, where_clause=where_clause) -%}

{% if docs_name is none %}
  {% set docs_name = 'dbt_profiler__' + relation_name %}
{% endif %}

{% if execute %}
  {{ print('{% docs ' + docs_name + '  %}') }}
  -- How to check if macro is called in dbt Cloud?
  {% set is_dbt_cloud = ... %}
  {% if not is_dbt_cloud %}
    {% do results.print_table(max_rows=max_rows, max_columns=max_columns, max_column_width=max_column_width, max_precision=max_precision) %}
  {% else %}
    -- This is a workaround for dbt Cloud, which does not support the print_table method
    {% do dbt_profiler.print_table(table=results, max_rows=max_rows, max_columns=max_columns, max_column_width=max_column_width, max_precision=max_precision, show=False) %}
  {% endif %}
  {{ print('{% enddocs %}') }}
{% endif %}

{% endmacro %}

Here the custom printing logic is implemented in a print_table macro. What do you think? (edited)

Hi @stumelius
Sorry for late response.
Thank you so much for your feedback. I've modified the macro print_profile_docs followed by your suggestion. Can you kindly help have a look, many thanks

This is perfect, thanks! ❤ I'm merging this now

This is now included in the latest 0.8.0 release https://github.com/data-mie/dbt-profiler/releases/tag/0.8.0


Error I encountered on Windows

2022/07/03 15:07:43 Failed to find the tap device in registry with specified ComponentId 'tap0901' and InterfaceName 'test', TAP driver may be not installed or you may have specified an interface name that doesn't exist

I tried installing a tap driver to no avail :( It installed correctly but hyprspace still threw the error.

You should modify the tap name to what you need

@DillFrescott You may need to run hyprspace with administrator privileges

Ok thank you!

@DillFrescott were you able to get this working on Windows? If so are you alright if we go ahead and close this issue?

Yes I was! Sorry I forgot to mention that in another comment!

Great! No worries!


maven-ant-tasks-download failing with java.io.IOException

I am getting following error with ccm create command
ccm create --version=2.0.9 --nodes=6 deo
Downloading http://archive.apache.org/dist/cassandra/2.0.9/apache-cassandra-2.0.9-src.tar.gz to /tmp/ccm-2oKzAH.tar.gz (10.810MB)
  11335077  [100.00%]
Extracting /tmp/ccm-2oKzAH.tar.gz as version 2.0.9 ...
Compiling Cassandra 2.0.9 ...
Deleted /home/local/ANT/advaitd/.ccm/repository/2.0.9 due to error
Traceback (most recent call last):
  File "/usr/local/bin/ccm", line 5, in <module>
    pkg_resources.run_script('ccm==<IP_ADDRESS>', 'ccm')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1235, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/ccm-<IP_ADDRESS>-py2.7.egg/EGG-INFO/scripts/ccm", line 72, in <module>
    cmd.run()
  File "/usr/local/lib/python2.7/dist-packages/ccm-<IP_ADDRESS>-py2.7.egg/ccmlib/cmds/cluster_cmds.py", line 127, in run
    cluster = Cluster(self.path, self.name, install_dir=self.options.install_dir, version=self.options.version, verbose=True)
  File "/usr/local/lib/python2.7/dist-packages/ccm-<IP_ADDRESS>-py2.7.egg/ccmlib/cluster.py", line 51, in __init__
    dir, v = self.load_from_repository(version, verbose)
  File "/usr/local/lib/python2.7/dist-packages/ccm-<IP_ADDRESS>-py2.7.egg/ccmlib/cluster.py", line 64, in load_from_repository
    return repository.setup(version, verbose)
  File "/usr/local/lib/python2.7/dist-packages/ccm-<IP_ADDRESS>-py2.7.egg/ccmlib/repository.py", line 40, in setup
    download_version(version, verbose=verbose, binary=binary)
  File "/usr/local/lib/python2.7/dist-packages/ccm-<IP_ADDRESS>-py2.7.egg/ccmlib/repository.py", line 221, in download_version
    raise e
ccmlib.common.CCMError: Error compiling Cassandra. See /home/local/ANT/advaitd/.ccm/repository/last.log for details

last.log shows following
Buildfile: /home/local/ANT/advaitd/.ccm/repository/2.0.9/build.xml

init:
    [mkdir] Created dir: /home/local/ANT/advaitd/.ccm/repository/2.0.9/build/classes/main
    [mkdir] Created dir: /home/local/ANT/advaitd/.ccm/repository/2.0.9/build/classes/thrift
    [mkdir] Created dir: /home/local/ANT/advaitd/.ccm/repository/2.0.9/build/test/lib
    [mkdir] Created dir: /home/local/ANT/advaitd/.ccm/repository/2.0.9/build/test/classes
    [mkdir] Created dir: /home/local/ANT/advaitd/.ccm/repository/2.0.9/src/gen-java
    [mkdir] Created dir: /home/local/ANT/advaitd/.ccm/repository/2.0.9/build/lib

maven-ant-tasks-localrepo:

maven-ant-tasks-download:
     [echo] Downloading Maven ANT Tasks...
      [get] Getting: http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
      [get] To: /home/local/ANT/advaitd/.ccm/repository/2.0.9/build/maven-ant-tasks-2.1.3.jar
      [get] Error opening connection java.io.IOException: Server returned HTTP response code: 403 for URL: http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
      [get] Error opening connection java.io.IOException: Server returned HTTP response code: 403 for URL: http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
      [get] Error opening connection java.io.IOException: Server returned HTTP response code: 403 for URL: http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
      [get] Can't get http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar to /home/local/ANT/advaitd/.ccm/repository/2.0.9/build/maven-ant-tasks-2.1.3.jar

BUILD FAILED
/home/local/ANT/advaitd/.ccm/repository/2.0.9/build.xml:275: Can't get http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar to /home/local/ANT/advaitd/.ccm/repository/2.0.9/build/maven-ant-tasks-2.1.3.jar

Total time: 1 second

Could you please suggest what is wrong with my environment
Following are settings in my environment
advaitd@desktop:~$ python -V
Python 2.7.3

advaitd@desktop:~$ ant -version
Apache Ant(TM) version 1.8.2 compiled on December 3 2011

advaitd@desktop:~$ mvn -version
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.7.0_80, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "3.13.0-44-generic", arch: "amd64", family: "unix"

advaitd@desktop:~$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

There doesn't appear to be anything wrong with your environment. The HTTP 403 error implies there is some sort of connection issue to maven central. Are you able to install any other version from source? If you run ccm invalidatecache and try again, does it work? You can install with -v binary:2.0.9 instead of 'v 2.0.9 to use the already compiled release as a workaround.

Tried ccm invalidate and after that tried ccm create. Still getting same error
But when I tried -v binary:2.0.9, it worked :)
Thanks a lot for your help !!


Unpin ophyd from a specific commit

Ophyd is currently pinned to a specific git commit as we need https://github.com/bluesky/ophyd/issues/1139 for some tests. Once this is merged and in a release we should unpin ophyd again

Sadly we forgot to get https://github.com/bluesky/ophyd/pull/1148 included in the recent ophyd release

we haven't been pinned to an ophyd commit for some time now


Remove matchesAff and the like

Turning Aff into a continuation is pretty confusing, it'd be better to expose a coroutine-only interface or something like that.

Resolved by #50


Failed to parse .conf! from autogenerated .conf file with very simple schema

Error: Invalid conf file at line 2, column 1:
	snowflake.nodes = "<IP_ADDRESS>"```

My schema looks like the following and was used to generate the conf file

```Elixir
[
  extends: [],
  import: [],
  mappings: [
    "snowflake.nodes": [
      commented: false,
      datatype: [
        list: :binary
      ],
      default: [
        "<IP_ADDRESS>"
      ],
      doc: "Provide documentation for snowflake.nodes here.",
      hidden: false,
      to: "snowflake.nodes"
    ],
    "logger.console.format": [
      commented: false,
      datatype: :binary,
      default: """
      $time $metadata[$level] $message
      """,
      doc: "Provide documentation for logger.console.format here.",
      hidden: false,
      to: "logger.console.format"
    ],
    "logger.console.metadata": [
      commented: false,
      datatype: [
        list: :atom
      ],
      default: [
        :request_id
      ],
      doc: "Provide documentation for logger.console.metadata here.",
      hidden: false,
      to: "logger.console.metadata"
    ],
    "logger.level": [
      commented: false,
      datatype: :atom,
      default: :info,
      doc: "Provide documentation for logger.level here.",
      hidden: false,
      to: "logger.level"
    ]
  ],
  transforms: [],
  validators: []
]

I tried adding :snowflake to my imports and also commenting out the snowflake things, but then it just blows-up on parsing the next section. mix conform.effective works when I specify not a prod env, but the file that's being generated has some problem.

You're giving it a binary while you have specified the data type to be a list of binaries.
Try with snowflake.nodes = ["<IP_ADDRESS>"]

It is already that
[
        "<IP_ADDRESS>"
      ]


Adding Cmd.exe at end of docker image results in IIS terminating

We want to do some run time configuration on container startup.  I have a docker file which consumes the ASP.Net base image and then runs the run time (not build time) configuration using a CMD. (Right now it just does an unzip but later it will do more.)  When I add the line to do the run time configuration, I get the following failures:
"Service 'w3svc' has been stopped
APPCMD failed with error code 4312
Failed to update IIS configuration"
Docker file contents - I have removed some stuff from the docker file which appears to be working:
FROM mcr.microsoft.com/dotnet/framework/aspnet:4.7.2-windowsservercore-ltsc2019
SHELL ["cmd", "/S", "/C"]
COPY ${source}/ServiceRoot.zip C:/ServiceRoot.zip
#TODO - add more run time config on top of the unzip.
CMD powershell.exe -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('C:\ServiceRoot.zip', 'C:\ServiceRoot'); }"

I was able to workaround this by adding the servicemonitor w3svc part in a ps1 file and then call it via entrypoint. It is an override of entrypoint from aspnet image. (without [] syntax)
DockerFile snippet
COPY ./DockerInit/ /DockerInit
ENTRYPOINT ./DockerInit/ContainerRunTime.ps1

ContainerRunTime.ps1
###start application/host initialization logic
Write-Output "Setting Environment Variable"
[Environment]::SetEnvironmentVariable("TestVariableName", "TestValue", "Machine")
###end application/host initialization logic

### do not remove this block, this is the entrypoint that starts iis on the container
Write-Output "Starting ServiceMonitor.exe"
C:\\ServiceMonitor.exe w3svc
### do not remove this block, this is the entrypoint that starts iis on the container

I've been fighting with this for a while i've been unable to get any of the solutions to work until.. Part of my IIS install scrip is removing the default app pool and site. Once I removed this step subbunori's solution works.
Get-WebSite -Name "Default Web Site" | Remove-WebSite -Confirm:$false -Verbose ;
Remove-WebAppPool -Name "DefaultAppPool" -Confirm:$false -Verbose ;

If I am not overriding entrypoint from aspnet image, it is failing. Rerunning C:\ServiceMonitor.exe w3svc makes the container crash. This is a repro even after running this command from inside the container. Curious to know if this is a known issue and being fixed.

I have figured this out. ServiceMonitor.exe has logic inside of it that checks to see if the default app pool is running and if not exit. Since it is the entrypoint by default in the image, it has to stay running to keep the container alive. If you wanted to override this behavior you would need to write your own entrypoint process that stays alive, and start that as the entrypoint instead.

Exactly what I have done with below
ENTRYPOINT ./DockerInit/ContainerRunTime.ps1

So basically:

ENTRYPOINT gets executed before CMD.
The base Image contains the line ENTRYPOINT ["C:\ServiceMonitor.exe", "w3svc"].

When trying to execute any type of script via CMD:
CMD ["powershell", "./somepsscript.ps1;"]

I also get the "Service 'w3svc' has been stopped" message.
When trying to override ENTRYPOINT with my script the ServiceMonitor does not start anymore:
ENTRYPOINT ["powershell", "./somepsscript.ps1;"]

However, when I override ENTRYPOINT with my script and add the ServiceMonitor as a CMD it works.
ENTRYPOINT ["powershell", "./transform.ps1;"]
CMD ["C:\\ServiceMonitor.exe", "w3svc"]

Is there no better way to handle this?

I tried using ENTRYPOINT ./DockerInit/ContainerRunTime.ps1, I am setting environment variable at Machine level, but it does not set the variable in my case i.e.
[Environment]::SetEnvironmentVariable("Monitoring","Value","Machine")
When I try to get the environment variable, it throws me below error:
Get-Variable : Cannot find a variable with the name 'Monitoring'.
But when I set the Environment variable to the container via powershell, and trying to start the ServiceMonitor.exe it does not start the container.
C:\ServiceMonitor.exe w3svc
I tried multiple things but setting environment variable did not work for me. Any suggestions?


Because chewie >=1.2.0 depends on provider ^5.0.0

Because chewie >=1.2.0 depends on provider ^5.0.0 and flutter_bloc >=7.2.0 depends on provider ^6.0.0, chewie >=1.2.0 is incompatible with flutter_bloc >=7.2.0.
So, because baseflutter depends on both flutter_bloc ^7.3.0 and chewie ^1.2.2, version solving failed.
pub get failed (1; So, because baseflutter depends on both flutter_bloc ^7.3.0 and chewie ^1.2.2, version solving failed.)

got the same issue

+1

+1

+1

+1

+1

+1

+1

Same issue here. We need a 1.2.3 release with provider 6.0.0

best way to workaround currently
dependency_overrides:
provider:  ^6.0.0

same error i also face. if anyone find any solution please share. @mirrorlink @mcagrigoktas @VNAPNIC
Running "flutter pub get" in 33...
Because no versions of chewie match >1.2.2 <2.0.0 and chewie 1.2.2 depends on provider ^5.0.0, chewie ^1.2.2 requires provider ^5.0.0.
And because flutter_math_fork >=0.4.0 depends on provider ^6.0.0, chewie ^1.2.2 is incompatible with flutter_math_fork >=0.4.0.
So, because flutter_app_tv depends on both chewie ^1.2.2 and flutter_math_fork ^0.4.0, version solving failed.
pub get failed (1; So, because flutter_app_tv depends on both chewie ^1.2.2 and flutter_math_fork ^0.4.0, version solving failed.)
Process finished with exit code 1

same error i also face. if anyone find any solution please share. @mirrorlink @mcagrigoktas @VNAPNIC
Running "flutter pub get" in 33... Because no versions of chewie match >1.2.2 <2.0.0 and chewie 1.2.2 depends on provider ^5.0.0, chewie ^1.2.2 requires provider ^5.0.0. And because flutter_math_fork >=0.4.0 depends on provider ^6.0.0, chewie ^1.2.2 is incompatible with flutter_math_fork >=0.4.0. So, because flutter_app_tv depends on both chewie ^1.2.2 and flutter_math_fork ^0.4.0, version solving failed. pub get failed (1; So, because flutter_app_tv depends on both chewie ^1.2.2 and flutter_math_fork ^0.4.0, version solving failed.) Process finished with exit code 1

just add
dependency_overrides:
provider: ^6.0.0
to yaml

in fact I think 1.2.3 is in place now

+1

+1

+1

+1

Version 1.3.0 is now live on pub.dev, which upgrades Provider to ^6.0.1 as well as wakelock to the latest version.


fix: responsive header

the header is not responsive.

make the side navigation menu with a good CSS.

Bhai yeh bhi merey ko dy do

Best of luck :)

@muhammadammar33 make sure to link your PR with this issue 👍

🙂

@HaroonKhalid222 you can see other issues 👀


Visibility check is over-restrictive when a public method exists with the same name

When checking types of calls, it seems that the compiler does the visibility check first and unconditionally, which causes it to error even when a valid public method exists.
class C
  def foo(a : Bool | Int32)
    puts "public Bool | Int32"
  end

  private def foo(a : Int32)
    puts "private Int32"
  end
end

C.new.foo(true ? false : 1)

Error: private method 'foo' called for C

A use-case I could imagine for this would be for the public method to accept a union of a few inputs, then pass those along to private methods to handle each one.
Files where this behavior is tested: visibility_modifiers_spec, generic_class_spec, enum_spec, and class_spec

I think the reason is just that foo(a : Int32) is more specific than foo(a : Bool | Int32) and wins as the overload for foo(Int32). It's true that visibility is only checked afterwards. Maybe that could be changed. But I also think it might introduce confusion. AFAIK visibility modifiers currently have no influence on method resolution, they just inhibit a call if the selected overload is not visible from the calling scope.
This may not sound intuitive, but practically, there's not much difference actually and I presume it's easier to do (and reason about).
I don't see a strong motivation to change that.
A typical solution for the use case you described is naming the internal methods like foo_internal. That's IMO a superior approach (even if visibility modifiers worked the way you wished) because it clearly expresses the intention of these methods and the relation between public and private methods. It also prevents accidentally hitting the internal methods directly from the private scope.

Files where this behavior is tested: visibility_modifiers_spec, generic_class_spec, enum_spec, and class_spec

What exactly do you mean by that?

@straight-shoota note that the argument is of type Bool | Int32. If you remove the private declaration, it picks the correct first foo. This seems like a bug to me.

It picks the first one because the actual value of the argument is Bool. Try false ? true : 1 and the second one is picket:
class C
  def foo(a : Bool | Int32)
    1
  end

  def foo(a : Int32)
    2
  end
end

C.new.foo(false ? true : 1) # => 2

It picks the first one because the actual value of the argument is Bool. Try false ? true : 1 and the second one is picked:

class C

  def foo(a : Bool | Int32)

    1

  end

  def foo(a : Int32)

    2

  end

end

C.new.foo(false ? true : 1) # => 2

@straight-shoota But it picks the 2nd one regardless, that's the whole issue.

A use-case I could imagine for this would be for the public method to accept a union of a few inputs, then pass those along to private methods to handle each one.

Use a different name for the private ones?

I understand that. My comment was an answer to beta's claim that removing private would make it pick the first overload always. Which overload is picked depends on the runtime type of the argument. The visibility checker runs for all compile-time types.

Perhaps there are strong technical reasons for this behavior, but to the eyes of a user this looks like a bug. Why is it considering private methods in the first place? If impossible to fix, I would rather disallow private overloads of public methods.

If impossible to fix, I would rather disallow private overloads of public methods.

That sounds overly restrictive really. For example, it's a relatively common pattern to define private constructors (besides public ones). In that case you can't even go to a different method name because initialize is provisioned by the compiler.
Similarly, I don't see any issues with overloads of a method having different visibilities.
Overriding could be a problem, though. Especially in type hierarchies.

As a benchmark with C++: When there are two valid member functions, a public and a private one and both are valid candidates but the signature of the private one is a better match, the compiler picks the private one and errors.
I think this shouldn't be hard to change, but I question if we should.

FWIW, this behavior works in Java. I came across it in a Java program at work yesterday and figured I'd check how Crystal behaves. That's not to say that Crystal needs to follow Java, but just something to consider

Java doesn't have multiple dispatch, so I'm not sure it's equivalent there.

Right, my example above isn't a direct comparison to Java. I can elaborate.
Consider the following Java classes:
abstract class A {}
class B extends A {}
class C extends A {}

class Foo {
    public void foo(final A a) {
        System.out.println("handle common logic");
        if (a instanceof B) {
            foo((B) a);
        } else if (a instanceof C) {
            foo((C) a);
        }
    }

    private void foo(final B b) {
        System.out.println("handle b");
    }

    private void foo(final C c) {
        System.out.println("handle c");
    }
}

In this case, when calling new Foo().foo(new B()), the following is printed to stdout:
handle common logic
handle b

In Crystal, I would translate that directly to the following (could use .is_a? in an if-elsif condition, but that's functionally equivalent, right?):
abstract class A; end
class B < A; end
class C < A; end

class Foo
  def foo(a : A) : Nil
    puts "handle common logic"
    case a
    in B then foo(a)
    in C then foo(a)
    end
  end

  private def foo(b : B) : Nil
    puts "handle b"
  end

  private def foo(c : C) : Nil
    puts "handle c"
  end
end

Foo.new.foo(B.new)

However, the Crystal compiler complains about this with the error
Error: private method 'foo' called for Foo

The exact same holds true with union types:
class Foo
  def foo(a : Bool | Int32) : Nil
    puts "handle common logic"
    case a
    in Bool  then foo(a)
    in Int32 then foo(a)
    end
  end

  private def foo(b : Bool) : Nil
    puts "handle bool"
  end

  private def foo(i : Int32) : Nil
    puts "handle int32"
  end
end

Foo.new.foo(true)

Error: private method 'foo' called for Foo

To me, this is not intuitive. The call to Foo#new from outside of the class should have no knowledge of the private methods. In terms of visibility, that should be equivalent the following, which obviously does compile:
class Foo
  def foo(a : Bool | Int32) : Nil
  end
end

Foo.new.foo(true)

In my original example, my expectation would be that the call to #foo(a : Bool | Int32) : Nil would hit the public method, since that's all that is visible. The public method can then delegate that anywhere else that it pleases, even if it's to an internal method with the same name and a narrower type.

Right, but this line:
Foo.new.foo(B.new)

in Crystal it will call the B overload or the C overload depending on the runtime value of the type. This never happens in Java: only the compile-time value is used to determine the method to call.
That's why I'm saying that it's not fair to compare this with Java. In Java, when you call a method, there's always one match. If it's private, you can't call it. In Crystal, when you call a method, you might end up calling more than one method at runtime. If any of those is private, then you can't do it.
I don't see any inconsistency here. In Ruby if you try to call a private method, it tells you that you can't do that because it's private.

Maybe we can change the way things work: if you call a method "from the outside", then private methods are not looked up. However, I think that would bring a lot of confusion: if you call that same method from the inside it won't work exactly the same because those other private overloads will be considered.

The confusion exists anyway, so the point is which confusion are we OK with. In the end, it might just be a matter of improving error reporting.

My expectation would be that's how it works. A call from inside the class should consider more methods than a call from outside, because those private methods are in scope at that point. That's obviously just my opinion/expectation, though, not to say that that has to be Crystal's approach

There is already a predecent for private names overriding public names, for types:
private class A
  class B; end
end

class A
end

{% A::B %} # okay

class A
end

private class A
  class B; end
end

{% A::B %} # okay

class A
  class B; end
end

private class A
end

{% A::B %} # Error: undefined constant A::B

private class A
end

class A
  class B; end
end

{% A::B %} # Error: undefined constant A::B

and similarly, for constants:
private A = 1
A = 2
A # => 1

A = 1
private A = 2
A # => 2


GKE Autopilot Incompatibility

Long story short
There appears to be an incompatibility with the Autopilot mode of operation in Google Kubernetes Engine (GKE).
Description
Following the installation instructions mostly works however compcrdwebhook fails to start.  Increasing the timeout, as documented, does not have any effect.
Looking at logs we see that the problem is: denied by managed-namespaces-limitation.
The exact command to reproduce the issue
gcloud container clusters create-auto oda-cluster
gcloud container clusters get-credentials oda-cluster
helm repo add istio https://istio-release.storage.googleapis.com/charts
helm repo update
kubectl create namespace istio-system
helm install istio-base istio/base -n istio-system --set defaultRevision=default
helm install istiod istio/istiod -n istio-system --wait
kubectl create namespace istio-ingress
helm install istio-ingress istio/gateway -n istio-ingress --wait
helm repo add oda-canvas https://tmforum-oda.github.io/oda-canvas
helm repo update
helm install --set cert-manager.leaseWaitTimeonStartup=100 canvas oda-canvas/canvas-oda -n canvas --create-namespace

The full output of the command that failed
$ kubectl logs pod/canvas-cert-manager-cainjector-b487b6c49-bdt7r -n cert-manager
...
I0417 06:18:46.915621       1 leaderelection.go:248] attempting to acquire leader lease kube-system/cert-manager-cainjector-leader-election...
E0417 06:18:46.951512       1 leaderelection.go:334] error initially creating leader election record: leases.coordination.k8s.io is forbidden: User "system:serviceaccount:cert-manager:canvas-cert-manager-cainjector" cannot create resource "leases" in API group "coordination.k8s.io" in the namespace "kube-system": GKE Warden authz [denied by managed-namespaces-limitation]: the namespace "kube-system" is managed and the request's verb "create" is denied

Environment
Google Kubernetes Engine (GKE) Autopilot

In Autopilot, GKE takes complete control of the control plane of the Kubernetes cluster
Cert-Manager tries to create a Lease object in the  kube-system namespace to elect a leader, but this namespace is mainly used for the control plane, and Autopilot get its entire control, not allowing others to use it
This problem has been reported in Cert-Manager more than once
https://github.com/cert-manager/cert-manager/issues/5625
I guess you should install the canvas using that
helm install --set cert-manager.leaseWaitTimeonStartup=100 --set global.leaderElection.namespace=cert-manager canvas oda-canvas/canvas-oda -n canvas --create-namespace
I have no access to a Google Cloud account, so I have no way to test my guessing

Thank you @gusjer, changing the leader election namespace did the trick!
gcloud container clusters create-auto oda-cluster
gcloud container clusters get-credentials oda-cluster
helm repo add istio https://istio-release.storage.googleapis.com/charts
helm repo update
kubectl create namespace istio-system
helm install istio-base istio/base -n istio-system --set defaultRevision=default
helm install istiod istio/istiod -n istio-system --wait
kubectl create namespace istio-ingress
helm install istio-ingress istio/gateway -n istio-ingress --wait
helm repo add oda-canvas https://tmforum-oda.github.io/oda-canvas
helm repo update
helm install --set global.leaderElection.namespace=cert-manager canvas oda-canvas/canvas-oda -n canvas --create-namespace


update examples to load-reporting-service

Signed-off-by: yy<EMAIL_ADDRESS>
Commit Message: example: fix the example of load-reporting-service
Additional Description: When I run this example according to the document, I will be prompted with http/1.1 protocol error: HPE_INVALID_CONSTANT . After I added the "HTTP2" protocol, I will be prompted with unknown service envoy.service.load_stats.v3.LoadReportingService. Therefore, I upgraded the version of LoadReportingService to V3, and the example can run normally

hi @670205427 thanks for this
im wondering why ci is not picking up any errors with this atm, ill take a look and see if there is something we need to add/change

Hi,@phlax
I don't quite understand what atm means. When I first started running this test case, the envoy service could be started normally, but it could not be connected to the load service correctly, The reason for the failure was http/1.1 protocol error: HPE_INVALID_CONSTANT,so I made some subsequent modifications to make the test case run normally

@phlax
Thank you for helping me answer the meaning of atm!
I checked the verify.sh, in the verify.sh, there is only docker-compose logs lrs_server | grep "up and running" , I don’t think it can verify that Envoy is connected to the load-reporting-service, it can only indicate that the  load-reporting-service has started successfully

@670205427 its failiing with
ERROR: no such target '//source/common/config/xds_mux:grpc_mux_lib': target 'grpc_mux_lib' not declared in package 'source/common/config/xds_mux' defined by /home/runner/work/envoy/envoy/source/common/config/xds_mux/BUILD

im guessing you just need to merge main


If you log-in when you are in reset password page, the page refreshes. Its meaningless to be in forgot password page when you are logged in

added redirect to root when signedin users tries to access forgotpassword page


webapp: Fix wrong path for local inspector report path

After the addition of light approach, the local $OUT/inspector directory has been moved to $OUT/inspector/inspector. This PR fixes the db building script to match the new directory structure for local FI build.

This PR is not needed any more after the fix in oss-fuzz compile infra script.


Install Instructions?

How do you install this application in a linux environment?

You can download the binaries from here: https://github.com/IBM/newrelic-cli/releases
No install process required/necessary.

This should be clearly documented in the README

I agree. The README needs an Installation section.


Astropy time is slow

In GitLab by @ColmTalbot on Mar 30, 2018, 02:32
Calculating the antenna response (and by extension the simple likelihood) is being dominated by converting from geocenter time to sidereal time.
I feel like this shouldn't need to be slow. @sylvia.biscoveanu would you be happy to dig into astropy/LAL and see if there's a faster way to do this?
If not I'll reassign it to myself.
%timeit likelihood.logL(time, params)
100 loops, best of 3: 4.19 ms per loop

%timeit IFO.antenna_response(params['ra'], params['dec'], params['geocent_time'], params['psi'], 'plus')
100 loops, best of 3: 3.88 ms per loop

%timeit astropy.time.Time(params['geocent_time'], format='gps', scale='utc').sidereal_time('mean', 'greenwich')
100 loops, best of 3: 3.74 ms per loop

In GitLab by @ColmTalbot on Apr 28, 2018, 23:08
What if we evaluated gmst for an array covering the time prior, interpolated, and the evaluated the interpolant at each iteration. This should be faster right?
It would probably actually be arbitrarily well approximated as linear over the durations of interest.

In GitLab by @sylvia.biscoveanu on May 1, 2018, 06:41
closed

In GitLab by @sylvia.biscoveanu on May 1, 2018, 06:41
We found an alternate method for calculating the GMST that assumes the rotation of the Earth is constant. Speedup by three orders of magnitude.

In GitLab by @sylvia.biscoveanu on Apr 4, 2018, 03:02
Is it slow every time or just the first time when you need to download the weird navy data? I'm not sure how timeit works. But if it's slow every time I'm happy to look into how it's done in LAL and rewrite it


Update .travis.yml

Simplify .travis.yml using native elixir

Coverage remained the same at 94.74% when pulling 4f9398c473717f7379c22d10c90b35848d1d380a on lowks:patch-1 into c6fcfedeadf424fcb9b514a8d63f4c7c63e20140 on slogsdon:master.

Coverage remained the same at 94.74% when pulling 4f9398c473717f7379c22d10c90b35848d1d380a on lowks:patch-1 into c6fcfedeadf424fcb9b514a8d63f4c7c63e20140 on slogsdon:master.


Flocker is too quick to launch second container that depends on the first

Attempting to get Wordpress working in conjunction with MySQL, I create an application config as follows:
"version": 1
"applications":
  "mysql-volume-example":
    "image": "clusterhq/mysql"
    "ports":
    - "internal": 3306
      "external": 3306
    "volume":
      "mountpoint": "/var/lib/mysql"
  "wordpress-volume-example":
    "image": "clusterhq/wordpress"
    "ports":
    - "internal": 80
      "external": 8080
    "volume":
      "mountpoint": "/usr/src/wordpress/wp-content"

Note: clusterhq/wordpress is an image based on the canonical Wordpress image, built with this Dockerfile:
FROM wordpress
ENV WORDPRESS_DB_USER root
ENV WORDPRESS_DB_PASSWORD admin
ENV WORDPRESS_DB_NAME wordpress
ENV MYSQL_PORT_3306_TCP tcp://<IP_ADDRESS>:3306

I get this in the logs on the container:
Aug 13 04:26:48 node1 docker[19118]: Unable to find image 'clusterhq/wordpress:latest' locally
Aug 13 04:26:48 node1 docker[19118]: Pulling repository clusterhq/wordpress
Aug 13 04:27:04 node1 gear[19119]: Unable to initialize container container wordpress-volume-example was not visible through Docker be
Aug 13 04:27:04 node1 systemd[1]: Started Container wordpress-volume-example.
Aug 13 04:27:07 node1 docker[19118]: WordPress not found in /var/www/html - copying now...
Aug 13 04:27:09 node1 docker[19118]: Complete! WordPress has been successfully copied to /var/www/html
Aug 13 04:27:10 node1 docker[19118]: PHP Notice:  Undefined offset: 1 in - on line 4
Aug 13 04:27:10 node1 docker[19118]: PHP Warning:  mysqli::mysqli(): (HY000/2003): Can't connect to MySQL server on '<IP_ADDRESS>' (
Aug 13 04:27:10 node1 docker[19118]: MySQL Connection Error: (2003) Can't connect to MySQL server on '<IP_ADDRESS>' (111)
Aug 13 04:27:12 node1 systemd[1]: ctr-wordpress-volume-example.service: main process exited, code=exited, status=1/FAILURE

What appears to be happening here is that flocker is firing up the Wordpress container before the MySQL container has fully initialized and instantiated the MySQL service, hence the Wordpress container then fails to launch because it complains it can't connect to MySQL on the VM IP at port 3306 (which it could if only it tried seconds later).

We are moving our development planning to JIRA. This issue is now being tracked at https://clusterhq.atlassian.net/browse/FLOC-559. You are welcome to file additional issues in GitHub if that's easier for you.


Implemented DynamicMap sampled mode

DynamicMaps now have a sampled mode allowing defining them in closed mode without a fixed sampling. The user may sample from them explicitly or they may be displayed in a composite object containing HoloMaps that define a fixed number of samples.

All looks good! Keeps DynamicMap simple in many cases but leaves flexibility when sampled=True.

Great, now that Travis has passed, I'll merge. Fingers crossed this is the last major thing before release.


Improve accessibility

Thanks for sharing your code. I tried it - installing was easy and it works as advertised.
I do want to mention though that the resulting HTML structure has a significant impact on accessibility. Wrapping the grid items into column
s means that the tab order of the page is changed. Given a 4x3 grid, people who rely on keyboard navigation now have to step through the items in a 1-5-9-2-6-10-3-7-11-4-8-12 order. This is extremely confusing, especially for blind users.
Wrapping the columns in
s also means that it is not possible to apply the masonry component to a HTML list (
 or
). These tags are often used to build semantic and accessible markup.
IMHO as web developers we have an obligation to build websites for everybody. If there are ways to improve the accessibility of this component, that would be awesome. If there aren't, please mention the impact on accessibility in the readme.

This is a very valid point. I'd wonder how far tabIndex would get us in this case, and if there are any other attributes/values we can apply?
Happy to help out here with some additional help

I have tried to come up with an easy CSS-only way to do it, but I'm afraid I don't have the answer. This CSS Tricks article lists a number of solutions, but no magic bullet.
That said I do know that tabIndex is not the answer. In fact tabIndex is bad for a11y, because the browser will prioritize any element with a tabIndex greater than 0. Quoting MDN:

Avoid using tabindex values greater than 0. Doing so makes it difficult for people who rely on assistive technology to navigate and operate page content. Instead, write the document with the elements in a logical sequence.

Hi! I actually handled the tab/shift+tab behavior like this:
This works on a stateless component, but adjusting the declarations to use state and 'this' will suffice.
First, I instance an empty array (before the return statement)
let imgRefs = []
Inside the  tag, I've mapped the images from an array of elements.
On each element of that map, I set
ref={(r) => {imgRefs[img-${i}] = r }}  onKeyDown={ e => handleImgKeydown(e, i) }
This will create refs for every element inside your masonry grid and store it on that imgRefs array.
Next, you can take a look at my 'handleImgKeydown' function, design only to do something when Tab is pressed
You can make it shorter, but for clarity purposes I've spared no line
`  const handleImgKeydown = (e, i) => {
if (e.key === 'Tab'){
// Determine the sign of the operation.
// If shift key is pressed, it goes to the previous element
  let interval = 1
  // Check if shift is pressed too
  if(e.shiftKey){
    interval = -1
  }
  const newIndex = i + interval
  // Handle edge cases. 'Images' is the array of elements with the attributes to fill the masonry. Change it to your own.
  if (newIndex >= 0 && newIndex <= images.length){
    // This prevents the tab to jump to the default next element
    e.preventDefault()
    imgRefs[`img-${newIndex}`].focus()
  }
}

}`
I hope that was helpful!

What I did was add the following prop to the Masonry component:
role="list"
Then within whatever child I place within the Masonry component, I use role="listitem".
This tells the screenreader to treat the container as  and the children as  even though the markup is just divs and even though there is a container column, the screenreader ignores this. This fixes this issue for the screenreader for me. Maybe this should be added to the Readme?

Thanks for the role="listitem" tip, good to know.
As for the JS to fix keyboard navigation... I appreciate the effort but personally I'm not a big fan of interfering with key presses. (What if someone changed their keyboard shortcuts because their left hand is injured?) Also this doesn't seem to solve screen reader issues.
PS. You might want to know that native CSS masonry is on the horizon.

This is great @sheparddw, thanks for the find!
I'll be keeping an eye on the native CSS solution, which ideally we can roll into the plugin for supporting browsers - thanks for the link @marcvangend


[mask_rom] Should the mask ROM clear (and save) the reset reason?

The reset reason is 'sticky' and so at each reset reason bits accumulate until software clears them. For example, if after power-on the chip resets due to a watchdog timer bite both the POR and AON_TIMER reset reason bits will be set despite only the AON_TIMER being responsible for the last reset.
Unless there is already an existing plan for this I propose that mask ROM:

saves the current reset reasons into a slot in the retention SRAM
clears the reset reasons in the rstmgr ready for the next reset

Putting the reset reason into the retention SRAM means that we could save the reset reasons for the last N resets if we want.

@moidx @alphan @jon-flatley


How do i change the root of RailsAdmin?

I'd like to hide the dashboard of rails_admin.
When user login to the admin area he must go to a model page of rails_admin.
Is that possible?

Please use StackOverflow for the support request, thanks.


Doc: Cleanup for build errors.

Added a new file to hold cache internal types to prevent undefined type errors.
Cleaned up some other dangling references, mostly in the cache architecture area.

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1626/ for details.

Intel CC build successful! See https://ci.trafficserver.apache.org/job/icc-github/59/ for details.

Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1521/ for details.

clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/191/ for details.

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1628/ for details.

Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1523/ for details.

Intel CC build successful! See https://ci.trafficserver.apache.org/job/icc-github/61/ for details.

clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/193/ for details.


Please, add the proxy request address. chatgpt4.0 is a proxy transfer, not a direct connection.

Please, honey!!!

Please, honey!!!

Please, honey!!!


Add ios-swift-collapsible-table-section by @jeantimex to Table View /…

Project URL

https://github.com/jeantimex/ios-swift-collapsible-table-section
Description

Add ios-swift-collapsible-table-section by @jeantimex to Table View / Collection View section
Checklist

[x] Only one project/change is in this pull request
[x] Addition in chronological order (bottom of category)
[x] Supports iOS 7 or later
[x] Has a commit from less than 2 years ago
[x] Has a clear README in English

… Collection View section

Thanks @nschucky for adding my project to this awesome repo! I feel excited and lucky, will continue to make the project even better.

This is not a library. Just an example app

Hi @nschucky and @lfarah, finally I made a pod for this project, and it's released, see https://github.com/jeantimex/CollapsibleTableSectionViewController. The implementation is different from https://github.com/rob-nash/CollapsableTable, I'd like to let developers use this controller as easy as using a UITableviewController, that is to configure the data and settings from protocol.
I love awesome-ios project and it's the best Swift community in github, so I really want to contribute, please let me know how I can have my project list in your repo, I will try my best, thanks again!
Also I wrote a medium for the implementation here: https://medium.com/@jeantimex/how-to-implement-collapsible-table-section-in-ios-142e0c6266fd

cool, can you open a pull request :)

Sure, will do! Thanks @dkhamsing!

Oh wow, this is quality! Good job on the lib, @jeantimex! 🙌
You also did something that almost nobody does, which was a Medium post. Really liked that!
Thanks for wanting to wanting to contribute. This lib reached the point we are now thanks to our contributors!

Thanks @lfarah! Here is the pull request: https://github.com/vsouza/awesome-ios/pull/1886 :)


Incremental field must not be nullable

When doing incremental fetching the cloumn must not be nullable because the result is ordered by incremental column and null messes that up (it would actually skip any NULL columns as they would be sorted at the beginning).

This will be the case for all db extractors


Javascript error on the student_interface when viewing an assignment without a valid group

Steps to reproduce:

create or modify an assignment to required for a student to have a group of 2 to 3
login as a student and select that assignment
note the javascript and .css errors:

"NetworkError: 404 Not Found - http://localhost:3000/stylesheets/content.css"
and
document.on is not a function
document.on("click", "*[data-confirm]", function(event, element) {
coming from rails.js line: 128

Hmm, I'm starting to believe something is wrong with our rails.js. Could it be that there was going something wrong when we upgraded?

I think it's too early to say that yet. Further investigation is required for this issue.

I'm mentioning this since @tobioboye was experiencing similar weird behaviour if I'm not mistaken.

Yes I am experiencing some issues that could potentially be an issue with the rails.js code itself. However, they are not similar issues the one I had is the Log In button not being disabled because the AJAX "before" event handler was absent. From the blogs I've been reading up about this "document.on is not a function" issue, it happened in earlier releases of Prototype's rails.js file but hasn't happened in the current Prototype 1.7_rc2


Fix a "CustomView" typo in SliverAppBar documentation

Looks like travis found one more "issue": The very last semicolon needs to be removed. I've already incorporated that in the follow-up PR https://github.com/flutter/flutter/pull/16634 that I intended to submit after this one to fix another sample code in the same file. If you want, you can just close this PR and I'll address this issue in my PR as well. Or, you can update this one, I'll submit it and than rebase mine on top of it.

Go ahead! No need to make things unnecessarily complicated. :)


distr6 cheatsheet

v.1.1.0 - pdf and png

Sorry do you mean added the new pdf to the cheatsheets fork or to my own repo? (I did the first but not the second)