patch
stringlengths
18
160k
callgraph
stringlengths
4
179k
summary
stringlengths
4
947
msg
stringlengths
6
3.42k
@@ -29,14 +29,15 @@ static const unsigned char default_zeros[EVP_MAX_MD_SIZE]; * Given a |secret|; a |label| of length |labellen|; and |data| of length * |datalen| (e.g. typically a hash of the handshake messages), derive a new * secret |outlen| bytes long and store it in the location pointed to be |out|. - * The...
[tls13_derive_iv->[tls13_hkdf_expand],tls13_export_keying_material->[tls13_hkdf_expand],tls13_generate_secret->[tls13_hkdf_expand],tls13_final_finish_mac->[tls13_derive_finishedkey],tls13_generate_handshake_secret->[tls13_generate_secret],tls13_generate_master_secret->[tls13_generate_secret],tls13_derive_key->[tls13_hk...
TLS13 - HKDF expansion private helper functions.
Why not keep the static here? Not that a reasonable compiler shouldn't be able to optimize it out anyway but...
@@ -9,10 +9,10 @@ from conans.errors import ConanException _global_requester = None -def get(url, md5='', sha1='', sha256='', destination="."): +def get(url, md5='', sha1='', sha256='', destination=".", filename=""): """ high level downloader + unzipper + (optional hash checker) + delete temporary zip ""...
[get->[basename,check_sha1,download,unlink,check_md5,check_sha256,unzip],download->[writeln,ConanOutput,download,Downloader],ftp_download->[cwd,split,FTP,retrbinary,ConanException,login,str,quit,open]]
Downloads and unzips a file from a given URL.
Check if filename starts with "?" and raise an exception indicating that the "filename" parameter should be used.
@@ -439,6 +439,7 @@ SSL_TEST_CTX *SSL_TEST_CTX_new() SSL_TEST_CTX *ret; ret = OPENSSL_zalloc(sizeof(*ret)); TEST_check(ret != NULL); + ret->app_data_size = 256; return ret; }
[No CFG could be retrieved]
Protected parse methods. Free all data associated with SSL_TEST_EXTRA and SSL_TEST_CTX.
make a file-global constant or define for this number.
@@ -1,9 +1,9 @@ class SessionsController < Devise::SessionsController def destroy # Let's say goodbye to all the cookies when someone signs out. - cookies.each do |cookie| - cookies.delete cookie[0] - end + domain = Rails.env.production? ? ApplicationConfig["APP_DOMAIN"] : nil + cookies.delete...
[SessionsController->[destroy->[each,delete]]]
Destroy a object.
Interesting, I think we would need this on development too. Not sure if `localhost:3000` behaves differently but I can reproduce the problem in development with a custom domain (ngrok or xip.io for mobile development)
@@ -299,6 +299,11 @@ static char *app_get_pass(const char *arg, int keepbio) * Can't do BIO_gets on an fd BIO so add a buffering BIO */ btmp = BIO_new(BIO_f_buffer()); + if (btmp == NULL) { + BIO_free(pwdbio); + BIO_printf(bio_err, "Out o...
[No CFG could be retrieved]
Reads the passed in argument and returns the name of the . Compare password with stdin.
Can you change the `!pwdbio` above to `pwdbio == NULL`?
@@ -3298,9 +3298,13 @@ p { * @static */ public static function disconnect( $update_activated_state = true ) { + // The hook is not being set since Jetpack 9.0.0, + // but we're removing it just in case it wasn't properly cleaned up after the plugin update. wp_clear_scheduled_hook( 'jetpack_clean_nonces' );...
[Jetpack->[stat->[initialize_stats],reset_saved_auth_state->[reset_saved_auth_state],add_remote_request_handlers->[require_jetpack_authentication],admin_page_load->[disconnect],do_stats->[do_stats,initialize_stats],register->[register],is_active->[is_active],do_server_side_stat->[do_server_side_stat],translate_role_to_...
Disconnects the site from the server. Gets the node id of the node.
Is there a reason line 512 is guarded by a call to `wp_next_scheduled()` but this isn't?
@@ -208,6 +208,7 @@ public class KsqlResource implements KsqlConfigurable { distributedCmdResponseTimeout); final List<ParsedStatement> statements = ksqlEngine.parse(request.getKsql()); + validator.validate( SandboxedServiceContext.create(serviceContext), statements,
[KsqlResource->[shouldSynchronize->[containsKey,contains],terminateCluster->[build,serverErrorForStatement,ensureValidPatterns,getDeleteTopicList,KsqlEntityList,info,throwIfNotConfigured],ensureValidPatterns->[forEach,KsqlRestException,badRequest,compile],handleKsqlStatements->[getStreamsProperties,getSqlStatement,crea...
Handles Ksql statements.
nit: remove new line
@@ -522,7 +522,7 @@ class Grouping < ApplicationRecord def missing_assignment_files(revision = nil) get_missing_assignment_files = lambda do |open_revision| assignment.assignment_files.reject do |assignment_file| - open_revision.path_exists?(File.join(assignment.repository_folder, assignment_file....
[Grouping->[deletable_by?->[is_valid?],test_runs_instructors->[pluck_test_runs,group_hash_list,filter_test_runs],has_files_in_submission?->[has_submission?],due_date->[due_date],test_runs_students_simple->[filter_test_runs],remove_member->[membership_status],add_tas->[assign_all_tas],remove_rejected->[membership_status...
Get missing assignment files.
Metrics/LineLength: Line is too long. [123/120]
@@ -263,12 +263,11 @@ class SecretRegistry: # # Either of these is a bug. The contract does not use # assert/revert, and the account should always be funded - assert gas_limit self.client.check_for_insufficient_eth( transaction_name="regist...
[SecretRegistry->[is_secret_registered->[get_secret_registration_block_by_secrethash]]]
Registers a batch of secrets. RaidenUnrecoverableError if the transaction failed because of a non - zero error. This method is called when a block of code is not available to execute a registerSecretBatch.
I believe this was a bug.
@@ -60,13 +60,14 @@ class VGG(nn.Module): nn.init.constant_(m.bias, 0) -def make_layers(cfg, batch_norm=False): +def make_layers(cfg: List[Union[str, int]], batch_norm: bool = False) -> nn.Sequential: layers = [] in_channels = 3 for v in cfg: if v == 'M': layers...
[vgg16_bn->[_vgg],vgg13_bn->[_vgg],_vgg->[VGG,make_layers],vgg19->[_vgg],vgg16->[_vgg],vgg11_bn->[_vgg],vgg19_bn->[_vgg],vgg13->[_vgg],vgg11->[_vgg]]
Make layers for the given configuration.
mypy seems to be complaining here. You might need to annotate this with `List[nn.Module]` maybe?
@@ -25,7 +25,12 @@ namespace Pulumi.Automation.Commands // this causes commands to fail rather than prompting for input (and thus hanging indefinitely) var completeArgs = args.Concat(new[] { "--non-interactive" }); - var env = new Dictionary<string, string>(); + var env...
[LocalPulumiCmd->[RunAsync->[Value,GetEnvironmentVariables,TrySetResult,HasExited,IsCompleted,Environment,Add,WaitForExit,Exited,Start,ErrorDataReceived,BeginOutputReadLine,Concat,Key,TrySetCanceled,Data,ExitCode,BeginErrorReadLine,Kill,OutputDataReceived,TrySetException,ToString,Register,AppendLine,ConfigureAwait,Crea...
Runs the command in the background. if the process exits or exits the task it will set the result on the task.
Maybe we want to do this at the end so it can't be overwritten, and tie it to a parameter so we only get this output when the consumer provides an OnEvent delegate? Or is this how the other SDKs are doing it?
@@ -0,0 +1,17 @@ +module Articles + class DetectLanguage + def self.call(article) + text = extract_text(article) + response = CLD.detect_language(text) + response[:code] if response[:reliable] + rescue StandardError + nil + end + + def self.extract_text(article) + parsed = FrontMat...
[No CFG could be retrieved]
No Summary Found.
Just curious why we do nothing if there is an error. I am probably missing some context.
@@ -196,7 +196,15 @@ static struct task *schedule_edf(void) } else { /* yes, run current task */ task->start = current; + + /* init task for running */ + wait_init(&task->complete); + spin_lock_irq(&sch->lock, flags); task->state = TASK_STATE_RUNNING; + list_item_del(&task->list); + spin_unlock_irq(&sch...
[No CFG could be retrieved]
Schedule next task in the scheduler. if task is not running - return -EAGAIN ; if task is not running -.
We need to keep the lock held over this whole function, but we can release it in if (wait) {}
@@ -4749,11 +4749,12 @@ EVP_PKEY *ssl_generate_param_group(uint16_t id) EVP_PKEY_CTX *pctx = NULL; EVP_PKEY *pkey = NULL; const TLS_GROUP_INFO *ginf = tls1_group_id_lookup(id); + int pkey_ctx_id; if (ginf == NULL) goto err; - if ((ginf->flags & TLS_CURVE_TYPE) == TLS_CURVE_CUSTOM)...
[No CFG could be retrieved]
Generate parameters from a group ID Derives a private key from a private key and a public key.
This isn't a complicated expression and could be flattened into one if statement.
@@ -92,6 +92,10 @@ public final class RedisLockRegistry implements ExpirableLockRegistry, Disposabl private final Map<String, RedisLock> locks = new ConcurrentHashMap<>(); + private final ConcurrentLinkedDeque<String> queue = new ConcurrentLinkedDeque<>(); + + private final ReadWriteLock lock = new ReentrantReadW...
[RedisLockRegistry->[RedisLock->[lock->[lock],unlock->[unlock],equals->[equals],hashCode->[hashCode],lockInterruptibly->[rethrowAsLockException,lockInterruptibly],tryLock->[tryLock,rethrowAsLockException]]]]
Creates a RedisLockRegistry which can be used to manage resource locking across multiple JVMs Construct a lock registry with the default lock expiration.
I don't think we need to worry about `put` and `remove` optimization. Those `obtain()` and `expireUnusedOlderThan()` are not designed to be used in the heavy concurrent environment. The first one is just for lock reference, which you can store for reuse. The second one indeed has to be called on from an exclusive threa...
@@ -77,7 +77,8 @@ public class KsqlConfigResolver implements ConfigResolver { if (propertyName.startsWith(KSQL_STREAMS_PREFIX) && !propertyName.startsWith(KSQL_STREAMS_PREFIX + StreamsConfig.PRODUCER_PREFIX) - && !propertyName.startsWith(KSQL_STREAMS_PREFIX + StreamsConfig.CONSUMER_PREFIX)) { + ...
[KsqlConfigResolver->[resolve->[resolveKsqlConfig,startsWith,resolveStreamsConfig],getConfigDef->[get,IllegalStateException,getDeclaredField,setAccessible],resolveStreamsConfig->[unresolved,of,isPresent,findFirst,empty,stripPrefix,startsWith],resolveKsqlConfig->[unresolved,of,isPresent,empty,resolveConfig,startsWith],P...
Resolve streams config if any.
out of scope for this PR, but I'm wondering why we don't let people pass in any arbitrary streams config and let streams do the verification here
@@ -52,11 +52,14 @@ export class AmpStoryRequestService { * @private */ loadJsonFromAttribute_(attributeName) { - if (!this.storyElement_.hasAttribute(attributeName)) { + const bookendElem = this.getBookendElement_(this.storyElement_); + + if (!this.storyElement_.hasAttribute(attributeName) && !book...
[No CFG could be retrieved]
Load the from the attribute in the storyElement.
Nit: we usually use ``bookendEl`` as a short for ``element``
@@ -115,6 +115,8 @@ func (c *ClusterUpConfig) StartSelfHosted(out io.Writer) error { "OPENSHIFT_CONTROLLER_MANAGER_CONFIG_HOST_PATH": configDirs.openshiftControllerConfigDir, "NODE_CONFIG_HOST_PATH": configDirs.nodeConfigDir, "KUBEDNS_CONFIG_HOST_PATH": configDirs.k...
[copyToRemote->[RemoteDirFor],BuildConfig->[copyToRemote]]
StartSelfHosted starts the kubelet in the current working directory This function is responsible for creating the necessary components Installs the specified components in the base directory.
Note to self, this is actually a component....
@@ -109,6 +109,7 @@ public class FindTargetGreedy implements FindTargetStrategy { @Override public ContainerMoveSelection findTargetForContainerMove( DatanodeDetails source, Set<ContainerID> candidateContainers) { + sortTargetForSource(source); for (DatanodeUsageInfo targetInfo : potentialTargets) ...
[FindTargetGreedy->[reInitialize->[setUpperLimit,setPotentialTargets,setConfiguration]]]
Finds a target for a container move.
Sorting would happen every time function is called. I think we can optimise for same source.
@@ -77,7 +77,7 @@ namespace System.Net.NetworkInformation return IPStatus.SourceQuench; case IcmpV4MessageType.TimeExceeded: - return IPStatus.TimeExceeded; + return IPStatus.TtlExpired; case IcmpV4MessageType.ParameterProb...
[IcmpV4MessageConstants->[IPStatus->[EchoReply,DestinationNetworkUnreachable,SourceQuench,DestinationPortUnreachable,DestinationProtocolUnreachable,TimeExceeded,Unknown,DestinationUnreachable,BadHeader,DestinationHostUnreachable,ParameterProblemBadIPHeader,Success]]]
Map a type to a IPStatus object.
briefly looking at ICMPv4, it also the code 1 => Fragment reassembly time exceeded. I'm not sure if that matters but we may make is same as IPv6 TtlReassemblyTimeExceeded.
@@ -671,7 +671,7 @@ class Secret(EnvelopeMessage): def to_dict(self): return { - 'type': self.__class__.__name__, + 'type': 'Secret', 'chain_id': self.chain_id, 'message_identifier': self.message_identifier, 'payment_identifier': self.payment_...
[from_dict->[from_dict],LockedTransferBase->[unpack->[Lock],__init__->[assert_transfer_values]],RefundTransfer->[from_event->[Lock],from_dict->[from_dict],to_dict->[to_dict],unpack->[Lock]],EnvelopeMessage->[message_hash->[packed],__init__->[assert_envelope_values]],Message->[__ne__->[__eq__]],Lock->[from_bytes->[Lock]...
Returns a dictionary representation of the object.
This is for backwards compatibility with the JSON representation
@@ -58,6 +58,7 @@ public class FunctionHandler implements StepHandler<Function> { Map<String, Object> headers = step.getProperties(); if (ObjectHelper.isNotEmpty(headers)) { options = headers.entrySet().stream() + .filter(entry -> Objects.nonNull(entry.getValue())) ...
[FunctionHandler->[canHandle->[equals],asBeanParameter->[getValue,IllegalStateException,getKey,mandatoryConvertTo],handle->[getProperties,to,getName,getContext,indexOf,isNotEmpty,endsWith,substring,isEmpty,collect,getTypeConverter,joining]]]
Handles a missing route.
This seems unrelated to tech extensions feature toggle
@@ -909,7 +909,15 @@ describe Topic do context 'private message' do let(:coding_horror) { Fabricate(:coding_horror) } fab!(:evil_trout) { Fabricate(:evil_trout) } - let(:topic) { Fabricate(:private_message_topic, recipient: coding_horror) } + let(:topic) do + PostCreator.new( + Fabricate(...
[expect_the_right_notification_to_be_created,build_topic_with_title,set_state!]
adds tests for all conditions adds admins to allowed groups and removes admins from allowed groups.
Just for context, what's the difference between this and the previous code (`Fabricate`)?
@@ -138,7 +138,8 @@ public class PossiblyNullDimensionSelector extends AbstractDimensionSelector imp // id 0 is always null for this selector impl. return 0; } else { - return baseSelector.idLookup().lookupId(name) + nullAdjustment; + IdLookup idLookup = baseSelector.idLookup(); + retu...
[PossiblyNullDimensionSelector->[classOfObject->[classOfObject],inspectRuntimeShape->[inspectRuntimeShape],idLookup->[idLookup],NullAdjustedIndexedInts->[size->[size],get->[get]],lookupId->[lookupId],lookupName->[lookupName,getValueCardinality],nameLookupPossibleInAdvance->[nameLookupPossibleInAdvance],getValueCardinal...
Lookup a sequence number by name.
should this return 0 if the `idLookup` does not exist?
@@ -128,8 +128,7 @@ public abstract class CommandInterpreter extends Builder implements EnvVarsFilte // on Windows environment variables are converted to all upper case, // but no such conversions are done on Unix, so to make this cross-platform, // convert variables t...
[CommandInterpreter->[perform->[perform,isErrorlevelForUnstableBuild],join->[join]]]
Performs the filter on the given build. Checks if the script is not in the context of a failure.
Does this change behavior in case of `null` values?
@@ -66,6 +66,11 @@ class PostMover Guardian.new(user).ensure_can_see! topic @destination_topic = topic + original_topic_posts_count = @original_topic.posts + .where("post_type = ? or (post_type = ? and action_code != 'split_topic')", Post.types[:regular], Post.types[:whisper]) + .count + mov...
[PostMover->[to_new_topic->[move_types],to_topic->[move_types],update_statistics->[update_statistics],enqueue_jobs->[enqueue_jobs]]]
Move all posts from the original topic to the destination topic.
I am curious about the second part of the condition, where you skip split_topic small actions. I understand you do this to skip the small action that is generated right before this method is called. I think there is an edge case here if you move some posts two times in a row. First time you do not select all posts, do ...
@@ -24,17 +24,9 @@ import io.quarkus.creator.phase.augment.AugmentTask; */ public class QuarkusBuild extends QuarkusTask { - private String transformedClassesDirectory; - - private String wiringClassesDirectory; - - private String libDir; - private String mainClass = "io.quarkus.runner.GeneratedMain"...
[QuarkusBuild->[setIgnoredEntries->[addAll],getTransformedClassesDirectory->[File,transformedClassesDirectory],buildQuarkus->[getValue,getProperties,getArtifactId,putIfAbsent,getVersion,GradleException,getProperty,clearProperty,lifecycle,getKey,setProperty,resolveModel,runTask,resolveAppModel,startsWith,entrySet,build,...
Creates a new QuarkusBuild. This method returns the directory where wiring classes should be generated.
Are we sure this one isn't used? The rest do seem redundant
@@ -1559,6 +1559,9 @@ if test "x$use_coverage" = "xyes"; then dnl Add the special gcc flags CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" LDFLAGS="$LDFLAGS -lgcov" + AM_CONDITIONAL([ENABLE_COVERAGE], true) +else + AM_CONDITIONAL([ENABLE_COVERAGE], false) fi #
[No CFG could be retrieved]
Flags for code coverage. #region System API Sections.
What does this change do?
@@ -139,6 +139,8 @@ #include "x68000.lh" +static uint32_t adpcm_clock[2] = { 8000000, 4000000 }; +static uint32_t adpcm_div[4] = { 1024, 768, 512, /* Reserved */512 }; void x68k_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) {
[No CFG could be retrieved]
This function is called by the device timer when a piece of expansion hardware is present. This function is called when a timer is acked.
Static mutable variables are going to break things - can this be made constant, or should it be moved to the state class?
@@ -844,6 +844,9 @@ def _prepare_mne_browse_epochs(params, projs, n_channels, n_epochs, scalings, # Draw event lines for the first time. _plot_vert_lines(params) + # default key to close window + params['close_key'] = 'escape' + def _prepare_projectors(params): """Set up the projectors for epo...
[_plot_onkey->[_plot_traces,_plot_window],_mouse_click->[plot_epochs_image,_pick_bad_epochs,_plot_window],_toggle_labels->[_plot_vert_lines],_epochs_navigation_onclick->[_draw_epochs_axes]]
Prepare the mne_browse_epochs window. Plots a block of nanoseconds for each channel. V scroll and horizontal scrollbars Hairy hack to fit the window of the missing block in the butterfly. VSE patch for the missing block.
And you probably want to set this also in ``_plot_onkey`` and other key handlers. There are at least the handler for annotation dialog and selection dialog.
@@ -87,7 +87,7 @@ class TestDistRunnerBase(object): args.endpoints, args.trainers, args.sync_mode, args.dc_asgd) trainer_prog = t.get_trainer_program() - elif args.update_method == "nccl2": + elif args.update_method == ...
[TestDistRunnerBase->[run_pserver->[get_model,get_transpiler],run_trainer->[get_model,get_transpiler,get_data]],TestDistBase->[_find_free_port->[__free_port],_run_cluster->[start_pserver],check_with_place->[_run_cluster_nccl2,_run_cluster,_run_local],setUp->[_setup_config,_after_setup_config]],runtime_main->[run_pserve...
Run the trainer. Multi batch merge pass.
maybe `nccl2_reduce_layer` mode should execute the `seq_allreduce_pass` to avoid the NCCL hang ?
@@ -51,7 +51,5 @@ def lockedtransfersigned_from_message(message: LockedTransferBase) -> LockedTran initiator=message.initiator, target=message.target, route_states=route_states, - metadata=message.metadata.original_data, + metadata=message.metadata.to_dict(), ) - - retur...
[lockedtransfersigned_from_message->[balanceproof_from_envelope]]
Create a LockedTransferSignedState from a LockedTransfer message.
From an architecture perspective, this is much nicer since it hides internals! One downside is that this goes through the serialisation mechanism and the hacky `remove_type_inplace` again - but this is totally acceptable.
@@ -391,7 +391,15 @@ func (s *Server) startServer(ctx context.Context) error { s.basicCluster = core.NewBasicCluster() s.cluster = cluster.NewRaftCluster(ctx, s.GetClusterRootPath(), s.clusterID, syncer.NewRegionSyncer(s), s.client, s.httpClient) s.hbStreams = hbstream.NewHeartbeatStreams(ctx, s.clusterID, s.clus...
[SetLabelPropertyConfig->[SetLabelPropertyConfig],GetReplicationModeConfig->[GetReplicationModeConfig],campaignLeader->[createRaftCluster,Name,GetAllocator,stopRaftCluster],GetClusterVersion->[GetClusterVersion],SetClusterVersion->[SetClusterVersion],DeleteLabelProperty->[DeleteLabelProperty,SetLabelProperty],Replicate...
startServer starts the server Initialize all the necessary components.
add space and remove `in here`
@@ -64,7 +64,7 @@ public class QueryRunnerHelper @Override public Result<T> apply(Cursor input) { - log.debug("Running over cursor[%s]", adapter.getInterval(), input.getTime()); + log.debug("Running over cursor[%s]", input.getTime()); ...
[QueryRunnerHelper->[makeCursorBasedQuery->[apply->[apply]],makeClosingQueryRunner->[run->[run]]]]
This method is used to make a cursor based query that takes a list of intervals and a.
Strange logging "cursor[input.getTime()]". Also maybe just remove this debugging line
@@ -113,7 +113,7 @@ describes.endtoend( await expect(prop(el, 'scrollLeft')).to.equal(scrollLeft); }); - it('should have the correct scroll position when resizing', async function () { + it.skip('should have the correct scroll position when resizing', async function () { this.timeout(testTime...
[No CFG could be retrieved]
Tests that the window should be scrolled to the edge of the slide rather than the requested Cycles until the element is in the correct position.
`// TODO(wg-ui-and-a11y, #1234): Flaky on Chrome+viewer environment.`
@@ -1,9 +1,12 @@ +import os import os.path as op from numpy.testing import assert_array_almost_equal from mne.datasets import sample -from mne import read_bem_surfaces, write_bem_surface +from mne import read_bem_surfaces, write_bem_surface, read_surface, \ + write_surface +from numpy.ma.testutils...
[test_io_bem_surfaces->[assert_array_almost_equal,write_bem_surface,surf,len,read_bem_surfaces],dirname,data_path,join]
Test reading of bem - related objects.
why not importing as usual from numpy.testing?
@@ -272,11 +272,11 @@ Markus::Application.configure do AUTOTEST_CLIENT_DIR = "#{::Rails.root.to_s}/data/dev/autotest" AUTOTEST_RUN_QUEUE = 'CSC108_autotest_run' AUTOTEST_SERVER_HOST = 'localhost' - AUTOTEST_SERVER_FILES_USERNAME = 'localhost' - AUTOTEST_SERVER_FILES_DIR = "#{::Rails.root.to_s}/data/dev/autot...
[allow_concurrency,join,raise_delivery_errors,env,consider_all_requests_local,exists?,root,cache_classes,deprecation,to_s,eager_load,dirname,weeks,read,log_level,hour,configure,instance_eval,precompile]
Global flag to enable and disable all automated testing.
Layout/SpaceInsideHashLiteralBraces: Space inside { missing.<br>Layout/SpaceInsideHashLiteralBraces: Space inside } missing.<br>Layout/MultilineArrayBraceLayout: Closing array brace must be on the line after the last array element when opening brace is on a separate line from the first array element.
@@ -22,7 +22,7 @@ namespace System.Text.Json.Serialization // In the future, this will be check for !IsSealed (and excluding value types). CanBePolymorphic = TypeToConvert == JsonTypeInfo.ObjectType; IsValueType = TypeToConvert.IsValueType; - CanBeNull = !IsValueType ||...
[JsonConverter->[TryWriteDataExtensionProperty->[TryWrite],TryReadAsObject->[TryRead],WriteWithQuotesAsObject->[WriteWithQuotes],TryRead->[Read,OnTryRead],TryWrite->[TryWriteAsObject,IsNull,OnTryWrite]]]
A base class for converting a single object or value into a JSON object. Method to check if a type can be converted.
I did verify this is faster for value types (same as for reference types).
@@ -111,9 +111,7 @@ NEW_FEATURES = True REDIRECT_URL = 'https://outgoing.stage.mozaws.net/v1/' -CLEANCSS_BIN = 'cleancss' -UGLIFY_BIN = 'uglifyjs' -ADDONS_LINTER_BIN = 'addons-linter' +ADDONS_LINTER_BIN = 'node_modules/.bin/addons-linter' XSENDFILE_HEADER = 'X-Accel-Redirect'
[email_url,env,bool,db,LOGGING,lazy,cors_endpoint_overrides,dict,join,items,lower,cache]
Set the default cache settings for the object. This function is a utility function that returns a dictionary of configuration values for the given node.
`cleancss` and `uglifyjs` are not needed after deploy. `Dockerfile.deploy` already sets a different path for them at deploy time. Since `node_modules/.bin/` is *not* in the `PATH`, this actually didn't work at all, it was just useless and confusing.
@@ -68,5 +68,12 @@ func BuildGoDaemon() error { // CrossBuildGoDaemon cross-build the go-daemon binary using the // golang-crossbuild environment. func CrossBuildGoDaemon() error { - return CrossBuild(ForPlatforms("linux"), WithTarget("buildGoDaemon")) + return CrossBuild(defaultCrossBuildGoDaemon...) +} + +// Cross...
[Getenv,New,Println]
CrossBuildGoDaemon cross - builds the go - daemon binary using the binary.
Instead of adding a new function I think you could change `CrossBuildGoDaemon` to be variadic and pass options that are appended to the defaults. Like `func CrossBuildGoDaemon(opts ...CrossBuildOption) error`.
@@ -232,7 +232,7 @@ func (cs *ContainerService) setAddonsConfig(isUpdate bool) { defaultAzureCNINetworkMonitorAddonsConfig := KubernetesAddon{ Name: AzureCNINetworkMonitoringAddonName, - Enabled: azureCNINetworkMonitorAddonEnabled(o), + Enabled: to.BoolPtr(o.IsAzureCNI() && o.KubernetesConfig.NetworkPolicy ...
[setAddonsConfig->[Itoa,HasNSeriesSKU,BoolPtr,GetAzureCNICidr,IsKubernetesVersionGe,HasCoreOS,GetCloudSpecConfig,GetNonMasqueradeCIDR],BoolPtr,IsKubernetesVersionGe,GetAddonContainersIndexByName,Bool,IsAzureCNI]
setAddonsConfig sets the addons config Spec for the cluster - spec AddonConfig - A plugin to configure the necessary configuration for a new add - on. This function returns a list of KubernetesContainerSpec objects that can be used to create a new This is the default configuration for the cluster.
Carried this additional default gate over from the "last mile" "concatenate addons string" business logic area.
@@ -565,9 +565,7 @@ //AND `allow_cid`='' AND `allow_gid`='' AND `deny_cid`='' AND `deny_gid`=''", // count public wall messages - $r = q("SELECT count(*) as `count` FROM `item` - WHERE `uid` = %d - AND `type`='wall'", + $r = q("SELECT COUNT(*) as `count` FROM `item` WHERE `uid` = %d AND wall", ...
[api_oauth_access_token->[fetch_access_token,getMessage],api_oauth_request_token->[fetch_request_token,getMessage],api_friendica_notification->[getAll],api_error->[getMessage],api_friendica_notification_seen->[getByID,setSeen],api_statusnet_config->[get_hostname],api_statuses_mediap->[purify,set],api_statuses_update->[...
Get user data This function is used to check if a user is logged in and if so it can find Get all the contact information for a user. Get all messages in a user s network. count all items in a user s contact This function returns an array of user - specific information that can be used to create a user This function is...
Isn't this query missing `type = 'wall'`?
@@ -137,15 +137,11 @@ def create_payment( "billing_postal_code": billing_address.postal_code, "billing_country_code": billing_address.country.code, "billing_country_area": billing_address.country_area, - "currency": currency, - "gateway": gateway, - "total": total, - ...
[get_already_processed_transaction_or_create_new_transaction->[get_already_processed_transaction,create_transaction]]
Create a payment instance. Get or create a transaction object based on a given payment object.
Are you sure of this? I am not convinced that we should rely only on the `payment_token` transaction
@@ -13,9 +13,13 @@ class Timeframe def self.datetimes { infinity: 5.years.ago, + top_infinity: 5.years.ago, year: 1.year.ago, + top_year: 1.year.ago, month: 1.month.ago, + top_month: 1.month.ago, week: 1.week.ago, + top_week: 1.week.ago, LATEST_TIMEFRAME: L...
[Timeframe->[datetime_iso8601->[iso8601],datetimes->[with_indifferent_access],freeze,private_class_method]]
Returns an array of dates for which the sequence has not been met.
I made these additions to this hash so that when the user's `config_homepage_feed` value is passed into the `timeframe_feed(timeframe)` function (in the file `app/controllers/stories/feeds_controller.rb`), the function will work.
@@ -276,7 +276,7 @@ async def map_module_to_address( third_party_mapping: ThirdPartyPythonModuleMapping, ) -> PythonModuleOwners: providers = [ - *third_party_mapping.providers_for_module(module.module), + *third_party_mapping.providers_for_module(module.module, resolves=None), *first_...
[find_all_python_projects->[AllPythonTargets],ThirdPartyPythonModuleMapping->[providers_for_module->[providers_for_module]],merge_first_party_module_mappings->[FirstPartyPythonModuleMapping],map_first_party_python_targets_to_modules->[create_from_stripped_path,FirstPartyPythonMappingImpl,ModuleProvider],map_module_to_a...
Map a module to its address.
For the next change: rather than using all of the resolves from `compatible_resolves` for a target, this will probably need to be exactly one `resolve` chosen by the caller: that's related to the "choose how many permutations of parameters to use" problem of #13882... but in the meantime, I think that we'll have to cho...
@@ -135,14 +135,15 @@ public class BuildCommand extends CLICommand { } if (checkSCM) { - if (job.poll(new StreamTaskListener(stdout, getClientCharset())).change == Change.NONE) { + SCMTriggerItem item = SCMTriggerItem.SCMTriggerItems.asSCMTriggerItem(job); + if (item...
[BuildCommand->[run->[findNearest,getValue,getParameterDefinitions,flush,createValue,isDisabled,ParametersAction,getResult,cancel,containsKey,StreamTaskListener,getParameterDefinition,CLICause,getParameterDefinitionNames,AbortException,getProperty,poll,BuildCommand_CLICause_CannotBuildConfigNotSaved,getKey,isEmpty,getD...
Runs the build. Checks if the build is disabled.
If it is null, we cannot check SCM. Maybe makes sense to fail the command in such case
@@ -955,11 +955,14 @@ public class PubsubIO { super.populateDisplayData(builder); builder - .addIfNotNull(DisplayData.item("timestampLabel", timestampLabel)) - .addIfNotNull(DisplayData.item("idLabel", idLabel)); + .addIfNotNull(DisplayData.item("timestampLabel", tim...
[PubsubIO->[Read->[timestampLabel->[timestampLabel],named->[named],Bound->[PubsubBoundedReader->[processElement->[getMaxNumRecords,getSubscription,getMaxReadTime,getCoder,getTopic]],populateDisplayData->[populateDisplayData,asPath],topic->[fromPath],subscription->[fromPath],PubsubWriter->[populateDisplayData->[],publis...
Populates the display data with missing data.
It might make sense to add some string constants for the keys/labels used in common places. Eg., "idLabel". It will make it easier to ensure that if we change the name of that item we change it everywhere.
@@ -556,3 +556,5 @@ REDIS_URL = os.environ.get("REDIS_URL") if REDIS_URL: CACHE_URL = os.environ.setdefault("CACHE_URL", REDIS_URL) CACHES = {"default": django_cache_url.config()} + +INVOICE_LOGO_PATH = os.environ.get("INVOICE_LOGO_PATH", "images/logo.svg")
[get_list->[strip,split],get_bool_from_env->[literal_eval,ValueError,format],get_host->[get_current],timedelta,join,config,warn,CeleryIntegration,int,init,get_list,parse,append,dirname,get_random_secret_key,__import__,setdefault,normpath,Config,get_currency_fraction,ImproperlyConfigured,DjangoIntegration,get,get_bool_f...
Set up cache_url.
As @maarcingebala said, we don't want to use saleor's logo by default. And this will fail. How do you handle the scenario when a user doesn't want to add own logo? I see that `INVOICE_LOGO_PATH` requires path.
@@ -376,9 +376,12 @@ def createtarball(args): # restrict matching to current environment if one is active env = ev.get_env(args, 'buildcache create') - _createtarball(env, args.spec_yaml, args.specs, args.directory, - args.key, args.no_deps, args.force, args.rel, args.unsigned, - ...
[preview->[find_matching_specs],_createtarball->[find_matching_specs],createtarball->[_createtarball],get_buildcache_name->[get_concrete_spec],install_tarball->[install_tarball],installtarball->[match_downloaded_specs],get_tarball->[download_buildcache_files]]
Create a tarball from a binary package.
Minor nit: `args.things_to_install` is just a string literal, right? Maybe just do a string literal compare with `==` rather than a string subset check with `in`. In my initial reading, I was thinking `args.things_to_install` was a list (or some other iterable) due to the use of `in`. But I don't see an `nargs` in the ...
@@ -13,6 +13,7 @@ import io.quarkus.deployment.pkg.NativeConfig; public class NativeImageBuildRemoteContainerRunner extends NativeImageBuildContainerRunner { private static final Logger log = Logger.getLogger(NativeImageBuildRemoteContainerRunner.class); + private static final String CONTAINER_BUILD_VOLUME_N...
[NativeImageBuildRemoteContainerRunner->[preBuild->[preBuild]]]
Creates a new container and runs it. Copy a resultingExecuta to a builder.
Ideally I would prefer a dynamically generated unique volume name, but I am not sure it's worth the effort. We could also do something like `fixed-name-YYYY-MM-DD-HHMM` to avoid potential conflicts with existing volumes. WDYT?
@@ -5222,7 +5222,7 @@ namespace System.Tests } [Fact] - public static void ToLower() + public static void ToLower_2() { var expectedSource = new char[3] { 'a', 'B', 'c' }; var expectedDestination = new char[3] { 'a', 'b', 'c' };
[StringTests->[PadRight->[PadRight],IndexOfAny_InvalidCount_ThrowsArgumentOutOfRangeException->[IndexOfAny],IsNullOrEmpty->[IsNullOrEmpty],LastIndexOfSequenceZeroLengthValue_Char->[Length],ToLowerInvariant->[ToLowerInvariant,Length],SameValueCompareTo_StringComparison->[Compare],IndexOfAny_NullAnyOf_ThrowsArgumentNullE...
Tests that the string is lowercase.
What is the other ToLower test this is conflicting with? "ToLower_2" isn't descriptive about what makes this test different from a presumed "ToLower_1", so we should either pick descriptive names or combine the tests.
@@ -99,8 +99,9 @@ uint8_t matrix_scan(void) { } } } - +#ifdef RGBLIGHT_ENABLE matrix_scan_user(); +#endif return 1; }
[matrix_scan->[bit_reverse,matrix_set_row_status]]
matrix_scan - scan function.
This should really be calling `matrix_scan_quantum()` without the ifdef. When the user function in bface.c is not defined it defaults to an empty implementation, and gets compiled out. In fact, bface.c should actually be implementing `matrix_scan_kb()`, and calling `matrix_scan_user()` after the RGB task. This way keym...
@@ -280,6 +280,18 @@ func WithPrivileged(privileged bool) CtrCreateOption { } } +// WithNoNewPrivs sets the noNewPrivs flag in the container runtime +func WithNoNewPrivs(noNewPrivs bool) CtrCreateOption { + return func(ctr *Container) error { + if ctr.valid { + return ErrCtrFinalized + } + + ctr.config.NoNewP...
[WithPod->[ID],ID,Wrapf,Join,MatchString,MustCompile,ParseIP]
WithShmDir sets the directory that should be mounted on the container. WithRootFSFromImage sets the rootfs image from image.
Do we need this? It occurs to me that it's already in the spec, so we can get at the bool there
@@ -350,10 +350,13 @@ Archive fingerprint: {0.fpr} Time (start): {start} Time (end): {end} Duration: {0.duration} -Number of files: {0.stats.nfiles}'''.format( +Number of files: {0.stats.nfiles} +Utilization of max. archive size: {csize_max:.0%} +'''.format( self, start=format_time(to_loc...
[ArchiveChecker->[rebuild_manifest->[valid_msgpacked_dict,valid_archive],verify_data->[delete],orphan_chunks_check->[delete],rebuild_refcounts->[mark_as_possibly_superseded->[add],verify_file_chunks->[mark_as_possibly_superseded,add_reference,replacement_chunk],robust_iterator->[valid_item->[list_keys_safe],report,vali...
Return a string representation of a object.
Use also a percentage as you do below?
@@ -140,3 +140,13 @@ func (m *MetricSet) addUpEvent(eventList map[string]common.MapStr, up int) { } } + +func matchMetricFamily(family string, matchMetrics *[]string) bool { + for _, checkMetric := range *matchMetrics { + matched, _ := regexp.MatchString(checkMetric, family) + if matched { + return true + } +...
[addUpEvent->[LabelsHash,Host],Fetch->[HasKey,addUpEvent,Update,Name,Host,Module,GetFamilies,Event,Wrap,LabelsHash,Put],Build,DefaultMetricSet,MustAddMetricSet,WithHostParser,NewPrometheusClient]
addUpEvent adds a metric up event to the event list.
We should pre-parse patterns when creating the metricset, so we earlier verify that they are valid, and we don't have to parse them for every metric.
@@ -112,6 +112,15 @@ namespace DotNetNuke.Entities.Tabs.TabVersions { return string.Format(DataCache.TabVersionsCacheKey, tabId); } + + private IEnumerable<TabVersion> ApplyUserLocalTime(IEnumerable<TabVersion> tabVersions, TimeSpan userUtcOffset, TimeZoneInfo userTimeZone) + ...
[TabVersionController->[GetTabVersions->[GetTabVersions],DeleteTabVersion->[DeleteTabVersion],DeleteTabVersionDetailByModule->[DeleteTabVersionDetailByModule],TabVersion->[SaveTabVersion],SaveTabVersion->[SaveTabVersion]]]
Get the cache key for the versions of a tab.
`userUtcOffset` parameter is now unused
@@ -373,7 +373,8 @@ kubectl %s port-forward "$pod" %d:8080 if err := cmdutil.RunIO(cmdutil.IO{ Stdin: stdin, }, "sh"); err != nil { - return fmt.Errorf("Could not forward dash websocket port") + fmt.Printf("Is the dashboard deployed? If not, deploy with \"pachctl deploy local --dashboard-only\""...
[StringVar,ErrorDesc,Now,SprintFunc,Close,StartReportAndFlushUserAction,IsNotExist,RunFixedArgs,Flush,Error,RunIO,NewBufferString,ListRepo,Marshal,SetPidfilePath,New,Go,ListPipeline,StringVarP,Errorf,AddCommand,Wait,ReadBytes,NewWriter,Create,Join,Contains,Kill,PrettyPrintVersion,GetVersion,FinishReportAndFlushUserActi...
Group eg creates a group of all the network interfaces that are using the pach port - forward.
Could we send this to `stderr` instead of `stdout`.
@@ -23,6 +23,7 @@ import ( . "github.com/pingcap/check" "github.com/pingcap/failpoint" "github.com/pingcap/kvproto/pkg/pdpb" + pdClient "github.com/tikv/pd/client" "github.com/tikv/pd/pkg/testutil" "github.com/tikv/pd/pkg/tsoutil" "github.com/tikv/pd/server"
[TestSynchronizedGlobalTSO->[testGetTimestamp],TestTimeFallBack->[testGetTimestamp],TestSynchronizedGlobalTSOOverflow->[testGetTimestamp]]
Test function for the test case of the n - tuple generation. Synchronize global TSO with other Local TSO Allocator.
I think this test better should be placed in `tests/client.go`?
@@ -502,7 +502,7 @@ func (sg *stepGenerator) getResourcePropertyStates(urn resource.URN, goal *resou } return props, inputs, outputs, resource.NewState(goal.Type, urn, goal.Custom, false, "", - inputs, outputs, goal.Parent, goal.Protect, false, goal.Dependencies, nil, goal.Provider) + inputs, outputs, goal.P...
[GenerateDeletes->[V,Infof],getResourcePropertyStates->[NewState,Olds,IsRefresh],GenerateSteps->[Analyze,GetProvider,New,Diag,ParseReference,DependingOn,Analyzer,Errorf,Assert,Olds,issueCheckErrors,diff,IsProviderType,Infof,getResourcePropertyStates,V,IsRefresh,generateURN,GetAnalyzeResourceFailureError,GetDuplicateRes...
getResourcePropertyStates returns the properties inputs and outputs of a resource.
Another place you can use OperationStatusEmpty?
@@ -345,6 +345,12 @@ func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface input.AdvancedOptions = stringMapToPointers(v.(map[string]interface{})) } + if d.Get("require_https").(bool) { + input.SetDomainEndpointOptions(&elasticsearch.DomainEndpointOptions{ + EnforceHTTPS: aws.Bool(t...
[DeleteElasticsearchDomain,CreateElasticsearchDomain,GetCompatibleElasticsearchVersions,SetPartial,BoolValue,StringInSlice,Partial,Set,NonRetryableError,Code,MatchString,GetOk,HasChange,Sequence,Errorf,SetId,MustCompile,RetryableError,Bool,UpdateElasticsearchDomainConfig,Contains,NormalizeJsonString,Id,Int64,Get,Printf...
resourceAwsElasticSearchDomainCreate creates an elasticsearch domain with the given id. Input returns the input.
Need an option to set `TLSSecurityPolicy` as well
@@ -209,7 +209,11 @@ func LoadConfiguration() *GlobalConfiguration { viper.AddConfigPath("$HOME/.traefik/") // call multiple times to add many search paths viper.AddConfigPath(".") // optionally look for config in the working directory if err := viper.ReadInConfig(); err != nil { - fmtlog.Fatalf("E...
[Set->[Set,SubexpNames,New,MustCompile,Split,FindAllStringSubmatch],Type->[Sprint],String->[Sprintf],AddConfigPath,AllSettings,AutomaticEnv,SetConfigType,SetConfigName,Decode,ReadInConfig,ConfigFileUsed,SetConfigFile,GetString,StringToTimeDurationHookFunc,Fatalf,NewDecoder,Set,SetEnvPrefix]
Type returns the type of certificate. marathon - Marathon command line interface.
Why we don't do anymore `Fatalf` here ? :angel:
@@ -1521,11 +1521,11 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas } private void trackInitialPluginInstall(@Nonnull final List<Future<UpdateCenter.UpdateCenterJob>> installJobs) { - final Jenkins jenkins = Jenkins.getInstance(); + final Jenkins jenkins = ...
[PluginManager->[createDefault->[create],doPlugins->[getDisplayName],install->[install,getPlugin],dynamicLoad->[run,dynamicLoad],getPlugin->[getPlugin,getPlugins],PluginUpdateMonitor->[ifPluginOlderThenReport->[getPlugin]],addDependencies->[addDependencies],loadDetachedPlugins->[loadPluginsFromWar],getPluginVersion->[g...
Track initial plugin install. This function is called when a task is running and it is safe to do so. It.
Why? Would make the potential NPE explicit if it wouldn't already throw 4 lines up ?
@@ -93,8 +93,7 @@ class ElggPlugin extends ElggObject { $this->attributes['site_guid'] = $site->guid; $this->attributes['owner_guid'] = $site->guid; $this->attributes['container_guid'] = $site->guid; - $this->attributes['title'] = $this->pluginID; - + if (parent::save()) { // make sure we have a prio...
[ElggPlugin->[deactivate->[isActive],getFriendlyName->[getID],getAllSettings->[getID],unsetAllUserSettings->[getID],unsetUserSetting->[getID],includeFile->[getID],setPriority->[getPriority],unsetAllSettings->[getID],registerViews->[getID],unsetAllUsersSettings->[getID],getUserSetting->[getID],setUserSetting->[getID],ca...
Save the object.
this is where the dubble save happened
@@ -1093,11 +1093,11 @@ namespace System.Xml } } - private async Task<Tuple<string, string>> ParseExternalIdAsync(Token idTokenType, Token declType) + private async Task<Tuple<string?, string?>> ParseExternalIdAsync(Token idTokenType, Token declType) { - Tuple<s...
[DtdParser->[HandleEntityReferenceAsync->[HandleEntityReferenceAsync]]]
Parse the next condition section async. Get next token in the stream. Get publicId and systemId if any.
Why is this null? It seems to me that `systemId` gets a value on all the branches that doesn't throw.
@@ -1,6 +1,6 @@ SecureHeaders::Configuration.default do |config| # rubocop:disable Metrics/BlockLength config.hsts = "max-age=#{365.days.to_i}; includeSubDomains; preload" - config.x_frame_options = 'DENY' + config.x_frame_options = Rails.env.development? ? 'ALLOWALL' : 'DENY' config.x_content_type_options = '...
[call->[call,new,cover?,delete],csp,hsts,freeze,default,flatten,select,cookies,x_download_options,x_frame_options,to_i,include?,x_xss_protection,production?,presence,development?,path,x_content_type_options,insert_before,x_permitted_cross_domain_policies,merge,configure]
Configuration for CSP 2. 0 Config for the given .
Is there any way to make these route specific? If it's anything like the CSP headers, I worry the development-specific allowances risk giving us a false sense that things are working correctly. That being said, I doubt we'll have much use for frames outside these previews
@@ -377,7 +377,7 @@ class Evoked(ProjMixin, ContainsMixin, UpdateChannelsMixin, show : bool Call pyplot.show() at the end or not. ylim : dict - ylim for plots. e.g. ylim = dict(eeg=[-200e-6, 200e-6]) + ylim for plots. e.g. ylim = dict(eeg=[-200, 200]) Va...
[Evoked->[detrend->[detrend],resample->[resample]],read_evokeds->[Evoked,_get_evoked_node],grand_average->[copy]]
Plot evoked data as butterfly plots with a specific number of channels. Plots a single plot.
Shouldn't that be `-200e-6, 200e-6`? Also, see line 438 for a similar, but different error :)
@@ -48,7 +48,7 @@ module View children = [] render_revenue = should_render_revenue? - children << render_tile_part(Part::Track, routes: @routes) if @tile.paths.any? + children << render_tile_part(Part::Track, routes: @routes) if (@tile.paths + @tile.path_stubs).any? children <...
[Tile->[render->[render_tile_part,should_render_revenue?]]]
Renders a single top - level node in the tree that is either a tile part or a.
since this is a bit expensive i wonder if it's worth to do @tile.paths.any || tile.path_stubs.any?
@@ -301,8 +301,9 @@ export class AmpConsent extends AMP.BaseElement { /** * Handler User action * @param {string} action + * @param {string=} str */ - handleAction_(action) { + handleAction_(action, str) { if (!isEnumValue(ACTION_TYPE, action)) { // Unrecognized action return;
[AmpConsent->[handleAction_->[DISMISS,ACCEPTED,ACCEPT,dev,isEnumValue,REJECTED,DISMISSED,REJECT],enableInteractions_->[DISMISS,keys,ACCEPT,REJECT],constructor->[map],enableExternalInteractions_->[user,length,getData,source],show_->[dev,promise,resolve],buildCallback->[expandPolicyConfig,all,keys,dict,user,getPostPrompt...
Handle action action.
nit: str => consentString
@@ -28,7 +28,15 @@ namespace System.Text.Json.Serialization.Converters protected override void ConvertCollection(ref ReadStack state, JsonSerializerOptions options) { - state.Current.ReturnValue = GetCreatorDelegate(options)((Dictionary<string, TValue>)state.Current.ReturnValue!); + ...
[ImmutableDictionaryOfStringTValueConverter->[Add->[JsonPropertyNameAsString,ReturnValue,Assert],GetCreatorDelegate->[MemberAccessorStrategy],ConvertCollection->[GetCreatorDelegate,ReturnValue],CreateCollection->[ReturnValue],OnWriteResume->[MoveNext,Value,ShouldFlush,CollectionEnumerator,EndDictionaryElement,GetEnumer...
ConvertCollection implements the conversion of a collection.
nit: add temp variable so `classInfo.CreateObjectWithArgs` doesn't need to be called below.
@@ -284,7 +284,7 @@ def test_webhook_update_by_staff( webhook_id = graphene.Node.to_global_id("Webhook", webhook.pk) variables = { "id": webhook_id, - "events": [WebhookEventTypeEnum.ORDER_CREATED.name], + "events": [WebhookEventTypeEnum.CUSTOMER_CREATED.name], "is_active": Fal...
[test_webhook_create_inactive_service_account->[add,assert_no_permission,save,post_graphql],test_webhook_delete_service_account_doesnt_exist->[assert_no_permission,post_graphql,to_global_id,delete],test_webhook_update_by_staff_without_permission->[assert_no_permission,post_graphql,to_global_id],test_webhook_create_by_s...
Test if a given webhook is updated by staff.
In the mutation, you're using `set()` to create unique events. It could be tested that providing duplicated event actually doesn't break anything.
@@ -1530,7 +1530,13 @@ class TypeChecker(NodeVisitor[None], CheckerPluginInterface): """ if (isinstance(sym.node, (FuncDef, OverloadedFuncDef, Decorator)) and not is_static(sym.node)): - bound = bind_self(typ, self.scope.active_self_type()) + if isinstance(sym.no...
[TypeChecker->[get_op_other_domain->[get_op_other_domain],analyze_async_iterable_item_type->[accept],visit_try_without_finally->[check_assignment,accept],find_isinstance_check->[conditional_callable_type_map,find_isinstance_check],visit_class_def->[accept],iterable_item_type->[lookup_typeinfo],visit_for_stmt->[accept_l...
Bind self - type and map type variables for a method.
Should we check `is_class` for regular `FuncDef`s? (It can be implicit for certain functions, right?)
@@ -128,4 +128,12 @@ class Jetpack_Sync_Settings { return defined( 'DOING_CRON' ) && DOING_CRON; } + + static function is_syncing() { + return is_null( self::$is_syncing ) ? false : self::$is_syncing; + } + + static function set_is_syncing( $is_syncing ) { + self::$is_syncing = $is_syncing; + } }
[Jetpack_Sync_Settings->[update_settings->[reset]]]
Is this cron run in doing?.
This could probably be expressed more succinctly as `return !!self::$is_syncing`
@@ -0,0 +1,12 @@ +from graphql.error import GraphQLError + + +def validate_query_args(**kwargs): + id = kwargs.get("id") + slug = kwargs.get("slug") + name = kwargs.get("name") + + if id and slug: + raise GraphQLError("Argument 'id' cannot be combined with 'slug'") + if id and name: + raise...
[No CFG could be retrieved]
No Summary Found.
I think this function could be more generic`(arg1, arg1_name, arg2, arg2_name)`. Using this solution we can decrease number of the condition in function. Can we change it for a name with tell as what this function check? For example 'Validate_one_of_args_is_in_query"
@@ -81,7 +81,7 @@ public class ImageStoreUtil { return ""; } - if (output.contains("ISO 9660") && isCorrectExtension(uripath, "iso")) { + if ((output.startsWith("ISO 9660") || output.startsWith("DOS/MBR")) && isCorrectExtension(uripath, "iso")) { s_logger.debug("File a...
[ImageStoreUtil->[isCompressedExtension->[endsWith],isCorrectExtension->[endsWith],generatePostUploadUrl->[isNotBlank,substring,replace],checkTemplateFormat->[isCompressedExtension,isCorrectExtension,debug,contains,runSimpleBashScript],getLogger,getName]]
Checks if the file at the given path looks like a template file. if output contains a missing ISO 9660 file return empty string.
We might need to revisit this, this should not happen.
@@ -69,13 +69,14 @@ def type_inference_stage(typingctx, interp, args, return_type, locals={}, infer.seed_type(k, v) infer.build_constraint() - infer.propagate(raise_errors=raise_errors) + # return errors in case of partial typing + errs = infer.propagate(raise_errors=raise_e...
[BaseTypeInference->[run_pass->[fallback_context,type_inference_stage,legalize_return_type],__init__->[__init__]],NativeLowering->[run_pass->[fallback_context],__init__->[__init__]],DeadCodeElimination->[__init__->[__init__]],ParforPass->[__init__->[__init__]],DumpParforDiagnostics->[__init__->[__init__]],IRLegalizatio...
Inference stage for the type inference.
With 4 elements returning, i think it'd be clearer (esp for the caller) if this return a namedtuple instead to avoid a unnamed unpacking and the `_, _, _`.
@@ -16322,4 +16322,4 @@ class ConfiguredRuntime { } } -export { AnalyticsEvent, ClientEvent, ClientEventManagerApi, ConfiguredRuntime, Entitlement, Entitlements, EventOriginator, Fetcher, FilterResult, SubscribeResponse$1 as SubscribeResponse }; +export { AnalyticsEvent, ClientEvent, ClientEventManagerApi, Config...
[DeferredAccountFlow->[start->[getEntitlementForSource],handleConsentResponse_->[start,complete]],PaymentsRequestDelegate->[loadPaymentDataThroughPaymentRequest_->[complete,show]],ConfiguredRuntime->[showSubscribeOption->[start],showAbbrvOffer->[start],showContributionOptions->[start],showUpdateOffers->[start],getEntit...
{" using System.
I am assuming this was for testing. These changes would go to swg-js repo.
@@ -147,6 +147,16 @@ class SmallRyeRestClientProcessor { continue; } interfaces.put(theInfo.name(), theInfo); + + // Find Return types + for (MethodInfo method : theInfo.methods()) { + Type type = method.returnType(); + if (!...
[SmallRyeRestClientProcessor->[setupProviders->[SubstrateResourceBuildItem,classNamesNamedIn,produce,ReflectiveClassBuildItem,getClassLoader,SubstrateProxyDefinitionBuildItem],setup->[setRestClientBuilderResolver,FeatureBuildItem,AdditionalBeanBuildItem,getName,produce,ReflectiveClassBuildItem],processInterfaces->[regi...
Process interfaces annotated with RegisterRestClient. This method is called when a proxy is not needed.
You should only consider the methods with `@GET`, `@POST`..., shouldn't you? Take a look at the RESTEasy processor, that might help.
@@ -297,4 +297,16 @@ public class InstantGenerateOperator extends AbstractStreamOperator<HoodieRecord fs.delete(fileStatus.getPath(), true); } } + + private Path generateCurrentMakerPath() { + String baseDir = cfg.targetBasePath.endsWith("/") + ? cfg.targetBasePath.substring(0, cfg.targetB...
[InstantGenerateOperator->[prepareSnapshotPreBarrier->[prepareSnapshotPreBarrier],open->[open],close->[close]]]
clean marker folder.
IMO, `generateCurrentMakerDirPath ` sounds better?
@@ -41,10 +41,10 @@ public class TestDirectoryUIManagerRegistration extends NXRuntimeTestCase { DirectoryUIManager service; - @Before + @Override public void setUp() throws Exception { - super.setUp(); - + // required by directory + deployBundle("org.nuxeo.ecm.core.cache"); ...
[TestDirectoryUIManagerRegistration->[setUp->[setUp]]]
Deploys all components in order to ensure that they are installed.
Use of `deployContrib` with a test bundle
@@ -15,5 +15,9 @@ namespace Pulumi.Automation public string? Message { get; set; } public List<string>? Target { get; set; } + + public Action<string>? OnOutput { get; set; } + + public Action<string>? OnStdErr { get; set; } } }
[No CFG could be retrieved]
Replies the message of the error.
For consistency, we should go with `OnOutput` and `OnError` (preferred) or `OnStandardOutput` and `OnStandardError`. Also, we should not use abbreviations in .NET.
@@ -259,6 +259,7 @@ public class EventGroup implements Comparable<EventGroup>, Serializable, Deseria //when an event is split up, the same event IDs are used. Serializable key=event.getId()+event.getMessage().getCorrelationSequence(); event.getMessage().setInvocationProperty(MULE_...
[EventGroup->[toArray->[toArray],size->[size],equals->[equals],addEvent->[equals],compareTo->[compareTo],hashCode->[hashCode],toMessageCollection->[toMessageCollection],toString->[size,toString,iterator],getMessageCollectionEvent->[size,getCommonRootId,toMessageCollection],iterator->[iterator]]]
Adds an event to the queue.
lastStoredEventKey is written inside a synchronized block (on events). Should not read access also synchronized?
@@ -92,8 +92,8 @@ public interface QueryService { ConfigKey<Boolean> AllowUserViewDestroyedVM = new ConfigKey<>("Advanced", Boolean.class, "allow.user.view.destroyed.vm", "false", "Determines whether users can view their destroyed or expunging vm ", true, ConfigKey.Scope.Account); - static final ...
[No CFG could be retrieved]
Provides a query service that queries for a list of entities. Search for users.
not sure if this is an issue but naming convention fro settings is all lower case.
@@ -26,7 +26,11 @@ public class BadTypeParameterNameCheckTest { @Test public void test() { - JavaCheckVerifier.verify("src/test/files/checks/naming/BadGenericNameNoncompliant.java", new BadTypeParameterNameCheck()); + BadTypeParameterNameCheck check = new BadTypeParameterNameCheck(); + JavaCheckVerifie...
[BadTypeParameterNameCheckTest->[test2->[verifyNoIssue,BadTypeParameterNameCheck],test->[BadTypeParameterNameCheck,verify]]]
Test for missing type name.
If you want to ensure it is only compiled once, shouldn't the string `format` of the check be changed between the calls? to ensure it has no effect on the second all to `verify`
@@ -20,6 +20,9 @@ static EVP_SIGNATURE *evp_signature_new(OSSL_PROVIDER *prov) { EVP_SIGNATURE *signature = OPENSSL_zalloc(sizeof(EVP_SIGNATURE)); + if (signature == NULL) + return NULL; + signature->lock = CRYPTO_THREAD_lock_new(); if (signature->lock == NULL) { OPENSSL_free(signat...
[No CFG could be retrieved]
Creates a new EVP_SIGNATURE object from a list of OSSL_DI id - > OSSL_FUNC_SIGNATURE.
You could cascade this with the lock creation check and have them both set `ERR_R_MALLOC_FAILURE`
@@ -235,10 +235,10 @@ def _join(base_url, path, *extra, **kwargs): base_path_args = [new_base_path] base_path_args.extend(path_tokens) - if sys.platform == "win32": - base_path = os.path.join(*base_path_args) - else: - base_path = os.path.relpath(os.path.join(*base_path_args), '/fake...
[_join->[_split_all,parse,join,format],join->[format],format->[parse]]
Join base_url path params query and fragment.
Can these lines be removed?
@@ -434,6 +434,10 @@ func NewPollingDeviationChecker( fetcher Fetcher, minSubmission, maxSubmission *big.Int, ) (*PollingDeviationChecker, error) { + var idleTimer = utils.NewResettableTimer() + if !initr.IdleTimer.Disabled { + idleTimer.Reset(initr.IdleTimer.Duration.Duration()) + } pdc := &PollingDeviationChe...
[isValidSubmission->[JobID],Stop->[Stop],consume->[setIsHibernatingStatus],processLogs->[reactivate,hibernate,isFlagLowered],SetOracleAddress->[New],Start->[logger],pollIfEligible->[checkEligibilityAndAggregatorFunding,JobID],resetHibernationTimer->[Stop],resetIdleTimer->[Stop],setInitialTickers->[initialRoundState,res...
NewPollingDeviationChecker creates a new PollingDeviationChecker object. This is a helper function for creating a new chProcessLog object.
Does fmv2 have this problem?
@@ -263,7 +263,7 @@ public final class CentralAuthenticationServiceImpl implements CentralAuthentica if (registeredService == null || !registeredService.isEnabled()) { logger.warn("ServiceManagement: Unauthorized Service Access. Service [{}] is not found in service registry.", service.getId()); ...
[CentralAuthenticationServiceImpl->[grantServiceTicket->[grantServiceTicket]]]
Grant a service ticket. Add a new authentication to the ticket granting ticket. Returns the next unique identifier for the next authentication.
Why not throw a newly instantiated exception? Doesn't throwing a static field goof with the resulting stack trace?
@@ -24,13 +24,13 @@ func TestAPILFSLocksNotStarted(t *testing.T) { repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) req := NewRequestf(t, "GET", "/%s/%s.git/info/lfs/locks", user.Name, repo.Name) - MakeRequest(t, req, http.StatusNotFound) + MakeRequest(t, req, http.StatusF...
[EqualValues,AssertExistsAndLoadBean,Equal,Format,WithinDuration,Sprintf,DisplayName,FullName,Now,Len,NotEqual,MakeRequest,Set]
TestAPILFSLocksNotStarted tests if the API LFS locks are not started. TestAPILFSLocksLogged tests the presence of an unauthorized lock on a repository.
IIRC 404 was used as to not leak info
@@ -100,7 +100,11 @@ final class Native { if (!name.startsWith("mac") && !name.contains("bsd") && !name.startsWith("darwin")) { throw new IllegalStateException("Only supported on BSD"); } - NativeLibraryLoader.load("netty-transport-native-kqueue", PlatformDependent.getClassLoader(N...
[Native->[loadNativeLibrary->[trim,IllegalStateException,contains,getClassLoader,startsWith,load],keventWait->[capacity,memoryAddress,size,newIOException,keventWait],newKQueue->[FileDescriptor,kqueueCreate],evDelete,evError,evClear,evEOF,evDisable,evfiltRead,evfiltWrite,sizeofKEvent,evAdd,evfiltUser,loadNativeLibrary,e...
loadNativeLibrary - load native library if not loaded on mac and not on BSD.
also nit: `new String[] {`
@@ -1,11 +1,15 @@ # Update ServiceProvider from config/service_providers.yml (all environments in rake db:seed) class ServiceProviderSeeder + class ExtraServiceProviderError < StandardError; end + def initialize(rails_env: Rails.env, deploy_env: LoginGov::Hostdata.env) @rails_env = rails_env @deploy_env...
[ServiceProviderSeeder->[write_service_provider?->[present?],remote_setting->[contents],run->[each,except,write_service_provider?,update!],service_providers->[fetch,error,message,raise,read,result],initialize->[env],attr_reader]]
Initialize the object.
I think we want this check to run *after* the update, right?
@@ -266,10 +266,12 @@ public class Create extends InputAbstract { @Option(name = "--no-fsync", description = "Disable usage of fdatasync (channel.force(false) from java nio) on the journal") private boolean noJournalSync; + @Option(name = "--device-block-size", description = "The block size by the device, d...
[Create->[copy->[write],readTextFile->[openStream,applyFilters],makeExec->[makeExec],write->[openStream,write],run->[getSslTrust,getSslKeyPassword,getClusterPassword,getClusterUser,isAutoCreate,getHost,getHostForClustered,isDisablePersistence,isSlave,getSslTrustPassword,isAllowAnonymous,getUser,isFailoverOnShutodwn,get...
Disable the persistence and acceptors for the given sequence number. The name of the table to be used.
should this be journal-device-block-size, as like the actual field name. e.g. what occurs in future where want to tune the others, and they maybe using other disks with other block sizes, might be best to namespace this now, so in future doesnt cause any issue
@@ -2837,7 +2837,7 @@ dc_obj_fetch(tse_task_t *task, daos_obj_fetch_t *args, uint32_t flags, D_GOTO(out_task, rc); } - if ((flags & DIOF_EC_RECOV) != 0) { + if ((args->extra_flags & DIOF_EC_RECOV) != 0) { obj_auxi->ec_in_recov = 1; obj_auxi->reasb_req.orr_fail = args->extra_arg; obj_auxi->reasb_req.orr_...
[No CFG could be retrieved]
region DAO RPC fetch reassembles a key from the DKey object.
DIOF_EC_RECOV seems need not to be an internal RPC protocol flag, can be an API flags? (that was the original intention when I add that flag).
@@ -957,6 +957,7 @@ public class ReduceFnRunner<K, InputT, OutputT, W extends BoundedWindow> { // Extract the window hold, and as a side effect clear it. final WatermarkHold.OldAndNewHolds pair = watermarkHold.extractAndRelease(renamedContext, isFinished).read(); + // TODO: This isn't accurate if ...
[ReduceFnRunner->[emit->[shouldDiscardAfterFiring],prefetchOnTrigger->[prefetchOnTrigger],processElement->[toMergedWindows],onTimers->[EnrichedTimerData,windowIsActiveAndOpen],OnMergeCallback->[prefetchOnMerge->[activeWindows,prefetchOnMerge],onMerge->[activeWindows,onMerge]],processElements->[windowsThatShouldFire,win...
On trigger. Returns new hold if any.
+1 to this - now that GC is done via window expiration rather than per-element lateness there is no need to relocate output times to EOW even when we relocate the hold to GC time
@@ -37,12 +37,13 @@ namespace Dynamo.ViewModels internal void PopulateAutoCompleteCandidates() { - if(PortViewModel == null) return; + if (PortViewModel == null) return; var searchElements = GetMatchingNodes(); FilteredResults = searchElements.Select...
[NodeAutoCompleteSearchViewModel->[PopulateAutoCompleteCandidates->[Select,GetMatchingNodes,RequestBitmapSource],GetMatchingNodes->[Any,ToString,SearchEntries,GetInputPortType,IsVisibleInLibrary,Where,GetAllFunctionGroups,LibraryServices,Add],InitializeDefaultAutoCompleteCandidates->[FirstOrDefault,Add]]]
Populates the AutoCompleteCandidates field of the NodeSearchElementViewModel with the nodes that match.
Ok, I think its other usage also leaks. I think you can cycle over the `FilteredResults` property of the `SearchViewModel` in its `Dispose` method and unsubscribe from its `SearchViewModelRequestBitmapSource` method for each `NodeSearchElementViewModel` in `FilteredResults`.
@@ -225,9 +225,14 @@ export class AmpAnalytics extends AMP.BaseElement { this.instrumentation_.createAnalyticsGroup(this.element); if (this.config_['transport'] && this.config_['transport']['iframe']) { + const ampAdResourceId = user().assert( + getAmpAdResourceId(this.element, this.win.to...
[No CFG could be retrieved]
Handle successful fetching of remote config. Check for not supported trigger for sandboxed analytics.
if you do assertString I believe it will save you the type cast below
@@ -98,6 +98,10 @@ public class KsqlSchemaRegistryClientFactory { } public SchemaRegistryClient get() { + if (schemaRegistryUrl.equals("")) { + return new DefaultSchemaRegistryClient(errorMessages); + } + final RestService restService = serviceSupplier.get(); final SSLContext sslContext =...
[KsqlSchemaRegistryClientFactory->[get->[get,create]]]
Get the next available schema registry client.
Trim the value before comparing it. If the value is " ", then this check will think there is a URL specified. I recommend trimming the value once in the constructor when assigning the string to the `schemaRegistryUrl` so we don't have to trim it every time we use it.
@@ -896,7 +896,7 @@ ilog_modify(daos_handle_t loh, const struct ilog_id *id_in, if (root->lr_tree.it_embedded && root->lr_id.id_epoch <= epr->epr_hi && root->lr_id.id_epoch >= epr->epr_lo) { - visibility = ilog_status_get(lctx, &root->lr_id, DAOS_INTENT_UPDATE); + visibility = ilog_status_get(lctx, &root->l...
[No CFG could be retrieved]
region Ilog functions END of ILOG_ILOG_INDEX.
I may need an explanation of this patch. We set "retry" to true here? What does that mean?
@@ -0,0 +1,14 @@ +package io.quarkus.amazon.lambda.http.deployment; + +import io.quarkus.runtime.annotations.ConfigItem; +import io.quarkus.runtime.annotations.ConfigRoot; + +@ConfigRoot +public class LambdaHttpBuildTimeConfig { + /** + * Enable security mechanisms to process lambda and AWS based security (i.e. ...
[No CFG could be retrieved]
No Summary Found.
Shouldn't this default to true? If lambda is sending a security principal I would assume it is for a reason?
@@ -19973,7 +19973,7 @@ Lowerer::GenerateFastStFld(IR::Instr * const instrStFld, IR::JnHelperMethod help { labelNext = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, isHelper); lastBranchToNext = LowererMD::GenerateLocalInlineCacheCheck(instrStFld, typeOpnd, opndInlineCache, lab...
[No CFG could be retrieved]
The method that handles the case where there is no other possible error in the function. region Method that can be called from the EHBailout.
>this->GetLowererMD()-> [](start = 12, length = 22) Why cannot use LowererMD:: to do static call?
@@ -466,6 +466,12 @@ class PythonTestsExtraEnvVars(StringSequenceField): ) +class SkipPythonTestsField(BoolField): + alias = "skip_tests" + default = False + help = "If true, don't run this target's tests." + + class PythonTests(Target): alias = "python_tests" core_fields = (
[_RequirementSequenceField->[compute_value->[parse,_format_invalid_requirement_string_error]],parse_requirements_file->[parse,_format_invalid_requirement_string_error],PexEntryPointField->[compute_value->[parse]]]
Computes the value of the timeout field. A target that is not a target of a python library is not a target of a python.
Not sure if it's worth mentioning why this is helpful? Like that the code can still be used with things like `./pants lint` and `./pants fmt`. Is that self-evident?