profile
viewpoint
hbc bcho Earth https://www.build4.fun/ 可爱又迷人的反派角色 adorable bastard

bcho/bearychat.go 4

Deprecated. Please use bearyinnovative/bearychat-go.

bcho/bearychat 3

A simple package for interacting with bearychat.

bcho/ansible-tuto 2

Ansible tutorial

bcho/bearychat-py 2

A simple package for interacting with bearychat.

b4fun/snippet 1

The snippet repository for snippet.build4.fun

issue closedgrpc/grpc

Make grpc_core::PemKeyCertPair Taking std::string

Current grpc_core::PemKeyCertPair implementation(https://github.com/grpc/grpc/blob/master/src/core/lib/security/security_connector/ssl_utils.h#L146) depends on the core struct grpc_ssl_pem_key_cert_pair. Using this in TlsCredentials will cause a lot of unnecessary copies all over the place. It would be good if we change this to take std::string as parameters, and only convert to core struct once when it is actually used.

CC @markdroth @jiangtaoli2016

closed time in a minute

ZhenLian

issue commentgrpc/grpc

Make grpc_core::PemKeyCertPair Taking std::string

This was done in #24805.

ZhenLian

comment created time in a minute

issue openedapple/foundationdb

Usage of libfdb_c steadily increases memory used by process

Here is a simple c++ program which links to libfdb_c, and creates and destroys 10 million futures in a loop, and then waits for an hour. The memory usage peaks at around 4GB, and never goes back down.

The current theory is that this is because basically any usage of the c api allocates memory on a client thread through fast alloc, which is later "freed" by the main thread. (i.e. just put on the main thread's freelist). Client threads can never re-use any of the memory they allocate with fast alloc, so total memory usage just steadily grows.

#define FDB_API_VERSION 300
#include <foundationdb/fdb_c.h>

#include <iostream>
#include <thread>
#include <vector>

void fdb_check(fdb_error_t e) {
  if (e) {
    std::cerr << fdb_get_error(e) << std::endl;
    std::abort();
  }
}

struct DB {
  ~DB() {
    if (db)
      fdb_database_destroy(db);
  }
  FDBDatabase *db = nullptr;
};

struct Tx {
  ~Tx() {
    if (tx)
      fdb_transaction_destroy(tx);
  }
  FDBTransaction *tx = nullptr;
};

struct Future {
  ~Future() {
    if (f)
      fdb_future_destroy(f);
  }
  FDBFuture *f = nullptr;
};

FDBDatabase *fdb_open_database(const char *clusterFile) {
  FDBDatabase *db;
  FDBCluster *cluster;
  FDBFuture *f = fdb_create_cluster(clusterFile);
  fdb_check(fdb_future_block_until_ready(f));
  fdb_check(fdb_future_get_cluster(f, &cluster));
  fdb_future_destroy(f);
  f = fdb_cluster_create_database(cluster, (uint8_t *)"DB", 2);
  fdb_check(fdb_future_block_until_ready(f));
  fdb_check(fdb_future_get_database(f, (FDBDatabase **)&db));
  fdb_future_destroy(f);
  fdb_cluster_destroy(cluster);
  return db;
}

int main(int argc, char **argv) {
  fdb_check(fdb_select_api_version(300));
  fdb_check(fdb_setup_network());
  std::thread network_thread{&fdb_run_network};
  {
    DB db;
    db.db = fdb_open_database(argv[1]);
    Tx tx;
    fdb_check(fdb_database_create_transaction(db.db, &tx.tx));
    for (int i = 0; i < 1e7; ++i) {
      Future f;
      f.f = fdb_transaction_get_read_version(tx.tx);
      if (i % 10000 == 0) {
        printf("Futures created and destroyed: %d\n", i);
      }
    }
    using namespace std::chrono_literals;
    std::this_thread::sleep_for(1h);
  }
  fdb_check(fdb_stop_network());
  network_thread.join();
}

created time in 2 minutes

Pull request review commentdeislabs/krustlet

Krator Support for Modified Events

 pub async fn run_to_completion<S: ResourceState<Manifest = Container, Status = S     initial_state: impl State<S>,     shared: SharedState<S::SharedState>,     mut container_state: S,-    pod: SharedState<Pod>,+    pod: Manifest<Pod>,     container_name: ContainerKey, ) -> anyhow::Result<()> {-    let (pod_name, api) = {-        let initial_pod = pod.read().await.clone();-        let namespace = initial_pod.namespace().to_string();-        let name = initial_pod.name().to_string();-        let api: Api<KubePod> = Api::namespaced(client.clone(), &namespace);-        (name, api)-    };+    let initial_pod = pod.latest();+    let namespace = initial_pod.namespace().to_string();+    let pod_name = initial_pod.name().to_string();+    let api: Api<KubePod> = Api::namespaced(client.clone(), &namespace);      let mut state: Box<dyn State<S>> = Box::new(initial_state); +    // Forward pod updates as container updates.+    let initial_container = match initial_pod.find_container(&container_name) {+        Some(container) => container,+        None => anyhow::bail!(+            "Unable to locate container {} in pod {} manifest.",+            container_name,+            pod_name+        ),+    };++    let (container_tx, container_rx) = Manifest::new(initial_container);+    let mut task_pod = pod.clone();+    let task_container_name = container_name.clone();+    tokio::spawn(async move {+        while let Some(latest_pod) = task_pod.next().await {+            let latest_container = match latest_pod.find_container(&task_container_name) {+                Some(container) => container,+                None => {+                    error!(+                        "Unable to locate container {} in pod {} manifest.",+                        &task_container_name,+                        latest_pod.name()+                    );+                    continue;

Yeah, this was an explicit decision if I remember correctly. Aborting the whole pod felt like overkill for something that could fail on a transient network failure

kflansburg

comment created time in 2 minutes

issue commentgreatsuspender/thegreatsuspender

URGENT: SECURITY: New maintainer is probably malicious

FWIW I snatched the crx (compiled extension) off the chrome webstore and it does appear to be identical to what you see on github (in the top 2 screenshots the left is the zip from github, right is the extracted crx).

I have NOT done a thorough review, of the code, but third screenshot is a diff of gsAnalytics.js from The Marvelous ext and right is from 7.1.9 of TGS that's currently on the chrome store... you can see where TGS does implement an opt out. (the GA token doesn't appear to have been changed so whoever forked it doesn't seem like this was intentional, it was just forked from a version prior to the opt out. Again I have NOT done a thorough review and the analytics may be neutered in a different part of the script and the script was included in the package is all I can say about the fork.

2021-01-20_11h20_37 2021-01-20_11h22_13 2021-01-20_11h27_03

TheMageKing

comment created time in 3 minutes

Pull request review commentdeislabs/krustlet

Krator Support for Modified Events

 impl<O: Operator> OperatorRuntime<O> {                         if meta.deletion_timestamp.is_some() {                             reflector_deleted.notify();                         }-                        *reflector_manifest.write().await = manifest;+                        match manifest_tx.broadcast(manifest) {+                            Ok(()) => (),+                            Err(e) => {+                                warn!("Unable to broadcast manifest update: {:?}", e);+                                return;

Not sure if I follow here or not, I don't think we are triggering a delete in the case of a return. It just stops listening for events on that state machine. I think we could maybe improve the behavior that happens in that case, but I don't think it triggers a delete based on my reread of the code

kflansburg

comment created time in 3 minutes

issue commentmicrosoft/vscode

Extract the integrated terminal

While readding the comments here, i notice that there are two feature requests that are different but still lives on the same issue:

  • Begin able to use the Vscode terminal standalone
  • Alowing the vscode terminal, still attached to the vscode session, to be poped-out as an independant window, mainly to put it on another screen to fully use screen real estate.

These two features are clearly different. Since I only want the second one, which looks easier to implement (but might not be, i'm not aware of vscode internals), maybe we should split the issue in two ?

Furthermore, feature requests asking for only one of the two are systematically closed as duplicates of this one.

I think we should split.

lloeki

comment created time in 4 minutes

issue commentgolang/go

Proposal: remove compiler error for unused variables

Let me quote purplepharoh from that Reddit thread:

"The thing about GO is that it enforces good practices with compiler errors. For example this could be a warning but most people ignore warnings and often don't fix them, good practice is to remove (or use) unused variables so GO enforces this."

This is an essential feature of Go which ensures consistency and minimum code quality. Code is read more often than it is written and unused variables left over from development are a hindrance to reading. An unused variable definitely is bad practice since it indicates unfinished code or messy code, or worse, a shadowed variable. The latter often happens with err error variables.

For your use case of return values in the debugger, just declare your function with variables for the return, e. g. func Square(in int) (res int).

For planning code, your functions are too complex if you want to add unused variables in there for planning purposes. Besides, in other languages, they have the tendency to stick around when they end up being unneeded after all, or become redundant.

I had similar feelings about Go 10 years ago when I learned Go, but now I changed my mind. While the Go approach of enforcing good practice takes some getting used to, especially when coming from a different language, once you get the hang of it, you'll reap the benefits.

dancojocaru2000

comment created time in 4 minutes

Pull request review commentenvoyproxy/envoy

Docs:Add an FAQ item about how to configure Skywalking Tracing.

+.. _common_configuration_tracing:++How do I configure tracing?

Can you also link to the generic tracing documentation? https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/observability/tracing

Thank you

/wait

Frapschen

comment created time in 5 minutes

pull request commentdraios/sysdig

Parse parameters for all chown/chmod syscalls

@SteveHallNNT I synced this branch with the current dev (hopefully I did not miss anything). I'm currently building and testing it and will report if there are any issues.

It is up to the maintainers now if this will be merged or not.

arossert

comment created time in 5 minutes

issue commenthashicorp/consul

Support mesh gateway mode local as a default not through proxy-defaults

Some discussion we had:

  1. A flag on the servers/clients that would set the "default default"
  2. Notice if there are mesh gateways and no local endpoints and then use them - this gets complicated because the watches need to be rejigged and also what happens if the mesh gateways are "up" but aren't actually usable yet.
lkysow

comment created time in 5 minutes

Pull request review commentenvoyproxy/envoy

tls: improve TLS handshake/read/write error log

 absl::optional<std::string> Utility::getLastCryptoError() {   return absl::nullopt; } +absl::string_view Utility::getErrorDescription(int err) {

OK @Shikugawa can you possibly add a TODO so thast when we bump the FIPS version we can remove this function?

Shikugawa

comment created time in 7 minutes

issue commentdenoland/deno

Suggestion(Deno.emit): Add option for enabling unstable APIs in EmitOptions

@caspervonb I agree that could be another solution.

@kitsonk What do you think?

kt3k

comment created time in 7 minutes

issue commentmicrosoft/vscode

onDidSaveNotebookDocument not fired when saving notebooks

(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

DonJayamanne

comment created time in 7 minutes

issue openedmicrosoft/vscode

onDidSaveNotebookDocument not fired when saving notebooks

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ --> <!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ --> <!-- Please search existing issues to avoid creating duplicates. --> <!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. --> Version: 1.53.0-insider OS: Darwin x64 20.2.0

Steps to Reproduce:

  1. Create an extension using the VSC Notebook API
  2. Add event handler to onDidSaveNotebookDocument
  3. Save a notebook and this event isn't fired.

This seems to only work when saving an untitled notebook or using the Save As option. Doesn't fire for regular saves (with & without auto save).

<!-- Launch with code --disable-extensions to check. --> Does this issue occur when all extensions are disabled?: Yes

created time in 7 minutes

PR closed tensorflow/tfx

Update issue templates cla: yes

Generated change from issues UI.

+68 -0

0 comment

3 changed files

zhitaoli

pr closed time in 8 minutes

issue commenttensorflow/tfjs

npm i @tensorflow/tfjs-node fails to install

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you.

404jimnotfound

comment created time in 8 minutes

issue openedhashicorp/consul

Support mesh gateway mode local as a default not through proxy-defaults

Feature Description

In Kubernetes, we want users to be able to turn on mesh gateways via their helm configs, install two federated clusters, and have services be able to communicate between them.

Currently, that requires an additional step of creating a proxy-defaults config entry that sets meshGateway.mode to local or remote.

It would be great if there was a way to set this at install time so it doesn't require an extra step.

NOTE: Using the config_entries.bootstrap setting doesn't work anymore (that's what we used to do) because that config entry is now to be managed via CRD.

created time in 8 minutes

issue commentgrpc/grpc

sed command fails on prepare_command step on linux machine from grpc podspec

Any updates on when this fix will be available?

tikekar

comment created time in 8 minutes

push eventtensorflow/tfx

Zhitao

commit sha e460c094927fde7a12dfda357b6b7de748087bc3

Update issue templates Generated change from issues UI.

view details

push time in 9 minutes

create barnchtensorflow/tfx

branch : zhitaoli-template-config

created branch time in 9 minutes

PR opened tensorflow/tfx

Update issue templates

Generated change from issues UI.

+68 -0

0 comment

3 changed files

pr created time in 9 minutes

create barnchmicrosoft/vscode

branch : dependabot/npm_and_yarn/fstream-1.0.12

created branch time in 9 minutes

PR opened microsoft/vscode

Bump fstream from 1.0.11 to 1.0.12

Bumps fstream from 1.0.11 to 1.0.12. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/npm/fstream/commit/42354590e23bb514eb5c869eea64406be2947c6c"><code>4235459</code></a> 1.0.12</li> <li><a href="https://github.com/npm/fstream/commit/6a77d2fa6e1462693cf8e46f930da96ec1b0bb22"><code>6a77d2f</code></a> Clobber a Link if it's in the way of a File</li> <li>See full diff in <a href="https://github.com/npm/fstream/compare/v1.0.11...v1.0.12">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+28 -59

0 comment

1 changed file

pr created time in 9 minutes

push eventmicrosoft/vscode

Rachel Macfarlane

commit sha 93ae815ba14ddb88615f53f19a8e65f69851882a

Feedback on secrets API #112249

view details

push time in 10 minutes

pull request commentrrweb-io/rrweb

Think there is some style changes here that aren't showing up in the test results

New pull request for a fix for this: https://github.com/rrweb-io/rrweb/pull/468

eoghanmurray

comment created time in 11 minutes

Pull request review commentdeislabs/krustlet

Krator Support for Modified Events

 impl State<PodState> for Starting {                 Arc::clone(&pod_state.run_context),             );             let task_provider = Arc::clone(&provider_state);-            let task_pod = Arc::clone(&arc_pod);+            let task_pod = pod_rx.clone();

Oh, I just realized that it is just the embedded receiver. This is fine then

kflansburg

comment created time in 12 minutes

push eventhashicorp/consul

Freddy

commit sha e50019b0922cfc6ba9a1f277df9efaf19d080c41

Update topology mapping Refs on all proxy instance deletions (#9589) * Insert new upstream/downstream mapping to persist new Refs * Avoid upserting mapping copy if it's a no-op * Add test with panic repro * Avoid deleting up/downstreams from inside memdb iterator * Avoid deleting gateway mappings from inside memdb iterator * Add CHANGELOG entry * Tweak changelog entry Co-authored-by: Paul Banks <banks@banksco.de>

view details

John Cowen

commit sha 30014ff8feff64d29dce840bde500ac11a564f47

ui: Convert Service.GatewayConfig to a model fragment (#9586) * ui: Convert Service.GatewayConfig to a model fragment We added the ember-intl addon, which has its own format-number helper. We replaced our own similarly named helper with this one, but the ember-intl one is far stricter and errors if the arguments passed are undefined. Our previously one would cope with this. We'd rather continue to use the stricter ember-intl helper, so here we convert the GatewayConfig property to a model fragment so that we can give the GatewayConfig.AssociatedServices property a default zero value.

view details

hashicorp-ci

commit sha daa384b64d5807a9e4289412c6269060e1335f56

auto-updated agent/uiserver/bindata_assetfs.go from commit 30014ff8f

view details

John Cowen

commit sha f2fe202010013809038896ebb9ce1078c40b7747

chore: Changelog entry for #9524 (#9595)

view details

Matt Keeler

commit sha 4fa884ee3de327707630f29ecd39775048701588

Fix flaky test by marking mock expectations as optional (#9596) These expectations are optional because in a slow CI environment the deadline to cancell the context might occur before the go routine reaches issuing the RPC. Either way we are successfully ensuring context cancellation is working.

view details

John Cowen

commit sha aedd338e709de71c8dfbba1965e147db5b9b3514

api: Ensure the internal/ui/gateway-service-nodes endpoint responds with an array (#9593) In some circumstances this endpoint will have no results in it (dues to ACLs, Namespaces, filtering or missing configuration). This ensures that the response is at least an empty array (`[]`) rather than `null`

view details

Kenia

commit sha ffb6680e76d4b74c1ddad78c8c4cfe0c54a1c333

ui: Removing formatting to display LockDelay in nanoseconds (#9594) * Removing formatting to display LockDelay in nanoseconds * Update test * Add changelog

view details

hashicorp-ci

commit sha 972fa320f801575ce28b395bc40ca2e11561f2de

auto-updated agent/uiserver/bindata_assetfs.go from commit ffb6680e7

view details

John Cowen

commit sha 597fcbb7cd5e1ab2fbbd09c8b78a55dcb22044ef

Add templating to inject JSON into an application/json script tag Plus an external script in order to pick it out and inject the values we need injecting into ember's environment meta tag.

view details

John Cowen

commit sha ceb2386e50959191d8c91f8ae920a4d448fecad7

Remove all the regex-ness from uiserver and just use gotemplate

view details

John Cowen

commit sha b559d5fda2bc74b0a5db9509ec58d148685f6b30

Fix up where old frontend code and new backend code meet The UI still uses env style naming (CONSUL_*) but we uses the new style JSON/golang props behind the scenes.

view details

John Cowen

commit sha d79dac9fe4dcfebfef718ce170d164be06fec47c

Remove the last remaining bits of the regex/meta/encoding stuff

view details

John Cowen

commit sha 027479efcd981ff5dad3fee1642b22f9a8086b91

Fixup tests

view details

John Cowen

commit sha 4575c0a7a2417a895ecc15654e49fb36c4383b6d

Update vendor

view details

John Cowen

commit sha ad34ff0528d96bb4058986b169071056eb58cf83

Update agent/uiserver/uiserver_test.go Co-authored-by: Paul Banks <banks@banksco.de>

view details

John Cowen

commit sha 685df574b3fdc5226a5c457fedc2edeb56d2631e

binaryConfig > operatorConfig

view details

John Cowen

commit sha 6ea4bc3ee95c48acced771525a4d1228e20de782

Changelog

view details

John Cowen

commit sha d76d086bd01ce8dc857c5d727c2e6d8b7c5e2e34

Fix up js ui tests

view details

John Cowen

commit sha 8661a4399a8a4df0cce04b1aab4ffd3d743e0305

One last make ui (sorry)

view details

push time in 12 minutes

Pull request review commentdeislabs/krustlet

Krator Support for Modified Events

 impl State<PodState> for Starting {                 Arc::clone(&pod_state.run_context),             );             let task_provider = Arc::clone(&provider_state);-            let task_pod = Arc::clone(&arc_pod);+            let task_pod = pod_rx.clone();

My worry isn't about the channel so much as the embedded manifest (the inner T) which is a pretty large struct

kflansburg

comment created time in 13 minutes

PR opened rrweb-io/rrweb

fix for 'suspendMutationsDuringSnapshot' #385

Discovered that the common case of mouse movement or scrolling happening during takeFullSnapshot was causing mutations to be immediately emitted, contrary to the goal of https://github.com/rrweb-io/rrweb/pull/385

Instead create two different types of 'lock' for mutations, one to do with freezes initiated by inactivity (which can be unlocked by any new non-mutation activity) and another lock during fullSnapshot, which can't be unlocked until the fullSnapshot is finished.

+20 -9

0 comment

3 changed files

pr created time in 13 minutes

more