patch
stringlengths
18
160k
callgraph
stringlengths
4
179k
summary
stringlengths
4
947
msg
stringlengths
6
3.42k
@@ -362,13 +362,13 @@ public abstract class AbstractProcessingStrategyTestCase extends AbstractReactiv for (int j = 0; j < STREAM_ITERATIONS / CONCURRENT_TEST_CONCURRENCY; j++) { try { switch (mode) { - case BLOCKING: + case FLOW: flow.process(...
[AbstractProcessingStrategyTestCase->[asyncCpuLight->[process],ThreadTrackingProcessor->[apply->[getProcessingType,apply],process->[getName]],errorSuccessStream->[process],stream->[process],internalConcurrent->[process],multipleBlocking->[process],singleBlocking->[process],TestScheduler->[submit->[submit]],asyncCpuLigh...
Convenient method to test concurrent stream.
this code is very similar to the one in line 378. Can this be refactored to use the enums as strategies?
@@ -207,6 +207,8 @@ function $SanitizeProvider() { extend = angular.extend; forEach = angular.forEach; isDefined = angular.isDefined; + isArray = angular.isArray; + isObject = angular.isObject; lowercase = angular.$$lowercase; noop = angular.noop;
[No CFG could be retrieved]
Provides a function to check if a node has a unique identifier. Elements that you can intentionally leave open and close themselves.
no alphabetic ordering??
@@ -55,7 +55,7 @@ public class TestExpressionHandler { @Test public void testValidService() { runner.assertValid(expressionHandler); - assertThat(expressionHandler, instanceOf(ExpressionHandler.class)); + MatcherAssert.assertThat(expressionHandler, instanceOf(ExpressionHandler.class)); ...
[TestExpressionHandler->[testInvalidActionTypeIgnore->[assertTrue,enableControllerService,fail,assertEquals,Action,setType,getDebugMessage,isNotEmpty,setProperty,disableControllerService,put,setAttributes,execute],testValidActionType->[assertTrue,enableControllerService,fail,Action,setType,setProperty,disableController...
Test if the service is valid and if it is executed successfully.
Recommend static import for `assertThat`.
@@ -105,6 +105,7 @@ public abstract class AbstractTaskStateTracker extends AbstractIdleService imple @Override public void run() { + MDC.put(ConfigurationKeys.TASK_KEY_KEY, task.getTaskKey()); updateTaskMetrics(); // Log record queue stats/metrics of each fork for (Optional<Fork> f...
[AbstractTaskStateTracker->[scheduleTaskMetricsUpdater->[getStatusReportingInterval,scheduleAtFixedRate],startUp->[info],shutDown->[info,shutdownExecutorService,of],TaskMetricsUpdater->[updateTaskMetrics->[isEnabled,getWorkunit,updateByteMetrics,updateRecordMetrics],run->[debug,isPresent,updateTaskMetrics,getIndex,getF...
This method is called when the task is executed.
Is cleanup not done because the assumption is the task will always be run in a MDCPropagatingExecutorService that restores the original context?
@@ -27,8 +27,8 @@ public interface Http2RemoteFlowController extends Http2FlowController { * guarantee when the data will be written or whether it will be split into multiple frames * before sending. * <p> - * Manually flushing the {@link ChannelHandlerContext} is not required, since the flow - ...
[No CFG could be retrieved]
This class implements the logic for writing a single header or a single payload to a remote endpoint A helper to check for an error.
Should we have this method return a boolean that is `true` if a write occurred immediately? Would that help?
@@ -211,6 +211,8 @@ class Downloader(object): def progress_units(progress, total): + if total == 0: + return 0 return min(50, int(50 * progress / total))
[Downloader->[download->[download_chunks]],IterableToFileAdapter->[__iter__->[__iter__]],load_in_chunks->[read]]
Return a float representing the progress of a .
Same, submit to develop asap
@@ -309,7 +309,7 @@ func bumpLimit(oc *exutil.CLI, resourceName kapi.ResourceName, limit string) (ka func getMaxImagesBulkImportedPerRepository() (int, error) { max := os.Getenv("MAX_IMAGES_BULK_IMPORTED_PER_REPOSITORY") if len(max) == 0 { - return 0, fmt.Errorf("MAX_IMAGES_BULK_IMAGES_IMPORTED_PER_REPOSITORY nee...
[InternalAdminKubeClient,KubeClient,ParseDockerImageReference,By,SetOutputDir,Expect,HaveOccurred,NewQuantity,Delete,It,Atoi,NewDockerClient,Should,Args,Exact,Cmp,To,AdminKubeClient,Errorf,Namespace,ContainSubstring,Create,Equal,Output,NewCLI,Execute,ServiceAccounts,JustBeforeEach,LimitRanges,BuildAndPushImageOfSizeWit...
getMaxImagesBulkImportedPerRepository returns the maximum number of images to be imported per repository.
Is there any way to get at this from a client?
@@ -106,6 +106,7 @@ public class ReplicatedPolicy implements HAPolicy<LiveActivation> { this.networkHealthCheck = networkHealthCheck; this.voteOnReplicationFailure = voteOnReplicationFailure; this.quorumSize = quorumSize; + this.quorumVoteWait = quorumVoteWait; } public boolean isChe...
[ReplicatedPolicy->[getReplicaPolicy->[setClusterName]]]
Checks if the server is live or not.
Please perform some basic validation on the new parameter
@@ -58,7 +58,10 @@ curl_setopt($curl, CURLOPT_POSTFIELDS, $datastring); $ret = curl_exec($curl); $code = curl_getinfo($curl, CURLINFO_HTTP_CODE); if( $code == 200 ) { - return true; + $jiraout = json_decode($ret, true); + log_event("Created jira issue ".$jiraout['key']." for ".$device, $device, 'poller', 5); ...
[No CFG could be retrieved]
Check if the curl result is successful.
We already record alerts by transport. I don't think we should have individual log_events in here. You could convert them to d_echo() for debug or we'd need to find a way to allow the return of some data to be used in the central log_event() for alerts.
@@ -77,6 +77,10 @@ const ( // the vpn-seed-server pod. DeploymentNameVPNSeedServer = "vpn-seed-server" + // DeploymentNameExternalAuthz is a constant for the name of a Kubernetes deployment object that contains + // the external authorization server. + DeploymentNameExternalAuthz = "auth-server" + // Deployment...
[No CFG could be retrieved]
The names of the individual names of the individual objects that are part of the system.
Can we find a better deployment name? It's highly ambiguous. Also, I think it's enough to only have the `DeploymentName` constant in the respective package.
@@ -179,7 +179,7 @@ object_from_path(const char *dataset, const char *path, struct stat64 *statbuf, */ sync(); - err = dmu_objset_own(dataset, DMU_OST_ZFS, B_TRUE, FTAG, &os); + err = dmu_objset_own(dataset, DMU_OST_ZFS, B_TRUE, B_TRUE, FTAG, &os); if (err != 0) { (void) fprintf(stderr, "cannot open dataset...
[No CFG could be retrieved]
Reads a file system object from a path and returns the object number. This function calculates the real range of a node based on the type level and range.
I'm not sure that we actually need any decrypted data here. If we do require it to be decrypted, how does zinject get the keys?
@@ -111,10 +111,8 @@ class Order(models.Model, ItemSet): return '#%d' % (self.id, ) def get_total(self): - try: - return super(Order, self).get_total() - except AttributeError: - return Price(0, currency=settings.DEFAULT_CURRENCY) + # For backwards compatibilit...
[OrderedItem->[change_quantity->[save,get_total_quantity,get_items,update_delivery_cost,change_status],OrderedItemManager],DeliveryGroup->[can_ship->[is_shipping_required],update_delivery_cost->[save,get_delivery_total,is_shipping_required],change_status->[save],DeliveryGroupManager],Payment->[get_purchased_items->[get...
Get total order order tax.
I suggest adding warning.
@@ -77,13 +77,16 @@ def eval_model(opt, printargs=None, print_parser=None): print(world.display() + "\n~~") if log_time.time() > log_every_n_secs: report = world.report() - text, report = log_time.log(report['exs'], world.num_examples(), report) + text, report = ...
[eval_model->[time,print_args,parley,print,create_agent,parse_args,epoch_done,get,num_examples,log,create_task,isinstance,seed,float,TimeLogger,report,display],setup_args->[ParlaiParser,set_defaults,add_argument],eval_model,setup_args,parse_args]
Evaluates a model.
maybe before the report?
@@ -209,7 +209,11 @@ func (r *RemoteRuntimeService) StartContainer(containerID string) error { // StopContainer stops a running container with a grace period (i.e., timeout). func (r *RemoteRuntimeService) StopContainer(containerID string, timeout int64) error { - ctx, cancel := getContextWithTimeout(r.timeout) + c...
[CreateContainer->[CreateContainer],StopContainer->[StopContainer],PortForward->[PortForward],RemoveContainer->[RemoveContainer],Exec->[Exec],StopPodSandbox->[StopPodSandbox],Version->[Version],ListContainers->[ListContainers],PodSandboxStatus->[PodSandboxStatus],ListPodSandbox->[ListPodSandbox],Status->[Status],Remove...
StopContainer stops a container.
Wait - why do we get a context twice?
@@ -1193,6 +1193,13 @@ func (s *BlockingSender) Send(ctx context.Context, convID chat1.ConversationID, s.Debug(ctx, "Send: error in Prepare: %s", err) return nil, nil, err } + if !clearedCache && prepareRes.HasBlankTopicName { + s.Debug(ctx, "Send: encountered blank topic name state, clearing caches") + ...
[processReactionMessage->[getMessage],SendUnfurlNonblock->[Send],handleMentions->[getUsernamesForMentions],Send->[Prepare,deleteAssets,presentUIItem],Prepare->[processReactionMessage,handleMentions,addSenderToMessage,resolveOutboxIDEdit,addPrevPointersAndCheckConvID,Prepare,handleEmojis,getSupersederEphemeralMetadata,c...
Send implements ChatSender. Send. Leave or join a conversation. This function is called from the server when a topic name state is received from the server. This function is called when a MAC is missing KIDs for pairwise MACs.
Does this work right with non-team convs?
@@ -16,6 +16,8 @@ */ package org.apache.nifi.properties; +import static sun.security.util.KeyUtil.getKeySize; + import java.nio.charset.StandardCharsets; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException;
[AESSensitivePropertyProvider->[protect->[getName],unprotect->[getName]]]
Imports a single object. Package private for testing.
@alopresto this may not work everywhere.
@@ -3689,11 +3689,11 @@ // error if no name specified if ($name == "") - throw new BadRequestException('group name not specified'); + throw new HTTP\BadRequestException('group name not specified'); // error if no gid specified if ($gid == "") - throw new BadRequestException('gid not specified'); +...
[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->[...
Function to update a group api_format_data return group_update response.
Standards: Please add braces to this conditional statement.
@@ -515,6 +515,11 @@ GList *dt_collection_get_all(const dt_collection_t *collection, int limit) return list; } +GList *dt_collection_get_all(const dt_collection_t *collection, int limit) +{ + return dt_collection_get(collection,limit,FALSE); +} + int dt_collection_get_nth(const dt_collection_t *collection, int ...
[gchar->[dt_collection_get_makermodel,dt_collection_split_operator_datetime,dt_collection_split_operator_number,dt_collection_update],void->[dt_collection_hint_message],dt_collection_update_query->[dt_collection_set_extended_where,dt_collection_set_query_flags,dt_collection_get_filter_flags,dt_collection_set_filter_fla...
get all images in the collection get count of n - th column in collection.
spaces after colons
@@ -216,6 +216,7 @@ func SettingsProtectedBranchPost(ctx *context.Context, f auth.ProtectBranchForm) protectBranch.WhitelistDeployKeys = f.WhitelistDeployKeys protectBranch.RequiredApprovals = f.RequiredApprovals + protectBranch.EnableApprovalsWhitelist = f.EnableApprovalsWhitelist if strings.TrimSpace(f.Ap...
[IsErrUnsupportedVersion,Status,Redirect,StringsToInt64s,GetProtectedBranches,UpdateProtectBranch,HTML,Error,NotFound,TeamsWithAccessToRepo,GetReaders,Trace,HasError,IsOrganization,TrimSpace,Tr,ServerError,UpdateDefaultBranch,IsErrBranchNotExist,Join,GetProtectedBranchBy,IsBranchExist,SetDefaultBranch,FindRepoRecentCom...
Updates the protected branch with the given parameters. UpdateProtectBranch update protected branch.
Maybe if `EnableApprovalsWhitelist` or `EnableWhitelist` change to false the existing whitelist should be blanked? It may be a feature, but it can also look like a bug.
@@ -1453,9 +1453,7 @@ namespace System.Text if (GlobalizationMode.Invariant) { - // If the value isn't ASCII and if the globalization tables aren't available, - // case changing has no effect. - return value; + return UnsafeCreate(v...
[Rune->[UnicodeCategory->[ToString],TryGetRuneAt->[ReadRuneFromString],IsLetterOrDigit->[IsCategoryLetterOrDecimalDigit],GetNumericValue->[ToString,GetNumericValue],IsValid->[IsValid],IsNumber->[IsCategoryNumber],TryCreate->[TryCreate],IsPunctuation->[IsCategoryPunctuation],TryEncodeToUtf16->[TryEncodeToUtf16],TryEncod...
Returns the Rune that is uppercase if the value is in the case folding tables.
You can ignore the BMP check and write simply `UnsafeCreate(CharUnicodeInfo.ToUpper(value._value))`, just like you did for the lowercase method.
@@ -41,7 +41,9 @@ class SamlRequestPresenter end def ialmax_authn_context? - authn_context.include? Saml::Idp::Constants::IALMAX_AUTHN_CONTEXT_CLASSREF + authn_context.include?(Saml::Idp::Constants::IALMAX_AUTHN_CONTEXT_CLASSREF) || + (request.requested_authn_context_comparison == 'minimum' && + ...
[SamlRequestPresenter->[authn_request_bundle->[requested_attributes]]]
Check if there is an authentication context object that can be found in the request.
also check that IAL2 was _not_ passed
@@ -56,6 +56,11 @@ mem_pin_workaround(void) D_WARN("Failed to disable malloc fastbins: %d (%s)\n", errno, strerror(errno)); + /* Lock all pages */ + rc = mlockall(MCL_CURRENT | MCL_FUTURE); + if (rc) + D_ERROR("Failed to mlockall(); errno=%d\n", errno); + D_DEBUG(DB_ALL, "Memory pinning workaround ena...
[int->[D_GOTO,strerror,setenv,srand,mem_pin_workaround,D_ASSERT,D_RWLOCK_INIT,DP_RC,d_timeus_secdiff,rand,d_tm_add_metric,D_CASSERT,D_WARN,D_DEBUG,D_FREE,D_MUTEX_INIT,D_ALLOC_ARRAY,D_ERROR,d_getenv_int,mallopt,d_getenv_bool,dump_envariables,getpid,D_INIT_LIST_HEAD,D_INFO],inline->[getpid,strlen,D_DEBUG],crt_na_ofi_conf...
This function is used to disable memory pinning around on system - wide systems.
Should probably just be a warning.
@@ -1146,7 +1146,7 @@ export class AmpA4A extends AMP.BaseElement { attemptToRenderCreative() { // Promise may be null if element was determined to be invalid for A4A. if (!this.adPromise_) { - if (this.shouldInitializePromiseChain_()) { + if (this.shouldInitializePromiseChain_() && !this.fromRes...
[AmpA4A->[extractSize->[user,get,Number],tryExecuteRealTimeConfig_->[user,RealTimeConfigManager],constructor->[AmpAdUIHandler,AmpAdXOriginIframeHandler,generateSentinel,now,devAssert],tearDownSlot->[dev],streamResponse_->[dev],renderViaNameAttrOfXOriginIframe_->[NAMEFRAME,utf8Decode,dict,checkStillCurrent,user,getConte...
Attempt to render a creative.
so the issue was unnecessary error logs? nothing was broken right?
@@ -22,7 +22,7 @@ Assert.True(c.InvokedAt.HasValue); Assert.Greater(c.InvokedAt.Value - c.RequestedAt, TimeSpan.FromMilliseconds(5)); }) - .Run(TimeSpan.FromSeconds(20)); + .Run(TimeSpan.FromSeconds(60)); }...
[When_scheduling_a_recurring_task->[Task->[Run,FromSeconds],SchedulingEndpoint->[SetupScheduledAction->[Task->[FromMilliseconds,UtcNow,RequestedAt,FromResult,InvokedAt,ScheduleEvery]],config]]]
Tests if a task is not scheduled.
Should we let the transports affect this via the `ConfigureXYZTransport` class in some way?
@@ -33,6 +33,11 @@ public abstract class JobStatusRetriever implements LatestFlowExecutionIdTracker public abstract Iterator<JobStatus> getJobStatusesForFlowExecution(String flowName, String flowGroup, long flowExecutionId); + public Iterator<JobStatus> getJobStatusesForFlowExecution(String flowName, Strin...
[JobStatusRetriever->[getLatestJobStatusByFlowNameAndGroup->[getJobStatusesForFlowExecution]]]
This method returns all job statuses for a given flow execution.
Make this abstract since a reasonable implementation is required for a fully functional `JobStatusRetriever`.
@@ -701,7 +701,7 @@ class TorchAgent(ABC, Agent): self.id = type(self).__name__.replace("Agent", "") # now set up any fields that all instances may need - self.EMPTY = torch.LongTensor([]) + self.EMPTY = torch.zeros(0, dtype=torch.long) self.NULL_IDX = self.dict[self.dict.null...
[History->[_update_vecs->[parse],update_history->[_update_raw_strings,_update_vecs,_update_strings],add_reply->[_update_raw_strings,_update_vecs,_update_strings]],TorchAgent->[_vectorize_text->[_add_start_end_tokens],_set_text_vec->[get_history_str,_check_truncate,get_history_vec],vectorize->[_set_text_vec,_set_label_c...
Initialize the object with the given options. Initialize all the necessary variables based on the passed in object.
Interesting - is this a subtly different empty tensor than before?
@@ -17,6 +17,7 @@ class CreateUsersTable extends Migration $table->increments('id'); $table->string('name'); $table->string('email')->unique(); + $table->boolean('email_verified')->default(false); $table->string('password'); $table->rememberTok...
[CreateUsersTable->[up->[string,unique,increments,rememberToken,timestamps]]]
Create the user table.
What about a timestamp here (confirmed_at)? You can check using a getter, and you get to know the consent date
@@ -59,7 +59,7 @@ namespace System.Security.Cryptography try { bool success = protect ? - Interop.Crypt32.CryptProtectData(ref userDataBlob, null, ref optionalEntropyBlob, IntPtr.Zero, IntPtr.Zero, flags, out outputBlob) : + ...
[ProtectedData->[ErrorMayBeCausedByUnloadedProfile->[ERROR_FILE_NOT_FOUND,E_FILENOTFOUND],ProtectOrUnprotect->[Copy,Cryptography_DpApi_ProfileMayNotBeLoaded,LocalMachine,CryptUnprotectData,ErrorMayBeCausedByUnloadedProfile,cbData,ToCryptographicException,FreeHGlobal,CRYPTPROTECT_LOCAL_MACHINE,CRYPTPROTECT_UI_FORBIDDEN,...
Protect or unprotect a given block of data. private static final int outputBlob. cbData = 0 ;.
This doesn't seem right....
@@ -93,6 +93,7 @@ final class Configuration implements ConfigurationInterface ->booleanNode('enable_entrypoint')->defaultTrue()->info('Enable the entrypoint')->end() ->booleanNode('enable_docs')->defaultTrue()->info('Enable the docs')->end() ->booleanNode('enable_profi...
[Configuration->[addExceptionToStatusSection->[end],addFormatSection->[end],getConfigTreeBuilder->[root,addExceptionToStatusSection,addFormatSection,end]]]
Returns a TreeBuilder instance for the API platform configuration. Eager loading configuration This function is called to display information about the API key. This method is used to enable or disable pagination for all resource collections.
It should default to the value of `interface_exists(WorkflowInterface::class)`. May I suggest: 'Enable the integration with the Symfony Workflow component.'?
@@ -78,7 +78,9 @@ public class FireAa implements IExecutable { final List<Unit> allEnemyUnitsAliveOrWaitingToDie, final List<String> aaTypes) { this.attackableUnits = - CollectionUtils.getMatches(attackableUnits, Matches.unitIsNotInfrastructure()); + CollectionUtils.getMatches( + ...
[FireAa->[selectCasualties->[getAaCasualties,getName,notifyDice],notifyCasualtiesAa->[getKilled,getDamaged,getName,casualtyNotification,Thread,start,enterDelegateExecution,confirmOwnCasualties,join,confirmEnemyCasualties,leaveDelegateExecution],execute->[newFiringUnitGroups,unitIsOfTypes,getData,get,or,push,getMatches,...
Creates a new instance of the class based on the given parameters. Firing units.
This is the actual fix.
@@ -166,7 +166,17 @@ class Profile } } - $profile = !empty($user['uid']) ? User::getOwnerDataById($user['uid'], false) : []; + if (empty($user['uid'])) { + $profile = []; + } else { + $contact_id = Contact::getIdForURL(Strings::normaliseLink(DI::baseurl() . '/profile/' . $nickname), local_user()); + $...
[Profile->[getThemeUid->[get],searchProfiles->[get],sidebar->[t,get],getBirthdays->[isMobile,getDay,get,set,t],openWebAuthInit->[t,getHostname,getQueryString],getEventsReminderHTML->[t,isMobile,getDay],zrlInit->[getCommand,get,getQueryString,isSuccess,set],load->[get,getQueryString,getCurrentTheme,setCurrentTheme,setCu...
Load user profile data This function is called when a user is logged in and the user s theme is not set.
What is this code meant to do - in difference to calling `User::getOwnerDataById`? If you just want to fetch the contact id for the user that you are just visiting, then you could use `$profile['url']` from the `User::getOwnerDataById` call.
@@ -32,11 +32,15 @@ import java.util.Arrays; */ public class StorageLocationTest { + @Rule + public final TemporaryFolder temporaryFolder = new TemporaryFolder(); + @Test public void testStorageLocation() throws Exception { long expectedAvail = 1000L; - StorageLocation loc = new StorageLocation(n...
[StorageLocationTest->[makeSegment->[Interval,DataSegment,asList,of],testStorageLocation->[removeSegment,verifyLoc,makeSegment,addSegment,StorageLocation,File],verifyLoc->[assertTrue,canHandle,available,assertEquals,valueOf]]]
Test if storage location is available.
Can this just be `newFolder()`? The `/tmp` requirement previously existing is probably a bug in the testing procedure.
@@ -95,6 +95,7 @@ public class SessionCreateConsumerMessage extends QueueAbstractPacket { buffer.writeNullableSimpleString(filterString); buffer.writeBoolean(browseOnly); buffer.writeBoolean(requiresResponse); + buffer.writeInt(priority); } @Override
[SessionCreateConsumerMessage->[hashCode->[hashCode],toString->[toString],equals->[equals]]]
Encode rest.
I will write it as a byte, if we don't plan to support more then 127 priorities, consumer-side: but as I've said is a negligible save of space on the wire
@@ -61,13 +61,6 @@ class EinsumOpTest(xla_test.XLATestCase): np.array([[8]], dtype=dtype), expected=np.array([[-2]], dtype=dtype)) - with compat.forward_compatibility_horizon(2019, 10, 19): - self._testBinary( - lambda x, y: special_math_ops.einsum('ij,jk->ik', x, y), - ...
[EinsumOpTest->[testImplicitForm->[_testBinary],testMatMul->[_testBinary],testReducedIndices->[_testBinary],testUnary->[_testUnary]]]
Test matrix multiplication.
You probably should just delete this line and leave the `self._testBinary` there?
@@ -328,7 +328,7 @@ describe AdminCensorRuleController do before(:each) do @user = FactoryGirl.create(:user) - @censor_rule_params = FactoryGirl.build(:user_censor_rule, :user => @user).serializable_hash + @censor_rule_params = FactoryGirl.attributes_for(:user_censor_rule, :user => @user...
[create_censor_rule->[post,id],create,admin_request_censor_rules_path,describe,match_array,it,put,serializable_hash,map,to,before,post,admin_user_path,public_body,require,user,dirname,receive,id,delete,redirect_to,context,admin_body_censor_rules_path,build,admin_body_path,get,admin_user_censor_rules_path,basic_auth_log...
create a censor rule for the user.
Line is too long. [91/80]
@@ -641,10 +641,16 @@ static int kpb_copy(struct comp_dev *dev) /* In normal RUN state we simply copy to our sink. */ sink = kpb->sel_sink; + if (!sink) { + comp_err(dev, "kpb_copy(): no sink."); + ret = -EINVAL; + goto out; + } + buffer_lock(sink, &flags); /* Validate sink */ - if (!sink || !s...
[No CFG could be retrieved]
Reads the specified number of bytes from the source and sink buffers and copies them to the sink buffer data internally in history buffer for future copy.
Missing buffer_unlock(source, flags)?
@@ -84,6 +84,18 @@ from apache_beam.metrics.metric import MetricsFilter from apache_beam.options.pipeline_options import PipelineOptions from apache_beam.options.pipeline_options import SetupOptions +# Protect against environments where datastore library is not available. +# pylint: disable=wrong-import-order, wron...
[read_from_datastore->[make_ancestor_query],write_to_datastore->[EntityWrapper],run->[read_from_datastore,write_to_datastore],run]
Initialize the object with all the metrics.
Maybe we should be able to skip the test is we're unable to install Datastore? What happens if Datastore is not available and we run the test?
@@ -42,6 +42,10 @@ class TestDefaultOutput(TestDvc): class TestShouldRemoveOutsBeforeImport(TestDvc): + @pytest.fixture(autouse=True) + def use_mocker(self, mocker): + self.mocker = mocker + def setUp(self): super().setUp() tmp_dir = self.mkdtemp()
[TestImportFilename->[test->[assertTrue,exists,assertEqual,join,mkdir,remove,main],setUp->[write,mkdtemp,super,join,open]],test_import_url_to_dir->[isdir,imp_url,join,gen,makedirs,read_text],TestDefaultOutput->[test->[assertTrue,write,mkdtemp,uuid4,assertEqual,str,read,join,exists,open,main]],TestShouldRemoveOutsBefore...
Set up the object and write the file to disk.
This can also be refactored. prepare external resource using tmp_path_factory fixture (eg `tmp_path_factory.mktemp("external_source") / "file"`
@@ -44,6 +44,12 @@ public class TestJdbcIntegrationSmokeTest return createH2QueryRunner(ImmutableList.copyOf(TpchTable.getTables()), properties); } + @Override + protected TestTable createTableWithDefaultColumns() + { + throw new SkipException("requirement not met"); + } + @Test ...
[TestJdbcIntegrationSmokeTest->[testUnknownTypeAsIgnored->[of,getName,assertUpdate,unsupportedTypeHandling,format,getSqlExecutor,assertQuery,TestTable],cleanUpSchemas->[format,execute],createQueryRunner->[copyOf,createH2QueryRunner,getTables],testUnknownTypeAsVarchar->[of,getName,assertUpdate,unsupportedTypeHandling,fo...
create a query runner that queries for unknown type.
What kind of a requirement is not met? Please be more specific. Is there anything preventing testing of the feature with H2?
@@ -982,7 +982,8 @@ ds_mgmt_drpc_list_pools(Drpc__Call *drpc_req, Drpc__Response *drpc_resp) D_GOTO(out, rc = -DER_NOMEM); uuid_unparse(pools[i].lp_puuid, resp.pools[i]->uuid); - rc = rank_list_to_pool_svcreps(svc, resp.pools[i]); + rc = rank_list_to_uint32_array(svc, &resp.pools[i]->svcreps, + &r...
[No CFG could be retrieved]
Get all the the nodes in the system. This function returns the list of specific objects.
(style) line over 80 characters
@@ -27,11 +27,11 @@ class Gdbm(AutotoolsPackage, GNUMirrorPackage): version('1.9', sha256='f85324d7de3777db167581fd5d3493d2daa3e85e195a8ae9afc05b34551b6e57') depends_on("readline") - patch('gdbm.patch', when='@:1.18 %gcc@10:') - patch('gdbm.patch', when='@:1.18 %clang@11:') - patch('gdbm.patch',...
[Gdbm->[depends_on,version,patch]]
Configure command line arguments for GDBM.
this is not necessary since :1.18 is inclusive -- covers everything < 1.19. but also it doesn't hurt.
@@ -0,0 +1,12 @@ +class CreateUspsConfirmationCodes < ActiveRecord::Migration[5.1] + def change + create_table :usps_confirmation_codes do |t| + t.integer :profile_id, null: false + t.string :otp_fingerprint, null: false + t.datetime :code_sent_at, null: false, default: ->{ 'CURRENT_TIMESTAMP' } + ...
[No CFG could be retrieved]
No Summary Found.
does this need to be a function? `CURRENT_TIMESTAMP()` ? Also does it need to be a proc or can it be a literal value?
@@ -77,8 +77,7 @@ module Dependabot error_handling ? handle_bundler_errors(e) : raise end - # TODO: Use/remove argument - def in_a_native_bundler_context(_error_handling: true) + def in_a_native_bundler_context(error_handling: true) SharedHelpers. in_a_...
[UpdateChecker->[inaccessible_git_dependencies->[in_a_temporary_bundler_context],jfrog_source->[in_a_temporary_bundler_context]]]
In a Bundler context yields a from within a temporary directory.
This should probably implement the same retrying logic as the helper it is replacing, I just wanted to check the definition of retry-able errors still applied.
@@ -317,12 +317,12 @@ func TestIntegration_ExternalAdapter_RunLogInitiated(t *testing.T) { gethClient.On("ChainID", mock.Anything).Return(app.Config.ChainID(), nil) sub.On("Err").Return(nil).Maybe() sub.On("Unsubscribe").Return(nil).Maybe() - newHeads := make(chan<- *models.Head, 10) + newHeadsCh := make(chan cha...
[CreateExternalInitiatorViaWeb,NewAddress,SetSpecID,MustAddRandomKeyToKeystore,Eur,HandlerFunc,WaitForRuns,JobRunStays,Transfer,NewTask,MinimumContractPayment,Usd,MustReadFile,CreateJobSpecViaWeb,FindExternalInitiator,MustRandomUser,SetAuthorizedSender,SendTransaction,DeployMultiWordConsumer,Stop,Accounts,WaitForJobRun...
TestIntegration_ExternalAdapter_RunLogInitiated tests that the job is started and then MockServer mock server.
@RyanRHall I think this is the cause of the flakiness, the Run wasn't blocking
@@ -39,6 +39,9 @@ import org.mule.runtime.core.api.processor.Sink; import org.mule.runtime.core.api.processor.strategy.ProcessingStrategy; import org.mule.runtime.core.internal.util.rx.RejectionCallbackExecutorServiceDecorator; import org.mule.runtime.core.privileged.event.BaseEventContext; +import org.reactivestrea...
[StreamEmitterProcessingStrategyFactory->[StreamEmitterProcessingStrategy->[RoundRobinReactorSink->[emit->[emit],dispose->[dispose,prepareDispose],accept->[accept],prepareDispose->[prepareDispose]],createSink->[stopSchedulersIfNeeded,create],getNonBlockingTaskScheduler->[getNonBlockingTaskScheduler],stop->[stop],checkC...
Imports a single object that represents a reactor. Imports a single - node package for a Reactor streams.
static imports go first
@@ -234,13 +234,6 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) { return } - if ctx.Repo.Owner.IsOrganization() { - if !ctx.Repo.Owner.IsOwnedBy(ctx.User.ID) { - ctx.Error(404) - return - } - } - if !repo.IsMirror { ctx.Error(404) return
[Handle,ChangeCollaborationAccessMode,IsUserExist,RemoveUsernameParameterSuffix,GetRepositoryByName,Redirect,Info,HasPrefix,Add,NewRepoRedirect,RenderWithErr,TransferOwnership,IsErrRepoNotExist,IsErrKeyUnableVerify,HTML,Error,Link,CleanUpMigrateInfo,TimeStampNow,Hooks,AddDuration,IsErrNameReserved,ChangeRepositoryName,...
RepoID - The ID of the repository in which the settings are stored. Convert a user to another owner.
These can be removed, because we have already checked `ctx.Repo.IsOwner()`.
@@ -275,6 +275,9 @@ public class RunNiFi { case "env": runNiFi.env(); break; + case "status-history": + runNiFi.statusHistory(dumpFile, statusHistoryDays); + break; } if (exitStatus != null) { System.e...
[RunNiFi->[loadProperties->[getStatusFile],getStatus->[isProcessRunning,loadProperties,isPingSuccessful],sendRequest->[loadProperties],main->[RunNiFi,printUsage],start->[getCurrentPort,getStatusFile,getLockFile,start,isAlive,savePidProperties,getHostname],env->[getStatus],status->[isProcessRunning,getStatus],savePidPro...
Main method for the command line tool. System. exit if not running.
Minor: just by the nature of the things, it migh make sense to move this just below the `diagnostic`
@@ -0,0 +1,18 @@ +from graphene import relay + +from ...page import models +from ..core.types import CountableDjangoObjectType + + +class Page(CountableDjangoObjectType): + class Meta: + model = models.Page + interfaces = [relay.Node] + + +def resolve_pages(info): + return models.Page.objects.public...
[No CFG could be retrieved]
No Summary Found.
Maybe this would fit better in `/dashboard/graphql/`, since this is regular resolver but for the dashboard API?
@@ -611,6 +611,9 @@ namespace ProtoCore.Utils /// <returns></returns> public static AssociativeNode CreateNodeFromString(string name) { + if (name == null) + return null; + string[] strIdentList = name.Split('.'); if (strIdentList.Length =...
[CoreUtils->[InsertPredefinedMethod->[InsertBinaryOperationMethod,InsertUnaryOperationMethod],LogWarning->[LogWarning],GetResolvedClassName->[GetIdentifierStringUntilFirstParenthesis],BuildASTList->[BuildASTList],IsGetterSetter->[IsSetter,IsGetter],LogSemanticError->[LogSemanticError,LogWarning],TryGetPropertyName->[Is...
Create a node from a string.
How about checking for `if string.IsNullOrEmpty(name)`?
@@ -98,6 +98,16 @@ public class TestClientOptions new ClientResourceEstimate("resource2", "2.2h"))); } + @Test + public void testExtraCredentials() + { + Console console = singleCommand(Console.class).parse("--extra-credential", "test.token.foo=foo", "--extra-credential", "test.t...
[TestClientOptions->[testSource->[ClientOptions,assertEquals,getSource,toClientSession],testInvalidCharsetPropertyName->[ClientSessionProperty],testServerHttpUri->[ClientOptions,assertEquals,toString,toClientSession],testServerHttpsUri->[ClientOptions,assertEquals,toString,toClientSession],testServerHostOnly->[ClientOp...
Test if the command line options specify a resource estimate and a session property.
what if user add two credentials with the same key and different values?
@@ -78,7 +78,7 @@ export class AmpAnalytics extends AMP.BaseElement { * @private {?string} Predefined type associated with the tag. If specified, * the config from the predefined type is merged with the inline config */ - this.type_ = null; + this.type_ = this.element.getAttribute('type'); ...
[No CFG could be retrieved]
Creates an AMP Analytics object for the given tag. The global variable service and crypto service for the given window.
this might lead to a bug, see #10058
@@ -654,8 +654,8 @@ namespace System.Linq /// </summary> /// <typeparam name="T">The type of element contained by the collection.</typeparam> /// <param name="immutableArray"></param> + /// <exception cref="ThrowNullRefIfNotInitialized">Thrown if the collection is empty.</exception> ...
[ImmutableArrayExtensions->[ToDictionary->[ToDictionary],T->[Any],SelectMany->[SelectMany],Where->[Where],Select->[Select]]]
ToArray<T > - > To array.
Hi, Make sure you add using statement for namespace for give type in that file!
@@ -158,7 +158,7 @@ public class SqlOperators { SqlFunctionCategory.USER_DEFINED_FUNCTION); } - private static SqlUserDefinedAggFunction createUdafOperator( + public static SqlUserDefinedAggFunction createUdafOperator( String name, SqlReturnTypeInference returnTypeInference, AggregateFunction fun...
[SqlOperators->[toSql->[createSqlType,toSql],createUdfOperator->[createUdfOperator],createSqlType->[createSqlType]]]
Create a Zeta function.
This (and `createUdfOperator`) is intended to be a (slightly hacky) helper function for implementing ZetaSQL operators via the UDF interface. Why do you need to make them public?
@@ -22,7 +22,11 @@ included file COSL.txt. */ -#include <generic_agent.h> +#include <platform.h> +#include <cf-key-functions.h> + +#include <openssl/bn.h> /* BN_*, BIGNUM */ +#include <openssl/rand.h> /* RAND_* */ #include <lastseen.h> #inc...
[No CFG could be retrieved]
Reads a single from a file. Reads the public key from the file pointer.
Shouldn't cf-key-functions.h be first ?
@@ -77,12 +77,7 @@ def cat_files_process_request_input_snapshot(cat_exe_req): @rule(Concatted, [Select(CatExecutionRequest)]) def cat_files_process_result_concatted(cat_exe_req): - # FIXME(cosmicexplorer): we should only have to run Get once here. this: yield - # Get(ExecuteProcessResult, CatExecutionRequest, cat...
[javac_compile_sources_execute_process_request->[argv_from_source_snapshot],IsolatedProcessTest->[test_javac_compilation_example_success->[JavacCompileRequest,create_javac_compile_rules,JavacSources,BinaryLocation],test_javac_compilation_example_failure->[JavacCompileRequest,create_javac_compile_rules,JavacSources,Bina...
Get the result of cat_files_process_request_input_snapshot and cat_.
There are two more of these intermediate request tests we can clean up, too :)
@@ -211,11 +211,9 @@ public class RemoteMessengerTest { final UnifiedMessenger serverUnifiedMessenger = new UnifiedMessenger(server); final RemoteMessenger clientRemoteMessenger = new RemoteMessenger(new UnifiedMessenger(client)); clientRemoteMessenger.registerRemote(new TestRemote(), test); - ...
[RemoteMessengerTest->[testShutDownClient->[shutdownServerAndClient],testMethodReturnsOnWait->[shutdownServerAndClient],testRemoteCall2->[shutdownServerAndClient]]]
shutdown the client and server remotes.
These assertions are no longer necessary because Awaitility will throw an exception if the condition is not met within the specified timeout.
@@ -56,6 +56,10 @@ public class HiveAvroSerDeManager extends HiveSerDeManager { public static final boolean DEFAULT_USE_SCHEMA_FILE = false; public static final String SCHEMA_FILE_NAME = "schema.file.name"; public static final String DEFAULT_SCHEMA_FILE_NAME = "_schema.avsc"; + public static final String SCHE...
[HiveAvroSerDeManager->[getDirectorySchema->[getDirectorySchema]]]
Creates an instance of HiveSerDeManager which can be used to register Avro tables and partitions This method initializes the HadoopFileSystem object.
dots between words .. but I see you tried to follow naming convention of other config keys. may be we can break convention to do the right thing?
@@ -313,7 +313,7 @@ func (node *Node) addPendingStakingTransactions(newStakingTxs staking.StakingTra } } node.pendingStakingTxMutex.Unlock() - utils.Logger().Info().Int("length of newStakingTxs", len(newStakingTxs)).Int("totalPending", len(node.pendingTransactions)).Msg("Got more staking transactions") + utils.L...
[AddPendingTransaction->[tryBroadcast,addPendingTransactions],StartServer->[startRxPipeline],countNumTransactionsInBlockchain->[Blockchain],getTransactionsForNewBlock->[Blockchain],AddPendingStakingTransaction->[addPendingStakingTransactions],CalculateInitShardState->[Blockchain],Blockchain,Beaconchain]
addPendingStakingTransactions adds new staking transactions to the list of pending staking transactions.
do we have staking transaction?
@@ -107,14 +107,10 @@ void ItemStack::deSerialize(std::istream &is, IItemDefManager *itemdef) is>>material; u16 materialcount; is>>materialcount; - // Convert old materials - if(material <= 0xff) - material = content_translate_from_19_to_internal(material); if(material > 0xfff) throw SerializationEr...
[removeItem->[addItem,takeItem],addItem->[addItem],takeItem->[ItemStack],clearContents->[getSize,deleteItem],roomForItem->[itemFits],serialize->[serialize,getSize],getFreeSlots->[getUsedSlots,getSize],deSerialize->[clearItems,deSerialize,clear],clear->[clear],moveItem->[ItemStack,changeItem,takeItem,addItem],getItemStr...
De - serialize an item definition. This method reads the name of the object that contains the object that contains the object that contains Read the items in the item tree.
this whole section is rendered useless as `legacy_nimap` is not populated
@@ -768,17 +768,6 @@ func (a *AgentPoolProfile) validateCustomNodeLabels(orchestratorType string) err return nil } -func (a *AgentPoolProfile) validateKubernetesDistro() error { - switch a.Distro { - case AKS, AKS1804, Ubuntu1804: - if a.IsNSeriesSKU() { - return errors.Errorf("The %s VM SKU must use the %s or ...
[validateImageNameAndGroup->[New],validateStorageProfile->[Errorf],validateOrchestratorSpecificProperties->[ValidateDNSPrefix,New,Var,Errorf],validateNetworkPlugin->[Errorf],validateProperties->[New],validateMasterProfile->[validateImageNameAndGroup,ValidateDNSPrefix,New,Warnf,IsClusterAllVirtualMachineScaleSets,IsVirt...
validateCustomNodeLabels validates the CustomNodeLabels of an agent pool profile.
since we're removing the "GPU needs to use ubuntu 16.04" validation let's run a test to verify that GPU + 18.04 works
@@ -44,7 +44,7 @@ namespace Dynamo.UI.Views private void OnClickLink(object sender, RoutedEventArgs e) { - Process.Start("https://github.com/DynamoDS/Dynamo"); + Process.Start("http://dynamobim.org/"); } }
[RichTextFile->[OnFileChanged->[File,Document,ReadFile],HandleHyperlinkClick->[Start,Source,ToString,Handled],ReadFile->[ReadWrite,ContentEnd,Exists,Close,Rtf,Open,Read,Load,ContentStart],SetValue,GetValue,RequestNavigateEvent,AddHandler,Register],AboutWindow->[OnClickLink->[Start],OnPreviewMouseDown->[ignoreClose],Han...
OnClickLink - click link.
Just want to make sure this is intentional?
@@ -74,6 +74,16 @@ const squareImgUrl = width => { return `http://picsum.photos/${width}?${randInt(50)}`; }; +const randomFalsy = () => { + const rand = Math.floor(Math.random() * Math.floor(3)); + switch (rand) { + case 1: return null; + case 2: return undefined; + case 3: return ''; + default: ret...
[No CFG could be retrieved]
List of items in a category. This route provides a list of items that can be scrollable in a random order.
`Math.floor(3)` is just `3`.
@@ -37,7 +37,7 @@ define([ * The default alpha blending value of this provider, usually from 0.0 to 1.0. * This can either be a simple number or a function with the signature * <code>function(frameState, layer, x, y, level)</code>. The function is passed the - * current frame stat...
[No CFG could be retrieved]
Provides imagery for a given object. This function is used to determine the brightness value of a .
We're not linking to `FrameState` because it's private now. @pjcozzi does that mean we should change these callbacks to not take a `FrameState` anymore? The intention was to allow the alpha, etc. to vary with time, camera location, etc. but I'm not aware of anyone using the feature.
@@ -244,6 +244,8 @@ def check_ownership(users, minimum_owner_count=3): def _create_parser(): parser = argparse.ArgumentParser() + # Note --py3 flag must be passed as first arg + parser.add_argument("-3", "--py3", action="store_true", default=False, help="Release any non-universal packages as Python 3.") subp...
[all_packages->[contrib_packages],build_and_print_packages->[all_packages],check_ownership->[banner,check_ownership,all_packages],contrib_packages->[Package],Package->[owners->[latest_version]],all_packages,build_and_print_packages,check_ownership,get_pypi_config,_create_parser,exists,owners,Package,find_platform_name]
Create a parser for the command.
It's not clear why this is true... would be good to expand.
@@ -784,10 +784,10 @@ class SmartContentQueryBuilderTest extends SuluTestCase ); $result = $this->contentQuery->execute('sulu_io', ['en'], $builder); - $this->assertEquals('QWERTZ', $result[0]['title']); - $this->assertEquals('qwertz', $result[1]['title']); - $this->assertEquals...
[SmartContentQueryBuilderTest->[testOrderByOrder->[orderByProvider],testProperties->[propertiesProvider],testExcluded->[propertiesProvider],testWebsiteTags->[tagsProvider],testOrderBy->[orderByProvider],testExtension->[propertiesProvider],testTags->[tagsProvider],testIncludeSubFolder->[datasourceProvider],testTagsBoth-...
testOrderBy - test method finds a node with the given uuid and sets it as default and qwertz.
Looks like I've made some changes that broke this and the next test (although I can't find out which ones...) But after looking at this test I came to the conclusion that these tests are unpredictable anyway. The title will be lowered for the query, so you can't really say if `asdf` or `ASDF` will come first. It's also...
@@ -95,6 +95,9 @@ def train(use_cuda, save_dirname): # event.epoch + 1, float(avg_cost), float(acc))) # if math.isnan(float(avg_cost)): # sys.exit("got NaN loss, training failed.") + elif isinstance(event, fluid.EndStepEvent): + print("Step {0...
[train->[train],train_program->[inference_program],infer->[infer],main->[train,infer],main]
Trains the model on the n - node node. reader for nseq file.
`event.metrics` is a list of returned LoDTensor.
@@ -150,6 +150,17 @@ class AddonFormBasic(AddonFormBase): def clean_slug(self): return clean_addon_slug(self.cleaned_data['slug'], self.instance) + def clean_contributions(self): + if not self.cleaned_data['contributions']: + return self.cleaned_data['contributions'] + hostna...
[AddonFormMedia->[__init__->[icons]],EditThemeOwnerForm->[save->[save]],BaseCategoryFormSet->[save->[save]],AddonFormBase->[clean_slug->[clean_addon_slug],clean_tags->[clean_tags]],ThemeForm->[save->[save]],AddonFormBasic->[clean_slug->[clean_addon_slug],save->[get_tags,save],__init__->[get_tags]],EditThemeForm->[clean...
Clean the slug and return the add - on form object.
`hostname.endswith(amo.VALID_CONTRIBUTION_DOMAINS)` should work, no need for a loop
@@ -137,7 +137,15 @@ class ShareLeaseClient(object): proposed_lease_id=proposed_lease_id, timeout=kwargs.pop('timeout', None), cls=return_response_headers, + **kwargs) if isinstance(self._client, FileOperations) \ + else self._client.chang...
[ShareLeaseClient->[change->[get,process_storage_error,pop,change_lease],acquire->[get,acquire_lease,pop,process_storage_error],__exit__->[release],break_lease->[pop,get,break_lease,process_storage_error],release->[get,pop,process_storage_error,release_lease],__init__->[str,TypeError,uuid4,hasattr]],TypeVar]
Changes the lease ID of an active lease.
you don't have to check if it's a FileOperations instance, since when you call acquire_lease on the given self._client, the corresponding acquire_lease will be auto detected and called no matter it's in FileOperations or ShareOperations
@@ -21,7 +21,7 @@ final class ContainerImageUtil { return false; } - return !hasRegistry(containerImageInfo.getImage()) - && !Capability.CONTAINER_IMAGE_S2I.equals(activeContainerImageCapability.get()); + return !containerImageInfo.getRegistry().isPresent() + ...
[ContainerImageUtil->[isRegistryMissingAndNotS2I->[getActiveContainerImageCapability,equals,getImage,isPresent,get,hasRegistry]]]
Checks if the image is missing and not the S2I image.
This was incorrectly checking the enum against the string
@@ -126,6 +126,11 @@ public class DefaultApplicationFactory extends AbstractDeployableArtifactFactory pluginDependenciesResolver.resolve(domain.getDescriptor().getPlugins(), new ArrayList<>(getArtifactPluginDescriptors(descriptor))); + // Refreshes the list of p...
[DefaultApplicationFactory->[createArtifact->[DefaultMuleApplication,resolve,MuleApplicationPolicyProvider,DefaultPolicyTemplateFactory,getArtifactLocation,setApplication,build,getPlugins,DefaultPolicyInstanceProviderFactory,getApplicationDomain,createArtifactPluginList,ApplicationWrapper,getArtifactPluginDescriptors,c...
Create an application from the given application descriptor.
I don't like this as it is modifying the descriptor, other approach would be to have a resolvedPlugins field and set the list of plugins descriptor as they were resolved (using semver and also depending on what are the plugins already defined at the domain level)
@@ -61,6 +61,11 @@ final class TypeBuilder implements TypeBuilderInterface } $shortName .= 'Payload'; } + if ('item_query' === $queryName) { + $shortName .= 'Item'; + } elseif ('collection_query' === $queryName) { + $shortName .= 'Collection'; + ...
[TypeBuilder->[getResourceObjectType->[getResourceObjectType],isCollection->[isCollection]]]
Returns the GraphQL type for the given resource class. Returns a type for the object that can be used to perform a mutation.
Please use an `if` instead of an `elseif`.
@@ -75,5 +75,5 @@ class CallbackHandler: """ for event_handler in self._callbacks.get(event, []): if self.verbose: - logger.info(f"event {event} -> {event_handler}") + print(f"event {event} -> {event_handler.name}") event_handler.handler(self.sta...
[_is_event_handler->[ismethod,hasattr],CallbackHandler->[fire_event->[info,handler,get],callbacks->[list,values],add_callback->[getattr,_callbacks,EventHandler,getmembers],__init__->[add_callback,defaultdict]],getLogger]
Run all callbacks for the provided event.
Did you mean to leave this in?
@@ -1239,6 +1239,7 @@ namespace System.Xml.Serialization return 0; } + [RequiresUnreferencedCode("creates XmlAttributes")] private static Type? GetEnumeratorElementType(Type type, ref TypeFlags flags) { if (typeof(IEnumerable).IsAssignableFrom(type))
[TypeScope->[GetTypeDesc->[GetTypeDesc],GetTypeMappingFromTypeDesc->[TypeDesc],GetSettableMembers->[TypeDesc,GetSettableMembers],TypeDesc->[FindCommonBaseTypeDesc->[],CheckSupported->[],GetTypeDesc,ToString,CheckSupported,CheckNeedConstructor],GetArrayElementType->[IsArraySegment],GetAllMembers->[GetAllMembers],AddSoap...
Get the constructor flags for the given type. Get the type of the enumeration that can be added to.
Does this still need to be `RequiresUnreferencedCode` now that `XmlAttributes` is no longer marked as unsafe? If it doesn't, i think a bunch of other stuff could be unmarked as well, like `ImportTypeDesc` and `GetTypeDesc`, which means other things, maybe even that static ctor issue could just go away.
@@ -32,7 +32,7 @@ public class ControlledTimeService extends DefaultTimeService { return Instant.ofEpochMilli(currentMillis); } - public void advance(long time) { + public synchronized void advance(long time) { if (time <= 0) { throw new IllegalArgumentException("Argument must be great...
[ControlledTimeService->[time->[toNanos],advance->[IllegalArgumentException],instant->[ofEpochMilli],currentTimeMillis]]
Returns the next nanoseconds.
Do we really have a case that requites this to be synchronized? I can see having it volatile so other threads will for sure see the correct time, but I would think if a test has to protect from this being called concurrently that there is something probably wrong.
@@ -10,6 +10,8 @@ namespace Sulu\Bundle\CoreBundle\DependencyInjection\Compiler; +use Sulu\Component\HttpKernel\SuluKernel; +use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use ...
[RequestAnalyzerCompilerPass->[process->[addMethodCall,setDefinition,getParameter,findDefinition]]]
Adds a new to the container. onKernelRequest onKernelRequest.
Is this the same PR?
@@ -146,13 +146,7 @@ public class ExpressionTypeManager { @Override public Void visitCast(final Cast node, final ExpressionTypeContext expressionTypeContext) { - final SqlType sqlType = node.getType().getSqlType(); - if (!sqlType.supportsCast()) { - throw new KsqlFunctionException("Only cas...
[ExpressionTypeManager->[Visitor->[visitSearchedCaseExpression->[setSqlType],visitSubscriptExpression->[getSqlType,setSqlType],visitFunctionCall->[getSqlType,setSqlType,getExpressionSqlType],visitCreateMapExpression->[setSqlType],visitDereferenceExpression->[getSqlType,setSqlType],visitLikePredicate->[setSqlType],visit...
Visit a Cast node.
Removed this as its not needed. It's `getCast` in `SqlToJavaVisitor` that determines what casts are supported. Removing this check just means it fails, with the same error, slightly later in flow.
@@ -42,7 +42,6 @@ namespace Dynamo.Search viewModel = searchViewModel; this.dynamoViewModel = dynamoViewModel; - DataContext = viewModel; InitializeComponent(); Loaded += OnSearchViewLoaded; Unloaded += OnSearchViewUnloaded;
[SearchView->[OnPreviewKeyDown->[OnPreviewKeyDown]]]
The base class for the DynamoSearchView. Add event handlers for the search view.
DataContext is set in Initialization. Tooltip is bound to TargetUpdated. That means as soon as DataContext is set, tooltip tries to show something. But main dynamo window is not loaded yet. And it fails.
@@ -59,6 +59,16 @@ export default Controller.extend({ return canChangeWebsite; }, + @discourseComputed("model.can_upload_profile_header") + canUploadProfileHeader(canUploadProfileHeader) { + return canUploadProfileHeader; + }, + + @discourseComputed("model.can_upload_user_card_background") + canUpload...
[No CFG could be retrieved]
Displays a modal dialog to clear the featured - topic from the profile. Save the featured_topic user_fields and save the user_fields.
Since the CP isn't modifying the input you should use the `alias` helper for these.
@@ -24,10 +24,6 @@ RSpec.describe NotifyMailer, type: :mailer do expect(email.to).to eq([comment.user.email]) end - it "includes the tracking pixel" do - expect(email.html_part.body).to include("open.gif") - end - it "includes UTM params" do expect(email.html_part.body).to include(C...
[create_badge_achievement->[create],email,app_domain,create,create_badge_achievement,listings_url,let,and_return,assert_emails,describe,community_name,email_addresses,it,name,to,unread_notifications_email,deliver_now,before,channel_name,feedback_message_resolution_email,iso8601,new_reply_email,require,account_deleted_e...
Describe NotifyMailer and assertions It reports that the user has a proper sender and that the sender has a proper receiver.
Open tracking is no longer supported
@@ -52,7 +52,7 @@ EC_POINT *EC_POINT_bn2point(const EC_GROUP *group, return NULL; } - if (!BN_bn2binpad(bn, buf, buf_len)) { + if (BN_bn2binpad(bn, buf, buf_len) <= 0) { OPENSSL_free(buf); return NULL; }
[EC_POINT_bn2point->[EC_POINT_clear_free,EC_POINT_new,EC_POINT_oct2point,OPENSSL_free,BN_bn2binpad,OPENSSL_malloc,ECerr,BN_num_bytes],EC_POINT_point2bn->[BN_bin2bn,OPENSSL_free,EC_POINT_point2buf]]
EC_POINT_bn2point - convert bn to point - if bn is NULL -.
I think 0 is actually valid, please use < 0
@@ -1464,7 +1464,6 @@ vos_update_end(daos_handle_t ioh, uint32_t pm_ver, daos_key_t *dkey, int err, /* Publish SCM reservations */ if (ioc->ic_actv_at != 0) { err = umem_tx_publish(umem, ioc->ic_actv, ioc->ic_actv_at); - ioc->ic_actv_at = 0; D_DEBUG(DB_TRACE, "publish ioc %p actv_at %d rc %d\n", ioc, ioc...
[No CFG could be retrieved]
Publish the NVMe blocks and the SCM blocks. Publish NVMe blocks and IOCs.
this line was causing the following to happen evtree was detecting that an invalid overwrite and returning an error umem_cancel was calling umem_free because this was 0. pmdk_debug threw an assertion. I imagine we were seeing random issues otherwise.
@@ -217,7 +217,7 @@ public class HoodieAvroUtils { private static Schema initRecordKeySchema() { Schema.Field recordKeyField = - new Schema.Field(HoodieRecord.RECORD_KEY_METADATA_FIELD, METADATA_FIELD_SCHEMA, "", NullNode.getInstance()); + new Schema.Field(HoodieRecord.RECORD_KEY_METADATA_FIELD,...
[HoodieAvroUtils->[rewriteRecord->[isMetadataField],bytesToAvro->[bytesToAvro],createHoodieWriteSchema->[createHoodieWriteSchema],addMetadataFields->[isMetadataField]]]
Initialize record key schema.
Other places also used `NullNode.getInstance()`, we need to keep consistency. Revert or change all.
@@ -1463,6 +1463,13 @@ def plot_evoked_topomap(evoked, times="auto", ch_type=None, layout=None, same length as ``times`` (unless ``times`` is None). If instance of Axes, ``times`` must be a float or a list of one float. Defaults to None. + extrapolate : str + If 'head' extrapolate t...
[_init_anim->[set_values,_check_outlines,_hide_frame,_autoshrink,_GridData,_draw_outlines],plot_ica_components->[plot_ica_components,_check_outlines,_prepare_topo_plot,_add_colorbar,plot_topomap,_autoshrink],plot_arrowmap->[_trigradient,_prepare_topo_plot,plot_topomap,_check_outlines],_plot_topomap->[set_locations,_che...
Plot a topographic map of specific time points of evoked data. Required by the base plot. A function to plot a single if on a given time axis. Plots a single . Plots a single object. Plots a grid of the n - th critical series.
I forgot the closing bracket.
@@ -93,7 +93,7 @@ func (c *postgresCollection) ReadWrite(tx *sqlx.Tx) PostgresReadWriteCollection // back. This will reattempt the transaction forever. func NewSQLTx(ctx context.Context, db *sqlx.DB, apply func(*sqlx.Tx) error) error { attemptTx := func() error { - tx, err := db.BeginTxx(ctx, &sql.TxOptions{Isola...
[get->[mapSQLError],DeleteByIndex->[validateIndex,mapSQLError],Create->[insert],GetByIndex->[validateIndex],Count->[mapSQLError],Watch->[tableWatchChannel,list],Get->[get],Delete->[mapSQLError],GetRevByIndex->[validateIndex,listRev],ListRev->[listRev],WatchF->[Watch],DeleteAll->[mapSQLError],WatchByIndex->[validateInde...
ValidateIndex validates that the given index is a valid index for the given collection. NewDryrunSQLTx is identical to NewSQLTx except it rolls back the.
Is this intended to be a permanent change? Or just for debugging? Makes sense to me, though.
@@ -52,10 +52,6 @@ public class ServiceMetadata extends BaseServiceMetadata { public ServiceMetadata() { } - public String getServiceKey() { - return serviceKey; - } - public Map<String, Object> getAttachments() { return attachments; }
[ServiceMetadata->[getAttribute->[get],addAttribute->[put],addAttachment->[put],buildKey]]
get the service key.
The parent class already has this method
@@ -326,7 +326,8 @@ func (bc *BuildPodController) HandlePod(pod *kapi.Pod) error { // Update the build object when it progress to a next state or the reason for // the current state changed. - if build.Status.Phase != nextStatus && !buildutil.IsBuildComplete(build) { + if (!hasBuildPodNameAnnotation(build) || bui...
[HandleBuild->[IsBuildComplete,Infof,CancelBuild,nextBuildPhase,OnComplete,V,Errorf,ForBuild,IsRunnable,Update],CancelBuild->[GetBuildPodName,DeletePod,Infof,Now,V,Errorf,IsNotFound,GetPod,Update],nextBuildPhase->[Copy,IsAlreadyExists,FatalError,Infof,Sprintf,V,CreateBuildPod,Eventf,Errorf,resolveOutputDockerImageRefer...
HandlePod handles a pod build Update the build object when it is in a next state or the reason for the next state.
hmmm.. any idea why we were/are excluding complete builds here? note that line 337/335 actually then attempts to set a timestamp if the build is complete, which will never get invoked here....
@@ -913,6 +913,15 @@ class Either(ParameterizedProperty): if not (value is None or any(param.is_valid(value) for param in self.type_params)): raise ValueError("expected an element of either %s, got %r" % (nice_join(self.type_params), value)) + def transform(self, value): + for param in...
[Tuple->[validate->[is_valid]],Array->[__init__->[_validate_type_param]],RelativeDelta->[__init__->[Enum]],Property->[__set__->[validate,matches,__get__,transform],is_valid->[validate]],List->[validate->[is_valid],__init__->[_validate_type_param]],MetaHasProps->[__new__->[__new__,autocreate]],PrimitiveProperty->[valida...
Validate that value is either None or one of the type_params.
I'm not sure if this override is really necessary, but if so, then it shouldn't raise any exceptions. It's `validate()`'s job to verify its input and complain if necessary, and `transform()` assumes that `value` is OK, but it will convert it to a more useful, possibly canonical, value.
@@ -434,7 +434,8 @@ define([ // Remove any tiles that were not used this frame beyond the number // we're allowed to keep. - primitive._tileReplacementQueue.trimTiles(primitive.tileCacheSize); + if (!frameState.passes.pick) + primitive._tileReplacementQueue.trimTiles(primiti...
[No CFG could be retrieved]
This function is called by the render process when a child is requested. return QuadtreePrimitive if it can be found in the tilesToRender array.
@kring @bagnell do we need this patch?
@@ -124,6 +124,7 @@ public interface ClientProtocol { * @return Boolean - True if the user with a role can access the volume. * This is possible for owners of the volume and admin users * @throws IOException + * TODO: deprecate and remove this API. */ boolean checkVolumeAccess(String volumeName, Oz...
[No CFG could be retrieved]
Check if the volume has access to the given acl.
Shall we add a @Deprecated annotation on this API? Also it seems checkBucketAccess API is not used too.
@@ -4,9 +4,13 @@ import ( "context" "net/url" + "net/http" + + "github.com/containous/mux" "github.com/containous/traefik/log" "github.com/google/go-github/github" goversion "github.com/hashicorp/go-version" + "github.com/unrolled/render" ) var (
[Prerelease,ListReleases,GreaterThan,Background,Warnf,String,Parse,NewClient,NewVersion]
CheckNewVersion import and return a new version object new release has been found.
Sort imports :wink:
@@ -63,8 +63,10 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield='a.datep,a.id'; if (! $sortorder) $sortorder='DESC,DESC'; +// Initialize hook context +$contextpage = array('agendathirdparty','globalcard'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array o...
[fetch,executeHooks,trans,initHooks,isService,close,info,load]
This function is called from the action code of a specific action. Check if a user has permission to perform an action on an object.
There is a confusion with the goal of $contextpage $contextpage is a var dedicated to save the filter selection of the page and the choice of columns set into a list when there is a list on a page. It is always a string and can't be an array. Using it for hooks is possible as it is a global var but looks dangerous as i...
@@ -4,8 +4,7 @@ module MfaSetupConcern def confirm_user_authenticated_for_2fa_setup authenticate_user!(force: true) return if user_fully_authenticated? - return unless MfaPolicy.new(current_user).two_factor_enabled? && - !user_session[:signing_up] + return unless MfaPolicy.new(curren...
[confirm_user_authenticated_for_2fa_setup->[redirect_to,authenticate_user!,two_factor_enabled?,user_fully_authenticated?],extend]
Checks if the user is authenticated and if so redirects to the 2FA authentication page if not.
This `:signing_up` flag was in the session to allow the backup code only flow. I pulled it out here and a bunch of other places we no longer needed it.
@@ -1721,7 +1721,9 @@ public: // search for nearby enemy corpse in range acore::AnyDeadUnitSpellTargetInRangeCheck check(caster, max_range, GetSpellInfo(), TARGET_CHECK_CORPSE); acore::WorldObjectSearcher<acore::AnyDeadUnitSpellTargetInRangeCheck> searcher(caster, result, check); ...
[No CFG could be retrieved]
Provides a class to be used as a script for the AuraScript. Provides a class to load a cannibalize spell script from a list of A.
@FrancescoBorzi He's not going to be happy.
@@ -0,0 +1,18 @@ +import unittest +import numpy +from op_test_util import OpTestMeta + + +class TestSGD(unittest.TestCase): + __metaclass__ = OpTestMeta + + def setUp(self): + self.type = "sgd" + self.param = numpy.random.random((342, 345)).astype("float32") + self.grad = numpy.random.random(...
[No CFG could be retrieved]
No Summary Found.
seems it is does not finished check?
@@ -3,7 +3,6 @@ # LICENSE file in the root directory of this source tree. """Transformer Agents.""" from parlai.core.agents import Agent -from parlai.utils.misc import warn_once from parlai.utils.misc import padded_3d from parlai.core.torch_ranker_agent import TorchRankerAgent from parlai.core.torch_generator_age...
[TransformerRankerAgent->[add_cmdline_args->[add_common_cmdline_args],score_candidates->[_score],vectorize->[_vectorize_memories]],TransformerGeneratorAgent->[add_cmdline_args->[add_common_cmdline_args]]]
Transformer Agents. Adds arguments related to the n - position n - segments and translations to the argument parser.
is this no longer needed in this file?
@@ -258,6 +258,7 @@ public class BlockOutputStream extends OutputStream { while (len > 0) { allocateNewBufferIfNeeded(); final int writeLen = Math.min(currentBufferRemaining, len); + LOG.info("writeLen: " + writeLen + " off: " + off); currentBuffer.put(b, off, writeLen); currentBu...
[BlockOutputStream->[getTotalAckDataLength->[getTotalAckDataLength],writeOnRetry->[updateFlushLength],writeChunkToContainer->[setIoException],handleExecutionException->[getIoException,setIoException,adjustBuffersOnException],write->[writeChunkIfNeeded],cleanup->[cleanup],validateResponse->[getIoException],getCommitInde...
Writes a byte array to the output stream.
Remaining of a debug session I guess...
@@ -917,7 +917,7 @@ if (is_dir(DIR_FS_CATALOG_IMAGES)) { <a href="<?php echo zen_href_link(FILENAME_PRODUCT, 'cPath=' . $cPath . '&product_type=' . $product['products_type'] . '&pID=' . $product['products_id'] . '&action=new_product' . (isset($_GET['search']) ? '&search=' . $_GET['search'] : ''))...
[bindVars,Execute,display_count,get_allow_add_to_cart,get_handler,infoBox,add_session,notify,display_links,RecordCount,add]
Displays a table of products. Copy product to current category.
@scottcwilson shouldn't this actually be using `$search_parameter` instead of `$_GET['search']`?
@@ -869,10 +869,14 @@ CHAKRA_API JsSetContextData(_In_ JsContextRef context, _In_ void *data) void HandleScriptCompileError(Js::ScriptContext * scriptContext, CompileScriptException * se, const WCHAR * sourceUrl) { HRESULT hr = se->ei.scode; - if (hr == E_OUTOFMEMORY || hr == VBSERR_OutOfMemory || hr == VBSER...
[No CFG could be retrieved]
- - - - - - - - - - - - - - - - - - Gets the undefined or null value from the context.
Review: Please help check if removing `hr == VBSERR_OutOfStack` here is correct. I removed it because otherwise normal out of stack becomes fatal OOM too. That is inconsistent to how we handle normal out of stack in runtime.
@@ -200,7 +200,7 @@ class StoriesController < ApplicationController .limited_column_select .order(published_at: :desc).page(@page).per(8)) @organization_article_index = true - set_organization_json_ld + @organization_json_ld = Articles::JsonCreator.organization(@organization) set_surrogate...
[StoriesController->[handle_base_index->[decorate,render,decorate_collection,set_surrogate_key_header,set_cache_control_headers,show_in_sidebar?],redirect_if_view_param->[redirect_to,id],assign_user_stories->[user_signed_in?,decorate_collection,decorate,per],redirect_to_changed_username_profile->[redirect_to,path,tr,fu...
if the user has an organization and has not published any item this will show the next page.
Hi @brunnohenrique, I'm not convinced this is the right solution. This is not about creating JSON per se but it's just a different representation of the org object, or user object or article object. I think we should respect that and use serializers, similar to `app/serializers` In this case you're serializing `JSON-LD...
@@ -149,7 +149,7 @@ public class AvroUtils { */ public static GenericRecord convertRecordSchema(GenericRecord record, Schema newSchema) throws IOException { if (checkReaderWriterCompatibility(newSchema, record.getSchema()).getType() != COMPATIBLE) { - LOG.warn("Record schema not compatible with writer ...
[AvroUtils->[getDirectorySchemaHelper->[compare->[compare]],getAllNestedAvroFiles->[getAllNestedAvroFiles],getFieldHelper->[getFieldHelper],getFieldSchemaHelper->[getFieldSchemaHelper]]]
Convert an Avro record to a new schema.
Why did this get demoted to debug? It is a large jump.