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
@@ -0,0 +1,15 @@ +#include <impl/Kokkos_Tools.hpp> + +int main(int argc, char* argv[]) { + Kokkos::Tools::initialize(argc, argv); + Kokkos::Tools::pushRegion( + "The unanimous Declaration of the thirteen united States of America, " + "When in the Course of human events, it becomes necessary for one people "...
1
1
31,362
Missing the license
kokkos-kokkos
cpp
@@ -210,11 +210,9 @@ func (p *ReplicationTaskProcessorImpl) eventLoop() { )) case <-cleanupTimer.C: - if p.config.EnableCleanupReplicationTask() { - if err := p.cleanupReplicationTasks(); err != nil { - p.logger.Error("Failed to clean up replication messages.", tag.Error(err)) - p.metricsClient.Sc...
1
// The MIT License // // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. // // Copyright (c) 2020 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 Soft...
1
10,928
Looks like this was previously guarded by `EnableCleanupReplicationTask` flag. Now looks like this is always needed. Just want to confirm the intention is if `GlobalNamespace` is enabled then we want run cleanupReplicationTasks in all cases?
temporalio-temporal
go
@@ -37,7 +37,6 @@ #include "tbb/tbb.h" #include <tbb/task_arena.h> #include <tbb/task_scheduler_observer.h> - #include <tbb/task_scheduler_init.h> #include <tbb/parallel_reduce.h> #include <tbb/blocked_range.h> #include <tbb/tick_count.h>
1
/* file: service_thread_pinner.cpp */ /******************************************************************************* * Copyright 2014-2020 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...
1
23,331
Potentially it'll be good to remove all of them excluding "tbb/tbb.h" But let's do it next time
oneapi-src-oneDAL
cpp
@@ -1210,3 +1210,19 @@ def is_nan(x): return np.isnan(x) except: return False + + +def bound_range(vals, density): + """ + Computes a bounding range from a number of evenly spaced samples. + Will raise an error if samples are not evenly spaced within + tolerance. + """ + low, hi...
1
import os, sys, warnings, operator import numbers import itertools import string, fnmatch import unicodedata import datetime as dt from collections import defaultdict, Counter import numpy as np import param import json try: from cyordereddict import OrderedDict except: from collections import OrderedDict d...
1
16,013
I would just mention which tolerance - namely as reported by ``sys.float_info``
holoviz-holoviews
py
@@ -18,8 +18,9 @@ class ProposalsController < ApplicationController def index @CLOSED_PROPOSAL_LIMIT = 10 + @pending_data = self.listing.pending - @approved_data = self.listing.approved(@CLOSED_PROPOSAL_LIMIT) + @approved_data = self.listing.approved.alter_query{ |rel| rel.limit(@CLOSED_PROPOSAL_LI...
1
class ProposalsController < ApplicationController include TokenAuth before_filter :authenticate_user!, except: :approve # TODO use Policy for all actions before_filter ->{authorize self.proposal}, only: [:show, :cancel, :cancel_form] before_filter :needs_token_on_get, only: :approve before_filter :validate...
1
13,785
:+1: Ideally this'll become something you could pass in to the config
18F-C2
rb
@@ -775,7 +775,7 @@ void RaftPart::replicateLogs(folly::EventBase* eb, return resp.get_error_code() == cpp2::ErrorCode::SUCCEEDED && !hosts[index]->isLearner(); }) - .then(executor_.get(), [self = shared_from_this(), + .via(executor_.get()).then([self = shared_fr...
1
/* Copyright (c) 2018 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 "base/Base.h" #include "kvstore/raftex/RaftPart.h" #include <folly/io/async/EventBaseManager.h> #include <folly...
1
23,690
Should using `thenValue` to replace `then` ?
vesoft-inc-nebula
cpp
@@ -130,6 +130,12 @@ namespace Datadog.Trace.ClrProfiler.Integrations private void OnError(object sender, EventArgs eventArgs) { + if (!Tracer.Instance.Settings.IsIntegrationEnabled(IntegrationName)) + { + // integration disabled + return; + ...
1
#if !NETSTANDARD2_0 using System; using System.Web; using Datadog.Trace.ClrProfiler.Interfaces; using Datadog.Trace.ClrProfiler.Models; using Datadog.Trace.ExtensionMethods; using Datadog.Trace.Logging; namespace Datadog.Trace.ClrProfiler.Integrations { /// <summary> /// IHttpModule used to trace within an...
1
16,095
This follows the convention of each callback starting with the `IsIntegrationEnabled` check.
DataDog-dd-trace-dotnet
.cs
@@ -26,11 +26,15 @@ namespace OpenTelemetry.Metrics private long sumLong = 0; private SumMetricLong sumMetricLong; private DateTimeOffset startTimeExclusive; + private bool isDeltaValue; + private bool isMonotonicValue; - internal SumMetricAggregatorLong(string name, st...
1
// <copyright file="SumMetricAggregatorLong.cs" company="OpenTelemetry Authors"> // Copyright The OpenTelemetry 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://ww...
1
20,968
this is not required to be part of this PR right? (With UpDownCounter being absent in .NET, we can make this hardcoded for now, i think)
open-telemetry-opentelemetry-dotnet
.cs
@@ -0,0 +1,12 @@ +// 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.IO.Pipelines; + +namespace Microsoft.AspNetCore.Server.Kestrel.Transport +{ + public interface IConnectionHandler ...
1
1
12,300
Add the PipeFactory here
aspnet-KestrelHttpServer
.cs
@@ -23,15 +23,12 @@ import ( "github.com/pkg/errors" "github.com/chaos-mesh/chaos-mesh/api/v1alpha1" - "github.com/chaos-mesh/chaos-mesh/controllers/common" ) type Delegate struct { impl interface{} } -var _ common.ChaosImpl = (*Delegate)(nil) - func (i *Delegate) callAccordingToAction(action, methodNam...
1
// Copyright 2021 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 agreed to...
1
25,175
please add `var _ impltypes.ChaosImpl = (*Delegate)(nil)`
chaos-mesh-chaos-mesh
go
@@ -97,4 +97,15 @@ public interface ExpireSnapshots extends PendingUpdate<List<Snapshot>> { * @return this for method chaining */ ExpireSnapshots executeWith(ExecutorService executorService); + + /** + * Allows expiration of snapshots without any cleanup of underlying manifest or data files. + * <p> + ...
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
22,165
nit: is this added deliberately?
apache-iceberg
java
@@ -8,6 +8,8 @@ class SiteControllerTest < ActionController::TestCase def setup Object.const_set("ID_KEY", client_applications(:oauth_web_app).key) Object.const_set("POTLATCH2_KEY", client_applications(:oauth_web_app).key) + + stub_request(:get, "http://api.hostip.info/country.php?ip=0.0.0.0") end ...
1
require "test_helper" class SiteControllerTest < ActionController::TestCase api_fixtures ## # setup oauth keys def setup Object.const_set("ID_KEY", client_applications(:oauth_web_app).key) Object.const_set("POTLATCH2_KEY", client_applications(:oauth_web_app).key) end ## # clear oauth keys def...
1
10,254
Given the number of tests which need this (I think I counted seven) should we maybe just install this one globally? Is there even a place to do that? Something in `test_helper` maybe?
openstreetmap-openstreetmap-website
rb
@@ -495,6 +495,16 @@ function applyWriteConcern(target, sources, options) { return target; } +/** + * Checks if a given value is a Promise + * + * @param {*} maybePromise + * @return true if the provided value is a Promise + */ +function isPromiseLike(maybePromise) { + return maybePromise && typeof maybePromise....
1
'use strict'; const MongoError = require('mongodb-core').MongoError; const ReadPreference = require('mongodb-core').ReadPreference; var shallowClone = function(obj) { var copy = {}; for (var name in obj) copy[name] = obj[name]; return copy; }; // Figure out the read preference var translateReadPreference = fun...
1
14,248
we don't use this anymore, so we can delete it.
mongodb-node-mongodb-native
js
@@ -283,6 +283,8 @@ func initTelemetry(genesis bookkeeping.Genesis, log logging.Logger, dataDirector fmt.Fprintln(os.Stdout, "error loading telemetry config", err) return } + fmt.Fprintln(os.Stdout, "algoh telemetry configured from file:", telemetryConfig.FilePath) + // Apply telemetry override. tel...
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
39,012
nit: change to "Telemetry configuration loaded from '%s'"
algorand-go-algorand
go
@@ -182,7 +182,8 @@ func TestSerialiseBlockWitness(t *testing.T) { if err := bwb.WriteTo(&b); err != nil { t.Errorf("Could not make block witness: %v", err) } - expected := common.FromHex("0xa76862616c616e6365730065636f64657300666861736865731822646b65797300666e6f6e63657300697374727563747572650b6676616c7565730058...
1
package trie import ( "bytes" "testing" "github.com/ledgerwatch/turbo-geth/common" ) func TestSupplyKeyValue(t *testing.T) { bwb := NewBlockWitnessBuilder(false) if err := bwb.supplyKey([]byte("key")); err != nil { t.Errorf("Could not supply key: %v", err) } if !bytes.Equal(common.FromHex("0x436b6579"), bwb...
1
21,237
Why did this value change?
ledgerwatch-erigon
go
@@ -23,6 +23,7 @@ import ( duckv1 "knative.dev/pkg/apis/duck/v1" "knative.dev/pkg/kmeta" + gcpduckv1alpha1 "github.com/google/knative-gcp/pkg/apis/duck/v1alpha1" "github.com/google/knative-gcp/pkg/apis/pubsub/v1alpha1" )
1
/* Copyright 2019 Google LLC 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, software dist...
1
11,677
maybe `duckpubsubv1alpha1` ?
google-knative-gcp
go
@@ -327,6 +327,16 @@ class FirefoxProfile(object): rc.append(node.data) return ''.join(rc).strip() + def parse_manifest_json(content): + """Extracts the details from the contents of a WebExtensions `manifest.json` file.""" + manifest = json.loads(content)...
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,026
The id is not mandatory for web extensions. Could you update this to support a web extension without an id?
SeleniumHQ-selenium
js
@@ -31,11 +31,6 @@ import ( _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" ) -const ( - serviceName = "pubsub.googleapis.com" - methodName = "google.pubsub.v1.Publisher.CreateTopic" -) - func CloudAuditLogsSourceWithTestImpl(t *testing.T, authConfig lib.AuthConfig) { project := os.Getenv(lib.ProwProjectKey)
1
/* Copyright 2019 Google LLC 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, software dist...
1
13,533
I actually prefer them to be defined here. Client who calls `lib` should define the args, not `lib` itself.
google-knative-gcp
go
@@ -97,9 +97,11 @@ func (t *tty) recvtty(process *libcontainer.Process, socket *os.File) error { // set raw mode to stdin and also handle interrupt stdin, err := console.ConsoleFromFile(os.Stdin) if err != nil { + epollConsole.Close() return err } if err := stdin.SetRaw(); err != nil { + epollConsole.Clo...
1
// +build linux package main import ( "fmt" "io" "os" "os/signal" "sync" "github.com/containerd/console" "github.com/opencontainers/runc/libcontainer" "github.com/opencontainers/runc/libcontainer/utils" ) type tty struct { epoller *console.Epoller console *console.EpollConsole stdin console.Conso...
1
16,829
I think this should've been done with the `defer`-named-return trick. I'll submit a PR for it.
opencontainers-runc
go
@@ -1048,6 +1048,12 @@ stats (config.stat_config), vote_uniquer (block_uniquer), startup_time (std::chrono::steady_clock::now ()) { + if (config.websocket_config.enabled) + { + websocket_server = std::make_shared<nano::websocket::listener> (*this, nano::tcp_endpoint (boost::asio::ip::address_v6::any (), config.webs...
1
#include <nano/node/node.hpp> #include <nano/lib/interface.h> #include <nano/lib/timer.hpp> #include <nano/lib/utility.hpp> #include <nano/node/common.hpp> #include <nano/node/rpc.hpp> #include <algorithm> #include <cstdlib> #include <future> #include <sstream> #include <boost/polymorphic_cast.hpp> #include <boost/p...
1
15,134
The bind address should be configurable.
nanocurrency-nano-node
cpp
@@ -68,6 +68,11 @@ class LocalRepository implements Repository { return fetchCategories(categoryDirectories); } + @Override + public void delete() { + // nothing to do + } + private List<CategoryDTO> fetchCategories(File[] categoryDirectories) { final List<CategoryDTO> resu...
1
/* * Copyright (C) 2015-2017 PÂRIS Quentin * * 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 2 of the License, or * (at your option) any later version. * * This program is...
1
9,328
Maybe the empty `delete()` should be implemented as default in the interface.
PhoenicisOrg-phoenicis
java
@@ -24,7 +24,7 @@ class HDF5OutputLayerTest : public ::testing::Test { protected: HDF5OutputLayerTest() : output_file_name_(tmpnam(NULL)), - input_file_name_("src/caffe/test/test_data/sample_data.h5"), + input_file_name_(CMAKE_SOURCE_DIR "caffe/test/test_data/sample_data.h5"), blob_d...
1
// Copyright 2014 BVLC and contributors. #include <cuda_runtime.h> #include <string> #include <vector> #include "gtest/gtest.h" #include "caffe/blob.hpp" #include "caffe/common.hpp" #include "caffe/util/io.hpp" #include "caffe/vision_layers.hpp" #include "caffe/proto/caffe.pb.h" #include "caffe/test/test_caffe_main.h...
1
28,407
How to ensure CMAKE_SOURCE_DIR is set correctly?
BVLC-caffe
cpp
@@ -106,7 +106,7 @@ func (ws *workingSet) LoadOrCreateAccountState(addr string, init *big.Int) (*Acc switch { case errors.Cause(err) == ErrStateNotExist: account := Account{ - Balance: init, + Balance: big.NewInt(0).SetBytes(init.Bytes()), VotingWeight: big.NewInt(0), } ws.cachedStates[ad...
1
// Copyright (c) 2018 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
13,304
safer to make a copy of incoming *big.Int
iotexproject-iotex-core
go
@@ -19,6 +19,8 @@ import "time" const ( // ListContainersTimeout is the timeout for the ListContainers API. ListContainersTimeout = 10 * time.Minute + // ListImagesTimeout is the timeout for the ListImages API + ListImagesTimeout = 10 * time.Minute // LoadImageTimeout is the timeout for the LoadImage API. It's s...
1
// Copyright 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" fil...
1
21,614
how did we choose this value? does this hold good for Windows too?
aws-amazon-ecs-agent
go
@@ -0,0 +1,17 @@ +// +build nocriu + +package libcontainer + +import ( + "errors" +) + +var errNotEnabled = errors.New("Checkpoint/restore not supported") + +func (c *linuxContainer) Checkpoint(opts *CheckpointOpts) error { + return errNotEnabled +} + +func (c *linuxContainer) Restore(process *Process, opts *Checkpoint...
1
1
10,492
To follow the other build tags, maybe we can call it `criu`?
opencontainers-runc
go
@@ -20,9 +20,10 @@ module Bolt log_destination: STDERR }.freeze - TRANSPORT_OPTIONS = %i[insecure password run_as sudo sudo_password key tty user].freeze + TRANSPORT_OPTIONS = %i[insecure password run_as sudo sudo_password key tty user connect_timeout].freeze TRANSPORT_DEFAULTS = { + con...
1
require 'logger' require 'yaml' module Bolt Config = Struct.new( :concurrency, :format, :log_destination, :log_level, :modulepath, :transport, :transports ) do DEFAULTS = { concurrency: 100, transport: 'ssh', format: 'human', log_level: Logger::WARN, l...
1
6,938
Should we load this from the config file too?
puppetlabs-bolt
rb
@@ -128,6 +128,12 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { } nextRecover := now.Add(*duration) + // TODO(at15): this should be validated in webhook instead of throwing error at runtime. + // User can give a cron with interval shorter than duration. + // Example: + // durat...
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
14,268
Can you file an issue for this?
chaos-mesh-chaos-mesh
go
@@ -122,7 +122,7 @@ class Connection extends EventEmitter { if (issue.isTimeout) { op.cb( new MongoNetworkTimeoutError(`connection ${this.id} to ${this.address} timed out`, { - beforeHandshake: !!this[kIsMaster] + beforeHandshake: this[kIsMaster] == null }) ...
1
'use strict'; const EventEmitter = require('events'); const MessageStream = require('./message_stream'); const MongoError = require('../core/error').MongoError; const MongoNetworkError = require('../core/error').MongoNetworkError; const MongoNetworkTimeoutError = require('../core/error').MongoNetworkTimeoutError; cons...
1
19,840
@nbbeeken what were the cases where `!!this[kIsMaster]` was yielding an incorrect value? we should try to cover them in the tests
mongodb-node-mongodb-native
js
@@ -51,6 +51,19 @@ module Bolt end end + def setup_inventory(inventory) + config = Bolt::Config.default + config.overwrite_transport_data(inventory['config']['transport'], + Bolt::Util.symbolize_top_level_keys(inventory['config']['transports'])) + + b...
1
# frozen_string_literal: true require 'bolt/pal' require 'bolt/puppetdb' Bolt::PAL.load_puppet require 'bolt/catalog/compiler' require 'bolt/catalog/logging' module Bolt class Catalog def with_puppet_settings(hiera_config) Dir.mktmpdir('bolt') do |dir| cli = [] Puppet::Settings::REQUIRED...
1
9,078
This whole function feels messy. I don't have a better idea at the moment though.
puppetlabs-bolt
rb
@@ -35,12 +35,9 @@ public class SetNetworkConnection extends WebDriverHandler<Number> implements Js @SuppressWarnings("unchecked") @Override public void setJsonParameters(Map<String, Object> allParameters) throws Exception { - Map<String, Map<String, Object>> parameters = (Map<String, Map<String, Object>>)al...
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
13,952
should use Number instead of Long
SeleniumHQ-selenium
py
@@ -0,0 +1,18 @@ +package mock + +import ( + "context" + + "github.com/influxdata/flux/dependencies/influxdb" +) + +type MockProvider struct { + influxdb.UnimplementedProvider + WriterForFn func(ctx context.Context, conf influxdb.Config) (influxdb.Writer, error) +} + +var _ influxdb.Provider = &MockProvider{} + +func (...
1
1
16,106
Can you rename this and the file `InfluxDBProvider` and `influxdb_provider.go` respectively?
influxdata-flux
go
@@ -187,10 +187,10 @@ function innerDiffNode(dom, vchildren, context, mountAll, absorb) { min = 0, len = originalChildren.length, childrenLen = 0, - vlen = vchildren && vchildren.length, + vlen = vchildren ? vchildren.length : 0, j, c, vchild, child; - if (len) { + if (len!==0) { for (let i=0; i<len;...
1
import { ATTR_KEY } from '../constants'; import { isString, isFunction } from '../util'; import { isSameNodeType, isNamedNode } from './index'; import { isFunctionalComponent, buildFunctionalComponent } from './functional-component'; import { buildComponentFromVNode } from './component'; import { setAccessor, removeNod...
1
10,667
This is the real culprit, as now vlen will always be a Number (and known to the compiler as such). You could probably go one step further and avoid the ToBoolean on `vchildren` as well by writing something like `vlen = (vchildren !== undefined) ? vchildren.length : 0` if that matches the contract.
preactjs-preact
js
@@ -41,6 +41,7 @@ public class NutritionProductFragment extends BaseFragment implements CustomTabA @BindView(R.id.listNutrientLevels) ListView lv; @BindView(R.id.textServingSize) TextView serving; @BindView(R.id.textCarbonFootprint) TextView carbonFootprint; + @BindView(R.id.txtNoDataString)TextView n...
1
package openfoodfacts.github.scrachx.openfood.fragments; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.customtabs.CustomTabsIntent; import android.support.v4.content.ContextCompat; impo...
1
62,661
missing space before `TextView`
openfoodfacts-openfoodfacts-androidapp
java
@@ -616,6 +616,16 @@ Attr_ReadValue Item::readAttr(AttrTypes_t attr, PropStream& propStream) break; } + case ATTR_OPENCONTAINER: { + int32_t openContainer; + if (!propStream.read<int32_t>(openContainer)) { + return ATTR_READ_ERROR; + } + + setIntAttr(ITEM_ATTRIBUTE_OPENCONTAINER, openContainer); + ...
1
/** * The Forgotten Server - a free and open-source MMORPG server emulator * Copyright (C) 2019 Mark Samman <mark.samman@gmail.com> * * 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; eithe...
1
19,599
so this attribute is used as u8 in code, but saves as int32? Why?
otland-forgottenserver
cpp
@@ -41,7 +41,7 @@ from nupic.encoders.random_distributed_scalar import RandomDistributedScalarEnco # Map class to Cap'n Proto schema union attribute _CLASS_ATTR_MAP = { ScalarEncoder: "scalarEncoder", - AdaptiveScalarEncoder: "adaptivescalar", + AdaptiveScalarEncoder: "adaptiveScalarEncoder", DateEncoder: "da...
1
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
1
20,204
can RDSE be added to the list? It has its capnp files.
numenta-nupic
py
@@ -35,11 +35,11 @@ import ( // certificateToInjectableFunc converts a given certificate to the reconcile requests for the corresponding injectables // (webhooks, api services, etc) that reference it. -type certificateToInjectableFunc func(log logr.Logger, cl client.Client, certName types.NamespacedName) []ctrl.Req...
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
23,405
These functions only ever read from the API and should always be reading from a cache, so I have made that explicit by expecting a Reader here and supplying a `cache.Cache` as the client.
jetstack-cert-manager
go
@@ -1495,6 +1495,7 @@ mangle_direct_call(dcontext_t *dcontext, instrlist_t *ilist, instr_t *instr, if (target == (app_pc)retaddr) { LOG(THREAD, LOG_INTERP, 3, "found call to next instruction " PFX "\n", target); } else { + /* XXX i#3307: necessary to instr_set_translation_mangling_epilogue? */...
1
/* ****************************************************************************** * Copyright (c) 2010-2018 Google, Inc. All rights reserved. * Copyright (c) 2010 Massachusetts Institute of Technology All rights reserved. * Copyright (c) 2000-2010 VMware, Inc. All rights reserved. * *****************************...
1
15,098
No, we can't skip any of the mangling after the suspend point: this should follow the other mangling and undo its push.
DynamoRIO-dynamorio
c
@@ -4,6 +4,7 @@ import flatbuffers from flatbuffers.compat import import_numpy +from tests.namespace_test.NamespaceC.TableInC import TableInC, TableInCT np = import_numpy() class SecondTableInA(object):
1
# automatically generated by the FlatBuffers compiler, do not modify # namespace: NamespaceA import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class SecondTableInA(object): __slots__ = ['_tab'] @classmethod def GetRootAsSecondTableInA(cls, buf, offset): n = flatb...
1
18,700
this is generated code.. these changes will need to be made in the code generator to have them stick.
google-flatbuffers
java
@@ -1,8 +1,9 @@ +/* global xit */ describe('hidden content', function () { 'use strict'; - var fixture = document.getElementById('fixture'); - + var fixture = document.getElementById('fixture'); + var shadowSupport = document.body && typeof document.body.attachShadow === 'function'; var checkContext = { _dat...
1
describe('hidden content', function () { 'use strict'; var fixture = document.getElementById('fixture'); var checkContext = { _data: null, data: function (d) { this._data = d; } }; afterEach(function () { fixture.innerHTML = ''; checkContext._data = null; }); it('should return undefined with di...
1
11,245
Should we abstract this into a reusable utility so it doesn't have to get repeated in every test file needing Shadow DOM support?
dequelabs-axe-core
js
@@ -9,6 +9,7 @@ const ignoreNsNotFound = shared.ignoreNsNotFound; const loadSpecTests = require('../spec').loadSpecTests; const chai = require('chai'); const expect = chai.expect; +const runUnifiedTest = require('./unified-spec-runner/runner').runUnifiedTest; describe('APM', function() { before(function() {
1
'use strict'; const instrument = require('../..').instrument; const shared = require('./shared'); const setupDatabase = shared.setupDatabase; const filterForCommands = shared.filterForCommands; const filterOutCommands = shared.filterOutCommands; const ignoreNsNotFound = shared.ignoreNsNotFound; const loadSpecTests = r...
1
20,020
Maybe we rename this to `command_monitoring.test.js` to match the directory name change? Or would you rather do that as part of the greater test cleanup? I'm fine either way.
mongodb-node-mongodb-native
js
@@ -577,7 +577,7 @@ SchemaString.prototype.$conditionalHandlers = $gte: handleSingle, $lt: handleSingle, $lte: handleSingle, - $options: handleSingle, + $options: String, $regex: handleSingle, $not: handleSingle });
1
'use strict'; /*! * Module dependencies. */ const SchemaType = require('../schematype'); const CastError = SchemaType.CastError; const MongooseError = require('../error'); const castString = require('../cast/string'); const utils = require('../utils'); let Document; /** * String SchemaType constructor. * * @pa...
1
14,011
Why is this change necessary? `handleSingle()` will cast it to a string, no?
Automattic-mongoose
js
@@ -228,4 +228,13 @@ public interface Table { * @return a {@link LocationProvider} to provide locations for new data files */ LocationProvider locationProvider(); + + /** + * Return the name of this table. + * + * @return this table's name + */ + default String name() { + return "table(" + hashC...
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
16,752
This newly added method should be well defined, should it return `TableIdentifier` or just `String`?
apache-iceberg
java
@@ -18,7 +18,8 @@ use Ergonode\Core\Infrastructure\Model\RelationshipGroup; class ProductMultimediaRelationshipStrategy implements RelationshipStrategyInterface { - private const MESSAGE = 'Object has active relationships with multimedia %relations%'; + private const ONE_MESSAGE = 'Multimedia has a relation w...
1
<?php /** * Copyright © Ergonode Sp. z o.o. All rights reserved. * See LICENSE.txt for license details. */ declare(strict_types=1); namespace Ergonode\Product\Infrastructure\Strategy\Relationship; use Ergonode\Core\Infrastructure\Strategy\RelationshipStrategyInterface; use Ergonode\Product\Domain\Query\ProductQue...
1
9,596
have a relation with a product
ergonode-backend
php
@@ -129,8 +129,11 @@ var _ = Describe("health tests", func() { AfterEach(func() { for _, name := range podsToCleanUp { - err := k8sInfra.K8sClient.CoreV1().Pods("default").Delete(name, &metav1.DeleteOptions{}) - Expect(err).NotTo(HaveOccurred()) + // It is possible for a local pod to be deleted by GC ...
1
// +build fvtests // Copyright (c) 2017-2018 Tigera, 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 // // Un...
1
16,586
I guess that there is still a window here, because the GC could happen between the `PodExist` and `Delete` calls. Would it be better instead to check `err` and allow it if it says "pod has already been deleted"?
projectcalico-felix
c
@@ -65,13 +65,8 @@ class DbTaskHistory(task_history.TaskHistory): yield session else: session = self.session_factory() - try: + with session.transaction: yield session - except: - session.rollback() - rais...
1
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
1
12,624
SQLAlchemy's session management does magic to make sure that if the rollback fails you still get the original exception that caused the rollback. Also it looks nicer.
spotify-luigi
py
@@ -88,11 +88,11 @@ func (q *actQueue) Overlaps(act *iproto.ActionPb) bool { switch { case act.GetTransfer() != nil: tsf := &action.Transfer{} - tsf.ConvertFromTransferPb(act.GetTransfer()) + tsf.ConvertFromActionPb(act) nonce = tsf.Nonce case act.GetVote() != nil: vote := &action.Vote{} - vote.Conver...
1
// Copyright (c) 2018 IoTeX // This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no // warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent // permitted by law, all liability for your use of the cod...
1
11,748
This switch statement can be removed. Just return q.items[act.Nonce] != nil
iotexproject-iotex-core
go
@@ -119,7 +119,7 @@ public class AvoidInstantiatingObjectsInLoopsRule extends AbstractJavaRule { */ n = n.getParent(); } else if (n.getParent() instanceof ASTForStatement && n.getParent().getNumChildren() > 1 - && n == n.getParent().getChild(1)) { + ...
1
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ package net.sourceforge.pmd.lang.java.rule.performance; import java.util.Collection; import net.sourceforge.pmd.lang.ast.Node; import net.sourceforge.pmd.lang.java.ast.ASTAllocationExpression; import net.sourceforge.pmd.lang.java...
1
18,232
I think `==` for nodes is more readable than equals. An equals calls looks like it could be recursing, because intuitively two nodes are equal if their subtree are the equal. But everywhere you replaced, we don't want to test whether the subtrees are structurally equal, we want to know whether they're the same. Only `=...
pmd-pmd
java
@@ -29,6 +29,9 @@ namespace ResultsComparer [Option("csv", HelpText = "Path to exported CSV results. Optional.")] public FileInfo CsvPath { get; set; } + [Option('f', "filter", HelpText = "Filter the benchmarks by name using glob pattern(s). Optional.")] + public IEnumerable<string> Fi...
1
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.IO; using CommandLine; using CommandLine.Text; namespace ResultsCom...
1
9,688
What's the scenario for passing multiple filters?
dotnet-performance
.cs
@@ -201,9 +201,10 @@ bool Part::commitLogs(std::unique_ptr<LogIterator> iter) { LogID lastId = -1; TermID lastTerm = -1; while (iter->valid()) { - lastId = iter->logId(); - lastTerm = iter->logTerm(); - auto log = iter->logMsg(); + auto logEntry = iter->logEntry(); + la...
1
/* Copyright (c) 2018 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 "kvstore/Part.h" #include "kvstore/LogEncoder.h" #include "base/NebulaKeyUtils.h" DEFINE_int32(cluster_id, 0, ...
1
22,373
move to after check log.empty()
vesoft-inc-nebula
cpp
@@ -19,6 +19,7 @@ # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. """ Comments and reviews for records: web interface """ +from docutils.nodes import note __lastupdated__ = """$Date$"""
1
# -*- coding: utf-8 -*- # Comments and reviews for records. # This file is part of Invenio. # Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the F...
1
15,156
This line needs to be removed
inveniosoftware-invenio
py
@@ -68,7 +68,7 @@ type CloudBuildSourceSpec struct { const ( // CloudBuildSource CloudEvent type - CloudBuildSourceEvent = "com.google.cloud.build.event" + CloudBuildSourceEvent = "google.cloud.cloudbuild.build.v1.statusChanged" // CloudBuildSourceBuildId is the Pub/Sub message attribute key with the CloudBuildS...
1
/* Copyright 2020 Google LLC 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, software distrib...
1
17,453
Can we delete such const like `CloudBuildSourceEvent` and `CloudBuildSourceBuildId` since all those are contained under schemas/v1?
google-knative-gcp
go
@@ -0,0 +1,8 @@ +// Package vsphere contains vSphere-specific structures for installer +// configuration and management. +// +k8s:deepcopy-gen=package,register +// +k8s:conversion-gen=github.com/openshift/hive/pkg/apis/hive +package vsphere + +// Name is name for the vsphere platform. +const Name string = "vsphere"
1
1
12,188
This is unused.
openshift-hive
go
@@ -32,9 +32,13 @@ namespace OpenTelemetry.Instrumentation.Http public bool SetHttpFlavor { get; set; } /// <summary> - /// Gets or sets <see cref="ITextFormat"/> for context propagation. Default value: <see cref="TraceContextFormat"/>. + /// Gets or sets <see cref="ITextFormat"/> for ...
1
// <copyright file="HttpWebRequestInstrumentationOptions.netfx.cs" company="OpenTelemetry Authors"> // Copyright The OpenTelemetry 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...
1
16,073
Any reason not to put `using System.Collections.Generic` (guess there shouldn't be naming conflicts)?
open-telemetry-opentelemetry-dotnet
.cs
@@ -0,0 +1,8 @@ +class TwitterPlayerCardsController < ApplicationController + layout false + + def show + response.headers.delete("X-Frame-Options") + @video = Video.find(params[:video_id]) + end +end
1
1
12,842
Could the name of this controller just be shortened to `TwitterCardsController`? Is the `Player` there adding information?
thoughtbot-upcase
rb
@@ -138,6 +138,9 @@ func (u *staticUpstream) NewHost(host string) (*UpstreamHost, error) { if uh.Unhealthy { return true } + if uh.Dynamic { + return false + } if uh.Fails >= u.MaxFails && u.MaxFails != 0 { return true
1
package proxy import ( "fmt" "io" "io/ioutil" "net/http" "net/url" "path" "strconv" "strings" "time" "github.com/mholt/caddy/caddyfile" "github.com/mholt/caddy/caddyhttp/httpserver" ) var ( supportedPolicies = make(map[string]func() Policy) ) type staticUpstream struct { from string upst...
1
8,757
Backends with hostnames that depend on the request are always up?
caddyserver-caddy
go
@@ -4,6 +4,8 @@ import functools import colander import venusian import six +from jsonpatch import JsonPatchException +from jsonpointer import JsonPointerException from pyramid import exceptions as pyramid_exceptions from pyramid.decorator import reify from pyramid.security import Everyone
1
import re import functools import colander import venusian import six from pyramid import exceptions as pyramid_exceptions from pyramid.decorator import reify from pyramid.security import Everyone from pyramid.httpexceptions import (HTTPNotModified, HTTPPreconditionFailed, HTTPNotFo...
1
10,054
I'd rather catch those to `utils.py` and raise a simple ValueError from them. From the resource point of view, these are details of implementation
Kinto-kinto
py
@@ -11,10 +11,6 @@ module Travis module Build class Script class Julia < Script - DEFAULTS = { - julia: 'release', - } - def export super
1
# vim:set ts=2 sw=2 sts=2 autoindent: # Community maintainers: # # Tony Kelman <tony kelman net, @tkelman> # Pontus Stenetorp <pontus stenetorp se, @ninjin> # Elliot Saba <staticfloat gmail com, @staticfloat> # Simon Byrne <simonbyrne gmail.com, @simonbyrne> # module Travis module Build ...
1
16,284
make this 1.0 ? I don't think all that many people do `language: julia` without any `julia:` specifiers, but may as well keep that possible?
travis-ci-travis-build
rb
@@ -20,7 +20,10 @@ // // For secrets.OpenKeeper, azurekeyvault registers for the scheme "azurekeyvault". // The default URL opener will use Dial, which gets default credentials from the -// environment. +// environment, unless the AZURE_KEYVAULT_AUTH_VIA_CLI environment variable is +// set to true, in which case it ...
1
// Copyright 2019 The Go Cloud Development Kit 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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by appli...
1
18,909
nit: `AZURE_KEYVAULT_AUTH_VIA_CLI` is defined by us, so it might be helpful to differentiate it from azure's env names. Maybe starts with `GOCDK`.
google-go-cloud
go
@@ -34,10 +34,10 @@ type Validator struct { } // NewValidator return Validator instance -func NewValidator(sessionManager session.Manager, extractor identity.Extractor) *Validator { +func NewValidator(sessionStorage *session.Storage, extractor identity.Extractor) *Validator { return &Validator{ clientMap: &cli...
1
/* * Copyright (C) 2018 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
11,901
Depend on interfaces not on structures
mysteriumnetwork-node
go
@@ -180,7 +180,7 @@ void signalHandler(int sig) { case SIGTERM: FLOG_INFO("Signal %d(%s) received, stopping this server", sig, ::strsignal(sig)); if (gStorageServer) { - gStorageServer->stop(); + gStorageServer->notifyStop(); } break; default:
1
/* Copyright (c) 2018 vesoft inc. All rights reserved. * * This source code is licensed under Apache 2.0 License. */ #include <folly/ssl/Init.h> #include <thrift/lib/cpp2/server/ThriftServer.h> #include "common/base/Base.h" #include "common/base/SignalHandler.h" #include "common/network/NetworkUtils.h" #include "c...
1
32,644
This fix looks good. My concern, don't forget to fix metad too!
vesoft-inc-nebula
cpp
@@ -196,13 +196,15 @@ func makeMDJournalWithIDJournal( } if earliest != nil { - if earliest.BID() != latest.BID() { + if earliest.BID() != latest.BID() && + !(earliest.BID() == NullBranchID && + latest.BID() == LocalSquashBranchID) { return nil, fmt.Errorf( "earliest.BID=%s != latest.BID=%s", ...
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 ( "encoding/json" "errors" "fmt" "io/ioutil" "os" "path/filepath" "time" "github.com/keybase/client/go/logger" "github.com/keybase/kbfs...
1
14,369
Just noticed this nil context. Perhaps plumb through ctx too, or change to `Debug`?
keybase-kbfs
go
@@ -22,7 +22,7 @@ module Selenium class Common MAX_REDIRECTS = 20 # same as chromium/gecko CONTENT_TYPE = 'application/json'.freeze - DEFAULT_HEADERS = {'Accept' => CONTENT_TYPE}.freeze + DEFAULT_HEADERS = {'Accept' => CONTENT_TYPE, 'Content-Type' => 'application/x-...
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,359
Does it send requests with urlencoded bodies anywhere? I thought it sends only json. Maybe content-type should be `application/json` by default?
SeleniumHQ-selenium
java
@@ -50,6 +50,11 @@ namespace eprosima { namespace fastrtps { namespace rtps { +// port use if the ros environment variable doesn't specified one +const uint16_t DEFAULT_ROS2_SERVER_PORT = 11811; +// default server guidPrefix +const char* DEFAULT_ROS2_SERVER_GUIDPREFIX = "44.49.53.43.53.45.52.56.45.52.5F.30"; + GUI...
1
// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). // // 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 re...
1
18,860
Again use of `constexpr` is recomended.
eProsima-Fast-DDS
cpp
@@ -8,6 +8,12 @@ from ..core.operation import Operation from .chart import Points from .path import Path +try: + from datashader.layout import LayoutAlgorithm as ds_layout +except: + ds_layout = None + + class graph_redim(redim): """ Extension for the redim utility that allows re-dimensioning
1
import param import numpy as np from ..core import Dimension, Dataset, Element2D from ..core.dimension import redim from ..core.util import max_range from ..core.operation import Operation from .chart import Points from .path import Path class graph_redim(redim): """ Extension for the redim utility that allow...
1
18,746
Minor point but I would call this ``redim_graph`` instead.
holoviz-holoviews
py
@@ -26,12 +26,14 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/klog" + "k8s.io/utils/pointer" infrav1 "sigs.k8s.io/cluster-api-provider-aws/pkg/apis/infrastructure/v1alpha2" "sigs.k8s.io/cluster-api-provider-aws/...
1
/* Copyright 2019 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
10,104
As I was trying to figure out how the error messages are written out, since they are returned from `getOrCreate` and `reconcile`, it looks like we are using plain `klog` to write them out instead of using the logger from the scope above
kubernetes-sigs-cluster-api-provider-aws
go
@@ -40,15 +40,11 @@ func (service *servicePFCtl) Add(rule RuleForwarding) { func (service *servicePFCtl) Start() error { err := service.ipForward.Enable() if err != nil { - return err + log.Warn(natLogPrefix, "Failed to enable IP forwarding: ", err) } service.clearStaleRules() - err = service.enableRules()...
1
/* * Copyright (C) 2018 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
12,010
Now it's double logging, is not it? Because `service.ipForward.Enable()` logs extra `warning`
mysteriumnetwork-node
go
@@ -256,6 +256,9 @@ OpenStreetMap::Application.routes.draw do # directions get "/directions" => "directions#search" + # set home location + match "/set_home_loc" => "user#set_home_location", :via => [:get, :post] + # export post "/export/finish" => "export#finish" get "/export/embed" => "export#embed...
1
OpenStreetMap::Application.routes.draw do # API get "api/capabilities" => "api#capabilities" scope "api/0.6" do get "capabilities" => "api#capabilities" get "permissions" => "api#permissions" put "changeset/create" => "changeset#create" post "changeset/:id/upload" => "changeset#upload", :id => /...
1
11,280
Whatever the decision is about the request type to use, this should only match what is needed and not the other one.
openstreetmap-openstreetmap-website
rb
@@ -1025,7 +1025,9 @@ Blockly.BlockSvg.prototype.handleDragFree_ = function(oldXY, newXY, e) { } var updatePreviews = true; - if (Blockly.localConnection_ && Blockly.highlightedConnection_) { + if (localConnection && localConnection.type == Blockly.OUTPUT_VALUE) { + updatePreviews = true; // Always update ...
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
7,872
...and in turn, this should probably be var updatePreviews = true; if (!(localConnection && localConnection.type == Blockly.OUTPUT_VALUE) && (Blockly.localConnection_ && Blockly.highlightedConnection_)) { since the first clause is a no-op. If you want to leave it this way for clarity, that's fine too.
LLK-scratch-blocks
js
@@ -70,8 +70,7 @@ class BigqueryRulesEngine(bre.BaseRulesEngine): self.rule_book = BigqueryRuleBook(self._load_rule_definitions()) # TODO: The naming is confusing and needs to be fixed in all scanners. - def find_policy_violations(self, parent_project, bq_acl, - force_re...
1
# Copyright 2017 The Forseti Security Authors. 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 ap...
1
32,462
Please remove this TODO, since they will not apply anymore after you are done. :) Can you please remove this everywhere else in this PR?
forseti-security-forseti-security
py
@@ -1667,6 +1667,13 @@ void ErrorTest() { TestError("enum X:byte { Y, Y }", "value already"); TestError("enum X:byte { Y=2, Z=2 }", "unique"); TestError("table X { Y:int; } table X {", "datatype already"); + TestError("table X { A:bool; } table Y { } union X {", + "enum clashes with datatype"); + ...
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
20,934
This seems like an incomplete schema definition. will that have any effect on the tests?
google-flatbuffers
java
@@ -22,7 +22,10 @@ DatasetLoader::DatasetLoader(const Config& io_config, const PredictFunction& pre label_idx_ = 0; weight_idx_ = NO_SPECIFIC; group_idx_ = NO_SPECIFIC; - SetHeader(filename); + if (filename != nullptr && CheckCanLoadFromBin(filename) == "") { + // SetHeader should only be called when load...
1
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #include <LightGBM/dataset_loader.h> #include <LightGBM/network.h> #include <LightGBM/utils/array_args.h> #include <LightGBM/utils/json11.h> #includ...
1
31,673
The testing cases are failing because `SetHeader` does not only handle cases where input are from files. It also reads categorical feature indices from the config parameters (see the part outside the `if (filename != nullptr) { ... }`). Skipping `SetHeader` directly here will cause errors when we load data from numpy o...
microsoft-LightGBM
cpp
@@ -148,8 +148,7 @@ func (m *BackgroundProcessManager) StartProcess(cmd *ManagedProcess) (*process.P go func() { err := cmd.Wait() if err != nil { - err, ok := err.(*exec.ExitError) - if ok { + if err, ok := err.(*exec.ExitError); ok { status := err.Sys().(syscall.WaitStatus) if status.Signaled(...
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
24,399
I think we should change the variable name of `err` in `if err, ok := err.(*exec.ExitError); ok `, this re-assignment of `err` still affects the next `else` branch
chaos-mesh-chaos-mesh
go
@@ -145,6 +145,18 @@ folly::Future<StatusOr<std::vector<SpaceIdName>>> MetaClient::listSpaces() { }); } + +folly::Future<StatusOr<bool>> MetaClient::dropSpace(std::string name) { + cpp2::DropSpaceReq req; + req.set_space_name(std::move(name)); + return getResponse(std::move(req), [] (auto c...
1
/* Copyright (c) 2018 - present, VE Software Inc. All rights reserved * * This source code is licensed under Apache 2.0 License * (found in the LICENSE.Apache file in the root directory) */ #include "meta/client/MetaClient.h" #include "network/NetworkUtils.h" DEFINE_int32(load_data_interval_second, 2 * 60, "Load...
1
15,478
`Status` has identical semantics with `StatusOr<bool>`.
vesoft-inc-nebula
cpp
@@ -75,6 +75,7 @@ var allowedPaths = []string{ "/readyz", "/mutate/acnp", "/mutate/anp", + "/mutate/addlabels", "/validate/tier", "/validate/acnp", "/validate/anp",
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
30,515
why is this named in a different style from other paths?
antrea-io-antrea
go
@@ -73,13 +73,13 @@ func (r *AWSClusterReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, reter return reconcile.Result{}, err } - if isPaused(cluster, awsCluster) { - log.Info("AWSCluster or linked Cluster is marked as paused. Won't reconcile") + if cluster == nil { + log.Info("Cluster Controller has not...
1
/* Copyright 2019 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
14,505
Swapped these to ensure that we aren't passing a nil cluster in to util.IsPaused
kubernetes-sigs-cluster-api-provider-aws
go
@@ -25,13 +25,18 @@ import ( api "google.golang.org/api/compute/v1" ) +type platformPkgManagerTuple struct { + platform string + pkgManager string +} + const ( packageInstalledString = "package is installed" packageNotInstalledString = "package is not installed" ) var ( - pkgManagers = []string{"apt"...
1
// Copyright 2019 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
8,337
I don't see pkgManager used anywhere, is there a reason we need this?
GoogleCloudPlatform-compute-image-tools
go
@@ -182,7 +182,7 @@ public class CoreDescriptor { */ public CoreDescriptor(String name, Path instanceDir, Map<String, String> coreProps, Properties containerProperties, ZkController zkController) { - this.instanceDir = instanceDir; + this.instanceDir = instanceDir.toAbsolutePath();...
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
34,527
A bit late, but I don't think this is necessary, as all callers will send absolute paths. And if you ever get a relative path, resolving it with `toAbsolutePath()` leads to it being relative to whatever CWD the app is started with, while the typical resolving of relative `instanceDir` is to resolve it relative to CoreC...
apache-lucene-solr
java
@@ -4188,7 +4188,8 @@ function getModelsMapForPopulate(model, docs, options) { foreignField = foreignField.call(doc); } - const localFieldPath = modelSchema.paths[localField]; + const localFieldPathType = modelSchema._getPathType(localField); + const localFieldPath = localFieldPathType === 'real'...
1
'use strict'; /*! * Module dependencies. */ const Aggregate = require('./aggregate'); const ChangeStream = require('./cursor/ChangeStream'); const Document = require('./document'); const DocumentNotFoundError = require('./error').DocumentNotFoundError; const DivergentArrayError = require('./error').DivergentArrayEr...
1
13,989
There's an awful lot of test failures here because `localFieldPathType.schema` may not contain a `getters` array.
Automattic-mongoose
js
@@ -56,7 +56,13 @@ class User < ActiveRecord::Base scope :search, -> (term) { search_pattern = "%#{term}%" - where("firstname LIKE ? OR surname LIKE ? OR email LIKE ?", search_pattern, search_pattern, search_pattern) + # MySQL does not support standard string concatenation and since concat_ws or concat ...
1
class User < ActiveRecord::Base include ConditionalUserMailer ## # Devise # Include default devise modules. Others available are: # :token_authenticatable, :confirmable, # :lockable, :timeoutable and :omniauthable devise :invitable, :database_authenticatable, :registerable, :recoverable, :r...
1
17,380
Mysql allows for `||` concatenation (e.g. `firstname||' '||surname`) if you enable it: `set sql_mode=PIPES_AS_CONCAT;`. I think this check is safer though
DMPRoadmap-roadmap
rb
@@ -5,11 +5,12 @@ package ens import ( + "bytes" "errors" "fmt" "strings" - "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" goens "github.com/wealdtech/go-ens/v3"
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 ens import ( "errors" "fmt" "strings" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/ethclient" goens "...
1
13,126
NOTE: this is the default ENS registry address. If the ENS suite is deployed from the current builds to any chain, it will always be found at this address.
ethersphere-bee
go
@@ -26,6 +26,7 @@ Upcase::Application.routes.draw do draw :teams draw :trails draw :users + draw :vanity draw :videos root to: "homes#show"
1
class ActionDispatch::Routing::Mapper def draw(routes_name) instance_eval(File.read( Rails.root.join("config/routes/#{routes_name}.rb") )) end end Upcase::Application.routes.draw do use_doorkeeper draw :redirects draw :admin draw :api draw :clearance draw :decks draw :exercises draw ...
1
15,361
I'm curious why you are using `draw` in this route file?
thoughtbot-upcase
rb
@@ -195,7 +195,18 @@ func Diff(ctx *context.Context) { } func RawDiff(ctx *context.Context) { - panic("not implemented") + userName := ctx.Repo.Owner.Name + repoName := ctx.Repo.Repository.Name + commitID := ctx.Params(":sha") + diffType := ctx.Params(":ext") + + diff, err := models.GetRawDiff(models.RepoPath(userN...
1
// Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package repo import ( "container/list" "path" "github.com/Unknwon/paginater" "github.com/gogits/git-module" "github.com/gogits/gogs/models" "github....
1
11,544
Those variables are only been used once, I think we don't need to create them at all, just pass values to the `GetRawDiff` directly.
gogs-gogs
go
@@ -3,7 +3,7 @@ // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // </copyright> -#if NET461 || NET452 +#if NET461 using System; using System.Linq;
1
// <copyright file="AspNetWebFormsTests.cs" company="Datadog"> // Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. // This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. // </copyright> #if NET461 || NET4...
1
23,414
I like the idea of replacing all the `#if NET461` with `#if NETFRAMEWORK`... is that worth doing now? Means fewer changes if we go to 4.7.2 at some point
DataDog-dd-trace-dotnet
.cs
@@ -21,6 +21,8 @@ import ( // Compatible with Okta offline access, a holdover from previous defaults. var defaultScopes = []string{oidc.ScopeOpenID, oidc.ScopeOfflineAccess, "email"} +const clutchProviderName = "clutch" + type OIDCProvider struct { provider *oidc.Provider verifier *oidc.IDTokenVerifier
1
package authn import ( "context" "errors" "fmt" "net/http" "net/url" "strings" "time" "github.com/coreos/go-oidc/v3/oidc" "github.com/dgrijalva/jwt-go" "github.com/google/uuid" "golang.org/x/oauth2" authnv1 "github.com/lyft/clutch/backend/api/config/service/authn/v1" ) // Default scopes, used if no scop...
1
10,546
to fix the docs build failure, make this const var named without the suffix `Name`
lyft-clutch
go
@@ -682,6 +682,7 @@ func checkClientTLSCertSubject(c *client, fn tlsMapAuthFn) bool { return true } } + fallthrough case hasURIs: for _, u := range cert.URIs { if match, ok := fn(u.String(), nil); ok {
1
// Copyright 2012-2019 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 ...
1
11,446
This bugfix also included, in case a subjectAlternativeName was present in the cert, then URIs (e.g SVID SPIFFE auth) would not have been attempted.
nats-io-nats-server
go
@@ -0,0 +1,15 @@ +package com.fsck.k9.service; + + +import java.io.File; +import java.io.IOException; + +import android.net.Uri; + + +public interface FileProviderInterface { + + File createProvidedFile() throws IOException; + Uri getUriForProvidedFile(File file, String mimeType) throws IOException; + +}
1
1
13,900
Same here. Feels like the wrong location.
k9mail-k-9
java
@@ -42,7 +42,9 @@ from qutebrowser.keyinput import modeman from qutebrowser.utils import (message, usertypes, log, qtutils, urlutils, objreg, utils) from qutebrowser.utils.usertypes import KeyMode -from qutebrowser.misc import editor, guiprocess +from qutebrowser.misc import editor, gu...
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,521
Please make `_path_suggestion` public (i.e. remove the `_`) in `downloads.py`.
qutebrowser-qutebrowser
py
@@ -40,6 +40,8 @@ func init() { flag.StringVar(&revoke, "revoke", "", "Hostname for which to revoke the certificate") flag.StringVar(&serverType, "type", "http", "Type of server to run") flag.BoolVar(&version, "version", false, "Show version") + flag.StringVar(&caddytls.HTTPChallengePort, "external-port-80-is-loc...
1
package caddymain import ( "errors" "flag" "fmt" "io/ioutil" "log" "os" "path/filepath" "runtime" "strconv" "strings" "gopkg.in/natefinch/lumberjack.v2" "github.com/xenolf/lego/acme" "github.com/mholt/caddy" // plug in the HTTP server type _ "github.com/mholt/caddy/caddyhttp" "github.com/mholt/cadd...
1
8,929
Woah, these flag names gotta get shorter. (Edit: I'll try to suggest some if needed, will think on it.)
caddyserver-caddy
go
@@ -19,6 +19,14 @@ module Blacklight end end end + + initializer "blacklight.secret_key" do |app| + if app.respond_to?(:secrets) + Blacklight.secret_key ||= app.secrets.secret_key_base + elsif app.config.respond_to?(:secret_key_base) + Blacklight.secret_key ||= app.co...
1
module Blacklight class Engine < Rails::Engine engine_name "blacklight" require 'bootstrap-sass' require 'blacklight/rails/routes' # BlacklightHelper is needed by all helpers, so we inject it # into action view base here. initializer 'blacklight.helpers' do |app| ActionView::Base.send...
1
5,291
Is this the code that's supposed to use the Rails app's only when in Rails4? What's the point of the first `if app.respond_to?(:secrets)`, both the `if` and the `elsif` have the same body, is only the second one needed? If `app.config` has a `secret_key_base`, then use it, the end. Is there a need for first checking if...
projectblacklight-blacklight
rb
@@ -390,6 +390,9 @@ public: m_nopayload_elems_bitmask = enum_impl_strategy.getBitMaskForNoPayloadElements(); + if (enum_decl->isObjC()) + m_is_objc_enum = true; + LOG_PRINTF(LIBLLDB_LOG_TYPES, "m_nopayload_elems_bitmask = %s", Dump(m_nopayload_elems_bitmask).c_str());
1
//===-- SwiftASTContext.cpp -------------------------------------*- C++ -*-===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See https://swift.org/L...
1
19,533
Does this not apply to C enums on Linux?
apple-swift-lldb
cpp
@@ -511,7 +511,11 @@ function makeOperationHandler(server, connection, cmd, options, callback) { session.serverSession.isDirty = true; } - if (supportsRetryableWrites(server) && !inActiveTransaction(session, cmd)) { + if ( + isRetryableWriteError(err) && + supportsR...
1
'use strict'; const EventEmitter = require('events'); const Logger = require('../logger'); const ReadPreference = require('../read_preference'); const { ConnectionPool } = require('../cmap/connection_pool'); const { CMAP_EVENT_NAMES } = require('../cmap/events'); const { ServerDescription, compareTopologyVersion } = re...
1
17,760
Should this check if the error is `RetryableWriteError` before adding the label?
mongodb-node-mongodb-native
js
@@ -1,6 +1,8 @@ const Plugin = require('../core/Plugin') const { findDOMElement } = require('../core/Utils') -const getFormData = require('get-form-data').default +// Rollup uses get-form-data's ES modules build, and rollup-plugin-commonjs automatically resolves `.default`. +// So, if we are being built using rollup,...
1
const Plugin = require('../core/Plugin') const { findDOMElement } = require('../core/Utils') const getFormData = require('get-form-data').default /** * Form */ module.exports = class Form extends Plugin { constructor (uppy, opts) { super(uppy, opts) this.type = 'acquirer' this.id = 'Form' this.titl...
1
10,620
Oh wow, that's one complicated require :)
transloadit-uppy
js
@@ -1,6 +1,6 @@ // snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] // snippet-sourceauthor:[Doug-AWS] -// snippet-sourcedescription:[Using context.Context with SDK requests.] +// snippet-sourcedescription:[request_context.go shows how to usie context.Context with SDK requests.] ...
1
// snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] // snippet-sourceauthor:[Doug-AWS] // snippet-sourcedescription:[Using context.Context with SDK requests.] // snippet-keyword:[Extending the SDK] // snippet-keyword:[Go] // snippet-service:[aws-go-sdk] // snippet-sourcetype:...
1
15,680
do you mean how to "use"
awsdocs-aws-doc-sdk-examples
rb
@@ -400,8 +400,9 @@ describe('forwardRef', () => { const Transition = ({ children }) => { const state = useState(0); forceTransition = state[1]; - expect(children.ref).to.not.be.undefined; - if (state[0] === 0) expect(children.props.ref).to.be.undefined; + // TODO: ref exists on the backing node + //...
1
import React, { createElement, render, createRef, forwardRef, hydrate, memo, useState, useRef, useImperativeHandle, createPortal } from 'preact/compat'; import { setupScratch, teardown } from '../../../test/_util/helpers'; import { setupRerender, act } from 'preact/test-utils'; import { getSymbol } from './te...
1
15,874
We can't really test this anymore since ref and props.ref are at the backing node level now
preactjs-preact
js
@@ -56,6 +56,7 @@ abstract class BaseDataReader<T> implements Closeable { private CloseableIterator<T> currentIterator; private T current = null; + private FileScanTask currentTask = null; BaseDataReader(CombinedScanTask task, FileIO io, EncryptionManager encryptionManager) { this.tasks = task.files(...
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,693
Did you intend to set this in the constructor?
apache-iceberg
java
@@ -106,11 +106,15 @@ func (s *Service) createInstance(machine *actuators.MachineScope, bootstrapToken Role: aws.String(machine.Role()), }) + var err error // Pick image from the machine configuration, or use a default one. if machine.MachineConfig.AMI.ID != nil { input.ImageID = *machine.MachineCo...
1
/* Copyright 2018 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
7,617
This looks fine as a first approach, and can we put a TODO here about ubuntu 18.04 being hardcoded?
kubernetes-sigs-cluster-api-provider-aws
go
@@ -1,5 +1,6 @@ +#ifdef USE_OPENCV #include <opencv2/core/core.hpp> - +#endif // USE_OPENCV #include <stdint.h> #include <string>
1
#include <opencv2/core/core.hpp> #include <stdint.h> #include <string> #include <vector> #include "caffe/common.hpp" #include "caffe/data_layers.hpp" #include "caffe/layer.hpp" #include "caffe/proto/caffe.pb.h" #include "caffe/util/benchmark.hpp" #include "caffe/util/io.hpp" namespace caffe { template <typename Dt...
1
33,664
This isn't strictly needed since lmdb / leveldb data that is unencoded does not require OpenCV IO. I think `DataLayer` should only require lmdb / leveldb. If one tries to use encoded data without OpenCV the `DataTransformer` guards will report the dependency failure.
BVLC-caffe
cpp
@@ -30,7 +30,7 @@ func (r *ReconcileHiveConfig) deployHiveAPI(hLog log.FieldLogger, h *resource.He err := util.ApplyAsset(h, "config/apiserver/hiveapi-cluster-role-binding.yaml", hLog) if err != nil { - return err + hLog.WithError(err).Error("unable to apply hiveapi cluster role binding") } err = util.App...
1
package hive import ( log "github.com/sirupsen/logrus" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/errors" "k8s.io/client-go/kubernetes/scheme" apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" "sigs.k8s.io/contr...
1
10,584
Should we take out this change? This was only in there to try to brute force the start of the apiserver yesterday.
openshift-hive
go
@@ -33,6 +33,7 @@ class Proposal < ActiveRecord::Base has_many :steps has_many :individual_steps, ->{ individual }, class_name: 'Steps::Individual' has_many :approvers, through: :individual_steps, source: :user + has_many :completers, through: :individual_steps, source: :completer has_many :api_tokens, thr...
1
class Proposal < ActiveRecord::Base include WorkflowModel include ValueHelper include StepManager has_paper_trail class_name: 'C2Version' CLIENT_MODELS = [] # this gets populated later FLOWS = %w(parallel linear).freeze workflow do state :pending do event :approve, transitions_to: :approved ...
1
15,843
I worry that this association name is a bit confusing. Yoz was asking me about the concept of completion yesterday, which is why I think of it. It wasn't clear to him exactly what it was. what about calling this a `step_completer` ? we know that a proposal has many steps, so I think that might be clearer. in the future...
18F-C2
rb
@@ -11,7 +11,6 @@ namespace AutoRest.Swagger.Validation public class OperationParametersValidation : TypedRule<SwaggerParameter> { private const string SubscriptionId = "subscriptionid"; - private const string ApiVersion = "api-version"; /// <summary> /// Id of the Rule.
1
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. using AutoRest.Core.Logging; using AutoRest.Core.Properties; using AutoRest.Swagger.Validation.Core; using AutoRest.Swagger.Model; namespace AutoRest.Swagger.Va...
1
24,560
Just add a to-do saying we need to add api-version in the check some time in the future when we enable the single-swagger spec mode for validation.
Azure-autorest
java