patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -71,6 +71,11 @@ public class BasicUpgradeFinalizer<T, V extends AbstractLayoutVersionManager>
return FINALIZATION_IN_PROGRESS_MSG;
case FINALIZATION_DONE:
case ALREADY_FINALIZED:
+ if (versionManager.needsFinalization()) {
+ throw new UpgradeException("Upgrade found in inconsistent state. " +
+ "Upgrade state is FINALIZATION Complete while MLV has not been " +
+ "upgraded to SLV.", INVALID_REQUEST);
+ }
return FINALIZED_MSG;
default:
if (!versionManager.needsFinalization()) {
| [BasicUpgradeFinalizer->[finalize->[preFinalize]]] | This method is called before the upgrade is complete. | Can you please explain how this can happen, and how can a user recover from this? |
@@ -181,6 +181,14 @@ class RscCompile(ZincCompile, MirroredTargetOptionMixin):
]
)
+ @memoized_property
+ def _rsc_native_image(self):
+ return RscNativeImage.scoped_instance(self)
+
+ @memoized_property
+ def _rsc_classpath(self):
+ return self.tool_classpath('rsc')
+
# TODO: allow @memoized_method to convert lists into tuples so they can be hashed!
@memoized_property
def _nailgunnable_combined_classpath(self):
| [RscCompile->[_runtool->[_runtool_hermetic,_runtool_nonhermetic],create_compile_jobs->[only_zinc_invalid_dep_keys->[_zinc_key_for_target],all_zinc_rsc_invalid_dep_keys->[_key_for_target_as_dep],make_zinc_job->[_zinc_key_for_target,CompositeProductAdder],make_rsc_job->[all_zinc_rsc_invalid_dep_keys,_rsc_key_for_target],work_for_vts_rsc->[fast_relpath_collection,ensure_output_dirs_exist,_paths_from_classpath,register_extra_products_from_contexts],all_zinc_rsc_invalid_dep_keys,make_zinc_job,make_rsc_job,only_zinc_invalid_dep_keys],register_extra_products_from_contexts->[to_classpath_entries->[pathglob_for],confify,to_classpath_entries],create_compile_context->[_classify_target_compile_workflow,RscCompileContext,RscZincMergedCompileContexts],_runtool_hermetic->[fast_relpath_collection]],CompositeProductAdder->[add_for_target->[add_for_target]]] | Register options for rsc compile. | This change probably isn't necessary -- it was useful for a previous iteration in which I attempted to make `Rsc` into its own subsystem like `Zinc`, but I had a lot of difficulty with that so kept it just to an `RscNativeImage` subsystem. |
@@ -0,0 +1,2 @@
+# Copyright (c) Microsoft Corporation.
+# Licensed under the MIT license.
| [No CFG could be retrieved] | No Summary Found. | if `analysis_utils` is only used by model compression, suggest to put this directory under `src/sdk/pynni/nni/compression` |
@@ -107,5 +107,18 @@ class TestBuiltins(unittest.TestCase):
self.assertIn('lifted loops', str(w[2].message))
+ def test_deprecated(self):
+ @deprecated('foo')
+ def bar(): pass
+
+ with warnings.catch_warnings(record=True) as w:
+ warnings.simplefilter('always')
+ bar()
+
+ self.assertEqual(len(w), 1)
+ self.assertEqual(w[0].category, DeprecationWarning)
+ self.assertIn('bar', str(w[0].message))
+ self.assertIn('foo', str(w[0].message))
+
if __name__ == '__main__':
unittest.main()
| [TestBuiltins->[test_return_type_warning_with_nrt->[catch_warnings,assertEqual,len,jit,ones,cfunc,simplefilter],test_type_infer_warning->[catch_warnings,assertEqual,assertIn,len,str,jit,cfunc,simplefilter],test_return_type_warning->[catch_warnings,assertEqual,assertIn,len,str,jit,ones,cfunc,simplefilter],test_loop_lift_warn->[do_loop->[range],catch_warnings,assertEqual,assertIn,len,str,jit,ones,cfunc,simplefilter],test_no_warning_with_forceobj->[catch_warnings,assertEqual,len,jit,cfunc,simplefilter]],main] | asserts that the main loop of the loop is not called if the main loop is called. | Think this block can be done in 1 line with an `assertRaisesRegex` and an `error` filter? |
@@ -0,0 +1,12 @@
+from django.conf import settings
+from kuma.contributions.forms import ContributionForm
+
+
+def global_contribution_form(request):
+ """Adds contribution form to the context."""
+ if settings.MDN_CONTRIBUTION:
+ return {
+ 'contribution_form': ContributionForm(),
+ 'hide_cta': True
+ }
+ return {}
| [No CFG could be retrieved] | No Summary Found. | Interesting. I haven't seen this before, but it does get the form on every page. |
@@ -94,7 +94,7 @@ func (p *Policy) Generate() (*xds_rbac.Policy, error) {
if err != nil {
return nil, errors.Errorf("Error parsing destination port value %s", andPermissionRule.Value)
}
- portPermission := getPermissionDestinationPort(uint32(port))
+ portPermission := GetPermissionDestinationPort(uint32(port))
andPermissionRules = append(andPermissionRules, portPermission)
}
}
| [Generate->[ParseUint,New,Errorf]] | Generate generates a new RBAC policy from the given Principals This function is used to construct the list of permissions and permissions Get the permission for this policy. | Is this semantically - get the allowed port? |
@@ -25,11 +25,11 @@ const bodyParser = require('body-parser');
const cors = require('./amp-cors');
const devDashboard = require('./app-index/index');
const express = require('express');
+const fetch = require('node-fetch');
const formidable = require('formidable');
const fs = require('fs');
const jsdom = require('jsdom');
const path = require('path');
-const request = require('request');
const upload = require('multer')();
const pc = process;
const autocompleteEmailData = require('./autocomplete-test-data');
| [No CFG could be retrieved] | Creates a new server Create a new instance of the application. | Missing a few instances of request in this file |
@@ -200,6 +200,13 @@ func (m *ppsMaster) attemptStep(ctx context.Context, e *pipelineEvent) error {
}
return errors.Wrapf(err, "could not update resource for pipeline %q", e.pipeline)
})
+ if err == nil && startTimeSeconds != 0 {
+ // can write to the map as pps master does not use concurrency
+
+ // add a little grace period for clock disagreements
+ m.lastUpdates[e.pipeline] = startTimeSeconds - 2
+ }
+
// we've given up on the step, check if the error indicated that the pipeline should fail
if err != nil && errors.As(err, &stepErr) && stepErr.failPipeline {
specCommit, specErr := m.a.findPipelineSpecCommit(ctx, e.pipeline)
| [deletePipelineResources->[AddSpanToAnyExisting,cancelMonitor,Wrapf,Infof,Sprintf,CoreV1,FinishAnySpan,Secrets,IsNotFoundError,List,Delete,ReplicationControllers,Services,GetKubeClient,TagAnySpan,cancelCrashingMonitor],setPipelineState->[AddSpanToAnyExisting,FinishAnySpan,GetDBClient,SetPipelineState,TagAnySpan],transitionPipelineState->[AddSpanToAnyExisting,FinishAnySpan,GetDBClient,SetPipelineState,TagAnySpan],setPipelineCrashing->[setPipelineState],run->[cancelPipelineWatcher,deletePipelineResources,startPipelineWatcher,cancelPipelinePoller,cancelPipelinePodsPoller,startPipelinePodsPoller,Errorf,startPipelinePoller,cancelAllMonitorsAndCrashingMonitors,attemptStep,Done],setPipelineFailure->[setPipelineState],attemptStep->[As,step,Wrapf,Sprintf,setPipelineFailure,findPipelineSpecCommit,Errorf,RetryNotify,NewExponentialBackOff],master->[Wrapf,Join,Unlock,Infof,NewDLock,AsInternalUser,GetEtcdClient,Background,WithCancel,NewInfiniteBackOff,Lock,Errorf,RetryNotify,run,Err],Wrap] | attemptStep attempts to update the resource in the pipeline. | not sure what a good number to expect is here. The poller will of course eventually unstick things, but adding that much latency doesn't seem great if we miss an event due to skew or something |
@@ -1058,7 +1058,14 @@ func (r *LocalRuntime) GenerateSystemd(c *cliconfig.GenerateSystemdValues) (stri
if c.Name {
name = ctr.Name()
}
- return systemdgen.CreateSystemdUnitAsString(name, ctr.ID(), c.RestartPolicy, ctr.Config().StaticDir, timeout)
+
+ config := ctr.Config()
+ conmonPidFile := config.ConmonPidFile
+ if conmonPidFile == "" {
+ return "", errors.Errorf("conmon PID file path is empty, try to recreate the container with --conmon-pidfile flag")
+ }
+
+ return systemdgen.CreateSystemdUnitAsString(name, ctr.ID(), c.RestartPolicy, conmonPidFile, timeout)
}
// GetNamespaces returns namespace information about a container for PS
| [UnpauseContainers->[Run],Commit->[Commit,LookupContainer],Restart->[Run,LookupContainer,GetAllContainers,GetLatestContainer],Attach->[LookupContainer,GetLatestContainer],Restore->[Restore],Log->[Log],Prune->[Run],Top->[Top,LookupContainer,GetLatestContainer],Checkpoint->[Checkpoint],GetLatestContainer->[GetLatestContainer],CreateContainer->[CreateContainer],LookupContainer->[LookupContainer],PauseContainers->[Run],Exec->[LookupContainer,Exec,GetLatestContainer],Run->[CreateContainer],GenerateSystemd->[LookupContainer],GetNamespaces->[GetNamespaces],Start->[Start,LookupContainer,GetLatestContainer],GetAllContainers->[GetAllContainers]] | GenerateSystemd generates a systemd unit. | there is a check in `runtime_ctr.go` (inside `setupContainer`) for assigning a value to ConmonPidFile when it is empty. We do that only for rootless currently. Could change that so it is done also for root containers? |
@@ -273,6 +273,16 @@ class GlobalOptionsRegistrar(SubsystemClientMixin, Optionable):
help='Create a new pantsd server, and use it, and shut it down immediately after. '
'If pantsd is already running, it will shut it down and spawn a new instance (Beta)')
+ # NB: We really don't want this option to invalidate the daemon, because different clients might have
+ # different needs. For instance, an IDE might have a very long timeout because it only wants to refresh
+ # a project in the background, while a user might want a shorter timeout for interactivity.
+ register('--pantsd-timeout-when-multiple-invocations', advanced=True, type=float, default=60.0, daemon=False,
+ help='The maximum amount of time to wait for the invocation to start until '
+ 'raising a timeout exception. '
+ 'Because pantsd currently does not support parallel runs, '
+ 'any prior running Pants command must be finished for the current one to start. '
+ 'To never timeout, use the value -1.')
+
# These facilitate configuring the native engine.
register('--native-engine-visualize-to', advanced=True, default=None, type=dir_option, daemon=False,
help='A directory to write execution and rule graphs to as `dot` files. The contents '
| [GlobalOptionsRegistrar->[register_options->[register_bootstrap_options]],ExecutionOptions] | Register bootstrap options. The warning string will always be case - insensitive. This function is used to register a sequence number with the interpreter. Registers all options that require a specific sequence number. | > Then, the timeout should be set according to "what I expect the other runs are doing", not "how long this particular run is going to take". Since in general this is unknowable, I'm not sure how to phase it better. That said, I agree that 60s might be too long, I'm more than open to suggestions for other numbers. Our p90 is way past 60 seconds, so if anything, 60 isn't long enough. Something like 10 minutes might be better, but is easy to iterate on and/or override in our repo. |
@@ -27,6 +27,11 @@ const NonexistentID = 9223372036854775807
// giteaRoot a path to the gitea root
var giteaRoot string
+func fatalTestError(fmtStr string, args ...interface{}) {
+ fmt.Fprintf(os.Stderr, fmtStr, args...)
+ os.Exit(1)
+}
+
// MainTest a reusable TestMain(..) function for unit tests that need to use a
// test database. Creates the test database, and sets necessary settings.
func MainTest(m *testing.M, pathToGiteaRoot string) {
| [RemoveAll,NewEngine,SetMapper,Count,False,TempDir,Close,CopyDir,ShowSQL,Exit,Sync2,EqualValues,Join,Equal,NoError,Where,Get,NewSession,Sleep,Fprintf,StoreEngine,Insert,Parse,Getenv,Run,True] | MainTest creates a test database and sets necessary settings. GiteaRoot - Gitea root. | why not just use `assert.NoError(t, err)`? |
@@ -44,11 +44,11 @@ def run_conda_command(*args):
# Make sure bin/conda imports *this* conda.
env['PYTHONPATH'] = os.path.dirname(os.path.dirname(__file__))
env['CONDARC'] = ' '
- p= subprocess.Popen((python, conda,) + args, stdout=subprocess.PIPE,
+ p = subprocess.Popen((python, conda,) + args, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, env=env)
- stdout, stderr = p.communicate()
- return (stdout.decode('utf-8').replace('\r\n', '\n'),
- stderr.decode('utf-8').replace('\r\n', '\n'))
+ stdout, stderr = [stream.strip().decode('utf-8').replace('\r\n', '\n').replace('\\\\', '\\')
+ for stream in p.communicate()]
+ return stdout, stderr
class CapturedText(object):
pass
| [captured->[CapturedText],capture_json_with_argv->[capture_with_argv]] | Run conda command with args and return the result. | Why should you `replace` double backslashes here? Where do they come from? Which conda command line output produces double backslashes? |
@@ -78,7 +78,7 @@ func twofaGenerateSecretAndQr(ctx *context.Context) bool {
err = nil // clear the error, in case the URL was invalid
otpKey, err = totp.Generate(totp.GenerateOpts{
SecretSize: 40,
- Issuer: setting.AppName + " (" + strings.TrimRight(setting.AppURL, "/") + ")",
+ Issuer: setting.AppName + " (" + url.PathEscape(strings.TrimRight(setting.AppURL, "/")) + ")",
AccountName: ctx.User.Name,
})
if err != nil {
| [TrimRight,IsErrTwoFactorNotEnrolled,GenerateScratchToken,Delete,Encode,Redirect,URL,Set,HTML,DeleteTwoFactorByID,Error,Validate,Bytes,HasError,GetTwoFactorByUID,Tr,ServerError,NewKeyFromURL,Get,UpdateTwoFactor,Secret,Image,SetSecret,Generate,String,EncodeToString,NewTwoFactor,Success] | DisableTwoFactor deletes the user s 2FA settings and generates a 2FA secret and QR EnrollTwoFactor shows the page where the user can enrol into the 2FA. | I think you should be PathEscaping the whole thing surely? |
@@ -261,7 +261,6 @@ class PostAlerter
end
def should_notify_previous?(user, post, notification, opts)
- return false unless notification
case notification.notification_type
when Notification.types[:edited] then should_notify_edit?(notification, post, opts)
when Notification.types[:liked] then should_notify_like?(user, notification)
| [PostAlerter->[notify_group_summary->[group_stats],notify_post_users->[create_notification],allowed_users->[not_allowed?],notify_users->[create_notification],allowed_group_users->[not_allowed?],directly_targeted_users->[allowed_group_users,allowed_users],notify_pm_users->[notify_group_summary,create_notification],indirectly_targeted_users->[allowed_group_users],all_allowed_users->[not_allowed?],after_save_post->[only_allowed_users,notify_about_reply?],should_notify_previous?->[should_notify_edit?,should_notify_like?],create_notification->[unread_count,should_notify_previous?,first_unread_post,destroy_notifications]]] | Returns true if the user should notify the previous notification of the given type. | why was this removed? |
@@ -35,13 +35,14 @@ public class LocalCacheMassIndexerTest extends SingleCacheManagerTest {
ConfigurationBuilder cfg = getDefaultStandaloneCacheConfig(false);
cfg.indexing().enable()
.addIndexedEntity(Person.class)
- .addProperty("default.directory_provider", "local-heap")
- .addProperty("lucene_version", "LUCENE_CURRENT");
+ .addProperty(SearchConfig.DIRECTORY_TYPE, SearchConfig.HEAP);
return TestCacheManagerFactory.createCacheManager(cfg);
}
private long indexSize(Cache<?, ?> cache) {
QueryFactory queryFactory = Search.getQueryFactory(cache);
+ // queryFactory.refresh(Object.class);
+
Query<?> query = queryFactory.create("FROM " + Person.class.getName());
return query.execute().hitCount().orElse(-1);
}
| [LocalCacheMassIndexerTest->[createCacheManager->[createCacheManager],testMassIndexer->[fillData,indexSize]]] | Creates a cache manager that caches the n - ary entities. | We should only use Ickle queries on tests |
@@ -30,7 +30,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case KB_FLSH:
if (!record->event.pressed) {
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
- #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
+ #if defined(__arm__)
+ ":dfu-util "
+ #elif (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
":dfu "
#elif defined(BOOTLOADER_HALFKAY)
":teensy "
| [No CFG could be retrieved] | Adds a list of actions to the list of actions that can be performed on the keyboard. Code 16 - bit menu. | Instead, you may want to change all of these to `:flash`, as this handles this, a bit better. |
@@ -121,9 +121,8 @@ def test_check_sub_dir_ignore_file(tmp_dir, dvc, caplog):
def test_check_ignore_details_all(tmp_dir, dvc, caplog):
tmp_dir.gen(DvcIgnore.DVCIGNORE_FILE, "f*\n!foo")
- assert main(["check-ignore", "-d", "-a", "foo"]) == 0
- assert "{}:1:f*\tfoo\n".format(DvcIgnore.DVCIGNORE_FILE) in caplog.text
- assert "{}:2:!foo\tfoo\n".format(DvcIgnore.DVCIGNORE_FILE) in caplog.text
+ assert main(["check-ignore", "-d", "-a", "file"]) == 0
+ assert "{}:1:f*\tfile\n".format(DvcIgnore.DVCIGNORE_FILE) in caplog.text
@pytest.mark.parametrize(
| [test_check_ignore_default_dir->[main],test_check_ignore->[main,gen],test_check_ignore_dir->[main,gen],test_check_ignore_sub_repo->[join,main,format,gen],test_check_sub_dir_ignore_file->[chdir,format,join,gen,main],test_check_ignore_details_all->[main,format,gen],test_check_ignore_stdin_mode->[main,gen,patch],test_check_ignore_details->[main,gen],test_check_ignore_out_side_repo->[main,gen],test_check_ignore_non_matching->[main,gen],test_check_ignore_error_args_cases->[main],parametrize,format,join] | Test for check - ignore details all. | The argument `-a`/`--all` represent returning all of the matching patterns, without this `check-ignore` only returns the T matching one. We must test multi-matching here. |
@@ -96,6 +96,18 @@ func CreateLinuxDeployIfNotExist(image, name, namespace, miscOpts string) (*Depl
return deployment, nil
}
+// CreateLinuxDeployDeleteIfExists will create a deployment, deleting any pre-existing deployment with the same name
+func CreateLinuxDeployDeleteIfExists(pattern, image, name, namespace, miscOpts string) (*Deployment, error) {
+ deployments, err := GetAllByPrefix(pattern, namespace)
+ if err != nil {
+ return nil, err
+ }
+ for _, d := range deployments {
+ d.Delete(10)
+ }
+ return CreateLinuxDeploy(image, name, namespace, miscOpts)
+}
+
// RunLinuxDeploy will create a deployment that runs a bash command in a pod
// --overrides=' "spec":{"template":{"spec": {"nodeSelector":{"beta.kubernetes.io/os":"linux"}}}}}'
func RunLinuxDeploy(image, name, namespace, command string, replicas int) (*Deployment, error) {
| [WaitForReplicas->[GetAllByPrefix,WithTimeout,Background,String,Errorf,Sleep,Done],Expose->[RunAndLogCommand,Printf,Itoa,Command],ScaleDeployment->[RunAndLogCommand,Sprintf,Printf,Command],Delete->[RunAndLogCommand,Printf,Command],CreateDeploymentHPA->[RunAndLogCommand,Sprintf,Printf,Command],Pods->[GetAllByPrefix],RunAndLogCommand,Printf,Itoa,Unmarshal,Command] | RunLinuxDeploy creates a deployment if it doesn t already exist. CreateWindowsDeploy creates a new Windows deployment for a given image with a given name in a. | Maybe use a `deleteRetries := 10` variable just for readability? This made me look up the function signature for `Delete`. |
@@ -28,16 +28,11 @@ const Dashboard = props => {
const displayLockupCta =
nextVest && data.config.earlyLockupsEnabled && !data.config.isLocked
const displayFullWidthLockupCta = displayLockupCta && hasLockups
- const isEarlyLockup = displayBonusModal === 'early'
const renderModals = () => (
<>
- {displayBonusModal && (
- <BonusModal
- nextVest={nextVest}
- isEarlyLockup={isEarlyLockup}
- onModalClose={() => setDisplayBonusModal(false)}
- />
+ {displayStakeModal && (
+ <StakeModal onModalClose={() => setDisplayStakeModal(false)} />
)}
{displayWithdrawModal && (
<WithdrawModal
| [No CFG could be retrieved] | A component that renders a single n - node node. Displays a list of all the neccesary objects that can be used to show a. | This or the above condition will need to be changed otherwise the CTA will never show. I think one or the other should just be set to `true` depending on if we want the full width CTA or the square box one. |
@@ -388,11 +388,11 @@ def make_simplified_union(items: Sequence[Type],
return UnionType.make_union(simplified_set, line, column)
-def get_type_special_method_bool_ret_type(t: Type) -> Optional[Type]:
+def _get_type_special_method_bool_ret_type(t: Type) -> Optional[Type]:
t = get_proper_type(t)
if isinstance(t, Instance):
- bool_method = t.type.names.get("__bool__", None)
+ bool_method = t.type.get("__bool__")
if bool_method:
callee = get_proper_type(bool_method.type)
if isinstance(callee, CallableType):
| [true_only->[true_only,get_type_special_method_bool_ret_type,make_simplified_union],is_singleton_type->[get_enum_values],supported_self_type->[supported_self_type],bind_self->[supported_self_type,bind_self,expand],try_getting_instance_fallback->[tuple_fallback],try_contracting_literals_in_union->[get_enum_values],map_type_from_supertype->[tuple_fallback],custom_special_method->[custom_special_method,tuple_fallback],is_literal_type_like->[is_literal_type_like],false_only->[make_simplified_union,get_type_special_method_bool_ret_type,false_only],erase_to_union_or_bound->[make_simplified_union],erase_def_to_union_or_bound->[make_simplified_union],coerce_to_literal->[make_simplified_union,coerce_to_literal,get_enum_values],true_or_false->[make_simplified_union,true_or_false],try_expanding_enum_to_union->[make_simplified_union,try_expanding_enum_to_union]] | Get the return type of a type special to a bool method. | just marking as internal for future readers of the code |
@@ -103,6 +103,7 @@
!url.href.includes('?preview=') && // Skip for /future.
!url.href.includes('/delayed_job') && // Skip for Delayed Job dashboard
!url.href.includes('/sidekiq') && // Skip for Sidekiq dashboard
+ !url.href.includes('/rails/mailers') && // Skip for mailers previews in development mode
caches.match('/shell_top') && // Ensure shell_top is in the cache.
caches.match('/shell_bottom')) { // Ensure shell_bottom is in the cache.
event.respondWith(createPageStream(event.request)); // Respond with the stream
| [No CFG could be retrieved] | Checks if the current request is a new shell and if so returns a stream of the new Reads the from the cache and adds it to the cache if it doesn t exist. | Otherwise previewing emails with http://localhost:3000/rails/mailers will dig up the shell |
@@ -932,10 +932,14 @@ class FnApiRunner(runner.PipelineRunner):
return pcoll_buffers[buffer_id]
def get_input_coder_impl(transform_id):
- return context.coders[
- safe_coders[beam_fn_api_pb2.RemoteGrpcPort.FromString(
- process_bundle_descriptor.transforms[transform_id].spec.payload).
- coder_id]].get_impl()
+ coder_id = beam_fn_api_pb2.RemoteGrpcPort.FromString(
+ process_bundle_descriptor.transforms[transform_id].spec.payload
+ ).coder_id
+ assert coder_id
+ if coder_id in safe_coders:
+ return context.coders[safe_coders[coder_id]].get_impl()
+ else:
+ return context.coders[coder_id].get_impl()
# Change cache token across bundle repeats
cache_token_generator = FnApiRunner.get_cache_token_generator(static=False)
| [ProgressRequester->[run->[push]],WorkerHandlerManager->[close_all->[close],get_worker_handlers->[GrpcServer,start_worker,create],__init__->[StateServicer]],GrpcServer->[close->[done],__init__->[GrpcStateServicer,EmptyArtifactRetrievalService,BasicProvisionService,BeamFnControlServicer,BasicLoggingService]],_WindowGroupingBuffer->[append->[append]],FnApiRunner->[get_cache_token_generator->[DynamicGenerator->[__next__->[generate_token]],StaticGenerator->[__init__->[generate_token]],DynamicGenerator,StaticGenerator],GrpcStateServicer->[State->[get_raw,append_raw,clear]],_run_stage->[get_buffer->[_GroupingBuffer],_ListBuffer,_add_residuals_and_channel_splits_to_deferred_inputs,_next_uid,_collect_written_timers_and_add_to_deferred_inputs,_run_bundle_multiple_times_for_testing,_store_side_inputs_in_state],run_pipeline->[append],run_stages->[maybe_profile],StateServicer->[append_raw->[done],commit->[commit],checkpoint->[CopyOnWriteState],clear->[done]],_extract_stage_data_endpoints->[_ListBuffer],_extract_endpoints->[_ListBuffer],_collect_written_timers_and_add_to_deferred_inputs->[_ListBuffer],_run_bundle_multiple_times_for_testing->[_ListBuffer],_store_side_inputs_in_state->[_WindowGroupingBuffer,append,encoded_items]],ExternalWorkerHandler->[start_worker->[logging_api_service_descriptor]],split_manager->[append],BeamFnControlServicer->[Control->[set_input,get_conn_by_worker_id,get_req],DoneMarker],BundleManager->[_generate_splits_for_testing->[split_manager,push,append,_send_input_to_worker],_send_input_to_worker->[close],__init__->[get_cache_token_generator],_register_bundle_descriptor->[push],process_bundle->[execute->[],_select_split_manager,push,_generate_splits_for_testing,_send_input_to_worker,_register_bundle_descriptor]],ParallelBundleManager->[process_bundle->[execute->[process_bundle,BundleManager],partition]],RunnerResult->[metrics->[FnApiMetrics],monitoring_metrics->[FnApiMetrics]],_GroupingBuffer->[__iter__->[partition],partition->[append]],GrpcWorkerHandler->[close->[close],__init__->[get_conn_by_worker_id]],ControlConnection->[close->[push]],EmbeddedWorkerHandler->[__init__->[SingletonStateHandlerFactory]],register_environment] | Runs a single stage of the Beam - style Beam API. Creates a list of endpoints for a specific key in the pipeline. Creates a buffer for all identifiers in the coder. Reads a single n - node bundle from the pipeline and processes it. | An alternative would be `safe_coders.get(coder_id, coder_id)` which means look up the key (first argument) and if it doesn't exist return the second argument. This would eliminate some of the repetition of logic between the lines as well. |
@@ -38,10 +38,12 @@ public class CopyEventSubmitterHelper {
public static final String SIZE_IN_BYTES = "SizeInBytes";
static void submitSuccessfulDatasetPublish(EventSubmitter eventSubmitter, CopyableFile.DatasetAndPartition
- datasetAndPartition) {
+ datasetAndPartition, String originTimestamp, String upstreamTimestamp) {
SlaEventSubmitter.builder().eventSubmitter(eventSubmitter).eventName(DATASET_PUBLISHED_EVENT_NAME)
.datasetUrn(datasetAndPartition.getDataset().getDatasetRoot().toString())
.partition(datasetAndPartition.getPartition())
+ .originTimestamp(originTimestamp)
+ .upstreamTimestamp(upstreamTimestamp)
.additionalMetadata(DATASET_TARGET_ROOT_METADATA_NAME,
datasetAndPartition.getDataset().getDatasetTargetRoot().toString()).build()
.submit();
| [CopyEventSubmitterHelper->[submitSuccessfulDatasetPublish->[submit],submitFailedDatasetPublish->[toString,of,submit],submitSuccessfulFilePublish->[deserializeCopyableFile,getProp,submit]]] | Submit successful dataset publish. | You should also add similar changes to `submitSuccessfulFilePublish`. |
@@ -112,6 +112,11 @@ export function documentContainsPolyfillInternal_(doc, element) {
*/
export function removeElement(element) {
if (element.parentElement) {
+ const activeElement = element.ownerDocument.activeElement;
+ // Restore focus to document if the focused element is inside the removed one.
+ if (element == activeElement || element.contains(activeElement)) {
+ element.ownerDocument.defaultView./*REVIEW*/focus();
+ }
element.parentElement.removeChild(element);
}
}
| [No CFG could be retrieved] | Checks if an element is currently contained in the document. Removes all child nodes of the specified element from the specified parent. | This'll be expensive, how about a boolean parameter to do this? |
@@ -32,11 +32,14 @@ import com.google.inject.Inject;
import org.rstudio.core.client.StringUtil;
import org.rstudio.core.client.resources.ImageResource2x;
import org.rstudio.core.client.theme.ThemeFonts;
-import org.rstudio.core.client.widget.SelectWidget;
+import org.rstudio.core.client.widget.*;
+import org.rstudio.studio.client.RStudioGinjector;
import org.rstudio.studio.client.application.Desktop;
import org.rstudio.studio.client.application.DesktopInfo;
-import org.rstudio.studio.client.application.events.EventBus;
-import org.rstudio.studio.client.application.events.ThemeChangedEvent;
+import org.rstudio.studio.client.common.FileDialogs;
+import org.rstudio.studio.client.common.GlobalDisplay;
+import org.rstudio.studio.client.common.dependencies.DependencyManager;
+import org.rstudio.studio.client.workbench.WorkbenchContext;
import org.rstudio.studio.client.workbench.prefs.model.RPrefs;
import org.rstudio.studio.client.workbench.prefs.model.UIPrefs;
import org.rstudio.studio.client.workbench.views.source.editors.text.themes.AceTheme;
| [AppearancePreferencesPane->[onApply->[getValue,parseDouble,getName,equals,onApply,setFixedWidthFont,get,notNull,setZoomLevel,setGlobalValue,isDesktop,getGlobalValue],onChange->[getValue,parseDouble,setFontSize,getFixedWidthFont,setTheme,getUrl,setFont],getIcon->[ImageResource2x,iconAppearance2x],updateThemes->[toArray,getName,getProgressIndicator,setValue,setChoices,getThemes],updatePreviewZoomLevel->[getValue,parseDouble,getZoomLevel,setZoomLevel,isDesktop],getValue,addStyleName,HorizontalPanel,replaceAll,parseDouble,scheduleDeferred,formatPercent,FlowPanel,notNull,setValue,updatePreviewZoomLevel,getUrl,isDesktop,setTheme,themeChooser,insertValue,setHeight,setGlobalValue,SelectWidget,ChangeHandler,getGlobalValue,split,getFixedWidthFont,getZoomLevel,setFontSize,setWidth,updateThemes,AceEditorPreview,addChangeHandler,setSize,add,setCellWidth,VerticalPanel,setSelectedIndex]] | Reads and imports all of the fields of a specific type from a Workbench project. Creates a UI and AceTheme object. | I've avoided the wildcard `imports`, but only because I hadn't noticed any before IntelliJ started doing them. I don't know of any actual problem doing it with the wildcards. |
@@ -27,7 +27,10 @@ class controlledExecutionScope:
class StructuralMechanicsTestFactory(KratosUnittest.TestCase):
+
def setUp(self):
+ print("setUp ---> ", self.file_name)
+ KratosMultiphysics.Model().Reset()
# Within this location context:
with controlledExecutionScope(os.path.dirname(os.path.realpath(__file__))):
| [StructuralMechanicsTestFactory->[test_execution->[controlledExecutionScope],tearDown->[controlledExecutionScope],setUp->[controlledExecutionScope]]] | Initialize the object with the data from the Kratos Multiphysics project. | What is this supposed to do? Create a new (and empty) Model and reset it?? |
@@ -52,6 +52,7 @@ class Review(amo.models.ModelBase):
help_text="How many previous reviews by the user for this add-on?")
objects = ReviewManager()
+ with_deleted = ReviewManager(include_deleted=True)
class Meta:
db_table = 'reviews'
| [check_spam->[Spam,add],ReviewFlag->[flush_urls->[flush_urls]],Spam->[reasons->[get],add->[set,get,add]],GroupedRating->[set->[valid,get,key,set],get->[get,key]],Review->[ReviewManager]] | Model for all reviews. Get the urls of the user s reply to the . | Why not a second manager like `WithDeletedReviewManager` that inherits from the existing one? I think it's better that having that `include_deleted` option. |
@@ -27,12 +27,17 @@ import (
// Config defines the structure of heartbeat.yml.
type Config struct {
- // Modules is a list of module specific configuration data.
+ OneShot []*common.Config `config:"one_shot"`
Monitors []*common.Config `config:"monitors"`
ConfigMonitors *common.Config `config:"config.monitors"`
Scheduler Scheduler `config:"scheduler"`
Autodiscover *autodiscover.Config `config:"autodiscover"`
SyntheticSuites []*common.Config `config:"synthetic_suites"`
+ Jobs map[string]JobLimit `config:"jobs"`
+}
+
+type JobLimit struct {
+ Limit int64 `config:"limit" validate:"min=0"`
}
// Scheduler defines the syntax of a heartbeat.yml scheduler block.
| [No CFG could be retrieved] | Package config import - imports a module specific configuration data. | Dont want to deviate this PR in to some other direction, but are we okay with this naming or change it to something like `RunOnce` mode? |
@@ -2,13 +2,17 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
+import json
from msrest.serialization import Model
from ._generated.models import KeyValue
+
class ConfigurationSetting(Model):
"""A configuration value.
Variables are only populated by the server, and will be ignored when
sending a request.
+ :ivar value: The value of the configuration setting
+ :vartype value: str
:ivar etag: Entity tag (etag) of the object
:vartype etag: str
:param key:
| [ConfigurationSetting->[_from_key_value->[cls],__init__->[super,get]]] | A configuration value for a specific Entity - Tag. Create a ConfigurationSetting object from a KeyValue object. | if you add value here, we may want to remove :param value: :type value: str below. |
@@ -3948,7 +3948,7 @@ namespace DotNetNuke.Data
return ExecuteScalar<int>("GetContentWorkflowStateUsageCount", stateId);
}
- [Obsolete("Deprecated in Platform 7.4.0")]
+ [Obsolete("Deprecated in Platform 7.4.0. Scheduled removal in v11.0.0.")]
public virtual int AddContentWorkflow(int portalId, string workflowName, string description, bool isDeleted, bool startAfterCreating, bool startAfterEditing, bool dispositionEnabled)
{
return ExecuteScalar<int>("AddContentWorkflow",
| [DataProvider->[UpdatePortalAliasInfo->[GetNull,ExecuteNonQuery],EnsureNeutralLanguage->[ExecuteNonQuery],CreatePortal->[GetNull,CreatePortal],DeleteTabSettings->[ExecuteNonQuery],UpdateAuthCookie->[ExecuteNonQuery],UpdateUserLastIpAddress->[ExecuteNonQuery],UpdateIPFilter->[ExecuteNonQuery],AddDesktopModulePermission->[GetNull,GetRoleNull],UpdatePermission->[ExecuteNonQuery],RemoveUser->[GetNull,ExecuteNonQuery],ClearFileContent->[ExecuteNonQuery],SetEventMessageComplete->[ExecuteNonQuery],AddFolderMapping->[GetNull],UpdateUsersOnline->[ExecuteNonQuery],RestoreUser->[GetNull,ExecuteNonQuery],DeleteRedirection->[ExecuteNonQuery],RemovePortalLocalization->[ExecuteNonQuery],DeletePortalAlias->[ExecuteNonQuery],DeleteContentWorkflowStatePermission->[ExecuteNonQuery],DeletePreviewProfile->[ExecuteNonQuery],SaveRedirectionRule->[ExecuteNonQuery],AddPropertyDefinition->[GetNull],UpdateUser->[GetNull,ExecuteNonQuery],DeletePortalDesktopModules->[GetNull,ExecuteNonQuery],DeleteModulePermissionsByModuleID->[ExecuteNonQuery],AddFileVersion->[GetNull],AddFolder->[GetNull],MoveTabModule->[ExecuteNonQuery],DeleteTabPermissionsByUserID->[ExecuteNonQuery],AddTabModule->[GetNull,ExecuteNonQuery],DeleteDesktopModulePermissionsByPortalDesktopModuleID->[ExecuteNonQuery],UpdateListEntry->[ExecuteNonQuery],DeleteRedirectionRule->[ExecuteNonQuery],UpdateTab->[GetNull,ExecuteNonQuery],UpdateTabVersion->[ExecuteNonQuery],UpdateDesktopModule->[GetNull,ExecuteNonQuery],DeleteFiles->[GetNull,ExecuteNonQuery],UpdateModuleSetting->[ExecuteNonQuery],DeleteSynonymsGroup->[ExecuteNonQuery],UpdateFolder->[GetNull,ExecuteNonQuery],UpdateFile->[GetNull,ExecuteNonQuery],DeleteFolder->[GetNull,ExecuteNonQuery],AddUserPortal->[ExecuteNonQuery],UpdateFolderMapping->[ExecuteNonQuery],DeleteLogType->[ExecuteNonQuery],AddTabPermission->[GetNull,GetRoleNull],DeleteLog->[ExecuteNonQuery],AddContentWorkflowStatePermission->[GetNull],SaveTabUrl->[GetNull,ExecuteNonQuery],RemoveOutputCacheItem->[ExecuteNonQuery],UpdateServer->[ExecuteNonQuery],AddLogType->[ExecuteNonQuery],UpdatePortalInfo->[GetNull,ExecuteNonQuery],UpdateLanguage->[ExecuteNonQuery],DeleteSkinPackage->[ExecuteNonQuery],UpdateDatabaseVersion->[ExecuteNonQuery],AddDesktopModule->[GetNull],UpdateFolderMappingSetting->[ExecuteNonQuery],DeleteUrlTracking->[GetNull,ExecuteNonQuery],GetNull->[GetNull],DeletePermission->[ExecuteNonQuery],UpdateModuleOrder->[ExecuteNonQuery],ConvertTabToNeutralLanguage->[ExecuteNonQuery],AddLog->[GetNull,ExecuteNonQuery],AddUrlTracking->[GetNull,ExecuteNonQuery],DeleteDesktopModulePermissionsByUserID->[ExecuteNonQuery],DeleteUrl->[ExecuteNonQuery],DeleteDesktopModule->[ExecuteNonQuery],DeletePackage->[ExecuteNonQuery],ClearLog->[ExecuteNonQuery],AddContentWorkflow->[GetNull],DeleteListEntryByListName->[ExecuteNonQuery],UpdatePortalAlias->[ExecuteNonQuery],AddSchedule->[GetNull],UpdateContentWorkflowState->[ExecuteNonQuery],UpdatePackage->[GetNull,ExecuteNonQuery],DeleteSearchStopWords->[ExecuteNonQuery],DeleteTabSetting->[ExecuteNonQuery],UpdateDesktopModulePermission->[GetNull,GetRoleNull,ExecuteNonQuery],UpdateAuthentication->[ExecuteNonQuery],UpdateLogType->[ExecuteNonQuery],UpdateFolderVersion->[ExecuteNonQuery],UpdateSearchStopWords->[ExecuteNonQuery],AddModule->[GetNull],UpdateExtensionUrlProvider->[ExecuteNonQuery],DeleteFile->[GetNull,ExecuteNonQuery],UpdateModuleDefinition->[ExecuteNonQuery],AddModulePermission->[GetNull,GetRoleNull],AddTabToEnd->[GetNull],AddUserRole->[GetNull],AddModuleControl->[GetNull],UpdateDatabaseVersionIncrement->[ExecuteNonQuery],DeleteUsersOnline->[ExecuteNonQuery],MoveTabToParent->[GetNull,ExecuteNonQuery],DeleteModuleControl->[ExecuteNonQuery],UpdateModuleLastContentModifiedOnDate->[ExecuteNonQuery],UpdateSynonymsGroup->[ExecuteNonQuery],UpdateHostSetting->[ExecuteNonQuery],DeleteTabVersionDetailByModule->[ExecuteNonQuery],EnsureLocalizationExists->[ExecuteNonQuery],DeleteTranslatedTabs->[ExecuteNonQuery],DeleteTabModuleSettings->[ExecuteNonQuery],UpdateFileVersion->[ExecuteNonQuery],DeletePortalSetting->[ExecuteNonQuery],UpdateTabModuleSetting->[ExecuteNonQuery],UpdateTabOrder->[GetNull,ExecuteNonQuery],DeletePropertyDefinition->[ExecuteNonQuery],UpdateUrlTrackingStats->[GetNull,ExecuteNonQuery],UpdateUserRole->[GetNull,ExecuteNonQuery],DeleteModuleDefinition->[ExecuteNonQuery],RegisterAssembly->[GetNull],DeleteTabModule->[ExecuteNonQuery],UpdateTabTranslationStatus->[ExecuteNonQuery],DeleteContentWorkflowState->[ExecuteNonQuery],DeleteLanguage->[ExecuteNonQuery],UpdateModuleControl->[GetNull,ExecuteNonQuery],DeleteRole->[ExecuteNonQuery],DeleteFolderMapping->[ExecuteNonQuery],DeleteLogTypeConfigInfo->[ExecuteNonQuery],PurgeScheduleHistory->[ExecuteNonQuery],UpdateSkin->[ExecuteNonQuery],ResetFilePublishedVersion->[ExecuteNonQuery],AddSkinControl->[GetNull],AddUrlLog->[GetNull,ExecuteNonQuery],DeleteTab->[ExecuteNonQuery],DeleteUserFromPortal->[GetNull,ExecuteNonQuery],AddUrl->[ExecuteNonQuery],MarkAsPublished->[ExecuteNonQuery],UpdateModule->[GetNull,ExecuteNonQuery],PurgeLog->[ExecuteNonQuery],UpdateEventLogPendingNotif->[ExecuteNonQuery],SetPublishedVersion->[ExecuteNonQuery],UpdateLogTypeConfigInfo->[GetNull,ExecuteNonQuery],DeleteLanguagePack->[ExecuteNonQuery],DeletePortalSettings->[ExecuteNonQuery],UpdateTabModuleTranslationStatus->[ExecuteNonQuery],UpdatePortalDefaultLanguage->[ExecuteNonQuery],SaveExtensionUrlProviderSetting->[ExecuteNonQuery],UpdateProfile->[ExecuteNonQuery],AddSearchDeletedItems->[ExecuteNonQuery],UpdateFileHashCode->[ExecuteNonQuery],UpdateTabModuleVersion->[ExecuteNonQuery],DeleteFolderPermission->[ExecuteNonQuery],DeleteList->[ExecuteNonQuery],AddTabBefore->[GetNull],AddPackage->[GetNull],DeleteIPFilter->[ExecuteNonQuery],AddProfile->[ExecuteNonQuery],UpdateSchedule->[GetNull,ExecuteNonQuery],AddOutputCacheItem->[ExecuteNonQuery],MoveTabBefore->[ExecuteNonQuery],UpdateModulePermission->[GetNull,GetRoleNull,ExecuteNonQuery],UpdateTabModule->[GetNull,ExecuteNonQuery],UpdateSkinControl->[GetNull,ExecuteNonQuery],DeleteTabVersionDetail->[ExecuteNonQuery],DeletePortalLanguages->[GetNull,ExecuteNonQuery],IDataReader->[GetNull],UpdateTabSetting->[ExecuteNonQuery],UpdateContentWorkflowStatePermission->[GetNull,ExecuteNonQuery],DeleteServer->[ExecuteNonQuery],UpdatePortalSetting->[ExecuteNonQuery],UpdateTabPermission->[GetNull,GetRoleNull,ExecuteNonQuery],RestoreTabModule->[ExecuteNonQuery],DeleteAuthentication->[ExecuteNonQuery],DeleteTabPermission->[ExecuteNonQuery],DeleteTabVersion->[ExecuteNonQuery],DeleteFolderPermissionsByFolderPath->[GetNull,ExecuteNonQuery],DeleteSkinControl->[ExecuteNonQuery],UpdateUrlTracking->[GetNull,ExecuteNonQuery],DeleteExtensionUrlProvider->[ExecuteNonQuery],UpdateSkinPackage->[GetNull,ExecuteNonQuery],AddUser->[GetNull],UpdateFileLastModificationTime->[ExecuteNonQuery],UpdatePortalSetup->[ExecuteNonQuery],PurgeOutputCache->[ExecuteNonQuery],MoveTabAfter->[ExecuteNonQuery],DeleteExpiredAuthCookies->[ExecuteNonQuery],UpdateFileContent->[GetNull,ExecuteNonQuery],DeleteAuthCookie->[ExecuteNonQuery],DeleteModuleSetting->[ExecuteNonQuery],AddFile->[GetNull],DeletePortalInfo->[ExecuteNonQuery],PurgeExpiredOutputCacheItems->[ExecuteNonQuery],UpdateProfileProperty->[GetNull,ExecuteNonQuery],DeleteModulePermission->[ExecuteNonQuery],DeleteProcessedSearchDeletedItems->[ExecuteNonQuery],UpdateTabModuleVersionByModule->[ExecuteNonQuery],DeleteModule->[ExecuteNonQuery],DeleteModuleSettings->[ExecuteNonQuery],DeleteRoleGroup->[ExecuteNonQuery],UpdateContentWorkflow->[ExecuteNonQuery],AddFolderMappingSetting->[ExecuteNonQuery],AddFolderPermission->[GetNull,GetRoleNull],UpdateRoleGroup->[ExecuteNonQuery],AddSkinPackage->[GetNull],AddPasswordHistory->[AddPasswordHistory,GetNull,ExecuteNonQuery],DeleteListEntryByID->[ExecuteNonQuery],DeleteTabModuleSetting->[ExecuteNonQuery],UpdateRoleSetting->[ExecuteNonQuery],DeleteUserRole->[ExecuteNonQuery],UpdateFolderPermission->[GetNull,GetRoleNull,ExecuteNonQuery],AddTabAfter->[GetNull],DeleteTabUrl->[ExecuteNonQuery],DeleteTabPermissionsByTabID->[ExecuteNonQuery],UpdateRole->[GetNull,ExecuteNonQuery],AddScheduleItemSetting->[ExecuteNonQuery],LocalizeTab->[ExecuteNonQuery],DeleteSkin->[ExecuteNonQuery],DeleteOldRedirectMessage->[ExecuteNonQuery],AddPortalAlias->[GetNull],AddDefaultFolderTypes->[ExecuteNonQuery],DeleteFolderPermissionsByUserID->[ExecuteNonQuery],ChangeUsername->[ExecuteNonQuery],DeleteModulePermissionsByUserID->[ExecuteNonQuery],UpdatePortalLanguage->[ExecuteNonQuery],UpdateListSortOrder->[ExecuteNonQuery],AddRole->[GetNull],AddLogTypeConfigInfo->[GetNull,ExecuteNonQuery],UpdateScheduleHistory->[GetNull,ExecuteNonQuery],DeleteDesktopModulePermission->[ExecuteNonQuery],SetFileHasBeenPublished->[ExecuteNonQuery],DeleteSchedule->[ExecuteNonQuery],UpdatePropertyDefinition->[ExecuteNonQuery]]] | This method returns the number of content workflows in a given state. | I am not familiar enough with this, but we should provide some basic guidance on what to replace it with. Same for all others in this namespace. |
@@ -268,13 +268,13 @@ public class DelimiterBasedFrameDecoder extends ByteToMessageDecoder {
}
if (stripDelimiter) {
- frame = buffer.readSlice(minFrameLength);
+ frame = buffer.readRetainedSlice(minFrameLength);
buffer.skipBytes(minDelimLength);
} else {
- frame = buffer.readSlice(minFrameLength + minDelimLength);
+ frame = buffer.readRetainedSlice(minFrameLength + minDelimLength);
}
- return frame.retain();
+ return frame;
} else {
if (!discardingTooLongFrame) {
if (buffer.readableBytes() > maxFrameLength) {
| [DelimiterBasedFrameDecoder->[validateMaxFrameLength->[IllegalArgumentException],indexOf->[readerIndex,capacity,getByte,writerIndex],decode->[capacity,skipBytes,indexOf,readableBytes,retain,decode,readSlice,add,fail],validateDelimiter->[NullPointerException,isReadable,IllegalArgumentException],isLineBased->[capacity,getByte],fail->[TooLongFrameException],isSubclass->[getClass],NullPointerException,IllegalArgumentException,isLineBased,readableBytes,LineBasedFrameDecoder,readerIndex,validateDelimiter,validateMaxFrameLength,slice,isSubclass]] | Decodes the given buffer. | i just looked quickly ... but is there a chance this could throw? if so we should release `frame`. |
@@ -604,6 +604,17 @@ class _OverloadAttributeTemplate(AttributeTemplate):
return sig.return_type
+def _adjust_omitted_args(argtypes, argvals):
+ """Add dummy arguments for each missing types.Omitted in *argtypes*.
+ """
+ if len(argtypes) > len(argvals):
+ argvals = list(argvals)
+ for t in reversed(argtypes):
+ if isinstance(t, types.Omitted):
+ argvals.append(None)
+ return argvals
+
+
class _OverloadMethodTemplate(_OverloadAttributeTemplate):
"""
A base class of templates for @overload_method functions.
| [_OverloadMethodTemplate->[_resolve->[MethodTemplate->[generic->[_resolve_impl_sig,as_method]]],do_class_init->[method_impl->[_get_dispatcher]]],_OverloadFunctionTemplate->[generic->[_validate_sigs],_validate_sigs->[gen_diff,get_args_kwargs]],Registry->[register_global->[decorator->[decorate]]],make_overload_method_template->[make_overload_attribute_template],ConcreteTemplate->[apply->[_select]],_OverloadAttributeTemplate->[_resolve_impl_sig->[_get_dispatcher],_resolve->[MethodTemplate->[generic->[]],_resolve_impl_sig]],AbstractTemplate->[apply->[generic]],signature->[Signature],Signature->[replace->[Signature]],CallableTemplate->[apply->[generic,_select,replace,signature]],_IntrinsicTemplate->[generic->[replace]],Registry] | The base class of templates for the given formal signature. Create a function that can be called from a template. | Is this branch ever executed? |
@@ -843,7 +843,7 @@ namespace System.Net.Sockets
}
}
- public AsyncOperation? ProcessSyncEventOrGetAsyncEvent(SocketAsyncContext context, bool skipAsyncEvents = false)
+ public AsyncOperation? ProcessSyncEventOrGetAsyncEvent(SocketAsyncContext context, bool skipAsyncEvents = false, bool inlineAsyncEvents = true)
{
AsyncOperation op;
using (Lock())
| [SocketAsyncContext->[BufferListReceiveOperation->[InvokeCallback->[ReturnOperation]],StopAndAbort->[StopAndAbort],BufferMemorySendOperation->[InvokeCallback->[ReturnOperation]],HandleEvents->[Process,ProcessSyncEventOrGetAsyncEvent],OperationQueue->[ProcessAsyncOperation->[Dispose,InvokeCallback],StopAndAbort->[TryCancel,Trace],IsReady->[Trace],OperationResult->[TryComplete,TrySetRunning,Trace,SetComplete,SetWaiting],ProcessSyncEventOrGetAsyncEvent->[Trace],StartAsyncOperation->[DoAbort,TryComplete,TryCancel,Trace]],PerformSyncOperation->[CancelAndContinueProcessing,StartAsyncOperation,Reset],SocketError->[SetNonBlocking,IsReady,ReturnOperation,ShouldRetrySyncOperation,PerformSyncOperation,StartAsyncOperation],ProcessAsyncWriteOperation->[ProcessAsyncOperation],Register->[Trace],BufferMemoryReceiveOperation->[InvokeCallback->[ReturnOperation]],AcceptOperation->[InvokeCallback->[ReturnOperation]],HandleSyncEventsSpeculatively->[ProcessSyncEventOrGetAsyncEvent],BufferListSendOperation->[InvokeCallback->[ReturnOperation]],ProcessAsyncReadOperation->[ProcessAsyncOperation],Init]] | Start an asynchronous operation. ProcessSyncEventOrGetAsyncEvent - This method checks if a sync operation is in progress. | Nit: since the method name uses the verb "Process" for sync events, should the parameter name be "processAsyncEvents"? |
@@ -1679,7 +1679,7 @@ def _check_scaling_inputs(data, picks_list, scalings):
return scalings_
-def _estimate_rank_meeg_signals(data, info, scalings, tol=1e-4,
+def _estimate_rank_meeg_signals(data, info, scalings=None, tol=1e-4,
return_singular=False, copy=True):
"""Estimate rank for M/EEG data.
| [make_ad_hoc_cov->[Covariance],_get_covariance_classes->[_ShrunkCovariance->[fit->[fit]],_RegCovariance->[fit->[fit,Covariance]]],_undo_scaling_array->[_apply_scaling_array],write_cov->[save],Covariance->[__iadd__->[_check_covs_algebra],__add__->[_check_covs_algebra]],_estimate_rank_meeg_signals->[_apply_scaling_array,_undo_scaling_array],_estimate_rank_meeg_cov->[_undo_scaling_cov,_apply_scaling_cov],_gaussian_loglik_scorer->[_logdet],compute_covariance->[_check_n_samples,_get_tslice,Covariance,_unpack_epochs],read_cov->[Covariance],_get_whitener_data->[compute_whitener],compute_whitener->[prepare_noise_cov],_auto_low_rank_model->[_cross_val],_undo_scaling_cov->[_apply_scaling_cov],prepare_noise_cov->[_get_ch_whitener],compute_raw_data_covariance->[Covariance,_check_n_samples]] | Estimate the rank of the M - EEG signals. | Do we need this default here? |
@@ -1222,15 +1222,14 @@ namespace System.Windows.Forms
/// <summary>
/// Scale the default font (if it is set) as per the Settings display text scale settings.
/// </summary>
- internal static void ScaleDefaultFont()
+ /// <param name="textScaleFactor">The scaling factor in the range [1.0, 2.25].</param>
+ internal static void ScaleDefaultFont(float textScaleFactor)
{
if (s_defaultFont is null || !OsVersion.IsWindows10_1507OrGreater)
{
return;
}
- float textScaleValue = DpiHelper.GetTextScaleFactor();
-
if (s_defaultFontScaled is not null)
{
s_defaultFontScaled.Dispose();
| [Application->[DoEvents->[DoEvents],ExitThread->[ExitThread],OnThreadException->[OnThreadException],SetUnhandledExceptionMode->[SetUnhandledExceptionMode],BeginModalMessageLoop->[BeginModalMessageLoop],UnregisterMessageLoop->[RegisterMessageLoop],SetDefaultFont->[ScaleDefaultFont],RegisterMessageLoop->[RegisterMessageLoop],EndModalMessageLoop->[EndModalMessageLoop],Restart->[Exit],AddMessageFilter->[AddMessageFilter],FormActivated->[FormActivated],RemoveMessageFilter->[RemoveMessageFilter],DoEventsModal->[DoEventsModal],Exit->[Exit],ParkHandle->[ParkHandle],UnparkHandle->[UnparkHandle],AddEventHandler,RemoveEventHandler]] | Scale the default font if it is not the default value in the valid text scale factor. | Any reason to exclude Charset and VerticalFont? |
@@ -29,7 +29,7 @@ public class AbstractCassandraTest {
Session session = cluster.connect();
CQLDataLoader dataLoader = new CQLDataLoader(session);
dataLoader.load(new ClassPathCQLDataSet("config/cql/create-tables.cql", true, "cassandra_unit_keyspace"));
- applyScripts(dataLoader, "config/cql/", "*_added_entity_*.cql");
+ applyScripts(dataLoader, "config/cql/changelog", "*.cql");
}
private static void applyScripts(CQLDataLoader dataLoader, String cqlDir, String pattern) throws IOException, URISyntaxException {
| [No CFG could be retrieved] | A base class for starting and stopping cassandra during tests. | add / at the end plz: `config/cql/changelog` => `config/cql/changelog/` |
@@ -45,13 +45,17 @@ final class ValidateListener
public function onKernelView(GetResponseForControllerResultEvent $event)
{
$request = $event->getRequest();
+ if ($request->isMethodSafe(false) || $request->isMethod(Request::METHOD_DELETE)) {
+ return;
+ }
+
try {
$attributes = RequestAttributesExtractor::extractAttributes($request);
} catch (RuntimeException $e) {
return;
}
- if ($request->isMethodSafe(false) || $request->isMethod(Request::METHOD_DELETE)) {
+ if (!$attributes['request']) {
return;
}
| [ValidateListener->[onKernelView->[create,getControllerResult,validate,isMethodSafe,getCollectionOperationAttribute,getRequest,getAttributes,getItemOperationAttribute,isMethod]]] | Checks if a node is found in the chain and if so checks if it is valid. | This change isn't really related, but is a minor performance improvement. |
@@ -176,8 +176,10 @@ def ExecuteBasicVTKoutputProcessCheck(file_format = "ascii", dimension = "2D"):
model_part = current_model.CreateModelPart(model_part_name)
if dimension == "2D":
SetupModelPart2D(model_part)
- else:
+ elif dimension == "3D":
SetupModelPart3D(model_part)
+ else:
+ SetupModelPartQuadratic3D(model_part)
vtk_output_parameters = KratosMultiphysics.Parameters("""{
"Parameters" : {
| [Check->[GetFilePath],ExecuteBasicVTKoutputProcessCheck->[Check,SetupModelPart2D,SetupVtkOutputProcess,SetSolution,SetupModelPart3D]] | This function is a basic check for the output of a KratosMultiphysics Check if the step is output. | Quad should probably not be lumped in the same variable as dimension. This makes the code confusing. |
@@ -77,7 +77,7 @@ void KratosSwimmingDEMApplication::Register()
KRATOS_REGISTER_ELEMENT("MonolithicDEMCoupledWeak2D", mMonolithicDEMCoupledWeak2D)
KRATOS_REGISTER_ELEMENT("MonolithicDEMCoupledWeak3D", mMonolithicDEMCoupledWeak3D)
KRATOS_REGISTER_ELEMENT("RigidShellElement", mRigidShellElement)
- KRATOS_REGISTER_ELEMENT("SphericSwimmingParticle3D", mSphericSwimmingParticle3D)
+ KRATOS_REGISTER_ELEMENT("SwimmingParticle3D", mSwimmingParticle3D)
KRATOS_REGISTER_ELEMENT("SwimmingNanoParticle3D", mSwimmingNanoParticle3D)
KRATOS_REGISTER_ELEMENT("SwimmingAnalyticParticle3D", mSwimmingAnalyticParticle3D)
KRATOS_REGISTER_ELEMENT("ComputeLaplacianSimplex2D", mComputeLaplacianSimplex2D)
| [No CFG could be retrieved] | Initialize KratosSwimmingDEMApplication. Get the list of kRatos that are registered in the System. | This name change will require updating F-DEMpack, we could leave it with the old name or update the GUI... |
@@ -14,4 +14,7 @@ public interface JSONConstants {
String QUERY_STRING = "query";
String TOTAL_RESULTS = "total_results";
String TYPE = "_type";
+ String TEMPLATE = "template";
+ String INFINITY = "infinity";
+ String INFINITY_NOROOT = "infinity,noroot";
}
| [No CFG could be retrieved] | String Query_string TOTAL_RESULTS TYPE. | Technically those are not JSONConstants, so it'd be better to either rename this interface or move those 3 new values to another place |
@@ -105,8 +105,10 @@ class DigitalFactoryOutputDevice(ProjectOutputDevice):
self.enabled = logged_in and self._controller.userAccountHasLibraryAccess()
self.enabledChanged.emit()
- def _onWriteStarted(self) -> None:
+ def _onWriteStarted(self, new_name: Optional[str] = None) -> None:
self._writing = True
+ if new_name:
+ self.setLastOutputName(new_name) # On saving, the user can change the name, this should propagate.
self.writeStarted.emit(self)
def _onWriteFinished(self) -> None:
| [DigitalFactoryOutputDevice->[_onUserAccessStateChanged->[emit,userAccountHasLibraryAccess],_onWriteStarted->[emit],loadWindow->[getInstance,log,requestActivate],_onWriteError->[emit],_onWriteFinished->[emit],requestWrite->[getPluginMetadata,loadWindow,DeviceBusyError,userAccountHasLibraryAccess,show,get,log,initialize],__init__->[setIconName,userAccountHasLibraryAccess,dirname,connect,getInstance,super,setShortDescription,join,setName,setDescription]]] | Sets the enabled status of the DigitalFactoryOutputDevice according to the account s login status. | This change causes DigitalLibrary to require a higher API version number, meaning it's no longer backwards compatible with Cura 4.9. |
@@ -294,8 +294,9 @@ def test_add_reference():
raw = Raw(fif_fname, preload=True)
events = read_events(eve_fname)
picks_eeg = pick_types(raw.info, meg=False, eeg=True)
+ # create epochs in delayed mode, allowing removal of CAR when re-reffing
epochs = Epochs(raw, events=events, event_id=1, tmin=-0.2, tmax=0.5,
- picks=picks_eeg, preload=True)
+ picks=picks_eeg, preload=True, proj='delayed')
epochs_ref = add_reference_channels(epochs, ['M1', 'M2'], copy=True)
assert_equal(epochs_ref._data.shape[1], epochs._data.shape[1] + 2)
_check_channel_names(epochs_ref, ['M1', 'M2'])
| [test_apply_reference->[_test_reference],test_add_reference->[_check_channel_names],test_set_eeg_reference->[_test_reference]] | Test adding a reference channel to a raw file. Missing channel in FITS file. Add reference channels to the epoch and evoked channels. Add two reference channels and evoked data if necessary. | does this mean that some code will suddenly break? |
@@ -35,6 +35,10 @@ public class DruidHttpClientConfig
@JsonProperty
private Period readTimeout = new Period("PT15M");
+ @JsonProperty
+ @Min(1)
+ private int numMaxThreads = Math.max(10, (Runtime.getRuntime().availableProcessors() * 17) / 16 + 2) + 30;
+
public int getNumConnections()
{
return numConnections;
| [DruidHttpClientConfig->[getReadTimeout->[toStandardDuration],Period]] | Returns the number of connections in the pool that are not a . | Curious how did you come up with this formula for setting max threads? |
@@ -1040,8 +1040,7 @@ def main(cli_args=sys.argv[1:]):
# note: arg parser internally handles --help (and exits afterwards)
plugins = plugins_disco.PluginsRegistry.find_all()
- parser, tweaked_cli_args = create_parser(plugins, cli_args)
- args = parser.parse_args(tweaked_cli_args)
+ args = parse_args(plugins, cli_args)
config = configuration.NamespaceConfig(args)
zope.component.provideUtility(config)
| [_plugins_parsing->[add,add_group,add_plugin_args],_auth_from_domains->[_report_new_cert,_treat_as_renewal],revoke->[revoke,_determine_account],auth->[_auth_from_domains,_find_domains,_report_new_cert,choose_configurator_plugins,_init_le_client],_create_subparsers->[add_subparser,add,add_group,flag_default],setup_logging->[setup_log_file_handler],_treat_as_renewal->[_find_duplicative_certs],SilentParser->[add_argument->[add_argument]],HelpfulArgumentParser->[add_plugin_args->[add_group],add->[add_argument],__init__->[SilentParser,flag_default]],install->[_init_le_client,_find_domains,choose_configurator_plugins],run->[_init_le_client,_auth_from_domains,_find_domains,choose_configurator_plugins],create_parser->[HelpfulArgumentParser,flag_default,add,config_help,add_group],main->[setup_logging,create_parser],choose_configurator_plugins->[set_configurator,diagnose_configurator_problem],_paths_parser->[config_help,add,add_group,flag_default],_init_le_client->[_determine_account],rollback->[rollback],main] | Entry point for the Zope - LetsEncrypt command line interface. Check if we have a node with a node id and if so run it. | The variable `tweaked_cli_args` was used to preserve the original value of `args` because something about the modified version caused problems for the `configuration.NamespaceConfig(args)` call below. I can't remember what it was, though. Unsure if you'll need to reintroduce that preservation. |
@@ -152,9 +152,7 @@ var _ = Describe("Podman images", func() {
})
It("podman images filter reference", func() {
- if podmanTest.RemoteTest {
- Skip("Does not work on remote client")
- }
+ SkipIfRemote()
podmanTest.RestoreAllArtifacts()
result := podmanTest.PodmanNoCache([]string{"images", "-q", "-f", "reference=docker.io*"})
result.WaitWithDefaultTimeout()
| [SliceIsSorted,InspectImageJSON,Podman,Exit,WaitWithDefaultTimeout,Should,To,SeedImages,OutputToStringArray,Join,Cleanup,PodmanNoCache,LineInOuputStartsWith,RestoreAllArtifacts,Sprintf,LineInOutputContainsTag,OutputToString,IsJSONOutputValid,LineInOutputContains,BuildImage,FromHumanSize,Setup] | There are no checks on the output of the command line. Podman images filter before image. | Does this enable the test? |
@@ -2481,6 +2481,14 @@ define([
}
function getChannelEvaluator(model, runtimeNode, targetPath, spline) {
+ if (model._clampAnimations) {
+ return function(localAnimationTime) {
+ if (defined(spline)) {
+ runtimeNode[targetPath] = spline.evaluate(spline.clampTime(localAnimationTime), runtimeNode[targetPath]);
+ runtimeNode.dirtyNumber = model._maxDirtyNumber;
+ }
+ };
+ }
return function(localAnimationTime) {
// Workaround for https://github.com/KhronosGroup/glTF/issues/219
| [No CFG could be retrieved] | Private functions - A function to create a node in the runtime graph. Creates an array of animations. | Should the two cases be an if-else in the same function? That way someone would be able to change the `clampAnimation` property dynamically. I don't think there would be much of a performance hit. `this._clampAnimations` could then become `this.clampAnimations` and be a public property. |
@@ -107,6 +107,9 @@ func init() {
druidv1alpha1.AddToScheme,
apiextensionsscheme.AddToScheme,
istionetworkingv1beta1.AddToScheme,
+ auditv1.AddToScheme,
+ auditv1beta1.AddToScheme,
+ apiserverv1alpha1.AddToScheme,
)
utilruntime.Must(seedSchemeBuilder.AddToScheme(SeedScheme))
| [NewScheme,AddToScheme,NewSchemeBuilder,GracePeriodSeconds,PropagationPolicy,Must,NewCodecFactory,NewSerializerWithOptions] | DefaultGetOptions returns the default options for GET requests. type Applier is used to apply multiple Kubernetes objects to a Kubernetes cluster. | Why do you add them here? Probably they only should be added to a dedicated scheme in the KAPI package? |
@@ -34,7 +34,7 @@ def narrow_declared_type(declared: Type, narrowed: Type) -> Type:
if isinstance(declared, UnionType):
return UnionType.make_simplified_union([narrow_declared_type(x, narrowed)
for x in declared.relevant_items()])
- elif not is_overlapping_types(declared, narrowed, use_promotions=True):
+ elif not is_overlapping_types(declared, narrowed):
if experiments.STRICT_OPTIONAL:
return UninhabitedType()
else:
| [is_overlapping_types->[is_overlapping_types],is_overlapping_tuples->[is_overlapping_types],narrow_declared_type->[narrow_declared_type,meet_types],meet_similar_callables->[meet_types],is_partially_overlapping_types->[is_object],TypeMeetVisitor->[visit_union_type->[meet_types],visit_callable_type->[meet_types],visit_instance->[meet_types],visit_tuple_type->[meet_types],visit_overloaded->[meet_types],meet->[meet_types]]] | Return the declared type narrowed down to another type. | Do you have a test for this, or you jut noticed the inconsistency? |
@@ -21,7 +21,7 @@ class TwoFactorOptionsForm
end
def selected?(type)
- type.to_s == (selection || 'sms')
+ type.to_s == (selection || 'webauthn')
end
private
| [TwoFactorOptionsForm->[update_otp_delivery_preference_for_user->[call],selected?->[to_s],user_needs_updating?->[delivery_preference,include?,otp_delivery_preference],initialize->[user],submit->[messages,new,selection,valid?,user_needs_updating?],include,attr_writer,validates,attr_accessor,attr_reader]] | Returns true if the given type is selected by the user. | This is probably okay for now. We need to think about how we want to manage default selection. |
@@ -38,8 +38,8 @@ public abstract class ParameterizedStatementDefinition<T extends ParameterizedSt
*/
@Parameter
@Optional
- //@Content TODO: MULE-10641 re-enable datasense for these parameter
@Placement(order = 2)
+ @TypeResolver(BaseDbMetadataResolver.class)
@XmlHints(allowReferences = false)
protected LinkedHashMap<String, Object> inputParameters = new LinkedHashMap<>();
| [ParameterizedStatementDefinition->[copy->[copy],resolveFromTemplate->[resolveFromTemplate,resolveTemplateParameters],resolveTemplateParameters->[addInputParameter,getParameterValues]]] | Abstract class for generating the parameter values of a given type. Returns an unmodifiable Map with the input parameters for the given parameter name. | The `Base` prefix denotes an abstract class meant to be extended. This is something you're actually using so rename |
@@ -1064,7 +1064,7 @@ Java_io_daos_dfs_DaosFsClient_dfsReadDir(JNIEnv *env, jobject client,
break;
}
}
- if (buffer[0]) strcat(buffer, ",");
+ if (buffer[0]) strcat(buffer, "//");
strcat(buffer, entries[i].d_name);
}
}
| [No CFG could be retrieved] | read directory content and return name of the object in UTF - 8 format. Copy the contents of the n - tuple into the buffer. | (style) trailing statements should be on next line |
@@ -86,7 +86,8 @@ class InputReduction(Attacker):
def _remove_one_token(instance: Instance,
input_field_to_attack: str,
grads: np.ndarray,
- ignore_tokens: List[str]) -> Tuple[Instance, int]:
+ ignore_tokens: List[str],
+ beam_size: int = 1) -> List[Tuple[Instance, int]]:
"""
Finds the token with the smallest gradient and removes it.
"""
| [_remove_one_token->[argmin,sqrt,float,enumerate,dot],_get_ner_tags_and_mask->[str,append],InputReduction->[attack_from_json->[any,deepcopy,append,get_fields_to_compare,_get_ner_tags_and_mask,len,json_to_labeled_instances,outputs,isinstance,sanitize,_remove_one_token,range,get_gradients]],register] | Removes one token from the text field and the tag field. | This is a private method. You don't need the default value here (and it just gives another place for defaults to mismatch, as they currently do). |
@@ -308,6 +308,7 @@ class AccountController extends AbstractRestController implements ClassResourceI
}
$this->entityManager->persist($accountContact);
+ $this->domainEventCollector->collect(new AccountContactAddedEvent($accountContact));
$this->entityManager->flush();
$isMainContact = false;
| [AccountController->[setParent->[setParent],initFieldDescriptors->[getFieldDescriptors]]] | Updates a contact s reserved - words relation. 404 not found. | would be nice to dispatch this event in the `ContactManager::setMainAccount` method too |
@@ -190,6 +190,7 @@ class CppInfo(_CppInfo):
self.libdirs != [DEFAULT_LIB] or
self.bindirs != [DEFAULT_BIN] or
self.resdirs != [DEFAULT_RES] or
+ self.builddirs != [DEFAULT_BUILD] or
self.frameworkdirs != [DEFAULT_FRAMEWORK] or
self.libs or
self.system_libs or
| [CppInfo->[__getattr__->[_get_cpp_info->[_CppInfo],_get_cpp_info],__init__->[Component,DefaultOrderedDict]],DepCppInfo->[defines->[_aggregated_values],__getattr__->[_get_cpp_info->[],__getattr__],cflags->[_aggregated_values],system_libs->[_aggregated_values],libs->[_aggregated_values],include_paths->[_aggregated_paths],res_paths->[_aggregated_paths],exelinkflags->[_aggregated_values],frameworks->[_aggregated_values],build_modules_paths->[_aggregated_paths],build_paths->[_aggregated_paths],_aggregated_values->[_merge_lists],cxxflags->[_aggregated_values],_aggregated_paths->[_merge_lists],lib_paths->[_aggregated_paths],framework_paths->[_aggregated_paths],bin_paths->[_aggregated_paths],sharedlinkflags->[_aggregated_values],src_paths->[_aggregated_paths]],_CppInfo->[lib_paths->[_filter_paths],framework_paths->[_filter_paths],include_paths->[_filter_paths],bin_paths->[_filter_paths],res_paths->[_filter_paths],build_paths->[_filter_paths],src_paths->[_filter_paths]],_BaseDepsCppInfo->[update->[merge_lists]],DepsCppInfo->[__getattr__->[_get_cpp_info->[],_BaseDepsCppInfo]]] | Raise ConanException if mixing components. | is this something for a different PR to be merged asap? |
@@ -1684,7 +1684,7 @@ void dt_culling_full_redraw(dt_culling_t *table, gboolean force)
}
l = g_list_next(l);
}
- if(!in_list && table->list && g_list_length(table->list) > 0)
+ if(!in_list && table->list && table->list)
{
dt_thumbnail_t *thumb = (dt_thumbnail_t *)g_list_nth_data(table->list, 0);
dt_control_set_mouse_over_id(thumb->imgid);
| [dt_culling_change_offset_image->[dt_culling_full_redraw]] | culling full redraw add a new image to the list of active images find the last image that has the focus. | no need to double check ;) |
@@ -312,7 +312,10 @@ class HookMap
def delete(hook_id)
hook = @hooks_id[hook_id]
- @hooks[hook.type].delete(hook.key)
+ if @hooks[hook.type].key?(hook.key)
+ @hooks[hook.type][hook.key].delete(hook_id)
+ @hooks[hook.type].delete(hook.key) if @hooks[hook.type][hook.key].empty?
+ end
@filters.delete(hook_id)
@hooks_id.delete(hook_id)
end
| [HookExecutionManager->[reload_hooks->[load_hook,subscribe,get_hook_by_id,delete,unsubscribe,filter,key],retry_action->[build_response_body,execute,id,remote?],hem_loop->[get_hook,get_hook_by_id,reload_hooks],load_hooks->[subscribe,each_filter,load],execute_action->[id,remote?,build_response_body,execute,remote_host,key,arguments]],HookMap->[delete->[delete,key],load->[type,id,valid?,filter,key],load_hook->[type,filter,key]],start] | Delete a specific node from the chain. | You need to remove the hook filter only when `@hooks[hook.type][hook.key].empty?`. If you remove it always you'll stop receiving the event when deleting just one of the hooks. |
@@ -172,9 +172,9 @@ func (consensus *Consensus) UpdatePublicKeys(pubKeys []*bls.PublicKey) int {
consensus.pubKeyLock.Lock()
consensus.PublicKeys = append(pubKeys[:0:0], pubKeys...)
consensus.CommitteePublicKeys = map[string]bool{}
- utils.Logger().Info().Msg("My Committee")
- for _, pubKey := range consensus.PublicKeys {
- utils.Logger().Info().Str("BlsPubKey", pubKey.SerializeToHexStr()).Msg("Member")
+ utils.Logger().Info().Msg("My Committee updated")
+ for i, pubKey := range consensus.PublicKeys {
+ utils.Logger().Info().Int("index", i).Str("BlsPubKey", pubKey.SerializeToHexStr()).Msg("Member")
consensus.CommitteePublicKeys[pubKey.SerializeToHexStr()] = true
}
// TODO: use pubkey to identify leader rather than p2p.Peer.
| [verifyViewChangeSenderKey->[IsValidatorInCommittee],verifySenderKey->[IsValidatorInCommittee],checkViewID->[SetViewID],updateConsensusInformation->[getLogger,SetBlockNum,SetViewID,getLeaderPubKeyFromCoinbase],getLogger->[String],signConsensusMessage->[signMessage]] | UpdatePublicKeys updates the public keys in consensus. | is it info or debug? |
@@ -1,6 +1,7 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
+#if SHOULD_RUN_CROSSGEN
using System;
using System.CommandLine;
using System.IO;
| [CommandLineOptions->[Command->[PartialImageOption,InputBubbleOption,TuningImageOption,CompositeBuildMode,BubbleGenericsOption,SaveDetailedLogOption,ResilientOption,TargetOSOption,EnableOptimizationsOption,UnrootedInputFilesToCompile,CodeGenOptions,VerboseLoggingOption,SingleMethodGenericArgs,SaveDependencyLogOption,CompileNoMethodsOption,InstructionSets,VerifyTypeAndFieldLayoutOption,FileLayoutOption,MapFileOption,ParalellismOption,MethodLayoutOption,TargetArchOption,CompositeRootPath,JitPathOption,SystemModuleOverrideOption,ReferenceFiles,OutputFilePath,InputFilesToCompile,OptimizeSpaceOption,MibcFiles,ProcessorCount,OptimizeSpeedOption,SingleMethodTypeName,WaitForDebuggerOption,SingleMethodMethodName,CustomPESectionAlignmentOption]]] | This namespace is used to compile a MIBC file into a MIBC file. The command that creates a command object from a single generic argument. | Why does this change need to be touching crossgen2? I would expect that we will run the linker analysis for libraries only. |
@@ -149,7 +149,11 @@ func resourceAwsAcmCertificateRead(d *schema.ResourceData, meta interface{}) err
if err := d.Set("validation_emails", emailValidationOptions); err != nil {
return resource.NonRetryableError(err)
}
- d.Set("validation_method", resourceAwsAcmCertificateGuessValidationMethod(domainValidationOptions, emailValidationOptions))
+
+ if _, ok := d.GetOk("validation_method"); ok {
+ d.Set("validation_method", resourceAwsAcmCertificateGuessValidationMethod(domainValidationOptions, emailValidationOptions))
+
+ }
params := &acm.ListTagsForCertificateInput{
CertificateArn: aws.String(d.Id()),
| [AddTagsToCertificate,DescribeCertificate,Duration,Set,NonRetryableError,Error,GetOk,HasChange,Errorf,ListTagsForCertificate,SetId,RetryableError,Id,DeleteCertificate,Get,Printf,RequestCertificate,String,Retry] | This function returns a unique identifier for the certificate that matches the specified parameters. Check if the ACM certificate has changed and if so update it. | Found during testing: wound up switching `validation_method` to `Computed: true` (for now) instead of using this, since it breaks Terraform resource import functionality for this attribute. |
@@ -48,7 +48,9 @@ class LayerDataBuilder(MeshBuilder):
self._layers[layer].setThickness(thickness)
- def build(self):
+ # material color map: [r, g, b, a] for each extruder row.
+ # line_type_brightness: compatibility layer view uses line type brightness of 0.5
+ def build(self, material_color_map, line_type_brightness = 1.0):
vertex_count = 0
index_count = 0
for layer, data in self._layers.items():
| [LayerDataBuilder->[setLayerThickness->[addLayer],setLayerHeight->[addLayer],addPolygon->[addLayer],build->[build]]] | Sets the thickness of a layer. | Could you use doxygen style markup here? Makes it a bit more consistent (use \param & \type{dict} etc) |
@@ -144,11 +144,16 @@ MiddlewareRegistry.register(store => next => action => {
id: localId,
local: true,
- raisedHand: enabled
+ raisedHand
+ }));
+
+ store.dispatch(raiseHandUpdateQueue({
+ id: localId,
+ raisedHand
}));
if (typeof APP !== 'undefined') {
- APP.API.notifyRaiseHandUpdated(localId, enabled);
+ APP.API.notifyRaiseHandUpdated(localId, raisedHand);
}
break;
| [No CFG could be retrieved] | This function is called from the action. js when a participant is added to a store. Private method for handling action. | We should update iframe docs, right? |
@@ -810,10 +810,12 @@ setup(
'borgfs = borg.archiver:main',
]
},
+ # See also the MANIFEST.in file.
+ # We want to install all the files in the package directories...
include_package_data=True,
- package_data={
- 'borg': ['paperkey.html'],
- 'borg.testsuite': ['attic.tar.gz'],
+ # ...except the source files which have been compiled (C extensions):
+ exclude_package_data={
+ '': ['*.c', '*.h', '*.pyx', ],
},
cmdclass=cmdclass,
ext_modules=ext_modules,
| [build_usage->[write_options->[is_positional_group],write_options_group->[is_positional_group],rows_to_table->[write_row_separator],generate_level->[generate_level],write_usage->[format_metavar]],Clean->[run->[rm]],build_man->[write_see_also->[write,write_heading],run->[generate_level],write_man_header->[write,write_heading],write_options->[write_options_group,write_heading],write_examples->[write,write_heading],gen_man_page->[write],write_options_group->[is_positional_group,write],generate_level->[write_options_group,write_options,generate_level,write_usage],write_heading->[write],write_usage->[format_metavar,write]],detect_libb2,detect_openssl,detect_lz4] | This function is used to create a zip file with the missing entry points. | IANAL, but shouldn't the blake2 license be mentioned somewhere if the elements are excluded for wheels/install |
@@ -738,7 +738,7 @@ namespace Microsoft.Xna.Framework.Net
string gamerTag = im.ReadString ();
int openPrivateGamerSlots = im.ReadInt32 ();
int openPublicGamerSlots = im.ReadInt32 ();
- bool isHost = im.ReadBoolean ();
+ im.ReadBoolean ();
NetworkSessionProperties properties = new NetworkSessionProperties ();
int[] propertyData = new int[properties.Count * 2];
| [MyIPAddress->[IPAddress->[Find]],MonoGamerPeer->[UpdateLiveSession->[GetMyLocalIpAddress],RequestNATIntroduction->[GetMyLocalIpAddress],SendMessage->[SendMessage]]] | This method reads the network sessions from the network. This function is called to populate the object that contains the current game count. | Maybe add `//isHost`, there is another one you removed just below too. |
@@ -26,7 +26,7 @@ namespace System.Runtime.Serialization.Json
private const char LOW_SURROGATE_END = (char)0xdfff;
private const char MAX_CHAR = (char)0xfffe;
private const char WHITESPACE = ' ';
- internal const string SerializerTrimmerWarning = "Json Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the " +
+ internal const string SerializerTrimmerWarning = "Data Contract Serialization and Deserialization might require types that cannot be statically analyzed. Make sure all of the " +
"required types are preserved.";
| [DataContractJsonSerializerImpl->[CheckIfXmlNameRequiresMapping->[CheckIfXmlNameRequiresMapping,ConvertXmlNameToJsonName,CheckIfJsonNameRequiresMapping],ConvertXmlNameToJsonName->[ConvertXmlNameToJsonName],InternalWriteObject->[InternalWriteEndObject],CheckIfJsonNameRequiresMapping->[CharacterNeedsEscaping,CheckIfJsonNameRequiresMapping],Initialize->[AddCollectionItemTypeToKnownTypes,Initialize,ConvertXmlNameToJsonName,CheckIfJsonNameRequiresMapping],DataContract->[CheckIfTypeIsReference],ReadJsonValue->[ReadJsonValue],ReadObject->[ReadObject],InternalWriteObjectContent->[WriteJsonNull,WriteJsonValue],WriteJsonValue->[WriteJsonValue],InternalIsStartObject->[IsJsonLocalName],InternalReadObject->[InternalIsStartObject,ReadJsonValue],WriteObject->[WriteObject],CheckIfTypeIsReference],DataContractJsonSerializer->[WriteStartObject->[WriteStartObject],ConvertXmlNameToJsonName->[ConvertXmlNameToJsonName],WriteObject->[WriteObject],CheckIfJsonNameRequiresMapping->[CharacterNeedsEscaping,CheckIfJsonNameRequiresMapping],WriteEndObject->[WriteEndObject],DataContract->[CheckIfTypeIsReference],ReadJsonValue->[ReadJsonValue],InvokeOnSerializing->[InvokeOnSerializing],WriteObjectContent->[WriteObjectContent],ReadObject->[ReadObject],InvokeOnDeserializing->[InvokeOnDeserializing],IsStartObject->[IsStartObject],WriteJsonValue->[WriteJsonValue],InvokeOnDeserialized->[InvokeOnDeserialized],InvokeOnSerialized->[InvokeOnSerialized]]] | Creates a DataContractJsonSerializer for JSON objects. This is a utility method to create a DataContractJsonSerializer from an unclosed code. | This string won't be localized. Is that okay? Also as this string has now been adopted for use in lots of places and not just for DCJS, it might be better for this to live in a more common class. Maybe DataContract? #Resolved |
@@ -74,6 +74,8 @@ func (l *balanceLeaderScheduler) Schedule(cluster schedule.Cluster, opInfluence
source := cluster.GetStore(region.Leader.GetStoreId())
target := cluster.GetStore(newLeader.GetStoreId())
+ log.Debugf("source store is %v", source)
+ log.Debugf("target store is %v", target)
avgScore := cluster.GetStoresAverageScore(core.LeaderKind)
if !shouldBalance(source, target, avgScore, core.LeaderKind, region, opInfluence, cluster.GetTolerantSizeRatio()) {
schedulerCounter.WithLabelValues(l.GetName(), "skip").Inc()
| [IsScheduleAllowed->[OperatorCount,GetLeaderScheduleLimit],Schedule->[GetTolerantSizeRatio,GetStoreId,GetStore,GetStoresAverageScore,NewOperator,GetName,IsRegionHot,Inc,WithLabelValues,GetId],RegisterScheduler,NewStateFilter,NewBlockFilter,NewBalanceSelector,NewHealthFilter] | Schedule schedules a transfer - leader operation to the next leader. | please combine two logs into one, add scheduler name . |
@@ -271,6 +271,16 @@ describe('angular', function() {
expect(equals(NaN, NaN)).toBe(true);
});
+ it('should treat two \'unknown\' objects as equal', function() {
+ if (window.ActiveXObject) {
+ var unknown = new ActiveXObject('Msxml2.XMLHTTP').open;
+ if (typeof unknown === 'unknown') {
+ expect(equals({foo:unkown}, {foo:unkown})).toBe(true);
+ expect(equals({foo:unkown}, null)).toBe(false);
+ }
+ }
+ });
+
it('should compare Scope instances only by identity', inject(function($rootScope) {
var scope1 = $rootScope.$new(),
scope2 = $rootScope.$new();
| [No CFG could be retrieved] | Tests that functions are not null and that they are equal. Checks that the object has the same keys as the original object. | Probably IE10 has no `Msxml2.XMLHTTP` |
@@ -25,9 +25,9 @@ class RecoveryCodeForm
recovery_code_generator.verify(code)
end
- def result
+ def extra_analytics_attributes
{
- success: success,
+ method: 'recovery code',
}
end
end
| [RecoveryCodeForm->[valid_recovery_code?->[verify,new],submit->[valid_recovery_code?,call],attr_reader,include,attr_accessor]] | Checks if the recovery code is valid. | should `'recovery code'` be a constant, perhaps? |
@@ -513,8 +513,8 @@ class AttributeAssignmentMixin:
def get_variant_selection_attributes(qs: "QuerySet"):
- return qs.filter(
- input_type__in=AttributeInputType.ALLOWED_IN_VARIANT_SELECTION,
+ return qs.select_related("attributevariant").filter(
+ attributevariant__variant_selection=True,
type=AttributeType.PRODUCT_TYPE,
)
| [AttributeAssignmentMixin->[save->[_pre_save_values],clean_input->[AttrValuesInput,_validate_attributes_input,_resolve_attribute_global_id,_resolve_attribute_nodes]]] | Get all attributes that are allowed in a variant selection. | From what I see we currently have two functions `get_variant_selection_attributes` - one does filtering in DB and the other filters in Python. Do you think we could refactor them and have a single function instead? |
@@ -87,6 +87,8 @@
</main>
</div>
+ <div data-snackbar-target="snackZone"></div>
+
<!-- Bootstrap Dependencies -->
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
| [No CFG could be retrieved] | A list of all possible icons for the n - ary object. | Part of the SnackBar Preact component now wrapped in Stimulus |
@@ -784,6 +784,12 @@ def process_config(
def merge_entry_paths(keys, value, args, value_id=0):
+ def select_argument_by_priority(argument_list):
+ for current_arg in argument_list:
+ if current_arg in args and args[current_arg]:
+ return current_arg
+ return argument_list[-1]
+
for field, argument in keys.items():
if field not in value:
continue
| [filter_pipelines->[filtered],ConfigReader->[_prepare_global_configs->[merge],_merge_paths_with_prefixes->[process_models->[process_config],process_modules->[process_config],process_pipelines->[process_config]],check_local_config->[_check_pipelines_config->[_is_requirements_missed,_count_entry],_check_models_config->[_is_requirements_missed],_check_module_config->[_is_requirements_missed]],convert_paths->[_prepare_global_configs,_merge_configs,_merge_paths_with_prefixes,convert_dataset_paths,convert_launcher_paths],_provide_cmd_arguments->[merge_models->[provide_models]]],filter_models->[filtered],process_config->[process_launchers->[create_command_line_mapping],process_dataset->[create_command_line_mapping],process_launchers,process_dataset],filter_modules->[filtered],merge_dlsdk_launcher_args->[_convert_models_args->[merge_converted_model_path],_convert_models_args,_async_evaluation_args,_fpga_specific_args]] | Merge entry paths into value. | I would suggest `return next(filter(args.get, argument_list), argument_list[-1])`. It's simple enough that you might not even need a function. |
@@ -0,0 +1,12 @@
+from django.contrib.sitemaps import Sitemap
+
+from ..product.models import Product
+
+
+class ProductSitemap(Sitemap):
+
+ def items(self):
+ return Product.objects.only('id', 'name').order_by('-id')
+
+
+sitemaps = {'products': ProductSitemap}
| [No CFG could be retrieved] | No Summary Found. | Are we sure this is sufficient for Saleor? I recall you changing the implementation of `get_absolute_url`? |
@@ -139,6 +139,9 @@ class VmwareVmImplementer {
details.put(VmDetailConstants.NIC_ADAPTER, VirtualEthernetCardType.E1000.toString());
}
}
+ if(StringUtils.isEmpty(details.get(VmDetailConstants.RAM_RESERVATION))){
+ details.put(VmDetailConstants.RAM_RESERVATION, NumberUtils.DOUBLE_ZERO.toString());
+ }
}
setBootParameters(vm, to, details);
| [VmwareVmImplementer->[configureNestedVirtualization->[getGlobalNestedVirtualisationEnabled,getGlobalNestedVPerVMEnabled],setDetails->[setDetails]]] | Add details to a VM This method is called to set the details of a nested virtual machine. | Could cause an issue if the user does not want to reserve memory for a VM and passes 0.0, better to leave it unset and check whether the key exists in getReservedMemoryMb (Tested, passing 0.0 causes memory to be reserved) |
@@ -191,4 +191,10 @@ public class DnsHeader {
this.z = z;
return this;
}
+
+ @Override
+ public String toString() {
+ return "DnsHeader{recursionDesired=" + recursionDesired
+ + ", opcode=" + opcode + ", id=" + id + ", type=" + type + ", z=" + z + '}';
+ }
}
| [DnsHeader->[answerCount->[size],additionalResourceCount->[size],authorityResourceCount->[size],questionCount->[size],NullPointerException]] | Sets the z - value of the header. | use a StringBuilder |
@@ -3199,8 +3199,11 @@ arc_shrink(int64_t to_free)
ASSERT((int64_t)arc_p >= 0);
}
- if (arc_size > arc_c)
+ if (arc_size > arc_c) {
+ mutex_exit(&arc_c_mtx);
(void) arc_adjust();
+ } else
+ mutex_exit(&arc_c_mtx);
}
typedef enum free_memory_reason_t {
| [No CFG could be retrieved] | region Eviction functions Return the amount of memory that can be consumed before reclaim. | this can be simplified by putting the mutex_exit() above this conditional and removing the else Note: for style reasons, it is best to not mix {} with non-{} in an if-then-else |
@@ -40,7 +40,14 @@ class Listings extends Component {
this.state = {
first: 12,
search: getStateFromQuery(props),
- sort: 'featured'
+ // currently sort is activated through hardcoding the sort state
+ // order = 'asc' or 'desc'
+ // I have made it possible to sort by other values but its not tested
+ // target: 'price.amount' is the current goal
+ // this will be updated to be user set when the front end is completed
+ // graphql is expecting string values so to disable use empty strings
+ sort: { target: '', order: '' }
+ // sort: { target: 'price.amount', order: 'asc' }
}
}
| [No CFG could be retrieved] | Component that returns a list of all the listings in the system. XmlSerializer for the section. | Could we just have a var for 'sort' and another for 'order' instead of nesting those properties inside a 'sort' object? |
@@ -183,6 +183,15 @@ class EvaluationContext {
committedResult.getUnprocessedInputs().orElse(null),
committedResult.getOutputs(),
result.getWatermarkHold());
+
+ // Callback and requested bundle finalizations
+ for (InMemoryBundleFinalizer.Finalization finalization : result.getBundleFinalizations()) {
+ try {
+ finalization.getCallback().onBundleSuccess();
+ } catch (Exception e) {
+ LOG.warn("Failed to finalize requested bundle {}", finalization, e);
+ }
+ }
return committedResult;
}
| [EvaluationContext->[createKeyedBundle->[createKeyedBundle],getStepName->[getStepName],isDone->[isDone],forceRefresh->[fireAllAvailableCallbacks],initialize->[initialize],create->[EvaluationContext],createRootBundle->[createRootBundle],extractFiredTimers->[extractFiredTimers,forceRefresh],createBundle->[createBundle],scheduleAfterOutputWouldBeProduced->[fireAvailableCallbacks],scheduleAfterWindowExpiration->[fireAvailableCallbacks],handleResult->[create],now->[now],create]] | Handles the result of a transform operation. | I don't think logging only the finalization tells us enough. Can we log more information about the bundle itself? |
@@ -1,4 +1,4 @@
import initialize from "@yoast/schema-blocks";
import { LogLevel } from "@yoast/schema-blocks";
-initialize( LogLevel.ERROR );
+initialize( LogLevel.DEBUG );
| [No CFG could be retrieved] | Initialize the block - level objects. | I think that we shouldn't release this. |
@@ -53,10 +53,8 @@ public class KafkaTopicClientImpl implements KafkaTopicClient {
init();
}
- @Override
- public void createTopic(final String topic, final int numPartitions, final short
- replicatonFactor) {
- log.info("Creating topic '{}'", topic);
+
+ public void createTopic(final String topic, final int numPartitions, final short replicatonFactor) {
if (isTopicExists(topic)) {
Map<String, TopicDescription> topicDescriptions = describeTopics(Arrays.asList(topic));
TopicDescription topicDescription = topicDescriptions.get(topic);
| [KafkaTopicClientImpl->[close->[close],deleteTopics->[deleteTopics],deleteInternalTopics->[listTopicNames,deleteTopics]]] | Create a new topic if it does not exist. | This method overrides a the same method from the interface. It needs ` @Override` annotation. |
@@ -522,8 +522,8 @@ int OpenReceiverChannel(void)
if (setsockopt(sd, IPPROTO_IPV6, IPV6_V6ONLY,
&no, sizeof(no)) == -1)
{
- Log(LOG_LEVEL_WARNING,
- "Listening socket is IPv6-only. setsockopt: %s",
+ Log(LOG_LEVEL_VERBOSE,
+ "Couldn't set the IPPROTO_IPV6:IPV6_V6ONLY socket option to 0 (setsockopt: %s)",
GetErrorStr());
}
}
| [No CFG could be retrieved] | Find an ethernet address and return it. - - - - - - - - - - - - - - - - - -. | I think it's better to to describe the problem in user-facing terms. The original message was better for that (albeit at the wrong loquacity level). At the very least, mention that it's the **listening** socket on which you're trying to clear the flag. |
@@ -40,7 +40,7 @@ Rails.application.configure do
ENV.fetch("ANNICT_ASSET_URL")
end
end
-
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy
| [fetch,new,formatter,log_tags,compile,lambda,consider_all_requests_local,asset_host,log_formatter,cache_classes,imgix,deprecation,r301,dump_schema_after_migration,logger,fallbacks,enabled,force_ssl,delivery_method,eager_load,default_url_options,present?,except,perform_caching,custom_options,insert_before,proc,log_level,configure,slice,smtp_settings] | Config for master key. Configure the and lograge. | Layout/TrailingWhitespace: Trailing whitespace detected. |
@@ -144,11 +144,13 @@ func (e *TrackToken) storeRemoteTrack(ctx *Context) (err error) {
e.G().Log.Debug("- StoreRemoteTrack -> %s", libkb.ErrToOk(err))
}()
- // need to unlock private key
- if e.lockedKey == nil {
- return fmt.Errorf("nil locked key")
+ var secretStore libkb.SecretStore
+ if e.arg.Me != nil {
+ e.lockedKey.SetUID(e.arg.Me.GetUID())
+ secretStore = libkb.NewSecretStore(e.arg.Me.GetName())
}
- e.signingKeyPriv, err = e.lockedKey.PromptAndUnlock(ctx.LoginContext, "tracking signature", e.lockedWhich, nil, ctx.SecretUI, nil)
+ // need to unlock private key
+ e.signingKeyPriv, err = e.lockedKey.PromptAndUnlock(ctx.LoginContext, "tracking signature", e.lockedWhich, secretStore, ctx.SecretUI, nil)
if err != nil {
return err
}
| [loadThem->[LoadUser],storeLocalTrack->[StoreLocalTrack,GetUID],storeRemoteTrack->[SigChainBump,ComputeLinkID,GetUID,UIDArg,G,Post,GetKID,ErrToOk,PromptAndUnlock,Errorf,ToShortID,SignToString,ToString,Info,Debug],loadMe->[LoadMe],Run->[loadThem,storeLocalTrack,storeRemoteTrack,SetUID,GetUID,GetPubKey,Marshal,G,TrackingProofFor,Errorf,GetSecretKeyLocked,Get,Info,loadMe,Debug],NewContextified] | storeRemoteTrack puts a track into the remote server. | why was this check removed? |
@@ -1559,6 +1559,7 @@ dnode_hold_impl(objset_t *os, uint64_t object, int flag, int slots,
dnode_slots_rele(dnc, idx, slots);
DNODE_VERIFY(dn);
+ ASSERT3P(dnp, !=, NULL);
ASSERT3P(dn->dn_dbuf, ==, db);
ASSERT3U(dn->dn_object, ==, object);
dbuf_rele(db, FTAG);
| [No CFG could be retrieved] | finds the correct object for the given index in the tree. Adds a single object or tag to the dnode. | `dnp` is also used on line 1329, so should there be an `IMPLY(!(flag & DNODE_DRY_RUN), (tag != NULL) && (dnp != NULL));` at the top of the function instead? |
@@ -27,11 +27,16 @@ from action_recognition_demo.result_renderer import ResultRenderer
from action_recognition_demo.steps import run_pipeline
from os import path
+sys.path.append(str(Path(__file__).resolve().parent.parent / 'common'))
+import monitors
-def video_demo(encoder, decoder, videos, no_show, fps=30, labels=None):
+
+def video_demo(encoder, decoder, videos, no_show, utilization_monitors, fps=30, labels=None):
"""Continuously run demo on provided video list"""
- result_presenter = ResultRenderer(no_show=no_show, labels=labels)
+ presenter = monitors.Presenter(utilization_monitors, 70)
+ result_presenter = ResultRenderer(no_show=no_show, presenter=presenter, labels=labels)
run_pipeline(videos, encoder, decoder, result_presenter.render_frame, fps=fps)
+ print(presenter.reportMeans())
def build_argparser():
| [build_argparser->[add_argument_group,ArgumentParser,add_argument],video_demo->[run_pipeline,ResultRenderer],main->[add_extension,splitext,basename,set_config,replace,strip,read,ValueError,IECore,video_demo,build_argparser,open,IEModel],exit,main] | Continuously run demo on provided video list. | I'm `pathlib`'s biggest fan, but IMO, we shouldn't import it just for this. A total switch to `pathlib` would be nice, but if the rest of the demo's still using `os.path`, this should use it too. |
@@ -832,6 +832,7 @@ define([
var color = billboard.color;
var pickColor = billboard.getPickId(context).color;
+ var sizeInMeters = billboard.sizeInMeters ? 1.0 : 0.0;
var height = 0;
var index = billboard._imageIndex;
| [No CFG could be retrieved] | Writes compressed attributes to the VAF file. This function calculates the maximum size of the billboard image. | Did we adjust the bounding volume computation for this? |
@@ -173,11 +173,13 @@ public abstract class AbstractMappingMessageRouter extends AbstractMessageRouter
}
private void doSetChannelMappings(Map<String, String> newChannelMappings) {
- Map<String, String> oldChannelMappings = this.channelMappings;
- this.channelMappings = newChannelMappings;
+ Map<String, String> oldChannelMappings = new HashMap<String, String>(this.channelMappings);
+ synchronized (this.channelMappings) {
+ this.channelMappings.clear();
+ this.channelMappings.putAll(newChannelMappings);
+ }
if (logger.isDebugEnabled()) {
- logger.debug("Channel mappings:" + oldChannelMappings
- + " replaced with:" + newChannelMappings);
+ logger.debug("Channel mappings: " + oldChannelMappings + " replaced with: " + newChannelMappings);
}
}
| [AbstractMappingMessageRouter->[addChannelFromString->[addChannelFromString,resolveChannelForName],addToCollection->[addChannelFromString,addToCollection],determineTargetChannels->[getChannelKeys]]] | This method is used to set the channel mappings. | While `getChannelMappings()` is now only accessed by `RouterMetrics`, I think it needs to get a copy rather than a hard reference - otherwise the map can change while the caller has a reference. |
@@ -481,8 +481,11 @@ func (c *Container) ContainerExecStart(ctx context.Context, eid string, stdin io
defer cancel()
// we do not return an error here if this fails. TODO: Investigate what exactly happens on error here...
+ // FIXME: This being in a retry could lead to multiple writes to stdout(?)
go func() {
defer trace.End(trace.Begin(eid))
+
+ // FIXME: NEEDS CONTAINER PROXY
// wait property collector
if err := c.TaskWaitToStart(id, name, eid); err != nil {
op.Errorf("Task wait returned %s, canceling the context", err)
| [ContainerRm->[Handle],ContainerExecStart->[Handle,TaskWaitToStart,TaskInspect],TaskWaitToStart->[Handle],findPortBoundNetworkEndpoint->[defaultScope],ContainerExecInspect->[TaskInspect],containerAttach->[Handle],ContainerExecCreate->[Handle,TaskInspect],TaskInspect->[Handle],containerStart->[Handle,cleanupPortBindings]] | ContainerExecStart starts a container exec process This function is called when a container is not available This function is called when a process is started. Start the container. | I think this now has a container proxy entry - should be updated to use it. |
@@ -81,6 +81,9 @@ func Init(homeDir string, logFile string, runModeStr string, accessGroupOverride
fmt.Printf("Go: Using log: %s\n", logFile)
}
+ // Set to one OS thread on mobile so we don't have too much contention with JS thread
+ runtime.GOMAXPROCS(1)
+
startTrace(logFile)
dnsNSFetcher := newDNSNSFetcher(externalDNSNSFetcher)
| [GetServers->[processExternalResult,GetServers],GetServers] | newDNSNSFetcher creates a new dnsNSFetcher object that fetches the next n - tuples runMode is the run mode of the application. | maybe get the return value here and print it, just for information as to what it was before. |
@@ -637,8 +637,11 @@ class TransferDescriptionWithSecretState(State):
initiator: InitiatorAddress,
target: TargetAddress,
secret: Secret,
+ secret_hash: SecretHash = None,
) -> None:
- secrethash = sha3(secret)
+
+ if secret_hash is None:
+ secret_hash = sha3(secret)
self.payment_network_identifier = payment_network_identifier
self.payment_identifier = payment_identifier
| [InitiatorPaymentState->[__ne__->[__eq__]],TransferDescriptionWithSecretState->[__ne__->[__eq__]],LockedTransferSignedState->[__ne__->[__eq__]],TargetTransferState->[__ne__->[__eq__]],MediationPairState->[__ne__->[__eq__]],InitiatorTransferState->[__ne__->[__eq__]],WaitingTransferState->[__ne__->[__eq__]],LockedTransferUnsignedState->[__ne__->[__eq__]],MediatorTransferState->[__ne__->[__eq__]]] | Initialize a PaymentNetwork object with the given parameters. | provided that we use `secrethash` instead of `secret_hash`, can you change the all `secret_hash` instances you added? (for consistency) |
@@ -27,6 +27,8 @@ using Internal.IL.Stubs;
#if READYTORUN
using System.Reflection.Metadata.Ecma335;
using ILCompiler.DependencyAnalysis.ReadyToRun;
+using System.Reflection.Metadata;
+using System.Collections.Immutable;
#endif
namespace Internal.JitInterface
| [No CFG could be retrieved] | Creates a new object that represents a single object in the System. Runtime. Get the jit - host handle. | This should be outside the ifdef |
@@ -32,7 +32,6 @@ import (
// TemplateLoader is a subset of the Elasticsearch client API capable of
// loading the template.
type ESClient interface {
- LoadJSON(path string, json map[string]interface{}) ([]byte, error)
Request(method, path string, pipeline string, params map[string]string, body interface{}) (int, []byte, error)
GetVersion() common.Version
}
| [LoadTemplate->[Info,LoadJSON,Errorf,Debug],Load->[LoadFile,Stat,CheckTemplate,Resolve,ReadFile,Unmarshal,GetVersion,LoadTemplate,GetName,String,Errorf,LoadBytes,Info,Debug],CheckTemplate->[Request],Unpack] | NewLoader creates a new loader that loads a template from the given template. Load - loads the index mapping template for the given object. | ++ to remove that. |
@@ -139,7 +139,7 @@ module.exports = options => ({
new ForkTsCheckerWebpackPlugin({ eslint: true }),
new CopyWebpackPlugin({
patterns: [
- <%_ if (!reactive && (applicationType === 'gateway' || applicationType === 'monolith')) { _%>
+ <%_ if ((applicationType === 'gateway' || applicationType === 'monolith')) { _%>
{ from: './node_modules/swagger-ui-dist/*.{js,css,html,png}', to: 'swagger-ui', flatten: true, globOptions: { ignore: ['**/index.html'] }},
{ from: './node_modules/axios/dist/axios.min.js', to: 'swagger-ui' },
{ from: './<%= MAIN_SRC_DIR %>swagger-ui/', to: 'swagger-ui' },
| [No CFG could be retrieved] | Config for the missing - version middleware. Plugin that renders the main header of the application. | Remove unnecessary brackets |
@@ -235,8 +235,7 @@ int dtls1_do_write(SSL *s, int type)
if (s->write_hash) {
if (s->enc_write_ctx
- && ((EVP_CIPHER_CTX_mode(s->enc_write_ctx) == EVP_CIPH_GCM_MODE) ||
- (EVP_CIPHER_CTX_mode(s->enc_write_ctx) == EVP_CIPH_CCM_MODE)))
+ && (EVP_CIPHER_CTX_flags(s->enc_write_ctx) & EVP_CIPH_FLAG_AEAD_CIPHER) != 0)
mac_size = 0;
else
mac_size = EVP_MD_CTX_size(s->write_hash);
| [No CFG could be retrieved] | This function is called by the write_one_or_write_one functions. It END of function nofle_read. | The coding style guide requires lines to be a max of 80 chars in length. Please could you split this line up? |
@@ -1,4 +1,4 @@
-<% job = @data[:sidekiq][:job] %>
+<% job = @data.dig(:sidekiq, :job) || {} %>
Job class: <%= job['wrapped'] %>
Queue: <%= job['queue'] %>
| [No CFG could be retrieved] | Initialize a new instance of the Job class. | I made this change because while I was working on the Ahoy changes, I caused an error at one point, but Exception Notification was not able to send the email with the exception because in this case there is no Sidekiq data present. |
@@ -1408,7 +1408,6 @@ class LoggedIO:
continue
fd.write(data[:size])
data = data[size:]
- data.release()
def read(self, segment, offset, id, read_data=True):
"""
| [Repository->[prepare_txn->[_read_integrity,prepare_txn,open_index,check_transaction],check_can_create_repository->[AlreadyExists,is_repository,PathAlreadyExists],_update_index->[CheckNeeded],get_transaction_id->[get_index_transaction_id,check_transaction],get->[ObjectNotFound,get_transaction_id,open_index],check_transaction->[CheckNeeded,get_index_transaction_id],close->[close],write_index->[rename_tmp,flush_and_sync,open],__contains__->[get_transaction_id,open_index],compact_segments->[complete_xfer,get_index_transaction_id],check->[report_error,prepare_txn,_update_index,get_transaction_id,get_index_transaction_id,open_index,write_index],rollback->[_rollback],open->[DoesNotExist,InvalidRepository,InvalidRepositoryConfig,AtticRepository],get_many->[get],check_free_space->[destroy,InsufficientFreeSpaceError],scan->[get_transaction_id,open_index],_read_integrity->[open],open_index->[_read_integrity,get_transaction_id,commit,open_index],put->[get_transaction_id,prepare_txn,StorageQuotaExceeded],migrate_lock->[migrate_lock],delete->[ObjectNotFound,get_transaction_id,prepare_txn],save_key->[save_config],list->[get_transaction_id,open_index],replay_segments->[write_index,prepare_txn],create->[check_can_create_repository],__len__->[get_transaction_id,open_index],commit_nonce_reservation->[get_free_nonce]],LoggedIO->[segment_exists->[segment_filename],delete_segment->[segment_filename],iter_objects->[get_fd],cleanup->[segment_iterator],get_fd->[open_fd->[segment_filename,open],open_fd],write_commit->[get_write_fd,close_segment],get_latest_segment->[segment_iterator],segment_size->[segment_filename],_read->[read],get_segments_transaction_id->[segment_iterator],recover_segment->[open],write_put->[get_write_fd],close_segment->[close],write_delete->[get_write_fd],_close_fd->[close],get_segment_magic->[get_fd],get_write_fd->[segment_filename],is_committed_segment->[open],read->[read,get_fd]]] | Recover a segment from a file. | looks like my change was somehow bad, see travis-ci. who can explain why? |
@@ -45,15 +45,15 @@
#include <file_lib.h>
static const size_t QUEUESIZE = 50;
-int NO_FORK = false;
+int NO_FORK = false; /* GLOBAL_A */
/*******************************************************************/
/* Command line options */
/*******************************************************************/
-static const char *CF_SERVERD_SHORT_DESCRIPTION = "CFEngine file server daemon";
+static const char *const CF_SERVERD_SHORT_DESCRIPTION = "CFEngine file server daemon";
-static const char *CF_SERVERD_MANPAGE_LONG_DESCRIPTION =
+static const char *const CF_SERVERD_MANPAGE_LONG_DESCRIPTION =
"cf-serverd is a socket listening daemon providing two services: it acts as a file server for remote file copying "
"and it allows an authorized cf-runagent to start a cf-agent run. cf-agent typically connects to a "
"cf-serverd instance to request updated policy code, but may also request additional files for download. "
| [No CFG could be retrieved] | Section of code that defines the configuration of a specific policy. A function to create a new object. | Could use array, here and in every program's *_DESCRIPTION, as part of a generally-applicable <code> blah *const name = data; </code> conversion to <code> blah name[] = data; </code> |
@@ -136,6 +136,7 @@ namespace System.ServiceProcess.Tests
controller.WaitForStatus(ServiceControllerStatus.Stopped);
}
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/1724")]
[ConditionalFact(nameof(IsProcessElevated))]
public void TestOnExecuteCustomCommand()
{
| [ServiceBaseTests->[ServiceController->[AssertExpectedProperties]]] | Test on pause and continue then stop. | Used the URL form of the issue vs. simple `int` to avoid confusion with `int` that refer to corefx issue ids. Happy to switch to `int` form if preferred. |
@@ -44,10 +44,12 @@ class SecretRegistry:
CONTRACT_MANAGER.get_contract_abi(CONTRACT_SECRET_REGISTRY),
to_normalized_address(secret_registry_address),
)
- CONTRACT_MANAGER.check_contract_version(
- proxy.functions.contract_version().call(),
- CONTRACT_SECRET_REGISTRY
- )
+
+ # TODO: add this back
+ # CONTRACT_MANAGER.check_contract_version(
+ # proxy.functions.contract_version().call(),
+ # CONTRACT_SECRET_REGISTRY
+ # )
self.address = secret_registry_address
self.proxy = proxy
| [SecretRegistry->[register_secret->[TransactionThrew,unhexlify,pex,poll,critical,info,transact,check_transaction_threw],secret_registered_filter->[get_event_id,new_filter],__init__->[privatekey_to_address,get_contract_abi,to_normalized_address,new_contract_proxy,is_binary_address,check_address_has_code,contract_version,InvalidAddress,check_contract_version],register_block_by_secrethash->[getSecretRevealBlockHeight]],get_logger] | Initializes a new object with the given parameters. | If you leave a TODO like that please make an issue and assign yourself (or someone else). Same goes for the other instances below |
@@ -439,8 +439,16 @@ public class CommandAwareRpcDispatcher extends RpcDispatcher {
}
private static boolean isRsvpCommand(ReplicableCommand command) {
- return command instanceof FlagAffectedCommand
- && ((FlagAffectedCommand) command).hasFlag(Flag.GUARANTEED_DELIVERY);
+ return command instanceof FlagAffectedCommand && ((FlagAffectedCommand) command).hasFlag(
+ Flag.GUARANTEED_DELIVERY);
+ }
+
+ public StreamingMarshaller getIspnMarshaller() {
+ return ispnMarshaller;
+ }
+
+ public void setIspnMarshaller(StreamingMarshaller ispnMarshaller) {
+ this.ispnMarshaller = ispnMarshaller;
}
}
| [CommandAwareRpcDispatcher->[handle->[isValid],processCalls->[marshallCall,constructMessage],constructMessage->[encodeDeliverMode],processCallsStaggered->[processSingleCall],staggeredProcessNext->[processCallsStaggered],processSingleCall->[marshallCall,constructMessage]]] | Checks if the given command is a Rsvp command. | couldn't you update the existing CustomRequestCorrelator? |
@@ -109,6 +109,15 @@ public class VersionedIntervalTimeline<VersionType, ObjectType> implements Timel
);
}
+ public static Map<String, VersionedIntervalTimeline<String, DataSegment>> buildTimelines(Iterable<DataSegment> segments)
+ {
+ final Map<String, VersionedIntervalTimeline<String, DataSegment>> timelines = new HashMap<>();
+ segments.forEach(segment -> timelines
+ .computeIfAbsent(segment.getDataSource(), dataSource -> new VersionedIntervalTimeline<>(Ordering.natural()))
+ .add(segment.getInterval(), segment.getVersion(), segment.getShardSpec().createChunk(segment)));
+ return timelines;
+ }
+
@VisibleForTesting
public Map<Interval, TreeMap<VersionType, TimelineEntry>> getAllTimelineEntries()
{
| [VersionedIntervalTimeline->[addAtKey->[remove],addAll->[add],forSegments->[forSegments],lookupWithIncompletePartitions->[lookup],lookup->[isEmpty,lookup,add],remove->[remove,add],TimelineEntry->[equals->[equals]],isEmpty->[isEmpty],findOvershadowed->[isEmpty,timelineEntryToObjectHolder,remove,add]]] | Add segments to the timeline. | This interface looks somewhat less intuitive because as this method also implies, `VersionedIntervalTimeline` is for each dataSource. I think it would be better to first group segments by their dataSources and then call `VersionedIntervalTimeline.forSegments` per dataSource. What do you think? |
@@ -2331,6 +2331,10 @@ class SymbolTableNode:
normalized = False # type: bool
# Was this defined by assignment to self attribute?
implicit = False # type: bool
+ # Is this node refers to other node via node aliasing?
+ # (This is currently used for simple aliases like `A = int` instead of .type_override)
+ is_aliasing = False # type: bool
+ alias_depends_on = None # type: Set[str]
def __init__(self,
kind: int,
| [ClassDef->[serialize->[serialize],is_generic->[is_generic],deserialize->[ClassDef,deserialize]],merge->[MroError],FuncDef->[serialize->[serialize],deserialize->[FuncDef]],Decorator->[fullname->[fullname],serialize->[serialize],name->[name],deserialize->[Decorator,deserialize]],TypeVarExpr->[serialize->[serialize],deserialize->[TypeVarExpr]],SymbolTable->[copy->[copy,SymbolTable],serialize->[serialize],deserialize->[deserialize,SymbolTable]],FuncItem->[set_line->[set_line],__init__->[name]],MypyFile->[serialize->[serialize],deserialize->[deserialize,MypyFile]],NameExpr->[serialize->[serialize],deserialize->[deserialize,NameExpr]],TypeInfo->[__repr__->[fullname],has_readable_member->[get],serialize->[fullname,serialize],__getitem__->[get],get->[get],has_base->[fullname],deserialize->[TypeInfo,deserialize],_calculate_is_enum->[fullname],is_metaclass->[fullname],dump->[type_str->[accept],fullname,type_str]],Argument->[set_line->[set_line]],get_member_expr_fullname->[get_member_expr_fullname],Var->[serialize->[serialize],deserialize->[Var]],SymbolTableNode->[copy->[SymbolTableNode],fullname->[fullname],serialize->[fullname,serialize],deserialize->[deserialize,SymbolTableNode],__str__->[fullname]],linearize_hierarchy->[direct_base_classes,fullname,linearize_hierarchy],OverloadedFuncDef->[serialize->[serialize],deserialize->[deserialize,OverloadedFuncDef],__init__->[set_line]]] | Initialize a node_missing object. | Add docstring for `alias_depends_on`. There are starting to be quite a few alias-related attributes in symbol table nodes. Maybe it's time to add a new AST node for type aliases soon after this PR has been merged so that we can remove several of these attributes? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.