patch
stringlengths
17
31.2k
y
int64
1
1
oldf
stringlengths
0
2.21M
idx
int64
1
1
id
int64
4.29k
68.4k
msg
stringlengths
8
843
proj
stringclasses
212 values
lang
stringclasses
9 values
@@ -62,8 +62,14 @@ module Beaker def close begin @ssh.close if @ssh - rescue - @ssh.shutdown! + rescue => e + @logger.warn "Attemped ssh.close. Caught an error: #{e.message} Attempting ssh.shutdown!..." + begin + @ssh.shutdown! + rescue => e + ...
1
require 'socket' require 'timeout' require 'net/scp' module Beaker class SshConnection attr_accessor :logger RETRYABLE_EXCEPTIONS = [ SocketError, Timeout::Error, Errno::ETIMEDOUT, Errno::EHOSTDOWN, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ECONNRESET, ...
1
9,415
would be good to have a test for the case when `shutdown!` raises
voxpupuli-beaker
rb
@@ -2747,6 +2747,10 @@ short HbaseInsert::codeGen(Generator *generator) generator->initTdbFields(hbasescan_tdb); + if (CmpCommon::getDefault(HBASE_ASYNC_OPERATIONS) == DF_ON + && t == ComTdbHbaseAccess::INSERT_) + hbasescan_tdb->setAsyncOperations(TRUE); + if (getTableDesc()->getNATable()->isSe...
1
/********************************************************************** // @@@ START COPYRIGHT @@@ // // (C) Copyright 1994-2015 Hewlett-Packard Development Company, L.P. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You m...
1
6,905
Does upsert pass this check also?
apache-trafodion
cpp
@@ -43,6 +43,9 @@ func (r *helper) Patch(name types.NamespacedName, kind, apiVersion string, patch WithField("stderr", ioStreams.ErrOut.(*bytes.Buffer).String()).Warn("running the patch command failed") return err } + r.logger. + WithField("stdout", ioStreams.Out.(*bytes.Buffer).String()). + WithField("stder...
1
package resource import ( "bytes" "fmt" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/cli-runtime/pkg/genericclioptions" kcmdpatch "k8s.io/kubectl/pkg/cmd/patch" cmdutil "k8s.io/kubectl/pkg/cmd/util" ) var ( patchTypes = map[string]types.PatchType{ "json": types.JSON...
1
15,594
Apologies reviewers, I did end up pushing another change. I was starting to request SRE-P help to get the apiserver configs from some clusters before and after when I realized I can just log the stdout from the patch command to see if anything was changed or not. Much simpler to verify if my work did or did not make ch...
openshift-hive
go
@@ -23,6 +23,7 @@ import ( const ( kbfsRepoDir = ".kbfs_git" kbfsConfigName = "kbfs_config" + kbfsConfigNameTemp = "._kbfs_config" gitSuffixToIgnore = ".git" kbfsDeletedReposDir = ".kbfs_deleted_repos" )
1
// Copyright 2017 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libgit import ( "context" "fmt" "io/ioutil" "os" "path" "regexp" "strings" "github.com/keybase/client/go/libkb" "github.com/keybase/client/go/protocol...
1
17,978
I'm not sure this naming is a good idea; that's the format for macOS xattr metadata files on unsupported filesystems.
keybase-kbfs
go
@@ -1,4 +1,4 @@ -class AddIndexOnSectionIdAndTeacherIdToSectionTeachers < ActiveRecord::Migration +class AddIndexOnSectionIdAndTeacherIdToSectionTeachers < ActiveRecord::Migration[4.2] def up change_table :section_teachers do |t| t.remove_index :section_id
1
class AddIndexOnSectionIdAndTeacherIdToSectionTeachers < ActiveRecord::Migration def up change_table :section_teachers do |t| t.remove_index :section_id t.remove_index :teacher_id t.index [:section_id, :teacher_id], unique: true end end def down change_table :section_teachers do |t|...
1
18,646
Metrics/LineLength: Line is too long. [85/80]
thoughtbot-upcase
rb
@@ -19,12 +19,13 @@ package org.apache.iceberg.flink; - import java.util.List; import org.apache.flink.table.api.SqlParserException; import org.apache.iceberg.AssertHelpers; import org.apache.iceberg.FileFormat; import org.apache.iceberg.catalog.Namespace; +import org.apache.iceberg.events.Listeners; +import ...
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
1
30,033
Please remove these imports. The project's style is to use `Assert.assertEquals` and not import static methods in general. This also caused a lot of unnecessary changes.
apache-iceberg
java
@@ -112,7 +112,10 @@ static int http_post(struct flb_out_http *ctx, payload_buf, payload_size, ctx->host, ctx->port, ctx->proxy, 0); - + if (!c) { + flb_plg_error(ctx->ins, "[http_client] failed to create HTTP client"); + return...
1
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Fluent Bit * ========== * Copyright (C) 2019-2021 The Fluent Bit Authors * Copyright (C) 2015-2018 Treasure Data Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in co...
1
14,724
thanks. Note that returning at this point might leak memory from the allocations above, so the PR will need to take care of that too.
fluent-fluent-bit
c
@@ -492,10 +492,13 @@ class MainWindow(QWidget): @pyqtSlot(bool) def _on_fullscreen_requested(self, on): if on: - self.state_before_fullscreen = self.windowState() - self.showFullScreen() + self.window_state_before_fullscreen = self.windowState() + self.con...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
1
19,680
If you really want to rename this, you'll also need to adjust the name in `__init__` and in other places it's used (`browser/commands.py`).
qutebrowser-qutebrowser
py
@@ -53,6 +53,7 @@ public class MapLayerMetadata implements Serializable { // ForeignKey to DataFile //x@ManyToOne // For now, make this unique: Each DataFile may only have one map + //@OneToOne(cascade = {CascadeType.REMOVE, CascadeType.MERGE, CascadeType.PERSIST}) // TODO: Figure out why this doesn'...
1
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package edu.harvard.iq.dataverse; import java.io.Serializable; import java.sql.Timestamp; import java.util.Arrays; import java.util.L...
1
37,093
As discussed at standup, I gave up on this. Calling `DeleteMapLayerMetadataCommand` felt cleaner anyway because there might be other cleanup that needs to happen. @scolapasta and @matthew-a-dunlap plan to discuss this.
IQSS-dataverse
java
@@ -84,5 +84,8 @@ func (a *action) Matches(act coretesting.Action) error { return nil } + fmt.Printf("EXP:%+v\n", objExp.GetObject()) + fmt.Printf("ACT:%+v\n", objExp.GetObject()) + return fmt.Errorf("unexpected difference between actions: %s", pretty.Diff(objExp.GetObject(), objAct.GetObject())) }
1
/* Copyright 2019 The Jetstack cert-manager contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
1
18,018
Do we need these changes? If so, can you tidy up the messages? Looks like it might have been your testing/debugging changes
jetstack-cert-manager
go
@@ -63,6 +63,9 @@ const ( // SecretTypeEnv is to show secret type being ENVIRONMENT_VARIABLE SecretTypeEnv = "ENVIRONMENT_VARIABLE" + + // TargetLogDriver is to show secret target being "LOG_DRIVER", the default will be "CONTAINER" + SecretTargetLogDriver = "LOG_DRIVER" ) // DockerConfig represents additional...
1
// Copyright 2014-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). You may // not use this file except in compliance with the License. A copy of the // License is located at // // http://aws.amazon.com/apache2.0/ // // or in the "license...
1
21,916
where is the default being set?
aws-amazon-ecs-agent
go
@@ -154,7 +154,7 @@ static void found_package_cb (const char *line, vString *name = vStringNew (); tagEntryInfo tag; - vStringNCopyS (name, line + matches[1].start, matches[1].length); + vStringNCopyS (name, line + matches[2].start, matches[2].length); initTagEntry (&tag, vStringValue (name), RpmSpecKinds ...
1
/* * Copyright (c) 2016 Masatake YAMATO * Copyright (c) 2016 Red Hat, Inc. * * This source code is released for free distribution under the terms of the * GNU General Public License version 2 or (at your option) any later version. * * This module contains functions for generating tags for rpm spec files. */ ...
1
14,937
these changes should likely be in the next commit instead
universal-ctags-ctags
c
@@ -26,9 +26,12 @@ import ( "github.com/stretchr/testify/assert" ) +type Foobar struct { + Foo string +} + // TestFormat ensures the formatter and AddonTransform works as expected. func TestFormat(t *testing.T) { - // TODO: Add table formatter tests after implementing table formatter for _, tc := range []struc...
1
// Copyright 2019 Antrea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to ...
1
11,285
Since you have defined this struct, I would suggest to replace all exist literal structs by this.
antrea-io-antrea
go
@@ -168,6 +168,7 @@ public class K9 extends Application { private static boolean mAnimations = true; private static boolean mConfirmDelete = false; + private static boolean mConfirmMenuDiscard = true; private static boolean mConfirmDeleteStarred = false; private static boolean mConfirmSpam = fa...
1
package com.fsck.k9; import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.BlockingQueue; import java.util.concurrent.SynchronousQueue; import android.app.Application; import android.content.ComponentName; import android.co...
1
13,134
The field name doesn't really capture what this option does. I think `mConfirmDiscardMessage` would be a better choice.
k9mail-k-9
java
@@ -192,6 +192,15 @@ class FileProvider extends BaseProvider return; } + // is_file will cause a fatal error if binary content is not a string + if (!is_string($media->getBinaryContent())) { + throw new \RuntimeException(sprintf( + 'Invalid data provided f...
1
<?php /* * This file is part of the Sonata Project package. * * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sonata\MediaBundle\Provider; use Gaufrette\Filesystem...
1
7,442
what if `$media->getBinaryContent() == Symfony\Component\HttpFoundation\File\File` does `is_string()` return `true`? ping @greg0ire
sonata-project-SonataMediaBundle
php
@@ -1065,11 +1065,9 @@ void GenStruct(StructDef &struct_def, std::string *code_ptr) { } } // generate object accessors if is nested_flatbuffer + if (field.nested_flatbuffer) { auto nested = field.attributes.Lookup("nested_flatbuffer"); - if (nested) { - auto nested_qualified_name = - parser_...
1
/* * Copyright 2014 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
1
12,343
maybe rather than `bool` make this field a `StructDef *` ?
google-flatbuffers
java
@@ -209,6 +209,13 @@ func (fbm *folderBlockManager) enqueueBlocksToDelete(toDelete blocksToDelete) { fbm.blocksToDeleteChan <- toDelete } +func (fbm *folderBlockManager) enqueueBlocksToDeleteAfterShortDelay( + toDelete blocksToDelete) { + fbm.blocksToDeleteWaitGroup.Add(1) + time.AfterFunc(10*time.Millisecond, + ...
1
// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libkbfs import ( "errors" "fmt" "sync" "time" "github.com/keybase/client/go/logger" "golang.org/x/net/context" ) type fbmHelper interface { getMDForFBM...
1
12,011
Shall we maybe put this in a `const` like `backgroundTaskTimeout`?
keybase-kbfs
go
@@ -272,6 +272,11 @@ namespace Datadog.Trace.TestHelpers ctx.Response.OutputStream.Write(buffer, 0, buffer.Length); ctx.Response.Close(); } + catch (InvalidOperationException) + { + // this can occur when setting...
1
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Collections.Immutable; using System.Collections.Specialized; using System.Diagnostics; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; using Datadog.Core.Tools; usi...
1
19,598
CI is complaining about this.
DataDog-dd-trace-dotnet
.cs
@@ -31,6 +31,14 @@ import java.util.Date; */ public class DefaultHistoryRemovalTimeProvider implements HistoryRemovalTimeProvider { + public static Date determineRemovalTime(Date initTime, Integer timeToLive) { + Calendar removalTime = Calendar.getInstance(); + removalTime.setTime(initTime); + removalTim...
1
/* * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH * under one or more contributor license agreements. See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. Camunda licenses this file to you under the Apache License, * Version 2.0; y...
1
10,726
Let's only change a file if it is really necessary. Such a change does not bring much value and makes it harder to find the original commit in which the method was introduced.
camunda-camunda-bpm-platform
java
@@ -210,6 +210,14 @@ class ImageExtension extends Twig_Extension $htmlAttributes = $attributes; unset($htmlAttributes['type'], $htmlAttributes['size']); + $useLazyLoading = array_key_exists('lazy', $attributes) ? (bool)$attributes['lazy'] : true; + $isAttributeClassExistsAndNotEmpty = ...
1
<?php declare(strict_types=1); namespace Shopsys\FrameworkBundle\Twig; use Shopsys\FrameworkBundle\Component\Domain\Domain; use Shopsys\FrameworkBundle\Component\Image\ImageFacade; use Shopsys\FrameworkBundle\Component\Image\ImageLocator; use Shopsys\FrameworkBundle\Component\Utils\Utils; use Symfony\Bundle\Framewor...
1
19,667
I would prefer to set up space between classes in format pattern, `%s %s` and then use `trim()` to remove unnecessary whitespaces. This will also solve stripping whitespaces from the beginning and end of a string `$attributes['class']`
shopsys-shopsys
php
@@ -22,9 +22,13 @@ AdminJobExecutor::AdminJobExecutor(Sentence *sentence, void AdminJobExecutor::execute() { LOG(INFO) << __func__ << " enter"; - auto opEnum = toAdminJobOp(sentence_->getType()); + auto optOpEnum = toAdminJobOp(sentence_->getType()); + if (!optOpEnum) { + LOG(ERROR) << "unknown ...
1
/* Copyright (c) 2019 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License, * attached with Common Clause Condition 1.0, found in the LICENSES directory. */ #include "gen-cpp2/meta_types.h" #include "http/HttpClient.h" #include "graph/AdminJobExecutor.h" #include "process/Proce...
1
28,167
when Op is illegal should return here?
vesoft-inc-nebula
cpp
@@ -447,8 +447,6 @@ public class FlowRunnerManager implements EventListener, } catch (IOException e) { logger.error(e); } - - installedVersions.remove(versionKey); } } }
1
/* * Copyright 2012 LinkedIn Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
1
12,729
don't we need to remove the project version from installedVersions?
azkaban-azkaban
java
@@ -47,6 +47,12 @@ module Selenium @bridge.send_command(cmd: cmd, params: params) end + def print_page(**options) + options[:page_ranges] &&= Array(options[:page_ranges]) + + bridge.print_page(options) + end + private def debugger_address
1
# frozen_string_literal: true # Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0...
1
18,367
the bridge here isn't defined as an accessor / reader to try mask it better. So you need to directly call the iVar `@bridge` here.
SeleniumHQ-selenium
java
@@ -51,7 +51,10 @@ func (s *DaemonServer) FlushIPSets(ctx context.Context, req *pb.IPSetsRequest) ( ipset := ipset s.IPSetLocker.Lock(ipset.Name) err := flushIPSet(ctx, req.EnterNS, pid, ipset) - s.IPSetLocker.Unlock(ipset.Name) + if err != nil { + return nil, err + } + err = s.IPSetLocker.Unlock(ipset.N...
1
// Copyright 2020 Chaos Mesh Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
1
21,524
This is intended. Pls revert this.
chaos-mesh-chaos-mesh
go
@@ -68,7 +68,7 @@ interface RedBlackTree<T> extends Iterable<T> { static <T extends Comparable<? super T>> RedBlackTree<T> ofAll(Iterable<? extends T> values) { Objects.requireNonNull(values, "values is null"); - return ofAll((Comparator<? super T> & Serializable) T::compareTo, values); + ...
1
/* / \____ _ _ ____ ______ / \ ____ __ _______ * / / \/ \ / \/ \ / /\__\/ // \/ \ // /\__\ JΛVΛSLΛNG * _/ / /\ \ \/ / /\ \\__\\ \ // /\ \ /\\/ \ /__\ \ Copyright 2014-2016 Javaslang, http://javaslang.io * /___/\_/ \_/\____/\_/ \_/\__\/__/\__\_/ \_// \__/\_____/ ...
1
9,875
Something wrong with cast to `(Comparator<> & Serializable)`, need to be investigated
vavr-io-vavr
java
@@ -217,15 +217,10 @@ export default class App extends Component { // eslint-disable-next-line no-unused-vars handleClickSearch = (_, { suggestionValue, method }) => { - const { packages } = this.state; switch(method) { case 'click': - window.location.href = getDetailPageURL(suggestionValu...
1
import React, { Component, Fragment } from 'react'; import isNil from 'lodash/isNil'; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogContent from '@material-ui/core/DialogContent'; import DialogTitle...
1
19,606
I think we need this. Not sure, I'll test.
verdaccio-verdaccio
js
@@ -83,7 +83,6 @@ module Beaker host['user'] = 'google_compute' disable_se_linux(host, @options) - disable_iptables(host, @options) copy_ssh_to_root(host, @options) enable_root_login(host, @options) host['user'] = default_user
1
require 'time' module Beaker #Beaker support for the Google Compute Engine. class GoogleCompute < Beaker::Hypervisor SLEEPWAIT = 5 #number of hours before an instance is considered a zombie ZOMBIE = 3 #Create the array of metaData, each member being a hash with a :key and a :value. Sets #:de...
1
6,706
I'm going to need to check if google compute requires these steps in this order, or if you can disable iptables after the fact.
voxpupuli-beaker
rb
@@ -2,6 +2,7 @@ // sources: // build/static/charts/traefik-10.3.001.tgz // build/static/charts/traefik-crd-10.3.001.tgz +//go:build !no_stage // +build !no_stage package static
1
// Code generated for package static by go-bindata DO NOT EDIT. (@generated) // sources: // build/static/charts/traefik-10.3.001.tgz // build/static/charts/traefik-crd-10.3.001.tgz // +build !no_stage package static import ( "bytes" "compress/gzip" "fmt" "io" "io/ioutil" "os" "path/filepath" "strings" "time"...
1
10,720
Did go change their tags with the new version?
k3s-io-k3s
go
@@ -330,11 +330,15 @@ func (s *Server) newEndpointsServer(ctx context.Context, catalog catalog.Catalog } func (s *Server) newBundleManager(cat catalog.Catalog, metrics telemetry.Metrics) *bundle_client.Manager { + log := s.config.Log.WithField(telemetry.SubsystemName, "bundle_client") return bundle_client.NewMana...
1
package server import ( "context" "errors" "fmt" "net/http" _ "net/http/pprof" //nolint: gosec // import registers routes on DefaultServeMux "net/url" "os" "runtime" "sync" "github.com/andres-erbsen/clock" bundlev1 "github.com/spiffe/spire-api-sdk/proto/spire/api/server/bundle/v1" server_util "github.com/...
1
17,883
I don't recall what we decided here in terms of which source would get priority. As written, the static configuration will overwrite datastore results.
spiffe-spire
go
@@ -192,7 +192,7 @@ func replaceSequenceLabel(state *core.BuildState, target *core.BuildTarget, labe } func checkAndReplaceSequence(state *core.BuildState, target, dep *core.BuildTarget, in string, runnable, multiple, dir, outPrefix, hash, test, allOutputs, tool bool) string { - if allOutputs && !multiple && len(de...
1
// Replacement of sequences in genrule commands. // // Genrules can contain certain replacement variables which Please substitutes // with locations of the actual thing before running. // The following replacements are currently made: // // $(location //path/to:target) // Expands to the output of the given build rule...
1
8,666
I think it should still panic for when there are no outputs; might be nice to special-case that though so the message is more explicit.
thought-machine-please
go
@@ -110,12 +110,14 @@ public class SolrMetricManager { public static final int DEFAULT_CLOUD_REPORTER_PERIOD = 60; - private MetricRegistry.MetricSupplier<Counter> counterSupplier; - private MetricRegistry.MetricSupplier<Meter> meterSupplier; - private MetricRegistry.MetricSupplier<Timer> timerSupplier; - pr...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
37,713
*NULL_DEREFERENCE:* object `null` is dereferenced by call to `meterSupplier(...)` at line 122.
apache-lucene-solr
java
@@ -60,12 +60,7 @@ function _command(server, ns, cmd, options, callback) { finalCmd.$clusterTime = clusterTime; } - if ( - isSharded(server) && - !shouldUseOpMsg && - readPreference && - readPreference.preference !== 'primary' - ) { + if (isSharded(server) && !shouldUseOpMsg && readPreference &...
1
'use strict'; const { Query, Msg } = require('../commands'); const { getReadPreference, isSharded } = require('./shared'); const { isTransactionCommand } = require('../../transactions'); const { applySession } = require('../../sessions'); const { maxWireVersion, databaseNamespace } = require('../../utils'); const { Mon...
1
17,720
switch over to .mode
mongodb-node-mongodb-native
js
@@ -125,7 +125,7 @@ describe('HiddenColumns', () => { }); it('should return correct visual indexes when columns sequence is non-contiguous ' + - '(force desync between physical and visual indexes)', () => { + '(force desync between physical and visual indexes)', () => { const hot...
1
describe('HiddenColumns', () => { const id = 'testContainer'; beforeEach(function() { this.$container = $(`<div id="${id}"></div>`).appendTo('body'); }); afterEach(function() { if (this.$container) { destroy(); this.$container.remove(); } }); describe('public API', () => { des...
1
17,330
I guess your IDE did some auto-fixing here
handsontable-handsontable
js
@@ -32,6 +32,7 @@ import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.DisjunctionMaxQuery; import org.apache.lucene.search.FuzzyQuery; +import org.apache.lucene.search.PhraseQuery; import org.apache.lucene.search.TermQuery; public class Tes...
1
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
1
31,342
This is an unused import failing recommit still.
apache-lucene-solr
java
@@ -133,8 +133,12 @@ module Beaker #move to the host logger.debug "Using scp to transfer #{source_path} to #{target_path}" scp_to host, source_path, target_module_dir, {:ignore => ignore_list} + #rename to the selected module name, if not correct ...
1
module Beaker module DSL module InstallUtils # # This module contains methods to help install puppet modules # # To mix this is into a class you need the following: # * a method *hosts* that yields any hosts implementing # {Beaker::Host}'s interface to act upon. # * a m...
1
11,605
I'm concerned that we're conflating multiple things here. There are 2 things that Beaker should really care about: - Network transport - i.e. `ssh` vs `winrm` - Interpreter - i.e. `bash`, `cmd`, `powershell`, etc The problem is that @cowofevil is running Bitvise SSH, and he assumed we should be setting `is_cygwin: fals...
voxpupuli-beaker
rb
@@ -52,6 +52,6 @@ <%= tinymce :content_css => asset_path('application.css') %> <!-- alert for the default template--> -<div id="edit_guidance_alert_dialog" class="modal" style="display:none"> +<div id="edit_guidance_alert_dialog" class="modal" role="dialog" aria-label="<%=_("Missing Fields Alert")%>" style="display...
1
<% javascript 'views/guidances/admin_edit.js' %> <h1> <%= _('Guidance') %> </h1> <div class="content"> <%= form_for(@guidance, url: admin_update_guidance_path(@guidance), html: { method: :put , id: 'edit_guidance_form', class: 'roadmap-form bordered'}) do |f| %> <fieldset class="side-by-side"> <div...
1
16,740
I think this is ok for now. This ties into the larger issue of the site not having a consistent method for relaying form input errors. Please make sure the focus gets set on the close button when the dialog opens.
DMPRoadmap-roadmap
rb
@@ -44,9 +44,9 @@ const COLUMN_SIZE_MAP_NAME = 'autoColumnSize'; * autoColumnSize: {syncLimit: '40%'}, * ``` * - * The plugin uses {@link GhostTable} and {@link SamplesGenerator} for calculations. - * First, {@link SamplesGenerator} prepares samples of data with its coordinates. - * Next {@link GhostTable} uses c...
1
import { BasePlugin } from '../base'; import { arrayEach, arrayFilter, arrayReduce, arrayMap } from '../../helpers/array'; import { cancelAnimationFrame, requestAnimationFrame } from '../../helpers/feature'; import GhostTable from '../../utils/ghostTable'; import Hooks from '../../pluginHooks'; import { isObject, hasOw...
1
19,174
Should these link be removed?
handsontable-handsontable
js
@@ -217,11 +217,12 @@ class TabbedBrowser(tabwidget.TabWidget): for tab in self.widgets(): self._remove_tab(tab) - def close_tab(self, tab): + def close_tab(self, tab, add_undo=True): """Close a tab. Args: tab: The QWebView to be closed. + add_un...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
1
15,910
Please make this a keyword-only argument by adding a `*` argument before `add_undo`.
qutebrowser-qutebrowser
py
@@ -201,6 +201,13 @@ var eventStreamWriterTestTmpl = template.Must( {{- end }} } + var marshalers request.HandlerList + marshalers.PushBackNamed({{ $.API.ProtocolPackage }}.BuildHandler) + payloadMarshaler := protocol.HandlerPayloadMarshal{ + Marshalers: marshalers, + } + _ = payloadMarshaler + event...
1
// +build codegen package api import ( "text/template" ) var eventStreamWriterTestTmpl = template.Must( template.New("eventStreamWriterTestTmpl").Funcs(template.FuncMap{ "ValueForType": valueForType, "HasNonBlobPayloadMembers": eventHasNonBlobPayloadMembers, "EventHeaderValueForType": setEventHe...
1
10,229
didn't quite follow what this code block is doing.
aws-aws-sdk-go
go
@@ -1071,6 +1071,12 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med } function onWindowKeyDown(e) { + // FIXME: Conflicts with keyboard navigation + // FIXME: Then the keyboard is completely ignored. Need another solution. + if (la...
1
define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "mediaInfo", "focusManager", "imageLoader", "scrollHelper", "events", "connectionManager", "browser", "globalize", "apphost", "layoutManager", "userSettings", "scrollStyles", "emby-slider", "paper-icon-button-light", "css!css/videoosd"], functi...
1
11,997
this doesn't sound pretty... I would rather we have a proper navigation for all modes - AFAIK TV remote navigation is very similar to normal keyboard, but maybe it just uses another key codes - those should be extracted in a single file and defined there depending on context then
jellyfin-jellyfin-web
js
@@ -205,4 +205,17 @@ function patchDOMElement(dom, newVNode, internal, globalContext, commitQueue) { dom.firstChild ); } + + if ('value' in newProps && dom._isControlled) { + dom._prevValue = newProps.value; + + if (newProps.value !== dom.value) { + setProperty(dom, 'value', i, oldProps.value, 0); + } + }...
1
import { diffChildren } from './children'; import { setProperty } from './props'; import options from '../options'; import { renderComponent } from './component'; import { RESET_MODE, TYPE_TEXT, TYPE_ELEMENT, MODE_SUSPENDED, MODE_ERRORED, TYPE_ROOT, MODE_SVG, UNDEFINED } from '../constants'; import { getChildDo...
1
17,294
After diffing the children we check whether the value got out of sync, if it did we update it. We also update the `_prevValue` to prepare for the next event hitting our controlled component
preactjs-preact
js
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// Package node provides the glue-code needed in order +// to start a Bee node. package node import (
1
// Copyright 2020 The Swarm Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package node import ( "context" "crypto/ecdsa" "errors" "fmt" "io" "log" "net" "net/http" "path/filepath" "time" "github.com/ethereum/go-ethereu...
1
13,684
It provides a type called Node which is a fully functional bee client. This package is where the dependencies are injected. It is not just a glue-code, it is concept of node.
ethersphere-bee
go
@@ -330,6 +330,8 @@ class ConfigManager(QObject): CHANGED_OPTIONS = { ('content', 'cookies-accept'): _get_value_transformer('default', 'no-3rdparty'), + ('storage', 'download-directory'): + _get_value_transformer('', '%'), } changed = pyqtSignal(str, str)
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
1
13,175
I think this will change `''` to `'%'` unconditionally, i.e. there'll be no way to set `''` anymore. This should really only be used for values which make no sense anymore.
qutebrowser-qutebrowser
py
@@ -88,6 +88,13 @@ public interface Table { */ Map<Integer, SortOrder> sortOrders(); + /** + * Return the {@link RowKey row key} for this table. + * + * @return this table's row key. + */ + RowKey rowKey(); + /** * Return a map of string properties for this table. *
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
1
35,160
Nit: this table's row key map -> this table's row keys map
apache-iceberg
java
@@ -87,7 +87,7 @@ void proj_assign_context( PJ* pj, PJ_CONTEXT *ctx ) pj_ctx pj_ctx::createDefault() { pj_ctx ctx; - ctx.debug_level = PJ_LOG_ERROR; + ctx.debug_level = PJ_LOG_NONE; ctx.logger = pj_stderr_logger; NS_PROJ::FileManager::fillDefaultNetworkInterface(&ctx);
1
/****************************************************************************** * Project: PROJ.4 * Purpose: Implementation of the PJ_CONTEXT thread context object. * Author: Frank Warmerdam, warmerdam@pobox.com * ****************************************************************************** * Copyright (c) 2...
1
12,404
this change should be reverted
OSGeo-PROJ
cpp
@@ -26,8 +26,10 @@ __copyright__ = "Copyright 2014-2018 Florian Bruhin (The Compiler)" __license__ = "GPL" __maintainer__ = __author__ __email__ = "mail@qutebrowser.org" -__version_info__ = (1, 5, 0) -__version__ = '.'.join(str(e) for e in __version_info__) +__version__ = "1.5.0" +__version_info__ = [int(part) for p...
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
1
22,459
I'm a bit confused about the `os.path.dirname(basedir)` here - is this just to get to the parent directory? Either way, I think I'd prefer just having this in `update_version.py` as it's not needed in qutebrowser itself.
qutebrowser-qutebrowser
py
@@ -750,8 +750,8 @@ func TestConfigCheck(t *testing.T) { http_port = 8222 `, err: errors.New(`Duplicate user "foo" detected`), - errorLine: 6, - errorPos: 21, + errorLine: 5, + errorPos: 19, }, { name: "when accounts block imports are not a list",
1
// Copyright 2018 The NATS Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in wr...
1
10,607
Revert this change and see below why...
nats-io-nats-server
go
@@ -1,6 +1,6 @@ _base_ = [ '../_base_/models/cascade_mask_rcnn_r50_fpn.py', - '../_base_/datasets/coco_instance.py', + '../_base_/datasets/lvis_v1_instance.py', '../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py' ]
1
_base_ = [ '../_base_/models/cascade_mask_rcnn_r50_fpn.py', '../_base_/datasets/coco_instance.py', '../_base_/schedules/schedule_2x.py', '../_base_/default_runtime.py' ] model = dict( backbone=dict( depth=101, init_cfg=dict(type='Pretrained', checkpoint='torchvisio...
1
26,795
Should not switch to `lvis_v1_instance` here because that base config uses ClassBalancedDataset to oversample the data.
open-mmlab-mmdetection
py
@@ -70,7 +70,7 @@ public class NodeOptions { Capabilities caps = info.getCanonicalCapabilities(); builders.stream() .filter(builder -> builder.score(caps) > 0) - .peek(builder -> LOG.info(String.format("Adding %s %d times", caps, info.getMaximumSimultaneousSessions()))) + .pee...
1
// Licensed to the Software Freedom Conservancy (SFC) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The SFC licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you m...
1
17,124
This is an informational message that allows someone to read the console output and understand how the grid node is configured. Please leave.
SeleniumHQ-selenium
py
@@ -52,6 +52,9 @@ type Alert interface { // GetKvdbInstance. GetKvdbInstance() kvdb.Kvdb + // RaiseSingleton raises a singleton alert. + RaiseSingleton(alert *api.Alert) error + // Raise raises an Alert. Raise(alert *api.Alert) error
1
package alert import ( "errors" "fmt" "sync" "time" "github.com/libopenstorage/openstorage/api" "github.com/portworx/kvdb" ) var ( // ErrNotSupported implemenation of a specific function is not supported. ErrNotSupported = errors.New("Implementation not supported") // ErrNotFound raised if Key is not found....
1
6,897
This doesn't make sense to me. What does RaiseSingleton mean? To me it sounds like a single object is being.. raised? Not sure.
libopenstorage-openstorage
go
@@ -45,6 +45,7 @@ public class JavaProcessJobTest { private JavaProcessJob job = null; private Props props = null; private Logger log = Logger.getLogger(JavaProcessJob.class); + private AllJobExecutorTests jobExecutorTests = null; private static String classPaths;
1
/* * Copyright 2014 LinkedIn Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
1
11,834
What's the benefit of having jobExecutorTests as a member variable? What do you think about making the method static? Afterall, it is a stateless method.
azkaban-azkaban
java
@@ -12,6 +12,7 @@ const mdUsageStr = `Usage: The possible subcommands are: dump Dump metadata objects + check Check metadata objects and their associated blocks for errors `
1
package main import ( "fmt" "github.com/keybase/kbfs/libkbfs" "golang.org/x/net/context" ) const mdUsageStr = `Usage: kbfstool md [<subcommand>] [<args>] The possible subcommands are: dump Dump metadata objects ` func mdMain(ctx context.Context, config libkbfs.Config, args []string) (exitStatus int) { if...
1
12,830
This looks like it's only downloading things, not really checking their true validity. Especially for the MD object. Should we call `BareRootMetadata.IsValidAndSigned()` in `mdGet`?
keybase-kbfs
go
@@ -136,6 +136,17 @@ void image_data_reader::load() { select_subset_of_data(); } +void image_data_reader::setup() { + generic_data_reader::setup(); + + using InputBuf_T = lbann::cv_image_type<uint8_t>; + auto cvMat = cv::Mat(1, get_linearized_data_size(), InputBuf_T::T(1)); + m_thread_cv_buffer.resize(omp_get...
1
//////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2014-2016, Lawrence Livermore National Security, LLC. // Produced at the Lawrence Livermore National Laboratory. // Written by the LBANN Research Team (B. Van Essen, et al.) listed in // the CONTRIBUTORS file. <lbann-dev@l...
1
13,089
Nikoli, I believe that this addresses your concern. One question for you or Jae-Seung is if any allocation from the clone is properly cleaned up when the vector is destroyed. I believe that it should.
LLNL-lbann
cpp
@@ -48,6 +48,8 @@ const ( KindLambdaApp Kind = "LambdaApp" // KindCloudRunApp represents deployment configuration for a CloudRun application. KindCloudRunApp Kind = "CloudRunApp" + // KindEcsApp represents deployment configuration for an AWS ECS. + KindEcsApp Kind = "EcsApp" // KindSealedSecret represents a sea...
1
// Copyright 2020 The PipeCD Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agree...
1
15,066
should be `ECSApp`
pipe-cd-pipe
go
@@ -539,7 +539,13 @@ class WebElement(object): @property def rect(self): """A dictionary with the size and location of the element.""" - return self._execute(Command.GET_ELEMENT_RECT)['value'] + if self._w3c: + return self._execute(Command.GET_ELEMENT_RECT)['value'] + ...
1
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
1
15,820
flake8 is going to fail on this having 2 lines
SeleniumHQ-selenium
py
@@ -15,7 +15,6 @@ package podfailure import ( "context" - "errors" "fmt" "time"
1
// Copyright 2019 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
1
12,930
should we make a dir named controllers/scheduler/podchaos
chaos-mesh-chaos-mesh
go
@@ -50,9 +50,9 @@ import ( ) const ( - //KeyNode represents the key values used for specifying the Node Affinity + //KeyNodeHostname represents the key values used for specifying the Node Affinity // based on the hostname - KeyNode = "kubernetes.io/hostname" + KeyNodeHostname = "kubernetes.io/hostname" ) // N...
1
/* Copyright 2019 The OpenEBS Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
1
17,254
there seems to be one KeyNode in kubernetes.go of PV.. would it make sense to use it?
openebs-maya
go
@@ -22,12 +22,12 @@ import ( "fmt" "time" + "github.com/mysteriumnetwork/node/cmd/commands" + "github.com/mysteriumnetwork/node/cmd/commands/cli/clio" "github.com/mysteriumnetwork/node/config" - "github.com/mysteriumnetwork/node/config/urfavecli/clicontext" "github.com/mysteriumnetwork/node/core/connection"...
1
/* * Copyright (C) 2020 The "MysteriumNetwork/node" Authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
1
16,853
Im gonna be a little annoying here but did you configure your linter correctly? This empty line should not be here. Maybe go to settings and check if `goimports` is enabled?
mysteriumnetwork-node
go
@@ -122,6 +122,7 @@ public class EmojiPlugin extends Plugin case FRIENDSCHAT: case PRIVATECHAT: case PRIVATECHATOUT: + case MODPRIVATECHAT: break; default: return;
1
/* * Copyright (c) 2019, Lotto <https://github.com/devLotto> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, th...
1
14,938
Don't think this belongs in this pr
open-osrs-runelite
java
@@ -206,6 +206,16 @@ func (d *Dispatcher) Inbounds() Inbounds { return inbounds } +// Outbounds returns a copy of the map of outbounds for this RPC object. +// The outbounds are already wrapped with middleware +func (d *Dispatcher) Outbounds() Outbounds { + outbounds := make(Outbounds, len(d.outbounds)) + for k, v...
1
// Copyright (c) 2017 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
1
12,640
We can assert on the existence of Outbounds through ClientConfig calls right? Since this is only for tests, do we need this function?
yarpc-yarpc-go
go
@@ -37,14 +37,13 @@ namespace MvvmCross.Core.ViewModels public interface IMvxViewModel<TParameter> : IMvxViewModel where TParameter : class { - Task Initialize(TParameter parameter); + void Declare(TParameter parameter); } //TODO: Can we keep the IMvxViewModel syntax here? Compiler...
1
// IMvxViewModel.cs // MvvmCross is licensed using Microsoft Public License (Ms-PL) // Contributions and inspirations noted in readme.md and license.txt // // Project Lead - Stuart Lodge, @slodge, me@slodge.com using System.Threading; using System.Threading.Tasks; namespace MvvmCross.Core.ViewModels { public in...
1
13,022
@martijn00 so this PR introduces a new ViewModel lifecyle method? It isn't in the PR description/any new docs
MvvmCross-MvvmCross
.cs
@@ -89,6 +89,13 @@ class SingleStageDetector(BaseDetector): Returns: dict[str, Tensor]: A dictionary of loss components. """ + # NOTE the batched image size information may be useful, e.g. + # in DETR, this is needed for the construction of masks, which is + # then us...
1
import torch import torch.nn as nn from mmdet.core import bbox2result from ..builder import DETECTORS, build_backbone, build_head, build_neck from .base import BaseDetector @DETECTORS.register_module() class SingleStageDetector(BaseDetector): """Base class for single-stage detectors. Single-stage detectors ...
1
21,640
Are these modification duplicate? Or should we move it into base detector.
open-mmlab-mmdetection
py
@@ -35,7 +35,7 @@ public class DirectAcyclicGraphSeed { } }); - public static byte[] dagSeed(final long block) { + private static byte[] dagSeed(final long block) { final byte[] seed = new byte[32]; if (Long.compareUnsigned(block, EPOCH_LENGTH) >= 0) { final MessageDigest ke...
1
/* * Copyright ConsenSys AG. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing...
1
23,947
Since this is private and single use it should be un-wrapped inside of the two-arg dagSeed method.
hyperledger-besu
java
@@ -160,11 +160,10 @@ abstract class Tx_Solr_PluginBase_PluginBase extends tslib_pibase { * @param array $configuration configuration array as provided by the TYPO3 core */ protected function initialize($configuration) { - $this->conf = $configuration; - - $this->conf = t3lib_div::array_merge_recursive_overru...
1
<?php /*************************************************************** * Copyright notice * * (c) 2010-2011 Timo Schmidt <timo.schmidt@aoemedia.de> * (c) 2012-2014 Ingo Renner <ingo@typo3.org> * All rights reserved * * This script is part of the TYPO3 project. The TYPO3 project is * free software; you can redistr...
1
5,455
why the order change? Also for the next chunk. (I understand the result will be the same though)
TYPO3-Solr-ext-solr
php
@@ -42,7 +42,9 @@ type FuncDef struct { // Not part of the grammar. Used to indicate internal targets that can only // be called using keyword arguments. KeywordsOnly bool - IsPrivate bool + // allowed return types of the FuncDef + Returns []string + IsPrivate bool } // A ForStatement implements the 'for...
1
package asp // A FileInput is the top-level structure of a BUILD file. type FileInput struct { Statements []*Statement `{ @@ } EOF` } // A Statement is the type we work with externally the most; it's a single Python statement. // Note that some mildly excessive fiddling is needed since the parser we're using doesn't...
1
8,584
I wonder if this should just be a single `string`? We don't have any cases where we return different types and it would make the parser simpler to just read a single identifier.
thought-machine-please
go
@@ -125,7 +125,7 @@ abstract class BaseDataReader<T> implements Closeable { protected InputFile getInputFile(FileScanTask task) { Preconditions.checkArgument(!task.isDataTask(), "Invalid task type"); - return inputFiles.get(task.file().path().toString()); + return getInputFile(task.file().path().toStrin...
1
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
1
32,844
I don't think this needs to change. Can you go back to the previous implementation?
apache-iceberg
java
@@ -32,7 +32,7 @@ from jinja2 import PackageLoader import molecule.utilities as utilities import molecule.validators as validators -from provisioners import Ansible +from molecule.core import Molecule class Commands(object):
1
# Copyright (c) 2015 Cisco Systems # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, ...
1
5,759
Bump it 2 lines higher, 'c' > 'u'.
ansible-community-molecule
py
@@ -0,0 +1,11 @@ +/** + * Copyright @ 2018-present. All rights reserved by Vesoft Inc. + * Author: Fenglin Hou <dutor@vesoft-inc.com> + */ +#include "parser/AstTypes.h" + +namespace vesoft { + + + +}
1
1
13,920
Please do not add author here
vesoft-inc-nebula
cpp
@@ -4,6 +4,7 @@ import ( "database/sql" "encoding/hex" + "github.com/iotexproject/iotex-core/action" "github.com/iotexproject/iotex-core/blockchain" "github.com/iotexproject/iotex-core/config" "github.com/iotexproject/iotex-core/db/rds"
1
package indexservice import ( "database/sql" "encoding/hex" "github.com/iotexproject/iotex-core/blockchain" "github.com/iotexproject/iotex-core/config" "github.com/iotexproject/iotex-core/db/rds" "github.com/iotexproject/iotex-core/pkg/hash" "github.com/pkg/errors" ) type ( // TransferHistory defines the sch...
1
12,881
Similarly, we should be able to persist action uniformly
iotexproject-iotex-core
go
@@ -1,3 +1,8 @@ +#This prevents caching via the browser +#in testing mode +module ActionController::ConditionalGet + def expires_in(*args) ; end +end Workshops::Application.configure do # Settings specified here will take precedence over those in config/application.rb
1
Workshops::Application.configure do # Settings specified here will take precedence over those in config/application.rb # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the tes...
1
6,395
I think i'd prefer this override to be in the test helper instead, if that's possible?
thoughtbot-upcase
rb
@@ -134,6 +134,13 @@ func Untar(source string, dest string, extractionDir string) error { case tar.TypeReg: fallthrough case tar.TypeRegA: + // Always ensure the directory is created before trying to move the file. + fullPathDir := filepath.Dir(fullPath) + err = os.MkdirAll(fullPathDir, 0755) + if err...
1
package archive import ( "archive/tar" "archive/zip" "compress/gzip" "fmt" "io" "os" "path/filepath" "strings" "github.com/drud/ddev/pkg/util" ) // Ungzip accepts a gzipped file and uncompresses it to the provided destination path. func Ungzip(source string, dest string) error { f, err := os.Open(source) ...
1
11,554
This would be better with context added via wrapping or fmt.errorf()
drud-ddev
go
@@ -0,0 +1,19 @@ +// Copyright 2020 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +/...
1
1
10,954
What's the purpose of this file?
GoogleCloudPlatform-compute-image-tools
go
@@ -616,12 +616,14 @@ public class PasscodeManager { */ public void setPasscodeLength(Context ctx, int passcodeLength) { if (passcodeLength > this.passcodeLength) { - if (hasStoredPasscode(ctx)) { + if (hasStoredPasscode(ctx) && passcodeLengthKnown) { this.passco...
1
/* * Copyright (c) 2014-present, salesforce.com, inc. * All rights reserved. * Redistribution and use of this software in source and binary forms, with or * without modification, are permitted provided that the following conditions * are met: * - Redistributions of source code must retain the above copyright noti...
1
17,446
@bhariharan Why was passcode length requirement allowed to be lowered?
forcedotcom-SalesforceMobileSDK-Android
java
@@ -6,14 +6,6 @@ import ( "flag" "io/ioutil" "log" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/credentials" - "github.com/aws/aws-sdk-go/aws/session" - "github.com/google/go-cloud/blob" - "github.com/google/go-cloud/blob/gcsblob" - "github.com/google/go-cloud/blob/s3blob" - "github.com/go...
1
// Command upload saves files to blob storage on GCP and AWS. package main import ( "context" "flag" "io/ioutil" "log" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/google/go-cloud/blob" "github.com/google/go-cloud/blob/gcsblob...
1
10,467
This file needs a license header, too. Sorry I didn't catch that earlier.
google-go-cloud
go
@@ -289,7 +289,7 @@ func main() { } } - err = s.Initialize(cfg, phonebookAddresses) + err = s.Initialize(cfg, phonebookAddresses, string(genesisText[:])) if err != nil { fmt.Fprintln(os.Stderr, err) log.Error(err)
1
// Copyright (C) 2019-2020 Algorand, Inc. // This file is part of go-algorand // // go-algorand is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) ...
1
40,037
probably don't need `[:]` why not reference into `github.com/algorand/go-algorand/daemon/algod/api/server/lib` here and skip bouncing off daemon/algod/server.go ?
algorand-go-algorand
go
@@ -86,8 +86,13 @@ public: const table& y_data, const table& result_values) { auto reference = compute_reference(scale, shift, x_data, y_data); + const table reference_table = dal::detail::homogen_table_builder{} + ...
1
/******************************************************************************* * Copyright 2021 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
1
27,587
Why reference is converted to table?
oneapi-src-oneDAL
cpp
@@ -347,6 +347,19 @@ func (s *DataStore) ListRegistrationEntries(ctx context.Context, s.mu.Lock() defer s.mu.Unlock() + // no pagination allow for this fake, for now it return only one page + if req.Pagination != nil { + if req.Pagination.Token == 0 { + req.Pagination.Token = 1 + } else { + // for now only ...
1
package fakedatastore import ( "context" "errors" "fmt" "sort" "sync" "github.com/golang/protobuf/proto" _ "github.com/jinzhu/gorm/dialects/sqlite" uuid "github.com/satori/go.uuid" "github.com/spiffe/spire/pkg/common/bundleutil" "github.com/spiffe/spire/pkg/common/selector" "github.com/spiffe/spire/pkg/com...
1
10,195
should we implement pagination in the fake datastore so the server startup code that paginates entries for trust domain validation can be tested?
spiffe-spire
go
@@ -15,6 +15,12 @@ func Compile(scope Scope, f *semantic.FunctionExpression, in semantic.MonoType) return nil, errors.Newf(codes.Invalid, "function input must be an object @ %v", f.Location()) } + // If the function is vectorizable, `f.Vectorized` will be populated, and + // we should use the FunctionExpression ...
1
package compiler import ( "github.com/influxdata/flux/codes" "github.com/influxdata/flux/internal/errors" "github.com/influxdata/flux/semantic" "github.com/influxdata/flux/values" ) func Compile(scope Scope, f *semantic.FunctionExpression, in semantic.MonoType) (Func, error) { if scope == nil { scope = NewScop...
1
17,602
What mechanism will be exposed so the caller knows they're using the vectorized version?
influxdata-flux
go
@@ -20,9 +20,9 @@ class TopicsController < ApplicationController @topic = build_new_topic respond_to do |format| if verify_recaptcha(model: @topic) && @topic.save - format.html { redirect_to forum_path(@forum), flash: { success: t('.success') } } + format.html { redirect_to forum_path(@fo...
1
class TopicsController < ApplicationController include TopicsHelper before_action :session_required, only: [:new, :create] before_action :admin_session_required, only: [:edit, :update, :destroy] before_action :find_forum_record, only: [:index, :new, :create] before_action :find_forum_and_topic_records, except...
1
6,956
Can we remove respond_to block its not required here
blackducksoftware-ohloh-ui
rb
@@ -23,12 +23,13 @@ #include "oneapi/dal/algo/jaccard.hpp" #include "oneapi/dal/graph/service_functions.hpp" #include "oneapi/dal/graph/undirected_adjacency_vector_graph.hpp" -#include "oneapi/dal/io/graph_csv_data_source.hpp" -#include "oneapi/dal/io/load_graph.hpp" +#include "oneapi/dal/io/csv.hpp" #include "onea...
1
/******************************************************************************* * Copyright 2020-2021 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apa...
1
31,766
Do not do that even in example, we demonstrate bad practice
oneapi-src-oneDAL
cpp
@@ -202,7 +202,13 @@ module Beaker #Examine the host system to determine the architecture #@return [Boolean] true if x86_64, false otherwise def determine_if_x86_64 - result = exec(Beaker::Command.new("arch | grep x86_64"), :acceptable_exit_codes => (0...127)) + if self['is_cygwin'].nil? or sel...
1
require 'socket' require 'timeout' require 'benchmark' [ 'command', 'ssh_connection' ].each do |lib| require "beaker/#{lib}" end module Beaker class Host SELECT_TIMEOUT = 30 class CommandFailure < StandardError; end # This class provides array syntax for using puppet --configprint on a host clas...
1
8,792
Hm, taking a second look over this, this is why we have the object inheritance structure that we do. This could be divided up by having a custom determine_if_x86_64 in the pswindows/exec hosts and then a default method in hosts.rb. That way all the custom ps windows work is in a single location.
voxpupuli-beaker
rb
@@ -84,11 +84,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests [InlineData(null, new byte[0])] public void EncodesAsAscii(string input, byte[] expected) { - var writerBuffer = _pipe.Writer; - var writer = new BufferWriter<PipeWriter>(writerBuffer); + ...
1
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Buffers; using System.IO.Pipelines; using System.Text; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http; using M...
1
15,377
We have to `.Complete` now because of empty/null string test cases.
aspnet-KestrelHttpServer
.cs
@@ -166,7 +166,7 @@ module Beaker def scp_to source, target, options = {}, dry_run = false return if dry_run - options[:recursive] = File.directory?(source) if options[:recursive].nil? + options[:recursive] = File.directory?(source) options[:chunk_size] = options[:chunk_size] || 16384 ...
1
require 'socket' require 'timeout' require 'net/scp' module Beaker class SshConnection attr_accessor :logger RETRYABLE_EXCEPTIONS = [ SocketError, Timeout::Error, Errno::ETIMEDOUT, Errno::EHOSTDOWN, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Errno::ECONNRESET, ...
1
7,292
Is there still a way to specify no recursion?
voxpupuli-beaker
rb
@@ -438,6 +438,15 @@ Loop: return w, nil } +// Tool is used to communicate the tool's name ot the user. +type Tool struct { + + // HumanReadableName is used for error messages, for example: "image import". + HumanReadableName string + // URISafeName is used programmatically, eg: "image-import" + URISafeName string...
1
// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appl...
1
13,909
How is this name being URI safe and being used programmatically related?
GoogleCloudPlatform-compute-image-tools
go
@@ -358,14 +358,14 @@ module.exports = class ProviderView { state = this.plugin.getPluginState() state.selectedFolders[folderId] = { loading: false, files: files } this.plugin.setPluginState({ selectedFolders: folders }) - const dashboard = this.plugin.uppy.getPlugin('Dashboard') + let ...
1
const { h, Component } = require('preact') const AuthView = require('./AuthView') const Browser = require('./Browser') const LoaderView = require('./Loader') const generateFileID = require('@uppy/utils/lib/generateFileID') const getFileType = require('@uppy/utils/lib/getFileType') const isPreviewSupported = require('@u...
1
12,240
I think we have to keep this as a fallback for now, else it's a small breaking change :(
transloadit-uppy
js
@@ -80,7 +80,7 @@ func TestOpImmediateNote(t *testing.T) { func TestOpDocExtra(t *testing.T) { xd := OpDocExtra("bnz") require.NotEmpty(t, xd) - xd = OpDocExtra("+") + xd = OpDocExtra("-") require.Empty(t, xd) }
1
// Copyright (C) 2019-2020 Algorand, Inc. // This file is part of go-algorand // // go-algorand is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) ...
1
37,946
nit: shouldn't be part of this PR.
algorand-go-algorand
go
@@ -83,7 +83,7 @@ describe('Cursor Async Iterator Tests', function() { expect(doc).to.exist; cursor.close(); } - throw new Error('expected closing the cursor to break iteration'); + throw new MongoError('expected closing the cursor to break iteration'); } catch (e) { ...
1
'use strict'; const { expect } = require('chai'); const { MongoError } = require('../../../index'); describe('Cursor Async Iterator Tests', function() { let client, collection; before(async function() { client = this.configuration.newClient(); await client.connect(); const docs = Array.from({ length:...
1
17,437
this change looks wrong to me. I think the test is trying to signal that something went wrong by throwing the `Error` here, otherwise the `catch` below will swallow it.
mongodb-node-mongodb-native
js
@@ -164,6 +164,13 @@ namespace NLog.Internal if (reusableBuilder != null) { + if (!_layout.IsThreadAgnostic) + { + string cachedResult; + if (logEvent.TryGetCachedLayoutValue(_layout, out cachedResult)) + ...
1
// // Copyright (c) 2004-2016 Jaroslaw Kowalski <jaak@jkowalski.net>, Kim Christensen, Julian Verdurmen // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // * Redistributions of ...
1
14,722
I'm doubting if this should be `if (_layout.IsThreadAgnostic)`, as ThreadAgnostic stuff could be calculated on every thread. (and thus could be lazy). non-ThreadAgnostic should be calculated on the main thread.
NLog-NLog
.cs
@@ -7,14 +7,19 @@ import javafx.scene.control.ToggleGroup; import javafx.scene.layout.HBox; import org.phoenicis.javafx.views.common.widgets.lists.CombinedListWidget; import org.phoenicis.javafx.views.common.widgets.lists.ListWidgetType; +import org.slf4j.LoggerFactory; import java.util.Arrays; import java.util....
1
package org.phoenicis.javafx.views.mainwindow.ui; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.control.ToggleButton; import javafx.scene.control.ToggleGroup; import javafx.scene.layout.HBox; import org.phoenicis.javafx.views.common.widgets.lists.CombinedListWidget; import org....
1
11,052
Please use only `Logger` instead of `org.slf4j.Logger`
PhoenicisOrg-phoenicis
java
@@ -326,6 +326,10 @@ void nano::block_processor::process_live (nano::transaction const & transaction_ { node.network.flood_block_initial (block_a); } + else if (!node.flags.disable_block_processor_republishing) + { + node.network.flood_block (block_a, nano::buffer_drop_policy::no_limiter_drop); + } if (node...
1
#include <nano/lib/threading.hpp> #include <nano/lib/timer.hpp> #include <nano/node/blockprocessor.hpp> #include <nano/node/election.hpp> #include <nano/node/node.hpp> #include <nano/node/websocket.hpp> #include <nano/secure/store.hpp> #include <boost/format.hpp> std::chrono::milliseconds constexpr nano::block_proces...
1
16,911
Should this be "no limiter drop", since this isn't an absolutely essential activity for the stability of the network?
nanocurrency-nano-node
cpp
@@ -22,8 +22,8 @@ var iam = new AWS.IAM({apiVersion: '2010-05-08'}); iam.deleteAccountAlias({AccountAlias: process.argv[2]}, function(err, data) { if (err) { - console.log("Error", err); + throw err; } else { - console.log("Success", data); + console.log('Account alias ' + process.argv[2] + ' delet...
1
/* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/ This fi...
1
15,069
I updated many of the success messages, because most of these operations don't return data if they succeed. This meant many of the operations would print: `Success null` if the script ran successfully.
awsdocs-aws-doc-sdk-examples
rb
@@ -45,6 +45,8 @@ def _test_pyx(): stdout=devnull, stderr=subprocess.STDOUT) except (subprocess.CalledProcessError, OSError): return False + except FileNotFoundError as fnfe: + return False else: return r == 0
1
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """ External link to programs """ import os import subprocess from scapy.error import log_loading # Notice: this file must n...
1
15,938
Could you simply add it to the previous clause ?
secdev-scapy
py
@@ -108,13 +108,10 @@ Blockly.Procedures.sortProcedureMutations_ = function(mutations) { var procCodeA = a.getAttribute('proccode'); var procCodeB = b.getAttribute('proccode'); - if (procCodeA < procCodeB) { - return -1; - } else if (procCodeA > procCodeB) { - return 1; - } else { - ...
1
/** * @license * Visual Blocks Editor * * Copyright 2012 Google Inc. * https://developers.google.com/blockly/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apach...
1
9,410
@joshyrobot, I think you can just use localeCompare with only the first argument and leave the other arguments out (here and all the other lines changed). It seems to do the right thing, and then we don't have to worry about these extra options.
LLK-scratch-blocks
js
@@ -239,6 +239,10 @@ public class ExecuteFlowAction implements TriggerAction { } exflow.setExecutionOptions(executionOptions); + if (slaOptions != null && slaOptions.size() > 0) { + exflow.setSlaOptions(slaOptions); + } + try { logger.info("Invoking flow " + project.getName() + "." + ...
1
/* * Copyright 2012 LinkedIn Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
1
12,776
@chengren311 : where does this logic move to?
azkaban-azkaban
java
@@ -204,6 +204,14 @@ func (s *NodegroupService) reconcileNodegroupIAMRole() error { } policies := NodegroupRolePolicies() + if len(s.scope.ManagedMachinePool.Spec.RoleAdditionalPolicies) > 0 { + if !s.scope.AllowAdditionalRoles() { + return ErrCannotUseAdditionalRoles + } + + policies = append(policies, s.sc...
1
/* Copyright 2020 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, ...
1
20,700
Can we have a `nil` exception check at `s.scope.ManagedMachinePool`
kubernetes-sigs-cluster-api-provider-aws
go
@@ -40,16 +40,6 @@ class Options extends \VuFind\Search\Base\Options { use \VuFind\Search\Options\ViewOptionsTrait; - /** - * Available sort options for facets - * - * @var array - */ - protected $facetSortOptions = [ - 'count' => 'sort_count', - 'index' => 'sort_alphabetic' ...
1
<?php /** * Solr aspect of the Search Multi-class (Options) * * PHP version 7 * * Copyright (C) Villanova University 2011. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * as published by the Free Software Foundation. ...
1
28,233
Rather than deleting this, should you just reformat it so it's the `*` settings, so if nothing is configured in facets.ini, the existing default behavior continues to work?
vufind-org-vufind
php
@@ -31,11 +31,14 @@ class ManagerConfiguration { '#collapsible' => FALSE, ]; foreach ($this->datastoreManager->getConfigurableProperties() as $property => $default_value) { + $propety_label = str_replace("_", " ", $property); + $propety_label = ucfirst($propety_label); + if ($property ...
1
<?php namespace Dkan\Datastore\Page\Component; use Dkan\Datastore\Manager\ManagerInterface; /** * Class ManagerConfiguration. * * Form component to configure a datastore manager. */ class ManagerConfiguration { private $datastoreManager; /** * Constructor. */ public function __construct(ManagerInte...
1
20,660
wrap, single line
GetDKAN-dkan
php
@@ -202,6 +202,12 @@ public class JavaContextCommon { public abstract String getReturnType(); + public String getGenericAwareReturnType() { + String returnType = getReturnType(); + if (returnType == null || returnType.isEmpty()) return "Void"; + else return returnType; + } + public ab...
1
/* Copyright 2016 Google Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
1
14,902
always use brackets for if statements
googleapis-gapic-generator
java
@@ -34,14 +34,13 @@ namespace Datadog.Trace.ClrProfiler.Integrations.Testing private const string NUnitTestExecutionContextType = "NUnit.Framework.Internal.TestExecutionContext"; private static readonly Vendors.Serilog.ILogger Log = DatadogLogging.GetLogger(typeof(NUnitIntegration)); - privat...
1
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Threading; using Datadog.Trace.Ci; using Datadog.Trace.ClrProfiler.Emit; using Datadog.Trace.ExtensionMethods; using Datadog.Trace.Logging; namespace Datadog.Trace.ClrProfiler.Integrations...
1
18,665
`NUnitIntegration` doesn't need to cache this anymore.
DataDog-dd-trace-dotnet
.cs
@@ -210,8 +210,9 @@ EXTS_ACCESS_COUNTS = textwrap.dedent("""\ eventname, bucket, lower(CASE - WHEN cardinality(parts) > 2 THEN concat(element_at(parts, -2), '.', element_at(parts, -1)) - WHEN cardinality(parts) = 2 THEN element_at(parts, -1) + ...
1
""" Lambda function that runs Athena queries over CloudTrail logs and .quilt/named_packages/ and creates summaries of object and package access events. """ from datetime import datetime, timedelta, timezone import os import textwrap import time import boto3 ATHENA_DATABASE = os.environ['ATHENA_DATABASE'] # Bucket wh...
1
18,547
Why did you change it to `>=` here?
quiltdata-quilt
py