patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -128,7 +128,7 @@ function poller_execute($queue) {
if (!$upd) {
logger("Couldn't update queue entry ".$queue["id"]." - skip this execution", LOGGER_DEBUG);
- q("COMMIT");
+ dba::commit();
return true;
}
| [poller_execute->[max_processes_reached],poller_too_much_workers->[proc_run],poller_run->[start_process,set_baseurl,max_processes_reached,maxload_reached,min_memory_reached],call_worker_if_idle->[proc_run,remove_inactive_processes],end_process] | Execute a queue item This function is called when a workerqueue is created. | What is the purpose of those commits without a transaction start? |
@@ -2591,7 +2591,8 @@ void Server::sendDetachedInventory(const std::string &name, session_t peer_id)
// Serialization & NetworkPacket isn't a love story
std::ostringstream os(std::ios_base::binary);
- inv_it->second->serialize(os);
+ inv_it->second->serialize(os, false);
+ inv_it->second->setModified(false);
std::string os_str = os.str();
pkt << static_cast<u16>(os_str.size()); // HACK: to keep compatibility with 5.0.0 clients
| [No CFG could be retrieved] | Send a detected inventory to a remote player. The function that sends the non - - - - - - - - - - - -. | change this to constref too, while you're at it |
@@ -3,7 +3,7 @@
function createXhr(method) {
// IE8 doesn't support PATCH method, but the ActiveX object does
/* global ActiveXObject */
- return (msie <= 8 && lowercase(method) === 'patch')
+ return ((msie <= 8 && lowercase(method) === 'patch') || isUndefined(window.XMLHttpRequest))
? new ActiveXObject('Microsoft.XMLHTTP')
: new window.XMLHttpRequest();
}
| [No CFG could be retrieved] | Provides a service that returns an object that can be used to perform a HTTP request with a Handle a nack request. | this change means that we should use activex even for non-ie browsers if window.xhr is not defined. that's not right |
@@ -998,7 +998,12 @@ public class ResteasyServerCommonProcessor {
throw new RuntimeException("More than one Application class: " + applications);
}
selectedAppClass = applicationClassInfo;
- // FIXME: yell if there's more than one
+ if (selectedAppClass.annotations().containsKey(ResteasyDotNames.CDI_INJECT)) {
+ throw new RuntimeException(
+ "Usage of '@Inject' is not allowed in 'javax.ws.rs.core.Application' classes. Offending class is '"
+ + selectedAppClass.name() + "'");
+ }
+
String applicationClass = applicationClassInfo.name().toString();
try {
Class<?> appClass = Thread.currentThread().getContextClassLoader().loadClass(applicationClass);
| [ResteasyServerCommonProcessor->[generateDefaultConstructors->[apply->[visit->[visit]]],scanMethods->[build],processPathInterfaceImplementors->[build],build->[transform->[transform]]]] | Get the allowed classes from the index view. | Not sure if this was intended to be removed? |
@@ -249,7 +249,7 @@ describes.sandboxed('UrlReplacements', {}, () => {
resolve();
});
});
- return installUrlReplacementsServiceForDoc(win.ampdoc)
+ return getServiceForDoc(win.ampdoc, 'url-replace')
.expandAsync('?url=SOURCE_URL')
.then(res => {
expect(res).to.contain('example.com');
| [No CFG could be retrieved] | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -. | Why not add a new `urlReplaceForDoc` function to `services.js`? It'll avoid the risk of typos in the service name. |
@@ -1066,6 +1066,18 @@ public class DefaultMuleContext implements MuleContext {
return errorTypeRepository;
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public MessageProcessorInterceptorManager getMessageProcessorInterceptorManager() {
+ return messageProcessorInterceptorManager;
+ }
+
+ public void setMessageProcessorInterceptorManager(MessageProcessorInterceptorManager messageProcessorInterceptorManager) {
+ this.messageProcessorInterceptorManager = messageProcessorInterceptorManager;
+ }
+
public void setErrorTypeRepository(ErrorTypeRepository errorTypeRepository) {
this.errorTypeRepository = errorTypeRepository;
}
| [DefaultMuleContext->[initialise->[initialise],registerListener->[registerListener],isInitialising->[isInitialising],getId->[getClusterId,getId,getConfiguration],isDisposed->[isDisposed],dispose->[dispose,stop],isStopping->[isStopping],getClusterNodeId->[getClusterNodeId],isStarting->[isStarting],disposeManagers->[dispose],setObjectStore->[checkLifecycleForPropertySet],isStopped->[isStopped],getUniqueIdString->[getClusterNodeId],getClusterId->[getClusterId],isDisposing->[isDisposing],addRegistry->[addRegistry],isInitialised->[isInitialised],fireNotification->[fireNotification],removeRegistry->[removeRegistry],isPrimaryPollingInstance->[isPrimaryPollingInstance],handleException->[handleException]]] | Sets the error type repository. | `Processor`? (we have a mixed of processor and message processor currently, put primary interface is `Processor`) |
@@ -109,7 +109,11 @@ class Predictor(Registrable):
)
loss = outputs["loss"]
- self._model.zero_grad()
+ # Zero gradients.
+ # NOTE: this is actually more efficient than calling `self._model.zero_grad()`
+ # because it avoids a read op when the gradients are first updated below.
+ for p in self._model.parameters():
+ p.grad = None
loss.backward()
for hook in hooks:
| [Predictor->[_batch_json_to_instances->[_json_to_instance],capture_model_internals->[add_output]]] | Gets the gradients of the loss with respect to the model inputs. Returns the gradients of the last nanomaton in the model and the outputs of the last. | Here, the parameters come from the model. In other places they come from the optimizer. Does that matter? |
@@ -152,7 +152,8 @@ class DocumentTranslationClient(object):
:rtype: List[FileFormat]
"""
- return self._client.document_translation.get_glossary_formats(**kwargs)
+ glossary_formats = self._client.document_translation.get_glossary_formats(**kwargs)
+ return FileFormat._from_generated_list(glossary_formats)
@distributed_trace
def get_supported_document_formats(self, **kwargs):
| [DocumentTranslationClient->[get_document_status->[get_document_status]]] | Get the list of supported glossary formats. | would it work to fold the helper methods into one like this? `return [FileFormat._from_generated(glossary_format) for glossary_format in glossary_formats.value]` |
@@ -33,12 +33,14 @@ class ConfigurationTypeField:
STRING = "String"
BOOLEAN = "Boolean"
SECRET = "Secret"
+ SECRET_TEXT = "SecretText"
PASSWORD = "Password"
CHOICES = [
(STRING, "Field is a String"),
(BOOLEAN, "Field is a Boolean"),
(SECRET, "Field is a Secret"),
(PASSWORD, "Field is a Password"),
+ (SECRET_TEXT, "Field is a Secret multiline"),
]
| [BasePlugin->[get_payment_gateway->[get_payment_config,get_supported_currencies],get_plugin_configuration->[_update_configuration_structure,_append_config_structure],save_plugin_configuration->[validate_plugin_configuration,_update_config_items],get_payment_gateway_for_checkout->[get_payment_gateway]]] | The base class for storing all methods available for any plugin. Handle received http request. | Maybe `SECRET_MULTILINE` would be a better name? Just wondering, `SECRET` and `SECRET_TEXT` sounds the same to me. |
@@ -72,6 +72,16 @@ public class LongRunningTaskMonitor implements Runnable {
}
}
- LOGGER.info("Active threads: {}; Long running threads: {}", activeThreadCount, longRunningThreadCount);
+ getLogger().info("Active threads: {}; Long running threads: {}", activeThreadCount, longRunningThreadCount);
+ }
+
+ @VisibleForTesting
+ protected Logger getLogger() {
+ return LOGGER;
+ }
+
+ @VisibleForTesting
+ protected ThreadDetails captureThreadDetails() {
+ return ThreadDetails.capture();
}
}
| [LongRunningTaskMonitor->[run->[getComponentType,debug,size,getName,getActiveThreads,getActiveMillis,getStackTrace,findAllProcessors,format,warn,info,capture,getIdentifier,reportEvent,getThreadName],getLogger]] | Checks if any of the active processors has a long running task. | Is it necessary to introduce testing for log statements? Testing the invocation of `EventReport.reportEvent()` seems sufficient since that is the primary purpose of the monitor. Avoiding evaluating of logging in the unit test removes the need for exposing these methods for testing purposes. |
@@ -220,6 +220,10 @@ void GcodeSuite::G28(const bool always_home_all) {
homeZ = always_home_all || parser.seen('Z'),
home_all = (!homeX && !homeY && !homeZ) || (homeX && homeY && homeZ);
+ #if ENABLED(BLTOUCH)
+ if (!HOMING_Z_WITH_PROBE || home_all || homeX || homeY) set_bltouch_deployed(false);
+ #endif
+
set_destination_from_current();
#if Z_HOME_DIR > 0 // If homing away from BED do Z first
| [No CFG could be retrieved] | Creates a new object from a single n - tuple. - - - - - - - - - - - - - - - - - -. | You can't use compiler directives like `defined`, `ENABLED`, etc. in an `if` statement. So `HOMING_Z_WITH_PROBE` won't work here. You can only use it in `#if`. |
@@ -18,9 +18,10 @@ class Shellcheck(TemplatedExternalTool):
default_version = "v0.7.1"
default_known_versions = [
- f"{default_version}|macos_arm64 |b080c3b659f7286e27004aa33759664d91e15ef2498ac709a452445d47e3ac23|1348272",
- f"{default_version}|macos_x86_64|b080c3b659f7286e27004aa33759664d91e15ef2498ac709a452445d47e3ac23|1348272",
- f"{default_version}|linux_x86_64|64f17152d96d7ec261ad3086ed42d18232fcb65148b44571b564d688269d36c8|1443836",
+ "v0.7.1|macos_arm64 |b080c3b659f7286e27004aa33759664d91e15ef2498ac709a452445d47e3ac23|1348272",
+ "v0.7.1|macos_x86_64|b080c3b659f7286e27004aa33759664d91e15ef2498ac709a452445d47e3ac23|1348272",
+ "v0.7.1|linux_arm64 |b50cc31509b354ab5bbfc160bc0967567ed98cd9308fd43f38551b36cccc4446|1432492",
+ "v0.7.1|linux_x86_64|64f17152d96d7ec261ad3086ed42d18232fcb65148b44571b564d688269d36c8|1443836",
]
default_url_template = (
| [Shellcheck->[skip->[cast],args->[tuple],config_request->[append,cast,ConfigFilesRequest,join],register_options->[register,super]]] | Register options for a specific version of a specific shell check. Registers the given options with the shellcheck. | Got rid of the interpolation in favor of hardcoding the version in each string, for the following reasons: 1. It actually makes the line shorter and more readable. 2. `default_known_versions` can in principle contain additional versions other than `default_version`, and this emphasizes that fact. 3. We don't want casual readers to think that just updating `default_version` is sufficient. This emphasizes that each binary must be updated. |
@@ -101,4 +101,12 @@ class FeatureManagement
def self.disallow_all_web_crawlers?
Figaro.env.disallow_all_web_crawlers == 'true'
end
+
+ def self.account_reset_wait_period_days
+ Figaro.env.account_reset_wait_period_days.to_i
+ end
+
+ def self.account_reset_enabled?
+ Figaro.env.account_reset_enabled != 'false' # if value not set it defaults to enabled
+ end
end
| [FeatureManagement->[prefill_otp_codes_allowed_in_production?->[telephony_disabled?],development_and_piv_cac_entry_enabled?->[identity_pki_disabled?,piv_cac_enabled?],development_and_telephony_disabled?->[telephony_disabled?],no_pii_mode?->[enable_identity_verification?]]] | Returns the first non - nil node id that can be used to disable all web craw. | This feels like a tuning variable rather than a feature flag. |
@@ -306,6 +306,12 @@ func (s *SKB) UnlockSecretKey(lctx LoginContext, passphrase string, tsec Triples
default:
err = BadKeyError{fmt.Sprintf("Can't unlock secret with protection type %d", int(s.Priv.Encryption))}
}
+
+ if key = s.decryptedSecret; key != nil {
+ // Key is already unlocked and unpacked, do not parse again.
+ return
+ }
+
if err == nil {
key, err = s.parseUnlocked(unlocked)
}
| [lksUnlock->[newLKSec],PromptAndUnlock->[unlockPrompt,UnlockNoPrompt],UnlockWithStoredSecret->[unlockSecretKeyFromSecretRetriever],UnlockSecretKey->[unverifiedPassphraseStream],HumanDescription->[GetPubKey],UnlockNoPrompt->[unlockSecretKeyFromSecretRetriever,UnlockSecretKey],unlockPrompt->[UnlockSecretKey,HumanDescription],GetPubKey->[ReadKey],VerboseDescription->[GetPubKey,VerboseDescription],pgpHumanDescription->[HumanDescription]] | UnlockSecretKey unlocks the secret key. It will return the decrypted secret key and any error parseUnlocked parses the unlock key. | Why did this move? |
@@ -178,16 +178,7 @@ func (o *InternalOIDCProvider) GetOIDCLoginURL(ctx context.Context) (string, str
if o == nil {
return "", "", errors.WithStack(errNotConfigured)
}
- // TODO(msteffen, adelelopez): We *think* this 'if' block can't run anymore:
- // (if o != nil, then o.Provider != nil)
- // remove if no one reports seeing this error in 1.11.0.
- if o.Provider == nil {
- var err error
- o.Provider, err = oidc.NewProvider(context.Background(), o.Issuer)
- if err != nil {
- return "", "", fmt.Errorf("provider could not be found: %v", err)
- }
- }
+
state := CryptoString(30)
nonce := CryptoString(30)
conf := oauth2.Config{
| [handleOIDCExchangeInternal->[syncGroupMembership,validateIDToken]] | GetOIDCLoginURL returns the URL to redirect to when the user is redirected to the. | I also don't think this can run anymore. |
@@ -231,8 +231,15 @@ check_for_uns_ep(struct dfuse_projection_info *fs_handle,
}
new_cont = true;
ie->ie_root = true;
+
+ dfs->dfs_ino = atomic_fetch_add_relaxed(&fs_handle->dpi_ino_next,
+ 1);
+ dfs->dfs_root = dfs->dfs_ino;
+ dfs->dfs_dfp = dfp;
}
+ ie->ie_stat.st_ino = dfs->dfs_ino;
+
rc = dfs_release(ie->ie_obj);
if (rc) {
DFUSE_TRA_ERROR(dfs, "dfs_release() failed: (%s)",
| [No CFG could be retrieved] | D_GOTO - Find the first matching DAOS object in the list of D finds the object in the hierarchy and if found finds it in the hierarchy and if not. | (style) line over 80 characters |
@@ -39,7 +39,7 @@ class AmpStickyAd extends AMP.BaseElement {
dev.warn(TAG, `TAG ${TAG} disabled`);
return;
}
-
+ toggle(this.element, true);
this.element.classList.add('-amp-sticky-ad-layout');
const children = this.getRealChildren();
user.assert((children.length == 1 && children[0].tagName == 'AMP-AD'),
| [No CFG could be retrieved] | Creates an instance of AmpStickyAd with a single amp - ad child. On viewport scroll check requirements for amp - stick - ad to display. | This is needed because the `NODISPLAY` layout? Why don't we change it to `CONTAINER`? |
@@ -28,7 +28,7 @@
<% end %>
-<div class="podcast-episode-container">
+<div class="podcast-episode-container" data-meta='{"podcastName":"<%= @podcast.title %>","episodeName":"<%= @episode.title %>","podcastImageUrl":"<%= "#{app_url(@podcast.image_url)}" %>"}'>
<div class="hero">
<% image_url = cl_image_path(@podcast.pattern_image_url || "https://i.imgur.com/fKYKgo4.png",
type: "fetch",
| [No CFG could be retrieved] | This is the main entry point for the calendar. It shows the top - level tags of Renders a series of content that can be found in the podcast s list of possible records. | Is it possible that this will cause a problem if `@episode.title` includes a `'`? Not sure I'm wrappimg my head around it the right way, but maybe we need to do something like creating a hash and then `.to_json` (I think this would mean the outer quotes should be double-quoted?) |
@@ -134,6 +134,10 @@ public class PoolingConnectionManagementStrategyTestCase extends AbstractMuleCon
@Test(expected = ConnectionException.class)
public void failDueToInvalidConnection() throws ConnectionException {
+ initStrategy();
+ connection1 = strategy.getConnectionHandler();
+ connection2 = strategy.getConnectionHandler();
+
when(connectionProvider.validate(anyVararg())).thenReturn(ConnectionValidationResult
.failure("Invalid username or password",
new Exception("401: UNAUTHORIZED")));
| [PoolingConnectionManagementStrategyTestCase->[failDueToNullConnectionValidationResult->[getConnection],failDueToInvalidConnection->[getConnection],release->[release],getConnection->[getConnection],connectionsDependenciesInjected->[getConnection],verifyThat->[verifyThat,getConnection]]] | Fail due to invalid connection. | why adding this here? This already happens on the before() |
@@ -2403,7 +2403,9 @@ class NewSemanticAnalyzer(NodeVisitor[None],
alias_node.normalized = rvalue.node.normalized
return True
- def analyze_lvalue(self, lval: Lvalue, nested: bool = False,
+ def analyze_lvalue(self,
+ lval: Lvalue,
+ nested: bool = False,
explicit_type: bool = False,
is_final: bool = False) -> None:
"""Analyze an lvalue or assignment target.
| [has_placeholder->[HasPlaceholders,accept],names_modified_in_lvalue->[names_modified_in_lvalue],NewSemanticAnalyzer->[analyze_comp_for->[analyze_lvalue],attribute_already_defined->[already_defined],name_not_defined->[is_incomplete_namespace,add_fixture_note,record_incomplete_ref,lookup_fully_qualified_or_none],check_classvar->[is_self_member_ref],visit_lambda_expr->[analyze_function_body],visit_for_stmt->[fail_invalid_classvar,is_classvar,store_declared_types,visit_block,visit_block_maybe,analyze_lvalue],add_module_symbol->[add_symbol],visit_import_all->[add_submodules_to_parent_modules,process_import_over_existing_name,correct_relative_import],analyze_namedtuple_classdef->[analyze_namedtuple_classdef,analyze_class_body_common],current_symbol_table->[is_func_scope],named_type->[lookup_qualified],accept->[accept],record_incomplete_ref->[defer],mark_incomplete->[defer,add_symbol],analyze_type_expr->[accept,tvar_scope_frame],anal_type->[found_incomplete_ref,accept,type_analyzer,track_incomplete_refs],named_type_or_none->[lookup_fully_qualified_or_none],is_class_scope->[is_func_scope],visit_with_stmt->[fail_invalid_classvar,is_classvar,store_declared_types,visit_block,analyze_lvalue],fail_blocker->[fail],should_wait_rhs->[should_wait_rhs],add_unknown_imported_symbol->[add_symbol],process_module_assignment->[process_module_assignment],expr_to_analyzed_type->[is_func_scope,accept,defer],analyze_try_stmt->[analyze_lvalue],add_symbol_table_node->[set_original_def],store_declared_types->[store_declared_types],process_placeholder->[defer],visit_block_maybe->[visit_block],lookup_type_node->[lookup_qualified],add_imported_symbol->[add_symbol_table_node],visit_while_stmt->[visit_block_maybe],name_already_defined->[already_defined],apply_class_plugin_hooks->[get_fullname->[get_fullname],get_fullname],analyze_tuple_or_list_lvalue->[analyze_lvalue],builtin_type->[lookup_fully_qualified],correct_relative_import->[correct_relative_import],lookup_qualified->[lookup],is_global_or_nonlocal->[is_func_scope],check_and_set_up_type_alias->[analyze_alias,can_be_type_alias,is_none_alias],is_valid_del_target->[is_valid_del_target],visit_if_stmt->[visit_block_maybe,visit_block],visit_import_from->[add_submodules_to_parent_modules],is_module_scope->[is_func_scope,is_class_scope],flatten_lvalues->[flatten_lvalues],add_local->[add_symbol],analyze_lvalue->[analyze_lvalue],current_symbol_kind->[is_func_scope,is_class_scope],check_classvar_in_signature->[check_classvar_in_signature]],is_same_symbol->[is_same_var_from_getattr],make_any_non_explicit->[accept],replace_implicit_first_type->[replace_implicit_first_type]] | Check if assignment creates a type alias and set it up as needed. A base class for a ckey - base type. Fixes the instance types of the n - ary type. Analyzes a node lvalue and checks if it is a missing type. | Please add this to the list of args in the docstring below. |
@@ -138,7 +138,7 @@ class RemoteLOCAL(RemoteBASE):
return os.path.getsize(fspath_py35(path_info))
def walk_files(self, path_info):
- for fname in walk_files(path_info, self.repo.dvcignore):
+ for fname in self.repo.tree.walk_files(path_info):
yield PathInfo(fname)
def get_file_checksum(self, path_info):
| [RemoteLOCAL->[pull->[_process],isfile->[isfile],unprotect->[exists,_unprotect_dir,isdir,_unprotect_file],push->[_process],_unprotect_file->[remove],remove->[exists,remove],symlink->[symlink],_create_unpacked_dir->[makedirs],_unprotect_dir->[_unprotect_file,walk_files],copy->[copy,remove],move->[isfile,move,makedirs],_changed_unpacked_dir->[get,_get_unpacked_dir_path_info],status->[cache_exists],hardlink->[hardlink,getsize],open->[open],reflink->[reflink],_path_info_changed->[exists,get],_update_unpacked_dir->[_path_info_changed,remove,_get_unpacked_dir_path_info],_process->[status,_get_plans],_upload->[makedirs],walk_files->[walk_files],getsize->[getsize],makedirs->[makedirs],isdir->[isdir]]] | Walk through files in path_info and yield PathInfo objects. | Need to assert that tree is a working tree or a clean working tree. We want to be sure that we never walk the git tree here. |
@@ -15,13 +15,17 @@ class Listing < ApplicationRecord
belongs_to :listing_category, inverse_of: :listings, foreign_key: :classified_listing_category_id
belongs_to :user
belongs_to :organization, optional: true
+ before_validation :modify_inputs
before_save :evaluate_markdown
before_create :create_slug
- before_validation :modify_inputs
after_commit :index_to_elasticsearch, on: %i[create update]
after_commit :remove_from_elasticsearch, on: [:destroy]
acts_as_taggable_on :tags
has_many :credits, as: :purchase, inverse_of: :purchase, dependent: :nullify
+ has_many :listing_endorsements,
+ -> { where(approved: true) },
+ foreign_key: :classified_listing_id,
+ inverse_of: :listing
validates :user_id, presence: true
validates :organization_id, presence: true, unless: :user_id?
| [Listing->[create_slug->[to_s,slug,delete],modify_inputs->[add,gsub,body_markdown,tag_list],validate_tags->[add,length],natural_expiration_date->[days],category->[slug],evaluate_markdown->[processed_html,evaluate_listings_markdown],restrict_markdown_input->[add,to_s,include?,count],include,belongs_to,delegate,before_save,validate,scope,validates,before_create,where,table_name,has_many,attr_accessor,before_validation,lambda,classified_listing_category_id,acts_as_taggable_on,after_commit]] | The listing class is a model that can be used to manage the listing of a user s Create a class - level attribute for a single listing category. | we should add the `dependent: :destroy` clause so that if the listing is destroyed, the endorsements go with it. I would also call this just `endorsements` |
@@ -204,7 +204,7 @@ export const <%= entityReactName %>Update = (props: I<%= entityReactName %>Updat
<%_ }) _%>
}
<%_ if (uniqueRelationFields.has('users')) { _%>
- entity.user = values.user;
+ entity.user = props.users.find(user => user.id === values.user.id);
<%_ } _%>
if (isNew) {
| [No CFG could be retrieved] | Create or update an object of type EntityWithKey - > Entity ID. | `entity.user = users.find(user => user.id.toString() === values.user.id.toString());` |
@@ -142,6 +142,7 @@ module Opus::Types::Test
describe 'declarations' do
describe '.checked' do
it 'raises RuntimeError with invalid level' do
+ skip
err = assert_raises(ArgumentError) do
mod = Module.new do
extend T::Sig
| [BuilderSyntaxTest->[map->[map],f,fn,override_me,map,implement_me,test_method]] | Test method for the object. | i think you can put `skip` in the `describe` to have fewer changes |
@@ -30,6 +30,7 @@ var (
storesPrefix = "pd/api/v1/stores"
storesLimitPrefix = "pd/api/v1/stores/limit"
storePrefix = "pd/api/v1/store/%v"
+ maxStoreLimit = float64(200)
)
// NewStoreCommand return a stores subcommand of rootCmd
| [Printf,Title,Flag,Join,Println,Sprintf,GetBool,StringSlice,Usage,Unmarshal,ToLower,String,GetStringSlice,AddCommand,BoolP,Atoi,Flags,ParseFloat] | NewStoreCommand returns a command that can be used to run a command in the store. NewDeleteStoreByAddrCommand returns a subcommand of delete store by its address. | Is 200 still too large? |
@@ -302,6 +302,9 @@ func (g *gregorHandler) BroadcastMessage(ctx context.Context, m gregor1.Message)
// Send message to local state machine
g.gregorCli.StateMachineConsumeMessage(m)
+ // Forward to electron or whichever UI is listening for gregor updates
+ g.forwardMessage(m)
+
// Handle the message
ibm := m.ToInBandMessage()
if ibm != nil {
| [handleInBandMessage->[Name,IsAlive,Errorf,Debug],Warning->[Warning],connectTLS->[pingLoop,Debug,Errorf],OnConnectError->[Debug],handleShowTrackerPopupCreate->[Debug],handleInBandMessageWithHandler->[Warning,Debug],handleShowTrackerPopupDismiss->[Debug,Dismiss],serverSync->[replayInBandMessages,Debug,Errorf],Shutdown->[Shutdown],OnConnect->[serverSync,Debug,Errorf],OnDisconnected->[Debug],pingLoop->[Warning],kbfsFavorites->[Errorf],PushHandler->[Errorf],auth->[Debug,Errorf],Errorf->[Errorf],replayInBandMessages->[Warning,Debug],BroadcastMessage->[Warning,Debug],handleOutOfBandMessage->[Debug,Errorf],Debug->[Debug],RekeyStatusFinish->[RekeyStatusFinish,IsAlive],ShouldRetry->[Debug],connectNoTLS->[Debug,pingLoop],OnDoCommandError->[Debug],ShouldRetryOnConnect->[Debug],DismissItem->[Debug,Errorf]] | BroadcastMessage broadcasts a message to all the clients in the system. | What about during a sync, do we want to also forward those? |
@@ -29,6 +29,7 @@ namespace System.ComponentModel.DataAnnotations
}
}
+ [RequiresUnreferencedCode("The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")]
public override PropertyDescriptorCollection GetProperties(Attribute[] attributes)
{
return GetPropertiesWithMetadata(base.GetProperties(attributes));
| [AssociatedMetadataTypeTypeDescriptor->[AttributeCollection->[FromExisting,ToArray,GetAttributes],TypeDescriptorCache->[Type->[GetCustomAttribute,MetadataClassType,TryAdd,TryGetValue],GetAssociatedMetadata->[Public,Field,TryGetValue,FirstOrDefault,GetCustomAttributes,Static,Instance,Array,TryAdd,Property],CheckAssociatedMetadataType->[Join,Format,Ordinal,Name,FullName,Select,ExceptWith,IsSubsetOf,ToArray,Concat,AssociatedMetadataTypeTypeDescriptor_MetadataTypeContainsUnknownProperties],ValidateMetadataType->[ContainsKey,TryAdd,CheckAssociatedMetadataType]],PropertyDescriptorCollection->[GetPropertiesWithMetadata,Add,Name,GetAssociatedMetadata,GetProperties,ToArray,Length],GetAssociatedMetadataType,ValidateMetadataType]] | Get properties of this class including those with the specified attributes. | Don't we also need an entry on the ILLink.LibraryBuild.xml for every RequiresUnreferencedCode that we add? |
@@ -58,12 +58,16 @@ public class TableScanStatsRule
Constraint<ColumnHandle> constraint = new Constraint<>(node.getCurrentConstraint());
TableStatistics tableStatistics = metadata.getTableStatistics(session, node.getTable(), constraint);
+ verify(tableStatistics != null, "tableStatistics is null for %s", node);
Map<Symbol, SymbolStatsEstimate> outputSymbolStats = new HashMap<>();
for (Map.Entry<Symbol, ColumnHandle> entry : node.getAssignments().entrySet()) {
Symbol symbol = entry.getKey();
Optional<ColumnStatistics> columnStatistics = Optional.ofNullable(tableStatistics.getColumnStatistics().get(entry.getValue()));
- outputSymbolStats.put(symbol, columnStatistics.map(statistics -> toSymbolStatistics(tableStatistics, statistics)).orElse(SymbolStatsEstimate.unknown()));
+ SymbolStatsEstimate symbolStatistics = columnStatistics
+ .map(statistics -> toSymbolStatistics(tableStatistics, statistics, types.get(symbol)))
+ .orElse(SymbolStatsEstimate.unknown());
+ outputSymbolStats.put(symbol, symbolStatistics);
}
return Optional.of(PlanNodeStatsEstimate.builder()
| [TableScanStatsRule->[doCalculate->[getValue,getTable,of,ofNullable,unknown,build,getKey,get,orElse,put,getCurrentConstraint,getTableStatistics,entrySet],toSymbolStatistics->[getValue,setDistinctValuesCount,setHighValue,build,setLowValue,getMin,setNullsFraction,ifPresent,builder,setAverageRowSize,getMax],tableScan,requireNonNull]] | This method is overridden to provide the necessary statistics for a table scan node. | extract to reformatting commit? |
@@ -895,6 +895,15 @@ namespace Dynamo.Graph.Nodes
ArgumentLacing = LacingStrategy.Disabled;
RaisesModificationEvents = true;
+
+ InPorts.CollectionChanged += PortsCollectionChanged;
+ OutPorts.CollectionChanged += PortsCollectionChanged;
+ }
+
+ private void PortsCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
+ {
+ ValidateConnections();
+ ConfigureSnapEdges(sender == InPorts?InPorts : OutPorts);
}
/// <summary>
| [NodeModel->[BuildAst->[BuildOutputAst],DeserializeCore->[MarkDownStreamNodesAsModified],ComputeUpstreamOnDownstreamNodes->[ComputeUpstreamCache],RegisterOutputPorts->[OnNodeModified],OnPortConnected->[ValidateConnections,OnConnectorAdded,ConnectOutput,OnNodeModified,ConnectInput],Warning->[Warning],UpdateValueCore->[UpdateValueCore],Deselect->[ValidateConnections],ClearRuntimeError->[ClearTooltipText],RegisterAllPorts->[RegisterInputPorts,ValidateConnections,RegisterOutputPorts],SerializeCore->[OnSave],GetDownstreamNodes->[GetDownstreamNodes],RegisterInputPorts->[OnNodeModified],Error->[Error],OnPortDisconnected->[DisconnectOutput,DisconnectInput,ValidateConnections,OnNodeModified],OnPortPropertyChanged->[OnNodeModified],PrintExpression->[TryGetInput,PrintExpression]]] | Gets the downstream nodes for the given node. The name of the element that is not known to be dead. | sender will be a collection? not the modified element? |
@@ -115,8 +115,8 @@ namespace levin
the reserve call so a strand is not used. Investigate if there is lots
of waiting in here. */
- p2p.foreach_connection([&outs, min_blockchain_height] (detail::p2p_context& context) {
- if (!context.m_is_income && context.m_remote_blockchain_height >= min_blockchain_height)
+ p2p.foreach_connection([&outs, min_blockchain_height, min_score] (detail::p2p_context& context) {
+ if (!context.m_is_income && context.m_remote_blockchain_height >= min_blockchain_height && context.m_score >= min_score)
outs.emplace_back(context.m_connection_id);
return true;
});
| [No CFG could be retrieved] | This function returns a randomized duration from 0 to 3 seconds. calculate the varint data size. | Since the value is fixed for all cases, seems just as easy to make this a constant at the top of the file. |
@@ -283,7 +283,9 @@ int MDNSResponder::queryService(char *service, char *proto) {
#ifdef MDNS_DEBUG_TX
Serial.printf("queryService %s %s\n", service, proto);
#endif
-
+
+ _initVar();
+
if (_query != 0) {
os_free(_query);
_query = 0;
| [enableArduino->[addService,addServiceTxt],_reply->[_getServiceTxt,_getServiceTxtLen],_parsePacket->[_getAnswerFromIdx,_getNumAnswers,_getServicePort]] | Query a service by name and protocol. Private methods - Send the type of a node and return the number of answers. | This will cause a mem leak on _query |
@@ -8,13 +8,14 @@ package io.opentelemetry.javaagent.extension;
import io.opentelemetry.instrumentation.api.cache.Cache;
import io.opentelemetry.instrumentation.api.config.Config;
import io.opentelemetry.instrumentation.api.field.VirtualField;
+import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk;
import java.lang.instrument.Instrumentation;
import net.bytebuddy.agent.builder.AgentBuilder;
/**
* {@link AgentListener} can be used to execute code before/after Java agent installation, for
- * example to install any implementation providers that are used by instrumentations. For instance,
- * this project uses this SPI to install OpenTelemetry SDK.
+ * example to install any implementation providers that are used by instrumentations. Can also be
+ * used to obtain the {@link AutoConfiguredOpenTelemetrySdk}.
*
* <p>This is a service provider interface that requires implementations to be registered in a
* provider-configuration file stored in the {@code META-INF/services} resource directory.
| [No CFG could be retrieved] | The AgentListener interface is used to run code before or after a Java agent installation. | I considered deprecating this but `beforeAgent(AutoConfiguredOpenTelemetrySdk autoConfiguredOpenTelemetrySdk)` doesn't get called when there is a noop OpenTelemetry installed. If we think its ok to not have any agent listener hooks when noop is used, then I can go ahead and deprecate this because folks can access `AutoConfiguredOpenTelemetrySdk#getConfig()`. |
@@ -2,6 +2,7 @@ class HttpStatusHelper
ERROR_CODE = {
"200" => "",
"201" => "Created",
+ "304" => "Not Modified",
"403" => "Forbidden",
"404" => "Not Found",
"405" => "Method Not Allowed",
| [No CFG could be retrieved] | This class is used to generate a list of HTTP status codes that can be used to determine. | Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. |
@@ -145,6 +145,7 @@ class User < ApplicationRecord
validate :conditionally_validate_summary
validate :validate_mastodon_url
validate :validate_feed_url, if: :feed_url_changed?
+ validate :non_banished_username, :username_changed?
validate :unique_including_orgs_and_podcasts, if: :username_changed?
scope :dev_account, -> { find_by(id: SiteConfig.staff_user_id) }
| [User->[check_for_username_change->[path],send_welcome_notification->[send_welcome_notification],blocked_by?->[blocking?],blocking?->[blocking?],conditionally_resave_articles->[banned],resave_articles->[path]]] | Config values for a theme are valid Creates a new unique index. | In the end I decided not to merge this with `unique_including_orgs_and_podcasts` into a `validate_username` method, but I don't feel strongly either way, so if people would prefer a single method I'll change it. |
@@ -434,7 +434,7 @@ WRITE8_MEMBER ( geneve_state::cruwrite )
READ8_MEMBER( geneve_state::cruread )
{
uint8_t value = 0;
- int addroff = offset << 4;
+ uint16_t addroff = offset << 1;
// Single step
// 13c0 - 13fe: 0001 0011 11xx xxx0
| [No CFG could be retrieved] | read - write of a single - bit register in the system. Reads the given 16 - bit value from the System. in. out. | Since we are using the software addressing, the <<1 is wrong here. |
@@ -449,7 +449,7 @@ def test_repro_when_new_outs_added_does_not_exist(tmp_dir, dvc):
{
"stages": {
"run-copy": {
- "cmd": "python copy {} {}".format("foo", "foobar"),
+ "cmd": "python copy.py {} {}".format("foo", "foobar"),
"deps": ["foo"],
"outs": ["foobar", "bar"],
}
| [test_cyclic_graph_error->[raises,reproduce,parse_yaml,read,gen,run_copy,open,dump_yaml],test_non_existing_stage_name->[freeze,raises,gen,run_copy,main],MultiStageRun->[_run->[pop,get,run]],test_repro_when_new_deps_is_moved->[reproduce,_load,format,Dvcfile,run,gen,dump_yaml,move],test_repro_when_new_outs_added_does_not_exist->[reproduce,format,gen,raises,dump_yaml],test_repro_when_lockfile_gets_deleted->[reproduce,unlink,format,gen,exists,dump_yaml],test_repro_when_new_deps_added_does_not_exist->[reproduce,format,gen,raises,dump_yaml],test_repro_when_new_deps_is_added_in_dvcfile->[reproduce,Dvcfile,format,run,gen,dump_yaml,_load],test_repro_when_new_out_overlaps_others_stage_outs->[reproduce,format,gen,add,raises,dump_yaml],test_downstream->[reproduce,len,set,isinstance,add,main],test_repro_when_new_outs_is_added_in_dvcfile->[reproduce,Dvcfile,format,run,gen,dump_yaml,_load],test_repro_multiple_params->[,reproduce,deepcopy,split_params_deps,lsplit,len,set,isinstance,run,dump,load,_load],test_repro_when_cmd_changes->[assert_called_once_with,split,status,reproduce,PipelineFile,patch,join,gen,run_copy],format,dedent] | Test if a new output does not exist in the tmp_dir. | Snakeoil tests, don't know how this was even passing. |
@@ -134,10 +134,11 @@ func (b *HybridBotanist) generateCoreAddonsChart() (*chartrenderer.RenderedChart
"cluster-autoscaler": clusterAutoscaler,
"podsecuritypolicies": podsecuritypolicies,
"coredns": coreDNS,
- "kube-proxy": kubeProxy,
- "vpn-shoot": vpnShoot,
- "calico": calico,
- "metrics-server": metricsServer,
+ "csi-" + b.ShootCloudBotanist.GetCloudProviderName(): csiPlugin,
+ "kube-proxy": kubeProxy,
+ "vpn-shoot": vpnShoot,
+ "calico": calico,
+ "metrics-server": metricsServer,
"monitoring": map[string]interface{}{
"node-exporter": nodeExporter,
"blackbox-exporter": blackboxExporter,
| [generateCoreAddonsChart->[CreateSecret,Join,GetNodeNetwork,GetServiceNetwork,GetPodNetwork,Render,Enabled,ComputeClusterIP,ShootVersion,InjectImages],generateStorageClassesChart->[GenerateStorageClassesConfig,Render,Join],generateOptionalAddonsChart->[GenerateKubeLegoConfig,NginxIngressEnabled,Join,GenerateKubernetesDashboardConfig,GenerateKube2IAMConfig,MergeMaps,GenerateNginxIngressConfig,Render,ListDeployments,DeleteDeployment,IsNotFound,ShootVersion,InjectImages]] | generateCoreAddonsChart generates the core addons chart Injects images into the metrics - server secret. kubeImageName is the name of the image to use for the kube - proxy sh Check if the certificate management feature is enabled. | For better readability: please use `fmt.Sprintf()` |
@@ -2113,6 +2113,12 @@ public final class OzoneManager extends ServiceRuntimeInfoImpl
if (!accessAuthorizer.checkAccess(obj, context)) {
if (throwIfPermissionDenied) {
+ String volumeName = obj.getVolumeName() != null?
+ "Volume:" + obj.getVolumeName() + " ": "";
+ String bucketName = obj.getBucketName() != null?
+ "Bucket:" + obj.getBucketName() + " ": "";
+ String keyName = obj.getKeyName() != null?
+ "Key:" + obj.getKeyName() : "";
LOG.warn("User {} doesn't have {} permission to access {} /{}/{}/{}",
context.getClientUgi().getUserName(), context.getAclRights(),
obj.getResourceType(), obj.getVolumeName(), obj.getBucketName(),
| [OzoneManager->[getScmBlockClient->[getScmBlockClient],completeMultipartUpload->[buildAuditMessageForFailure,buildAuditMessageForSuccess,completeMultipartUpload],getVolumeInfo->[checkAcls,getVolumeInfo],startTrashEmptier->[start],loginOMUserIfSecurityEnabled->[loginOMUser],join->[join],hasAcls->[checkAcls],allocateBlock->[checkAcls,allocateBlock],deleteBucket->[checkAcls,deleteBucket],initiateMultipartUpload->[buildAuditMessageForFailure,buildAuditMessageForSuccess,initiateMultipartUpload],abortMultipartUpload->[buildAuditMessageForSuccess,abortMultipartUpload,buildAuditMessageForFailure],getAcl->[getAcl,getResourceType,auditAcl,checkAcls],initFSOLayout->[getOMMetadataLayout,getEnableFileSystemPaths],renameKey->[checkAcls,renameKey],deleteKey->[deleteKey,checkAcls],renewDelegationToken->[isAllowedDelegationTokenOp],getRemoteUser->[getRemoteUser],createDirectory->[buildAuditMessageForSuccess,buildAuditMessageForFailure,createDirectory],resolveBucketLink->[resolveBucketLink,getVolumeOwner,getBucketInfo,checkAcls,getRemoteUser],commitMultipartUploadPart->[buildAuditMessageForSuccess,commitMultipartUploadPart,buildAuditMessageForFailure],openKey->[checkAcls,openKey],restart->[setInstanceVariablesFromConf,instantiateServices,ScheduleOMMetricsWriteTask,start,getMetricsStorageFile,buildRpcServerStartMessage,getRpcServer],listVolumeByUser->[hasAcls,getRemoteUser],setOwner->[checkAcls,setOwner],start->[start,getMetricsStorageFile,ScheduleOMMetricsWriteTask,buildRpcServerStartMessage],getDelegationToken->[isAllowedDelegationTokenOp,getRemoteUser],listStatus->[getClientAddress,buildAuditMessageForFailure,listStatus,buildAuditMessageForSuccess,checkAcls,getResourceType],listMultipartUploads->[buildAuditMessageForSuccess,listMultipartUploads,buildAuditMessageForFailure],checkAcls->[checkAcls,getRemoteUser],getBucketInfo->[checkAcls,getBucketInfo],listParts->[buildAuditMessageForFailure,buildAuditMessageForSuccess,listParts],commitKey->[checkAcls,commitKey],getFileStatus->[buildAuditMessageForSuccess,getFileStatus,buildAuditMessageForFailure,getClientAddress],validatesBucketLayoutMismatches->[getOMMetadataLayout],getS3Secret->[getS3Secret,getRemoteUser],createFile->[buildAuditMessageForSuccess,createFile,buildAuditMessageForFailure],getObjectIdFromTxId->[getObjectIdFromTxId],omInit->[loginOMUserIfSecurityEnabled],removeAcl->[removeAcl,getResourceType,auditAcl,checkAcls],isAdmin->[isAdmin],lookupFile->[getClientAddress,lookupFile,buildAuditMessageForFailure,buildAuditMessageForSuccess,checkAcls],setBucketProperty->[setBucketProperty,checkAcls],stop->[stop,stopSecretManager],getVolumeOwner->[getVolumeOwner],listAllVolumes->[checkAcls],startJVMPauseMonitor->[start],getScmContainerClient->[getScmContainerClient],createOm->[OzoneManager],listTrash->[listTrash,checkAcls],createVolume->[createVolume],bootstrap->[bootstrap],startSecretManagerIfNecessary->[startSecretManager,isOzoneSecurityEnabled],listBuckets->[checkAcls,listBuckets],stopServices->[stop,stopSecretManager],createBucket->[createBucket,checkAcls],auditAcl->[buildAuditMessageForSuccess,buildAuditMessageForFailure],replaceOMDBWithCheckpoint->[createFile],checkVolumeAccess->[checkVolumeAccess,checkAcls],listKeys->[listKeys,checkAcls],setAcl->[getResourceType,auditAcl,checkAcls,setAcl],reloadOMState->[start,instantiateServices,startTrashEmptier,saveOmMetrics],deleteVolume->[checkAcls,deleteVolume],getServiceInfo->[getServiceList],lookupKey->[lookupKey,checkAcls],installCheckpoint->[start,startTrashEmptier,installCheckpoint],addAcl->[getResourceType,auditAcl,checkAcls,addAcl]]] | Checks if the object has the required ACL rights. | Minor NIT: Do we need similar thing in logging? As now log will show /vol// when bucket and key is null. |
@@ -257,6 +257,15 @@ define([
}
//>>includeEnd('debug');
+ if (Label.enableRightToLeftDetection) {
+ if (this._originalValue === value) {
+ value = this._text;
+ return;
+ }
+ this._originalValue = value;
+ value = reverseRtl(value);
+ }
+
if (this._text !== value) {
this._text = value;
rebindAllGlyphs(this);
| [No CFG could be retrieved] | Replies or sets the heightReference property of this label. Creates a new label with the specified fill color. | I just noticed that we are mutating the value supplied by the user so that the getter is actually the reversed text. I think this is undesired behavior. With few exceptions, a simple setter/getter should always return the value assigned to it. I can submit a change to prevent this, but if you feel strongly about it, please let me know. |
@@ -239,11 +239,15 @@ func (c *Memcached) Store(ctx context.Context, keys []string, bufs [][]byte) {
// Stop does nothing.
func (c *Memcached) Stop() {
- if c.inputCh == nil {
+ if c.quit == nil {
return
}
- close(c.inputCh)
+ select {
+ case <-c.quit:
+ default:
+ close(c.quit)
+ }
c.wg.Wait()
}
| [fetch->[Int,Finish,Error,GetMulti,New,CollectedRequest,Log,LogFields],Store->[Error,Seconds,CollectedRequest,Log,Set],Stop->[Wait],RegisterFlagsWithPrefix->[DurationVar,IntVar],fetchKeysBatched->[Min],After->[Seconds,WithLabelValues,Observe,Since],Fetch->[fetch,CollectedRequest,fetchKeysBatched],fetch,Write,Done,New64a,Sum,NewHistogramVec,ExponentialBuckets,With,EncodeToString,Add] | Stop stops the memcache process. | Can you explain this bit please? |
@@ -46,6 +46,7 @@ const TAG_ = 'amp-iframe';
/** @const {!Array<string>} */
const ATTRIBUTES_TO_PROPAGATE = [
+ 'title',
'allowfullscreen',
'allowpaymentrequest',
'allowtransparency',
| [No CFG could be retrieved] | Imports a single - element element and its attributes. The AMP iframe class. | Nit: The rest of these appear to be alphabetised. Might want to keep the pattern up. |
@@ -224,9 +224,10 @@ func (*dryRunRegistryPinger) ping(registry string) error {
// cluster; otherwise, the pruning algorithm might result in incorrect
// calculations and premature pruning.
//
-// The ImageDeleter performs the following logic: remove any image containing the
-// annotation openshift.io/image.managed=true that was created at least *n*
-// minutes ago and is *not* currently referenced by:
+// The ImageDeleter performs the following logic:
+//
+// remove any image was created at least *n* minutes ago and is *not* currently
+// referenced by:
//
// - any pod created less than *n* minutes ago
// - any image stream created less than *n* minutes ago
| [DeleteManifest->[Sprintf,V,Infof],Prune->[Infof,NewAggregate,ping,Nodes,determineRegistry,V,Errorf],ping->[Infof,Sprintf,Close,V,Errorf,Get],determineRegistry->[ParseDockerImageReference,Errorf],DeleteLayerLink->[Sprintf,V,Infof],DeleteImageStream->[UpdateStatus,V,ImageStreams,Infof],DeleteBlob->[Sprintf,V,Infof],DeleteImage->[V,Delete,Infof],UniqueName,ParseImageStreamImageName,EdgeKinds,ParseDockerImageReference,EnsureReplicationControllerNode,EnsureDeploymentConfigNode,NewRequest,Now,EnsureImageStreamNode,Warningf,Close,NewQuantity,Add,DeleteImage,Has,FindImage,GetInputReference,Cmp,New,DeleteLayerLink,EnsurePodNode,To,EnsureBuildConfigNode,EnsureImageComponentConfigNode,NewString,Errorf,Sub,DeleteBlob,EnsureImageNode,ID,Edge,Infof,Do,V,NewDecoder,Describe,EnsureImageComponentLayerNode,EnsureBuildNode,DeleteManifest,AddEdge,Sprintf,From,Nodes,Decode,Kind,List,Insert,DeleteImageStream,Subgraph] | NewPruner creates a Pruner that removes images from any image stream that is youn if options. KeepTagRevisions is not nil it will set the value to true if the. | *nit*: that was |
@@ -413,6 +413,12 @@ public class KsqlRestConfig extends AbstractConfig {
SSL_KEYSTORE_PASSWORD_DEFAULT,
Importance.HIGH,
SslConfigs.SSL_KEYSTORE_PASSWORD_DOC
+ ).define(
+ SslConfigs.SSL_KEY_PASSWORD_CONFIG,
+ Type.PASSWORD,
+ SSL_KEY_PASSWORD_DEFAULT,
+ Importance.HIGH,
+ SslConfigs.SSL_KEY_PASSWORD_CONFIG
).define(
SSL_KEYSTORE_TYPE_CONFIG,
Type.STRING,
| [KsqlRestConfig->[getKsqlConfigProperties->[getOriginals],getPropertiesWithOverrides->[getOriginals],getClientAuth->[getClientAuth],getCommandConsumerProperties->[getPropertiesWithOverrides],getInterNodeListener->[getInterNodeListener],getClientAuthInternal->[getClientAuth],getCommandProducerProperties->[getPropertiesWithOverrides]]] | This function defines the configuration values for the given object. This function defines the default configuration values for all SSL keys. | did you mean to pass in the `DOC` here? |
@@ -640,7 +640,7 @@ RtpsUdpDataLink::associated(const RepoId& local_id, const RepoId& remote_id,
RtpsWriter_rch writer = rw->second;
g.release();
writer->update_max_sn(remote_id, max_sn);
- writer->add_reader(make_rch<ReaderInfo>(remote_id, remote_durable));
+ writer->add_reader(make_rch<ReaderInfo>(remote_id, remote_durable, remote_context));
}
invoke_on_start_callbacks(local_id, remote_id, true);
} else if (conv.isReader()) {
| [No CFG could be retrieved] | Add locators to the list of locators to be added. - - - - - - - - - - - - - - - - - -. | Can we just rename this variable to participant_flags since that makes it clear what we're dealing with? |
@@ -1367,10 +1367,10 @@ namespace System.Windows.Forms.PropertyGridInternal
return;
}
- Debug.WriteLineIf(s_gridViewDebugPaint.TraceVerbose, "Drawing label for property " + gridEntry.PropertyLabel);
+ Debug.WriteLineIf(s_gridViewDebugPaint.TraceVerbose, $"Drawing label for property {gridEntry.PropertyLabel}");
- Point newOrigin = new Point(rect.X, rect.Y);
- Rectangle cr = Rectangle.Intersect(rect, clipRect);
+ var newOrigin = new Point(rect.X, rect.Y);
+ var cr = Rectangle.Intersect(rect, clipRect);
if (cr.IsEmpty)
{
| [PropertyGridView->[CountPropsFromOutline->[CountPropsFromOutline],EnsurePendingChangesCommitted->[CloseDropDown],OnFontChanged->[Font,OnFontChanged],ShowInvalidMessage->[GetService,OnEscape,SelectGridEntry,SetCommitError],GridEntryCollection->[AddGridEntryEvents],ScrollRows->[IsScrollValueValid,GetRowFromGridEntry,CommonEditorHide],Refresh->[OnEscape,Refresh,CommonEditorHide,InvalidateRows,GetInPropertySet,RecalculateProps,GetFlag,GetOutlineIconSize,ClearGridEntryEvents],UnfocusSelection->[Commit],DialogResult->[GetService,Size],OnBtnClick->[GetFlag],RecursivelyExpand->[RecursivelyExpand],SelectRow->[Refresh,Font,CommonEditorHide,Size,GetFlag,CommonEditorUse,InvalidateRow,CloseDropDown],OnRecreateChildren->[ClearGridEntryEvents,AddGridEntryEvents,CountPropsFromOutline],IsInputKey->[IsInputKey],MoveSplitterTo->[GetOutlineIconSize],SetConstants->[GetScrollOffset],OnVisibleChanged->[Font,OnVisibleChanged],OnKeyPress->[FilterKeyPress,WillFilterKeyPress],OnKeyDown->[GetTestingInfo,ProcessEnumUpAndDown,OnKeyDown,GetScrollOffset,MoveSplitterTo,F4Selection,DoPasteCommand,DoCopyCommand],OnGridEntryLabelDoubleClick->[GetRowFromGridEntry,DoubleClickRow],Dispose->[Dispose],IsIPELabelLong->[GetIPELabelLength],WndProc->[Commit,WmNotify,GetInPropertySet,GetRowFromGridEntry,WndProc],SetScrollOffset->[IsScrollValueValid,GetRowFromGridEntry],Commit->[SelectEdit,SetCommitError,GetInPropertySet],GetInPropertySet->[GetFlag],IHelpService->[GetService],DoCutCommand->[DoCopyCommand],OnMouseLeave->[GetFlag,OnMouseLeave],OnHandleCreated->[OnHandleCreated],PopupDialog->[DropDownControl,CloseDropDown,GetCurrentValueIndex],OnEscape->[CloseDropDown],OnMove->[CloseDropDown],DrawLabel->[GetIPELabelLength,IsIPELabelLong,GetIPELabelIndent,AdjustOrigin],ClearProps->[ClearGridEntryEvents],OnGridEntryValueDoubleClick->[GetRowFromGridEntry,DoubleClickRow],OnSysColorChange->[Color],DumpPropsToConsole->[DumpPropsToConsole],OnResize->[GetScrollOffset,LayoutWindow,OnFontChanged,CommonEditorHide],RescaleConstantsForDpi->[RescaleConstantsForDpi],GetIPELabelLength->[GetIPELabelIndent],OnMouseWheel->[GetScrollOffset,GetCurrentValueIndex],OnEditLostFocus->[GetInPropertySet],InvalidateRows->[InvalidateRows],OnEditMouseDown->[DoubleClickRow],OnMouseMove->[OnMouseMove,GetFlag,MoveSplitterTo],ShowFormatExceptionMessage->[GetService,OnEscape,SelectGridEntry,SetCommitError],UpdateUIBasedOnFont->[SetFlag,Size,GetFlag,LayoutWindow],GetTotalWidth->[GetLabelWidth,GetSplitterWidth],WmNotify->[PositionTooltip],DrawValueEntry->[AdjustOrigin],FilterKeyPress->[FilterKeyPress],OnHandleDestroyed->[OnHandleDestroyed,Dispose],DropDownControl->[GetFlag],SetCommitError->[SetCommitError,CancelSplitterMove],OnMouseUp->[CancelSplitterMove],OnEditKeyPress->[FilterReadOnlyEditKeyPress],SetExpand->[SelectGridEntry,GetScrollOffset,RecalculateProps,SetConstants,GetRowFromGridEntry],UpdateHelpAttributes->[UpdateHelpAttributes],TabSelection->[SelectEdit],OnF4->[F4Selection],ResetOutline->[ResetOutline],SelectGridEntry->[GetScrollOffset,GetRowFromGridEntry,SelectGridEntry],OnMouseDown->[MoveSplitterTo],DropDownDone->[CloseDropDown],CommitText->[CommitValue,SetCommitError],CommitValue->[CommitValue,SelectGridEntry,SetFlag,ClearGridEntryEvents,SetCommitError,CloseDropDown],WantsTab->[WantsTab],OnListKeyDown->[OnListClick],OnListClick->[CommonEditorHide],OnScroll->[IsScrollValueValid,GetRowFromGridEntry],CommonEditorHide->[CloseDropDown,CommonEditorHide],ReverseFocus->[SelectGridEntry],InvalidateGridEntryValue->[GetRowFromGridEntry],UpdateResetCommand->[GetService,Reset],OnGotFocus->[GetRowFromGridEntry,OnGotFocus,GetInPropertySet],OnEditGotFocus->[GetRowFromGridEntry,InvalidateRow],RecalculateProps->[ClearGridEntryEvents,CountPropsFromOutline],OnLostFocus->[CommonEditorHide,InvalidateRow,OnLostFocus],OnPaint->[DrawLabel,GetTotalWidth,DrawValueEntry,GetScrollOffset,GetSplitterWidth],GetRowFromGridEntry->[GetScrollOffset],SetScrollbarLength->[GetScrollOffset,SetScrollOffset],GetTestingInfo->[GetTestingInfo],GetService->[GetService],ProcessDialogKey->[OnBtnClick,ProcessDialogKey,OnF4,IsMyChild],Size->[Size],OnEditKeyDown->[ProcessEnumUpAndDown],GridEntry->[GetScrollOffset],GetGridEntriesFromOutline->[GetGridEntriesFromOutline]]] | Draw label for a given row. | does `c` stand for client rectangle? |
@@ -76,7 +76,8 @@ class RemoveContent
Photo::delete(['contact-id' => $id]);
- DBA::delete('contact-relation', ['contact-id = ? OR cid = ?', $id, $id]);
+ DBA::delete('contact-relation', ['contact-id' => $id]);
+ DBA::delete('contact-relation', ['cid' => $id]);
DBA::delete('event', ['cid' => $id]);
DBA::delete('fsuggest', ['cid' => $id]);
DBA::delete('post-tag', ['cid' => $id]);
| [No CFG could be retrieved] | Delete a contact and all depending tables Delete all contact related data. | I forgot the backticks around the damn hyphen column name, didn't I? |
@@ -17,7 +17,7 @@ module Db
def convert_percentages(total_count)
results.each do |key, value|
multiplier = key.end_with?('_percent') ? 100.0 : 1.0
- results[key] = (value * multiplier / total_count).round
+ results[key] = (value * multiplier / total_count).round(2)
end
end
| [DocAuthFunnelSummaryStats->[call->[convert_percentages,zero?,verified_users_count,count],convert_percentages->[each,end_with?,round],append_sql->[index,aggregate_sql],execute_funnel_sql->[each,append_sql,join,execute],aggregate_sql->[end_with?],freeze]] | Convert the percentages of the results hash into the correct number of nanoseconds. | round to two decimal places and not an int |
@@ -44,7 +44,7 @@ describe('batchFetchJsonFor', () => {
beforeEach(() => {
urlReplacements = {
expandUrlAsync: window.sandbox.stub(),
- collectUnwhitelistedVarsSync: window.sandbox.stub(),
+ collectUnallowlistedVarsSync: window.sandbox.stub(),
};
window.sandbox
.stub(Services, 'urlReplacementsForDoc')
| [No CFG could be retrieved] | PUBLIC FUNCTIONS. Reads the JSON from the AMP doc and checks that the batch fetch is called. | Doesn't have to be addressed now but it's worth noting there is some inconsistency throughout with regards to "unallowlisted" versus "nonallowlisted" |
@@ -0,0 +1,17 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+
+internal static partial class Interop
+{
+ internal static partial class User32
+ {
+ public enum ENUM : uint
+ {
+ CURRENT_SETTINGS = unchecked((uint)(-1)),
+ REGISTRY_SETTINGS = unchecked((uint)(-2)),
+ }
+ }
+}
| [No CFG could be retrieved] | No Summary Found. | This naming... ummm... |
@@ -176,10 +176,8 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
* previous handle, re-querying for an ENGINE, and having a
* reinitialisation, when it may all be unnecessary.
*/
- if (ctx->engine && ctx->digest && (!type ||
- (type
- && (type->type ==
- ctx->digest->type))))
+ if (ctx->engine && ctx->digest &&
+ (type == NULL || (type->type == ctx->digest->type)))
goto skip_to_init;
if (type) {
/*
| [No CFG could be retrieved] | This function is exported to the System. reset the given context. | Wasn't this part of some other pull request? |
@@ -248,6 +248,10 @@ namespace DotNetNuke.Modules.CoreMessaging.Services
foreach (var notification in notificationsDomainModel)
{
+ var userObj =
+ UserController.Instance.GetUser(PortalSettings.PortalId, notification.SenderUserID);
+ var displayName = "";
+ displayName = (userObj != null ? userObj.DisplayName : "");
var notificationViewModel = new NotificationViewModel
{
NotificationId = notification.NotificationID,
| [MessagingServiceController->[dynamic->[SenderUserID,KeyID,ConversationId,From,Subject,LastModifiedByUserID,DisplayDate,LastModifiedOnDate,To,ReplyAllAllowed,CreatedByUserID,CreatedOnDate,MessageID,Body,PortalID],LocalizeActionString->[GetDesktopModule,Format,IsNullOrEmpty,PortalId,GetString,Replace,LocalResourceDirectory,LocalSharedResourceFile],HttpResponseMessage->[NotificationTypeID,GetArchivedMessages,InternalServerError,GetEffectivePortalId,Count,TotalThreads,GetMessage,DesktopModuleId,UserID,NotificationID,UserProfileURL,APICall,IncludeDismissAction,DeleteUserNotifications,Add,SenderUserID,MarkUnArchived,GetRecentInbox,CountMessagesByConversation,ConfirmResourceKey,Error,Format,UserProfilePicRelativeUrl,ConversationId,UrlDecode,Subject,CountNotifications,TotalNewThreads,DeleteUserFromConversation,MarkRead,DescriptionResourceKey,CountConversations,FileIds,MarkUnRead,CountArchivedMessagesByConversation,TotalArchivedThreads,NameResourceKey,LocalizeActionString,GetRecentSentbox,CalculateDateForDisplay,Body,ReplyMessage,PortalID,GetNotificationTypeActions,MarkArchived,CreateResponse,OK,CountUnreadMessages,ToExpandoObject,GetNotifications,CreateErrorResponse,From,TotalConversations,CountArchivedConversations,GetNotificationType,GetMessageThread,GetString,CreatedOnDate,CheckReplyHasRecipients,CountSentConversations],GetLogger,View]] | This method returns a list of all the notifications that have been sent to the user. This function add a new notification to the list of notifications. | you could call this just "user" |
@@ -5,10 +5,10 @@ module Api
class ItemsController < Api::Internal::ApplicationController
before_action :authenticate_user!, only: %i(create)
- def create(resource_type, resource_id, asin, page_category)
- CreateItemJob.perform_later(current_user.id, resource_type, resource_id, asin)
- ga_client.page_category = page_category
- ga_client.events.create(:items, :create, el: resource_type, ev: resource_id, ds: "internal_api")
+ def create
+ CreateItemJob.perform_later(current_user.id, params[:resource_type], params[:resource_id], params[:asin])
+ ga_client.page_category = params[:page_category]
+ ga_client.events.create(:items, :create, el: params[:resource_type], ev: params[:resource_id], ds: "internal_api")
keen_client.publish(:item_create, via: "internal_api")
head 201
end
| [ItemsController->[create->[create,perform_later,page_category,publish,head,id],before_action]] | create a new item. | Metrics/LineLength: Line is too long. [122/120] |
@@ -126,7 +126,7 @@ public class TestHiveViews
}
@Test(groups = HIVE_VIEWS)
- public void testUnsupportedLateralViews()
+ public void testLateralViewExplode()
{
onHive().executeQuery("DROP VIEW IF EXISTS hive_lateral_view");
onHive().executeQuery("DROP TABLE IF EXISTS pageAds");
| [TestHiveViews->[testViewWithUnsupportedCoercion->[executeQuery,failsWithMessage],testShowCreateView->[query,get,format,executeQuery,assertEquals,hasRowsCount],testSimpleCoral->[executeQuery,containsOnly,row],testHiveViewWithParametrizedTypes->[executeQuery,containsOnly,row,BigDecimal],testIdentifierThatStartWithDigit->[executeQuery,row,contains],getRequirements->[immutableTable],testWithUnsupportedFunction->[executeQuery,failsWithMessage],testSelectOnView->[executeQuery,hasRowsCount],testHiveViewInInformationSchema->[getHiveVersionMajor,getHiveVersionMinor,row,contains,executeQuery,containsOnly],testUnsupportedLateralViews->[executeQuery,row,contains],testExistingView->[executeQuery,failsWithMessage],testSelectOnViewFromDifferentSchema->[executeQuery,hasRowsCount]]] | Checks if there are unsupported lateral views. | it used to be unsupported until Coral. |
@@ -472,7 +472,14 @@ public class Note implements Serializable, ParagraphJobListener {
logger.debug("New paragraph: {}", pText);
p.setEffectiveText(pText);
} else {
- throw new InterpreterException("Interpreter " + requiredReplName + " not found");
+ InterpreterException intpException;
+ intpException = new InterpreterException(
+ "Pargaraph " + p.getJobName() + "'s Interpreter " + requiredReplName + " not found");
+ p.setReturn(
+ new InterpreterResult(InterpreterResult.Code.ERROR, intpException.getMessage()),
+ intpException);
+ p.setStatus(Job.Status.ERROR);
+ throw intpException;
}
}
if (p.getConfig().get("enabled") == null || (Boolean) p.getConfig().get("enabled")) {
| [Note->[generateParagraphsInfo->[getId],snapshotAngularObjectRegistry->[getId],onOutputAppend->[onOutputAppend],unpersist->[id],isTerminated->[isTerminated],putDefaultReplName->[getDefaultInterpreterName],run->[getParagraph,getId],setName->[normalizeNoteName],addCloneParagraph->[getId],onOutputUpdate->[onOutputUpdate],isLastParagraph->[getId],startDelayedPersistTimer->[run->[persist]],afterStatusChange->[afterStatusChange],runAll->[getId],removeParagraph->[id],moveParagraph->[moveParagraph],setLastReplName->[getParagraph,setLastReplName],completion->[getParagraph,completion],generateId->[generateId],onProgressUpdate->[onProgressUpdate],setInterpreterFactory->[setInterpreterFactory],removeAllAngularObjectInParagraph->[getId],beforeStatusChange->[beforeStatusChange],persist->[snapshotAngularObjectRegistry],getLastInterpreterName->[getInterpreterName,getLastReplName]]] | Runs the interpreter. | Probably a nitpick, but declaration and definition of this variable can be done on a single line. |
@@ -90,10 +90,16 @@ export function getLanguageCodesFromString(languageCode) {
export class LocalizationService {
/**
* @param {!Window} win
+ * @param {!./viewer-interface.ViewerInterface} viewer
*/
- constructor(win) {
+ constructor(win, viewer = undefined) {
const rootEl = win.document.documentElement;
+ /**
+ * @private {?string}
+ */
+ this.viewerLanguageCode_ = viewer ? viewer.getParam('lang') : null;
+
/**
* @private @const {!Array<string>}
*/
| [No CFG could be retrieved] | Provides a service for dealing with language codes. Register a localized string bundle for a given language. | Nit: the viewer service is always present, even when there's no actual viewer |
@@ -1690,8 +1690,10 @@ static int test_DSA_get_set_params(void)
static int test_RSA_get_set_params(void)
{
- RSA *rsa = NULL;
+ OSSL_PARAM_BLD *bld = NULL;
+ OSSL_PARAM *params = NULL;
BIGNUM *n = NULL, *e = NULL, *d = NULL;
+ EVP_PKEY_CTX *pctx = NULL;
EVP_PKEY *pkey = NULL;
int ret = 0;
| [No CFG could be retrieved] | This function initializes the parameters for the object. This function checks if the parameters are valid. 0x00 - > 0x00 - > 0x00 - > 0x00. | Wouldn't these usually be combined into a single expression with `||` separators? |
@@ -55,9 +55,10 @@ class FormEcm
* @param int $selected Id of preselected section
* @param string $select_name Name of HTML select component
* @param string $module Module ('ecm', 'medias', ...)
+ * @param array $ignore_id Arroy of id to ignore
* @return string String with HTML select
*/
- public function selectAllSections($selected = 0, $select_name = '', $module = 'ecm')
+ public function selectAllSections($selected = 0, $select_name = '', $module = 'ecm', $ignore_id = array())
{
global $conf, $langs;
$langs->load("ecm");
| [FormEcm->[selectAllSections->[trans,load,get_full_arbo]]] | This function will select all the sections of the entity This function renders the select element of the cate - arbo - select box. | Can you rename the var $ignore_id into $ids_to_ignore Because var ending with _id are used for a numeric ID so this create a confusion because here it is an array of ids, that may have one but also several ids. |
@@ -56,6 +56,9 @@ class Archiver:
msg = args and msg % args or msg
logger.info(msg)
+ def print_status(self, status, path):
+ logger.debug("%1s %s", status, remove_surrogates(path))
+
def do_serve(self, args):
"""Start in server mode. This command is usually not used manually.
"""
| [Archiver->[do_change_passphrase->[open_repository],do_prune->[print_error,open_repository,print_verbose],run->[build_parser,preprocess_args],do_mount->[print_error,open_repository,print_verbose],do_check->[print_error,open_repository],do_extract->[print_error,open_repository,print_verbose],_process->[print_error,_process,print_verbose],do_rename->[open_repository],do_list->[open_repository],do_delete->[open_repository],do_info->[open_repository],do_init->[open_repository],do_create->[print_error,open_repository,print_verbose]],main->[print_error,setup_signal_handlers,run,Archiver],main] | Print a verbose message about the . | can we just agree on not misusing logging levels ever? this is NOT debug output. also, we don't need a 1 line function for this. |
@@ -132,6 +132,17 @@ class Document(object):
'''
return list(self._session_callbacks)
+ @property
+ def session_destroyed_callbacks(self):
+ ''' A list of all the on_session_destroyed callbacks on this document.
+
+ '''
+ return list(self._session_destroyed_callbacks)
+
+ @session_destroyed_callbacks.setter
+ def session_destroyed_callbacks(self, callbacks):
+ self._session_destroyed_callbacks = callbacks
+
@property
def session_context(self):
''' The ``SessionContext`` for this document.
| [Document->[set_select->[select],from_json->[add_root,Document],_wrap_with_self_as_curdoc->[wrapper->[_with_self_as_curdoc]],replace_with_json->[from_json],from_json_string->[from_json],apply_json_patch->[add_root],select_one->[select],apply_json_patch_string->[apply_json_patch],_destructively_move->[remove_root,add_root,clear]]] | A list of all the session callbacks on this document. | Why the list asymmetry here? If you want to return a copy, why not call `dict` and return that? |
@@ -18,6 +18,7 @@ type commanderSetting struct {
ip string
port string
configFile string
+ configURL string
configs [][]string
}
| [Handle,Dir,Now,DialTimeout,Close,Set,Done,Add,Copy,Error,Format,HandleFunc,Wait,NewScanner,Text,Create,Join,NextPart,Fprint,Fatalf,Read,ListenAndServe,Scan,Split,MkdirAll,Write,Printf,Header,Println,Sprintf,MultipartReader,FileServer,FileName,String,Fatal,Open,Parse,Sleep,WriteHeader] | main import imports a single command from the commander. config - config function to set config - file - config file - command to run on all. | is configFile still being used? Ideally should be removed. |
@@ -732,6 +732,7 @@ $config['discovery_modules']['vlans'] = 1;
$config['discovery_modules']['cisco-mac-accounting'] = 1;
$config['discovery_modules']['cisco-pw'] = 1;
$config['discovery_modules']['cisco-vrf'] = 1;
+$config['discovery_modules']['cisco-vrf-lite'] = 1;
// $config['discovery_modules']['cisco-cef'] = 1;
$config['discovery_modules']['cisco-sla'] = 1;
$config['discovery_modules']['vmware-vminfo'] = 1;
| [No CFG could be retrieved] | List of discovery modules. 2016 - 11 - 15. | Can you align this config item with the others please. |
@@ -86,7 +86,7 @@ frappe.ui.FieldGroup = frappe.ui.form.Layout.extend({
var f = this.fields_dict[key];
if(f.get_value) {
var v = f.get_value();
- if(f.df.reqd && is_null(v))
+ if(f.df.reqd && is_null(strip_html(cstr(v))))
errors.push(__(f.df.label));
if(!is_null(v)) ret[f.df.fieldname] = v;
| [No CFG could be retrieved] | on change input select select input Missing Values Required. | This will break for `Code` and `HTML Editor` fields, say I add `<div></div>` in an HTML Editor field, it is a valid value to have, however it will mark it as empty. An alternative is to have this check exclusively for `Text Editor` |
@@ -195,7 +195,7 @@ class Jetpack_Sync_Sender {
}
public function do_sync_for_queue( $queue ) {
-
+return;
do_action( 'jetpack_sync_before_send_queue_' . $queue->id );
if ( $queue->size() === 0 ) {
return new WP_Error( 'empty_queue_' . $queue->id );
| [Jetpack_Sync_Sender->[reset_data->[reset_data,reset_full_sync_queue,reset_sync_queue],continue_full_sync_enqueue->[set_next_sync_time,get_next_sync_time],set_defaults->[set_enqueue_wait_time,set_upload_max_rows,set_sync_wait_time,set_max_dequeue_time,set_sync_wait_threshold,set_dequeue_max_bytes,set_codec,set_upload_max_bytes],uninstall->[reset_data],do_sync_for_queue->[get_items_to_send,fastcgi_finish_request],do_sync_and_set_delays->[set_next_sync_time,get_next_sync_time]]] | Syncs the items in a queue to the server. This function will process the buffer and send the data to the server This function checks in any items that were skipped and if there are any actions that were not. | I think this was committed by mistake, maybe? |
@@ -5,7 +5,9 @@ module Audit
def self.log(listener, user, data = nil)
Audit::Notification.notify(listener) do |payload|
payload.user_id = user.id
- payload.roles = user.roles.pluck(:name)
+ skip_bullet do
+ payload.roles = user.roles.pluck(:name)
+ end
payload.data = if block_given?
yield
else
| [Logger->[log->[filter_redacted_keys,notify,pluck,data,slug,user_id,roles,id,block_given?],filter_redacted_keys->[except],freeze]] | Log a user id role name and action. | isn't there a way to skip bullet declaratively without this code? also Bullet is not enabled in production so this code feels a bit like a patch. If you look at `config/test.rb` and `config/development.rb` you can see we already have exceptions for some Bullet |
@@ -78,6 +78,8 @@ func newGetLogsCmd() *cobra.Command {
command.Flags().StringVar(&glc.linuxScriptPath, "linux-script", "", "path to the log collection script to execute on the cluster's Linux nodes (required)")
command.Flags().StringVarP(&glc.outputDirectory, "output-directory", "o", "", "collected logs destination directory, derived from --api-model if missing")
command.Flags().BoolVarP(&glc.controlPlaneOnly, "control-plane-only", "", false, "get logs from control plane VMs only")
+ command.Flags().StringVarP(&glc.blobServiceSASURL, "sas-url", "", "", "blob service SAS URL of the storage account on Azure or custom cloud to upload kubernetes logs")
+ command.Flags().StringVar(&glc.storageContainerName, "storage-container-name", "", "name of the storage container that to upload kubernetes logs (required if --sas-url is set and storage container name not included in the SAS URL)")
_ = command.MarkFlagRequired("location")
_ = command.MarkFlagRequired("api-model")
_ = command.MarkFlagRequired("ssh-host")
| [Write->[Printf,Repeat],validateArgs->[LoadTranslations,IsNotExist,NormalizeAzureRegion,Join,Dir,Stat,New,Errorf,Wrap,MkdirAll],downloadLogs->[Copy,Join,TeeReader,Println,Sprintf,Close,Start,StdoutPipe,Wrap,OpenFile,NewSession,Debug],loadAPIModel->[LoadContainerServiceFromFile,PublicKeyAuth,SSHClientConfig,New,GetSSHEnabled,Password,Wrap,SetCustomCloudSpec,IsCustomCloudProfile],getCloudName->[IsAzureStackCloud],executeScript->[CombinedOutput,Sprintf,getCloudName,Close,Wrap,NewSession,Debug],getClusterNodes->[GetKubernetesClient,ListNodes,Warnf,Duration,Wrap,HasPrefix,GenerateKubeConfig],uploadScript->[CombinedOutput,ReadFile,NewReader,Sprintf,Close,Wrap,NewSession,Debugf],run->[Infof,Warnf,getClusterNodes,Wrap,collectLogs],collectLogs->[SSHClient,downloadLogs,Close,executeScript,uploadScript,Wrap],StringVar,EqualFold,validateArgs,MarkFlagRequired,loadAPIModel,Usage,StringVarP,run,Wrap,BoolVarP,Flags] | getLogsShortDescription returns a short description of the log - related command. validateArgs checks if all required arguments are set. | Please update the doc page |
@@ -58,7 +58,6 @@ Se og kommenter på den nye side:
'pages:title' => 'Side titel',
'pages:description' => 'Side indhold',
- 'pages:tags' => 'Tags',
'pages:parent_guid' => 'Parent page',
'pages:access_id' => 'Læseadgang',
'pages:write_access_id' => 'Skriveadgang',
| [No CFG could be retrieved] | Create a list of all pages in the system. Diese Methode d ajout d un nuevo nuevo K. | Please don't remove translation strings. Also no need to manually edit the non-en files ever since the Transifex process is expected to keep them up to date. |
@@ -17,11 +17,7 @@
import {BrowserController, RequestBank} from '../../testing/test-helper';
import {parseQueryString} from '../../src/url';
-// TODO(wg-analytics): These tests time out on Firefox and Safari
-// (locally too) which causes browser disconnections on SauceLabs.
-const t = describe.configure().skipSauceLabs();
-
-t.run('amp-analytics', function () {
+describe('amp-analytics', function () {
describes.integration(
'basic pageview',
{
| [No CFG could be retrieved] | Displays a pageview with a specific client ID and a request to the AMP HTML Auth AJAX - AJAX - AJAX - AJAX - AJAX - AJAX -. | Keep the TODO of "These tests time out on Firefox and Safari (locally too)" |
@@ -228,6 +228,7 @@ public abstract class AbstractInboundFileSynchronizer<F> implements InboundFileS
}
}
}
+ localFile.setLastModified(getModified(remoteFile));
}
}
| [AbstractInboundFileSynchronizer->[filterFiles->[filterFiles],synchronizeToLocalDirectory->[filterFiles]]] | Copies a remote file to a local directory. return remoteFileName. | Unfortunately, I think this needs to be an option (with default false). A plausible use case is the use of a `FileListFilter` that keeps track of files created since time x, where x is the time the file was copied. Unconditionally using the server timestamp could break this. |
@@ -40,6 +40,8 @@ namespace System
public static bool IsNotBrowser => !IsBrowser;
public static bool IsMobile => IsBrowser || IsMacCatalyst || IsiOS || IstvOS || IsAndroid;
public static bool IsNotMobile => !IsMobile;
+ public static bool IsAppleMobile => IsMacCatalyst || IsiOS || IstvOS;
+ public static bool IsNotAppleMobile => !IsAppleMobile;
public static bool IsNotNetFramework => !IsNetFramework;
public static bool IsArmProcess => RuntimeInformation.ProcessArchitecture == Architecture.Arm;
| [PlatformDetection->[GetTls11Support->[OpenSslGetTlsSupport],GetTls13Support->[AndroidGetSslProtocolSupport],GetTls10Support->[OpenSslGetTlsSupport],GetStaticNonPublicBooleanPropertyValue]] | Returns a new object that represents the current system. Returns true if the process ID is known to be a process ID. | nit: these look unused now. |
@@ -16,6 +16,8 @@
#include "internal/asn1_int.h"
#include "internal/evp_int.h"
#include "rsa_locl.h"
+#include <openssl/core_names.h>
+#include "internal/param_build.h"
#ifndef OPENSSL_NO_CMS
static int rsa_cms_sign(CMS_SignerInfo *si);
| [ASN1_STRING->[rsa_ctx_to_pss,ASN1_ITEM_rptr,ASN1_item_pack,RSA_PSS_PARAMS_free],RSA_PSS_PARAMS->[ASN1_TYPE_unpack_sequence,EVP_PKEY_CTX_get_signature_md,EVP_PKEY_CTX_get_rsa_mgf1_md,RSA_PSS_PARAMS_free,rsa_mgf1_decode,ASN1_ITEM_rptr,EVP_PKEY_CTX_get_rsa_pss_saltlen,EVP_MD_size,EVP_PKEY_CTX_get0_pkey,rsa_pss_params_create,EVP_PKEY_size,EVP_PKEY_bits],int->[CMS_RecipientInfo_ktri_get0_algs,ASN1_ITEM_rptr,RSA_check_key_ex,rsa_pss_get_param,d2i_RSAPublicKey,rsa_algor_to_md,BN_cmp,ASN1_item_pack,EVP_PKEY_CTX_get0_rsa_oaep_label,BIO_puts,PKCS7_RECIP_INFO_get0_alg,RSA_free,PKCS7_SIGNER_INFO_get0_algs,X509_SIG_INFO_set,rsa_param_decode,OBJ_find_sigid_algs,rsa_ctx_to_pss_string,BN_num_bits,EVP_PKEY_assign,RSA_size,OBJ_obj2nid,RSA_OAEP_PARAMS_free,i2d_RSAPrivateKey,EVP_PKEY_CTX_get_rsa_oaep_md,X509_PUBKEY_get0_param,CMS_SignerInfo_get0_pkey_ctx,BIO_indent,CMS_RecipientInfo_get0_pkey_ctx,pkey_rsa_print,pkey_ctx_is_pss,ASN1_STRING_free,EVP_PKEY_CTX_get_signature_md,EVP_PKEY_CTX_set_rsa_pss_saltlen,OBJ_nid2obj,ASN1_OCTET_STRING_free,ASN1_OCTET_STRING_new,rsa_pss_param_print,RSA_security_bits,rsa_cms_verify,X509_PUBKEY_set0_param,EVP_PKEY_CTX_set_rsa_oaep_md,EVP_DigestVerifyInit,RSA_PSS_PARAMS_free,X509_ALGOR_set0,sk_RSA_PRIME_INFO_num,sk_RSA_PRIME_INFO_value,rsa_md_to_mgf1,PKCS8_pkey_set0,rsa_pss_to_ctx,EVP_PKEY_CTX_get_rsa_padding,EVP_PKEY_CTX_set0_rsa_oaep_label,EVP_MD_type,EVP_PKEY_CTX_get_rsa_mgf1_md,X509_ALGOR_free,EVP_MD_CTX_pkey_ctx,EVP_PKEY_CTX_set_rsa_mgf1_md,rsa_md_to_algor,EVP_PKEY_CTX_set_rsa_padding,i2d_RSAPublicKey,ASN1_OCTET_STRING_set,PKCS8_pkey_get0,rsa_param_encode,BIO_printf,rsa_oaep_decode,pkey_is_pss,X509_ALGOR_new,OPENSSL_free,rsa_mgf1_decode,rsa_cms_decrypt,RSA_OAEP_PARAMS_new,X509_ALGOR_get0,ASN1_STRING_dup,ASN1_bn_print,X509_signature_dump,rsa_cms_encrypt,d2i_RSAPrivateKey,rsa_pss_decode,EVP_MD_size,i2a_ASN1_INTEGER,RSAerr,rsa_cms_sign,X509_ALGOR_set_md,CMS_SignerInfo_get0_algs,i2a_ASN1_OBJECT],RSA_OAEP_PARAMS->[ASN1_TYPE_unpack_sequence,ASN1_ITEM_rptr,rsa_mgf1_decode,RSA_OAEP_PARAMS_free],const->[EVP_get_digestbyobj,EVP_sha1,RSAerr],X509_ALGOR->[OBJ_obj2nid,ASN1_TYPE_unpack_sequence,ASN1_ITEM_rptr],rsa_pss_params_create->[ASN1_INTEGER_new,RSA_PSS_PARAMS_free,ASN1_INTEGER_set,rsa_md_to_mgf1,rsa_md_to_algor,RSA_PSS_PARAMS_new],void->[RSA_free],rsa_pss_get_param->[ASN1_INTEGER_get,rsa_algor_to_md,RSAerr]] | Package private functions Decode any parameters and set them in RSA structure. | NIT: maybe reorder these? |
@@ -122,9 +122,9 @@ public class KafkaRecordSupplier implements RecordSupplier<Integer, Long>
@Override
public Long getLatestSequenceNumber(StreamPartition<Integer> partition)
{
- Long currPos = consumer.position(new TopicPartition(partition.getStream(), partition.getPartitionId()));
+ Long currPos = getPosition(partition);
seekToLatest(Collections.singleton(partition));
- Long nextPos = consumer.position(new TopicPartition(partition.getStream(), partition.getPartitionId()));
+ Long nextPos = getPosition(partition);
seek(partition, currPos);
return nextPos;
}
| [KafkaRecordSupplier->[poll->[poll],assign->[assign],seek->[seek],getKafkaConsumer->[addConsumerPropertiesFromConfig],close->[close],getLatestSequenceNumber->[seek,seekToLatest],getEarliestSequenceNumber->[seek,seekToEarliest]]] | Gets the latest sequence number of the given partition. | What about wrapping the calls in `assign()`, `seek()`, `seekToEarliest()`, `seekToLatest()`, and `getAssignment()`? |
@@ -18,6 +18,8 @@ import {ElementStub} from '../../src/element-stub';
import {createIframePromise} from '../../testing/iframe';
import {resetExtensionScriptInsertedOrPresentForTesting,}
from '../../src/insert-extension';
+require('../../extensions/amp-ad/0.1/amp-ad');
+require('../../extensions/amp-analytics/0.1/amp-analytics');
describe('test-element-stub', () => {
| [No CFG could be retrieved] | Package that contains the functions related to the elements of the page. This is a test function that creates an element and adds it to the iframe. | I tried import works as well. import '../../extensions/amp-ad/0.1/amp-ad'; import '../../extensions/amp-analytics/0.1/amp-analytics'; |
@@ -144,15 +144,14 @@ class TestDetectLanguage(AsyncTextAnalyticsTest):
@GlobalTextAnalyticsAccountPreparer()
@TextAnalyticsClientPreparer()
- @pytest.mark.xfail
async def test_too_many_documents(self, client):
- # marking as xfail since the service hasn't added this error to this endpoint
- docs = ["One", "Two", "Three", "Four", "Five", "Six"]
+ docs = [u"hello world"] * 1000
try:
await client.detect_language(docs)
except HttpResponseError as e:
assert e.status_code == 400
+ assert "(InvalidDocumentBatch) The number of documents in the request have exceeded the data limitations" in str(e)
@GlobalTextAnalyticsAccountPreparer()
@TextAnalyticsClientPreparer()
| [AiohttpTestTransport->[send->[CIMultiDictProxy,get,super,CIMultiDict,isinstance]],TestDetectLanguage->[test_whole_batch_country_hint_and_obj_per_item_hints->[callback->[assertEqual,count],DetectLanguageInput,detect_language],test_bad_model_version_error->[assertIsNotNone,assertEqual,detect_language],test_pass_cls->[TextAnalyticsClient,AzureKeyCredential,detect_language],test_input_with_all_errors->[assertTrue,range,detect_language],test_invalid_country_hint_docs->[assertIsNotNone,assertEqual,detect_language],test_whole_batch_country_hint_and_dict_per_item_hints->[callback->[assertEqual,count],detect_language],test_not_passing_list_for_docs->[str,raises,detect_language],test_per_item_dont_use_country_hint->[callback->[assertEqual,count],detect_language],test_whole_batch_country_hint_and_obj_input->[callback->[assertEqual,count],DetectLanguageInput,detect_language],test_country_hint_none->[callback->[assertEqual,count],TextAnalyticsClient,AzureKeyCredential,DetectLanguageInput,detect_language],test_passing_only_string->[assertTrue,assertEqual,detect_language],test_country_hint_kwarg->[callback->[assertIsNotNone,assertEqual,count],detect_language],test_no_single_input->[assertRaises,detect_language],test_whole_batch_country_hint->[callback->[assertEqual,count],detect_language],test_empty_credential_class->[assertRaises,detect_language],test_missing_input_records_error->[str,raises,detect_language],test_mixing_inputs->[assertRaises,DetectLanguageInput,detect_language],test_all_successful_passing_text_document_input->[assertEqual,assertIsNotNone,DetectLanguageInput,detect_language],test_whole_batch_country_hint_and_dict_input->[callback->[assertEqual,count],detect_language],test_document_attribute_error_nonexistent_attribute->[assertEqual,detect_language],test_duplicate_ids_error->[assertIsNotNone,assertEqual,detect_language],test_too_many_documents->[detect_language],test_rotate_subscription_key->[AzureKeyCredential,update,detect_language,assertRaises,TextAnalyticsClient,assertIsNotNone],test_passing_none_docs->[str,raises,detect_language],test_whole_batch_dont_use_country_hint->[callback->[assertEqual,count],detect_language],test_document_warnings->[assertEqual,detect_language,len],test_bad_credentials->[assertRaises,detect_language],test_batch_size_over_limit_error->[assertIsNotNone,assertEqual,detect_language],test_invalid_country_hint_method->[assertIsNotNone,assertEqual,detect_language],test_user_agent->[callback->[,python_version,platform,assertIn],detect_language],test_client_passed_default_country_hint->[callback->[assertEqual,count],callback_2->[assertEqual,count],detect_language],test_input_with_some_errors->[assertTrue,assertFalse,detect_language],test_bad_document_input->[assertRaises,detect_language],test_out_of_order_ids->[enumerate,assertEqual,detect_language],test_document_errors->[range,assertIsNotNone,assertEqual,detect_language],test_show_stats_and_model_version->[callback->[assertIsNotNone,assertEqual],detect_language],test_document_attribute_error_no_result_attribute->[assertTrue,assertIsNotNone,assertEqual,detect_language],test_batch_size_over_limit->[assertRaises,detect_language],test_all_successful_passing_dict->[assertIsNotNone,assertEqual,detect_language],test_output_same_order_as_input->[assertEqual,DetectLanguageInput,detect_language,str,enumerate],GlobalTextAnalyticsAccountPreparer,TextAnalyticsClientPreparer],partial] | Test if there are too many documents in the network. | shouldn't this need to be 1001? |
@@ -1622,10 +1622,10 @@ export function setConsentStateForTesting(newConsentState) {
*
* Copied from src/video-interface.js.
*
- * @const {!Object<string, string>}
+ * @enum {string}
*/
// TODO(aghassemi, #9216): Use video-interface.js
-const VideoEvents = {
+const VideoEvents_Enum = {
/**
* load
*
| [No CFG could be retrieved] | Add a check - and - set property to the object for the current environment. Fired when a user pauses or ends a video. | surprised you found this given it didn't have an enum annotation |
@@ -49,7 +49,7 @@ func TestClient_RunNodeShowsEnv(t *testing.T) {
assert.Contains(t, logs, "JSON_CONSOLE: false")
assert.Contains(t, logs, "ROOT: /tmp/chainlink_test/")
assert.Contains(t, logs, "CHAINLINK_PORT: 6688\\n")
- assert.Contains(t, logs, "ETH_URL: ws://")
+ assert.Contains(t, logs, "ETH_WS_URL: ws://")
assert.Contains(t, logs, "ETH_CHAIN_ID: 3\\n")
assert.Contains(t, logs, "CLIENT_NODE_URL: http://")
assert.Contains(t, logs, "TX_MIN_CONFIRMATIONS: 6\\n")
| [FileMode,RemoveAll,Unlock,KeysDir,NewApplicationWithConfigAndKeyStore,RunNode,False,NewClientAndRenderer,CreateProductionLogger,NewConfig,IsNotExist,Error,Stat,ImportKey,NewApplication,Accounts,Len,Nil,Bool,CreateExtraKey,ReadLogs,Equal,Contains,Parallel,NoError,Register,NewFlagSet,MkdirAll,SetLogger,ProductionLoggerFilepath,NewAccount,NewApplicationWithKeyStore,String,Parse,MockEthClient,Run,True,NewContext] | client - a client for the chainlink - client TestClient_RunNodeWithPasswords tests a node with password. txt. | This is a breaking change. Can we stick with ETH_URL, for now and maybe move it in a subsequent PR? |
@@ -652,7 +652,7 @@ public final class CacheNotifierImpl<K, V> extends AbstractListenerImpl<Event<K,
builder
.setIncludeCurrentState(l.includeCurrentState())
.setClustered(l.clustered())
- .setOnlyPrimary(l.clustered() ? (cacheMode.isDistributed() ? true : false) : l.primaryOnly())
+ .setOnlyPrimary(l.clustered() ? cacheMode.isDistributed() : l.primaryOnly())
.setFilter(filter)
.setConverter(converter)
.setIdentifier(generatedId)
| [CacheNotifierImpl->[notifyCacheEntryEvicted->[setValue],notifyCacheEntryLoaded->[setValue],notifyCacheEntryInvalidated->[configureEvent],BaseCacheEntryListenerInvocation->[doRealInvocation->[invoke],convertValue->[getKey,setValue,getValue],shouldInvoke->[getKey,setValue,getValue],invoke->[doRealInvocation],invokeNoChecks->[invoke,doRealInvocation],getTarget->[getTarget]],notifyCacheEntriesEvicted->[transform->[getKey->[getKey],getValue->[getValue]],getKey,setValue,getValue],notifyCacheEntryPassivated->[setValue],addListener->[getKey,addListener],start->[start],NonClusteredListenerInvocation->[doRealInvocation->[doRealInvocation]],ClusteredListenerInvocation->[doRealInvocation->[doRealInvocation]],removeListener->[removeListener],notifyCacheEntryActivated->[setValue],raiseEventForInitialTransfer->[getKey,setValue,getValue]]] | Add a listener to this cache. If anyone else joined during replication of the cache this method will be called to find a Called when the cache is complete. | Was this change an oversight or was there some issue? This was specifically for REPL caches so it only notifies on the write to the node where the listener is notified. |
@@ -86,7 +86,7 @@ namespace Internal.IL
/// (typically a <see cref="MethodDesc"/>, <see cref="FieldDesc"/>, <see cref="TypeDesc"/>,
/// or <see cref="MethodSignature"/>).
/// </summary>
- public abstract Object GetObject(int token, NotFoundBehavior notFoundBehavior = NotFoundBehavior.ReturnNull);
+ public abstract Object GetObject(int token, NotFoundBehavior notFoundBehavior = NotFoundBehavior.Throw);
/// <summary>
/// Gets a list of exception regions this method body defines.
| [MethodIL->[ToString->[ToString],Object->[ReturnNull]]] | Gets an object that represents an exception. | This is inconsistent with the default for `EcmaMethodIL.GetObject` and with the original behavior. |
@@ -144,6 +144,11 @@ class Context(object):
"""
return self._scm
+ @property
+ def scheduler(self):
+ """Returns the scheduler instance used for this run."""
+ return self._scheduler
+
@property
def workspace(self):
"""Returns the current workspace, if any."""
| [Context->[subproc_map->[debug],background_worker_pool->[background_worker_pool],resolve->[resolve],__init__->[Log],dependents->[targets],new_workunit->[new_workunit]]] | Returns the current workspace s scm if any. | @ity FYI, this may be useful :) |
@@ -111,8 +111,6 @@ def test_passing(rule_runner: RuleRunner, major_minor_interpreter: str) -> None:
)
assert len(lint_results) == 1
assert lint_results[0].exit_code == 0
- assert "1 file would be left unchanged" in lint_results[0].stderr
- assert "1 file left unchanged" in fmt_result.stderr
assert fmt_result.output == get_digest(rule_runner, {"f.py": GOOD_FILE})
assert fmt_result.did_change is False
| [test_failing->[run_black,get_digest],test_works_with_python39->[run_black,get_digest],test_passthrough_args->[run_black,get_digest],test_multiple_targets->[run_black,get_digest],test_skip->[run_black],test_config_file->[run_black,get_digest],test_passing->[run_black,get_digest],test_stub_files->[run_black,get_digest],test_works_with_python38->[run_black,get_digest]] | Test passing and failing. | Perhaps keep the asserts, but with a `not in` instead? |
@@ -137,18 +137,6 @@ def test_subject_info():
for key in keys:
assert_equal(subject_info[key], raw_read.info['subject_info'][key])
assert_equal(raw.info['meas_date'], raw_read.info['meas_date'])
- raw.anonymize()
- raw.save(out_fname, overwrite=True)
- raw_read = Raw(out_fname)
- for this_raw in (raw, raw_read):
- assert_true(this_raw.info.get('subject_info') is None)
- assert_equal(this_raw.info['meas_date'], [0, 0])
- assert_equal(raw.info['file_id']['secs'], 0)
- assert_equal(raw.info['meas_id']['secs'], 0)
- # When we write out with raw.save, these get overwritten with the
- # new save time
- assert_true(raw_read.info['file_id']['secs'] > 0)
- assert_true(raw_read.info['meas_id']['secs'] > 0)
@testing.requires_testing_data
| [test_multiple_files->[_compare_combo],test_compensation_raw_mne->[compensate_mne]] | Test reading and writing subject info. Full data with no duplicates. | What follows is now saved in a specific `test_anonymize` function |
@@ -132,6 +132,18 @@ public class Reviewer extends AbstractFlashcardViewer {
Timber.i("Reviewer:: Edit note button pressed");
return editCard();
+ case R.id.action_bury_actionbar_only:
+ Timber.i("Reviewer:: Bury button pressed");
+ if(!mShowBuryActionbarOnlySubmenu) {
+ // Don't show submenu, just bury the current card
+ mMenu.findItem(R.id.action_bury_actionbar_only).getSubMenu().setGroupVisible(R.id.group_menu_bury_actionbar_only, false);
+ DeckTask.launchDeckTask(DeckTask.TASK_TYPE_DISMISS_NOTE, mDismissCardHandler, new DeckTask.TaskData(mCurrentCard, 4));
+ }
+ else {
+ mMenu.findItem(R.id.action_bury_actionbar_only).getSubMenu().setGroupVisible(R.id.group_menu_bury_actionbar_only, true);
+ }
+ break;
+
case R.id.action_bury_card:
Timber.i("Reviewer:: Bury card button pressed");
DeckTask.launchDeckTask(DeckTask.TASK_TYPE_DISMISS_NOTE, mDismissCardHandler, new DeckTask.TaskData(mCurrentCard, 4));
| [Reviewer->[onStop->[onStop],initControls->[initControls],setTitle->[setTitle],onActivityResult->[onActivityResult],onCollectionLoaded->[onCollectionLoaded],onKeyUp->[onKeyUp],onOptionsItemSelected->[onOptionsItemSelected],displayCardQuestion->[displayCardQuestion],onWindowFocusChanged->[onWindowFocusChanged],fillFlashcard->[fillFlashcard],onCreateOptionsMenu->[onCreateOptionsMenu,setTitle],restorePreferences->[restorePreferences]]] | This method is called when the user clicks on the menu item which is used to show the This method is called when the user clicks on the DeckTask. TaskData object. | Please contract to `} else {` to be consistent with the rest of the code base |
@@ -950,6 +950,13 @@ class MatrixTransport(Runnable):
self.log.debug("Channel room", peer_address=to_normalized_address(address), room=room)
return room
+ def _is_room_global(self, room):
+ return any(
+ suffix in room_alias
+ for suffix in self._config["global_rooms"]
+ for room_alias in room.aliases
+ )
+
def _get_private_room(self, invitees: List[User]):
""" Create an anonymous, private room and invite peers """
return self._client.create_room(
| [_RetryQueue->[enqueue->[_expiration_generator,_MessageData],_run->[_check_and_send],enqueue_global->[enqueue],_check_and_send->[message_is_in_queue]],MatrixTransport->[_send_with_retry->[enqueue,_get_retrier],_handle_to_device_message->[_receive_to_device,_get_user],send_to_device->[send_to_device],_get_retrier->[start,_RetryQueue],stop->[notify],start->[start],start_health_check->[whitelist],_global_send_worker->[_send_global],_address_reachability_changed->[notify],_leave_unused_rooms->[leave->[leave],_spawn],_user_presence_changed->[_spawn],_receive_message->[enqueue_global]]] | Get a room for the given address. Invite a new private room to a peer. | This could really mess up a lot of nodes if a MS or PFS room is not properly suffixed or aliased. Should we add a check for rooms if there's more than two members? |
@@ -281,6 +281,12 @@ export class AmpStoryQuiz extends AMP.BaseElement {
optionText.textContent = option.textContent;
convertedOption.appendChild(optionText);
+ // Add text container for percentage display
+ const percentageText = document.createElement('span');
+ percentageText.classList.add('i-amphtml-story-quiz-percentage-text');
+ percentageText.textContent = '0%';
+ convertedOption.appendChild(percentageText);
+
if (option.hasAttribute('correct')) {
convertedOption.setAttribute('correct', 'correct');
}
| [AmpStoryQuiz->[updateQuizToPostSelectionState_->[classList],getClientId_->[resolve,get],configureOption_->[setAttribute,hasAttribute,dev,textContent,appendChild,querySelector,optionIndex_,createElement,classList,buildOptionTemplate],constructor->[getStoreService,getRequestService,getVariableService,cidForDoc,getAnalyticsService],handleOptionSelection_->[optionIndex_],retrieveReactionData_->[dict,dev],updateReactionData_->[dict,dev],buildCallback->[buildQuizTemplate,createShadowRootWithStyle],handleSuccessfulDataRetrieval_->[dev,data],adjustGridLayer_->[tagName,dev,classList,closest,parentElement],initializeListeners_->[RTL_STATE],attachContent_->[toArray,tagName,dev,textContent,classList,createElement,forEach,length],executeReactionRequest_->[addParamsToUrl,tagName,dev,dict,closest,reject,assertAbsoluteHttpOrHttpsUrl],layoutCallback->[resolve],triggerAnalytics_->[STORY_REACTION_ID,STORY_REACTION_TYPE,optionIndex_,STORY_REACTION_RESPONSE,REACTION],updateQuizOnDataRetrieval_->[dev,length,selectedByUser,reactionValue],handleTap_->[closest,dev,target,classList],BaseElement],htmlFor,html] | This function is called when a new option is added to the quiz. It will create a. | Please add a `TODO` so we remember to internationalize this as well |
@@ -71,6 +71,10 @@ public abstract class BaseKeyGenerator extends KeyGenerator {
}).collect(Collectors.toList());
}
+ public List<String> getIndexKeyFields() {
+ return indexKeyFields;
+ }
+
public List<String> getRecordKeyFields() {
return recordKeyFields;
}
| [BaseKeyGenerator->[getKey->[getRecordKey,getPartitionPath]]] | Get the list of record key field names. | Can try this way `recordKeyFields.containsAll(indexKeyFields)` |
@@ -110,7 +110,7 @@ class LinkingTransitionFunction(BasicTransitionFunction):
# The `output_action_embeddings` tensor gets used later as the input to the next
# decoder step. For linked actions, we don't have any action embedding, so we use
# the entity type instead.
- output_action_embeddings = torch.cat([output_action_embeddings, type_embeddings], dim=0)
+ output_action_embeddings = type_embeddings
if self._mixture_feedforward is not None:
# The linked and global logits are combined with a mixture weight to prevent the
| [LinkingTransitionFunction->[_compute_action_probabilities->[batch_results,log_softmax,cat,len,log,defaultdict,get_valid_actions,_mixture_feedforward,mm,range],__init__->[get_input_dim,get_output_dim,super,check_dimensions_match,by_name]]] | Computes the action probabilities for all entities in the group. The action embeddings and the action_ids are combined with a mixture weight. | You need an `if` here, like you have below. |
@@ -239,10 +239,11 @@ function shallowClearAndCopy(src, dst) {
// we can create an instance as well
var newCard = new CreditCard({number:'0123'});
newCard.name = "Mike Smith";
- newCard.$save();
- // POST: /user/123/card {number:'0123', name:'Mike Smith'}
- // server returns: {id:789, number:'0123', name: 'Mike Smith'};
- expect(newCard.id).toEqual(789);
+ newCard.$save().then(function() {
+ // POST: /user/123/card {number:'0123', name:'Mike Smith'}
+ // server returns: {id:789, number:'0123', name: 'Mike Smith'};
+ expect(newCard.id).toEqual(789);
+ });
* ```
*
* The object returned from this function execution is a resource "class" which has "static" method
| [No CFG could be retrieved] | This method is used to retrieve a collection of CreditCards and create a new instance of the on server - side data. User. | This is wrong, instance actions won't create a new promise (it will still have the old promise), so this wouldn't wait for a response from the server, just the next tick. |
@@ -1125,6 +1125,9 @@ Sedp::Task::svc_i(const ParticipantData_t* ppdata)
if (spdp_->available_builtin_endpoints() & DISC_BUILTIN_ENDPOINT_PARTICIPANT_ANNOUNCER &&
avail & BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_READER) {
DCPS::AssociationData peer = proto;
+ if (beq & BEST_EFFORT_PARTICIPANT_MESSAGE_DATA_READER) {
+ peer.remote_reliable_ = false;
+ }
peer.remote_id_.entityId = ENTITYID_P2P_BUILTIN_PARTICIPANT_MESSAGE_READER;
sedp_->participant_message_writer_.assoc(peer);
}
| [No CFG could be retrieved] | Creates an association data proto from the given arguments. - - - - - - - - - - - - - - - - - -. | should similar logic apply to the secure version of the participant message data reader? |
@@ -140,7 +140,7 @@ class QuantizableGoogLeNet(GoogLeNet):
self.quant = torch.quantization.QuantStub()
self.dequant = torch.quantization.DeQuantStub()
- def forward(self, x):
+ def forward(self, x: Tensor):
x = self._transform_input(x)
x = self.quant(x)
x, aux1, aux2 = self._forward(x)
| [QuantizableGoogLeNet->[fuse_model->[fuse_model]]] | Initialize the quantizable GOOGLENet. | Unsure about return type here. |
@@ -227,6 +227,9 @@ class AsyncFieldMixin(Field):
# We must temporarily unfreeze the field, but then we refreeze to continue avoiding
# subclasses from adding arbitrary fields.
self._unfreeze_instance() # type: ignore[attr-defined]
+ # N.B.: We store the address here and not in the Field base class, because the memory usage
+ # of storing this value in every field was shown to be excessive / lead to performance
+ # issues.
self.address = address
self._freeze_instance() # type: ignore[attr-defined]
| [Sources->[path_globs->[_prefix_glob_with_address],can_generate->[get],validate_resolved_files->[InvalidFieldException]],_AbstractFieldSet->[applicable_target_types->[class_has_fields],is_applicable->[has_fields]],DictStringToStringSequenceField->[compute_value->[InvalidFieldTypeException]],FieldSet->[create->[_get_field_set_fields_from_target]],_get_field_set_fields_from_target->[get],StringField->[compute_value->[InvalidFieldChoiceException]],generate_subtarget->[has_field,generate_subtarget_address],SequenceField->[compute_value->[InvalidFieldTypeException]],BoolField->[compute_value->[InvalidFieldTypeException]],ScalarField->[compute_value->[InvalidFieldTypeException]],Target->[has_fields->[_has_fields],class_field_types->[_find_plugin_fields],class_get_field->[class_field_types],__getitem__->[_maybe_get],get->[_maybe_get],_maybe_get->[_find_registered_field_subclass],class_has_fields->[_has_fields,class_field_types],_has_fields->[_find_registered_field_subclass]],DictStringToStringField->[compute_value->[InvalidFieldTypeException]]] | Initialize a with raw_value and address. | Let me know if either half of the `/` is a lie and I can reword. |
@@ -111,10 +111,10 @@ class PexFromTargetsRequest:
interpreter constraints to not be used because platforms already constrain the valid
Python versions, e.g. by including `cp36m` in the platform string.
:param additional_args: Any additional Pex flags.
- :param additional_args: Any additional Pex flags that should be used with the lockfile.pex.
- Many Pex args like `--emit-warnings` do not impact the lockfile, and setting them
- would reduce reuse with other call sites. Generally, this should only be flags that
- impact lockfile resolution like `--manylinux`.
+ :param additional_lockfile_args: Any additional Pex flags that should be used with the
+ lockfile.pex. Many Pex args like `--emit-warnings` do not impact the lockfile, and
+ setting them would reduce reuse with other call sites. Generally, these should only be
+ flags that impact lockfile resolution like `--manylinux`.
:param additional_requirements: Additional requirements to install, in addition to any
requirements used by the transitive closure of the given addresses.
:param include_source_files: Whether to include source files in the built Pex or not.
| [pex_from_targets->[_RepositoryPexRequest],PexFromTargetsRequest->[for_requirements->[PexFromTargetsRequest]],_setup_constraints_repository_pex->[_RepositoryPex],get_repository_pex->[_RepositoryPex,_ConstraintsRepositoryPexRequest]] | Request to create a new Pex from the given transitive closure of the given addresses. This is the entry point for the lockfile. It is called by the lockfile - Set the description of the plugin. | A stray typo unrelated to my change but fixed in it. |
@@ -90,6 +90,14 @@ class ContentNavigationItem
*/
private $displayConditions;
+ /**
+ * @var int
+ */
+ private $notificationBadge;
+
+ /**
+ * @param string $name
+ */
public function __construct($name)
{
$this->name = $name;
| [No CFG could be retrieved] | Initialize a new node - type. | For what is this needed? Doesn't seem to be used anywhere. |
@@ -52,9 +52,9 @@ class WopiController < ActionController::Base
asset_owner_id = @asset.created_by_id.to_s if @asset.created_by_id
msg = {
- BaseFileName: @asset.file_file_name,
+ BaseFileName: @asset.file_name,
OwnerId: asset_owner_id,
- Size: @asset.file_file_size,
+ Size: @asset.file_size,
UserId: @user.id.to_s,
Version: @asset.version.to_s,
SupportsExtendedLockLength: true,
| [WopiController->[lock->[lock],unlock->[lock,unlock],refresh_lock->[lock,refresh_lock],unlock_and_relock->[lock],get_lock->[lock],put_file->[lock]]] | Check the nagon file info for a user. | Layout/AlignHash: Align the elements of a hash literal if they span more than one line. |
@@ -947,6 +947,12 @@ shard_open:
ec_degrade = true;
obj_shard_close(obj_shard);
}
+ if (obj_auxi->opc == DAOS_OBJ_RPC_UPDATE && obj_shard->do_reintegrating) {
+ D_ERROR(DF_OID" shard is being reintegrated: %d\n",
+ DP_OID(obj->cob_md.omd_id), -DER_IO);
+ obj_shard_close(obj_shard);
+ D_GOTO(out, rc = -DER_IO);
+ }
} else {
if (rc == -DER_NONEXIST) {
if (!obj_auxi->is_ec_obj) {
| [No CFG could be retrieved] | Get the object object from the object group. finds a random index within the group that is not part of the current object. | Eventually, we will be able to write, no? Would -DER_AGAIN or similar make more sense here? The client shouldn't error out but should try again |
@@ -336,13 +336,11 @@ __cv_timedwait_hires(kcondvar_t *cvp, kmutex_t *mp, hrtime_t expire_time,
* race where 'cvp->cv_waiters > 0' but the list is empty.
*/
mutex_exit(mp);
- /*
- * Allow a 100 us range to give kernel an opportunity to coalesce
- * interrupts
- */
+
ktime_left = ktime_set(0, time_left);
- schedule_hrtimeout_range(&ktime_left, 100 * NSEC_PER_USEC,
- HRTIMER_MODE_REL);
+ slack = MIN(MAX(res, spl_schedule_hrtimeout_slack_us * NSEC_PER_USEC),
+ MAX_HRTIMEOUT_SLACK_US * NSEC_PER_USEC);
+ schedule_hrtimeout_range(&ktime_left, slack, HRTIMER_MODE_REL);
/* No more waiters a different mutex could be used */
if (atomic_dec_and_test(&cvp->cv_waiters)) {
| [No CFG could be retrieved] | Check if a non - zero value is left. Common function for the timedwait_hires method. | I'd like to avoid this math and if/then in this path. Can we set the "slack" as a global and only set it when changed? |
@@ -161,6 +161,15 @@ export class AmpLiveList extends AMP.BaseElement {
/** @private {?Element} */
this.pendingPagination_ = null;
+ /**
+ * Element that dynamically built this amp-live-list (if any).
+ * @private {?Element}
+ */
+ this.listBuilder_ = null;
+
+ /** @private {string} */
+ this.listBuilderId_ = '';
+
/**
* This is the count of items we treat as "active" (exclusing tombstone'd
* items). We increment it on insert operations done,
| [No CFG could be retrieved] | Initializes the items slot and the pagination slot. This method initializes the slots and attributes of the AMPL Live List. | nit: the "builder" suffix sounds to me like a utility class that is going to help build the list (maybe it's my Java side coming out...) Can we at least add an `el` or `element` suffix so it's clear that this is an element? |
@@ -20,6 +20,15 @@ from raiden.tests.fixtures.variables import * # noqa: F401,F403
from raiden.tests.utils.transport import make_requests_insecure
from raiden.utils.cli import LogLevelConfigType
+pytest.register_assert_rewrite('raiden.tests.utils.eth_node')
+pytest.register_assert_rewrite('raiden.tests.utils.factories')
+pytest.register_assert_rewrite('raiden.tests.utils.messages')
+pytest.register_assert_rewrite('raiden.tests.utils.network')
+pytest.register_assert_rewrite('raiden.tests.utils.protocol')
+pytest.register_assert_rewrite('raiden.tests.utils.smartcontracts')
+pytest.register_assert_rewrite('raiden.tests.utils.smoketest')
+pytest.register_assert_rewrite('raiden.tests.utils.transfer')
+
def pytest_addoption(parser):
parser.addoption(
| [pytest_addoption->[addoption],pytest_generate_tests->[list,getoption,append,extend,parametrize,set,range],dont_exit_pytest->[get_hub],_tmpdir_short->[getbasetemp->[Path,_trace,get,gettempdir,ensure_reset_dir,joinpath,format,make_numbered_dir_with_cleanup,mkdir,get_user]],tmpdir->[mktemp,sub,len],logging_level->[configure_logging,gettempdir,convert,join,LogLevelConfigType,utcnow],enable_greenlet_debugger->[debugger->[post_mortem,print_exception],get_hub],insecure_tls->[make_requests_insecure],enable_gevent_monitoring_signal->[signal],patch_all,fixture] | Add options related to pytest. | these are the modules inside `raiden.tests.utils` which use `assert` |
@@ -96,10 +96,11 @@ class AppKernel extends Kernel
$loader->load(__DIR__."/config/config_{$this->getEnvironment()}.yml");
+ $alg = class_exists(SodiumPasswordEncoder::class) && SodiumPasswordEncoder::isSupported() ? 'auto' : 'bcrypt';
$securityConfig = [
'encoders' => [
- User::class => 'bcrypt',
- UserDocument::class => 'bcrypt',
+ User::class => $alg,
+ UserDocument::class => $alg,
// Don't use plaintext in production!
UserInterface::class => 'plaintext',
],
| [AppKernel->[configureContainer->[loadFromExtension,setParameter,getEnvironment,load],configureRoutes->[import,getEnvironment],registerBundles->[getEnvironment]]] | Configures the container. Missing params for missing params. | Uhh... Symfony really screwed this one up. :x |
@@ -0,0 +1,10 @@
+class UserTipsQuery
+ def initialize(user)
+ @user = user
+ end
+
+ def unfinished(target = :all)
+ finished_tip_ids = @user.finished_tips.pluck(:tip_id)
+ Tip.where.not(id: finished_tip_ids).order(:id)
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | Unused method argument - `target`. If it's necessary, use `_` or `_target` as an argument name to indicate that it won't be used. You can also write as `unfinished(*)` if you want the method to accept any arguments but don't care about them. |
@@ -88,6 +88,11 @@ class ArchiveCropService(BaseService):
"""
width = doc['CropRight'] - doc['CropLeft']
height = doc['CropBottom'] - doc['CropTop']
+
+ if width < crop['width'] or width < crop['height']:
+ raise SuperdeskApiError.badRequestError(
+ message='Wrong crop size. Minimum crop size is {}x{}.'.format(crop['width'], crop['height']))
+
doc_ratio = round(width / height, 1)
spec_ratio = round(crop['width'] / crop['height'], 1)
if doc_ratio != spec_ratio:
| [ArchiveCropService->[_save_cropped_image->[delete]]] | Checks if the aspect ratio is consistent with one in defined in spec . | `height < crop['height']` ? |
@@ -98,15 +98,6 @@ class GeneralizationAcrossTime(object):
Duration of each classifier (in seconds). By default, equals one
time sample.
If None, empty dict. Defaults to None.
- predict_type : {'predict', 'predict_proba', 'decision_function'}
- Indicates the type of prediction:
- 'predict' : generates a categorical estimate of each trial.
-
- 'predict_proba' : generates a probabilistic estimate of each trial.
-
- 'decision_function' : generates a continuous non-probabilistic
- estimate of each trial.
- Default: 'predict'
predict_mode : {'cross-validation', 'mean-prediction'}
Indicates how predictions are achieved with regards to the cross-
validation procedure:
| [_sliding_window->[find_time_idx],GeneralizationAcrossTime->[score->[predict,fit],predict->[_DecodingTime],fit->[f],__init__->[_DecodingTime]],_time_gen_one_fold->[fit],_fit_slices->[fit],_predict->[predict]] | Parameters for the cross - validation model. The estimators for each time point and each fold. | not sure, predict proba is a more common use case, not? We should directly support it via the API in a dumb non-expert way. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.