patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -167,7 +167,9 @@ RSpec.describe "Api::V0::Comments", type: :request do
context "when getting by podcast episode id" do
let(:podcast) { create(:podcast) }
let(:podcast_episode) { create(:podcast_episode, podcast: podcast) }
- let!(:comment) { create(:comment, commentable: podcast_episode) }
+ let(:comment) { create(:comment, commentable: podcast_episode) }
+
+ before { comment }
it "not found if bad podcast episode id" do
get api_comments_path(p_id: "asdfghjkl")
| [find_root_comment->[detect,id_code_generated],find_child_comment->[parsed_body,detect,id_code_generated],create,api_comments_path,let,describe,match_array,find_child_comment,it,map,to,api_comment_path,to_set,find_root_comment,before,let!,iso8601,id_code_generated,require,include,dig,have_http_status,update,id,context,get,not_to,eq] | when getting a comment when a comment is hidden by the user it does not render the comment returns the comment. | Rubocop complained about `let!` when I tried to commit this so I fixed it. |
@@ -26,8 +26,6 @@ static struct daos_obj_class *oclass_resil2cl(struct daos_oclass_attr *ca);
/**
* Find the object class attributes for the provided @oid.
- * NB: Because ec.e_len can be overwritten by pool/container property,
- * please don't directly use ec.e_len.
*/
struct daos_oclass_attr *
daos_oclass_attr_find(daos_obj_id_t oid, bool *is_priv, uint32_t *nr_grps)
| [obj_ec_codec_init->[obj_ec_codec_fini],daos_obj_class->[daos_oclass_grp_size],inline->[daos_oclass_grp_size],daos_oclass_fit_max->[daos_oclass_grp_size]] | Find object class attribute by oid. | Not this patch issue, but is_priv is a bit confusing for this API. If this API suppose to be exported, probably remove this parameter for export API, and add another one for internal usage. Or we just remove is_priv from daos_obj_class, and use oc_id to check if the object class is reserved. |
@@ -689,6 +689,7 @@ public class JettyServer implements NiFiServer {
serverConnector.setHost(hostname);
}
serverConnector.setPort(port);
+ serverConnector.setIdleTimeout(60000);
serverConnectors.add(serverConnector);
} else {
// Add connectors for all IPs from network interfaces
| [JettyServer->[start->[start],doFilter->[doFilter],stop->[stop],identifyUiExtensionsForComponents->[readUiExtensions]]] | Configures a generic connector. | Assuming these changes are related to the frequency of the automatic browser refresh, should we make this timeout relative to the value configured in `nifi.ui.autorefresh.interval`. |
@@ -337,6 +337,7 @@ func (p *PodmanTest) RestoreArtifact(image string) error {
}()
storage.Transport.SetStore(store)
+
ref, err := storage.Transport.ParseStoreReference(store, image)
if err != nil {
return errors.Errorf("error parsing image name: %v", err)
| [GetContainerStatus->[Podman,WaitWithDefaultTimeout,OutputToString],Podman->[MakeOptions],Cleanup->[Podman],NumberOfRunningContainers->[Podman,WaitWithDefaultTimeout,OutputToStringArray],RunTopContainer->[Podman],RunLsContainer->[Podman,WaitWithDefaultTimeout,OutputToString],LineInOuputStartsWith->[OutputToStringArray],NumberOfContainersRunning->[Podman,WaitWithDefaultTimeout,OutputToStringArray],PullImage->[Podman],LineInOuputContains->[OutputToStringArray],RestoreAllArtifacts->[RestoreArtifact],BuildImage->[Podman],LineInOutputContainsTag->[OutputToStringArray],NumberOfContainers->[Podman,WaitWithDefaultTimeout,OutputToStringArray]] | RestoreArtifact restores an image from the given image path. | Did you intentionally add these blank lines? |
@@ -169,7 +169,7 @@ func testDecryptPasswordAndTest(nProfile, nAccessKey, key string) resource.TestC
NewPassword: aws.String(generatePassword(20)),
})
if err != nil {
- if awserr, ok := err.(awserr.Error); ok && awserr.Code() == "InvalidClientTokenId" {
+ if awserr, ok := err.(awserr.Error); ok && (awserr.Code() == "InvalidClientTokenId" || awserr.Code() == "EntityTemporarilyUnmodifiable") {
return resource.RetryableError(err)
}
| [DecryptBytes,Test,ChangePassword,NonRetryableError,Code,TestCheckResourceAttrSet,RandInt,New,RootModule,ComposeTestCheckFunc,Errorf,MustCompile,RetryableError,Get,NewStaticCredentials,Meta,Sprintf,GetLoginProfile,String,Retry] | testAccCheckAWSUserLoginProfileExists checks if a login profile exists in the state. testAccAWSUserLoginProfileConfig returns a string that can be used to read the config. | This is required, otherwise this happens > Check failed: Check 2/2 error: Error changing decrypted password: EntityTemporarilyUnmodifiable: Login Profile for User test-user-5423997845776594466 cannot be modified while login profile is being created. |
@@ -32,8 +32,8 @@ type BackgroundConfig struct {
// RegisterFlagsWithPrefix adds the flags required to config this to the given FlagSet
func (cfg *BackgroundConfig) RegisterFlagsWithPrefix(prefix string, description string, f *flag.FlagSet) {
- f.IntVar(&cfg.WriteBackGoroutines, prefix+"memcache.write-back-goroutines", 10, description+"How many goroutines to use to write back to memcache.")
- f.IntVar(&cfg.WriteBackBuffer, prefix+"memcache.write-back-buffer", 10000, description+"How many key batches to buffer for background write-back.")
+ f.IntVar(&cfg.WriteBackGoroutines, prefix+"cache.write-back-goroutines", 10, description+"How many goroutines to use to write back to cache.")
+ f.IntVar(&cfg.WriteBackBuffer, prefix+"cache.write-back-buffer", 10000, description+"How many key batches to buffer for background write-back.")
}
type backgroundCache struct {
| [Store->[LogFields,Add,SpanFromContext,Int],Stop->[Wait,Stop],RegisterFlagsWithPrefix->[IntVar],writeBackLoop->[Background,Sub,Store,Done],NewCounterVec,NewGaugeVec,WithLabelValues,Add,writeBackLoop] | RegisterFlagsWithPrefix registers flags with a given prefix. | We usually use term `concurrency` in our options, not `goroutines` (although technically that's how it's implemented). |
@@ -7,8 +7,9 @@ class MyModule < ApplicationRecord
enum state: Extends::TASKS_STATES
before_create :create_blank_protocol
+ before_create :assign_default_status_flow
before_validation :set_completed_on, if: :state_changed?
- before_validation :assign_default_status_flow
+
before_save :exec_status_consequences, if: :my_module_status_id_changed?
auto_strip_attributes :name, :description, nullify: false
| [MyModule->[navigable?->[navigable?],space_taken->[space_taken],viewable_by_user->[viewable_by_user]]] | The application record that is used to create a module. The main entry point for the experiment. | delete this line? |
@@ -69,8 +69,8 @@ class PromClient: # pylint: disable=too-few-public-methods
if not self.server:
app = make_wsgi_app(self._reg)
if use_test_thread:
- from wsgiref.simple_server import make_server, WSGIRequestHandler
- import threading
+ from wsgiref.simple_server import make_server, WSGIRequestHandler # pylint: disable=import-outside-toplevel
+ import threading # pylint: disable=import-outside-toplevel
class NoLoggingWSGIRequestHandler(WSGIRequestHandler):
"""Don't log requests."""
| [PromClient->[start->[int,make_server,start,Thread,WSGIServer,spawn,make_wsgi_app],__init__->[PromGauge,labels,VersionInfo]],make_wsgi_app->[prometheus_app->[restricted_registry,generate_latest,get,parse_qs,str,start_response]]] | Start the webserver. | E501 line too long (124 > 120 characters) |
@@ -276,9 +276,7 @@ class TypedDictAnalyzer:
def build_typeddict_typeinfo(self, name: str, items: List[str],
types: List[Type],
required_keys: Set[str]) -> TypeInfo:
- fallback = (self.api.named_type_or_none('typing.Mapping',
- [self.api.named_type('__builtins__.str'),
- self.api.named_type('__builtins__.object')])
+ fallback = (self.api.named_type_or_none('mypy_extensions._TypedDict', [])
or self.api.named_type('__builtins__.object'))
info = self.api.basic_new_typeinfo(name, fallback)
info.typeddict_type = TypedDictType(OrderedDict(zip(items, types)), required_keys,
| [TypedDictAnalyzer->[build_typeddict_typeinfo->[OrderedDict,named_type_or_none,TypedDictType,zip,basic_new_typeinfo,named_type],process_typeddict_definition->[check_typeddict,isinstance,lookup,len],check_typeddict->[build_typeddict_typeinfo,add_symbol_table_node,cast,TypedDictExpr,parse_typeddict_args,str,set,isinstance,set_line,SymbolTableNode,fail,TypedDict],fail_typeddict_arg->[fail],parse_typeddict_fields_with_types->[anal_type,append,fail_typeddict_arg,isinstance,expr_to_unanalyzed_type],analyze_typeddict_classdef->[any,filter,lookup,is_typeddict,accept,build_typeddict_typeinfo,extend,copy,set,values,list,TypedDictExpr,pop,update,len,format,isinstance,fail,keys,check_typeddict_classdef],check_typeddict_classdef->[anal_type,hasattr,append,AnyType,len,format,set,isinstance,parse_bool,fail],parse_typeddict_args->[has_any_from_unimported_type,fail_typeddict_arg,parse_typeddict_fields_with_types,len,check_for_explicit_any,format,isinstance,parse_bool,unimported_type_becomes_any],is_typeddict->[isinstance],fail->[fail]]] | Build a TypedDictTypeInfo object. | I would fail soon here if we can't find `mypy_extensions._TypedDict`. There is some logic than may cause a crash/fail that will be harder to debug. |
@@ -96,6 +96,9 @@ class BasicTextFieldEmbedder(TextFieldEmbedder):
# Note: need to use getattr here so that the pytorch voodoo
# with submodules works with multiple GPUs.
embedder = getattr(self, 'token_embedder_{}'.format(key))
+ identifiers = {}
+ if isinstance(embedder, MultilangTokenEmbedder):
+ identifiers['lang'] = kwargs['lang']
for _ in range(num_wrapping_dims):
embedder = TimeDistributed(embedder)
# If we pre-specified a mapping explictly, use that.
| [BasicTextFieldEmbedder->[get_output_dim->[get_output_dim],from_params->[from_params]]] | Forward computation of the embedder. Embeds the key in the embedders or the indexers. | We really need to use `inspect` here, instead of hard-coding a particular embedder. It's not worth the complexity to support one-off embedders in the core components of the main library like this, unless we can find a way to do it generally. If you don't know how to do this, I can give some pointers. |
@@ -828,7 +828,8 @@ def _fill_order_with_cart_data(order, cart, discounts, taxes):
order, line.variant, line.quantity, discounts, taxes)
if cart.note:
- order.notes.create(user=order.user, content=cart.note)
+ order.customer_note = cart.note
+ order.save()
@transaction.atomic
| [change_cart_user->[find_open_cart_for_user],get_or_create_cart_from_request->[get_or_create_user_cart,get_or_create_anonymous_cart_from_token],add_variant_to_cart->[update_cart_quantity],check_product_availability_and_warn->[contains_unavailable_variants,remove_unavailable_variants],recalculate_cart_discount->[get_voucher_for_cart,get_voucher_discount_for_cart],get_prices_of_products_in_discounted_categories->[get_variant_prices_from_lines],update_billing_address_in_anonymous_cart->[get_anonymous_summary_without_shipping_forms],update_billing_address_in_cart->[get_summary_without_shipping_forms],get_voucher_discount_for_cart->[_get_shipping_voucher_discount_for_cart,_get_products_voucher_discount],get_prices_of_discounted_products->[get_variant_prices_from_lines],get_prices_of_products_in_discounted_collections->[get_variant_prices_from_lines],change_billing_address_in_cart->[_check_new_cart_address],_get_products_voucher_discount->[get_prices_of_products_in_discounted_categories,get_prices_of_discounted_products,get_prices_of_products_in_discounted_collections],get_or_create_db_cart->[get_cart->[func->[set_cart_cookie,get_or_create_cart_from_request]]],get_cart_from_request->[get_anonymous_cart_from_token,get_user_cart],_process_voucher_data_for_order->[get_voucher_for_cart],update_shipping_address_in_cart->[get_shipping_address_forms],find_and_assign_anonymous_cart->[get_cart->[func->[token_is_valid]]],change_shipping_address_in_cart->[_check_new_cart_address],create_order->[_fill_order_with_cart_data,_process_voucher_data_for_order,_process_shipping_data_for_order,_process_user_data_for_order],update_billing_address_in_cart_with_shipping->[get_billing_forms_with_shipping],get_or_empty_db_cart->[get_cart->[func->[get_cart_from_request]]]] | Fill an order with data from cart. | if saving just one field, we could use `updated_fields` here |
@@ -66,6 +66,18 @@ elgg.tinymce.init = function() {
var text = elgg.echo('tinymce:word_count') + strip.split(' ').length + ' ';
tinymce.DOM.setHTML(tinymce.DOM.get(tinyMCE.activeEditor.id + '_path_row'), text);
});
+
+ ed.onInit.add(function(ed) {
+ // prevent Firefox from dragging/dropping files into editor
+ if (tinymce.isGecko) {
+ tinymce.dom.Event.add(ed.getBody().parentNode, "drop", function(e) {
+ if (e.dataTransfer.files.length > 0) {
+ e.preventDefault();
+ }
+ });
+ }
+ });
+
},
content_css: elgg.config.wwwroot + 'mod/tinymce/css/elgg_tinymce.css'
});
| [No CFG could be retrieved] | Theme Advanced buttons Check if the element has an embed control that is currently hovered on. | Why limit it to this condition? Shouldn't we assume Chrome/others could gain support in the future? |
@@ -80,7 +80,15 @@ class SamplesController < ApplicationController
errors.delete_if { |k, v| v.blank? }
if errors.empty?
- format.json { render json: {}, status: :ok }
+ format.json
+ render json:
+ id: sample.id,
+ flash: t(
+ 'samples.create.success_flash',
+ sample: sample.name,
+ organization: @organization.name
+ ),
+ status: :ok
else
format.json { render json: errors, status: :bad_request }
end
| [SamplesController->[create->[new],update->[new]]] | POST - > create a new with the necessary information. | unexpected token tCOMMA (Using Ruby 2.3 parser; configure using `TargetRubyVersion` parameter, under `AllCops`) |
@@ -216,7 +216,7 @@ class Media_Command extends WP_CLI_Command {
$file_array = array(
'tmp_name' => $tempfile,
- 'name' => basename( $file )
+ 'name' => Utils\basename( $file )
);
$post_array= array(
| [Media_Command->[process_regeneration->[needs_regeneration,get_error_message,remove_old_images],import->[get_error_messages,make_copy],regenerate->[process_regeneration]]] | Imports a file or a folder into a post. Imports a file. Import image and attach to a post. | WPCS: trailing comma recommended |
@@ -342,6 +342,10 @@ public class ComponentDao implements Dao {
mapper(session).resetBChangedForRootComponentUuid(projectUuid);
}
+ public void setPrivateForRootComponentUuid(DbSession session, String projectUuid, boolean isPrivate) {
+ mapper(session).setPrivateForRootComponentUuid(projectUuid, isPrivate);
+ }
+
public void delete(DbSession session, long componentId) {
mapper(session).delete(componentId);
}
| [ComponentDao->[countByQuery->[countByQueryImpl],selectEnabledFilesFromProject->[selectEnabledFilesFromProject],updateBEnabledToFalse->[mapper],selectSubProjectsByComponentUuids->[selectSubProjectsByComponentUuids],selectDescendantModules->[selectDescendantModules],selectProjectsByNameQuery->[selectProjectsByNameQuery],selectProvisioned->[selectProvisioned,buildUpperLikeSql],selectByProjectUuid->[selectByProjectUuid],update->[update],selectProjects->[selectProjects],selectDescendants->[selectByUuid,selectDescendants],selectExistingUuids->[mapper],selectProjectsFromView->[selectProjectsFromView],selectAncestors->[selectByUuids],countGhostProjects->[countGhostProjects,buildUpperLikeSql],selectAllRootsByOrganization->[selectAllRootsByOrganization],selectByUuids->[mapper],selectComponentsByQualifiers->[selectComponentsByQualifiers],updateTags->[updateTags],selectById->[selectById],selectByIds->[mapper],selectEnabledDescendantModules->[selectDescendantModules],selectByKeys->[mapper],selectByKey->[selectByKey],delete->[delete],selectComponentsHavingSameKeyOrderedById->[selectComponentsHavingSameKeyOrderedById],selectByUuid->[selectByUuid],resetBChangedForRootComponentUuid->[resetBChangedForRootComponentUuid],selectForIndexing->[selectForIndexing],selectByQuery->[selectByQueryImpl],selectOrFailByUuid->[selectByUuid],applyBChangesForRootComponentUuid->[applyBChangesForRootComponentUuid],insert->[insert],countProvisioned->[buildUpperLikeSql,countProvisioned],selectGhostProjects->[buildUpperLikeSql,selectGhostProjects]]] | Resets all bchanged properties for the given project and all of its children. | I would prefer `componentUuid`, if it is not only relevant for qualifier `TRK`. |
@@ -300,7 +300,7 @@ class ExportedTargetDependencyCalculator(AbstractClass):
class SetupPy(Task):
"""Generate setup.py-based Python projects."""
- SOURCE_ROOT = b'src'
+ SOURCE_ROOT = 'src' if PY3 else b'src'
PYTHON_DISTS_PRODUCT = 'python_dists'
| [TargetAncestorIterator->[iter_target_siblings_and_ancestors->[iter_siblings_and_ancestors->[iter_siblings_and_ancestors,iter_targets_in_spec_path],iter_siblings_and_ancestors]],SetupPy->[write_setup->[convert->[convert],find_packages,_setup_boilerplate,install_requires,iter_entry_points,convert],write_contents->[write_target->[write_target_source],is_resources_target,is_python_target,write_target],find_packages->[declares_namespace_package,nearest_subpackage,iter_files],DependencyCalculator->[dependencies->[is_exported],is_exported->[has_provides],requires_export->[is_python_target,is_resources_target]],has_provides->[is_python_target],install_requires->[has_provides,is_requirements],execute->[is_exported_python_target->[has_provides],create->[create_setup_py,is_exported_python_target,create],SetupPyRunner,is_exported_python_target,create],create_setup_py->[write_contents,write_setup,reduced_dependencies,DependencyCalculator],declares_namespace_package->[walk]],ExportedTargetDependencyCalculator->[reduced_dependencies->[collect_potentially_owned_python_targets->[is_exported],collect_reduced_dependencies->[requires_export],UnExportedError,_walk,is_exported,AmbiguousOwnerError,iter_target_siblings_and_ancestors,requires_export,_closure,NoOwnerError],_walk->[walk->[walk,dependencies],walk],_closure->[_walk],__init__->[TargetAncestorIterator]]] | Checks if a target is a requirements library. | This file is a little hacky to get to work on both versions. It relies on `pprint` to generate the content written to file. In Py2, unicode is prefaced with `u`, and in Py3 bytes are prefaced with `b`. The goal is to have no prefix displayed, so to do this we have to use bytes in Py2 and unicode in Py3. |
@@ -80,12 +80,11 @@ public abstract class BeamSqlArithmeticExpression extends BeamSqlExpression {
private double getDouble(BeamSqlRow inputRecord, BeamSqlExpression op) {
Object raw = op.evaluate(inputRecord).getValue();
- Double ret = null;
if (SqlTypeName.NUMERIC_TYPES.contains(op.getOutputType())) {
- ret = ((Number) raw).doubleValue();
+ return ((Number) raw).doubleValue();
}
-
- return ret;
+ throw new IllegalStateException(
+ String.format("Can't build a valid arithmetic expression with argument %s", raw));
}
/**
| [BeamSqlArithmeticExpression->[getDouble->[getValue,getOutputType,contains,doubleValue],accept->[getOutputType,contains,size],evaluate->[getDouble,calc,of,getOutputType,get,contains,toString,valueOf]]] | Evaluate the double. | Is returning 0 really the right thing to do here? NullPointerException probably isn't ideal, either. How about throwing an IllegalStateException? Or are there cases where we actually expect this to case to happen and also be valid? |
@@ -536,6 +536,14 @@ public class HttpToHttp2ConnectionHandlerTest {
.gracefulShutdownTimeoutMillis(0)
.build();
p.addLast(handler);
+ p.addLast(new ChannelInboundHandlerAdapter() {
+ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
+ if (evt instanceof Http2ConnectionPrefaceWrittenEvent) {
+ prefaceWrittenLatch.countDown();
+ ctx.pipeline().remove(this);
+ }
+ }
+ });
}
});
| [HttpToHttp2ConnectionHandlerTest->[newPromise->[newPromise]]] | Bootstraps the environment. | why even remove it ? |
@@ -434,6 +434,12 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
vetoersExist = channelToMaster.call(new DoVetoersExist());
}
}
+ catch (InterruptedException ie) {
+ // If we receive an InterruptedException here, we probably can't do much anyway.
+ // Perhaps we should just return at this point since we probably can't do anything else.
+ // It might make sense to introduce retries, but it's probably not going to get better.
+ LOGGER.log(Level.FINE, "Caught InterruptedException while checking if vetoers exist: ", ie);
+ }
catch (Exception e) {
LOGGER.log(Level.WARNING, "Error while determining if vetoers exist", e);
}
| [ProcessTree->[Unix->[killAll->[hasMatchingEnvVars,killRecursively],get->[kill->[],get]],Solaris->[SolarisProcess->[getEnvironmentVariables->[readLine,getFile,to64],getArguments->[readLine,getFile,to64],getParent->[get],to64,adjustL,getFile,adjust]],WindowsOSProcess->[killRecursively->[getPid,killByKiller,getVeto,killRecursively],getEnvironmentVariables2->[getEnvironmentVariables],getEnvironmentVariables->[getPid],hasMatchingEnvVars2->[getEnvironmentVariables2,get],killSoftly->[getPid],kill->[getPid,killByKiller,getVeto,kill],getPid],SerializedProcess->[readResolve->[get]],writeReplace->[Remote],Linux->[LinuxProcess->[getEnvironmentVariables->[getFile],getArguments->[getFile],getParent->[get],getFile]],Darwin->[DarwinProcess->[parse->[StringArrayMemory,peek,skip0,readString,readInt],getParent->[get]]],UnixReflection->[destroy->[invoke,get],pid->[invoke]],get->[kill->[killByKiller,getVeto],call,get,OSProcess],OSProcess->[killByKiller->[getKillers,getPid,kill],getVeto->[call],getChildren->[getParent],hasMatchingEnvVars->[getEnvironmentVariables,get],CheckVetoes->[call->[getPid]]],killAll->[killAll,get],Windows->[killAll->[hasMatchingEnvVars,getPid,killRecursively],hasMatchingEnvVars->[hasMatchingEnvVars2,hasMatchingEnvVars,WindowsOSProcessException],get->[kill->[],get,getPid],getPid,WindowsOSProcess],UnixProcess->[getFile->[getPid],killRecursively->[getChildren,getPid,killRecursively,kill],kill->[killByKiller,getVeto,kill,getFile,getPid]],Remote->[killAll->[killAll],RemoteProcess->[killRecursively->[killRecursively],getEnvironmentVariables->[getEnvironmentVariables],getArguments->[getArguments],kill->[kill],act->[act],getParent->[get,getPid,getParent],getPid]],AIX->[AIXProcess->[getParent->[get],getFile]],iterator->[iterator]]] | Returns a process tree object that can be used to determine if a veto is available. | You should at least set the thread's interrupt flag back so that code further down the line won't try to block again without being immediately re-interrupted. Do that _after_ the log message, of course, since that might block. |
@@ -137,3 +137,10 @@ func BoxPublicKeyToKeybaseKID(k saltpack.BoxPublicKey) (ret keybase1.KID) {
p := k.ToKID()
return keybase1.KIDFromRawKey(p, KIDNaclDH)
}
+
+func checkSaltpackBrand(b string) error {
+ if b != KeybaseSaltpackBrand {
+ return KeybaseSaltpackError{}
+ }
+ return nil
+}
| [LookupBoxSecretKey->[GetPublicKey,ToKID],Box->[ToRawBoxKeyPointer],ImportEphemeralKey->[LookupBoxPublicKey],Unbox->[ToRawBoxKeyPointer],Precompute->[ToRawBoxKeyPointer,Precompute],ToKID] | Get the KID of the public key. | Does it always make sense to error out on brands other than Keybase? Is it possible that someone might want to change the brand name but remain compatible with Keybase? (Or is that something we would want to discourage?) |
@@ -80,9 +80,10 @@ RtpsUdpDataLink::RtpsUdpDataLink(RtpsUdpTransport& transport,
, job_queue_(DCPS::make_rch<DCPS::JobQueue>(reactor_task->get_reactor()))
, multi_buff_(this, config.nak_depth_)
, best_effort_heartbeat_count_(0)
- , nack_reply_(this, &RtpsUdpDataLink::send_nack_replies,
- config.nak_response_delay_)
- , heartbeat_(reactor_task->interceptor(), config.heartbeat_period_, *this, &RtpsUdpDataLink::send_heartbeats)
+ , nack_reply_(reactor_task->interceptor(), *this, &RtpsUdpDataLink::send_nack_replies)
+ , expected_acks_(0)
+ , heartbeat_period_(config.heartbeat_period_)
+ , heartbeat_(reactor_task->interceptor(), *this, &RtpsUdpDataLink::send_heartbeats)
, heartbeat_reply_(reactor_task->interceptor(), config.heartbeat_period_, *this, &RtpsUdpDataLink::send_heartbeat_replies)
, heartbeatchecker_(reactor_task->interceptor(), *this, &RtpsUdpDataLink::check_heartbeats)
, max_bundle_size_(config.max_message_size_ - RTPS::RTPSHDR_SZ) // default maximum bundled message size is max udp message size (see TransportStrategy) minus RTPS header
| [No CFG could be retrieved] | DDS - DDS - - - - - - - - - - - - - - - - - -. | Does it make sense to move the timer and expected_acks_ field to the individual writers? I think we're (definitely) going to want it there eventually... without it, a writer publishing high speed data attached to a single reader will have his HB frequency decided by the acks to a writer publishing low speed status updates, etc. |
@@ -522,8 +522,8 @@ void Hud::drawLuaElements(const v3s16 &camera_offset)
client->getMinimap()->drawMinimap(rect);
break; }
default:
- infostream << "Hud::drawLuaElements: ignoring drawform " << e->type <<
- " of hud element ID " << i << " due to unrecognized type" << std::endl;
+ infostream << "Hud::drawLuaElements: ignoring drawform " << e->type
+ << " due to unrecognized type" << std::endl;
}
}
}
| [No CFG could be retrieved] | draws compass of a given type Color for all images in the image. | The server HUD ID might still be helpful here to figure out which HUD is affected. |
@@ -31,7 +31,7 @@ namespace System.Net
string name;
unsafe
{
- name = Marshal.PtrToStringUni(((SecurityPackageInfo*)packageInfo)->Name);
+ name = Marshal.PtrToStringUni(((SecurityPackageInfo*)packageInfo)->Name)!;
}
if (NetEventSource.IsEnabled) NetEventSource.Info(null, $"packageInfo:{packageInfo} negotiationState:{negotiationState:x} name:{name}");
| [NegotiationInfoClass->[GetAuthenticationPackageName->[IsInvalid,DangerousGetHandle,DangerousRelease,SECPKG_NEGOTIATION_COMPLETE,PtrToStringUni,Name,SECPKG_NEGOTIATION_OPTIMISTIC,IsEnabled,OrdinalIgnoreCase,Info,DangerousAddRef,Equals]]] | Get the authentication package name for a given safe handle and negotiation state. | If we declared `string name` as `string? name`, you could get rid of this suppression. |
@@ -16,6 +16,8 @@ static std::string last_prompt;
std::mutex line_mutex, sync_mutex, process_mutex;
std::condition_variable have_line;
+std::vector<std::string> rdln::readline_buffer::completion_commands = {"exit"};
+
namespace
{
rdln::readline_buffer* current = NULL;
| [get_line->[wait],int->[add_history,free,rl_copy_text,rl_set_prompt,FD_ZERO,c_str,FD_SET,rl_redisplay,rl_bind_key,rl_replace_line,strcmp,notify_one,select,rl_callback_read_char],process->[process_input,lock,unlock],start->[install_line_handler,rdbuf],stop->[remove_line_handler,rdbuf],if->[start],void->[rl_callback_handler_remove,rl_set_prompt,rl_callback_handler_install,c_str,rl_redisplay,rl_replace_line,rl_unbind_key],set_prompt->[rl_redisplay,rl_set_prompt,c_str],m_buffer->[is_running,stop],sync->[free,sgetc,sputc,rl_copy_text,rl_set_prompt,c_str,rl_redisplay,rl_replace_line,snextc]] | Component of the console that handles the input of a command. - - - - - - - - - - - - - - - - - -. | The readline patches have been adding lots to RW static memory. This in particular has a initialization order fiasco (that we should be unlikely to hit, but its easy to oops that). I am wondering if it makes sense to refactor all readline static variables in one class, and then have that class constructed as a function local static. It would be slightly slower since each access to a function local static now requires thread synchronization, but the delay would be marginal and the code would be more resilient to crazy C++ behavior if the functions were used elsewhere for some reason. |
@@ -186,8 +186,8 @@ def make_or_verify_dir(directory, mode=0o755, uid=0, strict=False):
if exception.errno == errno.EEXIST:
if strict and not check_permissions(directory, mode, uid):
raise errors.Error(
- "%s exists, but it should be owned by user %d with"
- "permissions %s" % (directory, uid, oct(mode)))
+ "%s exists, but it should be owned by user %s with"
+ "permissions %s" % (directory, str(uid), oct(mode)))
else:
raise
| [exe_exists->[is_exe],set_up_core_dir->[lock_dir_until_exit],unique_lineage_name->[safe_open,_unique_file],_unique_file->[safe_open],unique_file->[_unique_file]] | Make sure a directory exists with proper permissions and permissions. | Do we need to make this change? Testing locally on Windows 10, tests pass locally without this. Also, problems here likely indicate `uid` is of an unexpected type and I'd rather have us fix that problem than just casting it to a string. |
@@ -357,7 +357,8 @@ VERB_HELP = [
}),
("delete", {
"short": "Clean up all files related to a certificate",
- "opts": "Options for deleting a certificate"
+ "opts": "Options for deleting a certificate",
+ "usage": "\n\n certbot delete --cert-name CERTNAME"
}),
("revoke", {
"short": "Revoke a certificate specified with --cert-path",
| [_add_all_groups->[add_group],_plugins_parsing->[add,add_group,add_plugin_args],HelpfulArgumentParser->[add_group->[HelpfulArgumentGroup],set_test_server->[flag_default],remove_config_file_domains_for_renewal->[_Default],modify_kwargs_for_default_detection->[_Default],__init__->[flag_default],add_deprecated_argument->[add_deprecated_argument],add->[add_argument],parse_args->[possible_deprecation_warning,remove_config_file_domains_for_renewal,parse_args],add_plugin_args->[add_group],_usage_string->[_list_subcommands]],_Default->[__nonzero__->[__bool__]],_paths_parser->[config_help,add,flag_default],set_by_cli->[set_by_cli],prepare_and_parse_args->[_add_all_groups,HelpfulArgumentParser,flag_default,add_deprecated_argument,add,parse_args,config_help],_create_subparsers->[add,flag_default],option_was_set->[set_by_cli,has_default_value],flag_default] | Returns a hash code for a configuration variable. Checks if the option was set by the user or does it differ from the default?. | I'm not sure of the reasoning, but it seems that the existing `usage` lines begin _and_ end with `\n\n`. Perhaps the new ones should as well? |
@@ -413,13 +413,9 @@ class PackageFinder(object):
for location in url_locations:
logger.debug('* %s', location)
- formats = set(["source"])
- if self.use_wheel:
- formats.add("binary")
- search = Search(
- project_name.lower(),
- pkg_resources.safe_name(project_name).lower(),
- frozenset(formats))
+ canonical_name = pkg_resources.safe_name(project_name).lower()
+ formats = fmt_ctl_formats(self.format_control, canonical_name)
+ search = Search(project_name.lower(), canonical_name, formats)
find_links_versions = self._package_versions(
# We trust every directly linked archive in find_links
(Link(url, '-f', trusted=True) for url in self.find_links),
| [PackageFinder->[_sort_locations->[sort_path],_get_index_urls_locations->[mkurl_pypi_url],find_requirement->[_find_all_versions,InstallationCandidate,_sort_versions],_link_package_versions->[_log_skipped_link,InstallationCandidate],_find_all_versions->[_sort_locations,_validate_secure_origin,_get_index_urls_locations],_package_versions->[_sort_links]],Link->[splitext->[splitext],ext->[splitext]],Link] | Find all available versions of a given project name. Find packages that are not available in the system. | It didnt catch it on the previous PR but it seems strange to set `project_name.lower()` as the user supplied name (since the user obviously supplied `project_name`). |
@@ -35,11 +35,13 @@ class PySip(Package):
python('build.py', 'prepare')
def configure(self, spec, prefix):
- python('configure.py',
- '--bindir={0}'.format(prefix.bin),
- '--destdir={0}'.format(site_packages_dir),
- '--incdir={0}'.format(python_include_dir),
- '--sipdir={0}'.format(prefix.share.sip))
+ args = ['--bindir={0}'.format(prefix.bin),
+ '--destdir={0}'.format(site_packages_dir),
+ '--incdir={0}'.format(python_include_dir),
+ '--sipdir={0}'.format(prefix.share.sip)]
+ if '+pyqt5' in self.spec:
+ args.append(['--sip-module=PyQt5.sip'])
+ python('configure.py', *args)
def build(self, spec, prefix):
make()
| [PySip->[build->[make],install->[make],prepare->[python,satisfies],configure->[python,format],run_before,depends_on,version,extends]] | Configure the package with the given spec. | Shouldn't this be `args.append('...')`, not `args.append(['...'])`? |
@@ -141,8 +141,10 @@ public class ApexPipelineTranslator extends Pipeline.PipelineVisitor.Defaults {
@Override
public void translate(Read.Bounded<T> transform, TranslationContext context) {
// TODO: adapter is visibleForTesting
- BoundedToUnboundedSourceAdapter unboundedSource =
- new BoundedToUnboundedSourceAdapter<>(transform.getSource());
+ ArrayDeque<BoundedSource<T>> unboundedSources = new ArrayDeque<>();
+ unboundedSources.add(transform.getSource());
+ UnboundedReadFromBoundedSource.BoundedToUnboundedSourceAdapter unboundedSource =
+ new UnboundedReadFromBoundedSource.BoundedToUnboundedSourceAdapter(unboundedSources);
ApexReadUnboundedInputOperator<T, ?> operator =
new ApexReadUnboundedInputOperator<>(unboundedSource, true, context.getPipelineOptions());
context.addOperator(operator, operator.output);
| [ApexPipelineTranslator->[visitPrimitiveTransform->[translate]]] | Translate the read using a BoundedTransform. | Would prefer if there was no change here. Seems arbitrary to add a one-item Dequeue here. |
@@ -28,7 +28,10 @@ export default {
const messageBus = window.MessageBus;
app.register("message-bus:main", messageBus, { instantiate: false });
- ALL_TARGETS.forEach(t => app.inject(t, "messageBus", "message-bus:main"));
+
+ ALL_TARGETS.concat("service").forEach(t =>
+ app.inject(t, "messageBus", "message-bus:main")
+ );
const currentUser = User.current();
app.register("current-user:main", currentUser, { instantiate: false });
| [No CFG could be retrieved] | requires the app to be installed Injects the given object into the given object. | Is there a reason we can't add `service` to `ALL_TARGETS`? |
@@ -48,8 +48,10 @@ public class TerritoryEffectAttachment extends DefaultAttachment {
setCombatEffect(combatDefenseEffect, true);
}
- private void setCombatDefenseEffect(final IntegerMap<UnitType> value) {
+ @VisibleForTesting
+ public TerritoryEffectAttachment setCombatDefenseEffect(final IntegerMap<UnitType> value) {
combatDefenseEffect = value;
+ return this;
}
private IntegerMap<UnitType> getCombatDefenseEffect() {
| [TerritoryEffectAttachment->[setCombatDefenseEffect->[setCombatEffect],setCombatOffenseEffect->[setCombatEffect],getPropertyMap->[build],setCombatEffect->[hasNext,thisErrorMsg,GameParseException,splitOnColon,getInt,getUnitType,iterator,put,next],setNoBlitz->[thisErrorMsg,GameParseException,splitOnColon,getUnitType,add],get->[getAttachment,get],getCombatEffect->[getInt],setUnitsNotAllowed->[thisErrorMsg,GameParseException,splitOnColon,getUnitType,add],setMovementCostModifier->[hasNext,getBigDecimal,thisErrorMsg,GameParseException,splitOnColon,getUnitType,iterator,put,next]]] | Sets the combat defense effect. | It does not look like this is yet called from tests, did you mean to commit changes to this file as part of this PR? |
@@ -112,6 +112,12 @@ void UnitSAO::sendOutdatedData()
m_messages_out.emplace(getId(), true, generateUpdateBonePositionCommand(
bone_pos.first, bone_pos.second.X, bone_pos.second.Y));
}
+ for (const auto &bone_pos : m_bone_position_unset) {
+ if(!m_bone_position_unset[bone_pos.first]) {
+ m_messages_out.emplace(getId(), true, generateUpdateBonePositionUnsetCommand(bone_pos.first));
+ m_bone_position_unset[bone_pos.first] = true;
+ }
+ }
}
if (!m_attachment_sent) {
| [clearParentAttachment->[setAttachment],clearChildAttachments->[setAttachment],sendPunchCommand->[generatePunchCommand]] | This method is called when the data is sent to the UnitSAO. It is called. | I don't see why you have to store a boolean for this. You could just use a list, add the bone name when it is to be removed (in `unsetBonePosition`) and clear the list (here) after generating all commands. |
@@ -353,7 +353,7 @@ type UpdateStep struct {
reg RegisterResourceEvent // the registration intent to convey a URN back to.
old *resource.State // the state of the existing resource.
new *resource.State // the newly computed state of the resource after updating.
- stables []resource.PropertyKey // an optional list of properties that won't change during this update.
+ stables []string // an optional list of properties that won't change during this update.
diffs []resource.PropertyKey // the keys causing a diff.
detailedDiff map[string]plugin.PropertyDiff // the structured diff.
ignoreChanges []string // a list of property paths to ignore when updating.
| [Apply->[Plan,Type,New,URN],Prefix->[Color],Plan,Type,Provider,URN] | Type returns the current token type of the remove - pending - replace step. Check if a new object is not empty. | why did it switch to string? |
@@ -1927,7 +1927,10 @@ class ExtraFields
// Get extra fields
foreach ($extralabels as $key => $value)
{
- $key_type = $this->attributes[$object->table_element]['type'][$key];
+ $key_type=$this->attribute_type[$key];
+ if (! empty($object->table_element)) {
+ $key_type=$this->attributes[$extrafieldsobjectkey]['type'][$key];
+ }
if (in_array($key_type,array('date','datetime')))
{
| [ExtraFields->[create->[lasterror,query,DDLAddField,lasterrno],fetch_name_optionals_label->[lasterror,fetch_object,query,num_rows],addExtraField->[create,create_label],update_label->[query,rollback,begin,escape,commit,idate],showSeparator->[trans],showOutputField->[fetch,query,getNomUrl,trans,fetch_object,lasterror,escape],update->[lasterror,query,update_label,DDLUpdateField],setOptionalsFromPost->[trans,transnoentitiesnoconv,load],showInputField->[free,getCurrencySymbol,Create,query,trans,num_rows,multiselectarray,fetch_object,selectForForms,lasterror,select_date],create_label->[query,lasterror,escape,idate,lasterrno],delete_label->[query],delete->[query,DDLDropField,fetch_object,lasterror,delete_label]]] | Get all options from POST This function is used to get the key prefix of the array. | $extrafieldsobjectkey is not defined. You mean $object->table_element ? |
@@ -69,6 +69,10 @@ public class AnalysisReportDao implements Dao {
return tryToPop(session, reportId);
}
+ public long countPending(DbSession session) {
+ return mapper(session).selectAvailables(PENDING, WORKING).size();
+ }
+
@VisibleForTesting
AnalysisReportDto tryToPop(DbSession session, long reportId) {
AnalysisReportMapper mapper = mapper(session);
| [AnalysisReportDao->[tryToPop->[selectById],selectById->[selectById],selectByProjectKey->[selectByProjectKey],resetAllToPendingStatus->[resetAllToPendingStatus],truncate->[truncate],delete->[delete],insert->[insert],selectAll->[selectAll]]] | Pop an analysis report from the report list. | It's disturbing that method `countPending()` counts not only PENDING but also WORKING. |
@@ -61,11 +61,17 @@ public class StateTags {
StateTag<K, StateT> asKind(StateKind kind);
}
+ /** Create a state tag for the given id and spec. */
+ public static <K, StateT extends State> StateTag<K, StateT> tagForSpec(
+ String id, StateSpec<K, StateT> spec) {
+ return new SimpleStateTag<>(new StructuredId(id), spec);
+ }
+
/**
* Create a simple state tag for values of type {@code T}.
*/
public static <T> StateTag<Object, ValueState<T>> value(String id, Coder<T> valueCoder) {
- return new ValueStateTag<>(new StructuredId(id), valueCoder);
+ return new SimpleStateTag<>(new StructuredId(id), StateSpecs.value(valueCoder));
}
/**
| [StateTags->[KeyedCombiningValueWithContextStateTag->[asKind->[asKind],equals->[equals]],BagStateTag->[asKind->[asKind],equals->[equals]],ValueStateTag->[asKind->[asKind],equals->[equals]],StateTagBase->[toString->[toString],getId->[getRawId],appendTo->[appendTo]],StructuredId->[asKind->[StructuredId],toString->[toString],equals->[equals]],makeSystemTagInternal->[asKind],WatermarkStateTagInternal->[asKind->[asKind],equals->[equals]],KeyedCombiningValueStateTag->[asKind->[asKind],equals->[equals]],CombiningValueStateTag->[asKind->[asKind]]]] | Returns a new value state tag with the given id and value coder. | This should be capitolized the same as `tagForSpec`, otherwise the difference should be explained. |
@@ -265,9 +265,13 @@ func (t *TimestampOracle) GetRespTS(count uint32) (pdpb.Timestamp, error) {
return resp, errors.New("tso count should be positive")
}
+ failpoint.Inject("skipRetryGetTS", func() {
+ maxRetryCount = 1
+ })
+
for i := 0; i < maxRetryCount; i++ {
current := (*atomicObject)(atomic.LoadPointer(&t.ts))
- if current.physical == typeutil.ZeroTime {
+ if current == nil || current.physical == typeutil.ZeroTime {
log.Error("we haven't synced timestamp ok, wait and retry", zap.Int("retry-count", i))
time.Sleep(200 * time.Millisecond)
continue
| [saveTimestamp->[getTimestampPath],UpdateTimestamp->[saveTimestamp],SyncTimestamp->[saveTimestamp,loadTimestamp],ResetUserTimestamp->[saveTimestamp],loadTimestamp->[getTimestampPath]] | GetRespTS gets response timestamp. | can we add `maxRetryCount` to `TimestampOracle` to avoid using failpoint? |
@@ -65,7 +65,7 @@ type Address struct {
type Info struct {
ContainerRuntimeVersion string `json:"containerRuntimeVersion"`
KubeProxyVersion string `json:"kubeProxyVersion"`
- KubeletProxyVersion string `json:"kubeletVersion"`
+ KubeletVersion string `json:"kubeletVersion"`
OperatingSystem string `json:"operatingSystem"`
OSImage string `json:"osImage"`
}
| [IsUbuntu->[ToLower,IsLinux,Contains],HasSubstring->[ToLower,Contains],Printf,CombinedOutput,PrintCommand,MatchString,WithTimeout,Split,IsReady,Background,FindStringSubmatch,Unmarshal,Compile,String,Errorf,Sleep,Done,Command] | Metadata is a JSON object that represents a single node in a cluster. IsLinux checks if the node is on a Linux node. | Not sure what happened here, it doesn't make sense for this property to be named `KubeletProxyVersion`, not to mention it deviates from the k8s type def (and it's not being used in the E2E code anywhere). |
@@ -65,7 +65,7 @@ class PointOutputProcess(KratosMultiphysics.Process):
point_position = self.params["position"].GetVector()
if point_position.Size() != 3:
raise Exception('The position has to be provided with 3 coordinates!')
- point = KratosMultiphysics.Point(point_position[0],
+ self.point = KratosMultiphysics.Point(point_position[0],
point_position[1],
point_position[2])
| [GetFileHeader->[str,format,Name,IsArrayVariable],IsArrayVariable->[type],Interpolate->[GetSolutionStepValue,type,GetNodes,GetValue,nodes,zip],Factory->[Exception,PointOutputProcess,type],PointOutputProcess->[ExecuteFinalize->[close],ExecuteFinalizeSolutionStep->[write,IsArrayVariable,Interpolate,str,format,join,zip],ExecuteInitialize->[Size,size,Point,Exception,GetVariable,TimeBasedAsciiFileWriterUtility,Parameters,range,params,GetFileHeader,MaxAll,type,append,output_var_names,Name,len,GetCommunicator,__CheckVariableIsSolutionStepVariable,Rank,BruteForcePointLocator,Vector],__CheckVariableIsSolutionStepVariable->[type,Name,HasNodalSolutionStepVariable,GetSourceVariable,Exception],__init__->[params,ValidateAndAssignDefaults,__init__,Parameters]]] | Initialize the object. This method is called when a node or element is found. Writes a to the output file depending on the partition with the larger rank. | I think this can be initialized in the constructor. Up to you. |
@@ -348,8 +348,13 @@ public class ProTerritoryManager {
// Add max scramble units
if (maxCanScramble > 0 && !canScrambleAir.isEmpty()) {
if (maxCanScramble < canScrambleAir.size()) {
- canScrambleAir.sort(Comparator.comparingDouble(
- o -> ProBattleUtils.estimateStrength(to, Collections.singletonList(o), new ArrayList<>(), false)));
+ Collections.sort(canScrambleAir, (o1, o2) -> {
+ final double strength1 =
+ ProBattleUtils.estimateStrength(to, Collections.singletonList(o1), new ArrayList<>(), false);
+ final double strength2 =
+ ProBattleUtils.estimateStrength(to, Collections.singletonList(o2), new ArrayList<>(), false);
+ return Double.compare(strength2, strength1);
+ });
canScrambleAir = canScrambleAir.subList(0, maxCanScramble);
}
moveMap.get(to).getMaxScrambleUnits().addAll(canScrambleAir);
| [ProTerritoryManager->[getMaxScrambleCount->[getMaxScrambleCount],findAirMoveOptions->[findNavalMoveOptions],findAlliedAttackOptions->[findAttackOptions],removePotentialTerritoriesThatCantBeConquered->[removeTerritoriesThatCantBeConquered],removeTerritoriesThatCantBeConquered->[removeTerritoriesThatCantBeConquered],findEnemyAttackOptions->[findAttackOptions],findEnemyDefendOptions->[findDefendOptions]]] | Find potential territories to scramble from and to sea. Find potential max scramble units that can be scrambled to each territory. | I'm curious why this couldn't be solved by adding a reversed call at the end. |
@@ -883,7 +883,8 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue;
ctrl.$render();
- ctrl.$$runValidators(modelValue, viewValue, noop);
+ // It is possible that model and view value have been updated during render
+ ctrl.$$runValidators(ctrl.$modelValue, ctrl.$viewValue, noop);
}
}
| [No CFG could be retrieved] | 7. binding a model into a scope and changes the scope value to a new value if - Setting related css classes on the control and registering it with form. | So this is not a breaking change because if $render didn't change the value then it will be the same as before, right? I think it is only the range input that is likely to do this... |
@@ -282,6 +282,7 @@ Rails.application.routes.draw do
# We cannot use 'resources :assets' because assets is a reserved route
# in Rails (assets pipeline) and causes funky behavior
get "files/:id/present", to: "assets#file_present", as: "file_present_asset"
+ get "files/:id/large_url", to: "assets#large_image_url", as: "large_image_url_asset"
get "files/:id/download", to: "assets#download", as: "download_asset"
get "files/:id/preview", to: "assets#preview", as: "preview_asset"
post 'asset_signature' => 'assets#signature'
| [draw,collection,resources,member,root,new,get,post,devise_scope,patch,devise_for,match,put,delete] | This is a list of routes that can be routed to the protocol. | Prefer single-quoted strings when you don't need string interpolation or special symbols.<br>Line is too long. [86/80] |
@@ -90,12 +90,6 @@ public class RestStoreTest extends BaseStoreTest {
localCacheManager.getCache().getAdvancedCache().getEvictionManager().processEviction();
}
- /*
- * Unfortunately we need to mark each test individual as unstable because the super class belong to a valid test
- * group. I think that it appends the unstable group to the super class group making it running the tests anyway.
- */
-
- @Test(groups = "unstable")
@Override
public void testReplaceExpiredEntry() throws Exception {
InternalCacheEntry ice = TestInternalCacheEntryFactory.create("k1", "v1", 100);
| [RestStoreTest->[testLoadAndStoreImmortal->[testLoadAndStoreImmortal],testLoadAndStoreWithLifespan->[testLoadAndStoreWithLifespan],testStoreAndRemove->[testStoreAndRemove],testLoadAndStoreWithLifespanAndIdle->[testLoadAndStoreWithLifespanAndIdle],testLoadAndStoreMarshalledValues->[testLoadAndStoreMarshalledValues],testPreload->[testPreload],testLoadAll->[testLoadAll],testPurgeExpired->[testPurgeExpired],testStopStartDoesNotNukeValues->[testStopStartDoesNotNukeValues],testLoadAndStoreWithIdle->[testLoadAndStoreWithIdle]]] | This method is called when a key is expired. It will replace the entry with a new. | you can remove this tests from this class |
@@ -135,7 +135,7 @@ public class TracingExecutionInterceptor implements ExecutionInterceptor {
if (span != null) {
// This scope will be closed by AwsHttpClientInstrumentation since ExecutionInterceptor API
// doesn't provide a way to run code in the same thread after transmission has been scheduled.
- ScopeHolder.CURRENT.set(currentContextWith(span));
+ ScopeHolder.CURRENT.set(ClientDecorator.currentContextWith(span));
}
}
| [TracingExecutionInterceptor->[afterTransmission->[afterTransmission],modifyException->[modifyException],modifyHttpResponseContent->[modifyHttpResponseContent],beforeMarshalling->[beforeMarshalling],afterUnmarshalling->[afterUnmarshalling],onExecutionFailure->[onExecutionFailure],modifyHttpRequest->[modifyHttpRequest],modifyHttpContent->[modifyHttpContent],beforeExecution->[beforeExecution],modifyAsyncHttpContent->[modifyAsyncHttpContent],beforeTransmission->[beforeTransmission],beforeUnmarshalling->[beforeUnmarshalling],overrideConfiguration->[overrideConfiguration],modifyHttpResponse->[modifyHttpResponse],modifyAsyncHttpResponseContent->[modifyAsyncHttpResponseContent],modifyResponse->[modifyResponse],modifyRequest->[modifyRequest],afterMarshalling->[afterMarshalling],afterExecution->[afterExecution],TracingExecutionInterceptor]] | Override this to add a scope for before and after a message has been transmitted. | Do we still need this ScopeHolder? Why getting span from current context is not enough? |
@@ -91,12 +91,11 @@ public class RestProtocol extends AbstractProxyProtocol {
protected <T> Runnable doExport(T impl, Class<T> type, URL url) throws RpcException {
String addr = getAddr(url);
Class implClass = ApplicationModel.getProviderModel(url.getServiceKey()).getServiceInstance().getClass();
- RestServer server = servers.get(addr);
- if (server == null) {
- server = serverFactory.createServer(url.getParameter(Constants.SERVER_KEY, DEFAULT_SERVER));
- server.start(url);
- servers.put(addr, server);
- }
+ RestServer server = servers.computeIfAbsent(addr, addr0 -> {
+ RestServer s = serverFactory.createServer(url.getParameter(Constants.SERVER_KEY, DEFAULT_SERVER));
+ s.start(url);
+ return s;
+ });
String contextPath = getContextPath(url);
if ("servlet".equalsIgnoreCase(url.getParameter(Constants.SERVER_KEY, DEFAULT_SERVER))) {
| [RestProtocol->[getErrorCode->[getErrorCode],setHttpBinder->[setHttpBinder],destroy->[destroy]]] | This method is called when the export method is called. It creates a new server and dep. | It is recommended to change `addr0` to `restServer` |
@@ -0,0 +1,5 @@
+<?php
+/**
+ * Deprecated since 7.5
+ */
+_deprecated_file( basename( __FILE__ ), 'jetpack-7.5' );
| [No CFG could be retrieved] | No Summary Found. | I wonder why we need that one; we already have it in the compat package? Or was this meant to live in the root of Jetpack (which it does already) |
@@ -132,7 +132,7 @@ public class ShellInterpreter extends KerberosInterpreter {
String message = outStream.toString();
if (exitValue == 143) {
code = Code.INCOMPLETE;
- message += "Paragraph received a SIGTERM\n";
+ message += "Timeout of " + getProperty(TIMEOUT_PROPERTY) + " ms to run reached.\n";
LOGGER.info("The paragraph " + contextInterpreter.getParagraphId()
+ " stopped executing: " + message);
}
| [ShellInterpreter->[internalInterpret->[getMessage,ByteArrayOutputStream,setStreamHandler,join,toString,info,remove,put,getProperty,ExecuteWatchdog,File,setWatchdog,valueOf,DefaultExecutor,debug,error,parse,setWorkingDirectory,PumpStreamHandler,InterpreterResult,execute,addArgument,split,getParagraphId,getExitValue],runKerberosLogin->[error,createSecureConfiguration],getScheduler->[hashCode,createOrGetParallelScheduler,getName],createSecureConfiguration->[addArgument,getProperties,DefaultExecutor,error,getProperty,InterpreterException,parse,format,execute],isKerboseEnabled->[isAnyEmpty,equalsIgnoreCase,getProperty],close->[error,destroyProcess,close,remove,keySet],cancel->[remove,error,getParagraphId,destroyProcess],open->[info,open,getProperty],isInterpolate->[parseBoolean,getProperty],getLogger,startsWith]] | Interprets the given command and returns the result. | hmm, I'm not sure these are the same? SIGTERM is not a timeout? |
@@ -952,7 +952,7 @@ class Worker
}
/**
- * @brief Removes a workerqueue entry from the current process
+ * Removes a workerqueue entry from the current process
* @return void
* @throws \Exception
*/
| [Worker->[processQueue->[isMinMemoryReached,isMaxProcessesReached,release,isMaxLoadReached,acquire],execFunction->[reset,saveLog],spawnWorker->[getBasePath,run],workerProcess->[release,acquire],add->[isBackend,release,acquire],execute->[isMaxProcessesReached]]] | Unregisters a process from the worker queue. | Plz add a blank line between tags and summary for better readability |
@@ -49,6 +49,9 @@ const IframePosition = {
/** @const @type {!Array<string>} */
const SUPPORTED_CACHES = ['cdn.ampproject.org', 'www.bing-amp.com'];
+/** @const @type {!Array<string>} */
+const SANDBOX_WHITELIST = ['allow-top-navigation'];
+
/**
* @enum {number}
*/
| [No CFG could be retrieved] | This module imports a single non - standard AMP header and adds a link to the A A vanilla JavaScript class that exports an array of IFRAME_IDX objects for the A. | You should not use the word `WHITELIST` in this code-base. The right term is allow-list (it is a bit ambigious because the elements literally start with `allow-`). However, this doesn't appear to be an allow-list in the classic sense. More of a minimum list. |
@@ -113,6 +113,10 @@ class ClassMapGenerator
private static function findClasses($path)
{
$traits = version_compare(PHP_VERSION, '5.4', '<') ? '' : '|trait';
+ $enums = '';
+ if (defined('HPHP_VERSION') && version_compare(HPHP_VERSION, '3.3', '>=')) {
+ $enums = '|enum';
+ }
try {
$contents = @php_strip_whitespace($path);
| [ClassMapGenerator->[createMap->[in,getRealPath,writeError],findClasses->[getMessage]]] | Finds classes in a file. \ brief Find all classes that can be found in a sequence of tokens. | instead of 2 variables for traints and enums, I would use a single variables (`$extraTypes` or something like that) |
@@ -148,8 +148,7 @@ public class SearchManagerImpl implements SearchManagerImplementor {
@Override
public <T> T unwrap(Class<T> cls) {
- if (SearchIntegrator.class.isAssignableFrom(cls) || ExtendedSearchIntegrator.class.isAssignableFrom(cls)
- || SearchFactoryState.class.isAssignableFrom(cls)) {
+ if (SearchIntegrator.class.isAssignableFrom(cls)) {
return (T) this.searchFactory;
}
if (SearchManagerImplementor.class.isAssignableFrom(cls)) {
| [SearchManagerImpl->[getAnalyzer->[getAnalyzer],registerKeyTransformer->[registerKeyTransformer],getStatistics->[getStatistics]]] | Unwraps a SearchManagerImpl into a new instance of the specified class. | Could we keep this around? I don't see why we should prevent that: there will always be need for quick experiments which can't need to wait for us to expose proper APIs for everything. |
@@ -516,6 +516,7 @@ class ValveFloodStackManagerBase(ValveFloodManager):
priority_offset=self.classification_offset))
+ flood_acts = []
if self.externals:
# If external flag is set, flood to external ports, otherwise exclude them.
for ext_port_flag, exclude_all_external in (
| [ValveFloodStackManagerBase->[_build_flood_rule_actions->[_flood_actions,_build_flood_local_rule_actions],update_stack_topo->[_stack_topo_up_dp,_reset_peer_distances,_stack_topo_down_dp,_stack_topo_down_port,_stack_topo_up_port],_build_mask_flood_rules->[_build_flood_acts_for_port,_build_flood_rule_for_port,_canonical_stack_up_ports]],ValveFloodManager->[_build_flood_acts_for_port->[_build_flood_rule_actions,_output_non_output_actions],_build_flood_rule_for_port->[_build_flood_rule,_build_flood_match_priority],build_flood_rules->[_build_group_flood_rules,_build_multiout_flood_rules],_build_group_flood_rules->[_vlan_flood_priority,_build_flood_rule_for_vlan,_output_non_output_actions],_vlan_flood_priority->[_mask_flood_priority],_build_flood_match_priority->[_vlan_flood_priority],_build_flood_rule_actions->[_build_flood_local_rule_actions],_build_flood_rule_for_vlan->[_vlan_flood_priority,_build_flood_rule_actions,_build_flood_rule],_build_mask_flood_rules->[_build_flood_acts_for_port,_vlan_all_ports,_output_non_output_actions,_build_flood_match_priority,_build_flood_rule_for_port,_build_flood_rule_for_vlan],_build_multiout_flood_rules->[_build_mask_flood_rules]]] | Build a mask of rules that cause flooding from the given stack ports. Filter out all packets that are not part of the network. This method builds the list of all of the messages that are not part of the network. | E303 too many blank lines (2) |
@@ -346,7 +346,7 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q
private DiskOfferingJoinDao _diskOfferingJoinDao;
@Inject
- private DiskOfferingDetailsDao diskOfferingDetailsDao;
+ private DiskOfferingDetailsDao _diskOfferingDetailsDao;
@Inject
private ServiceOfferingJoinDao _srvOfferingJoinDao;
| [QueryManagerImpl->[searchForIsosInternal->[searchForTemplatesInternal],buildAffinityGroupSearchCriteria->[buildAffinityGroupViewSearchCriteria,buildAffinityGroupViewSearchBuilder],searchForTemplatesInternal->[searchForTemplatesInternal],searchForServiceOfferingsInternal->[filterOfferingsOnCurrentTags]]] | @Injects all of the required components of a sequence of unique identifiers. Injects the required dependencies into the DAO. | why add the '_'? we are trying to get away from that convention. |
@@ -774,7 +774,11 @@ export class PinchRecognizer extends GestureRecognizer {
/** @override */
onTouchEnd(e) {
- this.end_(e);
+ // Number of current touches on the page
+ const {touches} = e;
+ if (touches.length <= 1) {
+ this.end_(e);
+ }
}
/** @override */
| [No CFG could be retrieved] | Checks if the touch event should be handled by the touchpad. The main event handler for the event loop. | Seems like other places check if touches is `null`/`undefined`, but not here. Probably want to check for safety. |
@@ -411,6 +411,9 @@ class ConfigReader:
for launcher_entry in model['launchers']:
merge_dlsdk_launcher_args(arguments, launcher_entry, update_launcher_entry)
model['launchers'] = provide_models(model['launchers'])
+ for dataset_entry in model['datasets']:
+ if 'subsample_size' in arguments:
+ dataset_entry['subsample_size'] = arguments.subsample_size
def merge_pipelines(config, arguments, update_launcher_entry):
for pipeline in config['pipelines']:
| [filter_pipelines->[filtered],ConfigReader->[_prepare_global_configs->[merge],_merge_paths_with_prefixes->[process_models->[process_config],process_modules->[process_config],process_pipelines->[process_config]],check_local_config->[_check_pipelines_config->[_is_requirements_missed,_count_entry],_check_models_config->[_is_requirements_missed],_check_module_config->[_is_requirements_missed]],convert_paths->[_prepare_global_configs,_merge_configs,_merge_paths_with_prefixes,convert_dataset_paths,convert_launcher_paths],_provide_cmd_arguments->[merge_models->[provide_models]]],filter_models->[filtered],process_config->[process_launchers->[create_command_line_mapping],process_dataset->[create_command_line_mapping],process_launchers,process_dataset],filter_modules->[filtered],merge_dlsdk_launcher_args->[_convert_models_args->[merge_converted_model_path],_convert_models_args,_async_evaluation_args,_fpga_specific_args]] | Merge command line arguments into a single node. Merge functions based on the arguments passed to the function. | please make sure that it also works for pipelined models |
@@ -298,6 +298,17 @@ public class JoinNode extends PlanNode {
throw new RuntimeException("Expected to find a Table, found a stream instead.");
}
+ if (schemaKStream.getKeyField() != null
+ && !SchemaUtil.matchFieldName(schemaKStream.getKeyField(), keyFieldName)) {
+ throw new KsqlException(
+ String.format(
+ "Source table key column (%s) is not the column used in the join criteria (%s).",
+ schemaKStream.getKeyField().name(),
+ keyFieldName
+ )
+ );
+ }
+
return (SchemaKTable) schemaKStream;
}
| [JoinNode->[StreamToTableJoiner->[join->[getRight,getSerDeForNode,getLeftKeyFieldName,getJoinKey,join,buildStream,buildTable,getLeft]],TableToTableJoiner->[join->[getRight,getJoinKey,join,buildTable,getLeft]],ensureMatchingPartitionCounts->[getPartitions],StreamToStreamJoiner->[join->[getRight,getSerDeForNode,getLeftKeyFieldName,getJoinKey,join,buildStream,getRightKeyFieldName,getLeft]],getPartitions->[getPartitions],Joiner->[buildTable->[buildStream],getSerDeForNode->[getSchema],maybeRePartitionByKey->[getSchema],buildStream->[buildStream]]]] | Build a table from a node. | Can we also include the table alias in the message. It would make it less ambiguous if we have columns with the same name in both sides of the join. |
@@ -164,7 +164,7 @@ namespace System.Net.Http
}
else
{
- originalStream = _originalContent.ReadAsStream();
+ originalStream = _originalContent.ReadAsStream(cancellationToken);
}
return GetDecompressedStream(originalStream);
}
| [No CFG could be retrieved] | This method is used to serialize the content of the object into the stream. GZipDecompressedContent - A class to store a single in the decompression. | Forgot to add this other diagnostic the analyzer found. @ManickaP, please let me know if it's ok to pass a token in this case. It's very similar to the other case you helped confirm, and was introduced in the same PR. |
@@ -298,11 +298,13 @@ func fuzzInternalObject(t *testing.T, forVersion unversioned.GroupVersion, item
},
func(j *build.DockerBuildStrategy, c fuzz.Continue) {
c.FuzzNoCustom(j)
- j.From.Kind = "ImageStreamTag"
- j.From.Name = "image:tag"
- j.From.APIVersion = ""
- j.From.ResourceVersion = ""
- j.From.FieldPath = ""
+ if j.From != nil {
+ j.From.Kind = "ImageStreamTag"
+ j.From.Name = "image:tag"
+ j.From.APIVersion = ""
+ j.From.ResourceVersion = ""
+ j.From.FieldPath = ""
+ }
},
func(j *build.BuildOutput, c fuzz.Continue) {
c.FuzzNoCustom(j)
| [DeepCopy,DeepEqual,FuzzerFor,Dump,FromInt,RandString,Encode,HasPrefix,RandUint64,Has,IsNotRegisteredError,ValidateUserName,UID,Fuzz,WithKind,New,ValidateNamespaceName,Funcs,Errorf,NewString,ExternalGroupVersions,Logf,ObjectReflectDiff,CodecForVersions,TypeAccessor,SetKind,ValidateGroupName,Contains,JoinImageStreamTag,Name,TypeOf,PkgPath,Int63,KnownTypes,Date,Convert,Log,Fatalf,DecodeInto,SetAPIVersion,NewSource,ContainsAny,Sprintf,ValidateServiceAccountName,Decode,RandBool,Elem,LegacyCodec,Replace,Intn,Interface,FuzzNoCustom,Fatal,NewSerializer,FromString] | Fuzzer fuzzer for the build. BuildSpec. MissingRequired is a fuzzer for the missing - required fields. | hrm. shouldn't this always have APIVersion set? |
@@ -121,7 +121,10 @@ class WPCOM_REST_API_V2_Endpoint_Service_API_Keys extends WP_REST_Controller {
switch ( $service ) {
case 'mapbox':
- $mapbox = self::get_service_api_key_mapbox();
+ if ( ! class_exists( 'Jetpack_Mapbox_Helper' ) ) {
+ jetpack_require_lib( 'class-jetpack-mapbox-helper' );
+ }
+ $mapbox = Jetpack_Mapbox_Helper::get_access_token();
$service_api_key = $mapbox['key'];
$service_api_key_source = $mapbox['source'];
break;
| [WPCOM_REST_API_V2_Endpoint_Service_API_Keys->[get_public_item_schema->[add_additional_fields_schema],update_service_api_key->[get_body_params,get_json_params]]] | Get the API key for a given service. | This may end up being a bit confusing, because in some cases this may return an empty string fr the access token, but the API endpoint still returns a `API key retrieved successfully.` response. |
@@ -43,6 +43,9 @@ func (es *Client) ExpectMinDocs(t testing.TB, min int, index string, query inter
var result SearchResult
opts = append(opts, WithCondition(result.Hits.MinHitsCondition(min)))
req := es.Search(index)
+ if min > 10 {
+ req = req.WithSize(min)
+ }
if query != nil {
req = req.WithQuery(query)
}
| [UnmarshalJSON->[Unmarshal],ExpectMinDocs->[Do,Background,WithQuery,Fatal,MinHitsCondition,Search,Helper],Do->[Do],UnmarshalSource->[Unmarshal],NonEmptyCondition->[MinHitsCondition],WithQuery->[NewJSONReader],ExpectDocs->[ExpectMinDocs,Helper]] | ExpectMinDocs expects min documents. | I don't follow this change, where do the `10` requests come from? |
@@ -77,9 +77,9 @@ class FormatOptions
*
* @return FormatOptions
*/
- public function setCropY($cropY)
+ public function setCropY($cropY): self
{
- $this->cropY = $cropY;
+ $this->cropY = (int) $cropY;
return $this;
}
| [No CFG could be retrieved] | set cropY - set cropY. | same as above we can from bc not add new typehints. |
@@ -221,9 +221,15 @@ public class ChronicleLogTailer<M extends Externalizable> implements LogTailer<M
return closed;
}
+ @Override
+ public Codec<M> getCodec() {
+ return codec;
+ }
+
@Override
public String toString() {
- return "ChronicleLogTailer{" + "basePath='" + basePath + '\'' + ", id=" + id + ", closed=" + closed + '}';
+ return "ChronicleLogTailer{" + "basePath='" + basePath + '\'' + ", id=" + id + ", closed=" + closed + ", codec="
+ + codec + '}';
}
}
| [ChronicleLogTailer->[toEnd->[toEnd],toLastCommitted->[toStart],commit->[commit],reset->[reset,commit,toStart],toStart->[toStart],close->[close,unregisterTailer],read->[read]]] | Returns a string representation of this object. | Add codec to toString()? |
@@ -342,6 +342,10 @@ class Llvm(CMakePackage, CudaPackage):
patch('no_cyclades.patch', when='@10:12.0.0')
patch('no_cyclades9.patch', when='@6:9')
+ # Add LLVM_VERSION_SUFFIX
+ # https://reviews.llvm.org/D115818
+ patch('llvm-version-suffix-macro.patch', when='@:13.0.0')
+
# The functions and attributes below implement external package
# detection for LLVM. See:
#
| [get_llvm_targets_to_build->[add,list,set],Llvm->[validate_detected_spec->[format],filter_detected_exes->[append,any],determine_version->[group,search,debug,Executable,compile,compiler],fc->[join,extra_attributes],codesign_check->[join_path,satisfies,Executable,copy,codesign,RuntimeError,mkdir,which,setup],f77->[join,extra_attributes],setup_run_environment->[join_path,set],setup_build_environment->[prepend_path,symlink,dirname,format,join,exists,mkdirp],post_install->[join_path,append,working_dir,cmake,ninja,install_tree,extend,str,get_cmake_prefix_path,define,cmake_args],flag_handler->[append,satisfies],cmake_args->[split,satisfies,append,Version,get_llvm_targets_to_build,Executable,extend,startswith,ancestor,format,join,splitlines,compiler,from_variant,define],determine_variants->[append,join],cxx->[join,extra_attributes],cc->[join,extra_attributes],depends_on,extends,conflicts,patch,run_before,version,provides,variant,run_after]] | Patches a variable number with a constant expression and a constant double. This class is a class decorator to determine which executable is a . | change to `@6:`, punt putting end limit until after patch is merged and released |
@@ -153,12 +153,17 @@ public class KsqlRestConfig extends RestConfig {
KSQL_CONFIG_PREFIX + "lag.reporting.enable";
private static final String KSQL_LAG_REPORTING_ENABLE_DOC =
"Whether lag reporting is enabled or not. It is disabled by default.";
-
public static final String KSQL_LAG_REPORTING_SEND_INTERVAL_MS_CONFIG =
KSQL_CONFIG_PREFIX + "lag.reporting.send.interval.ms";
private static final String KSQL_LAG_REPORTING_SEND_INTERVAL_MS_DOC =
"Interval at which lag reports are broadcasted to servers.";
+ public static final String KSQL_QUERY_STANDBY_ENABLE_CONFIG =
+ KSQL_CONFIG_PREFIX + "query.standby.enable";
+ private static final String KSQL_QUERY_STANDBY_ENABLE_DOC =
+ "Whether the queries are forwarded to standby hosts when the active is down."
+ + " It is disabled by default.";
+
private static final ConfigDef CONFIG_DEF;
static {
| [KsqlRestConfig->[getKsqlConfigProperties->[getOriginals],getPropertiesWithOverrides->[getOriginals],getCommandConsumerProperties->[getPropertiesWithOverrides],getInterNodeListener->[getInterNodeListener],getCommandProducerProperties->[getPropertiesWithOverrides]]] | Creates a configuration object that defines the heartbeats. - - - - - - - - - - - - - - - - - -. | this could be set per request? is that why we have this here in addition to KsqlConfig? |
@@ -151,8 +151,9 @@ class GradeEntryFormsController < ApplicationController
page: @current_page)
@students_total = all_students.size
@alpha_pagination_options = @grade_entry_form.alpha_paginate(all_students,
- @per_page,
- @students.total_pages)
+ @per_page,
+ @students.total_pages,
+ @sort_by)
session[:alpha_pagination_options] = @alpha_pagination_options
@alpha_category = @alpha_pagination_options.first
end
| [GradeEntryFormsController->[new->[new],create->[new]]] | GET - grades This method paginate the list of all students and categories for the given . | Align the parameters of a method call if they span more than one line. |
@@ -140,11 +140,14 @@ def handle_action_transfer_direct(
block_number,
):
receiver_address = state_change.receiver_address
- channel_state = token_network_state.partneraddresses_to_channels.get(receiver_address)
+ channel_states = views.filter_channels_by_status(
+ token_network_state.partneraddresses_to_channels[receiver_address],
+ [CHANNEL_STATE_UNUSABLE],
+ )
- if channel_state:
+ if channel_states:
iteration = channel.state_transition(
- channel_state,
+ channel_states[-1],
state_change,
pseudo_random_generator,
block_number,
| [handle_channel_close->[subdispatch_to_channel_by_id],handle_settled->[subdispatch_to_channel_by_id],state_transition->[handle_channel_close,handle_settled,handle_closed,handle_newroute,handle_action_transfer_direct,handle_receive_transfer_direct,handle_balance,handle_channelnew],handle_closed->[subdispatch_to_channel_by_id],handle_balance->[subdispatch_to_channel_by_id]] | Handles a direct transfer of a token from another partner channel to another partner channel. | if its expected that there will be only one valid state, please add an assert |
@@ -6152,7 +6152,16 @@ namespace Js
{
Assert(scriptContext->GetConfig()->IsES6GeneratorsEnabled());
DynamicType* generatorType = CreateGeneratorType(prototype);
- return RecyclerNew(this->GetRecycler(), JavascriptGenerator, generatorType, args, scriptFunction);
+#if GLOBAL_ENABLE_WRITE_BARRIER
+ if (CONFIG_FLAG(ForceSoftwareWriteBarrier))
+ {
+ return RecyclerNewFinalized(this->GetRecycler(), JavascriptGenerator, generatorType, args, scriptFunction);
+ }
+ else
+#endif
+ {
+ return RecyclerNew(this->GetRecycler(), JavascriptGenerator, generatorType, args, scriptFunction);
+ }
}
JavascriptError* JavascriptLibrary::CreateError()
| [No CFG could be retrieved] | Create a new object of the given type. Get a new array of the specified length using the Javascript library. | Consider moving this into a function JavascriptGenerator::New (and make constructor private) so that the logic at the same place. |
@@ -63,6 +63,9 @@ public class SpillableMapBasedFileSystemView extends HoodieTableFileSystemView {
this.maxMemoryForReplaceFileGroups = config.getMaxMemoryForReplacedFileGroups();
this.maxMemoryForClusteringFileGroups = config.getMaxMemoryForPendingClusteringFileGroups();
this.baseStoreDir = config.getSpillableDir();
+ HoodieCommonConfig commonConfig = HoodieCommonConfig.newBuilder().fromProperties(config.getProps()).build();
+ diskMapType = commonConfig.getSpillableDiskMapType();
+ isBitCaskDiskMapCompressionEnabled = commonConfig.isBitCaskDiskMapCompressionEnabled();
init(metaClient, visibleActiveTimeline);
}
| [SpillableMapBasedFileSystemView->[createFileIdToPendingCompactionMap->[RuntimeException,putAll,mkdirs,info,DefaultSizeEstimator],fetchPendingCompactionOperations->[valueStream],fetchBootstrapBaseFiles->[valueStream],createFileIdToPendingClusteringMap->[RuntimeException,putAll,mkdirs,info,DefaultSizeEstimator],createFileIdToReplaceInstantMap->[RuntimeException,putAll,mkdirs,info,DefaultSizeEstimator],createFileIdToBootstrapBaseFileMap->[RuntimeException,putAll,mkdirs,info,DefaultSizeEstimator],fetchAllStoredFileGroups->[flatMap,stream],removeReplacedFileIdsAtInstants->[forEach,remove,map],getAllFileGroups->[flatMap,stream],createPartitionToFileGroups->[info,mkdirs,DefaultSizeEstimator,RuntimeException],getMaxMemoryForFileGroupMap,getMaxMemoryForReplacedFileGroups,init,getLogger,isIncrementalTimelineSyncEnabled,getMaxMemoryForPendingCompaction,getSpillableDir,addFilesToView,getMaxMemoryForPendingClusteringFileGroups,getMaxMemoryForBootstrapBaseFile]] | This class is used to create a partition to file map based on the max number of bytes Creates a map of compaction operations for all files in the Hoodie group. | Do you think we should pass this config from the caller itself. Basically whereever we create/instantiate FileSystemViewStorageConfig, should also create/instantiate HoodieCommonConfig and pass it along. |
@@ -2129,10 +2129,12 @@ class Spec(object):
${OPTIONS} Options
${ARCHITECTURE} Architecture
${SHA1} Dependencies 8-char sha1 prefix
+ ${HASH:len} DAG hash with optional length specifier
${SPACK_ROOT} The spack root directory
${SPACK_INSTALL} The default spack install directory,
${SPACK_PREFIX}/opt
+ ${PREFIX} The package prefix
Optionally you can provide a width, e.g. ``$20_`` for a 20-wide name.
Like printf, you can provide '-' for left justification, e.g.
| [colorize_spec->[insert_color],VariantMap->[copy->[copy,VariantMap]],DependencySpec->[copy->[copy,DependencySpec]],SpecParser->[spec->[VariantMap,spec,_add_variant,DependencyMap,_add_version,_set_compiler,FlagMap,_add_flag,spec_by_hash],version_list->[version],compiler->[version_list,_add_version],do_parse->[traverse,_set_platform],spec_by_hash->[dag_hash]],parse_anonymous_spec->[copy,Spec],VariantSpec->[copy->[VariantSpec]],parse->[SpecParser],AmbiguousHashError->[__init__->[format]],FlagMap->[copy->[FlagMap]],Spec->[_find_deps->[_deptype_norm],dependents_dict->[_find_deps_dict],dep_difference->[traverse],from_node_dict->[VariantSpec,Spec,from_dict,valid_compiler_flags],_find_deps_dict->[_deptype_norm],dependencies_dict->[_find_deps_dict],_evaluate_dependency_conditions->[Spec,constrain,satisfies],satisfies_dependencies->[_autospec,traverse,satisfies,common_dependencies],constrain->[_autospec,constrain],_merge_dependency->[copy,DependencySpec,_find_provider,_replace_with,_add_dependency],_normalize_helper->[_evaluate_dependency_conditions,_merge_dependency],dep_string->[sorted_deps,format],eq_node->[_cmp_node],_add_dependency->[DependencySpec],common_dependencies->[traverse],__contains__->[_autospec,traverse,satisfies],normalized->[copy,normalize],copy->[_dup],traverse_with_deptype->[traverse_with_deptype,dependents_dict,DependencySpec,dependencies_dict,validate,return_val],_dup->[DependencyMap,copy,flat_dependencies,_add_dependency],_find_provider->[satisfies],virtual_dependencies->[traverse],_replace_with->[_add_dependency],_cmp_key->[_cmp_node],_constrain_dependencies->[_autospec,copy,get_dependency,_add_dependency],_replace_node->[_add_dependency],ne_node->[_cmp_node],ne_dag->[eq_dag],__str__->[dep_string,format],_expand_virtual_packages->[copy,traverse,DependencyMap,_replace_with,feq],validate_names->[traverse],sorted_deps->[flat_dependencies],flat_dependencies_with_deptype->[DependencyMap,copy,traverse_with_deptype,DependencySpec],eq_dag->[_eq_dag],format->[write->[write],write,dag_hash],colorized->[colorize_spec],_add_variant->[VariantSpec],tree->[prefix,traverse,format],__init__->[Spec],constrained->[copy,constrain],__getitem__->[traverse,is_virtual],satisfies->[_autospec,satisfies],_autospec->[Spec],normalize->[_normalize_helper,_mark_concrete,flat_dependencies_with_deptype],to_yaml->[traverse,to_node_dict,dag_hash],_mark_concrete->[traverse],flat_dependencies->[DependencyMap],from_yaml->[read_yaml_dep_specs,from_node_dict,DependencySpec],dependencies->[_find_deps],concretize->[traverse,_expand_virtual_packages,_concretize_helper],dependents->[_find_deps],concretized->[copy,concretize],to_node_dict->[dag_hash,to_dict,dependencies_dict],_eq_dag->[_eq_dag],index->[DependencyMap,traverse],_add_flag->[valid_compiler_flags,_add_variant],_concretize_helper->[constrain,_concretize_helper]],CompilerSpec->[copy->[copy],from_dict->[from_dict,CompilerSpec],constrain->[_autospec,satisfies],satisfies->[_autospec,satisfies],_autospec->[CompilerSpec],to_dict->[to_dict]],SpecLexer] | Prints out specific pieces of a spec in a readable format. Writes a sequence of bytes representing the sequence of n - bits in this Dag object to write a sequence of bytes to the file. | I tried to search for uses of full-string substitutions in the whole code base. Am I wrong in saying that there's none ? |
@@ -361,7 +361,7 @@ class RscCompile(ZincCompile, MirroredTargetOptionMixin):
classpath_product = self.context.products.get_data('rsc_mixed_compile_classpath')
classpath_entries = classpath_product.get_classpath_entries_for_targets(dependencies_for_target)
for _conf, classpath_entry in classpath_entries:
- classpath_paths.append(classpath_entry.path)
+ classpath_paths.append(fast_relpath(classpath_entry.path, get_buildroot()))
if classpath_entry.directory_digest:
classpath_directory_digests.append(classpath_entry.directory_digest)
else:
| [RscCompile->[_runtool->[_runtool_hermetic,_runtool_nonhermetic],create_compile_jobs->[only_zinc_invalid_dep_keys->[_zinc_key_for_target],all_zinc_rsc_invalid_dep_keys->[_key_for_target_as_dep],make_zinc_job->[_zinc_key_for_target,CompositeProductAdder],make_rsc_job->[all_zinc_rsc_invalid_dep_keys,_rsc_key_for_target],work_for_vts_rsc->[ensure_output_dirs_exist,register_extra_products_from_contexts],all_zinc_rsc_invalid_dep_keys,make_zinc_job,make_rsc_job,only_zinc_invalid_dep_keys],register_extra_products_from_contexts->[to_classpath_entries->[pathglob_for],confify,to_classpath_entries],create_compile_context->[_classify_target_compile_workflow,RscCompileContext,RscZincMergedCompileContexts],_runtool_hermetic->[fast_relpath_collection]],CompositeProductAdder->[add_for_target->[add_for_target]]] | Create compile jobs for the given n - th compile target. line Scala sources into SemanticDB scalac compatible header jars. Creates Jobs for the n - node node that are not a subset of relevant targets. Yields a job that runs on the target with a single . | Keeping the path as absolute within the `ClasspathEntry` itself seems definitely like the right thing to do here -- thanks for making this consistent compared to the first diff I had posted! |
@@ -94,4 +94,6 @@ public abstract class AbstractRemoteFileInboundChannelAdapterParser extends Abst
protected abstract Class<? extends FileListFilter<?>> getRegexPatternFileListFilterClass();
+ protected abstract Class<? extends AbstractPersistentAcceptOnceFileListFilter<?>> getPersistentAcceptOnceFileListFilterClass();
+
}
| [AbstractRemoteFileInboundChannelAdapterParser->[parseSource->[getAttribute,hasText,createExpressionDefinitionFromValueOrExpression,setValueIfAttributeDefined,getMessageSourceClassname,genericBeanDefinition,getBeanDefinition,addConstructorArgReference,getRegexPatternFileListFilterClass,getSimplePatternFileListFilterClass,getInboundFileSynchronizerClass,addConstructorArgValue,addPropertyValue,configureFilter,setReferenceIfAttributeDefined]]] | Gets the class that implements the FileListFilter interface. | Perhaps return null by default? (Allow subclasses, e.g. AWS to not provide a filter). Maybe not - since this is a major release, I guess it's ok. |
@@ -116,7 +116,9 @@ public final class OAuthUtils {
}
sb.append(name);
sb.append("=");
- sb.append(OAuthEncoder.encode(value));
+ if (value != null) {
+ sb.append(OAuthEncoder.encode(value));
+ }
return sb.toString();
}
| [OAuthUtils->[redirectToError->[addParameter,isBlank,redirectTo],writeText->[print,getWriter,setStatus,error],writeTextError->[writeText],redirectTo->[RedirectView,ModelAndView],getProviderByType->[getType,equals],addParameter->[append,indexOf,toString,StringBuilder,encode],getLogger]] | Adds a parameter to the given URL. | Should we also append the `name` parameter, if `value` is `null`? |
@@ -206,6 +206,10 @@ class PythonPackage(PackageBase):
self.setup_py('build_scripts', *args)
+ def build_scripts_args(self, spec, prefix):
+ """Arguments to pass to build_scripts."""
+ return []
+
def clean(self, spec, prefix):
"""Clean up temporary files from 'build' command."""
args = self.clean_args(spec, prefix)
| [PythonPackage->[install->[setup_py],sdist->[setup_py],_setup_command_available->[setup_file,python],build_scripts->[setup_py],register->[setup_py],setup_py->[setup_file,python],upload->[setup_py],install_headers->[setup_py],build_ext->[setup_py],check->[setup_py],build_py->[setup_py],bdist->[setup_py],bdist_dumb->[setup_py],test->[setup_py,_setup_command_available],build_clib->[setup_py],import_module_test->[python],install_data->[setup_py],clean->[setup_py],bdist_wininst->[setup_py],install_scripts->[setup_py],bdist_rpm->[setup_py,bdist_rpm],build->[setup_py],install_lib->[setup_py]]] | Build scripts. | This phase was missing a `<phase>_args` function. |
@@ -20,4 +20,9 @@ abstract class AbstractController {
final Connection newDatabaseConnection() throws SQLException {
return database.newConnection();
}
+
+ static RuntimeException newDatabaseException(final String message, final SQLException e) {
+ log.log(Level.SEVERE, message, e);
+ return new IllegalStateException(String.format("%s (%s)", message, e.getMessage()));
+ }
}
| [AbstractController->[newDatabaseConnection->[newConnection],checkNotNull]] | Creates a new database connection. | Something about "new" feels a bit weird and makes me think its actually a constructor. Might be better to use "create". |
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+def check_active_team(team)
+ expect(page).to have_selector '#team-switch button', text: team
+end
| [No CFG could be retrieved] | No Summary Found. | just thinking... Maybe rename this to `expect_active_team(team)`, so we know we have `expectation` here? |
@@ -27,6 +27,7 @@ public interface GroupByVectorColumnSelector
{
int getGroupingKeySize();
+ @SuppressWarnings("unused") // false positive unused inspection warning for "keySize"
void writeKeys(int[] keySpace, int keySize, int keyOffset, int startRow, int endRow);
void writeKeyToResultRow(
| [No CFG could be retrieved] | This method is used to write the keys to the ResultRow. | Could you please create an issue in youtrack.jetbrains.com and link here? |
@@ -60,11 +60,6 @@ namespace System.Windows.Forms.Layout
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
- if (destinationType == null)
- {
- throw new ArgumentNullException(nameof(destinationType));
- }
-
if (value is TableLayoutSettings && (destinationType == typeof(string)))
{
TableLayoutSettings tableLayoutSettings = value as TableLayoutSettings;
| [TableLayoutSettingsTypeConverter->[CanConvertFrom->[CanConvertFrom],ConvertTo->[ConvertTo],CanConvertTo->[CanConvertTo],ParseControls->[GetAttributeValue],ParseStyles->[GetAttributeValue],GetAttributeValue->[GetAttributeValue],ConvertFrom->[ConvertFrom]]] | ConvertTo method. missing rowStyles - remove rowStyles - add rowStyles - add tableLayoutSettings - add. | This is potentially a breaking change as it changes the behaviour |
@@ -146,7 +146,15 @@ export const login = (username, password, rememberMe = false) => async (dispatch
type: ACTION_TYPES.LOGIN,
payload: axios.post('api/authentication', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
});
+ <%_ if (enableTranslation) { _%>
+ const accountResult = await dispatch(getSession());
+
+ if (accountResult && accountResult.value && accountResult.value.status === 200) {
+ dispatch(setLocale(accountResult.value.data.langKey));
+ }
+ <%_ } else { _%>
dispatch(getSession());
+ <%_ } _%>
};
<%_ } else if (authenticationType === 'jwt') { _%>
export const login = (username, password, rememberMe = false) => async (dispatch, getState) => {
| [No CFG could be retrieved] | The login function private function to handle authentication. | please get this from the state instead by using `getState()` here as it will be cleaner pattern since it goes through the reducer |
@@ -179,8 +179,8 @@ function get_access_array($user_guid = 0, $site_guid = 0, $flush = false) {
} else {
$access_array = array(ACCESS_PUBLIC);
- // The following can only return sensible data if the user is logged in.
- if (elgg_is_logged_in()) {
+ // The following can only return sensible data for a known user.
+ if ($user_guid) {
$access_array[] = ACCESS_LOGGED_IN;
// Get ACL memberships
| [get_access_array->[clear],get_write_access_array->[clear],elgg_get_ignore_access->[getIgnoreAccess],get_default_access->[getPrivateSetting],can_edit_access_collection->[getGUID],elgg_set_ignore_access->[setIgnoreAccess,clear],has_access_to_entity->[getGUID],get_access_list->[clear],elgg_override_permissions->[getGUID]] | Get an array of access_ids Get all the collections that the user has access to. | When get_access_array() was written there was no has_access_to_entity(), and hence no reason to ever need to create a full query when logged out. |
@@ -636,10 +636,16 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A {
.then(results => {
const rtcParams = this.mergeRtcResponses_(results[0]);
this.identityToken = results[1];
+ const pageParams = Object.assign(
+ PAGE_LEVEL_PARAMS_,
+ {
+ 'gct': this.getLocationQueryParameterValue('google_preview') ||
+ null,
+ });
return googleAdUrl(
this, DOUBLECLICK_BASE_URL, startTime, Object.assign(
this.getBlockParameters_(), rtcParams,
- this.buildIdentityParams_(), PAGE_LEVEL_PARAMS_));
+ this.buildIdentityParams_(), pageParams));
});
this.troubleshootData_.adUrl = urlPromise;
return urlPromise;
| [AmpAdNetworkDoubleclickImpl->[postTroubleshootMessage->[dev,dict,stringify,now,userAgent],extractSize->[height,extractAmpAnalyticsConfig,get,Number,setGoogleLifecycleVarsFromHeaders,width],getBlockParameters_->[serializeTargeting_,dev,user,isInManualExperiment,Number,assign,join,googleBlockParameters,getMultiSizeDimensions,map],constructor->[resolver,experimentFeatureEnabled,extensionsFor,rejector,getMode,promise,SRA],tearDownSlot->[promise,rejector,removeElement,resolver],shouldPreferentialRenderWithoutCrypto->[dev,experimentFeatureEnabled,CANONICAL_HLDBK_EXP,isCdnProxy],connectFluidMessagingChannel->[dev,stringify,dict],initLifecycleReporter->[googleLifecycleReporterFactory],rewriteRtcKeys_->[keys],onCreativeRender->[customElementExtensions,height,dev,user,addCsiSignalsToAmpAnalyticsConfig,getRefreshManager,installAnchorClickInterceptor,insertAnalyticsElement,getEnclosingContainerTypes,isReportingEnabled,setStyles,width],generateAdKey_->[getAttribute,domFingerprintPlain,stringHash32],buildCallback->[getExperimentBranch,getIdentityToken,dev,getVisibilityState,PAUSED,addExperimentIdToElement,onVisibilityChanged,viewerForDoc,EXPERIMENT,randomlySelectUnsetExperiments],receiveMessageForFluid_->[parseInt],populateAdUrlState->[tryParseJson,Number],registerListenerForFluid_->[keys],getSlotSize->[Number],layoutCallback->[is3pThrottled,registerFluidAndExec,timerFor,throttleFn],onFluidResize_->[dev,stringify,dict],fireDelayedImpressions->[split,dev,dict,isSecureUrl,createElementWithAttributes],getA4aAnalyticsConfig->[getCsiAmpAnalyticsConfig],isLayoutSupported->[FLUID,isLayoutSizeDefined],getAdUrl->[resolve,timerFor,all,googleAdUrl,dev,now,assign],groupSlotsForSra->[groupAmpAdsByType],maybeRemoveListenerForFluid->[keys],onNetworkFailure->[dev,maybeAppendErrorParameter],idleRenderOutsideViewport->[isNaN,parseInt],getPreconnectUrls->[push],delayAdRequestEnabled->[experimentFeatureEnabled,DELAYED_REQUEST],getA4aAnalyticsVars->[getCsiAmpAnalyticsVariables],unlayoutCallback->[dev],mergeRtcResponses_->[TIMEOUT,error,RTC_SUCCESS,NETWORK_FAILURE,callout,deepMerge,keys,MALFORMED_JSON_RESPONSE,response,RTC_FAILURE,join,forEach,rtcTime,push],getAdditionalContextMetadata->[dict,stringify],initiateSraRequests->[all,dev,shift,lineDelimitedStreamer,attemptCollapse,SAFEFRAME,map,metaJsonCreativeGrouper,hasAdPromise,resetAdUrl,element,length,isCancellation,sraResponseRejector,keys,xhrFor,checkStillCurrent,assignAdUrlToError,sraResponseResolver,constructSRARequest_,forEach,utf8Encode],getNonAmpCreativeRenderingMethod->[SAFEFRAME]],origin,dev,isInManualExperiment,join,encodeURIComponent,map,isArray,googlePageParameters,registerElement,initialSize_,tryParseJson,devicePixelRatio,getAttribute,extension,truncAndTimeUrl,instance,adKey_,buildIdentityParams_,getData,constructSRABlockParameters,now,assign,connectionEstablished,element,length,serializeItem_,push,split,serializeTargeting_,keys,getFirstInstanceValue_,jsonTargeting_,extractFn,forEach,combiner] | Get the ad url for the current frame. | does this not need to be done for SRA? |
@@ -30,6 +30,9 @@ class UserMerger
protected
def update_username
+ return if @source_user.username == @target_user.username
+
+ ::MessageBus.publish '/merge_user', { message: I18n.t("admin.user.merge_user.updating_username") }
UsernameChanger.update_username(user_id: @source_user.id,
old_username: @source_user.username,
new_username: @target_user.username,
| [UserMerger->[update_username->[update_username]]] | Updates the username in the database if there is a missing username in the database. | I think the `MessageBus.publish` calls should be scoped to the `acting_user` or is there a reason for those messages to be available for all users? |
@@ -2,13 +2,13 @@ class Profile < ApplicationRecord
belongs_to :user
# This method generates typed accessors for all active profile fields
- def self.define_store_accessors!
+ def self.refresh_store_accessors!
ProfileField.active.find_each do |field|
store_attribute :data, field.attribute_name, field.type
end
end
- define_store_accessors!
+ refresh_store_accessors!
validates :data, presence: true
end
| [Profile->[define_store_accessors!->[store_attribute,attribute_name,find_each,type],belongs_to,validates,define_store_accessors!]] | Defines store accessors for all the records in the model. | This is just a better name. |
@@ -8710,6 +8710,12 @@ BackwardPass::VerifyByteCodeUpwardExposed(BasicBlock* block, Func* func, BVSpars
// We've collected the Backward bytecodeUpwardExposeUses for nothing, oh well.
if (this->func->hasBailout)
{
+ if (instr->GetPrevRealInstrOrLabel()->GetByteCodeOffset() == instr->GetByteCodeOffset())
+ {
+ // When successive instr have same bytecode offset, do the check only on the first instr with that bytecode offset
+ // This will avoid false positives when we have successive instr with same bytecode offset
+ return;
+ }
BVSparse<JitArenaAllocator>* byteCodeUpwardExposedUsed = GetByteCodeRegisterUpwardExposed(block, func, this->tempAlloc);
BVSparse<JitArenaAllocator>* notInDeadStore = trackingByteCodeUpwardExposedUsed->MinusNew(byteCodeUpwardExposedUsed, this->tempAlloc);
| [No CFG could be retrieved] | Checks if a variable symbol is a dead - store symbol and if so tries to store it region System. arraycopy. | Shouldn't there be a bytecodeUse for s51 and shouldn't s42 be marked as jit optimized? #Closed |
@@ -124,7 +124,7 @@ const externalMessagesSimpleTableUrl = () =>
* @return {string}
*/
const messageArgToEncodedComponent = arg =>
- encodeURIComponent(elementStringOrPassthru(arg).toString());
+ encodeURIComponent(String(elementStringOrPassthru(arg)));
/**
* Logging class. Use of sentinel string instead of a boolean to check user/dev
| [No CFG could be retrieved] | Exports a type of log object which can be used to display a message on AMP. 2016 - 01 - 04. | could we do the string coercion in `elementStringOrPassthru` though? is there an actual usage for the pass through value? |
@@ -118,12 +118,14 @@ public class AnalyzerMessage {
}
private static AnalyzerMessage.TextSpan textSpanBetween(SyntaxToken firstSyntaxToken, SyntaxToken lastSyntaxToken) {
- return new AnalyzerMessage.TextSpan(
+ AnalyzerMessage.TextSpan location = new AnalyzerMessage.TextSpan(
firstSyntaxToken.line(),
firstSyntaxToken.column(),
lastSyntaxToken.line(),
lastSyntaxToken.column() + lastSyntaxToken.text().length()
);
+ Preconditions.checkState(!location.isEmpty(), "Issue location should not be empty");
+ return location;
}
@Override
| [AnalyzerMessage->[textSpanBetween->[TextSpan,textSpanBetween],toString->[getMessage,getLine,getFile]]] | Text span between two syntax tokens. | I tend to think that the message should be a bit more helpful than that... if it blows, message is not really helpful. |
@@ -198,8 +198,9 @@ cont_open(int ret, char *pool, char *cont, int flags)
goto out;
}
- /** Use flatkv option for root kv */
- roots->cr_oids[0].hi |= (uint64_t)DAOS_OF_KV_FLAT << OID_FMT_FEAT_SHIFT;
+ /** Use KV type for root kv */
+ roots->cr_oids[0].hi &= (1ULL << OID_FMT_TYPE_SHIFT) - 1;
+ roots->cr_oids[0].hi |= (uint64_t)DAOS_OT_KV_HASHED << OID_FMT_TYPE_SHIFT;
/** Open root object */
rc = daos_kv_open(coh, roots->cr_oids[0], DAOS_OO_RW, &oh, NULL);
| [No CFG could be retrieved] | Connect to a pool and get the object object Opens a handle to the DOS - OL container. | why do we ignore those high bits? |
@@ -376,6 +376,18 @@ READ8_MEMBER(upd765_family_device::msr_r)
//msr |= MSR_CB;
}
+ // log msr when changed
+ if (VERBOSE)
+ {
+ static u8 last_msr = 0;
+ if (msr != last_msr)
+ {
+ last_msr = msr;
+
+ LOG("msr_r 0x%02x (%s)\n", msr, machine().describe_context());
+ }
+ }
+
if(data_irq) {
data_irq = false;
check_irq();
| [No CFG could be retrieved] | - - - - - - - - - - - - - - - - - - Reads the next block of data from the network. | Oh no, this is a deal-breaker. No non-const function statics. It breaks save state support and systems with multiple instances of the same device. |
@@ -24,7 +24,7 @@ import org.mule.runtime.extension.api.loader.ExtensionModelValidator;
import org.mule.runtime.module.extension.internal.loader.enricher.BooleanParameterDeclarationEnricher;
import org.mule.runtime.module.extension.internal.loader.enricher.ConfigNameDeclarationEnricher;
import org.mule.runtime.module.extension.internal.loader.enricher.ConnectionDeclarationEnricher;
-import org.mule.runtime.module.extension.internal.loader.enricher.MimeTypeParametersDeclarationEnricher;
+import org.mule.runtime.extension.internal.loader.enricher.MimeTypeParametersDeclarationEnricher;
import org.mule.runtime.module.extension.internal.loader.enricher.DisplayDeclarationEnricher;
import org.mule.runtime.module.extension.internal.loader.enricher.DynamicMetadataDeclarationEnricher;
import org.mule.runtime.module.extension.internal.loader.enricher.ElementReferenceDeclarionEnricher;
| [AbstractJavaExtensionModelLoader->[configureContextBeforeDeclaration->[getPrivilegedDeclarationEnrichers,addCustomValidators,addCustomDeclarationEnrichers],getExtensionType->[IllegalArgumentException,RuntimeException,loadClass,getExtensionClassLoader,get,format,isBlank],declareExtension->[getExtensionType,declare,IllegalArgumentException,orElseThrow],getPrivilegedDeclarationEnrichers->[getExtensionType,getName,loadClass,getExtensionClassLoader,toList,getAnnotation,withContextClassLoader,emptyList,collect],instantiateOrFail->[instantiateClass,IllegalArgumentException],BooleanParameterDeclarationEnricher,unmodifiableList,JavaSubtypesModelValidator,JavaExportedTypesDeclarationEnricher,ValueProvidersParameterDeclarationEnricher,OAuthConnectionProviderModelValidator,ValueProviderModelValidator,ConnectionProviderModelValidator,ParameterTypeModelValidator,ParameterLayoutOrderDeclarationEnricher,OperationParametersTypeModelValidator,ConfigNameDeclarationEnricher,PrivilegedApiValidator,JavaConfigurationDeclarationEnricher,ExtensionsErrorsDeclarationEnricher,DynamicMetadataDeclarationEnricher,JavaXmlDeclarationEnricher,asList,ElementReferenceDeclarionEnricher,NullSafeModelValidator,ExportedTypesModelValidator,OperationReturnTypeModelValidator,JavaPrivilegedExportedTypesDeclarationEnricher,ParameterGroupModelValidator,ExtensionDescriptionsEnricher,DisplayDeclarationEnricher,MimeTypeParametersDeclarationEnricher,ImportedTypesDeclarationEnricher,JavaOAuthDeclarationEnricher,ConnectionDeclarationEnricher,MetadataComponentModelValidator,SubTypesDeclarationEnricher,ConfigurationModelValidator,ErrorsDeclarationEnricher]] | Method to import all the packages that are used by the extension loader. Package private for testing purposes. | should be removed from here |
@@ -43,13 +43,14 @@ class ArchivalTest(AllenNlpTestCase):
"train_data_path": str(self.FIXTURES_ROOT / "data" / "sequence_tagging.tsv"),
"validation_data_path": str(self.FIXTURES_ROOT / "data" / "sequence_tagging.tsv"),
"data_loader": {"batch_size": 2},
- "trainer": {"num_epochs": 2, "optimizer": "adam"},
+ "trainer": {"num_epochs": 2, "optimizer": "adam", "cuda_device": -1},
}
)
def test_archiving(self):
# copy params, since they'll get consumed during training
- params_copy = copy.deepcopy(self.params.as_dict())
+ params_copy = self.params.duplicate()
+ params_dict_copy = copy.deepcopy(self.params.as_dict())
# `train_model` should create an archive
serialization_dir = self.TEST_DIR / "archive_test"
| [ArchivalTest->[test_loading_serialization_directory->[assert_models_equal],test_archiving->[assert_models_equal]]] | Setup the method for training a single . | Why do you have to set that? It should automatically discover whether there is a GPU or not. |
@@ -51,7 +51,8 @@ class H2OJob(object):
completion. During this time we will display (in stdout) a progress bar with % completion status.
"""
try:
- pb = ProgressBar(self._job_type + " progress")
+ hidden = not H2OJob.__PROGRESS_BAR__
+ pb = ProgressBar(title=self._job_type + " progress", hidden=hidden)
pb.execute(self._refresh_job_status)
except StopIteration as e:
if str(e) == "cancelled":
| [H2OJob->[poll->[list,EnvironmentError,api,str,format,isinstance,warn,ProgressBar,execute],__repr__->[int,lower],poll_once->[poll],_refresh_job_status->[clamp,StopIteration,api]]] | Poll for a in the job. | @st-pasha how can i setup up this variable? via `h2o.no_progress` ? |
@@ -23,6 +23,7 @@ package <%=packageName%>.web.rest;
import <%=packageName%>.AbstractCassandraTest;
<%_ } _%>
import <%=packageName%>.<%= mainClass %>;
+import <%=packageName%>.config.TestSecurityConfiguration;
import <%=packageName%>.domain.Authority;
import <%=packageName%>.domain.<%= asEntity('User') %>;
import <%=packageName%>.repository.UserRepository;
| [No CFG could be retrieved] | Imports an existing from the given package. Imports the packages that should be used by the MockMvcResultMatchers. | Did you missed the condition if (authenticationType === 'oauth2')....? |
@@ -10,8 +10,8 @@ class Charliecloud(MakefilePackage):
"""Lightweight user-defined software stacks for HPC."""
homepage = "https://hpc.github.io/charliecloud"
- url = "https://github.com/hpc/charliecloud/archive/v0.2.4.tar.gz"
+ version('0.9.10', sha256='44e821b62f9c447749d3ed0d2b2e44d374153058814704a5543e83f42db2a45a')
version('0.9.9', sha256='2624c5a0b19a01c9bca0acf873ceeaec401b9185a23e9108fadbcee0b9d74736')
version('0.9.8', sha256='903bcce05b19501b5524ef57a929d2f4c6ddeacb0e8443fcb2fe6963e2f29229')
version('0.9.7', sha256='ec80a4b9bef3a2161a783e11d99cc58e09a32dfbc8a6234c8f7ce7fa76e2f62d')
| [Charliecloud->[version]] | Creates a new object containing all of the basic information about a single object in the system. List of targets to install a sequence of sequence numbers. | You should still keep a URL for the latest version here. It is needed for `spack versions`. |
@@ -1259,6 +1259,7 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
return send(getCurrentTransaction(), message, direct, noAutoCreateQueue);
}
+ @Override
public RoutingStatus send(Transaction tx, final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
// If the protocol doesn't support flow control, we have no choice other than fail the communication
| [ServerSessionImpl->[individualAcknowledge->[findConsumer,individualAcknowledge],receiveConsumerCredits->[locateConsumer],setStarted->[setStarted],expire->[expire],createConsumer->[securityCheck,createConsumer],cancelAndRollback->[afterRollback->[setStarted],rollback],close->[done->[doClose]],createSharedQueue->[createSharedQueue,getUsername,securityCheck],individualCancel->[locateConsumer,individualCancel],describeProducersInfo->[toString],xaCommit->[commit],doSend->[securityCheck],rollback->[rollback],closeConsumer->[close,locateConsumer],findConsumer->[locateConsumer],addUniqueMetaData->[addMetaData],doRollback->[newTransaction,setStarted],createQueue->[createQueue,getUsername,securityCheck],send->[getCurrentTransaction,send],xaFailed->[newTransaction],setTransferring->[setTransferring],xaRollback->[rollback],TempQueueCleanerUpper->[connectionClosed->[run],connectionFailed->[run,connectionFailed]],commit->[commit],connectionFailed->[close,connectionFailed],handleManagementMessage->[securityCheck],getLastSentMessageID->[toString],getTargetAddresses->[toString],toString->[toString],xaStart->[toString,rollback,newTransaction],acknowledge->[acknowledge]]] | Send a message to the server. send a message to the server if it is not there. | There is a way to avoid these on compile time, using Error Prone. I have tried that, and I even had the changes... but we have some code generated.. we would need to ignore the generated code, or to make it also have overrides. @scop Can we talk through IRC tomorrow, or google chat? |
@@ -63,8 +63,9 @@ class PretrainedTransformerTokenizer(Tokenizer):
stride: int = 0,
truncation_strategy: str = "longest_first",
calculate_character_offsets: bool = False,
+ tokenizer_kwargs: Dict[str, Any] = {},
) -> None:
- self.tokenizer = AutoTokenizer.from_pretrained(model_name)
+ self.tokenizer = AutoTokenizer.from_pretrained(model_name, **tokenizer_kwargs)
# Huggingface tokenizers have different ways of remembering whether they lowercase or not. Detecting it
# this way seems like the least brittle way to do it.
| [PretrainedTransformerTokenizer->[tokenize_sentence_pair->[_tokenize],tokenize->[_tokenize]]] | Initializes the object with the given configuration. | Why not just `**tokenizer_kwargs`? `PretrainedTransformerTokenizer(..., do_lower_case=False)` looks more natural than `PretrainedTransformerTokenizer(..., {"do_lower_case": False})` to me. |
@@ -334,7 +334,7 @@ class MaterialTest():
dt = self.spheres_model_part.ProcessInfo.GetValue(DELTA_TIME)
- self.strain += -100*self.length_correction_factor*1.0*self.LoadingVelocity*dt/self.height
+ self.strain += -100*self.length_correction_factor*1.0*self.LoadingVelocity*dt/self.height # Here the 2.0 is not included, there's a 1.0! TODO
if self.test_type =="BTS":
| [MaterialTest->[PrintGraph->[Flush],BreakBondUtility->[BreakBondUtility],PrepareTests->[BreakBondUtility]],PreUtils->[BreakBondUtility->[BreakBondUtility]]] | Measure forces and pressure. This function calculates the total total un - covered non - zero value of the hop - over. | we need to clarify this TODO on the phone |
@@ -410,3 +410,14 @@ SLOT_INTERFACE_END
SLOT_INTERFACE_START(hp_ieee488_devices)
SLOT_INTERFACE("hp9895", HP9895)
SLOT_INTERFACE_END
+
+//-------------------------------------------------
+// SLOT_INTERFACE( remote488_devices )
+//-------------------------------------------------
+
+// slot devices
+#include "remote488.h"
+
+SLOT_INTERFACE_START(remote488_devices)
+ SLOT_INTERFACE("remote488", REMOTE488)
+SLOT_INTERFACE_END
| [No CFG could be retrieved] | END of SLOT_INTERFACE. | Why put this in a separate group? Doesn't it make sense to live in the groups with other devices for machines it's compatible with? Does it not work with other kinds of machines with 488 interfaces in MAME? |
@@ -106,6 +106,8 @@ type Instance struct {
type Discovery struct {
sync.Mutex
+ Logger *logp.Logger
+
ProviderUUID uuid.UUID
Interfaces []InterfaceConfig
| [checkStopped->[Since,Lock,Unlock],sendProbe->[Error,Add,Timeout,Wait,Apply,Now,WriteTo,Unmarshal,interfaces,JoinHostPort,Close,String,SetDeadline,ReadFrom,update,ListenPacket,Err,Done],update->[Error,Unlock,Now,GetValue,Lock,Info,Err],interfaces->[Interfaces],Start->[run],run->[After,checkStopped,sendProbe],Str,To4,TrimRight,IPv4,String,ParseCIDR,Addrs,Wrap,HasPrefix,Bool,HasSuffix] | Message contains the information of a Jolokia Discovery message. Events returns a channel with the events of started and stopped Jolokia instances discovered. | Why is this exported? |
@@ -174,7 +174,7 @@ class NlvrSemanticParser(Model):
denotation = world.execute(logical_form)
denotation_is_correct = str(denotation).lower() == label.lower()
return True, denotation_is_correct
- except (RuntimeError, AssertionError, TypeError):
+ except (ParsingError, ExecutionError):
# TODO (pradeep): Fix the type declaration to make this try-except unnecessary.
return False, False
| [NlvrSemanticParser->[from_params->[from_params]],NlvrDecoderState->[get_valid_actions->[get_valid_actions],combine_states->[NlvrDecoderState],_make_new_state_with_group_indices->[NlvrDecoderState],split_finished->[is_finished]],NlvrDecoderStep->[_compute_new_states->[NlvrDecoderState],take_step->[get_valid_actions]]] | Checks if a given action sequence is correct. | Do you get these anymore? Can you remove the try/except now? |
@@ -21,7 +21,8 @@ class PyCartopy(PythonPackage):
depends_on('py-pyshp@1.1.4:', type=('build', 'run'))
depends_on('py-six@1.3.0:', type=('build', 'run'))
depends_on('geos@3.3.3:')
- depends_on('proj@4.9.0:5')
+ depends_on('proj@4.9.0:5', when='@0.16.0')
+ depends_on('proj@6:', when='@0.17.0')
# optional dependecies
depends_on('py-matplotlib@1.5.1:', type=('build', 'run'))
| [PyCartopy->[build_ext_args->[format],depends_on,version]] | Create a new object of type with the given name. Build ext arguments for the n - tuple. | Are you sure PROJ 4 and 5 don't work with 0.17.0? The `setup.py` still lists 4.9.0 as the minimum PROJ version. |
@@ -104,4 +104,16 @@ class Samrai(AutotoolsPackage):
'--enable-opt',
'--disable-debug'])
+ if self.version >= Version('3.12.0'):
+ # only version 3.12.0 and above, samrai does not use
+ # boost, but needs c++11. Without c++11 flags, samrai
+ # cannot build with either gcc or intel compilers.
+ if 'CXXFLAGS' in env and env['CXXFLAGS']:
+ env['CXXFLAGS'] += ' ' + self.compiler.cxx11_flag
+ else:
+ env['CXXFLAGS'] = self.compiler.cxx11_flag
+ else:
+ # boost 1.64.0 or earlier works with samrai 2.4.4~3.11.5
+ options.extend(['--with-boost=%s' % self.spec['boost'].prefix])
+
return options
| [Samrai->[configure_args->[extend,satisfies],variant,depends_on,version,patch]] | Configure the options for the command. | I would use `options.append()` instead of `options.extend([])`. No need to create an extra list. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.