patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -101,7 +101,9 @@ def pane_more_addons(request, section, version, platform, compat_mode=None):
ctx = {'featured_addons': from_api('featured')}
elif section == 'up-and-coming':
ctx = {'up_and_coming': from_api('hotness')}
- return render(request, 'legacy_discovery/more_addons.html', ctx)
+
+ content = render(request, 'legacy_discovery/more_addons.html', ctx)
+ return content
def get_modules(request, platform, version):
| [pane_more_addons->[from_api,get_compat_mode],pane->[from_api,get_compat_mode],pane_promos->[promos,get_compat_mode]] | Returns a list of more addons. | Irrelevant, I used this for debugging. I'll remove this and a few other unrelated changes. |
@@ -30,7 +30,7 @@ p = figure(plot_width=800, plot_height=300, title="US unemployment 1948—2016",
p.rect(x="Year", y="Month", width=1, height=1, source=source,
line_color=None, fill_color=transform('rate', mapper))
-color_bar = ColorBar(color_mapper=mapper, location=(0, 0),
+color_bar = ColorBar(color_mapper=mapper,
ticker=BasicTicker(desired_num_ticks=len(colors)),
formatter=PrintfTickFormatter(format="%d%%"))
| [PrintfTickFormatter,max,reversed,DataFrame,transform,figure,astype,show,output_file,rect,min,set_index,drop,ColumnDataSource,LinearColorMapper,list,len,add_layout,ColorBar,BasicTicker] | This function creates a plot of the NYTimes data. | just making sure I understand: the default location for colorbars is now outside the plot? I'm for that, but needs a release note |
@@ -87,7 +87,7 @@ module Dependabot
if ENV["DEBUG_FUNCTION"] == function
puts helper_subprocess_bash_command(stdin_data: stdin_data, command: cmd, env: env)
# Pause execution so we can run helpers inside the temporary directory
- byebug # rubocop:disable Lint/Debugger
+ binding.break # rubocop:disable Lint/Debugger
end
env_cmd = [env, cmd].compact
| [run_shell_command->[escape_command],run_helper_subprocess->[escape_command]] | Runs a helper subprocess that returns the result of running the given block of code. if the context is not found raise an exception. | Could have used the generic `debugger` here which is aliased in most (all?) debuggers, but |
@@ -57,14 +57,14 @@ class _TypeMetaclass(ABCMeta):
_typecache[wr] = wr
return inst
- def __call__(cls, *args, **kwargs):
+ def __call__(cls, *args: pt.Any, **kwargs: pt.Any) -> "Type":
"""
Instantiate *cls* (a Type subclass, presumably) and intern it.
If an interned instance already exists, it is returned, otherwise
the new instance is returned.
"""
inst = type.__call__(cls, *args, **kwargs)
- return cls._intern(inst)
+ return cls._intern(inst) # type: ignore[no-any-return]
def _type_reconstructor(reconstructor, reconstructor_args, state):
| [Type->[_determine_array_spec->[validate_slice]],_TypeMetaclass->[__call__->[__call__,_intern],_intern->[_autoincr]],Poison->[__unliteral__->[Poison]]] | Intern a object. | if you accept the suggestion about `NumbaTypeInst` then it would apply here and everywhere else where it says Type. |
@@ -300,6 +300,16 @@ export class AmpDoc {
contains(node) {
return this.getRootNode().contains(node);
}
+
+ /**
+ * Binding of macro to function used as part of any installed anchor click
+ * listener.
+ * @return {!Object<string, Object<string, string>>}
+ * @see src/anchor-click-interceptor#installAnchorClickInterceptor
+ */
+ getAnchorClickListenerBinding() {
+ return this.anchorClickListenerBinding_;
+ }
}
| [No CFG could be retrieved] | Provides a function to check if a node is in the DOM of the root document. Provides a function to check if a node is a single document. | seems change in this file not needed anymore |
@@ -119,7 +119,11 @@ namespace System.Net.Http
}
_http2Enabled = _poolManager.Settings._maxHttpVersion >= HttpVersion.Version20;
- _http3Enabled = _poolManager.Settings._maxHttpVersion >= HttpVersion.Version30 && (_poolManager.Settings._quicImplementationProvider ?? QuicImplementationProviders.Default).IsSupported;
+ // TODO: Replace with Platform-Guard Assertion Annotations once https://github.com/dotnet/runtime/issues/44922 is finished
+ if (OperatingSystem.IsLinux() || OperatingSystem.IsWindows() || OperatingSystem.IsMacOS())
+ {
+ _http3Enabled = _poolManager.Settings._maxHttpVersion >= HttpVersion.Version30 && (_poolManager.Settings._quicImplementationProvider ?? QuicImplementationProviders.Default).IsSupported;
+ }
switch (kind)
{
| [No CFG could be retrieved] | Initializes the HTTP connection pool. This method is used to set the configuration variables for a specific connection kind. | Hm, OSX should be accounted as MacOS but somehow that logic is left out of the analyzer, i will fix that soon. Could you use macOS for the attribute as a workaround `<SupportedOSPlatforms>Windows;Linux;MacOS</SupportedOSPlatforms>`? |
@@ -321,6 +321,7 @@ class DistributeTranspiler:
inputs={"X": splited_vars},
outputs={},
attrs={
+ "sync_mode": True,
"epmap": eplist,
RPC_OP_ROLE_ATTR_NAME: RPC_OP_ROLE_ATTR_VALUE
})
| [DistributeTranspiler->[_is_op_connected->[_append_inname_remove_beta],_append_pserver_ops->[_get_optimizer_input_shape,same_or_split_var],get_startup_program->[_get_splited_name_and_shape->[same_or_split_var],_get_splited_name_and_shape],_create_ufind->[_is_op_connected],_orig_varname->[_get_varname_parts],_get_optimize_pass->[_is_opt_role_op],transpile->[_init_splited_vars,_has_distributed_lookup_table],_is_splited_grad_var->[_orig_varname],get_pserver_program->[__op_have_grad_input__,__append_optimize_op__],get_trainer_program->[__str__],_init_splited_vars->[_update_dist_lookup_table_vars,slice_variable],_get_lr_ops->[_is_op_connected,_is_optimizer_op],_append_pserver_non_opt_ops->[_is_splited_grad_var],_is_opt_op_on_pserver->[same_or_split_var],_append_pserver_grad_merge_ops->[_get_varname_parts,_orig_varname]],slice_variable->[VarBlock]] | Transpiles a single n - node critical sequence. step 3. 2 - send the n - c - send op. Insert recv op to receive parameters from parameter server and insert send op to send parameters from parameter. | This seems temporary. Can you create an issue and assign to you and me? I feel that I need to think a bit more about it. |
@@ -54,3 +54,12 @@ def password(statement):
"""
logger.info(f"{statement}: ")
return getpass("")
+
+
+def path_input():
+ """Ask the user for a path.
+
+ Returns:
+ str: path entered by the user.
+ """
+ return _ask("")
| [_ask->[input,info,format,isatty],password->[info,getpass],confirm->[_ask,startswith],getLogger] | Ask the user for a password. str. | This one is only used in check-ignore, so let's make `ask` public and use it directly in `check-ignore`. |
@@ -85,10 +85,7 @@ class Configuration implements ConfigurationInterface
->arrayNode('upload')
->addDefaultsIfNotSet()
->children()
- ->integerNode('max_filesize')
- ->defaultValue(256)
- ->min(0)
- ->end()
+ ->scalarNode('max_filesize')->defaultValue('256MB')->end()
->end()
->end()
->arrayNode('format_manager')
| [Configuration->[addObjectsSection->[end],getConfigTreeBuilder->[root,addObjectsSection,end]]] | This method returns a TreeBuilder instance for the SuluMediaBundle configuration This method is used to configure a cache object with max_filesize. Adds the tree builder for the given mime - types. | For BC we should not change this type and keep this file as before |
@@ -267,7 +267,10 @@ class URLFetchStrategy(FetchStrategy):
@property
def curl(self):
if not self._curl:
- self._curl = which('curl', required=True)
+ try:
+ self._curl = which('curl', required=True)
+ except CommandNotFoundError as exc:
+ tty.error(str(exc))
return self._curl
def source_id(self):
| [_from_merged_attrs->[fetcher],SvnFetchStrategy->[_remove_untracked_files->[svn],fetch->[svn],reset->[svn,_remove_untracked_files]],for_package_version->[_from_merged_attrs,check_pkg_attributes,_extrapolate,_check_version_attributes,fetcher,BundleFetchStrategy],from_list_url->[URLFetchStrategy],_extrapolate->[URLFetchStrategy],S3FetchStrategy->[fetch->[warn_content_type_mismatch]],HgFetchStrategy->[fetch->[hg],reset->[hg]],from_url_scheme->[fetcher],GitFetchStrategy->[fetch->[_repo_info,git],reset->[git],__str__->[_repo_info]],FetchStrategyComposite->[source_id->[source_id]],URLFetchStrategy->[_fetch_from_url->[curl,warn_content_type_mismatch],check->[check],reset->[expand],_existing_url->[curl]],from_url->[URLFetchStrategy],from_kwargs->[fetcher,matches],CacheURLFetchStrategy->[fetch->[check]],FsCache->[fetcher->[CacheURLFetchStrategy],store->[archive]],GoFetchStrategy->[fetch->[go],expand->[_ensure_one_stage_entry],reset->[go]]] | Returns a object that can be used to identify a curl result. | Just to make sure I understand what's going on: This is because the calling code is a try/except block that catches the error? |
@@ -49,7 +49,8 @@ public class ElasticsearchConfig
{
public enum Security
{
- AWS
+ AWS,
+ PASSWORD,
}
private String host;
| [ElasticsearchConfig->[getKeystorePath->[ofNullable],getTruststorePassword->[ofNullable],getKeystorePassword->[ofNullable],getTrustStorePath->[ofNullable],getSecurity->[ofNullable],availableProcessors,Duration]] | Creates an instance of ElasticsearchConfig. The ElasticsearchConfig class. | add comma at the end |
@@ -223,7 +223,6 @@ func (s *RollingDeploymentStrategy) Deploy(from *corev1.ReplicationController, t
Timeout: time.Duration(*params.TimeoutSeconds) * time.Second,
MinReadySeconds: config.Spec.MinReadySeconds,
CleanupPolicy: PreserveRollingUpdateCleanupPolicy,
- MaxUnavailable: *params.MaxUnavailable,
OnProgress: func(oldRc, newRc *corev1.ReplicationController, percentage int) error {
if expect, ok := strat.Percentage(s.until); ok && percentage >= expect {
return strat.NewConditionReachedErr(fmt.Sprintf("Reached %s (currently %d%%)", s.until, percentage))
| [Deploy->[Percentage,Fprintln,Execute,Get,getUpdateAcceptor,Sprintf,NewConditionReachedErr,rollingUpdate,DecodeDeploymentConfig,Duration,DeployWithAcceptor,Poll,ReplicationControllers,Errorf,RecordConfigWarnings,IsNotFound,LabelForDeployment,Update],Write->[Split,HasPrefix,Fprintln,HasSuffix],CoreV1,NewHookExecutor,NewReplicationControllerScaleClient,NewAcceptAvailablePods,Update] | Deploy attempts to deploy a deployment from one replication controller to another. prepareForRollingUpdate prepares a rolling update of a deployment. This function is used to get a single cluster cluster cluster cluster cluster cluster cluster cluster cluster cluster MaxSurge and MaxUnavailable are optional. | @tnozicka removed because we set this below if not nil... i think this worked when we did conversion from internal? I wonder if we are not losing the default (1) or it is defaulted on server side. |
@@ -0,0 +1,3 @@
+<?php
+
+echo json_encode($vars);
\ No newline at end of file
| [No CFG could be retrieved] | No Summary Found. | Here we would implement some sort of serializer. IMO, we should make `ElggEntity` implement `Serializable` |
@@ -40,7 +40,7 @@
primaryTermInput = $( '#yoast-wpseo-primary-' + taxonomyName );
- primaryTermInput.val( termId );
+ primaryTermInput.val( termId ).trigger('change');
}
/**
| [No CFG could be retrieved] | Checks if the elements to make a term the primary term and the display for a primary term Find the term that is checked and show it in the interface. | Missing spaces before and after `'change'`. |
@@ -227,11 +227,9 @@ namespace Content.Server.Administration
}
}
- private string GenerateAHelpMessage(string username, string message, bool admin, bool noReceiver)
+ private string GenerateAHelpMessage(string username, string message, bool admin)
{
var stringbuilder = new StringBuilder();
- if (noReceiver)
- stringbuilder.Append(":sos:");
stringbuilder.Append(admin ? ":outbox_tray:" : ":inbox_tray:");
stringbuilder.Append(' ');
stringbuilder.Append(username);
| [BwoinkSystem->[Initialize->[Initialize],Update->[ProcessQueue,Update],ProcessQueue->[Header],Shutdown->[Shutdown],OnBwoinkTextMessage->[OnBwoinkTextMessage]]] | Override OnBwoinkTextMessage to add a bwoink message to the list of Generate a help message in a channel. | why remove this? |
@@ -115,6 +115,12 @@ import static org.springframework.data.jpa.domain.Specifications.where;
description = "Groups operations")
@Controller("groups")
public class GroupsApi {
+ /**
+ * Group name pattern with allowed chars. Group name may only contain alphanumeric characters or single hyphens.
+ * Cannot begin or end with a hyphen.
+ */
+ private static final String GROUPNAME_PATTERN = "^[a-zA-Z0-9]+([-_.@]?[a-zA-Z0-9]+)*$";
+
/**
* API logo note.
*/
| [GroupsApi->[getGroups->[getGroups],getImage->[getImage]]] | Provides a list of all groups in the system. This is a utility method to provide a message to the user. | This regular expression doesn't match what is described in the description of the PR: > * **Group names:** Alphanumeric characters or single hyphens. Cannot begin or end with a hyphen. |
@@ -20,8 +20,11 @@ namespace Content.Server.Atmos.Components
{
public override string Name => "Barotrauma";
- [DataField("damageType", required: true)]
- private readonly string _damageType = default!;
+ // TODO PROTOTYPE Replace this datafield variable with prototype references, once they are supported.
+ [Robust.Shared.IoC.Dependency] private readonly IPrototypeManager _prototypeManager = default!;
+ [DataField("damageType")]
+ private readonly string _damageTypeID = "Blunt";
+ private DamageTypePrototype _damageType => _prototypeManager.Index<DamageTypePrototype>(_damageTypeID);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Update(float airPressure)
| [BarotraumaComponent->[Update->[HazardHighPressure,Owner,Pressure,Max,ChangeDamage,ShowAlert,Min,HazardLowPressure,MaxHighPressureDamage,AggressiveInlining,TryGetComponent,LowPressure,LowPressureMultiplier,WarningHighPressure,HighPressure,PressureDamageCoefficient,LowPressureDamage,HighPressureMultiplier,GetDamageType,WarningLowPressure]]] | Updates the alert with a new air pressure. - Check if there is an alert category in the list of alert categories. | just import Robust.Shared.IoC and use [Dependency] |
@@ -37,12 +37,12 @@ class RGtools(RPackage):
match ('smartbind')
- generate significance stars from p-values ('stars.pval')
- convert characters to/from ASCII codes.
-
"""
homepage = "https://cloud.r-project.org/package=gtools"
url = "https://cloud.r-project.org/src/contrib/gtools_3.5.0.tar.gz"
list_url = "https://cloud.r-project.org/src/contrib/Archive/gtools"
+ version('3.8.2', sha256='503ba60a41f3c61b8129c25de62c74dab29761d2e661d4addd106e2e02f1dcde')
version('3.8.1', sha256='051484459bd8ad1b03425b8843d24f6828fea18f7357cfa1c192198cc3f4ba38')
version('3.5.0', sha256='86b6a51a92ddb3c78095e0c5dc20414c67f6e28f915bf0ee11406adad3e476f6')
| [RGtools->[version]] | Get a list of significance stars for a given p - value. | Spack removes newline characters from the description when running `spack info`, so this won't format well. Maybe add semicolons at the end of each bullet point? |
@@ -282,8 +282,10 @@ var _ = g.Describe("idling and unidling", func() {
})
g.It("should work with TCP (when fully idled) [Conformance] [local]", func() {
+ err := exutil.WaitForUserBeAuthorized(oc, oc.Username(), "create", "endpoints/restricted")
+ o.Expect(err).ToNot(o.HaveOccurred())
g.By("Idling the service")
- _, err := oc.Run("idle").Args("--resource-names-file", idlingFile).Output()
+ _, err = oc.Run("idle").Args("--resource-names-file", idlingFile).Output()
o.Expect(err).ToNot(o.HaveOccurred())
g.By("Waiting for the pods to have terminated")
| [Context,KubeClient,By,XIt,BeTemporally,CoreV1,TempFile,Expect,Now,HaveOccurred,Close,SetDeadline,HaveKey,FixturePath,It,Eventually,ReadFromUDP,DialUDP,ShouldNot,Add,Done,Should,Args,To,Errorf,Services,Namespace,Wait,KubeFramework,ContainSubstring,BeNil,Join,Equal,Output,NewCLI,BeEmpty,BeforeEach,Endpoints,Name,Remove,JustBeforeEach,Read,Get,ParseIP,Split,NotTo,SetReadDeadline,Write,Describe,Sprintf,DialTCP,Unmarshal,AfterEach,ToNot,Consistently,GinkgoRecover,Parse,Run,Verbose,KubeConfigPath] | BeforeEach - Tests the tests for the Ethereum Ethereum service. Expects that the service is running in the idle state. | Where is this permission being added? |
@@ -188,7 +188,7 @@ namespace System.Data.Common
return (DbProviderFactory)factory;
}
-
+ [RequiresUnreferencedCode(DataSet.RequiresUnreferencedCodeMessage)]
private static Type GetProviderTypeFromTypeName(string assemblyQualifiedName)
{
Type? providerType = Type.GetType(assemblyQualifiedName);
| [DbProviderFactories->[RegisterFactory->[RegisterFactory],GetFactory->[RegisterFactory]]] | Get the factory instance. | Same here, we should probably adjust message to just say here that the reason why this is unsafe is because we are calling Type.GetType(string) #Closed |
@@ -1237,13 +1237,7 @@ public final class OpenSslEngine extends SSLEngine {
}
String prefix = toJavaCipherSuitePrefix(SSL.getVersion(ssl));
- String converted = CipherSuiteConverter.toJava(openSslCipherSuite, prefix);
- if (converted != null) {
- openSslCipherSuite = converted;
- } else {
- openSslCipherSuite = prefix + '_' + openSslCipherSuite.replace('-', '_');
- }
- return openSslCipherSuite;
+ return CipherSuiteConverter.toJava(openSslCipherSuite, prefix);
}
/**
| [OpenSslEngine->[closeInbound->[shutdown],finalize->[finalize,shutdown],handshake->[shutdown],closeOutbound->[shutdown],getSession->[getPeerPrincipal->[getPeerCertificates],getLastAccessedTime->[getCreationTime],getPeerCertificates->[initPeerCertChain],getLocalPrincipal->[getLocalCertificates]],memoryAddress->[memoryAddress],unwrap->[shutdown,writeEncryptedData,unwrap,readPlaintextData],wrap->[readEncryptedData,writePlaintextData,shutdown]]] | converts the cipher suite to the Java cipher suite. | so `CipherSuiteConverter.toJava` can not return null ? |
@@ -86,8 +86,10 @@ func (m OpInfluence) GetRegionsInfluence() map[uint64]*Operator {
// StoreInfluence records influences that pending operators will make.
type StoreInfluence struct {
RegionSize int64
+ RegionRows int64
RegionCount int64
LeaderSize int64
+ LeaderRows int64
LeaderCount int64
}
| [GetAdjacentRegions->[GetAdjacentRegions],GetLeaderStore->[GetStore],GetStore->[GetStore],GetAverageRegionSize->[GetAverageRegionSize],RandLeaderRegion->[RandLeaderRegion],GetRegionStores->[GetStore],UnblockStore->[UnblockStore],RandFollowerRegion->[RandFollowerRegion],GetRegion->[GetRegion],GetStores->[GetStores],BlockStore->[BlockStore],GetFollowerStores->[GetStore]] | ResourceSize returns the size of a resource in bytes. | I think we can exclude `RegionRows` and `LeaderRows` in `StoreInfluence`. |
@@ -329,7 +329,7 @@ class HadoopFileSystemTest(unittest.TestCase):
url = self.fs.join(self.tmpdir, 'new_file')
handle = self.fs.create(url)
self.assertIsNotNone(handle)
- url = self.fs._parse_url(url)
+ _, url = self.fs._parse_url(url)
expected_file = FakeFile(url, 'wb')
self.assertEqual(self._fake_hdfs.files[url], expected_file)
| [FakeHdfs->[write->[FakeHdfsError,FakeFile],checksum->[FakeHdfsError,get_file_checksum],status->[get_file_status,FakeHdfsError],makedirs->[FakeFile],walk->[status],delete->[status,list,FakeHdfsError],list->[get_file_status],read->[write,FakeHdfsError,FakeFile],rename->[status,FakeHdfsError]],HadoopFileSystemTest->[test_rename_directory->[write,rename],test_rename_file_error->[write,rename],test_open->[read],test_checksum->[write,checksum],test_delete_dir->[delete],setUp->[FakeHdfs],_cmpfiles->[read],test_copy_file_error->[_cmpfiles,write],test_rename_file->[write,rename],test_delete_file->[delete],test_copy_file_overwrite_error->[write],test_copy_file->[_cmpfiles,write],test_copy_directory->[_cmpfiles,write],test_delete_error->[delete],test_create_write_read_compressed->[close,write,read,FakeFile],test_create_success->[FakeFile],test_copy_directory_overwrite_error->[write],test_size->[size,write]],HadoopFileSystemRuntimeValueProviderTest->[test_dict_options_missing->[FakeHdfs],test_dict_options->[FakeHdfs]],FakeFile->[close->[close],__exit__->[close],__init__->[__init__]]] | Create a new file with a specific name and write it to disk. | Test `server` is None, here and below? |
@@ -1,3 +1,4 @@
from .settings import *
SECRET_KEY = 'NOTREALLY'
+OPENEXCHANGE['APP_ID'] = SECRET_KEY
\ No newline at end of file
| [No CFG could be retrieved] | Set the default secret key for the user. | Not sure why it does that. These two are unrelated. Missing endline. |
@@ -124,7 +124,7 @@ class VirtualHost(object): # pylint: disable=too-few-public-methods
strip_name = re.compile(r"^(?:.+://)?([^ :$]*)")
def __init__(self, filep, path, addrs, ssl, enabled, name=None,
- aliases=None, modmacro=False, ancestor=None):
+ aliases=None, modmacro=False, ancestor=None, node=None):
# pylint: disable=too-many-arguments
"""Initialize a VH."""
| [VirtualHost->[__hash__->[get_names],same_server->[get_names],__eq__->[get_names],__ne__->[__eq__],conflicts->[conflicts],display_repr->[get_names]],Addr->[get_sni_addr->[is_wildcard],conflicts->[_addr_less_specific],__ne__->[__eq__]]] | Initialize a VH object. | We should put this parameter as an attribute in the docstring above. |
@@ -61,6 +61,10 @@ public class MyAccount extends AnkiActivity {
Toolbar mToolbar = null;
private TextInputLayout mPasswordLayout;
+ private ImageView mAnkidroidLogo;
+
+ private OrientationEventListener myOrientationEventListener ;
+
private void switchToState(int newState) {
switch (newState) {
| [MyAccount->[onPostExecute->[saveUserInformation,switchToState],logout->[switchToState],login->[login],initAllContentViews->[logout,resetPassword,attemptLogin,login],onCreate->[onCreate,switchToState],onKeyDown->[onKeyDown]]] | Switch to a specific state. | I think both of these can be moved inside the method. They're only used in `initAllContentViews` |
@@ -42,11 +42,7 @@ import org.apache.hadoop.ozone.client.io.OzoneInputStream;
import org.apache.hadoop.ozone.client.io.OzoneOutputStream;
import org.apache.hadoop.ozone.om.OMConfigKeys;
import org.apache.hadoop.ozone.om.exceptions.OMException;
-import org.apache.hadoop.ozone.om.helpers.OmMultipartInfo;
-import org.apache.hadoop.ozone.om.helpers.OmMultipartUploadCompleteInfo;
-import org.apache.hadoop.ozone.om.helpers.OzoneFileStatus;
-import org.apache.hadoop.ozone.om.helpers.RepeatedOmKeyInfo;
-import org.apache.hadoop.ozone.om.helpers.S3SecretValue;
+import org.apache.hadoop.ozone.om.helpers.*;
import org.apache.hadoop.ozone.om.protocol.OzoneManagerProtocol;
import org.apache.hadoop.ozone.om.protocol.S3Auth;
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRoleInfo;
| [No CFG could be retrieved] | Imports the objects from the OOM library. Imports the Ozone object and creates a client - side object. | Please replace star import with individual imports. |
@@ -16,7 +16,7 @@ func ToProto(user string, namespace string, rl rulefmt.RuleGroup) *RuleGroupDesc
rg := RuleGroupDesc{
Name: rl.Name,
Namespace: namespace,
- Interval: &dur,
+ Interval: dur,
Rules: formattedRuleToProto(rl.Rules),
User: user,
}
| [FromMap,FromLabelsToLabelAdapters,GetAlert,GetFor,Duration,GetName,GetRules,FromLabelAdaptersToLabels,Map,GetExpr,GetRecord] | ToProto imports a formatted prometheus rulegroup to a protobuf rule group Get formatted RuleGroup for a given duration. | Now there's no more need to assign `dur` above. You can just call `time.Duration(rl.Interval)` here. |
@@ -467,8 +467,12 @@ def analyze_class_attribute_access(itype: Instance,
return builtin_type('types.ModuleType')
if is_decorated:
- # TODO: Return type of decorated function. This is quick hack to work around #998.
- return AnyType(TypeOfAny.special_form)
+ assert isinstance(node.node, Decorator)
+ if node.node.type:
+ return node.node.type
+ else:
+ not_ready_callback(name, context)
+ return AnyType(TypeOfAny.special_form)
else:
return function_type(cast(FuncBase, node.node), builtin_type('builtins.function'))
| [add_class_tvars->[add_class_tvars],analyze_class_attribute_access->[handle_partial_attribute_type],bind_self->[expand,bind_self],analyze_member_access->[analyze_member_access]] | Analyze a class attribute access. Return the type of . | I thought that we normally return `TypeOfAny.from_error` in all cases where the may be an error. |
@@ -66,6 +66,11 @@ class Geolocalization(graphene.ObjectType):
class Shop(graphene.ObjectType):
available_payment_gateways = graphene.List(
graphene.NonNull(PaymentGateway),
+ currency=graphene.Argument(
+ graphene.String,
+ description="A currency for which gateways will be returned.",
+ required=False,
+ ),
description="List of available payment gateways.",
required=True,
)
| [Shop->[resolve_translation->[resolve_translation],resolve_navigation->[Navigation],resolve_domain->[Domain],resolve_geolocalization->[Geolocalization]]] | A class that represents a specific authorization key. True if the object is not null. | Not sure of this. - How storefront will fetch what currencies are available for the shop? - IMO `PaymentGateway` type should also have a field `currencies` or `supported_currencies`. - It would be easier for storefronts with multiple currencies support. |
@@ -142,7 +142,7 @@ def reindex_tasks_group(index_name):
from olympia.stats.management.commands.index_stats import (
gather_index_stats_tasks
)
- return gather_index_stats_tasks(index_name)
+ return group(gather_index_stats_tasks(index_name))
def get_mappings():
| [extract_download_count->[es_dict],create_new_index->[get_alias],extract_update_count->[es_dict]] | Return a group of tasks to execute for a full reindex of stats on the given index_. | Goes with the change mentioned above, for consistency both `reindex_tasks_group` functions for stats and addons return a flat `group` of tasks. |
@@ -236,7 +236,7 @@ public class HoodieInputFormatUtils {
return false;
})
.collect(Collectors.joining(","));
- return Option.of(incrementalInputPaths);
+ return StringUtils.isNullOrEmpty(incrementalInputPaths) ? Option.empty(): Option.of(incrementalInputPaths);
}
/**
| [HoodieInputFormatUtils->[filterFileStatusForSnapshotMode->[getFileStatus],getInputFormat->[getInputFormat],getFilteredCommitsTimeline->[filterInstantsTimeline],filterIncrementalFileStatus->[getFileStatus],getFileStatus->[getFileStatus],refreshFileStatus->[getFileStatus]]] | Returns the list of partitions that have incremental changes. Returns an Option that can be used to specify the input paths that are not yet in the. | Looks fine, can we have some test case there ? |
@@ -33,13 +33,13 @@ spec:
name: http
protocol: HTTP
hosts:
- - <%= app.baseName.toLowerCase() %>.<%= kubernetesNamespace %><%= ingressDomain %>
+ - <%= app.baseName.toLowerCase() %>.<%= ingressDomain %>
- port:
number: 80
name: http2
protocol: HTTP2
hosts:
- - <%= app.baseName.toLowerCase() %>.<%= kubernetesNamespace %><%= ingressDomain %>
+ - <%= app.baseName.toLowerCase() %>.<%= ingressDomain %>
---
apiVersion: <%= KUBERNETES_ISTIO_NETWORKING_API_VERSION %>
kind: VirtualService
| [No CFG could be retrieved] | This function returns a description of the object that represents a single . Exception - handler for the N - HTTP - Gateway response. | I see no harm in having the host name like this (without K8s namespace). Since this will be deployed to a specific namespace, 'host' would get resolved automatically. But, as you know, in general, services (normal/headless) in k8s (without any modification) get assigned a default DNS 'A' name record of the form {service_name}.{namespace}.svc.{internal_domain_name}. So '<%= kubernetesNamespace %>' as part of the host look-up is in-line with the default naming convention. Same logic is applicable in all other places as well. To resolve an external domain properly, add a wild-card 'A' name record for the base domain. For example if the base domain is, let's say jhip-k8s.jhipster.com, then the 'A' name record should be *. jhip-k8s.jhipster.com A <LB_IP> This would resolve all the services properly like (jaeger.istio-system.jhip-k8s.jhipster.com, account.space1.jhip-k8s.jhipster.com etc.) |
@@ -65,3 +65,6 @@ class CommunicationIdentityClientTest(CommunicationTestCase):
identity_client.delete_user(user)
assert user.identifier is not None
+
+ def get_endpoint_from_connection_string(self, connection_string):
+ return connection_string.split("=")[1].split("/;")[0]
| [CommunicationIdentityClientTest->[test_create_user->[create_user,from_connection_string],test_delete_user->[create_user,delete_user,from_connection_string],test_revoke_tokens->[create_user,revoke_tokens,issue_token,from_connection_string],test_issue_token->[create_user,issue_token,from_connection_string],setUp->[super,BodyReplacerProcessor,URIIdentityReplacer,extend],ResourceGroupPreparer,CommunicationServicePreparer]] | Test delete user. | inside `_shared/utils` there is a method for parsing connection string. Let's use that. |
@@ -16,8 +16,11 @@ class Admin {
* Construction.
*/
public function __construct() {
- add_action( 'admin_menu', array( $this, 'register_submenu_page' ), 1000 );
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
+ if ( ! did_action( 'jetpack_on_connection_ui_init' ) ) {
+ add_action( 'admin_menu', array( $this, 'register_submenu_page' ), 1000 );
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
+ do_action( 'jetpack_on_connection_ui_init' );
+ }
}
/**
| [Admin->[get_initial_state->[render],enqueue_scripts->[get_initial_state]]] | This method is called by the constructor of the class. | Do you think you could add a docblock here for this new hook? The docblocks make it possible to extract data into a codex, and may be useful for our future selves needing to use that hook. :) |
@@ -116,6 +116,12 @@ SHOWFOR_DATA = {
}
+def _remove_en_slug_prefix(slug):
+ if slug.startswith('en/'):
+ slug = slug.replace('en/', '')
+ return slug
+
+
def process_document_path(func, reverse_name='wiki.document'):
"""Decorator to process document_path into locale and slug, with
auto-redirect if necessary."""
| [edit_document->[_get_document_for_json,_join_slug,_split_slug,_format_attachment_obj],get_children->[_make_doc_structure->[_make_doc_structure],_make_doc_structure],_document_PUT->[_split_slug],mindtouch_to_kuma_redirect->[mindtouch_namespace_redirect],json_view->[_get_document_for_json],new_attachment->[_format_attachment_obj],_version_groups->[split_slug],translate->[_join_slug,_split_slug],document->[set_common_headers,_split_slug,_format_attachment_obj],autosuggest_documents->[_get_document_for_json],_version_groups] | Decorator to process document_path into locale and slug with auto - redirect if necessary. Process a sequence number. | Do we know why this is happening in slugs? This seems like a band-aid fix. And I ask this because... is "en/" special? why? will we have a similar issue with other things that look like legacy Mindtouch locales? |
@@ -28,7 +28,7 @@ namespace System.IO.Pipes
SafePipeHandle? clientHandle = null;
try
{
- socket.Connect(new UnixDomainSocketEndPoint(_normalizedPipePath));
+ socket.Connect(new UnixDomainSocketEndPoint(_normalizedPipePath!));
clientHandle = new SafePipeHandle(socket);
ConfigureSocket(socket, clientHandle, _direction, 0, 0, _inheritability);
}
| [NamedPipeClientStream->[TryConnect->[SocketErrorCode,Stream,Unix,ConfigureSocket,Asynchronous,Connected,ConnectionRefused,Dispose,Connect,AddressNotAvailable,Unspecified,ValidateRemotePipeUser,AddressAlreadyInUse,InitializeHandle],ValidateRemotePipeUser->[CreateExceptionForLastError,GetPeerID,GetEUid,UnauthorizedAccess_NotOwnedByCurrentUser],CheckPipePropertyOperations,NotSupported_UnwritableStream,NotSupported_UnreadableStream]] | Try to connect to the pipe. | Assume it is intended #Closed |
@@ -155,6 +155,10 @@ public class MuleClassPathClassifier implements ClassPathClassifier
pluginClassifications.add(extensionClassPathClassification(extensionClass, extensionMavenArtifactId, extendedContext));
}
}
+ else
+ {
+ logger.debug("There are no extensions in classpath, exportClasses would be ignored");
+ }
if (!isRootArtifactIdAnExtension && new File(extendedContext.getTargetTestClassesFolder().getParentFile(), CLASSES_FOLDER_NAME).exists())
{
| [MuleClassPathClassifier->[extensionClassPathClassification->[createExtensionManager]]] | Build the list of plugin classifications for the given extension. add plugin classifications. | in the classpath |
@@ -1896,13 +1896,11 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
// even if we want to offer this atomic operation, CopyOnWriteArrayList
// offers no such operation
public void setViews(Collection<View> views) throws IOException {
- BulkChange bc = new BulkChange(this);
- try {
+ try (BulkChange bc = new BulkChange(this)) {
this.views.clear();
for (View v : views) {
addView(v);
}
- } finally {
bc.commit();
}
}
| [Jenkins->[getUser->[get],_cleanUpShutdownTcpSlaveAgent->[add],setNumExecutors->[updateComputerList],getPlugin->[getPlugin],getCategorizedManagementLinks->[all,add],getViewActions->[getActions],getJDK->[getJDKs,get],setViews->[addView],getCloud->[getByName],getStaplerFallback->[getPrimaryView],getStoredVersion->[get],getViews->[getViews],doDoFingerprintCheck->[isUseCrumbs],deleteView->[deleteView],getLabel->[get],_cleanUpInterruptReloadThread->[add],doConfigSubmit->[save,updateComputerList],CloudList->[onModified->[onModified]],doCheckDisplayName->[isNameUnique,isDisplayNameUnique],_cleanUpPersistQueue->[save,add],getLabelAtom->[get],setBuildsAndWorkspacesDir->[isDefaultWorkspaceDir,isDefaultBuildDir],reload->[loadTasks,save,reload,executeReactor],doConfigExecutorsSubmit->[all,updateComputerList],DescriptorImpl->[getDynamic->[getDescriptor],DescriptorImpl],checkRawBuildsDir->[expandVariablesForDirectory],_cleanUpShutdownThreadPoolForLoad->[add],isDisplayNameUnique->[getDisplayName],_cleanUpRunTerminators->[onTaskFailed->[getDisplayName],execute->[run],onTaskCompleted->[getDisplayName],onTaskStarted->[getDisplayName],add],getJobNames->[getFullName,add],doChildrenContextMenu->[add,getViews,getDisplayName],doLogout->[doLogout],getActiveInstance->[get],getNode->[getNode],copy->[copy],shouldShowStackTrace->[getName],updateNode->[updateNode],doSubmitDescription->[doSubmitDescription],doCheckURIEncoding->[doCheckURIEncoding],getItem->[getItem,get],doViewExistsCheck->[getView],getUnprotectedRootActions->[getActions,add],setAgentProtocols->[add],disableSecurity->[setSecurityRealm],onViewRenamed->[onViewRenamed],getDescriptorByName->[getDescriptor],loadConfig->[getConfigFile],getRootUrl->[get],refreshExtensions->[getInstance,add,getExtensionList],getRootPath->[getRootDir],getView->[getView],putItem->[get],_cleanUpShutdownTimer->[add],_cleanUpDisconnectComputers->[run->[add]],getAllThreadDumps->[get,getComputers],createProject->[createProject,getDescriptor],MasterComputer->[doConfigSubmit->[doConfigExecutorsSubmit],hasPermission->[hasPermission],get],createProjectFromXML->[createProjectFromXML],getAgentProtocols->[add],doScript->[getView,getACL],_cleanUpReleaseAllLoggers->[add],isRootUrlSecure->[getRootUrl],EnforceSlaveAgentPortAdministrativeMonitor->[doAct->[forceSetSlaveAgentPort,getExpectedPort],isActivated->[get,getSlaveAgentPortInitialValue],getExpectedPort->[getSlaveAgentPortInitialValue]],setSecurityRealm->[get],getItems->[getItems,add],doCheckViewName->[getView,checkGoodName],removeNode->[removeNode],getSelfLabel->[getLabelAtom],fireBeforeShutdown->[all,add],doSimulateOutOfMemory->[add],restartableLifecycle->[get],expandVariablesForDirectory->[expandVariablesForDirectory,getFullName],_getFingerprint->[get],getManagementLinks->[all],addView->[addView],getPlugins->[getPlugin,getPlugins,add],save->[getConfigFile],getPrimaryView->[getPrimaryView],makeSearchIndex->[get->[getView],makeSearchIndex,add],getNodes->[getNodes],lookup->[get,getInstanceOrNull],getLegacyInstanceId->[getSecretKey],saveQuietly->[save],getLifecycle->[get],getInstanceOrNull->[getInstance],executeReactor->[containsLinkageError->[containsLinkageError],runTask->[runTask]],setNodes->[setNodes],loadTasks->[run->[setSecurityRealm,getExtensionList,getNodes,setNodes,remove,add,loadConfig],add],remove->[remove],getDescriptorOrDie->[getDescriptor],getLabelAtoms->[add],getItemByFullName->[getItemByFullName,getItem],doCreateView->[addView],getExtensionList->[get,getExtensionList],getLabels->[add],restart->[restartableLifecycle],isNameUnique->[getItem],getWorkspaceFor->[all],_cleanUpShutdownPluginManager->[add],getRootDirFor->[getRootDirFor,getRootDir],canDelete->[canDelete],getInstance->[getInstanceOrNull],getFingerprint->[get],getAuthentication->[getAuthentication2],doScriptText->[getView,getACL],getDynamic->[getActions],_cleanUpPluginServletFilters->[cleanUp,add],_cleanUpShutdownTriggers->[add],addNode->[addNode],getTopLevelItemNames->[add],MasterRestartNotifyier->[onRestart->[all]],doQuietDown->[doQuietDown,isQuietingDown],safeRestart->[restartableLifecycle],updateComputerList->[updateComputerList],rebuildDependencyGraphAsync->[call->[get,rebuildDependencyGraph]],getConfiguredRootUrl->[get],_cleanUpAwaitDisconnects->[get,add],readResolve->[getSlaveAgentPortInitialValue],getName,get]] | Sets the views in this view group. | This doesn't look like it's the same, but it also looks like it might fix a bug ? |
@@ -1,15 +1,15 @@
package cmds
import (
- "encoding/json"
"fmt"
"io"
"os"
"text/tabwriter"
+ "github.com/Jeffail/gabs"
"github.com/golang/protobuf/jsonpb"
"github.com/pachyderm/pachyderm"
- "github.com/pachyderm/pachyderm/src/client"
+ pach "github.com/pachyderm/pachyderm/src/client"
ppsclient "github.com/pachyderm/pachyderm/src/client/pps"
pkgcmd "github.com/pachyderm/pachyderm/src/server/pkg/cmd"
"github.com/pachyderm/pachyderm/src/server/pps/example"
| [InspectJob,MustAsset,Close,PrintJobInfo,ErrorAndExit,RunFixedArgs,CreateJob,Flush,Error,PrintPipelineInfo,Usage,ListPipeline,NewFromAddress,StringVarP,GetLogs,RunPipelineSpec,NewWriter,DeletePipeline,CreateJobRequest,CreatePipeline,InspectPipeline,NewDecoder,MarshalToString,PrintJobHeader,Println,PrintPipelineHeader,Sprintf,Background,ListJob,Unmarshal,Decode,Print,UnmarshalString,Open,ParseCommits,BoolVarP,Flags] | cmds import imports a list of commands from the given address. exampleCreateJob creates a new job from a pipeline spec. | I've been using `c` for the variable name to avoid this conflict. But this works too. |
@@ -34,15 +34,18 @@ class OutputStream(object):
def __init__(self):
self.data = []
+ self.byte_count = 0
def write(self, b, nested=False):
assert isinstance(b, bytes)
if nested:
self.write_var_int64(len(b))
self.data.append(b)
+ self.byte_count += len(b)
def write_byte(self, val):
self.data.append(chr(val).encode('latin-1'))
+ self.byte_count += 1
def write_var_int64(self, v):
if v < 0:
| [ByteCountingOutputStream->[write->[write_var_int64]],InputStream->[read_all->[size,read],read_bigendian_int32->[read],read_bigendian_double->[read],read_bigendian_uint64->[read],read_bigendian_int64->[read]],OutputStream->[write_bigendian_int32->[write],write_bigendian_uint64->[write],write_bigendian_int64->[write],write_var_int64->[write_byte],write_bigendian_double->[write]]] | Initialize object. | Nit: Shall we rely on ` len(self.data)` instead of creating and managing a new field. |
@@ -54,7 +54,8 @@ def type_callable(func):
_overload_default_jit_options = {'no_cpython_wrapper': True}
-def overload(func, jit_options={}, strict=True, inline='never'):
+def overload(func, jit_options={}, strict=True, inline='never',
+ signatures=None):
"""
A decorator marking the decorated function as typing and implementing
*func* in nopython mode.
| [register_jitable->[wrap->[overload],wrap],_Intrinsic->[__reduce__->[reduce_func],_rebuild->[_register,_set_uuid]],make_attribute_wrapper->[struct_getattr_impl->[get_attr_fe_type],StructAttribute->[generic_resolve->[get_attr_fe_type]]],BoundLiteralArgs->[bind->[sentry_literal_args]],overload_attribute->[decorate->[overload]],overload_method->[decorate->[overload]],intrinsic->[wrapper->[_intrinsic],_intrinsic->[_register,_Intrinsic],_intrinsic]] | A function decorator to overload a function with a Numba type. Load template function with missing parameters. | The signatures arguments can be removed for this PR. |
@@ -431,7 +431,7 @@ app.use(['/examples/*', '/extensions/*'], function (req, res, next) {
next();
});
-app.get('/examples/*', function(req, res, next) {
+app.get(['/examples/*', '/test/manual/*'], function(req, res, next) {
var filePath = req.path;
var mode = getPathMode(filePath);
if (!mode) {
| [No CFG could be retrieved] | Proxy with unminified JS. Replace URLs in file with absolute paths. | Could you explain a lit what does this do? |
@@ -184,6 +184,17 @@ class Wallets:
return 0
possible_stake = (available_amount + val_tied_up) / self._config['max_open_trades']
+
+ # Position Adjustment dynamic base order size
+ try:
+ if self._config.get('position_adjustment_enable', False):
+ base_stake_amount_ratio = self._config.get('base_stake_amount_ratio', 1.0)
+ if base_stake_amount_ratio > 0.0:
+ possible_stake = possible_stake * base_stake_amount_ratio
+ except Exception as e:
+ logger.warning("Invalid base_stake_amount_ratio", e)
+ return 0
+
# Theoretical amount can be above available amount - therefore limit to available amount!
return min(possible_stake, available_amount)
| [Wallets->[get_available_stake_amount->[get_free,get_total_stake_amount],get_starting_balance->[get_free],get_trade_stake_amount->[_check_available_stake_amount,get_available_stake_amount,update,_calculate_unlimited_stake_amount,get_free,get_total],update->[_update_live,_update_dry],validate_stake_amount->[get_available_stake_amount],_update_live->[Wallet],get_total_stake_amount->[get_free],_update_dry->[Wallet]]] | Calculate unlimited stake amount for unlimited trades. | Do we really need this as a parameter? considering we have `custom_stake_amount` to customize stake-amount - we could also just defer this logic to the strategy (it get's the "proposed stake" - so you can just do `proposed_stake / max_entries` in the strategy. Also, assuming your "scaling in" depends on the situation / pair, and will be anywhere between 1 and 10 trades - you'd never be able to (correctly) capture this with a parameter anyway |
@@ -418,7 +418,10 @@ abstract class WPSEO_Option {
public function register_setting() {
if ( WPSEO_Capability_Utils::current_user_can( 'wpseo_manage_options' ) ) {
if ( $this->multisite_only === true ) {
- Yoast_Network_Settings_API::get()->register_setting( $this->group_name, $this->option_name );
+ $network_settings_api = Yoast_Network_Settings_API::get();
+ if ( $network_settings_api->meets_requirements() ) {
+ $network_settings_api->register_setting( $this->group_name, $this->option_name );
+ }
return;
}
| [WPSEO_Option->[clean->[get_original_option],get_original_option->[add_option_filters,remove_option_filters,add_default_filters,remove_default_filters],array_filter_merge->[get_defaults],register_setting->[register_setting],validate->[get_defaults,remove_default_filters],import->[update_site_option,get_defaults],update_site_option->[add_default_filters,remove_default_filters],maybe_add_option->[get_defaults,get_original_option]]] | Register the current setting. | Is there any way to combat this extra level of nesting? |
@@ -145,6 +145,16 @@ OPENSSL_CTX *OPENSSL_CTX_new(void)
return ctx;
}
+#ifndef FIPS_MODE
+int OPENSSL_CTX_load_config(OPENSSL_CTX *ctx, const char *config_file)
+{
+ if (!OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL))
+ return 0;
+
+ return CONF_modules_load_file_with_libctx(ctx, config_file, NULL, 0) > 0;
+}
+#endif
+
void OPENSSL_CTX_free(OPENSSL_CTX *ctx)
{
if (ctx != NULL)
| [openssl_ctx_run_once->[openssl_ctx_get_concrete],openssl_ctx_get_data->[openssl_ctx_get_concrete],openssl_ctx_get_ex_data_global->[openssl_ctx_get_concrete],int->[openssl_ctx_get_concrete]] | OpensSSL_CTX_new - creates new OPENSSL_CTX object if not. | Why is this needed? It seems unnecessary? |
@@ -201,6 +201,12 @@ public final class UnitChooser extends JPanel {
final Collection<Unit> units,
final UnitSeparator.SeparatorCategories separatorCategories,
final Collection<Unit> defaultSelections) {
+ spaceRequiredForNonWithdrawableIcon = units
+ .stream()
+ .anyMatch(unit->
+ Properties.getPartialAmphibiousRetreat(unit.getOwner().getData().getProperties())
+ && unit.getWasAmphibious());
+
final Collection<UnitCategory> categories =
UnitSeparator.categorize(units, separatorCategories);
final Collection<UnitCategory> defaultSelectionsCategorized =
| [UnitChooser->[selectNone->[selectNone],setMax->[changedValue],ChooserEntry->[size->[size],getFinalHit->[getHits],addChangeListener->[addChangeListener],updateLeftToSelect->[setMax,getMax],createComponents->[addChangeListener],getMax->[getMax],selectAll->[getMax],UnitChooserEntryIcon->[paint->[paint],getPreferredSize->[size],size]],getSelected->[getSelected],addChangeListener->[addChangeListener],autoSelect->[getSelectedCount],layoutEntries->[checkMatches],setMaxAndShowMaxButton->[changedValue]]] | Creates the entries for the given missing units. | It's dangerous to get a 'gameData' from a 'GamePlayer' object. The 'getOwner()' could be null. It's probably better to get `GameData` from `UiContext`. |
@@ -142,4 +142,13 @@ public class PlatformManagedOAuthConfig extends OAuthConfig<PlatformManagedOAuth
public ExtensionModel getExtensionModel() {
return extensionModel;
}
+
+ private static String sanitizeUrl(String url) {
+ if (url.endsWith("/")) {
+ url = url.substring(0, url.length() - 1);
+ }
+
+ return url;
+ }
+
}
| [PlatformManagedOAuthConfig->[from->[PlatformManagedOAuthConfig]]] | Get the extension model. | this already exists at `com.mulesoft.service.oauth.internal.platform.OCSSettings#sanitizeUrl`. Move to a shared Utils class that both classes can reuse |
@@ -46,6 +46,9 @@ def _prepare_topo_plot(inst, ch_type, layout):
for ii, this_ch in enumerate(info['chs']):
this_ch['ch_name'] = clean_ch_names[ii]
info['bads'] = _clean_names(info['bads'])
+ for comp in info['comps']:
+ comp['data']['col_names'] = _clean_names(comp['data']['col_names'])
+
info._update_redundant()
info._check_consistency()
| [_init_anim->[set_values,_check_outlines,_hide_frame,_autoshrink,_GridData,_draw_outlines],plot_ica_components->[plot_ica_components,_check_outlines,_prepare_topo_plot,_add_colorbar,plot_topomap,_autoshrink],_plot_topomap->[set_locations,_check_outlines,_show_names,_GridData,_draw_outlines,_plot_sensors],plot_evoked_topomap->[_plot_topomap,_prepare_topo_plot,_autoshrink,_check_outlines],_plot_topomap_multi_cbar->[_add_colorbar,plot_topomap],plot_tfr_topomap->[_add_colorbar,_prepare_topo_plot,plot_topomap],plot_layout->[_draw_outlines,_check_outlines],plot_psds_topomap->[_plot_topomap_multi_cbar],_plot_ica_topomap->[_check_outlines,_add_colorbar,_prepare_topo_plot,plot_topomap,_autoshrink],plot_projs_topomap->[_add_colorbar,_prepare_topo_plot],_onselect->[_check_outlines],_plot_corrmap->[_check_outlines,_prepare_topo_plot,plot_topomap,_hide_frame,_plot_corrmap],_topomap_animation->[_prepare_topo_plot],plot_epochs_psd_topomap->[_prepare_topo_plot],_animate->[_hide_frame],_slider_changed->[plot_topomap,_resize_cbar]] | Prepare topo plot. find topomap coordinates of ch_type and ch_names. | This will modify the object inplace. Do we know that it has been copied already everywhere `_prepare_topo_plot` is used? Is there some new test that shows why this is necessary (i.e., fails on master but passes here)? |
@@ -90,7 +90,7 @@ public class JobsPane extends WorkbenchPane
list_.addJob(job);
// bring the pane to the front so the new job is visible
- bringToFront();
+ if (job.show) bringToFront();
// select the job
events_.fireEvent(new JobSelectionEvent(job.id, true, false));
| [JobsPane->[syncElapsedTime->[syncElapsedTime],updateJob->[updateJob]]] | Updates a specific job in the list. | We should also skip firing the selection event if we aren't showing the job right away -- otherwise it'll still switch to the job if you have the pane open which probably isn't desired. |
@@ -93,6 +93,13 @@ int PEM_def_callback(char *buf, int num, int w, void *key)
return (i);
}
+#if defined(OPENSSL_NO_STDIO) || defined(OPENSSL_NO_UI)
+ /*
+ * We should not ever call the default callback routine from windows.
+ */
+ PEMerr(PEM_F_PEM_DEF_CALLBACK, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
+ return (-1);
+#else
prompt = EVP_get_pw_prompt();
if (prompt == NULL)
prompt = "Enter PEM pass phrase:";
| [PEM_do_header->[PEM_def_callback],PEM_ASN1_write_bio->[PEM_def_callback,PEM_dek_info,PEM_proc_type]] | PEM_def_callback - default callback routine. | While you're touching this code anyway please replace all instances in this function of `return (...)` with `return ...` for compliance with the style guide. |
@@ -240,7 +240,6 @@ func CreateMoveLeaderOperator(desc string, cluster Cluster, region *core.RegionI
return nil, err
}
st := CreateAddPeerSteps(peer)
- st = append(st, TransferLeader{ToStore: peer.StoreId, FromStore: oldStore})
steps = append(st, steps...)
brief := fmt.Sprintf("mv leader: store %v to %v", oldStore, peer.StoreId)
return NewOperator(desc, brief, region.GetID(), region.GetRegionEpoch(), removeKind|kind|OpLeader|OpRegion, steps...), nil
| [String->[Sprintf,Sort],GetStoreId,Uint64s,Error,GetID,New,GetStartKey,GetLabels,CheckLabelProperty,Debug,GetPeers,GetEndKey,Uint64,GetFollowers,GetStore,Sort,GetStoreIds,Sprintf,GetMeta,AllocPeer,Intn,GetRegionEpoch,GetId,GetLeader] | CreateOfflinePeerOperator creates an operator that moves a leader from a peer to a new leader getRegionFollowerIDs returns the list of unique region IDs that can be used to find. | why to remove it. |
@@ -49,8 +49,14 @@ public class MismatchPackageDirectoryCheck extends BaseTreeVisitor implements Ja
File javaFile = context.getFile();
String dir = javaFile.getParent();
if (!dir.endsWith(packageName)) {
- context.reportIssue(
- this, packageDeclaration.packageName(), "This file \"" + javaFile.getName() + "\" should be located in \"" + packageName + "\" directory, not in \"" + dir + "\".");
+ String dirWithoutDots = dir.replace(".", "/");
+ String issueMessage = MessageFormat.format(MESSAGE, javaFile.getName(), packageName, dir);
+ if (dirWithoutDots.endsWith(packageName)) {
+ context.reportIssue(this, packageDeclaration.packageName(), issueMessage + "(Do not use dots in directory names).");
+ } else {
+ context.reportIssue(
+ this, packageDeclaration.packageName(), issueMessage + ".");
+ }
}
}
}
| [MismatchPackageDirectoryCheck->[visitCompilationUnit->[getParent,reportIssue,packageDeclaration,getName,endsWith,packageName,getFile],scanFile->[scan,getTree]]] | Checks if a CompilationUnitTree is a and reports it if so. | Replace "/" by File.separator |
@@ -19,12 +19,13 @@ package org.apache.beam.sdk.tpcds;
import org.apache.beam.sdk.Pipeline;
import org.apache.beam.sdk.PipelineResult;
+import org.apache.beam.sdk.PipelineResult.State;
import java.util.concurrent.Callable;
/**
* To fulfill multi-threaded execution
*/
-public class TpcdsRun implements Callable<PipelineResult> {
+public class TpcdsRun implements Callable<TpcdsRunResult> {
private final Pipeline pipeline;
public TpcdsRun (Pipeline pipeline) {
| [TpcdsRun->[call->[waitUntilFinish,run]]] | This class is used to create a new instance of a tpcds run. | Nit: add parentheses around `state == State.DONE;`, which increases readability. |
@@ -318,6 +318,15 @@ public final class MediaType {
return builder.append("; ").append(strParams).toString();
}
+ /**
+ * @return true if the MediaType's java type is a byte array.
+ */
+ public boolean isBinary() {
+ String customType = getClassType();
+ if (customType == null) return !this.match(MediaType.APPLICATION_OBJECT);
+ return BYTE_ARRAY_TYPE.equals(customType);
+ }
+
@Override
public String toString() {
return toStringExcludingParam(WEIGHT_PARAM_NAME);
| [MediaType->[checkValidQuotes->[checkStartAndEnd],MediaTypeExternalizer->[writeObject->[writeObject],readObject->[MediaType,readObject,withParameters]],equals->[equals],fromString->[MediaType],withoutParameters->[MediaType],toStringExcludingParam->[hasParameters],hashCode->[hashCode],withParameter->[MediaType],withParameters->[MediaType],toString->[toStringExcludingParam],hasStringType->[getClassType]]] | This method returns a string containing type subtype and parameters excluding the weight parameter name. | So to clarify we assume everything is binary if it has ByteArray as a type in the media type (ie. application/object;type=ByteArray) or it doesn't match application object? |
@@ -129,9 +129,9 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_
<< "pos: (" << (player_position.X / BS)
<< ", " << (player_position.Y / BS)
<< ", " << (player_position.Z / BS)
- << ") | yaw: " << (wrapDegrees_0_360(cam.camera_yaw)) << "° "
+ << ") | yaw: " << (wrapDegrees_0_360(cam.camera_yaw)) << "\xC2\xB0 "
<< yawToDirectionString(cam.camera_yaw)
- << " | pitch: " << (-wrapDegrees_180(cam.camera_pitch)) << "°"
+ << " | pitch: " << (-wrapDegrees_180(cam.camera_pitch)) << "\xC2\xB0"
<< " | seed: " << ((u64)client->getMapSeed());
if (pointed_old.type == POINTEDTHING_NODE) {
| [No CFG could be retrieved] | Set the in the game object. region GuitextManager methods. | isn't this utf-8 specific? shouldn't this be an `\uabcd` style escape? |
@@ -108,7 +108,11 @@ void dangarj_state::dangarj_io_map(address_map &map)
WRITE8_MEMBER(galivan_state::blit_trigger_w)
{
- m_nb1414m4->exec((m_videoram[0] << 8) | (m_videoram[1] & 0xff),m_videoram,m_scrollx,m_scrolly,m_tx_tilemap);
+ uint16_t message = (m_videoram[0] << 8) | (m_videoram[1] & 0xff);
+ // For avoid corrupt of the continue screen, consecutived screen clear command (0x2XX) is ignored.
+ if ((message & 0xff00) != 0x200 || message != m_ninjemak_prevmessage)
+ m_nb1414m4->exec(message, m_videoram, m_scrollx, m_scrolly, m_tx_tilemap);
+ m_ninjemak_prevmessage = message;
}
void galivan_state::ninjemak_io_map(address_map &map)
| [No CFG could be retrieved] | region device - specific map functions 0x13 - > 0x13 - > 0x14 - > 0x14 region Sound Latch Clear. | Do you have any evidence that it really behaves like this? Only ignoring consecutive clear commands looks a lot like a hack to work around some other problem. |
@@ -184,11 +184,11 @@ func marshalInputAndDetermineSecret(v interface{},
destType reflect.Type,
await bool) (resource.PropertyValue, []Resource, bool, error) {
secret := false
+ var deps []Resource
for {
valueType := reflect.TypeOf(v)
// If this is an Input, make sure it is of the proper type and await it if it is an output/
- var deps []Resource
if input, ok := v.(Input); ok {
valueType = input.ElementType()
| [IsObject,Index,ElementType,NewArchiveProperty,IsBool,PropertyKey,MapKeys,HasPrefix,NewNumberProperty,New,Len,IsComputed,Bool,ID,TypeOf,IsPath,CanSet,Implements,AssignableTo,SecretValue,IsURI,ConstructProvider,IsValid,IsNumber,Kind,ArchiveValue,Interface,URN,SetUint,IsNull,NewAssetProperty,MakeMap,Construct,TypeString,NumberValue,IsSecret,MapIndex,IsAsset,awaitURN,MakeSecret,SetFloat,IsArray,Load,IsOutput,IsResourceReference,URI,MakeSlice,ArrayValue,Assets,ConvertibleTo,Field,SetMapIndex,Assert,Key,Text,SetBool,Float,Name,IsText,Get,NewStringProperty,NewBoolProperty,StringValue,MakeComputed,IsArchive,HasModuleMember,awaitID,Sprintf,Uint,String,NewObjectProperty,TODO,SetString,Path,IsAssets,Assertf,ValueOf,BoolValue,Set,Token,Int,IsNil,await,Errorf,LoadOrStore,SetInt,Type,MakeResourceReference,Module,AssetValue,IsString,Background,ObjectValue,ResourceReferenceValue,Elem,NumField,NewPropertyValue,NewArrayProperty] | marshalInput marshals an input value and returns its raw serializable value along with any dependencies. Invite the if the input is an Output and await its value. | I assume we could benefit from some deeper testing of this `marshalInputAndDetermineSecret` function? |
@@ -135,7 +135,6 @@ public class ConsistentHashTest extends TestCase {
for (int j=0; j<10; j++) {
ConsistentHash<String> b = new ConsistentHash<String>();
b.addAll(data);
-// System.out.println(Iterables.toString(b.list("x")));
}
System.out.println(System.currentTimeMillis()-start);
| [ConsistentHashTest->[testUnevenDisribution->[assertTrue,printf,equals,Random,nextInt,lookup,add],testBasic->[assertTrue,hasNext,size,println,iterator,lookup,add,assertEquals,next],testRemoval->[assertTrue,remove,getValue,Random,entrySet,getKey,lookup,nextInt,add,put],testEmptyBehavior->[hasNext,assertFalse,lookup,assertNull],testSpeed->[addAll,put,currentTimeMillis,println]]] | testSpeed - test speed of the algorithm. | Can leave such things in; was probably useful at some point when developing the test. |
@@ -181,8 +181,12 @@ class PointOutputProcess(KratosMultiphysics.Process):
my_rank = comm.Rank()
writing_rank = comm.MaxAll(my_rank) # The partition with the larger rank writes
- if my_rank == writing_rank:
+ if my_rank == -1:
+ warn_msg = 'No "{}" was found for input {}, '.format(entity_type, self.point)
+ warn_msg += 'no output is written!'
+ KratosMultiphysics.Logger.PrintWarning("PointOutputProcess", warn_msg)
+ if my_rank == writing_rank and my_rank > -1:
file_handler_params = KratosMultiphysics.Parameters(self.params["output_file_settings"])
file_header = GetFileHeader(entity_type, found_id, self.point, self.output_variables[0])
| [GetFileHeader->[str,format,Name,IsArrayVariable],IsArrayVariable->[type],Interpolate->[GetSolutionStepValue,type,GetNodes,GetValue,nodes,zip],Factory->[Exception,PointOutputProcess,type],PointOutputProcess->[__SearchPoint->[Rank,GetFileHeader,MaxAll,append,TimeBasedAsciiFileWriterUtility,GetCommunicator,Parameters,BruteForcePointLocator,Vector,params,Exception],ExecuteFinalize->[close],ExecuteFinalizeSolutionStep->[write,IsArrayVariable,Interpolate,str,IsInInterval,format,join,zip],ExecuteInitializeSolutionStep->[IsInInterval,__SearchPoint],ExecuteInitialize->[Size,__SearchPoint,size,type,append,output_var_names,Point,GetVariable,len,Name,range,__CheckVariableIsSolutionStepVariable,params,Exception],__CheckVariableIsSolutionStepVariable->[type,Name,HasNodalSolutionStepVariable,GetSourceVariable,Exception],__init__->[Point,IntervalUtility,ValidateAndAssignDefaults,Parameters,__init__,params]]] | Search for a point in the model. This method writes a file if the entity type lies in the partition with the larger PID. | I think this is a bit confusing to name this variable like that. I would assume at first glance that this indicates my rank, not if results were found in my rank. Rather than that its ok. |
@@ -183,6 +183,7 @@ def replace_placeholders(text):
data = {
'pid': os.getpid(),
'fqdn': socket.getfqdn(),
+ 'reverse-fqdn': '.'.join(reversed(socket.getfqdn().split('.'))),
'hostname': socket.gethostname(),
'now': DatetimeWrapper(current_time.now()),
'utcnow': DatetimeWrapper(current_time.utcnow()),
| [BaseFormatter->[format_item->[get_item_data]],ellipsis_truncate->[swidth_slice],format_line->[InvalidPlaceholder,PlaceholderError],Location->[parse->[replace_placeholders],_parse->[normpath_special]],DatetimeWrapper->[__format__->[__format__]],json_print->[json_dump],ItemFormatter->[get_item_data->[remove_surrogates],__init__->[partial_format],available_keys->[get_item_data],format_item_json->[get_item_data],keys_help->[available_keys],format_iso_time->[format_time]],basic_json_data->[BorgJsonEncoder],replace_placeholders->[DatetimeWrapper,format_line],location_validator->[validator->[Location]],ArchiveFormatter->[get_item_data->[bin_to_hex,remove_surrogates],__init__->[partial_format],available_keys->[get_item_data],format_item_json->[get_item_data],get_comment->[remove_surrogates],keys_help->[available_keys]],sizeof_fmt_decimal->[sizeof_fmt],format_archive->[bin_to_hex],BorgJsonEncoder->[default->[bin_to_hex,canonical_path]],FileSize->[__format__->[format_file_size]],prepare_dump_dict->[decode->[decode_bytes,decode_tuple,decode],decode_bytes->[bin_to_hex],decode_tuple->[decode_tuple,decode_bytes],decode],sizeof_fmt_iec->[sizeof_fmt],FilesCacheMode] | Replace placeholders in text with their values. | as getfqdn can take rather long, please refactor this so it gets only called once and the result is used for both placeholders. |
@@ -114,9 +114,12 @@ public class Http2StreamChannelBootstrapTest {
assertThat(promise.isDone(), is(false));
closeLatch.countDown();
- exceptionRule.expect(ExecutionException.class);
- exceptionRule.expectCause(IsInstanceOf.<Throwable>instanceOf(ClosedChannelException.class));
- promise.get(3, SECONDS);
+ try {
+ promise.get(3, SECONDS);
+ fail();
+ } catch (ExecutionException e) {
+ assertThat(e.getCause(), IsInstanceOf.<Throwable>instanceOf(ClosedChannelException.class));
+ }
} finally {
safeClose(clientChannel);
safeClose(serverConnectedChannel);
| [Http2StreamChannelBootstrapTest->[testStreamIsNotCreatedIfParentConnectionIsClosedConcurrently->[initChannel->[build,addLast,countDown,newMultiplexedHandler],run->[await,syncUninterruptibly,error],assertTrue,channel,CountDownLatch,countDown,DefaultEventLoop,expectCause,expect,await,childHandler,shutdownGracefully,LocalAddress,Http2StreamChannelBootstrap,newPromise,is,open,execute,isDone,getName,Runnable,get,handler,safeClose,instanceOf,assertThat],open0FailsPromiseOnHttp2MultiplexHandlerError->[isDone,Http2StreamChannelBootstrap,thenReturn,Http2MultiplexHandler,mock,open0,is,cause,instanceOf,assertThat,DefaultPromise],safeClose->[syncUninterruptibly,error],newMultiplexedHandler->[Http2MultiplexHandler],getInstance,none]] | Test if the parent connection is closed concurrently. shutdownGracefully - shutdown the group if it is not null. | If you use `assertThrows`, it'll return the exception thrown for further checks. |
@@ -266,7 +266,8 @@ public class TrashPolicyOzone extends TrashPolicyDefault {
while (true) {
try {
fs.rename(current, checkpoint);
- LOG.debug("Created trash checkpoint: " + checkpoint.toUri().getPath());
+ LOG.debug("Created trash checkpoint: {}",
+ checkpoint.toUri().getPath());
break;
} catch (FileAlreadyExistsException e) {
if (++attempt > 1000) {
| [TrashPolicyOzone->[Emptier->[run->[TrashPolicyOzone]],moveToTrash->[moveToTrash],initialize]] | Create a checkpoint for the trash. | this one is tricky, because URI.getPath() is not a O(1) operation. It constructs a String on the fly. We need to wrap this debug message with if (LOG.isDebugEnabled()) { |
@@ -35,9 +35,11 @@ class NotifyMailer < ApplicationMailer
@mentioner = User.find(@mention.mentionable.user_id)
@mentionable = @mention.mentionable
+ @mentionable_type = MentionDecorator.new(@mention).formatted_mentionable_type
+
@unsubscribe = generate_unsubscribe_token(@user.id, :email_mention_notifications)
- mail(to: @user.email, subject: "#{@mentioner.name} just mentioned you!")
+ mail(to: @user.email, subject: "#{@mentioner.name} just mentioned you in their #{@mentionable_type}")
end
def unread_notifications_email
| [NotifyMailer->[user_contact_email->[email,find,mail],feedback_response_email->[community_name,mail],export_email->[iso8601,mail],unread_notifications_email->[limit_by_email_recipient_address,email,mail,count,community_name,id,generate_unsubscribe_token],new_follower_email->[limit_by_email_recipient_address,email,mail,follower,followable,name,id,generate_unsubscribe_token],new_badge_email->[badge,email,mail,user,id,generate_unsubscribe_token],new_message_email->[email,mail,name,direct_receiver,id,generate_unsubscribe_token],tag_moderator_confirmation_email->[email,name,mail],channel_invite_email->[email,role,channel_name,mail],account_deletion_requested_email->[email,community_name,name,mail],trusted_role_email->[email,community_name,mail],account_deleted_email->[community_name,mail],feedback_message_resolution_email->[mail,find_by],video_upload_complete_email->[email,user,mail],new_mention_email->[limit_by_email_recipient_address,email,find,mail,mentionable,user_id,name,id,generate_unsubscribe_token],subjects->[freeze],new_reply_email->[limit_by_email_recipient_address,email,mail,parent_user,parent_type,name,id,generate_unsubscribe_token],organization_deleted_email->[community_name,mail],lambda,has_history]] | Email a new mention email. | **non blocking**: you can also use `@mention.decorate` instead of `MentionDecorator.new(@mention)` |
@@ -61,11 +61,7 @@ public class StreamAuditEventListener implements EventListener, Synchronization
public static final String STREAM_AUDIT_ENABLED_PROP = "nuxeo.stream.audit.enabled";
- public static final String AUDIT_LOG_CONFIG_PROP = "nuxeo.stream.audit.log.config";
-
- public static final String DEFAULT_LOG_CONFIG = "audit";
-
- public static final String STREAM_NAME = "audit";
+ public static final String STREAM_NAME = "audit/audit";
@Override
public void handleEvent(Event event) {
| [StreamAuditEventListener->[getLogManager->[getLogManager],registerSynchronization->[registerSynchronization]]] | This method is called when an event is received from the audit logger. | Should we keep them for backward compat'? Or anyway it's not working anymore and customers must update their code? |
@@ -12,13 +12,13 @@ namespace System.Text.Json
internal static partial class ThrowHelper
{
[MethodImpl(MethodImplOptions.NoInlining)]
- public static void ThrowArgumentException_DeserializeWrongType(Type type, object value)
+ public static void ThrowArgumentException_DeserializeWrongType(Type? type, object value)
{
throw new ArgumentException(SR.Format(SR.DeserializeWrongType, type, value.GetType()));
}
[MethodImpl(MethodImplOptions.NoInlining)]
- public static NotSupportedException GetNotSupportedException_SerializationNotSupportedCollection(Type propertyType, Type parentType, MemberInfo memberInfo)
+ public static NotSupportedException GetNotSupportedException_SerializationNotSupportedCollection(Type? propertyType, Type? parentType, MemberInfo? memberInfo)
{
if (parentType != null && parentType != typeof(object) && memberInfo != null)
{
| [ThrowHelper->[ReThrowWithPath->[AddExceptionInformation]]] | Throw exception if deserialization is not possible. | Same here. Can we annotate **all** the `Throw...` methods with `[DoesNotReturn]` `ThrowArgumentException_DeserializeWrongType` `ThrowInvalidOperationException_SerializerCycleDetected` `ThrowJsonException_DeserializeUnableToConvertValue` overloads `ThrowJsonException_DepthTooLarge` `ThrowJsonException_SerializationConverterRead` `ThrowJsonException_SerializationConverterWrite` `ThrowJsonException` `ThrowInvalidOperationException_SerializationConverterNotCompatible` `ThrowInvalidOperationException_SerializationConverterOnAttributeInvalid` `ThrowInvalidOperationException_SerializationConverterOnAttributeNotCompatible` `ThrowInvalidOperationException_SerializerOptionsImmutable` `ThrowInvalidOperationException_SerializerPropertyNameConflict` `ThrowInvalidOperationException_SerializerPropertyNameNull` `ThrowInvalidOperationException_SerializerDictionaryKeyNull` `ReThrowWithPath` overloads `ThrowInvalidOperationException_SerializationDuplicateAttribute` `ThrowInvalidOperationException_SerializationDuplicateTypeAttribute` `ThrowInvalidOperationException_SerializationDataExtensionPropertyInvalid` `ThrowNotSupportedException_DeserializeCreateObjectDelegateIsNull` |
@@ -34,6 +34,7 @@ namespace Pulumi.Automation
private readonly LocalSerializer _serializer = new LocalSerializer();
private readonly bool _ownsWorkingDir;
private readonly Task _readyTask;
+ private static readonly SemVersion _minimumVersion = SemVersion.Parse("2.21.0");
/// <inheritdoc/>
public override string WorkDir { get; }
| [LocalWorkspace->[GetStackSettingsAsync->[GetStackSettingsName],CreateOrSelectStackAsync->[CreateOrSelectStackAsync],SelectStackAsync->[SelectStackAsync],CreateStackAsync->[CreateStackAsync,CreateAsync],Dispose->[Dispose],Task->[GetStackSettingsName]]] | A workspace that is used to manage a single global context. The cancellation token for this operation. | Is this something that you guys are intending will be updated regularly? |
@@ -104,7 +104,7 @@ class CarController():
# 20 Hz LFA MFA message
if frame % 5 == 0 and self.car_fingerprint in [CAR.SONATA, CAR.PALISADE, CAR.IONIQ, CAR.KIA_NIRO_EV, CAR.KIA_NIRO_HEV_2021,
CAR.IONIQ_EV_2020, CAR.IONIQ_PHEV, CAR.KIA_CEED, CAR.KIA_SELTOS, CAR.KONA_EV,
- CAR.ELANTRA_2021, CAR.ELANTRA_HEV_2021, CAR.SONATA_HYBRID, CAR.KONA_HEV]:
+ CAR.ELANTRA_2021, CAR.ELANTRA_HEV_2021, CAR.SONATA_HYBRID, CAR.KONA_HEV, CAR.SANTA_FE]:
can_sends.append(create_lfahda_mfc(self.packer, enabled))
# 5 Hz ACC options
| [CarController->[__init__->[CarControllerParams,CANPacker],update->[create_clu11,round,process_hud_alert,int,create_acc_commands,create_lkas11,append,extend,create_lfahda_mfc,apply_std_steer_torque_limits,clip,create_frt_radar_opt,create_acc_opt,interp]]] | Update the state of the tester. create clu11 message returns can_sends list of can_sends. | do the older santa fe's have this msg? |
@@ -334,11 +334,14 @@ func newISTag(tag string, imageStream *imageapi.ImageStream, image *imageapi.Ima
Name: istagName,
CreationTimestamp: event.Created,
Annotations: map[string]string{},
+ Labels: imageStream.Labels,
ResourceVersion: imageStream.ResourceVersion,
UID: imageStream.UID,
},
Generation: event.Generation,
Conditions: imageStream.Status.Tags[tag].Conditions,
+
+ LookupPolicy: imageStream.Spec.LookupPolicy,
}
if imageStream.Spec.Tags != nil {
| [Create->[NamespaceFrom,Sprintf,BeforeCreate,SplitImageStreamTag,GetImageStream,Resource,UpdateImageStream,Errorf,IsNotFound,IsZero,CreateImageStream,NewBadRequest,NewAlreadyExists],imageFor->[JoinImageStreamTag,Resource,GetImage,LatestTaggedImage,NewNotFound],List->[Matches,ListImageStreams,IsNotFound,InternalListOptionsToSelectors],Delete->[GetImageStream,Resource,UpdateImageStream,Errorf,NewNotFound],Get->[imageFor,GetImageStream],Update->[NewConflict,NamespaceFrom,Sprintf,GetImageStream,Resource,BeforeCreate,UpdateImageStream,imageFor,BeforeUpdate,Errorf,IsNotFound,CreateImageStream,NewBadRequest,NewNotFound,UpdatedObject,FillObjectMetaSystemFields],ImageWithMetadata,ParseImageStreamTagName,JoinImageStreamTag,Resource,LatestTaggedImage,NewBadRequest,NewNotFound] | newISTag initializes an image stream tag from an image stream and an image. nanononononononononononononononononon. | I'm hesitant copying all labels from IS. I'm not quite convinced it is the right approach... |
@@ -52,7 +52,8 @@ logger = logging.getLogger(__name__)
class PythonSources(Sources):
- expected_file_extensions = (".py", ".pyi")
+ # Note that Python scripts often have no file ending.
+ expected_file_extensions = ("", ".py", ".pyi")
class InterpreterConstraintsField(StringSequenceField):
| [_RequirementSequenceField->[compute_value->[parse,_format_invalid_requirement_string_error]],parse_requirements_file->[parse,_format_invalid_requirement_string_error],PexEntryPointField->[compute_value->[parse]]] | Protected base class for all of the common fields. | - constraints for target object. | To clarify, this is just to allow such files, but doesn't change the default globs for sources= in a `python_library`? |
@@ -714,13 +714,12 @@ namespace Js
#ifdef INTL_ICU
typedef const char * (*GetAvailableLocaleFunc)(int);
typedef int (*CountAvailableLocaleFunc)(void);
- static bool findLocale(const char *langtag, CountAvailableLocaleFunc countAvailable, GetAvailableLocaleFunc getAvailable)
+ static bool findLocale(JavascriptString *langtag, CountAvailableLocaleFunc countAvailable, GetAvailableLocaleFunc getAvailable)
{
- UErrorCode status = U_ZERO_ERROR;
char localeID[ULOC_FULLNAME_CAPACITY] = { 0 };
- int32_t length = 0;
- uloc_forLanguageTag(langtag, localeID, ULOC_FULLNAME_CAPACITY, &length, &status);
- ICU_ASSERT(status, length > 0);
+ BCP47_TO_ICU(langtag->GetSz(), langtag->GetLength(), localeID, ULOC_FULLNAME_CAPACITY);
+
+ // TODO(jahorto): can we binary search this instead?
for (int i = 0; i < countAvailable(); i++)
{
if (strcmp(localeID, getAvailable(i)) == 0)
| [No CFG could be retrieved] | Finds the next language tag in the script context. Checks if a DtF locale is available for the current platform. | >// TODO(jahorto): can we binary search this instead? [](start = 8, length = 52) +1 -- can we investigate whether this list comes in sorted order? It doesn't look like we're tied to any iterator behavior so we should have random access at this point. |
@@ -22,6 +22,11 @@ import (
"github.com/elastic/beats/x-pack/functionbeat/provider/aws/transformer"
)
+var (
+ logGroupNamePattern = "^[\\.\\-_/#A-Za-z0-9]+$"
+ logGroupNameRE = regexp.MustCompile(logGroupNamePattern)
+)
+
// CloudwatchLogsConfig is the configuration for the cloudwatchlogs event type.
type CloudwatchLogsConfig struct {
Triggers []*CloudwatchLogsTriggerConfig `config:"triggers"`
| [MarshalJSON->[Marshal,AWSCloudFormationType],Validate->[New],createHandler->[CloudwatchLogs,PublishAll,Parse,Errorf,Wait,Debugf],Run->[Start,createHandler],Template->[Itoa,Join,NewTemplate,GetAtt,Replace,Ref],Unpack,NewLogger] | type is the configuration for the cloudwatchlogs event type. NewCloudwatchLogs creates a new CloudWatchLogs function. | use backticks for raw strings. Then you don't have to escape the escapes. |
@@ -163,7 +163,10 @@ class Agent:
def _verify_token(self, token: str) -> None:
"""
- Checks whether a token with a `RUNNER` scope was provided
+ Checks whether a token with a `RUNNER` scope was provided (DEPRECATED)
+ Visit https://docs.prefect.io/orchestration/concepts/api_keys.html
+ for information on how to use API Keys.
+
Args:
- token (str): The provided agent token to verify
Raises:
| [Agent->[run_heartbeat_thread->[start],setup->[run->[start],start],__init__->[get],start->[_register_agent,exit_handler,_verify_token],agent_process->[run]],Agent] | Checks whether a token with a RUNNER scope was provided. | This is a private function and is going to be confusing to a developer because this is still validating the key, right? |
@@ -651,16 +651,12 @@ public class ReduceFnRunner<K, InputT, OutputT, W extends BoundedWindow> {
// it but the local output watermark (also for this key) has not. After data is emitted and
// the output watermark hold is released, the output watermark on this key will immediately
// exceed the end of the window (otherwise we could see multiple ON_TIME outputs)
- this.isEndOfWindow =
- timerInternals.currentInputWatermarkTime().isAfter(window.maxTimestamp())
- && outputWatermarkBeforeEOW;
+ this.isEndOfWindow = !timestamp.isBefore(window.maxTimestamp()) && outputWatermarkBeforeEOW;
// The "GC time" is reached when the input watermark surpasses the end of the window
// plus allowed lateness. After this, the window is expired and expunged.
this.isGarbageCollection =
- timerInternals
- .currentInputWatermarkTime()
- .isAfter(LateDataUtils.garbageCollectionTime(window, windowingStrategy));
+ !timestamp.isBefore(LateDataUtils.garbageCollectionTime(window, windowingStrategy));
}
// Has this window had its trigger finish?
| [ReduceFnRunner->[emit->[shouldDiscardAfterFiring],prefetchOnTrigger->[prefetchOnTrigger],processElement->[toMergedWindows],onTimers->[windowIsActiveAndOpen,WindowActivation],OnMergeCallback->[prefetchOnMerge->[activeWindows,prefetchOnMerge],onMerge->[activeWindows,onMerge]],processElements->[windowsThatShouldFire,windowsThatAreOpen],persist->[persist],onTrigger->[needToEmit,onTrigger]]] | This method is called by the window manager to activate a window. Get the next window context. | This one was tough. The problem here was, that previously input watermark moved at the end of each bundle. Each bundle also contained its own timers. But - because timers can generate new timers and these are processed in different bundle - the actual timestamp of timer must be taken into account. Otherwise a timer setup for some earlier time might trigger window garbage collection, because input watermark is already way ahead. I'm not quite sure of the other consequences though. Is it correct, that one bundle might generate multiple bundles, or is there a bundle atomicity requirement? On the other hand, runners that don't have concept of bundles (and have therefore by definition bundle of size 1) have to generate multiple bundles from single bundle, so that might be ok. Am I right? |
@@ -153,6 +153,7 @@ export default class JitsiStreamPresenterEffect {
this._videoFrameTimerWorker.postMessage({
id: CLEAR_INTERVAL
});
+ this._videoFrameTimerWorker.terminate();
}
}
| [No CFG could be retrieved] | Post a message to the worker to clear the next frame. | The worker is created only once when the effect is constructed. Worker creation needs to be moved to startEffect. |
@@ -264,13 +264,7 @@ func validateInsecureEdgeTerminationPolicy(tls *routeapi.TLSConfig, fldPath *fie
return nil
}
- // Ensure insecure is set only for edge terminated routes.
- if routeapi.TLSTerminationEdge != tls.Termination {
- // tls.InsecureEdgeTerminationPolicy option is not supported for a non edge-terminated routes.
- return field.Invalid(fldPath, tls.InsecureEdgeTerminationPolicy, "InsecureEdgeTerminationPolicy is only allowed for edge-terminated routes")
- }
-
- // It is an edge-terminated route, check insecure option value is
+ // It is an edge-terminated or reencrypt route, check insecure option value is
// one of None(for disable), Allow or Redirect.
allowedValues := map[routeapi.InsecureEdgeTerminationPolicyType]struct{}{
routeapi.InsecureEdgeTerminationPolicyNone: {},
| [Index,ValidateImmutableField,Verify,HasPrefix,IsDNS1123Subdomain,NewPath,Required,Has,Error,Child,Errorf,NewString,NotSupported,ValidateObjectMeta,IsDNS1123Label,AddCert,Split,Invalid,NewCertPool,Sprintf,ValidateObjectMetaUpdate,GetNameValidationFunc,X509KeyPair,CertificatesFromPEM] | validateInsecureEdgeTerminationPolicy tests if the field passed in is a valid and get the certs from the certPEM. | Style: Make this a switch statement on the termination field |
@@ -2140,6 +2140,7 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
QueueIterateAction messageAction) throws Exception {
int count = 0;
int txCount = 0;
+ Integer expectedHits = messageAction.expectedHits();
// This is to avoid scheduling depaging while iterQueue is happening
// this should minimize the use of the paged executor.
depagePending = true;
| [QueueImpl->[getDurableDeliveringCount->[getDurableMessageCount],scheduleDepage->[getName],configureExpiry->[getExpiryAddress],addConsumer->[debug],deleteAllReferences->[deleteAllReferences],configureSlowConsumerReaper->[equals,getName,cancel,debug],getMessageCount->[getMessageCount],getDeliveringCount->[getMessageCount],deleteReference->[acknowledge,removeReferenceWithID,iterator],ExpiryScanner->[run->[getName,expire,debug,close,iterator]],unproposed->[run->[debug],getName],addHead->[addHead],createDeadLetterResources->[getAddress,toString,equals],getScheduledCount->[getScheduledCount],checkExpired->[expire],expiryAddressFromMessageAddress->[getAddress],getDurableScheduledCount->[getDurableScheduledCount],expireReference->[expire,iterator],removeWithSuppliedID->[checkIDSupplier],DelayedAddRedistributor->[run->[clearRedistributorFuture,internalAddRedistributor]],retryMessages->[actMessage->[getID],iterQueue],getDurableDeliveringSize->[getDurablePersistentSize],postRollback->[addHead,addSorted,postRollback,getConsumerCount],getPersistentSize->[getPersistentSize],rerouteMessages->[actMessage->[route,getAddress],iterQueue],debug->[debug],acknowledge->[isDurable,getID,acknowledge,debug],deliverScheduledMessages->[cancel,addHead],getDeliveringMessages->[getDeliveringMessages,iterator],internalAddRedistributor->[toString,deliverAsync],DepageRunner->[run->[depage]],refDown->[refDown],deliverNow->[deliverAsync],deleteQueue->[deleteAllReferences,destroyPaging,deleteQueue,isDurable,cancel,getID],getDurableMessageCount->[getDurableMessageCount,getMessageCount,isDurable],internalAddTail->[addTail],moveReferences->[actMessage->[acknowledge],iterQueue,moveReferences],purgeAfterRollback->[acknowledge],durableUp->[durableUp],enforceRing->[referenceHandled,refRemoved,getMessageCountForRing,enforceRing,acknowledge],postAcknowledge->[durableDown,postAcknowledge,refDown,isDurable],internalErrorProcessing->[removeConsumer,addHead],getPriority->[getPriority],doInternalPoll->[internalAddTail,deliverAsync,incrementMesssagesAdded],deliverAsync->[deliverAsync],getDurableScheduledSize->[getDurableScheduledSize],changeReferencePriority->[iterator,addTail],refUp->[refUp],getDurablePersistentSize->[getPersistentSize,getDurablePersistentSize,isDurable],createExpiryResources->[getAddress,toString,getExpiryAddress,equals],sendToDeadLetterAddress->[move,equals,sendToDeadLetterAddress,toString,acknowledge],iterator->[iterator],addTail->[getName,addTail],removeReferenceWithID->[removeReferenceWithID,iterator],handleMessageGroup->[extractGroupSequence],pause->[pause,flushDeliveriesInTransit,isDurable],SynchronizedIterator->[next->[next],remove->[remove],repeat->[repeat],close->[close],hasNext->[hasNext]],getRefsOperation->[getRefsOperation],hashCode->[hashCode],proceedDeliver->[proceedDeliver],move->[toString,acknowledge,route,makeCopy],hasMatchingConsumer->[getFilter],sendMessagesToDeadLetterAddress->[iterator],handle->[removeConsumer,handle],resume->[deliverAsync],QueueBrowserIterator->[next->[getPagingIterator,next,hasNext],remove->[remove],getPagingIterator->[iterator],close->[close,getPagingIterator],hasNext->[getPagingIterator,hasNext],SynchronizedIterator,iterator],durableDown->[durableDown],expireReferences->[expire,iterator],addRedistributor->[deliverAsync],internalAddSorted->[addSorted],moveReference->[iterator],deleteMatchingReferences->[deleteMatchingReferences],DeliverRunner->[run->[deliver,checkDepage]],getScheduledSize->[getScheduledSize],SlowConsumerReaperRunnable->[run->[equals,getName,getMessageCount,getAddress,getRate,consumer,debug,toString,getID,getConsumerCount]],createDeleteMatchingAction->[actMessage->[acknowledge]],getRate->[getMessagesAdded],checkDeadLetterAddressAndExpiryAddress->[getExpiryAddress,equals],makeCopy->[toString,makeCopy],sendMessageToDeadLetterAddress->[iterator],removeConsumer->[close],scheduleSlowConsumerReaper->[getName,debug],getExecutor->[getExecutor],AddressSettingsRepositoryListener->[onChange->[configureSlowConsumerReaper,toString,configureExpiry]],internalAddHead->[addHead],equals->[equals],finalize->[cancelRedistributor,finalize],expire->[move,getName,getExpiryAddress,expire,acknowledge],changeReferencesPriority->[iterator,addTail],getReference->[iterator],isPaused->[isPaused],cancelRedistributor->[clearRedistributorFuture],deliver->[isPaused,doInternalPoll,extractGroupID,getName,deliverAsync,canDispatch,incrementMesssagesAdded,debug,iterator],depage->[needsDepage,isPaused,getName,getMessageCount,deliverAsync,expireReferences,getPersistentSize,debug,addTail],removeAddress->[getAddress],moveBetweenSnFQueues->[done->[deliverAsync],toString,acknowledge,route,debug],checkRedelivery->[getName,toString,isDurable],iterQueue->[actMessage,forceDelivery,cancel,iterator,addTail],cancel->[cancel],locateTargetBinding->[getRoutingName,equals,getAddress,debug,toString],reacknowledge->[isDurable],ConsumerHolder->[getPriority->[getPriority],resetIterator->[close],equals->[equals]],deliverDirect->[deliver],addSorted->[addSorted],moveReferencesBetweenSnFQueues->[iterQueue],toString->[toString],getDeliveringSize->[getPersistentSize]]] | This method is used to perform a queue iteration. check if there is a neccesary failure in the current transaction. | Whats the purpose of this? |
@@ -54,8 +54,8 @@ const (
// MetricsServerPort is the port on which OSM exposes its own metrics server
MetricsServerPort = 9091
- // AggregatedDiscoveryServiceName is the name of the ADS service.
- AggregatedDiscoveryServiceName = "ads"
+ // OSMControllerServiceName is the name of the ADS service.
+ OSMControllerServiceName = "osm-controller"
// AggregatedDiscoveryServicePort is the port on which XDS listens for new connections.
AggregatedDiscoveryServicePort = 15128
| [No CFG could be retrieved] | The port of the Envoy outbound listener. The KubernetesOpaqueSecretCAKey is the secret CA key that is used to sign the. | nit: `ADS Service` -> `OSM Controller Service` |
@@ -35,6 +35,10 @@ module Engine
self
end
+ def corporation
+ nil
+ end
+
def ==(other)
other&.player? && (@name == other&.name)
end
| [Player->[to_s->[name],value->[sum],include,player?,attr_accessor,attr_reader,name],require_relative] | missing player centric order. | Added so that an ownable can call `.corporation` |
@@ -14,6 +14,8 @@ class Directory_helper_test extends CI_TestCase {
public function test_directory_map()
{
+ $ds = DIRECTORY_SEPARATOR;
+
$structure = array(
'libraries' => array(
'benchmark.html' => '',
| [Directory_helper_test->[set_up->[helper],test_directory_map->[assertEquals]]] | test directory map. | Don't change that if you wish, since it's a test and it's not important, but I just can't ignore it - is it really worth it for just 4 occurences? :) |
@@ -122,6 +122,17 @@ module Engine
sm
end
+ def init_tiles
+ tiles = super
+
+ tiles.find { |tile| tile.name == '53' }.label = 'Ba'
+ tiles.find { |tile| tile.name == '61' }.label = 'Ba'
+ tiles.find { |tile| tile.name == '121' }.label = 'Bo'
+ tiles.find { |tile| tile.name == '997' }.label = 'Bo'
+
+ tiles
+ end
+
EXTRA_TILE_LAYS = [{ lay: true, upgrade: true }, { lay: :not_if_upgraded, upgrade: false, cost: 40 }].freeze
EXTRA_TILE_LAY_CORPS = %w[B&M NYH].freeze
| [G1828->[acquire_va_tunnel_coal_marker->[coal_marker?],buy_coal_marker->[can_buy_coal_marker?],can_buy_coal_marker?->[connected_to_coalfields?,coal_marker?,coal_marker_available?],block_va_coalfields->[coalfields->[coal_marker?]]]] | Initialize the stock market unknown entity. | is there only one tile of this type? if not you could do |
@@ -507,7 +507,7 @@ func (sm *SnapshotManager) snap() *deploy.Snapshot {
manifest := deploy.Manifest{
Time: time.Now(),
Version: version.Version,
- Plugins: sm.plugins,
+ // Plugins: sm.plugins, - Explicitly dropped, since we don't use the plugin list in the manifest anymore.
}
manifest.Magic = manifest.NewMagic()
| [saveSnapshot->[snap],doCreate->[mutate],doRead->[mutate],doDelete->[mutate],RegisterResourceOutputs->[mutate],End->[mutate,mustWrite],RecordPlugin->[mutate],doUpdate->[mutate],saveSnapshot] | snap creates a snapshot of the current DAG and the base DAG. This function creates a snapshot of the current state that is not in the merged list. | Is there a compelling reason for retaining the `Plugins` field of `deploy.Manifest` at all? |
@@ -170,10 +170,10 @@ WRITE16_MEMBER(srmp2_state::srmp2_flags_w)
*/
- machine().bookkeeping().coin_counter_w(0, ((data & 0x01) >> 0) );
- machine().bookkeeping().coin_lockout_w(0, (((~data) & 0x10) >> 4) );
- m_adpcm_bank = ( (data & 0x20) >> 5 );
- m_color_bank = ( (data & 0x80) >> 7 );
+ machine().bookkeeping().coin_counter_w(0, BIT(data, 0) );
+ machine().bookkeeping().coin_lockout_w(0, BIT(~data, 4) );
+ m_adpcm_bank = ( (data & 0x20) << 11 );
+ m_color_bank = ( (data & 0x80) >> 2 );
}
| [No CFG could be retrieved] | 16 - bit protection in srmp2 region 0x00000000 - 0x0000ff - 0x0100ff - 0x. | It's easier to understand if the bank values are aligned in the LSBs and shifted/multiplied when used. |
@@ -56,8 +56,12 @@ public class NoopTask extends AbstractTask
@Override
public TaskStatus run(TaskToolbox toolbox) throws Exception
{
+ final int sleepTime = 2500;
+
log.info("Running noop task[%s]", getId());
- Thread.sleep(2500);
+ log.info("Sleeping for %,d millis.", sleepTime);
+ Thread.sleep(sleepTime);
+ log.info("Woke up!");
return TaskStatus.success(getId());
}
}
| [NoopTask->[run->[info,sleep,success,getId],days,Interval,DateTime,format,Logger]] | This method is called when the task is not yet scheduled. | Hmm, is this task actually used for anything? |
@@ -216,6 +216,14 @@ public final class PagingProviderProducer<T> implements Producer<List<T>> {
}
}
+ private void tryToMutateConfigurationStats(ConfigurationInstance configurationInstance,
+ Consumer<MutableConfigurationStats> mutableConfigurationStatsConsumer) {
+ ConfigurationStats configurationStats = configurationInstance.getStatistics();
+ if (configurationStats instanceof MutableConfigurationStats) {
+ mutableConfigurationStatsConsumer.accept((MutableConfigurationStats) configurationStats);
+ }
+ }
+
private interface ConnectionSupplierFactory {
ConnectionSupplier getConnectionSupplier() throws MuleException;
| [PagingProviderProducer->[DefaultConnectionSupplierFactory->[getConnectionSupplier->[getConnection]],StickyConnectionSupplier->[getConnection],StickyConnectionSupplierFactory->[getChecked->[getConnection]],getConnection->[getConnection],close->[close],getConnectionSupplier->[getConnectionSupplier],withConnection->[withConnection],DefaultConnectionSupplier->[getConnection->[getConnection]]]] | Returns a connection object that can be used to manage a connection. | repeated code.. Use the utils one |
@@ -175,12 +175,12 @@ function follow_post(&$a) {
notice($result['message']);
goaway($return_url);
} elseif ($result['cid'])
- goaway($a->get_baseurl().'/contacts/'.$result['cid']);
+ goaway(App::get_baseurl().'/contacts/'.$result['cid']);
info( t('Contact added').EOL);
if(strstr($return_url,'contacts'))
- goaway($a->get_baseurl().'/contacts/'.$contact_id);
+ goaway(App::get_baseurl().'/contacts/'.$contact_id);
goaway($return_url);
// NOTREACHED
| [follow_post->[get_baseurl],follow_content->[get_baseurl]] | Follow a post request to the contact s friendica contact list. | Standards: Could you please add brackets to this conditional statement? |
@@ -22,7 +22,7 @@ define([
* @param {Color} [description.frameTimeColor] The color of the frame time graph.
* @param {Color} [description.backgroundColor] The color of the background of the display.
* @param {String} [description.font] The CSS font of the text in the display.
- * @param {Rectangle} [description.rectangle] The position and size of the display, relative to the top left corner.
+ * @param {BoundingRectangle} [description.rectangle] The position and size of the display, relative to the top left corner.
*
* @example
* scene.getPrimitives().add(new PerformanceDisplay());
| [No CFG could be retrieved] | Creates a new PerformanceDisplay object. create the canvas. | I see we are not culling this at all right now. As we continue to design the DDR, we will want to render these in a separate pass after all the frustums. |
@@ -18,10 +18,12 @@ import (
"context"
"fmt"
"path"
- "sync"
+ "path/filepath"
"time"
"github.com/vmware/govmomi/object"
+ "github.com/vmware/vic/lib/progresslog"
+
"github.com/vmware/vic/lib/config"
"github.com/vmware/vic/lib/install/data"
"github.com/vmware/vic/lib/install/opsuser"
| [cleanupAfterCreationFailed->[Begin,cleanupBridgeNetwork,End,Errorf,cleanupEmptyPool,Debug],createPool->[Begin,Sprintf,New,End,createResourcePool],uploadImages->[Warnf,Delete,DoWithConfig,Info,Done,Add,NewFileManager,Error,Stat,New,End,Wait,Debug,Debugf,UploadFile,Join,Infof,NewBackoffConfig,Begin,Sprintf],startAppliance->[WaitForResult,Begin,End,PowerOn,Errorf],cleanupBridgeNetwork->[End,removeNetwork,Begin],CreateVCH->[ShouldGrantPerms,cleanupAfterCreationFailed,Begin,createPool,uploadImages,Vim25,checkExistence,createBridgeNetwork,Now,startAppliance,End,Errorf,Signal,createAppliance,GrantOpsUserPerms],cleanupEmptyPool->[Reference,getComputeResource,destroyResourcePoolIfEmpty,Begin,ResourcePool,End,Info]] | CreateVCH creates a new virtual container instance. creates the pool bridge network and appliance. | Is there a reason for the extra new line here? Looks like this is all from the same pathing for the most part. |
@@ -368,11 +368,13 @@ public class HoodieWriteConfig extends HoodieConfig {
+ "OPTIMISTIC_CONCURRENCY_CONTROL: Multiple writers can operate on the table and exactly one of them succeed "
+ "if a conflict (writes affect the same file group) is detected.");
- public static final ConfigProperty<String> WRITE_META_KEY_PREFIXES = ConfigProperty
- .key("hoodie.write.meta.key.prefixes")
- .defaultValue("")
- .withDocumentation("Comma separated metadata key prefixes to override from latest commit "
- + "during overlapping commits via multi writing");
+ public static final ConfigProperty<Boolean> WRITE_CONCURRENCY_MERGE_DELTASTREAMER_STATE = ConfigProperty
+ .key("hoodie.write.concurrency.merge.deltastreamer.state")
+ .defaultValue(false)
+ .withDocumentation("If enabled, this writer will merge Deltastreamer state "
+ + "from the previous checkpoint in order to allow both realtime "
+ + "and batch writers to ingest into a single table. "
+ + "This should not be enabled on Deltastreamer writers.");
/**
* Currently the use this to specify the write schema.
| [HoodieWriteConfig->[Builder->[setDefaults->[setDefaults],build->[HoodieWriteConfig,validate,setDefaults],HoodieWriteConfig],isClusteringEnabled->[isAsyncClusteringEnabled,inlineClusteringEnabled],inlineTableServices->[isAutoClean,inlineCompactionEnabled,inlineClusteringEnabled],getWriteSchema->[getSchema],getFileListingParallelism->[getFileListingParallelism],resetViewStorageConfig->[setViewStorageConfig],shouldAssumeDatePartitioning->[shouldAssumeDatePartitioning]]] | This is a utility method that can be used to configure a writer to perform heartbeats This method is used to handle Hudi commit protocol. | do you think we can add in a validation withiin Deltastreamer code base that this config is not enabled. would be good to tighten it and not leave it to end user. |
@@ -284,7 +284,7 @@ public class BootstrapAppModelFactory {
}
}
CurationResult curationResult = new CurationResult(getAppModelResolver()
- .resolveManagedModel(appArtifact, forcedDependencies, managingProject));
+ .resolveManagedModel(appArtifact, forcedDependencies, managingProject, localArtifacts));
if (cachedCpPath != null) {
Files.createDirectories(cachedCpPath.getParent());
try (DataOutputStream out = new DataOutputStream(Files.newOutputStream(cachedCpPath))) {
| [BootstrapAppModelFactory->[newInstance->[BootstrapAppModelFactory],createAppModelForJar->[getAppModelResolver],getAppModelResolver->[setDevMode],debug->[debug],createBootstrapMavenContext->[setOffline]]] | Resolves the application model. Returns the application model that is curated if any. | I think the app model resolver should be providing the local artifacts instead of the other way around. It resolves them from the workspace anyway. |
@@ -8,6 +8,7 @@
<h1 class='h3'>
<%= t('doc_auth.headings.take_picture') %>
+</h1>
<p class='mt-tiny mb3'><%= t('doc_auth.info.take_picture') %></p>
| [No CFG could be retrieved] | overview page of single user id. | yikes --- is there a way we could have caught this? Like a view spec? |
@@ -155,6 +155,11 @@ func (s *CreateStep) Apply() (resource.Status, error) {
s.new.Outputs = outs
}
+ // Mark the old resource as pending deletion if necessary.
+ if s.replacing {
+ s.old.Delete = true
+ }
+
// And finish the overall operation.
s.goal.Done(s.new, false, nil)
s.iter.AppendStateSnapshot(s.new)
| [Color->[Failf],PastTense->[Failf],Apply->[Done,Create,All,AppendStateSnapshot,Delete,MarkStateSnapshot,Assert,URN,AllInputs,Update],Skip->[Done],Prefix->[Failf,Color],Package,Provider,Assert,Type,Plan] | Apply creates a new object in the live object state. | I was slightly surprised this isn't the responsibility of the caller to set. |
@@ -73,9 +73,11 @@ class AuthorizationCodeCredential(object):
return token
def _redeem_refresh_token(self, scopes, **kwargs):
- # type: (Iterable[str], **Any) -> Optional[AccessToken]
+ # type: (Sequence[str], **Any) -> Optional[AccessToken]
for refresh_token in self._client.get_cached_refresh_tokens(scopes):
- token = self._client.obtain_token_by_refresh_token(refresh_token, scopes, **kwargs)
+ if "secret" not in refresh_token:
+ continue
+ token = self._client.obtain_token_by_refresh_token(scopes, refresh_token["secret"], **kwargs)
if token:
return token
return None
| [AuthorizationCodeCredential->[get_token->[ClientAuthenticationError,get_cached_access_token,obtain_token_by_authorization_code,ValueError,_redeem_refresh_token],__init__->[pop,AadClient],_redeem_refresh_token->[get_cached_refresh_tokens,obtain_token_by_refresh_token]]] | Returns the last available refresh token or None if none is found. | Looks like we introduced breaking changes? |
@@ -474,6 +474,16 @@ public class InvokeHTTP extends AbstractProcessor {
.allowableValues("true", "false")
.build();
+ public static final PropertyDescriptor SUPPORT_HTTP2_PROTOCOL = new PropertyDescriptor.Builder()
+ .name("support-http2")
+ .description("Determines whether or not to support the HTTP 2 protocol version.")
+ .displayName("Support HTTP 2")
+ .required(true)
+ .defaultValue("True")
+ .allowableValues("True", "False")
+ .addValidator(StandardValidators.BOOLEAN_VALIDATOR)
+ .build();
+
private static final ProxySpec[] PROXY_SPECS = {ProxySpec.HTTP_AUTH, ProxySpec.SOCKS};
public static final PropertyDescriptor PROXY_CONFIGURATION_SERVICE
= ProxyConfiguration.createProxyConfigPropertyDescriptor(true, PROXY_SPECS);
| [InvokeHTTP->[convertAttributesFromHeaders->[csv],OverrideHostnameVerifier->[verify->[verify]]]] | This method is used to create a PropertyDescriptor that can be used to set the HTTP headers and Proxy configuration for all requests. | Recommend a slight wording change to use `HTTP/2` instead of `HTTP 2` in order to match official naming conventions. |
@@ -1237,6 +1237,9 @@ function $ParseProvider() {
return cache[exp];
}
+ // The csp option has to be set here because in tests the $sniffer service sets its csp
+ // property after $get has executed.
+ $parseOptions.csp = $sniffer.csp;
var lexer = new Lexer($parseOptions);
var parser = new Parser(lexer, $filter, $parseOptions);
parsedExpression = parser.parse(exp, false);
| [No CFG could be retrieved] | The function that gets the parsed expression. | I'm still not sure about this though, it seems weird to read this every time $parse is called. If it's the best we can do then that's one thing, but is there not a better solution? |
@@ -0,0 +1,4 @@
+from . import proxy
+
+load_jupyter_server_extension = proxy.setup
+_load_jupyter_server_extension = proxy.setup
| [No CFG could be retrieved] | No Summary Found. | why `load_jupyter_server_extension` and `_load_jupyter_server_extension`, and where we use these? |
@@ -87,7 +87,7 @@ namespace System.Text.Json
internal int Length { get; private set; }
private byte[] _data;
#if DEBUG
- private readonly bool _isLocked;
+ private bool _isLocked;
#endif
internal MetadataDb(byte[] completeDb)
| [JsonDocument->[MetadataDb->[SetNumberOfRows->[AssertValidIndex],SetHasComplexChildren->[AssertValidIndex],JsonTokenType->[AssertValidIndex],SetLength->[AssertValidIndex],DbRow->[AssertValidIndex]]]] | Fields that can be used to store the number of values in the metadata table. Creates an array of bytes for a single token. | Making this mutable for the new JsonElement.Parse API helps prevent a new alloc here. |
@@ -4760,10 +4760,11 @@ bool simple_wallet::try_connect_to_daemon(bool silent, uint32_t* version)
uint32_t version_ = 0;
if (!version)
version = &version_;
- if (!m_wallet->check_connection(version))
+ expect<void> status{};
+ if (!(status = m_wallet->check_connection(version)))
{
if (!silent)
- fail_msg_writer() << tr("wallet failed to connect to daemon: ") << m_wallet->get_daemon_address() << ". " <<
+ fail_msg_writer() << tr("wallet failed to connect to daemon ") << m_wallet->get_daemon_address() << " : " << status.error().message() << ". " <<
tr("Daemon either is not started or wrong port was passed. "
"Please make sure daemon is running or change the daemon address using the 'set_daemon' command.");
return false;
| [No CFG could be retrieved] | Checks if the connection to the daemon is established. Get the mnemonic language from the user. | That is *really* confusing. Above, you inverted the return value check when swithing from bool to expect. Here and below, not. |
@@ -1234,6 +1234,15 @@ public class VmwareStorageProcessor implements StorageProcessor {
details = "create template from volume exception: " + VmwareHelper.getExceptionMessage(e);
return new CopyCmdAnswer(details);
+ } finally {
+ try {
+ if (volume.getVmName() == null && vmMo != null) {
+ vmMo.detachAllDisks();
+ vmMo.destroy();
+ }
+ } catch (Throwable e) {
+ s_logger.warn("Failed to destroy worker VM created for detached volume");
+ }
}
}
| [VmwareStorageProcessor->[copyTemplateToPrimaryStorage->[getName,copyTemplateFromSecondaryToPrimary],removeVmfsDatastore->[getHostDiscoveryMethod,removeVmfsDatastore,getHostsUsingStaticDiscovery,unmountVmfsDatastore],createVolumeFromSnapshot->[restoreVolumeFromSecStorage],getOVFFilePath->[getName],createTemplateFromSnapshot->[getName,createTemplateFromSnapshot,handleManagedStorageCreateTemplateFromSnapshot],unmountVmfsVolume->[getDatastoreUuid,isDatastoreMounted,unmountVmfsVolume],attachIso->[getVmName,getName,attachIso,prepareSecondaryDatastoreOnHost],addRemoveInternetScsiTargetsToAllHosts->[addRemoveInternetScsiTargetsToAllHosts],copyVolumeFromImageCacheToPrimary->[copyVolumeFromSecStorage,deleteVolumeDirOnSecondaryStorage],rescanAllHosts->[rescanAllHosts],resignatureDatastore->[HostUnresolvedVmfsResignatureSpecCustom],getTemplateVmdkName->[getName],dettachIso->[getVmName,attachIso],cleanUpDatastore->[getName],expandVirtualDisk->[getName],copyVolumeToSecStorage->[getVolumePathInDatastore],mountVmfsDatastore2->[getDatastoreUuid,waitForAllHostsToMountDatastore2,isDatastoreMounted,getName],backupSnapshot->[getVmName,getName,backupSnapshotToSecondaryStorage],removeManagedTargetsFromCluster->[getHostsUsingStaticDiscovery,rescanAllHosts,unmountVmfsDatastore,getHostDiscoveryMethod,addRemoveInternetScsiTargetsToAllHosts],deriveTemplateUuidOnHost->[toString],handleDatastoreAndVmdkDetach->[removeVmfsDatastore,trimIqn],createVMLinkedClone->[createVMLinkedClone],cloneVolumeFromBaseTemplate->[createVMFullClone,getName,createVMLinkedClone,getVmName],backupSnapshotToSecondaryStorage->[exportVolumeToSecondaryStorage],prepareManagedStorage->[getName,createVmdk,prepareManagedDatastore],handleRemove->[waitForDatastoreName,unmountVmfsDatastore2],renameDatastore->[renameDatastore],getHostDiscoveryMethod->[getHostDiscoveryMethod,HostDiscoveryMethod],dettachVolume->[getVmName,attachVolume],handleManagedStorageCreateTemplateFromSnapshot->[getTemplateVmdkName,setUpManagedStorageCopyTemplateFromSnapshot,exportManagedStorageSnapshotToTemplate,getVirtualSize,createTemplateFolder,handleMetadataCreateTemplateFromSnapshot,getPhysicalSize,takeDownManagedStorageCopyTemplateFromSnapshot],attachVolume->[getVmName,attachVolume,getName],getVmfsDatastore->[getHostDiscoveryMethod,getTargets,getHostsUsingStaticDiscovery,expandDatastore],handleDatastoreAndVmdkDetachManaged->[handleDatastoreAndVmdkDetach,getDatastoreName],restoreVolumeFromSecStorage->[toString,getOVFFilePath],handleTargets->[getHostDiscoveryMethod,mountVmfsDatastore2,getTargets,getHostsUsingDynamicDiscovery],createTemplateFromVolume->[getVmName,getName,createTemplateFromVolume,postCreatePrivateTemplate],deleteVolume->[getManagedDatastoreNameFromPath,getVmName],copyVolumeFromPrimaryToSecondary->[getVmName,copyVolumeToSecStorage],handleMetadataCreateTemplateFromSnapshot->[Size,postCreatePrivateTemplate,writeMetaOvaForTemplate],getLegacyVmDataDiskController->[toString],prepareSecondaryDatastoreOnHost->[getSecondaryDatastoreUUID],copyTemplateFromSecondaryToPrimary->[getOVFFilePath]]] | Create a template from a volume. write the OVA for a template. | Ah nevermind, worker VM will be destroyed here. Should we explictly set workerVmMo above and use that to destroy in finally? To avoid any regressions? |
@@ -822,7 +822,7 @@ function settings_content(&$a) {
$settings_connectors .= mini_group_select(local_user(), $default_group, t("Default group for OStatus contacts"));
if ($legacy_contact != "")
- $a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.$a->get_baseurl().'/ostatus_subscribe?url='.urlencode($legacy_contact).'">';
+ $a->page['htmlhead'] = '<meta http-equiv="refresh" content="0; URL='.App::get_baseurl().'/ostatus_subscribe?url='.urlencode($legacy_contact).'">';
$settings_connectors .= '<div id="legacy-contact-wrapper" class="field input">';
$settings_connectors .= '<label id="legacy-contact-label" for="snautofollow-checkbox">'. t('Your legacy GNU Social account'). '</label>';
| [settings_content->[get_baseurl,get_hostname,get_path],settings_post->[get_baseurl,discover]] | settings_content - Shows the settings page This function renders the settings_oauth. tpl file. This function is used to render the settings page settings_features - Shows the settings features This is the default configuration for the user. | Standards: Can you please add brackets to this conditional statement? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.