patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -30,5 +30,11 @@ frappe.ui.form.on("Address", {
frappe.model.remove_from_locals(d.link_doctype, d.link_name);
});
}
+ },
+ after_save: function(frm) {
+ if(frappe.route_flags.return_to_previous_doctype===1) {
+ delete frappe.route_flags.return_to_previous_doctype;
+ frappe.set_route("Form", frm.doc.links[0].link_doctype, frm.doc.links[0].link_name);
+ }
}
});
| [No CFG could be retrieved] | Remove link from locals. | check in `frappe.route_history` if the element exists.. |
@@ -5,6 +5,7 @@ from azure.keyvault.secrets import SecretClient
class KeyvaultTestCase(AzureMgmtTestCase):
def setUp(self):
+ self.list_test_size = 2
super(KeyvaultTestCase, self).setUp()
| [KeyvaultTestCase->[tearDown->[super],setUp->[super]]] | Set up the test case. | >self.list_test_size = 2 [](start = 8, length = 23) I think this should be bigger than 2, maybe 5 or 10? |
@@ -425,7 +425,7 @@ class User < ActiveRecord::Base
## Class methods
def User.encrypted_password(password, salt)
- string_to_hash = password + salt # XXX need to add a secret here too?
+ string_to_hash = password + salt # TODO: need to add a secret here too?
Digest::SHA1.hexdigest(string_to_hash)
end
| [User->[json_for_api->[name],purge_in_cache->[purge_in_cache],update_url_name->[name],for_admin_column->[name],admin_page_links?->[super?],email_and_name_are_valid->[name],name_and_email->[name],password]] | This method is used to find a user in the system by password and salt. | Use 2 (not 4) spaces for indentation. |
@@ -130,10 +130,9 @@ function reset_maps_after_update( $response, $hook_extra, $result ) {
$plugin_dir = str_replace( '\\', '/', WP_PLUGIN_DIR );
$plugin_path = trailingslashit( $plugin_dir ) . trailingslashit( explode( '/', $plugin )[0] );
- if ( is_readable( $plugin_path . 'vendor/autoload_functions.php' ) ) {
- // The plugin has a v2.x autoloader, so reset it.
- $jetpack_autoloader_latest_version = null;
- $jetpack_packages_classmap = array();
+ if ( is_readable( $plugin_path . 'vendor/jetpack-autoloader/autoload_functions.php' ) ) {
+ // The plugin has a >=v2.3 autoloader, so reset the classmap.
+ $jetpack_packages_classmap = array();
set_up_autoloader();
}
| [set_up_autoloader->[should_autoloader_reset,get_current_autoloader_version,update_autoloader_chain,find_latest_autoloader],enqueue_files->[set_file_paths,file_loader,set_class_paths]] | Reset the autoloader and classmap after a plugin update. | Since it was not obvious to me, I'm going to mark this line as the main fix. This is the way we're stopping the autoloader from searching for the newest version and just using the one it has already found in `set_up_autoloader`, correct? |
@@ -45,6 +45,11 @@ public class SetPropertiesAction implements StreamProcessorTopology {
public static final String ACTION_NAME = "setProperties";
+ // duplicated from NXAuditEventsService.DISABLE_AUDIT_LOGGER
+ public static final String PARAM_DISABLE_AUDIT = "disableAuditLogger";
+
+ public static final String PARAM_VERSIONING_OPTION = VersioningService.VERSIONING_OPTION;
+
@Override
public Topology getTopology(Map<String, String> options) {
return Topology.builder()
| [SetPropertiesAction->[SetPropertyComputation->[compute->[getValue,getKey,saveDocument,loadDocuments,warn,getId,setPropertyValue,entrySet],getLogger],getTopology->[build]]] | Get the topology with the missing properties. | you break an intentional formatting that is trying to get readable mapping |
@@ -780,8 +780,15 @@ class DatetimeWrapper:
def format_line(format, data):
+ for _, key, _, conversion in Formatter().parse(format):
+ if not key:
+ continue
+ if '.' in key or '__' in key or conversion:
+ raise InvalidPlaceholder(key, format)
try:
return format.format(**data)
+ except KeyError as ke:
+ raise InvalidPlaceholder(ke.args[0], format)
except Exception as e:
raise PlaceholderError(format, data, e.__class__.__name__, str(e))
| [load_pattern_file->[parse_add_pattern],get_cache_dir->[write,get_home_dir],BaseFormatter->[format_item->[get_item_data]],Location->[to_key_filename->[get_keys_dir],parse->[get,replace_placeholders,match],_parse->[match,normpath_special],__init__->[parse]],get_security_dir->[get_home_dir],json_print->[json_dump],open_item->[ChunkIteratorFileWrapper],decode_dict->[get],format_archive->[format_time,to_localtime],dir_is_tagged->[dir_is_cachedir],ChunkIteratorFileWrapper->[_read->[_refill],read->[_read]],ProgressIndicatorBase->[finish->[output,output_json],__init__->[operation_id]],ProgressIndicatorPercent->[show->[output,ellipsis_truncate,progress],output->[justify_to_terminal_size,output_json]],Archives->[list_considering->[list,Error]],sysinfo->[get],chunkit->[list],basic_json_data->[format_time,to_localtime,BorgJsonEncoder],PatternMatcher->[add_inclexcl->[_add],match->[match],add->[_add]],parse_exclude_pattern->[parse_pattern],ArgparsePatternAction->[__call__->[parse_add_pattern]],secure_erase->[stat,write],FileSize->[__format__->[format_file_size]],prepare_dump_dict->[decode->[decode_bytes,decode_tuple,decode],decode_bytes->[bin_to_hex],decode_tuple->[decode_tuple,decode_bytes],decode],sizeof_fmt_iec->[sizeof_fmt],ArchiveFormatter->[get_item_data->[format_time,bin_to_hex,to_localtime,remove_surrogates],__init__->[partial_format]],scandir_generic->[GenericDirEntry],format_line->[PlaceholderError],yes->[get,output],DatetimeWrapper->[__format__->[__format__]],ShellPattern->[_match->[match]],replace_placeholders->[DatetimeWrapper,format_line],sizeof_fmt_decimal->[sizeof_fmt],BorgJsonEncoder->[default->[bin_to_hex,canonical_path]],ArgparseExcludeFileAction->[parse->[load_exclude_file]],safe_timestamp->[safe_ns],Manifest->[write->[get_raw_dict],load->[set_raw_dict],__init__->[Archives]],GenericDirEntry->[inode->[stat],is_symlink->[_check_type],is_dir->[_check_type],is_file->[_check_type],_check_type->[stat]],PatternBase->[match->[normalize_path],__init__->[normalize_path]],parse_inclexcl_pattern->[parse_pattern,get_pattern_style],Buffer->[resize->[MemoryLimitExceeded],get->[resize]],ItemFormatter->[get_item_data->[get,remove_surrogates],sum_unique_chunks_metadata->[get],__init__->[partial_format],available_keys->[get_item_data],format_item_json->[get_item_data],keys_help->[available_keys],time->[get,safe_timestamp],format_time->[format_time,get,safe_timestamp],calculate_num_chunks->[get]],get_keys_dir->[get_home_dir],parse_pattern->[get_pattern_style],location_validator->[validator->[Location]],ArgparsePatternFileAction->[parse->[load_pattern_file]],scandir_inorder->[inode],ProgressIndicatorEndless->[show->[output,progress]],ProgressIndicatorMessage->[output->[justify_to_terminal_size,output_json]],FnmatchPattern->[_match->[match]],list] | Format a line of text with a . | instead of blacklisting . and __ we could also use a whitelist. |
@@ -2363,6 +2363,7 @@ public class BigQueryIO {
.setSourceFormat("NEWLINE_DELIMITED_JSON");
String projectId = ref.getProjectId();
+ Job lastFailedLoadJob = null;
for (int i = 0; i < Bound.MAX_RETRY_JOBS; ++i) {
String jobId = jobIdPrefix + "-" + i;
LOG.info("Starting BigQuery load job {}: try {}/{}", jobId, i, Bound.MAX_RETRY_JOBS);
| [BigQueryIO->[displayTable->[TableRefToTableSpec],PassThroughThenCleanup->[expand->[apply]],verifyTablePresence->[getTable,toTableSpec],BigQueryQuerySource->[populateDisplayData->[populateDisplayData],create->[BigQueryQuerySource],TableRefToJson,TableRefToProjectId],TransformingSource->[getEstimatedSizeBytes->[getEstimatedSizeBytes],TransformingReader->[getCurrentSource->[getCurrentSource],getCurrentTimestamp->[getCurrentTimestamp],getFractionConsumed->[getFractionConsumed],start->[start],getCurrent->[apply,getCurrent],close->[close],advance->[advance],splitAtFraction->[splitAtFraction]],splitIntoBundles->[splitIntoBundles],validate->[validate],createReader->[createReader]],StreamWithDeDup->[getDefaultOutputCoder->[of],expand->[TagWithUniqueIdsAndTable,of,apply,StreamingWriteFn]],BigQueryTableSource->[populateDisplayData->[populateDisplayData],create->[BigQueryTableSource],TableRefToJson],Write->[WriteTables->[populateDisplayData->[populateDisplayData],removeTemporaryFiles->[create]],withCreateDisposition->[withCreateDisposition],to->[to],toTableReference->[toTableReference],TableRowWriter->[close->[close],write->[write],open->[close,create]],withoutValidation->[withoutValidation],Bound->[toTableReference->[Bound],getTableProvider->[],withSchema->[Bound,TableSchemaToJsonSchema],fromQuery->[],toTableRef->[TableRefToJson,Bound],usingStandardSql->[],expand->[TableRefToJson,BeamJobUuidToBigQueryJobUuid,CreatePerBeamJobUuid,JsonSchemaToTableSchema,getBigQueryServices,getTable,getTableWithDefaultProject,apply],to->[to,toTableReference,toTableSpec,TranslateTableSpecFunction,TableSpecToTableRef],WriteBundles->[populateDisplayData->[populateDisplayData],finishBundle->[close],processElement->[close]],from->[],withCreateDisposition->[Bound],withoutValidation->[Bound],getTable->[JsonTableRefToTableRef],getTableWithDefaultProject->[getTable,JsonTableRefToTableRef],verifyTableEmpty->[toTableSpec],withoutResultFlattening->[],TranslateTableSpecFunction->[apply->[parseTableSpec,apply]],populateDisplayData->[populateDisplayData],validate->[verifyTableEmpty],withWriteDisposition->[Bound],withTestServices->[Bound]],WritePartition->[processElement->[TableRowWriter,close,open]],withSchema->[withSchema],WriteRename->[populateDisplayData->[populateDisplayData]],withWriteDisposition->[withWriteDisposition]],BigQuerySourceBase->[splitIntoBundles->[getTableToExtract,cleanupTempResource],BigQueryReader->[start->[start],close->[close],advance->[advance],getCurrent->[getCurrent]],createSources->[from,getDefaultOutputCoder]],clearCreatedTables->[clearCreatedTables],Read->[from->[from],withoutValidation->[withoutValidation],Bound->[toTableReference->[],getTableProvider->[JsonTableRefToTableRef],withSchema->[],fromQuery->[Bound,fromQuery],toTableRef->[],usingStandardSql->[Bound],expand->[BeamJobUuidToBigQueryJobUuid,CreatePerBeamJobUuid,apply,CreateJsonTableRefFromUuid],to->[],WriteBundles->[populateDisplayData->[],finishBundle->[],processElement->[]],from->[TableRefToJson,toTableSpec,Bound,TableSpecToTableRef,from],withCreateDisposition->[],withoutValidation->[Bound],getTable->[getTableProvider],getTableWithDefaultProject->[JsonTableRefToTableRef],verifyTableEmpty->[],withoutResultFlattening->[Bound],TranslateTableSpecFunction->[apply->[]],populateDisplayData->[populateDisplayData],validate->[],withWriteDisposition->[],withTestServices->[Bound]],fromQuery->[fromQuery]],verifyDatasetPresence->[toTableSpec],TableSpecToTableRef->[apply->[parseTableSpec]],TableRefToTableSpec->[apply->[toTableSpec]],ShardedKeyCoder->[decode->[decode],verifyDeterministic->[verifyDeterministic],of->[of],encode->[getKey,getShardNumber,encode],of],StreamingWriteFn->[populateDisplayData->[populateDisplayData],getOrCreateTable->[getTable,parseTableSpec],TableSchemaToJsonSchema],TagWithUniqueIdsAndTable->[tableSpecFromWindow->[toTableSpec,apply],populateDisplayData->[populateDisplayData],processElement->[TableRowInfo,of],JsonTableRefToTableRef,of,TableRefToTableSpec],TableRowInfoCoder->[decode->[decode],encode->[encode],TableRowInfoCoder,of]]] | Load a single missing - node configuration from BigQuery. | This log should probably go. It might be nice to refactor out a bit "find the first unused load job" and then start logging from there. or maybe move the log after the switch so that when we `continue` we don't log. |
@@ -52,7 +52,7 @@ func NewCmdRequestProject(name, fullName, ocLoginName, ocProjectName string, f *
cmd := &cobra.Command{
Use: fmt.Sprintf("%s NAME [--display-name=DISPLAYNAME] [--description=DESCRIPTION]", name),
Short: "Request a new project",
- Long: fmt.Sprintf(requestProjectLong, ocLoginName, ocProjectName),
+ Long: requestProjectLong,
Example: fmt.Sprintf(requestProjectExample, fullName),
Run: func(cmd *cobra.Command, args []string) {
if err := options.complete(cmd, f); err != nil {
| [Run->[Create,ProjectRequests,RunProject,List,Everything],complete->[Args,Help,New,Complete,NewPathOptions,Flags],StringVar,Sprintf,complete,CheckErr,Run,Clients,Flags] | NewCmdRequestProject returns a command that requests a new project with minimal information. Complete completes the creation of a new project object. | @deads2k Want to make sure this doesn't change the intent here. `requestProjectLong` doesn't have any formatting directives. |
@@ -574,7 +574,7 @@ class VersionControl(object):
self.name,
url,
)
- response = ask_path_exists('What to do? %s' % prompt[0], prompt[1])
+ response = ask_path_exists('What to do? {}'.format(prompt[0]), prompt[1])
if response == 'a':
sys.exit(-1)
| [VersionControl->[controls_location->[is_repository_directory],compare_urls->[normalize_url],get_url_rev_and_auth->[get_netloc_and_auth],get_src_requirement->[make_vcs_requirement_url,should_add_vcs_url_prefix,get_subdirectory,get_requirement_revision],make_rev_options->[RevOptions],get_url_rev_options->[make_rev_args,get_url_rev_and_auth,make_rev_options],unpack->[obtain],obtain->[update,compare_urls,fetch_new,get_url_rev_options,to_display,switch,is_commit_id_equal]],VcsSupport->[__iter__->[__iter__]],VcsSupport] | This method obtains a version of a package from the version control. This function asks user if the user wants to create a new . | This should be split across multiple lines. |
@@ -352,7 +352,7 @@ if (is_dir(DIR_FS_CATALOG_IMAGES)) {
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta charset="<?php echo CHARSET; ?>">
- <title><?php echo TITLE; ?></title>
+ <title><?php echo 'Admin: ' . zen_output_generated_category_path($current_category_id); ?></title>
<link rel="stylesheet" href="includes/stylesheet.css">
<link rel="stylesheet" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
<script src="includes/menu.js"></script>
| [Execute,display_count,get_allow_add_to_cart,get_handler,infoBox,add_session,notify,display_links,RecordCount,add] | Displays a list of all categories. Zenpy output generated category path. | Are you intentionally adding an un-translatable string here? |
@@ -477,6 +477,9 @@ public class HashedWheelTimer implements Timer {
HashedWheelTimeout next;
HashedWheelTimeout prev;
+ // The bucket to which the timeout was added
+ HashedWheelBucket bucket;
+
HashedWheelTimeout(HashedWheelTimer timer, TimerTask task, long deadline) {
this.timer = timer;
this.task = task;
| [HashedWheelTimer->[start->[start],HashedWheelBucket->[expireTimeouts->[expire,isCancelled],clearTimeouts->[isExpired,isCancelled]],HashedWheelTimeout->[toString->[toString,task,isCancelled],expire->[run]],newTimeout->[start]]] | The current time of the last request. This is a helper method to chain timeouts in HashedWheelTimerBucket via a double. | I'm not sure if this is ever used. It seems to be always null. Perhaps we could remove this field and relevant operations such as remove(). |
@@ -3,8 +3,12 @@ class AlaveteliPro::PublicBodiesController < AlaveteliPro::BaseController
def search
query = params[:query] || ""
xapian_results = typeahead_search(query, :model => PublicBody,
- :exclude_tags => [ 'defunct' ])
+ :exclude_tags => [ 'defunct',
+ 'not_apply' ])
results = xapian_results.present? ? xapian_results.results : []
+ # Exclude any bodies we can't make a request to (in addition to the ones
+ # we've already filtered out by the excluded tags above)
+ results.select! { |result| result[:model].is_requestable? }
# Xapian's results include things we don't want to publish, like the
# request email and api_key, so we map these results into a simpler object
# with only some whitelisted attributes.
| [search->[info_requests_visible_count,render_to_string,render,results,short_name,notes,typeahead_search,name,map!,present?,id]] | This method is used to search for a specific in the system. It returns a json. | I think in order to exclude authorities with no contact address from the results presented in Pro, we'd need to remove them from the xapian results returned in the `results.map!` call below. We could do this by removing anything that responds `false` to `is_requestable?`. |
@@ -115,6 +115,11 @@ class AnnotationHeaders extends ClassDataCollector implements Closeable {
static final String STD_HEADER = "org.osgi.annotation.bundle.Header";
static final String STD_HEADERS = "org.osgi.annotation.bundle.Headers";
+ // Used to detect attributes and directives on Require-Capability and
+ // Provide-Capability
+ static final String ATTRIBUTE = "org.osgi.annotation.bundle.Attribute";
+ static final String DIRECTIVE = "org.osgi.annotation.bundle.Directive";
+
// Class we're currently processing
Clazz current;
| [AnnotationHeaders->[escape->[escape],doAnnotatedAnnotation->[annotation->[annotation],doAnnotatedAnnotation],add->[close,add],getHeader->[add]]] | This method returns a set of interesting names for the missing annotation. Initializes the missing type annotations. | Are these not to be prefixed with `STD_` like the other bundle annotation type names? |
@@ -66,7 +66,7 @@ const (
type matcher func(last, current []byte) bool
var (
- sigMultilineTimeout = errors.New("multline timeout")
+ sigMultilineTimeout = errors.New("multiline timeout")
)
// New creates a new multi-line reader combining stream of
| [readNext->[Next],readFirst->[Next],finalize->[clear]] | New creates a new reader combining multiple line events into one multi - line event. negateMatcher removes the matcher from the matcher list and sets the default values to zero. | error var sigMultilineTimeout should have name of the form errFoo |
@@ -59,6 +59,7 @@ public class TestJobService extends JobServiceImplBase {
PrepareJobResponse.newBuilder()
.setPreparationId(preparationId)
.setArtifactStagingEndpoint(stagingEndpoint)
+ .setStagingSessionToken("TestStagingToken")
.build());
responseObserver.onCompleted();
}
| [TestJobService->[prepare->[build,onNext,onCompleted],getState->[build,onNext,onCompleted],run->[build,onNext,onCompleted]]] | Override prepare and run method. | Ditto, does it need to be verified or only set? |
@@ -11,6 +11,9 @@ class Experiment < ActiveRecord::Base
has_many :my_module_groups, inverse_of: :experiment, dependent: :destroy
has_many :report_elements, inverse_of: :experiment, dependent: :destroy
+ has_attached_file :workflowimg
+ validates_attachment_content_type :workflowimg, content_type: /\Aimage\/.*\Z/
+
validates :name,
presence: true,
length: { minimum: 4, maximum: 50 },
| [Experiment->[assign_samples_to_new_downstream_modules->[assign_samples_to_new_downstream_modules]]] | The base class for all the models that have a specific relation. This function is a convenience method for getting all records from the system that match the given query. | Use `%r` around regular expression. |
@@ -123,10 +123,14 @@ and then 'd', 'b', and 'a' to be put in the next three stages, respectively.
def test_ci_generate_with_env(tmpdir, mutable_mock_env_path, env_deactivate,
- install_mockery, mock_packages, project_dir_env):
+ install_mockery, mock_packages, env_vars):
"""Make sure we can get a .gitlab-ci.yml from an environment file
which has the gitlab-ci, cdash, and mirrors sections."""
- project_dir_env(tmpdir.strpath)
+ env_vars({
+ 'CI_PROJECT_DIR': tmpdir.strpath,
+ 'CI_JOB_NAME': 'generate-pipeline',
+ 'CI_PIPELINE_ID': '42'
+ })
mirror_url = 'https://my.fake.mirror'
filename = str(tmpdir.join('spack.yaml'))
with open(filename, 'w') as f:
| [test_ci_generate_override_runner_attrs->[project_dir_env],test_ci_generate_bootstrap_gcc->[_validate_needs_graph,project_dir_env],test_ci_generate_for_pr_pipeline->[project_dir_env],test_ci_generate_bootstrap_prune_dag->[_validate_needs_graph,project_dir_env],test_ci_generate_read_broken_specs_url->[project_dir_env],test_ci_generate_with_workarounds->[project_dir_env],test_ci_reproduce->[project_dir_env],test_push_mirror_contents->[project_dir_env],test_ci_generate_bootstrap_artifacts_buildcache->[_validate_needs_graph,project_dir_env],test_ci_generate_temp_storage_url->[project_dir_env],test_ci_generate_with_cdash_token->[project_dir_env],test_ci_nothing_to_rebuild->[project_dir_env,set_env_var],test_ci_generate_with_env_missing_section->[project_dir_env],test_ci_subcommands_without_mirror->[project_dir_env],test_ci_rebuild->[mystrip,project_dir_env,set_env_var],test_ci_generate_pkg_with_deps->[project_dir_env],test_ci_generate_with_env->[project_dir_env],test_ci_generate_with_custom_scripts->[project_dir_env],test_ci_generate_with_external_pkg->[project_dir_env]] | Test that we can get a. gitlab - ci. yml from an environment file. Check if there is a missing node - id in the yaml file. | wouldn't it be easier to do this by using the existing `working_env` fixture, and then just updating the environment in the test as needed? (`os.environ.update({...})`)? If that's not easier, can you refactor the fixture to uses the `working_env` fixture instead of doing your own environment tracking? |
@@ -136,6 +136,8 @@ def serialize_decimal(obj):
def create_superuser(credentials):
+ from ...account.models import User
+
user, created = User.objects.get_or_create(
email=credentials["email"],
defaults={"is_active": True, "is_staff": True, "is_superuser": True},
| [get_country_name_by_code->[next],to_local_currency->[exchange_currency,isinstance],get_client_ip->[split,get],get_currency_for_country->[get_territory_currencies],create_thumbnails->[error,getattr,get,info,warm,VersatileImageFieldWarmer],update_conversion_rates_from_openexchangerates->[serialize,update_conversion_rates],format_money->[currencyfmt],build_absolute_uri->[iri_to_uri,get_current,urljoin],get_paginator_items->[int,Paginator,Http404,str,page],get_country_by_ip->[Country,get],CategoryChoiceField->[label_from_instance->[getattr,max,smart_text]],serialize_decimal->[str,isinstance,JSONEncoder],create_superuser->[create_thumbnails,get_random_avatar,set_password,get_or_create,save],getLogger,reader] | Create a superuser if it doesn t exist. | Is it expected? |
@@ -397,7 +397,7 @@ class Search
end
end
- advanced_filter(/^\@([a-zA-Z0-9_\-.]+)/) do |posts,match|
+ advanced_filter(/^\@([a-zA-Zа-яА-Я0-9_\-.]+)/) do |posts,match|
user_id = User.where(staged: false).where(username_lower: match.downcase).pluck(:id).first
if user_id
posts.where("posts.user_id = #{user_id}")
| [Search->[secure_category_ids->[secure_category_ids],aggregate_search->[aggregate_post_sql],private_messages_search->[aggregate_search],add_more_topics_if_expected->[per_facet,burst_factor],initialize->[per_filter,per_facet,prepare_data],aggregate_post_sql->[min_post_id,wrap_rows],execute->[execute],ts_query->[ts_query],query_locale->[query_locale,long_locale],find_grouped_results->[per_facet],word_to_date,advanced_filter]] | Find all posts with the same name as the given tag name. This method returns a list of posts that have been tagged with the given tag. | I am a bit confused, usnernames do not allow for russian chars |
@@ -7277,6 +7277,11 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo->AttributesEx |= SPELL_ATTR1_NO_THREAT;
});
+ // 16097 Shadow Hunter Vosh'gajin - Hex
+ ApplySpellFix({ 16097 }, [](SpellEntry* spellInfo) {
+ spellInfo->CastingTimeIndex = 16;
+ });
+
for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i)
{
SpellEntry* spellInfo = (SpellEntry*)sSpellStore.LookupEntry(i);
| [No CFG could be retrieved] | Magic check for all possible target units. Check if a given effect is valid. | put the bracket on a new line, follow how it has been done before please =) |
@@ -219,6 +219,8 @@ foreach ($bins as $bin) {
$cmd = rtrim(shell_exec("which {$config[$bin]} 2>/dev/null"));
if (!$cmd) {
print_fail("$bin location is incorrect or bin not installed");
+ print_fail("You can also manually set the path to $bin by placing the following in config.php:");
+ print_fail("\$config['$bin'] = \"/path/to/$bin\";");
} elseif (in_array($bin, $suid_bins) && !(fileperms($cmd) & 2048)) {
print_fail("$bin should be suid, please chmod u+s $cmd");
}
| [format,rewind] | Check system memory and permission checks This is a hack to avoid the problem with the database connection. | This shouldn't be wrapped in a new print_fail as it show as a new line, you will need to include it in the line above. |
@@ -331,7 +331,8 @@ public abstract class AbstractExecuteSQL extends AbstractProcessor {
throw new ProcessException(e);
}
}
- } while (maxRowsPerFlowFile > 0 && nrOfRows.get() == maxRowsPerFlowFile);
+ }
+ while (maxRowsPerFlowFile > 0 && nrOfRows.get() == maxRowsPerFlowFile);
// If we are splitting results but not outputting batches, set count on all FlowFiles
if (outputBatchSize == 0 && maxRowsPerFlowFile > 0) {
| [AbstractExecuteSQL->[setup->[ProcessException,error,isSet,hasIncomingConnection,asControllerService],getQueries->[add,trim,length,split],onTrigger->[getValue,fetch,create,getMessage,size,updateCounters,executeConfigStatements,getElapsed,toString,StringBuilder,remove,writeResultSet,info,put,forEach,yield,add,putAllAttributes,AtomicLong,getQueries,hasIncomingConnection,set,intValue,valueOf,getAttributesToAdd,transfer,getUpdateCount,ProcessException,debug,error,writeEmptyResultSet,append,getMimeType,asInteger,clear,hasNonLoopConnection,isSet,receive,read,getLeft,getConnection,getRight,execute,prepareStatement,write,putAll,getLogger,get,setParameters,getResultSet,putAttribute,penalize,emptyMap,key,getMoreResults,configureSqlWriter,defaultCharset,setQueryTimeout,getAttributes,commit,StopWatch],executeConfigStatements->[createStatement,of,isEmpty,execute],build,key]] | On trigger. Get a connection and execute a select query and return a ResultSet with the attributes of the query Add the attributes to the ResultSet and if the ResultSet is fragmented send the results to the Checks if there is a result set that can be processed. | Will not include this change. |
@@ -998,6 +998,16 @@ func (c *Create) processRegistries() error {
c.InsecureRegistries = append(c.InsecureRegistries, *regurl)
}
+ // load a list of whitelisted registries
+ for _, registry := range c.whitelistRegistries {
+ regurl, err := validate.ParseURL(registry)
+
+ if err != nil {
+ return cli.NewExitError(fmt.Sprintf("%s is an invalid format for registry url", registry), 1)
+ }
+ c.WhitelistRegistries = append(c.WhitelistRegistries, *regurl)
+ }
+
return nil
}
| [Run->[logArguments,processParams],logArguments->[SetFields],UnmarshalText] | processRegistries processes the registries and proxies. | I am not sure storing all the registries as `url.URL` objects is a good idea. In particular, storing a CIDR this way seems to more trouble that its worth. I would store them just as strings, and then have a custom `parse` function to give me back an object that represents a registry entry. You can add methods to that object/interface to check if a given ip address or hostname matches against that entry. |
@@ -209,6 +209,16 @@ var _ = Describe("Podman generate kube", func() {
processTestResult(f)
})
+ It("podman play kube fail with nonexist authfile", func() {
+ err := generateKubeYaml(getPod(), kubeYaml)
+ Expect(err).To(BeNil())
+
+ kube := podmanTest.Podman([]string{"play", "kube", "--authfile", "/tmp/nonexist", kubeYaml})
+ kube.WaitWithDefaultTimeout()
+ Expect(kube.ExitCode()).To(Not(Equal(0)))
+
+ })
+
It("podman play kube test correct command", func() {
err := generateKubeYaml(getPod(), kubeYaml)
Expect(err).To(BeNil())
| [WaitWithDefaultTimeout,Create,Join,Execute,Cleanup,ExitCode,New,Close,To,OutputToString,Parse,SeedImages,Podman,Exit,Setup] | getPod returns a pod with sane defaults for all the options withCapDrop returns a ctrOption that sets the cap drop flag and the name of the. | @TomSweeneyRedHat these tests for play_kube_test.go |
@@ -43,12 +43,16 @@ const routes = [
text: 'Components',
children: [
{
- text: 'Data Entry',
+ text: 'Basic Inputs',
children: [
{
text: 'Input',
path: getPath('/components/input'),
},
+ {
+ text: 'Button',
+ path: getPath('/components/button'),
+ },
],
},
],
| [No CFG could be retrieved] | 9. 1. 2. 4. | It says `Basic Inputs` but contains a button example below. We should split button example into a separate child of the 'Components' instead. |
@@ -3,7 +3,7 @@
namespace Yoast\WP\SEO\Conditionals;
/**
- * Conditional that is only met when current page is the tools page.
+ * Conditional that is only met when current page is the main tools page.
*/
class Yoast_Tools_Page_Conditional implements Conditional {
| [No CFG could be retrieved] | Checks if a conditional is met. | You have to rename this conditional. Because it is not the Main_Tools_Page. |
@@ -362,6 +362,11 @@ public abstract class BaseLivyInterpreter extends Interpreter {
return SessionInfo.fromJson(callRestAPI("/sessions/" + sessionId, "GET"));
}
+ private SessionLog getSessionLog(int sessionId) throws LivyException {
+ return SessionLog.fromJson(callRestAPI("/sessions/" + sessionId + "/log?size=" + maxLogLines,
+ "GET"));
+ }
+
public InterpreterResult interpret(String code,
String paragraphId,
boolean displayAppInfo,
| [BaseLivyInterpreter->[isSessionExpired->[getSessionInfo],StatementInfo->[fromJson->[fromJson],StatementOutput->[toJson->[toJson]]],initLivySession->[getSessionKind],createRestTemplate->[close],CompletionRequest->[toJson->[toJson]],close->[close],SessionInfo->[fromJson->[fromJson]],getCodeType->[getSessionKind],interpret->[getSessionKind,initLivySession,close,cancel,getCodeType,open,interpret],CompletionResponse->[fromJson->[fromJson]],getSessionInfo->[getSessionInfo],closeSession->[callRestAPI],getProgress->[getProgress],createSession->[getSessionInfo],LivyVersionResponse->[fromJson->[fromJson]],callRestAPI->[callRestAPI],cancel->[cancel],CreateSessionRequest->[toJson->[toJson]],completion->[getSessionKind],getLivySharedInterpreter->[open],ExecuteRequest->[toJson->[toJson]]]] | Get the session info. | is there a way to indicate the result is truncated? |
@@ -140,10 +140,8 @@ class FormProjets
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
if ($socid > 0 && empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
if (!empty($filterkey)) {
- $sql .= ' AND (';
- $sql .= ' p.title LIKE "%'.$this->db->escape($filterkey).'%"';
- $sql .= ' OR p.ref LIKE "%'.$this->db->escape($filterkey).'%"';
- $sql .= ')';
+ $sql .= " AND p.title LIKE '%".$this->db->escape($filterkey)."%'";
+ $sql .= " OR p.ref LIKE '%".$this->db->escape($filterkey)."%'";
}
$sql.= " ORDER BY p.ref ASC";
| [FormProjets->[selectTasks->[free,query,trans,num_rows,fetch_object,getProjectsAuthorizedForUser],select_projects_list->[free,query,trans,num_rows,fetch_object,escape,getProjectsAuthorizedForUser],select_projects->[fetch,trans,textwithpicto,select_projects_list],selectOpportunityStatus->[free,transnoentitiesnoconv,query,trans,num_rows,fetch_object,lasterror],select_element->[free,query,num_rows,fetch_object,lasterror]]] | Select all projects in the list of projects Displays a list of objects that match the given filterkey. This function is used to display a list of all possible errors in the UI This function is used to generate a select tag for a given object. | It seems a previous fix was lost here |
@@ -70,7 +70,8 @@ public class HealthCheckResource {
) {
return new HealthCheckResource(
new HealthCheckAgent(
- new ServerInternalKsqlClient(ksqlResource, serviceContext),
+ new ServerInternalKsqlClient(ksqlResource,
+ new KsqlSecurityContext(Optional.empty(), serviceContext)),
restConfig),
Duration.ofMillis(restConfig.getLong(KsqlRestConfig.KSQL_HEALTHCHECK_INTERVAL_MS_CONFIG))
);
| [HealthCheckResource->[createResponseCache->[load->[checkHealth]],create->[HealthCheckResource]]] | Create a new instance of HealthCheckResource. | The health check does not require any authenticated user to call the KSQL server. An `Optional.empty()` is user is used. |
@@ -81,13 +81,15 @@ class Archive(object):
@known_types.asset_archive
class AssetArchive(Archive):
+ assets: Dict[Any, Union[Asset, Archive]]
+
"""
An AssetArchive is an archive created from an in-memory collection of named assets or other archives.
"""
- def __init__(self, assets):
+ def __init__(self, assets: Dict[Any, Union[Asset, Archive]]) -> None:
if not isinstance(assets, dict):
raise TypeError("AssetArchive assets must be a dictionary")
- for k, v in assets.items():
+ for _, v in assets.items():
if not isinstance(v, Asset) and not isinstance(v, Archive):
raise TypeError("AssetArchive assets must contain only Assets or Archives")
self.assets = assets
| [RemoteAsset->[__init__->[TypeError,isinstance]],StringAsset->[__init__->[TypeError,unicode,isinstance]],AssetArchive->[__init__->[TypeError,isinstance,items]],FileArchive->[__init__->[TypeError,isinstance]],RemoteArchive->[__init__->[TypeError,isinstance]],FileAsset->[__init__->[TypeError,isinstance]]] | Initialize AssetArchive with Asset objects. | Should this be a `Dict[str, Union[...]]`? That's how we type it in the Node.js SDK. |
@@ -157,7 +157,9 @@ else:
if sys.platform[:6] == 'darwin' and sys.prefix[:16] == '/System/Library/':
bin_py = '/usr/local/bin'
default_log_file = os.path.join(user_dir, 'Library/Logs/pip.log')
-
+default_wheel_cache = os.path.join(default_storage_dir, 'wheel_cache')
+if not os.path.isdir(default_wheel_cache):
+ os.makedirs(default_wheel_cache)
def distutils_scheme(dist_name, user=False, home=None, root=None):
"""
| [virtualenv_no_global->[running_under_virtualenv],distutils_scheme->[running_under_virtualenv],_get_build_prefix->[__get_username,write_delete_marker_file],running_under_virtualenv,_get_build_prefix] | Return a distutils install scheme. | Side effects at import time is a smell. It would be better to wait till after the final setting is known |
@@ -38,10 +38,6 @@ namespace System.Buffers
OverMaximumSize,
}
- // Parameterized constructor to block initialization and ensure the EventSourceGenerator is creating the default constructor
- // as you can't make a constructor partial.
- private ArrayPoolEventSource(int _) { }
-
/// <summary>
/// Event for when a buffer is rented. This is invoked once for every successful call to Rent,
/// regardless of whether a buffer is allocated or a buffer is taken from the pool. In a
| [ArrayPoolEventSource->[BufferRented->[Size,DataPointer,Reserved,WriteEventCore,Verbose],BufferTrimPoll->[Informational,WriteEvent],BufferAllocated->[Size,DataPointer,Reserved,Informational,WriteEventCore],BufferDropped->[Size,DataPointer,Reserved,Informational,WriteEventCore],BufferTrimmed->[Informational,WriteEvent],BufferReturned->[Verbose,WriteEvent]]] | The reason for a BufferAllocated event. region Payload methods. | @benaadams's whole purpose for this ctor (which should never actually be used and should be trimmed away) was to cause there to a build error if generator somehow didn't run. Now that you've moved this into the generator, doesn't that defeat the purpose? |
@@ -252,6 +252,7 @@ class MessengerOverworld(World):
MessengerOnboardDataTaskWorld,
),
'chat': (MessengerChatOnboardWorld, MessengerChatTaskWorld),
+ 'EXIT': (None, None),
}
def __init__(self, opt, agent):
| [MessengerChatTaskWorld->[generate_world->[MessengerChatTaskWorld],shutdown->[shutdown]],MessengerChatOnboardWorld->[generate_world->[MessengerChatOnboardWorld]],MessengerOverworld->[generate_world->[MessengerOverworld]],MessengerOnboardDataTaskWorld->[generate_world->[MessengerOnboardDataTaskWorld],shutdown->[shutdown]],MessengerOnboardDataOnboardWorld->[generate_world->[MessengerOnboardDataOnboardWorld]],MessengerEchoTaskWorld->[generate_world->[MessengerEchoTaskWorld],shutdown->[shutdown]],MessengerEchoOnboardWorld->[generate_world->[MessengerEchoOnboardWorld]]] | Initialize the object with the given options. | this means that we'll always need `EXIT` as an option? or is this just specific to this setup |
@@ -134,6 +134,13 @@ public class StockMethodsAdder {
BytecodeCreator idValueUnset;
BytecodeCreator idValueSet;
if (idType instanceof PrimitiveType) {
+ if (!idType.name().equals(DotNames.PRIMITIVE_LONG)
+ && !idType.name().equals(DotNames.PRIMITIVE_INTEGER)) {
+ throw new IllegalArgumentException("Id type of '" + entityDotName + "' is invalid.");
+ }
+ if (idType.name().equals(DotNames.PRIMITIVE_LONG)) {
+ idValue = save.checkCast(idValue, int.class);
+ }
BranchResult idValueNonZeroBranch = save.ifNonZero(idValue);
idValueSet = idValueNonZeroBranch.trueBranch();
idValueUnset = idValueNonZeroBranch.falseBranch();
| [StockMethodsAdder->[generateSaveAndFlush->[generateSave],generateExistsById->[generateFindById],getIdAnnotationTargetRec->[getIdAnnotationTargetRec],stockMethodsAddedToInterface->[add]]] | Generate save. if save is not implemented in the bridge saveDescriptor then it is called. | Why this cast? |
@@ -226,10 +226,10 @@ class Import
* @var array
*/
protected $accountTypeMappings = array(
- Account::TYPE_BASIC => '',
- Account::TYPE_LEAD => 'lead',
- Account::TYPE_CUSTOMER => 'customer',
- Account::TYPE_SUPPLIER => 'supplier',
+ '' => Account::TYPE_BASIC,
+ 'lead' => Account::TYPE_LEAD,
+ 'customer' => Account::TYPE_CUSTOMER,
+ 'supplier' => Account::TYPE_SUPPLIER,
);
/**
| [Import->[setContactData->[processUrls,processEmails,addTag,addTitle,processPhones,createAddresses,getBoolValue,processNotes,processFaxes],addTag->[addTag],createAccountParentRelation->[checkData],setAccountContactRelation->[addPosition,getBoolValue,mainRelationExists],processCsvLoop->[initDefaults],createAccount->[createNewAccount],getContactByData->[getFirstOf]]] | Defines the names of the accounts that are defined in the system. This class is used to store the list of unique unique identifiers for a given node. | is there a possiblity to not use an empty string as a key? e.g. change the ORM mapping so that the default key is "basic"? |
@@ -67,8 +67,6 @@ class DataflowMetrics(MetricResults):
dataflow service.
job_result: DataflowPipelineResult with the state and id information of
the job.
- job_graph: apiclient.Job instance to be able to translate between internal
- step names (e.g. "s2"), and user step names (e.g. "split").
"""
super(DataflowMetrics, self).__init__()
self._dataflow_client = dataflow_client
| [DataflowMetrics->[all_metrics->[_get_metrics_from_dataflow,_populate_metrics],_populate_metrics->[_get_metric_key],_get_metric_key->[_get_match,_translate_step_name],_get_metric_value->[_get_match],_translate_step_name->[_get_match],query->[_get_metrics_from_dataflow,_populate_metrics,_is_distribution,_is_counter]]] | Initialize the DataflowMetrics object. | I see the Arg description was removed, but the argument itself wasnt removed. Maybe leave the description, and clarify that it's optional? What do you think about simply removing it completely from the class? (instead receiving the job id only) The difference would be that we lose the ability to cache metrics... but perhaps that's acceptable. Thoughts? |
@@ -206,6 +206,14 @@ GuidConverter::uniqueId() const
return id;
}
+#ifdef OPENDDS_SECURITY
+bool
+GuidConverter::isSecure() const
+{
+ return guid_.entityId.entityKey[0] == 0xff;
+}
+#endif
+
} // namespace DCPS
} // namespace OpenDDS
| [No CFG could be retrieved] | - - - - - - - - - - - - - - - - - -. | Should this also check that entityKind is a built-in kind? Otherwise we don't know how entityKey[0] is assigned. |
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Windows.Forms.Layout;
| [ButtonBaseAdapter->[LayoutOptions->[StringFormat,Size],PaintField->[DrawText,DrawFocus],PaintImage->[DrawImageCore]]] | Creates an abstract class that can be used to paint a button on the screen. Returns true if the high contrast highlight is enabled. | Something I missed. The `control` must either be nullable or throw. |
@@ -256,7 +256,7 @@ func resourceAwsEMRClusterCreate(d *schema.ResourceData, meta interface{}) error
applications := d.Get("applications").(*schema.Set).List()
keepJobFlowAliveWhenNoSteps := true
- if v, ok := d.GetOk("keep_job_flow_alive_when_no_steps"); ok {
+ if v, ok := d.GetOkExists("keep_job_flow_alive_when_no_steps"); ok {
keepJobFlowAliveWhenNoSteps = v.(bool)
}
| [StringValueSlice,GetChange,SetPartial,StringSlice,Close,RemoveTags,ListInstanceGroups,Partial,HasPrefix,Set,ListInstances,NonRetryableError,Code,ModifyInstanceGroups,ReadFile,GetOk,DescribeCluster,HasChange,ListBootstrapActions,Errorf,SetTerminationProtection,SetId,RetryableError,Bool,TrimSpace,HasSuffix,Join,SetVisibleToAllUsers,AddTags,Id,Int64,Get,NewDecoder,Split,TerminateJobFlows,RunJobFlow,Printf,Println,Decode,Unmarshal,List,WaitForState,Replace,String,Retry] | resourceAwsEMRClusterCreate creates an EMR cluster based on the given parameters. if - set core_instance_count - set core_instance_count - set. | Is there a testcase that allows to check this? if not, could you write the smallest one so that we ensure there won't be regressions in the future? |
@@ -29,6 +29,8 @@ async def digest_to_file_digest(request: ExtractFileDigest) -> FileDigest:
)
file_info = digest_entries[0]
+ assert isinstance(file_info, FileEntry)
+
return file_info.file_digest
| [digest_to_file_digest->[PathGlobs,len,DigestSubset,isinstance,Get,Exception],dataclass] | Returns a FileDigest object for the given request. | It seems like this should give a useful error message rather than asserting: I could imagine someone accidentally calling this method on a Digest containing only a directory. |
@@ -105,7 +105,7 @@ final class DocumentationNormalizer implements NormalizerInterface, CacheableSup
* @param array|OperationAwareFormatsProviderInterface $formats
* @param mixed|null $jsonSchemaTypeFactory
*/
- public function __construct(ResourceMetadataFactoryInterface $resourceMetadataFactory, PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, PropertyMetadataFactoryInterface $propertyMetadataFactory, $jsonSchemaFactory = null, $jsonSchemaTypeFactory = null, OperationPathResolverInterface $operationPathResolver, UrlGeneratorInterface $urlGenerator = null, $filterLocator = null, NameConverterInterface $nameConverter = null, bool $oauthEnabled = false, string $oauthType = '', string $oauthFlow = '', string $oauthTokenUrl = '', string $oauthAuthorizationUrl = '', array $oauthScopes = [], array $apiKeys = [], SubresourceOperationFactoryInterface $subresourceOperationFactory = null, bool $paginationEnabled = true, string $paginationPageParameterName = 'page', bool $clientItemsPerPage = false, string $itemsPerPageParameterName = 'itemsPerPage', $formats = [], bool $paginationClientEnabled = false, string $paginationClientEnabledParameterName = 'pagination', array $defaultContext = [])
+ public function __construct(ResourceMetadataFactoryInterface $resourceMetadataFactory, PropertyNameCollectionFactoryInterface $propertyNameCollectionFactory, PropertyMetadataFactoryInterface $propertyMetadataFactory, $jsonSchemaFactory = null, $jsonSchemaTypeFactory = null, OperationPathResolverInterface $operationPathResolver, UrlGeneratorInterface $urlGenerator = null, $filterLocator = null, NameConverterInterface $nameConverter = null, bool $oauthEnabled = false, string $oauthType = '', string $oauthFlow = '', string $oauthTokenUrl = '', string $oauthAuthorizationUrl = '', array $oauthScopes = [], array $apiKeys = [], SubresourceOperationFactoryInterface $subresourceOperationFactory = null, bool $paginationEnabled = true, string $paginationPageParameterName = 'page', bool $clientItemsPerPage = false, string $itemsPerPageParameterName = 'itemsPerPage', $formats = [], bool $paginationClientEnabled = false, string $paginationClientEnabledParameterName = 'pagination', array $defaultContext = [], array $versions = [2, 3])
{
if ($jsonSchemaTypeFactory instanceof OperationMethodResolverInterface) {
@trigger_error(sprintf('Passing an instance of %s to %s() is deprecated since version 2.5 and will be removed in 3.0.', OperationMethodResolverInterface::class, __METHOD__), E_USER_DEPRECATED);
| [DocumentationNormalizer->[addRequestBody->[addSchemas],updatePutOperation->[addSchemas],addSubresourceOperation->[addSchemas,addPaginationParameters],updateGetOperation->[addSchemas],getPathOperation->[getPath],updatePostOperation->[addSchemas]]] | Initializes the client. Initializes the object with all the properties that are not already set. | Add the phpdoc for `int[]` for $swaggerVersions |
@@ -0,0 +1,17 @@
+package migration1599691818
+
+import (
+ "github.com/jinzhu/gorm"
+)
+
+// Migrate creates the encrypted_ocr_keys table
+func Migrate(tx *gorm.DB) error {
+ return tx.Exec(`
+ CREATE TABLE encrypted_ocr_private_keys (
+ id SERIAL PRIMARY KEY,
+ encrypted_priv_keys jsonb NOT NULL,
+ created_at timestamptz NOT NULL,
+ updated_at timestamptz NOT NULL
+ );
+ `).Error
+}
| [No CFG could be retrieved] | No Summary Found. | We seem to have a proliferation of `keys` tables: `keys`, `encrypted_keys`, `encrypted_p2p_keys` `encrypted_vrf_keys` and now this. It seems for every new subsystem, we add another keys table, are they that different? I wonder whether we can model them better to prepares us for the next subsystem that will require encryption - maybe as a separate effort. CC @kaleofduty |
@@ -110,7 +110,14 @@ namespace System.DirectoryServices.Tests
child = config.Element("Password");
if (child != null)
- password = child.Value;
+ {
+ string val = child.Value;
+ if (val.StartsWith("%") && val.EndsWith("%"))
+ {
+ val = Environment.GetEnvironmentVariable(val.Substring(1, val.Length - 2));
+ }
+ password = val;
+ }
child = config.Element("AuthenticationTypes");
if (child != null)
| [LdapConfiguration->[GetLdapPath->[IsNullOrEmpty],RootDSEPath,AuthenticationTypes,Contains,IsNullOrEmpty,Password,Split,UserName,Length,GetConfiguration]] | Method to retrieve the LdapConfiguration object from the specified configuration file. Returns an LdapConfiguration object if it can be read. | nit: use '%' instead of "%" |
@@ -521,6 +521,7 @@ class TestAddonModels(TestCase):
# Should be v3 since we don't exclude anything.
assert addon.find_latest_version(None, exclude=()).id == v3.id
+ @override_switch('beta-versions', active=True)
def test_find_latest_verison_dont_exclude_anything_with_channel(self):
addon = Addon.objects.get(pk=3615)
| [TestSearchSignals->[test_delete->[delete]],TestAddonFromUpload->[test_existing_guid_same_author->[delete],test_existing_guid->[delete]],TestAddonDelete->[test_cascades->[delete],test_review_delete->[delete],test_delete_with_deleted_versions->[delete]],TestThemeDelete->[test_remove_theme_update_m_time->[delete]],TestAddonWatchDeveloperNotes->[test_has_info_update_developer_comments->[assertHasInfoSet,make_addon,assertHasInfoNotSet],test_has_info_update_developer_comments_no_change->[assertHasInfoSet,make_addon],test_has_info_remove_developer_comments->[assertHasInfoSet,make_addon],test_has_info_update_developer_comments_again->[assertHasInfoSet,make_addon,assertHasInfoNotSet],test_has_info_save->[assertHasInfoSet,make_addon]],TestTrackAddonStatusChange->[test_ignore_non_status_changes->[create_addon],test_increment_all_addon_statuses->[create_addon],test_increment_updated_status->[create_addon]],TestHasListedAndUnlistedVersions->[setUp->[delete]],TestPreviewModel->[test_delete_thumbnail->[check_delete],check_delete->[delete],test_delete_image->[check_delete]],TestShouldRedirectToSubmitFlow->[test_no_versions_doesnt_redirect->[delete]],TestAddonModelsFeatured->[test_featured_random->[_test_featured_random]],TestBackupVersion->[test_firefox_versions->[setup_new_version],test_version_signals->[setup_new_version],test_no_current_version->[delete]],TestIncompatibleVersions->[test_signals_min->[delete],test_signals_max->[delete]],TestAddonNomination->[test_nomination_not_reset_if_adding_new_versions_and_files->[setup_nomination],test_new_version_of_approved_addon_should_reset_nomination->[setup_nomination,check_nomination_reset_with_new_version],test_new_version_of_under_review_addon_does_not_reset_nomination->[setup_nomination]],TestCompatOverride->[test_collapsed_ranges_multiple_versions_and_apps->[check],test_collapsed_ranges_multiple_versions->[check],test_collapsed_ranges_multiple_apps->[check],test_collapsed_ranges_different_types->[check],test_collapsed_ranges->[check]],TestAddonModels->[test_newlines_ul_loose->[newlines_helper],test_delete_by->[delete],test_can_request_review_null_disabled->[check_can_request_review],test_newlines_empty_tag_nested->[newlines_helper],test_newlines_spaced_blocks->[newlines_helper],test_newlines_unclosed_b_wrapped->[newlines_helper],test_newlines_li_newlines_inline->[newlines_helper],test_newlines_inline->[newlines_helper],test_newlines_empty_tag_block_nested_spaced->[newlines_helper],test_newlines_xss_script->[newlines_helper],test_can_request_review_public->[check_can_request_review],test_newlines_less_than->[newlines_helper],test_newlines_unclosed_li->[newlines_helper],test_delete_by_unknown->[delete],test_newlines_normal->[newlines_helper],test_newlines_code_inline->[newlines_helper],test_newlines_blockquote_loose->[newlines_helper],test_newlines_xss_inline->[newlines_helper],test_newlines_malformed_tag_surrounded->[newlines_helper],test_newlines_malformed_faketag->[newlines_helper],test_delete_persona->[_delete],test_newlines_attribute_nestedquotes_singledouble->[newlines_helper],test_newlines_li_all_inline->[newlines_helper],test_newlines_attribute_singlequote->[newlines_helper],test_delete_mail_not_localized->[delete],test_newlines_attribute_nestedquotes_doublesingle->[newlines_helper],test_newlines_ul_tight->[newlines_helper],test_newlines_unclosed_b->[newlines_helper],test_newlines_empty_tag->[newlines_helper],test_newlines_correct_faketag->[newlines_helper],test_newlines_attribute_link_doublequote->[newlines_helper],test_newlines_malformed_faketag_surrounded->[newlines_helper],test_newlines_less_than_tight->[newlines_helper],test_can_request_review_null->[check_can_request_review],test_newlines_malformed_tag->[newlines_helper],test_can_request_review_nominated->[check_can_request_review],test_can_request_review_deleted->[check_can_request_review],test_app_categories->[get_addon],test_app_categories_ignore_unknown_cats->[get_addon],delete->[delete],test_delete->[_delete],test_newlines_li_newlines->[newlines_helper],test_delete_url->[_delete_url],test_no_change_disabled_user->[setup_files],test_removing_public->[setup_files],test_can_request_review_disabled->[check_can_request_review],test_newlines_nested_inline->[newlines_helper],test_newlines_attribute_doublequote->[newlines_helper],test_newlines_spaced_inline->[newlines_helper],test_newlines_empty_tag_block_nested->[newlines_helper],test_newlines_ul->[newlines_helper],test_delete_to->[delete],test_newlines_blockquote_tight->[newlines_helper]]] | This test is used to test if there are no versions with latest version in the database. Returns true if the current version is the same as v3. id. | Needs a test where `beta-versions` is `False`. |
@@ -0,0 +1,13 @@
+from . import search_indexes
+
+
+def update_product(instance):
+ search_indexes.ProductIndex().update_object(instance)
+
+
+def update_order(instance):
+ search_indexes.OrderIndex().update_object(instance)
+
+
+def update_user(instance):
+ search_indexes.UserIndex().update_object(instance)
| [No CFG could be retrieved] | No Summary Found. | As noted earlier, I think this should be called `update_order_index`. |
@@ -46,6 +46,7 @@ const TAG = 'amp-analytics/events';
export const AnalyticsEventType = {
CLICK: 'click',
CUSTOM: 'custom',
+ AMP_STORY: 'amp-story',
HIDDEN: 'hidden',
INI_LOAD: 'ini-load',
RENDER_START: 'render-start',
| [No CFG could be retrieved] | A function to export events that can result in analytics data to be sent. An object that represents a class that implements the interface. | I'm a bit confused by the two names. `amp-story` and `story`. Any concern on using `story` instead? |
@@ -15,6 +15,11 @@
/// </summary>
protected internal override void Setup(FeatureConfigurationContext context)
{
+ if (!PersistenceStartup.HasSupportFor<StorageType.GatewayDeduplication>(context.Settings))
+ {
+ throw new Exception("The selected persistence doesn't have support for gateway deduplication storage. Select another persistence or disable the gateway feature using endpointConfiguration.DisableFeature<Gateway>()");
+ }
+
context.Container.ConfigureComponent<InMemoryGatewayDeduplication>(DependencyLifecycle.SingleInstance);
}
}
| [InMemoryGatewayPersistence->[Setup->[SingleInstance,Container],DependsOn]] | Override this method to configure the component. | This check being here confuses me. All of the other changes are in the actual feature that needs the storage, but this one is in the InMemory implementation, which clearly does support dedup. If we want to actually catch a problem for gateway deduplication, shouldn't this be in the actual Gateway feature instead? |
@@ -167,7 +167,7 @@ export class RequestHandler {
} else {
preUrl = appendEncodedParamStringToUrl(preUrl, extraUrlParamsStr);
}
- return baseUrlTemplatePromise.then(preUrl => {
+ return baseUrlTemplatePromise.then(() => {
this.preconnect_.url(preUrl, true);
return baseUrlPromise.then(request => {
if (request.indexOf('${extraUrlParams}') >= 0) {
| [No CFG could be retrieved] | Fire request once ready Function that reset the state of the object. | Bug! These are not equivalent! |
@@ -108,7 +108,7 @@ public class StringTopNColumnAggregatesProcessor implements TopNColumnAggregates
Aggregator[][] rowSelector
)
{
- if (selector.getValueCardinality() != DimensionDictionarySelector.CARDINALITY_UNKNOWN) {
+ if (capabilities.isDictionaryEncoded().and(capabilities.areDictionaryValuesUnique()).isTrue()) {
return scanAndAggregateWithCardinalityKnown(query, cursor, selector, rowSelector);
} else {
return scanAndAggregateWithCardinalityUnknown(query, cursor, selector);
| [StringTopNColumnAggregatesProcessor->[getRowSelector->[getCardinality]]] | scanAndAggregate is a convenience method for the scanAndAggregateWithCardinalityKnown method. | so it is not possible to have unique dictionary ids but unknown cardinality? |
@@ -3188,6 +3188,16 @@ public class ApiResponseHelper implements ResponseGenerator {
response.setAclName(acl.getName());
}
+ final NetworkDetailVO detail = networkDetailsDao.findDetail(result.getNetworkId(), Network.AssociatedNetworkId);
+ if (detail != null) {
+ Long associatedNetworkId = Long.valueOf(detail.getValue());
+ NetworkVO associatedNetwork = ApiDBUtils.findNetworkById(associatedNetworkId);
+ if (associatedNetwork != null) {
+ response.setAssociatedNetworkId(associatedNetwork.getUuid());
+ response.setAssociatedNetworkName(associatedNetwork.getName());
+ }
+ }
+
response.setObjectName("privategateway");
return response;
| [ApiResponseHelper->[createSite2SiteVpnGatewayResponse->[populateAccount,populateDomain],findUserVmById->[findUserVmById],createCapabilityResponse->[createCapabilityResponse],createStoragePoolResponse->[createStoragePoolResponse],toSerializedString->[toSerializedString],createTemplateUpdateResponse->[createTemplateUpdateResponse],createUsageResponse->[createUsageResponse,findTemplateById],createAutoScaleVmGroupResponse->[createAutoScalePolicyResponse],createImageStoreResponse->[createImageStoreResponse],findTemplateById->[findTemplateById],createStoragePoolForMigrationResponse->[createStoragePoolForMigrationResponse],createSite2SiteCustomerGatewayResponse->[populateAccount,populateDomain],createDomainRouterResponse->[createDomainRouterResponse],createSite2SiteVpnConnectionResponse->[populateAccount,populateDomain],createStaticRouteResponse->[populateAccount,createResourceTagResponse,populateDomain],createDedicatedGuestVlanRangeResponse->[populateAccount,populateDomain],createExtractResponse->[findTemplateById],createVpcResponse->[createNetworkResponse,createResourceTagResponse,populateOwner],createAutoScalePolicyResponse->[createConditionResponse,populateOwner],createTemplateResponses->[findHostById,findUserVmById,findVolumeById,createTemplateResponses,findTemplateById],findDiskOfferingById->[findDiskOfferingById],createHostResponse->[createHostResponse],createPrivateGatewayResponse->[populateAccount,populateDomain],createSnapshotScheduleResponse->[findVolumeById],findUserById->[findUserById],createNicResponse->[setResponseIpAddress],createProjectResponse->[createProjectResponse],createAutoScaleVmProfileResponse->[populateOwner,findUserById,findTemplateById],createSystemVmInstanceResponse->[findHostById],createProjectAccountResponse->[createProjectAccountResponse],findHostById->[findHostById],createLoadBalancerContainerReponse->[createResourceTagResponse,populateOwner],findAccountByNameDomain->[findAccountByNameDomain],createConditionResponse->[createCounterResponse,populateOwner],createClusterResponse->[getStatsCapacityresponse],createUserVmResponse->[createUserVmResponse],createGlobalLoadBalancerResponse->[createLoadBalancerResponse],findVolumeById->[findVolumeById],createVolumeResponse->[createVolumeResponse],createTemplatePermissionsResponse->[findAccountByNameDomain,findTemplateById],createRollingMaintenanceResponse->[getDateStringInternal],createHostForMigrationResponse->[createHostForMigrationResponse],createVlanIpRangeResponse->[createVlanIpRangeResponse],createNetworkResponse->[createCapabilityResponse],isForSystemVms->[isForSystemVms]]] | Method to create PrivateGatewayResponse from private gateway. | this seems to be the same `addAssociatedNetworkToResponse(NetworkResponse response)` as above, let's merge it. |
@@ -878,10 +878,6 @@ public class FileWritingMessageHandler extends AbstractReplyProducingMessageHand
}
private static boolean rename(File source, File target) throws IOException {
- return (nioFilesPresent && filesMove(source, target)) || source.renameTo(target);
- }
-
- private static boolean filesMove(File source, File target) throws IOException {
Files.move(source.toPath(), target.toPath(), StandardCopyOption.REPLACE_EXISTING);
return true;
}
| [FileWritingMessageHandler->[Flusher->[run->[close]],setTaskScheduler->[setTaskScheduler],FileState->[close->[close]],rename->[renameTo],evaluateDestinationDirectoryExpression->[validateDestinationDirectory]]] | rename - move source file to target file. | This can return void. We can now remove the `if` from `if(rename...` and the log about falling back to copy/delete in `handleFileMessage()`. Also, the logic in `renameTo()` that deletes an existing file can be removed and the if tests and associated `throw` s can be removed also, since `Files.move` will throw an exception. |
@@ -31,7 +31,7 @@ from .._upload_helpers import _convert_mod_error, _any_conditions
if TYPE_CHECKING:
from datetime import datetime # pylint: disable=unused-import
- LeaseClient = TypeVar("LeaseClient")
+ BlobLeaseClient = TypeVar("BlobLeaseClient")
async def upload_block_blob( # pylint: disable=too-many-locals
| [upload_page_blob->[create,_convert_mod_error,ModifiedAccessConditions,pop,get,process_storage_error,ValueError,format,_any_conditions,upload_data_chunks],upload_append_blob->[AppendPositionAccessConditions,create,hasattr,pop,process_storage_error,seek,upload_data_chunks],upload_block_blob->[TypeError,encrypt_blob,generate_blob_encryption_data,hasattr,upload_substream_blocks,_convert_mod_error,pop,get,process_storage_error,read,isinstance,commit_block_list,upload,_any_conditions,upload_data_chunks,seekable,BlockLookupList],TypeVar] | Upload a block blob. Upload a series of blocks from the given stream. | Was this var unused in the rest of the file? If it is, don't worry about it, probably just indicates we need a more thorough mypy pass - but just checking that no other instances needed renaming. |
@@ -146,7 +146,7 @@ public interface KsqlExecutionContext {
* Executes a query using the supplied service context.
* @return the query metadata
*/
- TransientQueryMetadata executeQuery(
+ TransientQueryMetadata executeTransientQuery(
ServiceContext serviceContext,
ConfiguredStatement<Query> statement,
boolean excludeTombstones
| [ExecuteResult->[of->[ExecuteResult,of]],prepare->[prepare]] | Execute a query that does not return any results. | Just some wild thoughts: if in the long run this will be deprecated/replaced by `ScalablePushQueryMetadata executeScalablePushQuery`, how about just rename the function / return class as `OldPushQueryMetadata executeOldPushQuery`? |
@@ -4360,7 +4360,7 @@ static byte[] getExecutableTypeAnnotationBytes(Executable exec) {
}
/*[ENDIF] Sidecar19-SE*/
-/*[IF Valhalla-NestMates]*/
+/*[IF Java11]*/
/**
* Answers the host class of the receiver's nest.
*
| [Class->[isAnnotation->[getModifiersImpl,isArray],getTypeName->[getName,isArray,getComponentType,toString],forNameAccessCheck->[run->[checkMemberAccess]],getSignature->[getName],getSuperclass->[getSuperclass],getResourceAsStream->[getClassLoaderImpl,getResourceAsStream,getModule],getNonArrayClassPackageName->[getName],isMemberClass->[getDeclaringClass,getEnclosingObjectClass],getMethods->[checkMemberAccess],getClasses->[checkNonSunProxyMemberAccess],currentLoadedClass->[getStackClasses,getClassLoaderImpl],getAnnotationsByType->[internalGetDeclaredAnnotationsByType,newInstance,getSuperclass],checkParameterTypes->[getParameterTypes],enumConstantDirectory->[getDeclaredField,getEnumVars,getName],getTypeParameters->[getClassRepositoryHolder,getTypeParameters],getGenericInterfaces->[getInterfaces,getClassRepositoryHolder],getDeclaredClasses->[checkNonSunProxyMemberAccess],getEnumConstants->[getEnumConstantsShared],getReflectCacheOffset->[getDeclaredFieldImpl],getDeclaredMethods->[checkMemberAccess],getParameterTypesSignature->[toString,newNoSuchMethodException,getSignature],getGenericSuperclass->[isInterface,getClassRepositoryHolder,getSuperclass],getDeclaredMethod->[checkMemberAccess],asSubclass->[toString,isAssignableFrom],getPrimitiveClass->[getMethod,getComponentType],buildAnnotations->[isInheritedAnnotationType,getSuperclass],getDeclaredAnnotationsByType->[newInstance],newInternalError->[toString],getMethod->[checkMemberAccess],getEnumVars->[getDeclaredField],isNestmateOf->[getNestHost],cast->[isInstance],methodAOverridesMethodB->[isAssignableFrom],getAccessibleField->[getDeclaredField],getMethodSet->[getDeclaredMethods,getDeclaringClass],isSynthetic->[getModifiersImpl,isArray],getParameterTypes->[getParameterTypes],cacheConstructor->[acquireReflectCache,release,getName,newInternalError,reflectCacheDebugHelper,insert,getParameterTypes,newConstructorKey],MethodInfo->[update->[update,equals,isInterface,getModifiers,getDeclaringClass],equals->[initializeTypes,equals],getName],getAnnotatedSuperclass->[isInterface,isArray,isPrimitive],acquireReflectCache->[acquire,ReflectCache,getUnsafe],lookupCachedField->[newFieldKey,find,getName,newInternalError,reflectCacheDebugHelper,peekReflectCache],getPackageName->[getNonArrayClassPackageName,getComponentType],lookupCachedMethods->[find,getName,copyMethods,reflectCacheDebugHelper,peekReflectCache],getDeclaredConstructors->[checkMemberAccess],getDeclaredFields->[checkMemberAccess],cacheFields->[newFieldKey,acquireReflectCache,release,copyFields,getName,reflectCacheDebugHelper,insertIfAbsent,insert,getDeclaringClass],getConstantPool->[getConstantPool],isEnum->[getModifiersImpl,isArray,getSuperclass],forName->[forNameAccessCheck],getEnumConstantsShared->[run->[getMethod],isEnum,getEnumVars,getDeclaredField],isAnnotationPresent->[getAnnotation],getAnnotationsArrayFromValue->[getValueMethod],getAccessibleMethod->[getDeclaredMethod],getClassRepositoryHolder->[ClassRepositoryHolder,getGenericSignature,getFactory],ReflectCache->[insert->[ReflectRef],insertIfAbsent->[ReflectRef]],getConstructors->[checkMemberAccess],getEnclosingConstructor->[getEnclosingObject,checkMemberAccess],lookupCachedConstructor->[find,getName,newInternalError,reflectCacheDebugHelper,getParameterTypes,peekReflectCache,newConstructorKey],getNestHost->[getNestHostImpl],classDepth->[getStackClasses],getDeclaringClass->[getFieldOffset,writeFieldValue,checkMemberAccess],getResource->[getClassLoaderImpl,getName,getModule,getResource],isLocalClass->[getSimpleNameImpl,getEnclosingObjectClass],copyFields->[newInternalError],internalGetDeclaredAnnotationsByType->[getDeclaredAnnotation],throwExceptionOrReturnNull->[newNoSuchMethodException],lookupCachedConstructors->[find,getName,copyConstructors,reflectCacheDebugHelper,peekReflectCache],getNestMembers->[getNestMembersImpl],getFields->[checkMemberAccess],getPackage->[isPrimitive,isArray,getPackageName],lookupCachedMethod->[find,getName,newInternalError,newMethodKey,reflectCacheDebugHelper,getParameterTypes,peekReflectCache],copyConstructors->[newInternalError],isInterface->[getModifiersImpl,isArray],cacheConstructors->[acquireReflectCache,release,getName,copyConstructors,reflectCacheDebugHelper,insertIfAbsent,insert,getParameterTypes,newConstructorKey],isAnonymousClass->[getSimpleNameImpl,getEnclosingObjectClass],classLoaderDepth->[getStackClasses,getClassLoaderImpl],getInterfaces->[getInterfaces,getFieldOffset,writeFieldValue],cacheField->[newFieldKey,acquireReflectCache,release,getName,newInternalError,reflectCacheDebugHelper,insertIfAbsent,insert,getDeclaringClass],newInstance->[checkNonSunProxyMemberAccess],desiredAssertionStatus->[getClassLoaderImpl,getName],getEnclosingClass->[checkMemberAccess,getFieldOffset,writeFieldValue,getEnclosingObjectClass,getDeclaringClass],getDeclaredField->[checkMemberAccess],getField->[checkMemberAccess],CacheKey->[newFieldKey->[CacheKey],newDeclaredPublicMethodsKey->[CacheKey],hashCombine->[hashCode,hashCombine],equals->[equals],newMethodKey->[CacheKey],newConstructorKey->[CacheKey],CacheKey,hashCode,hashCombine,newFieldKey],cacheMethod->[acquireReflectCache,release,getName,newInternalError,newMethodKey,reflectCacheDebugHelper,insertIfAbsent,insert,getParameterTypes,getDeclaringClass],getAnnotationVars->[getDeclaredField,AnnotationVars],currentClassLoader->[getStackClasses,getClassLoaderImpl],getDeclaredConstructor->[checkMemberAccess,newNoSuchMethodException],ClassRepositoryHolder->[ClassRepositoryHolder],getMethodHelper->[getClassLoaderImpl,throwExceptionOrReturnNull,getDeclaringClass,forName,getDeclaredMethodImpl],getSimpleName->[isArray,getSimpleNameImpl,getName,getEnclosingObjectClass,toString],toResourceName->[getName,isArray,getComponentType],copyMethods->[newInternalError],lookupCachedFields->[find,copyFields,getName,reflectCacheDebugHelper,peekReflectCache],addInterfaceMethods->[getInterfaces,addInterfaceMethods,getMethodSet],getEnclosingMethod->[getEnclosingObject,checkMemberAccess],getAnnotationCache->[getDeclaredField,buildAnnotations,AnnotationCache],cacheMethods->[acquireReflectCache,release,getName,copyMethods,newMethodKey,reflectCacheDebugHelper,insertIfAbsent,insert,getParameterTypes,getDeclaringClass],getSigners->[getSigners],toGenericString->[isArray,getName,getSuperclass,isPrimitive,toString,getModifiers],getValueMethod->[run->[getDeclaredField],getAnnotationVars],getConstructor->[checkMemberAccess,newNoSuchMethodException],setReflectCache->[getReflectCacheOffset],toString->[isPrimitive,isInterface,getName],getCanonicalName->[isArray,getName,getEnclosingObjectClass,toString,getDeclaringClass,getCanonicalName]]] | This method returns the cache object for the host class of the receiver. Checks if the given class is a nestmate of this class. | Is `pConfig VALHALLA` still supported assuming this change removes the natives affected from that configuration? How about the check decorated by `Valhalla-NestMates` within `j.l.i.MethodHandles.checkAccess()`? |
@@ -756,8 +756,10 @@ class RaidenProtocol:
# Repeat the 'PROCESSED' message if the message has been handled before
echohash = sha3(data + self.raiden.address)
- if echohash in self.receivedhashes_to_processedmessages:
- self._maybe_send_processed(*self.receivedhashes_to_processedmessages[echohash])
+ message_id = int.from_bytes(echohash, 'big') % UINT64_MAX
+
+ if message_id in self.receivedhashes_to_processedmessages:
+ self._maybe_send_processed(*self.receivedhashes_to_processedmessages[message_id])
return
message = decode(data)
| [single_queue_send->[event_first_of,timeout_exponential_backoff,retry_with_recovery],healthcheck->[timeout_exponential_backoff,retry],wait_recovery->[event_first_of],retry_with_recovery->[wait_recovery,event_first_of,retry],retry->[event_first_of],RaidenProtocol->[receive_message->[maybe_send_processed],receive->[_maybe_send_processed],send_and_wait->[send_async],receive_ping->[maybe_send_processed],start->[start],get_channel_queue->[get_health_events],send_async->[get_channel_queue]]] | Receive a message from the network. | Same nitpick about inlining as above |
@@ -55,3 +55,15 @@ func FindExecutable(program string) (string, error) {
return "", errors.Errorf(unableToFindProgramTemplate, program)
}
+
+func getPotentialPaths(goPath string, os string) []string {
+ var sep string
+ switch os {
+ case "windows":
+ sep = ";"
+ case "linux", "darwin":
+ sep = ":"
+ }
+
+ return strings.Split(goPath, sep)
+}
| [IsNotExist,Wrapf,Join,Stat,IsDir,Infof,Sprintf,V,Errorf,Getwd,Wrap,LookPath,Getenv,HasSuffix,Mode] | Returns an error message if the program template could not be found. | I believe this function could return a (err, string[]), because what happens if the os is not linux/darwin or windows? But at the same time, I checked in the README, and windows and linux/darwin are the only supported platforms. |
@@ -157,15 +157,13 @@ func newConmonOCIRuntime(name string, paths []string, conmonPath string, runtime
if err := os.MkdirAll(runtime.exitsDir, 0750); err != nil {
// The directory is allowed to exist
if !os.IsExist(err) {
- return nil, errors.Wrapf(err, "error creating OCI runtime exit files directory %s",
- runtime.exitsDir)
+ return nil, errors.Wrapf(err, "error creating OCI runtime exit files directory")
}
}
if err := os.MkdirAll(runtime.socketsDir, 0750); err != nil {
// The directory is allowed to exist
if !os.IsExist(err) {
- return nil, errors.Wrapf(err, "error creating OCI runtime attach sockets directory %s",
- runtime.socketsDir)
+ return nil, errors.Wrap(err, "error creating OCI runtime attach sockets directory")
}
}
| [createOCIContainer->[getLogTag,DeleteContainer],StopContainer->[KillContainer],sharedConmonArgs->[Name],Name] | Name returns the name of the runtime being wrapped by Conmon. Path returns the path of the container. | For these directory errors, will the directory that can't be created be included in the error message somewhere else? I think that's important to include in the message. |
@@ -279,8 +279,8 @@ class StorageTableClientTest(AzureTestCase, TableTestCase):
batch = self.table.create_batch()
batch.update_entity(
sent_entity,
- etag=etag,
- match_condition=MatchConditions.IfNotModified,
+ # etag=etag,
+ # match_condition=MatchConditions.IfNotModified,
mode=UpdateMode.REPLACE
)
transaction_result = self.table.send_batch(batch)
| [StorageTableClientTest->[test_batch_merge->[_tear_down,_set_up],test_batch_update->[_assert_valid_batch_transaction,_tear_down,_set_up],test_batch_same_row_operations_fail->[_create_random_entity_dict,_tear_down,_create_updated_entity_dict,_set_up],test_new_non_existent_table->[_create_random_entity_dict,_tear_down,_set_up],test_new_delete_nonexistent_entity->[_create_random_entity_dict,_tear_down,_set_up],test_batch_all_operations_together_context_manager->[_tear_down,_set_up],test_batch_insert_replace->[_tear_down,_set_up],test_batch_delete->[_assert_valid_batch_transaction,_tear_down,_set_up],test_batch_update_if_match->[_create_random_entity_dict,_create_updated_entity_dict,_set_up,_assert_updated_entity,_tear_down,_assert_valid_batch_transaction],test_batch_inserts->[_assert_valid_batch_transaction,_tear_down,_set_up],test_batch_too_many_ops->[_create_random_entity_dict,_tear_down,_set_up],test_batch_different_partition_operations_fail->[_create_random_entity_dict,_tear_down,_create_updated_entity_dict,_set_up],test_batch_insert_merge->[_tear_down,_set_up],test_batch_update_if_doesnt_match->[_create_random_entity_dict,_create_updated_entity_dict,_set_up,_assert_default_entity,_tear_down],test_batch_all_operations_together->[_tear_down,_set_up],test_batch_insert->[_tear_down,_set_up]]] | This method tests batch update if match. | Why was this removed? The test is supposed to be testing the match condition? |
@@ -187,6 +187,7 @@ public abstract class AbstractHoodieWriteClient<T extends HoodieRecordPayload, I
lastCompletedTxnAndMetadata.isPresent() ? Option.of(lastCompletedTxnAndMetadata.get().getLeft()) : Option.empty());
try {
preCommit(instantTime, metadata);
+ table.getMetadataWriter().ifPresent(w -> ((HoodieTableMetadataWriter)w).update(metadata, instantTime));
commit(table, commitActionType, instantTime, metadata, stats);
postCommit(table, metadata, instantTime, extraMetadata);
LOG.info("Committed " + instantTime);
| [AbstractHoodieWriteClient->[rollbackInflightCompaction->[rollback],startCommitWithTime->[startCommitWithTime,startCommit],inlineCluster->[scheduleClustering,cluster],startCommit->[startCommit],restoreToSavepoint->[createTable],commitStats->[commit,commitStats],close->[close],scheduleTableServiceInternal->[scheduleClustering,scheduleCompaction,scheduleCleaning],savepoint->[savepoint,createTable],compact->[compact],rollback->[createTable,rollback],preWrite->[setOperationType,syncTableMetadata],scheduleTableService->[scheduleTableService],deleteSavepoint->[createTable,deleteSavepoint],rollbackInflightClustering->[rollback],rollbackFailedBootstrap->[createTable],bootstrap->[bootstrap],inlineCompact->[compact,scheduleCompaction],postCommit->[syncTableMetadata],clean->[clean],commit->[commit],restoreToInstant->[createTable],rollbackFailedWrites->[createTable,rollbackFailedWrites,rollbackFailedBootstrap,rollback],finalizeWrite->[finalizeWrite]]] | Commits the stats and files visible by the user. | nts: first committing to metadata table |
@@ -160,7 +160,7 @@ class BokehPlotDirective(Directive):
js_name = f"bokeh-plot-{uuid4().hex}-external-{docname}.js"
try:
- (script, js, js_path, source) = _process_script(source, path, env, js_name)
+ (script, js, js_path, source, doc) = _process_script(source, path, env, js_name)
except Exception as e:
raise RuntimeError(f"Sphinx bokeh-plot exception: \n\n{e}\n\n Failed on:\n\n {source}")
env.bokeh_plot_files[js_name] = (script, js, js_path, source, dirname(env.docname))
| [builder_inited->[ensuredir,hasattr,join],BokehPlotDirective->[run->[raw,debug,SphinxError,basename,literal_block,dirname,uuid4,get,replace,startswith,set_source_info,join,RuntimeError,open,target,_process_script],flag,choice],build_finished->[status_iterator,ensuredir,basename,SphinxError,dirname,len,sorted,copyfile,set,join,add,values],setup->[add_directive,connect,add_config_value],_process_script->[write,ExampleHandler,SphinxError,filterwarnings,catch_warnings,Document,getenv,autoload_static,replace,get_sphinx_resources,RuntimeError,join,_clear_extensions,open,modify_document],getLogger] | Generate the bokeh - plot node. This function returns a list of objects. | The data in `env.bokeh_plot_files` is used later in the build process in the `build_finished` function. AFAICT I think `script`, `js`, and `source` values are not actually used/needed there anymore. Can you see if they can be removed from this tuple here (and in `build_finished`)? This might significantly reduce memory usage during the build (and possibly speed, I think `env` data gets serialized to disk) |
@@ -237,6 +237,7 @@ func newKafkaConfig(config *kafkaConfig) (*sarama.Config, error) {
retryMax = 1000
}
k.Producer.Retry.Max = retryMax
+ // TODO: k.Producer.Retry.Backoff = ?
// configure per broker go channel buffering
k.ChannelBufferSize = config.ChanBufferSize
| [PublishEvent->[PublishEvent,getMode],getMode->[initMode],Close->[Close],BulkPublish->[getMode]] | configure the kafka configuration. | Should this stay in? |
@@ -195,6 +195,11 @@ class SparseTensor(_TensorLike, composite_tensor.CompositeTensor):
"""
return tensor_util.constant_value_as_shape(self._dense_shape)
+ @property
+ def name(self):
+ """Get the name of the sparse tensor"""
+ return self.__str__()
+
@property
def graph(self):
"""The `Graph` that contains the index, value, and dense_shape tensors."""
| [SparseTensor->[from_value->[SparseTensor]],convert_to_tensor_or_sparse_tensor->[from_value],SparseTensorSpec->[_to_components->[from_value],_batch->[SparseTensorSpec],_from_compatible_tensor_list->[SparseTensor],_to_tensor_list->[from_value],from_value->[from_value],_from_components->[SparseTensor],_unbatch->[SparseTensorSpec]]] | Returns the TensorShape representing the shape of the dense tensor. | This does not seem correct. Unless we add a name parameter to SparseTensor this does not seems like a reasonable value of `name`. |
@@ -68,6 +68,10 @@ import com.mongodb.DBObject;
* An implementation of both the {@link MessageStore} and {@link MessageGroupStore}
* strategies that relies upon MongoDB for persistence.
*
+ * @deprecated in favor of {@link org.springframework.integration.mongodb.store.ConfigurableMongoDbMessageStore}
+ * together with {@code org.springframework.integration.mongodb.store.support.MessageReadingMongoConverter}.
+ * Will be removed in future releases and {@code ConfigurableMongoDbMessageStore} will be renamed to {@code MongoDbMessageStore}.
+ *
* @author Mark Fisher
* @author Oleg Zhurakousky
* @author Sean Brandt
| [MongoDbMessageStore->[addMessageToGroup->[getMessageGroup],DBObjectToGenericMessageConverter->[convert->[read,normalizeHeaders]],updateGroup->[whereGroupIdIs],getMessage->[getMessage],pollMessageFromGroup->[getMessage],removeMessageGroup->[getMessage,removeMessageFromGroup],getMessageGroup->[getMessage],iterator->[getMessageGroup,iterator],removeMessageFromGroup->[getMessageGroup],MessageReadingMongoConverter->[write->[write],afterPropertiesSet->[afterPropertiesSet],read->[read],normalizeHeaders->[read]],removeMessage->[getMessage]]] | Imports a single message store that relies upon MongoDB for persistence. This method is used to retrieve the group timestamp from the group_update_timestamp_key. | I am not so sure the rename will be necessary. |
@@ -77,13 +77,11 @@ function create_metadata($entity_guid, $name, $value, $value_type = '', $owner_g
* @param string $name Metadata name
* @param string $value Metadata value
* @param string $value_type Value type
- * @param int $owner_guid Owner guid
*
* @return bool
*/
-function update_metadata($id, $name, $value, $value_type, $owner_guid) {
- return _elgg_services()->metadataTable->update($id, $name, $value,
- $value_type, $owner_guid);
+function update_metadata($id, $name, $value, $value_type) {
+ return _elgg_services()->metadataTable->update($id, $name, $value, $value_type);
}
/**
| [_elgg_invalidate_metadata_cache->[invalidateByOptions],elgg_disable_metadata->[disableAll],create_metadata_from_array->[createFromArray],elgg_delete_metadata_by_id->[delete],_elgg_get_entity_metadata_where_sql->[getEntityMetadataWhereSql],elgg_get_metadata->[getAll],elgg_get_metadata_from_id->[get],get_metadata_url->[getUrl],elgg_delete_metadata->[deleteAll],create_metadata->[create],elgg_enable_metadata->[enableAll],update_metadata->[update],elgg_get_entities_from_metadata->[getEntities],registerHandler] | Update metadata of a node. | Same, either use ElggMetadata instance or entity setter |
@@ -572,7 +572,7 @@ namespace System.Linq
bool sourceFound;
TSource input = _source.TryGetElementAt(index, out sourceFound);
found = sourceFound;
- return sourceFound ? _selector(input) : default!;
+ return sourceFound ? _selector(input!) : default!;
}
[return: MaybeNull]
| [Enumerable->[SelectListPartitionIterator->[MoveNext->[Dispose]],SelectEnumerableIterator->[ToArray->[ToArray]],SelectIPartitionIterator->[MoveNext->[MoveNext],PreallocatingToArray->[GetCount],LazyToArray->[ToArray,GetCount],ToList->[GetCount],Skip->[Skip],ToArray->[PreallocatingToArray,LazyToArray,GetCount],Take->[Take],GetCount->[GetCount],Dispose->[Dispose]]]] | TryGetElementAt - Try to get an element from the sequence. | Is there a way to make `NotNullWhen` apply to the `T TryGet(bool)` pattern? If not this seems like something we may need to consider tracking. |
@@ -1412,10 +1412,9 @@ def linear_chain_crf(input, label, param_attr=None, length=None):
Args:
input(${emission_type}): ${emission_comment}
- input(${transition_type}): ${transition_comment}
label(${label_type}): ${label_comment}
Length(${length_type}): ${length_comment}
- param_attr(ParamAttr): The attribute of the learnable parameter.
+ param_attr(ParamAttr): The attribute of the learnable parameter.It is transition parameter.
Returns:
output(${emission_exps_type}): ${emission_exps_comment} \n
| [ctc_greedy_decoder->[topk],py_func->[PyFuncRegistry],image_resize->[_is_list_or_turple_],sequence_first_step->[sequence_pool],nce->[_init_by_numpy_array],resize_trilinear->[image_resize],logical_xor->[_logical_op],elementwise_pow->[_elementwise_op],npair_loss->[reduce_sum,reduce_mean,expand,matmul,reshape,softmax_with_cross_entropy],expand->[contain_tensor],elementwise_min->[_elementwise_op],elementwise_max->[_elementwise_op],logical_not->[_logical_op],elementwise_floordiv->[_elementwise_op],conv2d->[_get_default_param_initializer],logical_and->[_logical_op],sequence_last_step->[sequence_pool],elementwise_add->[_elementwise_op],elementwise_sub->[_elementwise_op],lstm_unit->[fc],elementwise_mul->[_elementwise_op],deformable_conv->[_get_default_param_initializer],logical_or->[_logical_op],elementwise_div->[_elementwise_op],dice_loss->[reduce_sum,one_hot,reduce_mean],matmul->[__check_input],resize_bilinear->[image_resize],resize_nearest->[image_resize],image_resize_short->[image_resize],elementwise_mod->[_elementwise_op],conv3d->[_get_default_param_initializer]] | Linear Chain CRF. Linear Chain of CRF. This function creates linear chain_crf and adds it to the graph. | --> `The attribute for the transition parameter`? |
@@ -13,7 +13,7 @@ internal static partial class Interop
{
[DllImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_EcKeyCreateByOid")]
private static extern SafeEcKeyHandle CryptoNative_EcKeyCreateByOid(string oid);
- internal static SafeEcKeyHandle EcKeyCreateByOid(string oid)
+ internal static SafeEcKeyHandle? EcKeyCreateByOid(string oid)
{
SafeEcKeyHandle handle = CryptoNative_EcKeyCreateByOid(oid);
if (handle == null || handle.IsInvalid)
| [Interop->[Crypto->[EcKeyGetCurveName->[CryptoNative_EcKeyGetCurveName],EcKeyHasCurveName->[CryptoNative_EcKeyGetCurveName],EcKeyGetSize->[CryptoNative_EcKeyGetSize]]]] | Create an EC key by oid. | Looks like you need a #nullable enable on this file. |
@@ -445,10 +445,13 @@ class IntegrationFixture {
/** @override */
setup(env) {
- const body = this.spec.body;
+ const body = typeof this.spec.body == 'function' ?
+ this.spec.body() : this.spec.body;
+ const experiments = this.spec.experiments || [''];
return new Promise((resolve, reject) => {
env.iframe = createElementWithAttributes(document, 'iframe', {
- src: addParamsToUrl('/amp4test/compose-doc', {body}) + `#${this.hash}`,
+ src: addParamsToUrl('/amp4test/compose-doc',
+ {body, experiments: experiments.join(' ')}) + `#${this.hash}`,
});
env.iframe.onload = function() {
env.win = env.iframe.contentWindow;
| [RealWinFixture->[setup->[interceptEventListeners,AMP_TEST_IFRAME,onerror,onload,name,installRuntimeStylesPromise,testLocation,location,srcdoc,body,document,win,iframe,fakeRegisterElement,defineProperty,allowExternalResources,installCustomElements,resolve,ampCss,doNotLoadExternalResourcesInTest,contentWindow,createElement],teardown->[iframe]],FakeWinFixture->[setup->[win]],AmpFixture->[setup->[flushVsync,installDocService,interceptEventListeners,AMP,parentWin,getAmpDoc,ampdocService,name,installRuntimeStylesPromise,installBuiltinElements,setAttribute,installFriendlyIframeEmbed,then,location,installAmpdocServices,installRuntimeServices,appendChild,document,canonicalUrl,params,win,runtimeOn,embed,extensionsFor,ampdocServiceFor,installExtensionsService,registerExtension,ampdoc,push,split,whenReady,extensions,resourcesForDoc,bind,adopt,registerElementForTesting,createAmpElement,adoptShadowMode,setStyles,services],teardown->[resetLoadingCheckForTests,resetScheduledElementForTesting,embed,indexOf,substring,customElements,win]],IntegrationFixture->[setup->[addParamsToUrl,resolve,iframe,body,createElementWithAttributes,win],teardown->[iframe],constructor->[hash]],SandboxFixture->[setup->[sandbox],teardown->[sandbox]],create,describeFunc,constructor,createAmpElementProto,describe,__proto__,/*OK*/,createdCallback,setAttribute,then,teardown,skip,prototype,document,implementationClassForTesting,factory,templateFunc,push,call,afterEach,isOn,describeEnv,beforeEach,classList,createElement,only,forEach,setup,slice] | Setup the AMP environment. | Why include an empty string? |
@@ -856,6 +856,7 @@ module.exports = JhipsterServerGenerator.extend({
// Create Gatling test files
if (this.testFrameworks.indexOf('gatling') !== -1) {
this.copy(TEST_DIR + 'gatling/conf/gatling.conf', TEST_DIR + 'gatling/conf/gatling.conf');
+ this.copy(TEST_DIR = 'gatling/conf/logback.xml', TEST_DIR + 'gatling/conf/logback.xml');
mkdirp(TEST_DIR + 'gatling/data');
mkdirp(TEST_DIR + 'gatling/bodies');
mkdirp(TEST_DIR + 'gatling/simulations');
| [No CFG could be retrieved] | Create the test files for the given application type. Create Cucumber test files. | typo here, it should be `+` instead of `=` |
@@ -107,7 +107,7 @@ class TransmissionAPI(GenericClient):
def _set_torrent_seed_time(self, result):
- if sickbeard.TORRENT_SEED_TIME:
+ if sickbeard.TORRENT_SEED_TIME and sickbeard.TORRENT_SEED_TIME != -1:
time = int(60 * float(sickbeard.TORRENT_SEED_TIME))
arguments = {'ids': [result.hash],
'seedIdleLimit': time,
| [TransmissionAPI->[_get_auth->[search,_request,update,post,dumps,encode],_add_torrent_uri->[_request,json,dumps],_set_torrent_ratio->[float,_request,json,dumps],_set_torrent_seed_time->[int,_request,json,dumps,float],_set_torrent_priority->[_request,json,dumps],__init__->[super],_add_torrent_file->[_request,b64encode,json,dumps]],TransmissionAPI] | Set the seed time for a torrent. | shouldn't this just be 'if sickbeard.TORRENT_SEED_TIME != -1:' ? |
@@ -89,16 +89,9 @@ func statsCmd(c *cli.Context) error {
times = 1
}
- var format string
var ctrs []*libpod.Container
var containerFunc func() ([]*libpod.Container, error)
- if c.IsSet("format") {
- format = c.String("format")
- } else {
- format = genStatsFormat()
- }
-
containerFunc = runtime.GetRunningContainers
if len(c.Args()) > 0 {
containerFunc = func() ([]*libpod.Container, error) { return runtime.GetContainersByList(c.Args()) }
| [headerMap->[Field,ValueOf,ToUpper,NumField,Type,Indirect],HumanSize,headerMap,Writer,IsSet,Flush,Args,MoveCursor,Errorf,Bool,GetContainerStats,ID,Wrapf,Shutdown,ToLower,GetLatestContainer,RemoveScientificNotationFromFloat,Out,GetContainersByList,Clear,Sprintf,String,Replace,Sleep] | statsCmd displays percentage of CPU memory network I/O block I/O and PIDs unable to get list of containers. | format doesn't seem to be used until the for loop ~line 130. Given there are a few error conditions in between, could you move this down nearer to that for loop? |
@@ -193,12 +193,16 @@ describe AdminPublicBodyCategoriesController do
context 'on failure' do
it 'renders the form if creating the record was unsuccessful' do
- post :create, :public_body_category => { :title => '' }
+ post :create, params: { :public_body_category => { :title => '' } }
expect(response).to render_template('new')
end
it 'is rebuilt with the given params' do
- post :create, :public_body_category => { :title => 'Need a description' }
+ post :create, params: {
+ :public_body_category => {
+ :title => 'Need a description'
+ }
+ }
expect(assigns(:public_body_category).title).to eq('Need a description')
end
| [create,find,describe,match_array,category_tag,create!,first,it,attributes_for,put,description,to,edit_admin_category_path,save!,before,set_locales,post,destroy_all,destroy,require,include,sort,squish,title,except,id,locale,redirect_to,context,get,eq,render_template,with_locale,reload] | The main method of the validation system. It creates the necessary components and renders the form if missing - public - body - category - > missing - alternative - locale translation. | Line is too long. [93/80] |
@@ -47,6 +47,11 @@ public:
{
me->CastSpell(me, SPELL_UROK_SPAWN, true);
BossAI::InitializeAI();
+ Talk(SAY_SUMMON);
+ if (Unit* target = me->SelectNearestTarget(500))
+ {
+ me->AI()->AttackStart(target);
+ }
}
void EnterCombat(Unit* /*who*/) override
| [boss_urok_doomhowl->[boss_urok_doomhowlAI->[JustDied->[_JustDied],InitializeAI->[CastSpell],Reset->[_Reset],EnterCombat->[Talk,ScheduleEvent,urand,_EnterCombat],UpdateAI->[DoCastVictim,ExecuteEvent,ScheduleEvent,DoMeleeAttackIfReady,HasUnitState,UpdateVictim,urand,Update]]]] | Initialize AI. | why was this removed? |
@@ -47,6 +47,8 @@ class Category(MPTTModel):
verbose_name = pgettext_lazy('Category model', 'category')
verbose_name_plural = pgettext_lazy('Category model', 'categories')
app_label = 'product'
+ permissions = (('view_category', 'Can View Category in Dashboard'),
+ ('edit_category', 'Can Edit Category in Dashboard'))
def __str__(self):
return self.name
| [ProductVariant->[get_absolute_url->[get_slug],get_cost_price->[select_stockrecord],as_data->[get_price_per_item],get_first_image->[get_first_image]],Product->[is_in_stock->[is_in_stock],ProductManager],ProductImage->[delete->[get_ordering_queryset],save->[get_ordering_queryset],ImageManager],Stock->[StockManager]] | Returns a string representation of the node ID. | What's the idea behind this title-like capitalization? Why have all permissions end in "in Dashboard"? Are we planning to introduce a second set of permissions for other use cases such as REST or GraphQL? If not the `is_staff` field is responsible for the "in dashboard" part. |
@@ -132,9 +132,9 @@ export class BindValidator {
if (allowedProtocols && url) {
const re = /^([^:\/?#.]+):[\s\S]*$/;
const match = re.exec(url);
-
if (match !== null) {
const protocol = match[1].toLowerCase().trimLeft();
+ // hasOwnProperty() needed since nested objects are not prototype-less.
if (!allowedProtocols.hasOwnProperty(protocol)) {
return false;
}
| [No CFG could be retrieved] | Determines if a url s value is valid within a property rules spec. Create a rule object for the given property name. | Curious if `allowedProtocols` will have its properties removed. |
@@ -49,6 +49,9 @@ public class ResponseTimeMonitor extends NodeMonitor {
public static final AbstractNodeMonitorDescriptor<Data> DESCRIPTOR = new AbstractAsyncNodeMonitorDescriptor<Data>() {
@Override
protected Callable<Data,IOException> createCallable(Computer c) {
+ if (c.isOffline()) {
+ return null;
+ }
return new Step1(get(c));
}
| [ResponseTimeMonitor->[monitor->[monitor],Data->[toString->[getAverage,failureCount],hasTooManyTimeouts->[failureCount]],newInstance->[ResponseTimeMonitor]]] | Monitors a failure in the response time monitor. | Better to just check that the channel != null and not closing or closed Otherwise if the agent is taken offline due to the returned metric it cannot come back on-line |
@@ -0,0 +1,11 @@
+/**
+ * Gets the primary taxonomy term id for the give taxonomy.
+ *
+ * @param {Object} state The state.
+ * @param {string} taxonomy The primary taxonomy to retrieve.
+ *
+ * @returns {string} Primary taxonomy term id.
+ */
+export function getPrimaryTaxonomy( state, taxonomy ) {
+ return state.primaryTaxonomies[ taxonomy ];
+}
| [No CFG could be retrieved] | No Summary Found. | Name doesn't imply it only returns an id |
@@ -269,6 +269,7 @@ public class RStudioGinModule extends AbstractGinModule
bindTab("R Markdown", RenderRmdOutputTab.class);
bindTab("Find", FindOutputTab.class);
bindTab("Source Cpp", SourceCppOutputTab.class);
+ bindTab("Deploy Shiny", ShinyAppsDeployOutputTab.class);
bind(Shell.Display.class).to(ShellPane.class) ;
| [RStudioGinModule->[bindTab->[to],bindPane->[to],configure->[install,to,bindTab,build,asEagerSingleton,in,bindPane]]] | This method is called to configure the application. Binds all components of the application to the appropriate object. Binds all the components of the application to their respective classes. Binds all server operations to the remote server. | Let's call this ShinyApps for now (later I think it will just be called "Deploy" so you could do that as well) |
@@ -1,4 +1,4 @@
-<% title @organization.name %>
+<% title sanitize @organization.name %>
<%= content_for :page_meta do %>
<%= render "users/meta" %>
| [No CFG could be retrieved] | Renders the nag - user page. | this we're calling two methods, we should probably use parenthesis at least in the inner one: `title sanitize(@organization.name)` it's easier to read IMO |
@@ -27,9 +27,14 @@ func GenerateBuildFromConfig(bc *buildapi.BuildConfig, r *buildapi.SourceRevisio
Revision: r,
},
ObjectMeta: kapi.ObjectMeta{
- Labels: map[string]string{buildapi.BuildConfigLabel: bcCopy.Name},
+ Labels: bcCopy.Labels,
},
}
+ if b.Labels == nil {
+ b.Labels = make(map[string]string)
+ }
+ b.Labels[buildapi.BuildConfigLabel] = bcCopy.Name
+
for originalImage, newImage := range imageSubstitutions {
glog.V(4).Infof("Substituting %s for %s", newImage, originalImage)
SubstituteImageReferences(b, originalImage, newImage)
| [Copy,Infof,GetByNamespace,V,IsNotFound] | GenerateBuildFromConfig creates a new build based on a given BuildConfig and a SourceRevision. Generate a build definition based on the current imageid. | You need to be copying this map, not referencing it. |
@@ -46,10 +46,11 @@ ReadabilityAnalysis.propTypes = {
* @returns {Object} Props that should be passed to ContentAnalysis.
*/
function mapStateToProps( state, ownProps ) {
- let marksButtonStatus = state.marksButtonStatus;
-
+ let marksButtonStatus;
if ( ownProps.hideMarksButtons ) {
marksButtonStatus = "hidden";
+ } else {
+ marksButtonStatus = "enabled";
}
return {
| [No CFG could be retrieved] | Maps redux state to the readability analysis props. | Not using the state here anymore, would that not be causing problems? |
@@ -398,6 +398,15 @@ public class HttpLoadQueuePeon extends LoadQueuePeon
public void dropSegment(DataSegment segment, LoadPeonCallback callback)
{
synchronized (lock) {
+ if (stopped) {
+ log.warn(
+ "Server[%s] failed to drop segment[%s] because load queue peon is stopped.",
+ serverId,
+ segment.getIdentifier()
+ );
+ callback.execute();
+ return;
+ }
SegmentHolder holder = segmentsToDrop.get(segment);
if (holder == null) {
| [HttpLoadQueuePeon->[start->[call->[doSegmentManagement]],LoadSegmentHolder->[requestSucceeded->[requestSucceeded]],SegmentHolder->[toString->[toString]]]] | Drop a segment. | Instead of "failed to drop", "cannot drop" is a better log message. |
@@ -52,9 +52,8 @@ func (mc *MeshCatalog) ListEndpointsForServiceIdentity(downstreamIdentity identi
ipStr := ep.IP.String()
outboundEndpointsSet[ipStr] = append(outboundEndpointsSet[ipStr], ep)
}
- log.Info().Msgf("outbound endpoints: %v", outboundEndpointsSet)
- destSvcIdentities, err := mc.ListAllowedOutboundServiceIdentities(downstreamIdentity)
+ destSvcIdentities, err := mc.ListOutboundServiceIdentities(downstreamIdentity)
if err != nil {
log.Error().Err(err).Msgf("Error looking up outbound service accounts for downstream identity %s", downstreamIdentity)
return nil, err
| [ListEndpointsForServiceIdentity->[listEndpointsForService]] | ListEndpointsForServiceIdentity returns all endpoints that are allowed to connect to the upstream service. | This was added by mistake initially. It was used for debugging. |
@@ -306,7 +306,7 @@ public class PeriodGranularity extends BaseQueryGranularity
{
// toStandardDuration assumes days are always 24h, and hours are always 60 minutes,
// which may not always be the case, e.g if there are daylight saving changes.
- if (chronology.days().isPrecise() && chronology.hours().isPrecise()) {
+ if (isPrecise()) {
final long millis = period.toStandardDuration().getMillis();
long offset = t % millis - origin % millis;
if(offset < 0) {
| [PeriodGranularity->[hashCode->[hashCode],equals->[equals]]] | Truncate the given period to the nearest millisecond in the current chronology. | can you explain why this change is needed? |
@@ -101,12 +101,15 @@ class Dataset:
Returns
-------
- data_arrays : ``Dict[str, List[numpy.array]]``
+ data_arrays : ``Dict[str, Union[Dict[str, numpy.array], List[numpy.array]]``
A dictionary of data arrays, keyed by field name, suitable for passing as input to a
model. This is a `batch` of instances, so, e.g., if the instances have a "question"
field and an "answer" field, the "question" fields for all of the instances will be
grouped together into a single array, and the "answer" fields for all instances will be
- similarly grouped in a parallel set of arrays, for batched computation.
+ similarly grouped in a parallel set of arrays, for batched computation. Additionally,
+ for TextFields, the value of the dictionary key is no longer a list, but another
+ dictionary mapping namespaces to arrays. The number of elements in this sub-dictionary
+ corresponds to the number of ``TokenIndexers`` used to index the Field.
"""
if padding_lengths is None:
padding_lengths = defaultdict(dict)
| [Dataset->[as_arrays->[get_padding_lengths],get_padding_lengths->[get_padding_lengths]]] | This method converts this dataset into a set of numpy arrays that can be used to fill in This method checks whether we were a given a max length for a particular field and padding The type of the field array is not a type but it s a type of the array. | This type should match what's above: `Dict[str, Union[numpy.array, Dict[str, numpy.array]]`. |
@@ -130,6 +130,7 @@ namespace ProtoCore.AssociativeGraph
public Guid guid {get; set;}
public int dependencyGraphListID { get; set; }
public int AstID { get; set; }
+ public int SourceAstID { get; set; } // The original AST that this graphnode is associated with
public int exprUID { get; set; }
public int ssaExprID { get; set; }
public int modBlkUID { get; set; }
| [UpdateNodeRef->[IsEqual->[IsEqual]],DependencyGraph->[GetGraphNodesAtScope->[GetGraphNodeKey],Push->[GetGraphNodeKey],GetExecutionStatesAtScope->[GetGraphNodesAtScope],RemoveNodesFromScope->[GetGraphNodeKey]],UpdateNode->[IsEqual->[IsEqual]]] | Into a ProtoCore. DSAGraph. UpdateBlock object GraphNode properties are used to mark the graph node as dirty. | rename to OriginalAstID Source is confusable with the thing a user types. Or is that what is meant? How is this different from the AstID? |
@@ -128,10 +128,11 @@ class StudentsControllerTest < AuthenticatedControllerTest
should 'be able to update student (and change his section)' do
put_as @admin,
:update,
- :id => @student.id,
- :user => {:last_name => 'Doe',
- :first_name => 'John',
- :section_id => @section.id }
+ id: @student.id,
+ user: { user_name: 'machinist_student1',
+ last_name: 'Doe',
+ first_name: 'John',
+ section_id: @section.id }
assert_response :redirect
assert_equal I18n.t('students.update.success',
:user_name => @student.user_name),
| [StudentsControllerTest->[post_as,fixture_file_upload,name,should,setup,assert_redirected_to,assert_equal,t,assert_not_nil,assert_nil,assert_generates,get_as,put_as,id,make,context,user_name,section,assert_response,last_name,assert,find_by_user_name,reload,assert_recognizes],join,require,expand_path,dirname] | check that all required actions are granted c8mahler - check that c8mahler has valid controller action and. | Align the elements of a hash literal if they span more than one line. |
@@ -34,9 +34,14 @@ EPOCH_NUM = 1
PRINT_STEP = 2
STEP_NUM = 10
-place = fluid.CPUPlace()
-# TODO(liym27): Diff exists between dygraph and static graph on CUDA place.
-# place = fluid.CUDAPlace(0) if fluid.is_compiled_with_cuda() else fluid.CPUPlace()
+place = fluid.CUDAPlace(0) if fluid.is_compiled_with_cuda() \
+ else fluid.CPUPlace()
+
+# Note: Set True to eliminate randomness.
+# 1. For one operation, cuDNN has several algorithms,
+# some algorithm results are non-deterministic, like convolution algorithms.
+if fluid.is_compiled_with_cuda():
+ fluid.core.globals()['FLAGS_cudnn_deterministic'] = True
train_parameters = {
"learning_strategy": {
| [TestSeResnet->[test_check_result->[train],setUp->[train]],SeResNeXt->[__init__->[ConvBNLayer,BottleneckBlock]],BottleneckBlock->[__init__->[ConvBNLayer,SqueezeExcitation]],train->[SeResNeXt,optimizer_setting]] | Creates a new object. Function to set optimizer settings for the missing - block block. | If use python api to set flag, recommend to use `set_flags` under `framework.py` |
@@ -490,9 +490,11 @@ func (sg *stepGenerator) generateSteps(event RegisterResourceEvent) ([]Step, res
// We will also not record this non-created resource into the checkpoint as it doesn't actually
// exist.
- if !sg.isTargetedForUpdate(urn) &&
- !providers.IsProviderType(goal.Type) {
-
+ isTargeted := sg.isTargetedForUpdate(urn, goal.Parent, goal.Provider, goal.Dependencies)
+ if isTargeted {
+ sg.targetDependentsForUpdate(urn, goal.Parent, goal.Provider, goal.Dependencies)
+ }
+ if !isTargeted && !providers.IsProviderType(goal.Type) {
sg.sames[urn] = true
sg.skippedCreates[urn] = true
return []Step{NewSkippedCreateStep(sg.deployment, event, new)}, nil
| [AnalyzeResources->[getProviderResource],GenerateSteps->[isTargetedUpdate],generateSteps->[isTargetedForUpdate,isTargetedReplace],determineAllowedResourcesToDeleteFromTargets->[getTargetIncludingChildren],diff->[isTargetedReplace,providerChanged],calculateDependentReplacements->[loadResourceProvider],generateStepsFromDiff->[isTargetedReplace]] | generateSteps generates all the steps that need to be performed for the given resource event This function is called by the checkpoint manager to populate the checkpoint file with the new state object Check if the resource has a known identifier and if it has an ImportID look at that Issue check errors for a resource This is the main logic for the resource deletion operation. | Let's pull this earlier (above the `hasOld` case) so we can handle the check and the bookkeeping once. |
@@ -33,6 +33,11 @@ const statsEmitter = {
conference.on(JitsiConnectionQualityEvents.REMOTE_STATS_UPDATED,
(id, stats) => this._emitStatsUpdate(id, stats));
+
+ conference.on(
+ JitsiE2ePingEvents.E2E_RTT_CHANGED,
+ (participant, e2eRtt) => this._emitE2eRttUpdate(
+ participant, e2eRtt));
},
/**
| [No CFG could be retrieved] | Creates a new singleton that can be used to subscribe to stats updates for a user id. Unsubscribe to the user id stats. | Is it not possible to share the same callback? |
@@ -393,11 +393,6 @@ const actions = (state, action, data) => {
...state,
[StateProperty.KEYBOARD_ACTIVE_STATE]: !!data,
});
- case Action.TOGGLE_SUPPORTED_BROWSER:
- return /** @type {!State} */ ({
- ...state,
- [StateProperty.SUPPORTED_BROWSER_STATE]: !!data,
- });
case Action.TOGGLE_SHARE_MENU:
return /** @type {!State} */ ({
...state,
| [No CFG could be retrieved] | Returns the state of the action. The state of the action s . | It's not possible nor desirable to restore the unsupported browser layer after it's been removed. As such, it's unnecessary to toggle this state multiple times. |
@@ -318,6 +318,9 @@ class Qt(Package):
'-system-freetype',
'-I{0}/freetype2'.format(self.spec['freetype'].prefix.include)
])
+ if not MACOS_VERSION:
+ config_args.append('-fontconfig')
+
elif self.spec.variants['freetype'].value == 'qt':
config_args.append('-qt-freetype')
else:
| [Qt->[install->[make],url_for_version->[str,Version,up_to],common_config_args->[append,format,extend,satisfies],build->[make],setup_dependent_environment->[set],setup_dependent_package->[join_path,Executable],setup_environment->[set,format],patch->[repl->[group,get],str,filter_file,up_to],configure->[satisfies,append,Version,get,extend,str,format,configure,which,getcwd],depends_on,conflicts,version,patch,when,variant],macos_version] | Returns a list of common config arguments based on the current configuration. Add unknown options to config_args. | @sethrj in this case I think the `depends_on` for `fontconfig` should add `when=+freetype` |
@@ -243,7 +243,7 @@ class Consumer:
Consumer Management.
"""
- @remote(secret=secret)
+ @remote
def unregistered(self):
"""
Notification that the consumer had been unregistered.
| [Profile->[send->[Conduit,PulpBindings,cn,ConsumerX509Bundle,profile,send]],Conduit->[consumer_id->[cn,ConsumerX509Bundle],cancelled->[cancelled]],Synchronization->[registered->[cn,ConsumerX509Bundle]],Consumer->[unbind->[unbind,Conduit],bind->[bind,Conduit],unregistered->[ConsumerX509Bundle,Conduit]],PulpBindings->[__init__->[__init__]],ConsumerX509Bundle->[cn->[cn],__init__->[__init__]],RegistrationMonitor->[changed->[cn,ConsumerX509Bundle]],Content->[install->[install,Conduit],uninstall->[uninstall,Conduit],update->[Conduit,update]]] | Notification that the consumer was unregistered. | Security: no longer specifying the shared secret authentication. (repeated below). |
@@ -182,11 +182,13 @@ class Admin::ThemesController < Admin::AdminController
log_theme_change(original_json, @theme)
format.json { render json: @theme, status: :ok }
else
- format.json {
+ format.json do
+ error = @theme.errors.full_messages.join(", ").presence
+ error = I18n.t("themes.bad_color_scheme") if @theme.errors[:color_scheme].present?
+ error ||= I18n.t("themes.other_error")
- error = @theme.errors[:color_scheme] ? I18n.t("themes.bad_color_scheme") : I18n.t("themes.other_error")
render json: { errors: [ error ] }, status: :unprocessable_entity
- }
+ end
end
end
end
| [destroy->[destroy],log_theme_change->[log_theme_change]] | update a theme missing keys End of function. | Looks like we're missing a spec for the changes made here. |
@@ -301,7 +301,7 @@ class EmpireWrapper:
name_element = "Element2D2N"
elif num_nodes_element == 3:
name_element = "Element2D3N"
- elif num_nodes_element == 4: # TODO how to distinguish from Tetras?
+ elif num_nodes_element == 4: # TODO how to distinguish from Tetras? => use DOMAIN_SIZE of ModelPart
name_element = "Element2D4N"
else:
raise Exception("Wrong number of nodes for creating the element")
| [EmpireWrapper->[__getattr__->[getattr],__EmpireWrapper->[_convert_to_list->[range],Disconnect->[print,EMPIRE_API_Disconnect],ReceiveMesh->[pointer,_save_model_part,print,c_double,_set_mesh,EMPIRE_API_recvMesh,c_int,encode],SendDataField->[_get_data_field,EMPIRE_API_sendDataField,len,type],_check_size_of_variables->[str,Exception,sum],__init__->[_load_empire_library],ReceiveDataField->[NumberOfNodes,type,_set_data_field,sum,EMPIRE_API_recvDataField,_sizes_of_variables,c_int,encode,_check_size_of_variables],_get_mesh->[NumberOfNodes,append,GetNodes,NumberOfElements,len],_get_data_field->[GetSolutionStepValue,NumberOfNodes,sum,len,_sizes_of_variables,range,_check_size_of_variables],_set_mesh->[AddProperties,int,NumberOfConditions,NumberOfNodes,NumberOfElements,CreateNewNode,append,CreateNewElement,Properties,GetProperties,range,Exception],Connect->[print,encode,EMPIRE_API_Connect],SendArray->[EMPIRE_API_sendSignal_double,encode,len],ReceiveConvergenceSignal->[EMPIRE_API_recvConvergenceSignal],_sizes_of_variables->[TypeError,GetSolutionStepValue,append,len,iter,isinstance,next],SendMesh->[_get_mesh,_save_model_part,print,EMPIRE_API_sendMesh,len],_load_empire_library->[CDLL,hasattr,print,LoadLibrary,ImportError],_save_model_part->[ValueError,update],_set_data_field->[SetSolutionStepValue,NumberOfNodes,append,sum,len,range,Vector,Exception],ReceiveArray->[encode,EMPIRE_API_recvSignal_double,_convert_to_list]],__init__->[__EmpireWrapper],__setattr__->[setattr]],CheckForPreviousImport] | This function creates the nodes and elements from what was received from the EMPIRE. | not really .. what about quads on a 3d surface ? there are 4 nodes and DOMAIN_SIZE = 3. Also why will there be Tets on surface mesh ? |
@@ -1285,9 +1285,9 @@ func newMailService() {
}
MailService = &Mailer{
- QueueLength: sec.Key("SEND_BUFFER_LEN").MustInt(100),
- Name: sec.Key("NAME").MustString(AppName),
- EnableHTMLAlternative: sec.Key("ENABLE_HTML_ALTERNATIVE").MustBool(),
+ QueueLength: sec.Key("SEND_BUFFER_LEN").MustInt(100),
+ Name: sec.Key("NAME").MustString(AppName),
+ SendAsPlainText: sec.Key("SEND_AS_PLAIN_TEXT").MustBool(false),
Host: sec.Key("HOST").String(),
User: sec.Key("USER").String(),
| [DelLogger,KeysHash,MustCompilePOSIX,Warn,NewWithClaims,TempDir,Info,MapTo,New,Split,MustString,SetUseHTTPS,NewSection,NewXORMLogger,Getenv,Trim,IsFile,Dir,TrimRight,Now,Close,ReadFull,Append,LookPath,Create,Section,GetSection,ToLower,MkdirAll,BinVersion,MustDuration,Minutes,Decode,Keys,Fatal,HomeDir,Count,MustBool,Format,Clean,MustInt64,Trace,TrimSpace,Key,IsAbs,ParseAddress,Name,ParseUint,Sprintf,SetSecureFallbackHost,String,Parse,SetLevel,Abs,DiscardXORMLogger,EncodeToString,Getpid,Title,LastIndex,SetValue,MustInt,In,Strings,Error,Empty,SaveTo,SplitN,Join,Unix,NewLogger,Contains,SignedString,CurrentUsername,TrimSuffix,FormatInt,Replace,SetFallbackHost,WriteString] | newMailService returns a Mailer struct representing the global mailer. newRegisterMailService - creates a function to enable the Mail Service. | Don't remove old configs, deprecate them... |
@@ -89,13 +89,16 @@ public class CLI {
private final String httpsProxyTunnel;
private final String authorization;
+ /**
+ * @deprecated Use {@link #CLI(hudson.cli.CLIConnectionFactory)
+ */
+ @Deprecated
public CLI(URL jenkins) throws IOException, InterruptedException {
this(jenkins,null);
}
/**
- * @deprecated
- * Use {@link CLIConnectionFactory} to create {@link CLI}
+ * @deprecated Use {@link #CLI(hudson.cli.CLIConnectionFactory)
*/
@Deprecated
public CLI(URL jenkins, ExecutorService exec) throws IOException, InterruptedException {
| [CLI->[upgrade->[execute],connectViaCliPort->[close->[close]],computeVersion->[close],execute->[execute],loadKey->[loadKey],_main->[close,execute],flushURLConnection->[close],close->[close],hasCommand->[hasCommand],authenticate->[close,authenticate]]] | Creates a new instance of the CLI class. Connect to the Jenkins server using the specified URL. | It's wrong change. Idea was to use `CLIConnectionFactory.connect()` that calls package constructor while deprecated constructors calling them instead `CLIConnectionFactory`. |
@@ -97,7 +97,7 @@ public class UpdateAction implements UsersWsAction {
@Override
public void handle(Request request, Response response) throws Exception {
- userSession.checkLoggedIn().checkPermission(GlobalPermissions.SYSTEM_ADMIN);
+ userSession.checkLoggedIn().checkIsRoot();
UpdateRequest updateRequest = toWsRequest(request);
try (DbSession dbSession = dbClient.openSession(false)) {
doHandle(dbSession, toWsRequest(request));
| [UpdateAction->[doHandle->[setEmail,create,getName,getEmail,getLogin,emptyToNull,getScmAccounts,update,setScmAccounts,isEmpty,setName],getScmAccounts->[paramAsStrings,multiParam,hasParam],writeUser->[newHashSet,checkFound,write,selectByLogin,get,addAll,close,name,beginObject],toWsRequest->[build],define->[setExampleValue,getResource,setResponseExample],handle->[doHandle,getLogin,checkPermission,writeUser,toWsRequest,openSession]]] | Handles a request for a user. | description should be fixed, root is now required, not 'Administer System' permission... or is that the name we give to root? |
@@ -927,14 +927,11 @@ class InstallRequirement(object):
install_options = list(install_options) + \
self.options.get('install_options', [])
- if self.isolated:
- # https://github.com/python/mypy/issues/1174
- global_options = global_options + ["--no-user-cfg"] # type: ignore
-
with TempDirectory(kind="record") as temp_dir:
record_filename = os.path.join(temp_dir.path, 'install-record.txt')
install_args = self.get_install_args(
- global_options, record_filename, root, prefix, pycompile,
+ global_options, self.isolated, record_filename, root, prefix,
+ pycompile,
)
msg = 'Running setup.py install for %s' % (self.name,)
with open_spinner(msg) as spinner:
| [InstallRequirement->[from_path->[from_path],prepare_metadata->[_correct_build_location],_get_archive_name->[_clean_zip_name],install->[install_editable,prepend_root,move_wheel_files],uninstall->[check_if_exists],move_wheel_files->[move_wheel_files],_correct_build_location->[build_location],load_pyproject_toml->[load_pyproject_toml],archive->[_get_archive_name],ensure_has_source_dir->[build_location]]] | Installs a single object. Running setup. py install for self. | Do you need to be passing `self.isolated` to `get_install_args()`, or can you just access `self.isolated` from within that method? |
@@ -496,7 +496,8 @@ def experiment_clean(args):
home = str(Path.home())
local_dir = nni_config.get_config('experimentConfig').get('logDir')
if not local_dir:
- local_dir = os.path.join(home, 'nni', 'experiments', experiment_id)
+ local_dir = os.path.join(home, 'nni', 'experiments')
+ local_dir = os.path.join(local_dir, experiment_id)
local_clean(local_dir)
experiment_config = Experiments()
print_normal('removing metadata of experiment {0}'.format(experiment_id))
| [check_rest->[get_config_filename],get_config->[get_config_filename],parse_ids->[update_experiment],set_monitor->[update_experiment,get_experiment_status,show_experiment_info],webui_url->[get_config_filename,get_config],update_experiment->[update_experiment,get_experiment_status,get_experiment_time],check_experiment_id->[update_experiment],experiment_list->[update_experiment],stop_experiment->[update_experiment,parse_ids],trial_kill->[get_config_filename],experiment_status->[get_config_filename],log_stderr->[log_internal],log_trial->[get_config_filename],platform_clean->[hdfs_clean,update_experiment,remote_clean,get_platform_dir],get_experiment_port->[check_experiment_id],monitor_experiment->[set_monitor],trial_ls->[convert_time_stamp_to_date,get_config_filename],export_trials_data->[get_config_filename,get_config],log_internal->[get_config_filename],trial_codegen->[get_config_filename,check_experiment_id],show_experiment_info->[get_time_interval,convert_time_stamp_to_date,update_experiment],get_config_filename->[check_experiment_id],list_experiment->[convert_time_stamp_to_date,get_config_filename],experiment_clean->[hdfs_clean,get_config,local_clean,remote_clean],log_stdout->[log_internal]] | Clean up the experiment data. Remove unused metadata from local data and remove from experiment config. | default experiment parent dir has been changed to `nni-experiments` in this release. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.