examples/get_started/regression/dnn_regression.py failed with ValueError (nightly build)

The above example has not been working for awhile now. (I don't believe it worked with 1.13.1) the code looks valid, what is wrong with the example code?
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): x86 Linux Ubuntu 18.04 container
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): v1.12.0-12503-g5e52b70188 1.14.1-dev20190415
Python version: 3.6.7
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: N/A
GPU model and memory: N/A

Describe the current behavior
The example https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/get_started/regression/dnn_regression.py, fails with the following error:
ValueError: Tensor("buffer_size:0", shape=(), dtype=int64, device=/device:CPU:0) must be from the same graph as Tensor("MapDataset_2:0", shape=(), dtype=variant).
(Actually all 3 examples in that folder fail with the same error)
Describe the expected behavior
Provided examples should run without failure
Code to reproduce the issue
pip3 install tf-nightly
git clone http://github.com/tensorflow/tensorflow
cd tensorflow/tensorflow/examples/get_started/regression/
python3 dnn_regression.py
Other info / logs
root@c12a5b5766c5:~/tensorflow/tensorflow/examples/get_started/regression# python3 dnn_regression.py

WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
  * https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not listed there, please file an issue.

Downloading data from https://archive.ics.uci.edu/ml/machine-learning-databases/autos/imports-85.data
32768/25936 [=====================================] - 0s 1us/step
W0415 20:14:20.850975<PHONE_NUMBER>54496 deprecation.py:237] From /root/tensorflow/tensorflow/examples/get_started/regression/imports85.py:123: The name tf.string_to_hash_bucket_fast is deprecated. Please use tf.strings.to_hash_bucket_fast instead.

I0415 20:14:20.987369<PHONE_NUMBER>54496 estimator.py:1761] Using default config.
W0415 20:14:20.987863<PHONE_NUMBER>54496 estimator.py:1782] Using temporary folder as model directory: /tmp/tmpn4983vfs
I0415 20:14:20.988089<PHONE_NUMBER>54496 estimator.py:203] Using config: {'_model_dir': '/tmp/tmpn4983vfs', '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_steps': None, '_save_checkpoints_secs': 600, '_session_config': allow_soft_placement: true
graph_options {
  rewrite_options {
    meta_optimizer_iterations: ONE
  }
}
, '_keep_checkpoint_max': 5, '_keep_checkpoint_every_n_hours': 10000, '_log_step_count_steps': 100, '_train_distribute': None, '_device_fn': None, '_protocol': None, '_eval_distribute': None, '_experimental_distribute': None, '_experimental_max_worker_delay_secs': None, '_service': None, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7fe593747048>, '_task_type': 'worker', '_task_id': 0, '_global_id_in_cluster': 0, '_master': '', '_evaluation_master': '', '_is_chief': True, '_num_ps_replicas': 0, '_num_worker_replicas': 1}
W0415 20:14:20.993491<PHONE_NUMBER>54496 deprecation.py:323] From /usr/local/lib/python3.6/dist-packages/tensorflow/python/training/training_util.py:238: Variable.initialized_value (from tensorflow.python.ops.variables) is deprecated and will be removed in a future version.
Instructions for updating:
Use Variable.read_value. Variables in 2.X are initialized automatically both in eager and graph (inside tf.defun) contexts.
Traceback (most recent call last):
  File "dnn_regression.py", line 105, in <module>
    tf.app.run(main=main)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 300, in run
    _run_main(main, args)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 251, in _run_main
    sys.exit(main(argv))
  File "dnn_regression.py", line 85, in main
    model.train(input_fn=input_train, steps=STEPS)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_estimator/python/estimator/estimator.py", line 360, in train
    loss = self._train_model(input_fn, hooks, saving_listeners)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_estimator/python/estimator/estimator.py", line 1152, in _train_model
    return self._train_model_default(input_fn, hooks, saving_listeners)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_estimator/python/estimator/estimator.py", line 1179, in _train_model_default
    input_fn, ModeKeys.TRAIN))
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_estimator/python/estimator/estimator.py", line 1016, in _get_features_and_labels_from_input_fn
    self._call_input_fn(input_fn, mode))
  File "/usr/local/lib/python3.6/dist-packages/tensorflow_estimator/python/estimator/estimator.py", line 1107, in _call_input_fn
    return input_fn(**kwargs)
  File "dnn_regression.py", line 46, in input_train
    train.shuffle(1000).batch(128)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 1634, in shuffle
    buffer_size, seed, reshuffle_each_iteration))
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 751, in shuffle
    return ShuffleDataset(self, buffer_size, seed, reshuffle_each_iteration)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/dataset_ops.py", line 2743, in __init__
    **flat_structure(self))
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/gen_dataset_ops.py", line 4976, in shuffle_dataset
    name=name)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py", line 366, in _apply_op_helper
    g = ops._get_graph_from_inputs(_Flatten(keywords.values()))
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py", line 6098, in _get_graph_from_inputs
    _assert_same_graph(original_graph_element, graph_element)
  File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py", line 6034, in _assert_same_graph
    original_item))
ValueError: Tensor("buffer_size:0", shape=(), dtype=int64, device=/device:CPU:0) must be from the same graph as Tensor("MapDataset_2:0", shape=(), dtype=variant).
root@c12a5b5766c5:~/tensorflow/tensorflow/examples/get_started/regression#

In 1.13.1 this doesn't work either, it fails with the same error, but if you undo the last commit to the example (https://github.com/tensorflow/tensorflow/commit/e2b36c5026b856ca63041085c3183f0f7d490e71#diff-4cfd74ba277097d2966e281f8e8655b8) it works.
That fix however doesn't work with the nightly builds.

The bug still exists in 1.14,  does any knows how to fix it?

closing old issues I opened. I'm not sure if this test is still in 2.2.0

Thanks for closing.
Sorry about the confusion. I've deleted these example as they were no longer relevant.


Sweep: Change all references in the repo of codium or cursor to CodeCurse

Details
Replace Codium with CodeCurse and Cursor with CodeCurse in all repo files.

Sweep: You taking the day off bro?


[BugFix] forget to choose cn when starosAgent returned "failed to get primary backend"

Fixes #issue
What type of PR is this:

[x] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.2
[x] 3.1
[ ] 3.0
[ ] 2.5

[[BugFix] backport_pr_34317_to_branch-3.1
#35558](https://github.com/StarRocks/starrocks/pull/35558)


Better logging in factoryinsight/Grafana proxy

Description
Adds better logging for factoryinsight
Type of change
Please delete options that are not relevant.

[X] New feature (non-breaking change which adds functionality)

How Has This Been Tested?

[ ] Builds

@JeremyTheocharis Gitguardian reports 89 new unsanitized logs.
While i can see, why it outputs those, zap will encode any non printable character to defang it.


feat(pkgs): Update the EC2 Packages to now include the new READ-ONLY Subnet and Vpc assets

bors merge


cli control without GUI

I'm interested to use the project in an embedded system without GUI  and Qt dependency, so I'll rewrite the control part in C++ or C; any suggestion or help is appreciated!
Thank you

I added a cli version of control and uart4 into bootloader
see pull request #4


react/no-unused-class-component-methods false positive when method is referenced via a ref

The react/no-unused-class-component-methods rule will incorrectly flag a method as unused if it is only referenced through a ref.
A minimal example:
class MyComponent {
...
public refMethod() { } // Linter says this is unused
...
}

function MyOtherComponent {
  const myComponentRef = useRef();

  useEffect(() => {
    myComponentRef.current?.refMethod();
  }, []);

  return <MyComponent ref={myComponentRef} />;
}

React components are not supposed to be used like a class instance, and I’m surprised a ref gives you the actual component instance.
At any rate, JS isn’t a typed language, and static analysis has limits, so this is simply not something a linter can know. I’d suggest using an eslint override comment.

I had the same reaction that refs could be used to access functions on the class.
I figured this would probably be beyond the capabilities of the linter but wanted to raise it just in case. I'll take the route of disabling the linter on that line. Thanks!


[Network] az network vnet peering: Refine command interface

Related command

Description

according to RE: Virtual Network- Subnet peering
Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

[ ] I adhere to the Error Handling Guidelines.

Network


➕ [RESOURCE] - Add a flexbox froggy

Idea Contribution

[X] I have read all the resource request issues.
[X] I'm interested in working on this issue
[X] I'm part of GSSOC organization

Where do you want to add the resource? Specify the category and section.
Flexbox froggy is used to understand the properties of flexbox in an interactive manner.
Provide the URLs of the resources you are adding
https://flexboxfroggy.com/
Any alternative approaches/features
No response
Additional Context
No response
Code of Conduct

[X] I follow the CONTRIBUTING GUIDELINE of this project.

This resource  is present already in the project.


Create test

Description

Checklist:

[ ] I have tested my changes. No regression in existing tests.
[ ] My code is Linted.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/bot run checks

/bot run checks

/bot run checks

/bot run checks

/bot run checks

test

/bot run

/bot run checks

/bot run checks

/bot run checks

/bot run checks


fix: android branding

I tested this and the Muxable logo is stretched. I think the branding images need to have an aspect ratio of 5:2

I tested this and the Muxable logo is stretched. I think the branding images need to have an aspect ratio of 5:2

Ah thanks for the catch I will ask about getting one done.


loadFrom* documentation

The function loadFromBiom has outdated example section:

refers to se (not tse) as function output, although the function seems to return TreeSE
converts SE to TreeSE although the object is already SE before the conversion

Suggestion: fix this and check other functions for similar issue.
   if(requireNamespace("biomformat")) {
       library(biomformat)
       # load from file
       rich_dense_file  = system.file("extdata", "rich_dense_otu_table.biom",
                                      package = "biomformat")
       se <- loadFromBiom(rich_dense_file, removeTaxaPrefixes = TRUE)

       # load from object
       x1 <- biomformat::read_biom(rich_dense_file)
       se <- makeTreeSEFromBiom(x1)
       # Convert SE to TreeSE
       tse <- as(se, "TreeSummarizedExperiment")
       tse
     }

Hello @antagomir
i would like to work on this issue
would you assign it to me ?

Would be great if you can check the other functions / R files for the same issue on the same go!

Hi @kakonodia are you still taking this one?

This is already done @RiboRings ?

Hi! Yes, this is done.


Autocorrects punchlist

Here is a set of autocorrects that makes sense to add

[x] https://github.com/sorbet/sorbet/blob/6689d9086a866f490ee3bba5480c0a494c8d23d3/infer/environment.cc#L1048

[x] https://github.com/sorbet/sorbet/blob/21b05b4018be869ce282dd4e48e3046e8c8f93e8/core/types/calls.cc#L935

[ ] https://github.com/sorbet/sorbet/blob/21b05b4018be869ce282dd4e48e3046e8c8f93e8/infer/environment.cc#L1053

[x] https://github.com/sorbet/sorbet/blob/d922217336adea4098f4f8c84309c77f6ff80fd3/resolver/type_syntax.cc#L302

[ ] https://github.com/sorbet/sorbet/blob/d922217336adea4098f4f8c84309c77f6ff80fd3/resolver/type_syntax.cc#L329

[x] https://github.com/sorbet/sorbet/blob/d922217336adea4098f4f8c84309c77f6ff80fd3/resolver/type_syntax.cc#L763

[ ] https://github.com/sorbet/sorbet/blob/88a8efcdfe0f2a0b21437de9e7c33f4e0fe0ade8/definition_validator/validator.cc#L62

[ ] https://github.com/sorbet/sorbet/blob/88a8efcdfe0f2a0b21437de9e7c33f4e0fe0ade8/definition_validator/validator.cc#L72

[ ] https://github.com/sorbet/sorbet/blob/88a8efcdfe0f2a0b21437de9e7c33f4e0fe0ade8/definition_validator/validator.cc#L81

[ ] https://github.com/sorbet/sorbet/blob/88a8efcdfe0f2a0b21437de9e7c33f4e0fe0ade8/definition_validator/validator.cc#L106

[ ] https://github.com/sorbet/sorbet/blob/88a8efcdfe0f2a0b21437de9e7c33f4e0fe0ade8/definition_validator/validator.cc#L118

[ ] https://github.com/sorbet/sorbet/blob/88a8efcdfe0f2a0b21437de9e7c33f4e0fe0ade8/definition_validator/validator.cc#L126

[ ] https://github.com/sorbet/sorbet/blob/88a8efcdfe0f2a0b21437de9e7c33f4e0fe0ade8/definition_validator/validator.cc#L144

[ ] https://github.com/sorbet/sorbet/blob/88a8efcdfe0f2a0b21437de9e7c33f4e0fe0ade8/definition_validator/validator.cc#L150

[ ] https://github.com/sorbet/sorbet/blob/88a8efcdfe0f2a0b21437de9e7c33f4e0fe0ade8/definition_validator/validator.cc#L158

[ ] https://github.com/sorbet/sorbet/blob/88a8efcdfe0f2a0b21437de9e7c33f4e0fe0ade8/definition_validator/validator.cc#L391

[x] https://github.com/sorbet/sorbet/blob/88a8efcdfe0f2a0b21437de9e7c33f4e0fe0ade8/namer/namer.cc#L311

[ ] https://github.com/sorbet/sorbet/blob/88a8efcdfe0f2a0b21437de9e7c33f4e0fe0ade8/namer/namer.cc#L527

[ ] https://github.com/sorbet/sorbet/blob/88a8efcdfe0f2a0b21437de9e7c33f4e0fe0ade8/namer/namer.cc#L758

[x] https://github.com/sorbet/sorbet/blob/21b05b4018be869ce282dd4e48e3046e8c8f93e8/resolver/resolver.cc#L1208

[ ] https://github.com/sorbet/sorbet/blob/21b05b4018be869ce282dd4e48e3046e8c8f93e8/resolver/resolver.cc#L1222

[ ] https://github.com/sorbet/sorbet/blob/21b05b4018be869ce282dd4e48e3046e8c8f93e8/resolver/resolver.cc#L1216

[ ] https://github.com/sorbet/sorbet/blob/21b05b4018be869ce282dd4e48e3046e8c8f93e8/resolver/resolver.cc#L1295

[x] https://github.com/sorbet/sorbet/blob/84ca94bb59b7444a97368ee90aadc20740be43ab/ast/desugar/Desugar.cc#L177

[ ] https://github.com/sorbet/sorbet/blob/8cf63a86bdf6dd98f0ece3190dc47443b4efa6a2/resolver/GlobalPass.cc#L53

[ ] #1750

Proposed solution
Add them

Heads up I built the T.must one to make a codemod easier, but didn't feel like writing a test for it:
diff --git a/core/types/calls.cc b/core/types/calls.cc
index 11e78426d..89bc742a1 100644
--- a/core/types/calls.cc
+++ b/core/types/calls.cc
@@ -929,16 +929,19 @@ public:
         if (args.args.empty()) {
             return;
         }
+        auto loc = args.locs.call;
         if (!args.args[0]->type->isFullyDefined()) {
-            if (auto e = ctx.state.beginError(args.locs.call, errors::Infer::BareTypeUsage)) {
+            if (auto e = ctx.state.beginError(loc, errors::Infer::BareTypeUsage)) {
                 e.setHeader("T.must() applied to incomplete type `{}`", args.args[0]->type->show(ctx));
             }
             return;
         }
         auto ret = Types::approximateSubtract(ctx, args.args[0]->type, Types::nilClass());
         if (ret == args.args[0]->type) {
-            if (auto e = ctx.state.beginError(args.locs.call, errors::Infer::InvalidCast)) {
+            if (auto e = ctx.state.beginError(loc, errors::Infer::InvalidCast)) {
                 e.setHeader("T.must(): Expected a `T.nilable` type, got: `{}`", args.args[0]->type->show(ctx));
+                auto locWithoutTmust = Loc{loc.file(), loc.beginPos() + 7, loc.endPos() - 1};
+                e.replaceWith(loc, locWithoutTmust.source(ctx));
             }
         }
         res.returnType = move(ret);

if someone wants to write a test for it and commit it, that'd be great.

Another one that I think might be useful is to support this pattern:
class Foo
  def self.bar
      @bar ||= ...
   end
end

in pay-server, the pattern is used ~2000 times. It would be nice if I could autocorrect to:
class Foo
  @bar = T.let(nil, T.nilable(...))

  def self.bar
      @bar ||= ...
   end
end

[ ] Type argument suggestions for both constants and sigs are always T.untyped. Deleting the T.let or sig entirely gives a better suggestion with the real inferred types (unfortunate UX)

e.g. sorbet.run
# typed: strict

A = T.let([42], Array)

sig {returns(Array)}
def foo
    [42]
end

@sushain97 I've been thinking a bit about this, here's my thoughts.
Unfortunately I'm not sure if this is an easy fix.

We detect and issue an error correcting Array -> T::Array[T.untyped] in
resolver but sig suggestion happens in infer and T.let suggestions
happen in calls.cc as an intrinsic. I'm not really sure at what phase
calls.cc "happens", but in any case it seems to be quite separated from
resolver.
Going off of this, we already have 2 separate places where we infer types and
suggest them as annotations: sig suggestion and T.let suggestions. I'm not
sure it'd be a good idea to introduce this place in resolver as a third place
where we do things like this. Actually, I doubt it's even possible: I think
we'd need the information infer gives us, which happens later in the pipeline.
This comment seems to indicate we might not be able to do this logic in
resolver.

Given this, a possible idea I had was to somehow delete the existing T.let/sig
that contains the bad generic, so that the later logic that infers a T.let/sig
can run. (This is essentially going off of what you said about deleting the
T.let/sig entirely gives a better suggestion in some cases). However, this has
some problems too.

The errors say things like "This function doesn't have a sig" or "This
constant doesn't have a T.let" even though the user wrote one. We'd have to
somehow communicate that we deleted the sig or T.let so the error is better.
The bad generic might be arbitrary nested inside the sig/T.let. I don't think
we want to totally throw away everything the user wrote just to replace the
bad generics. What if, when we throw away the sig and then infer a new one, we
improved Array to T::Array[Integer], but in the sig that we deleted, there
was some other method parameter and we weren't able to infer its type, so we
come back with T.untyped or something?

Then, perhaps what we want is something that "merges" a suggested sig/T.let with
what the user wrote. But this seems non-trivial and not very clean. But, such a
'merging' operation might have further applications: for instance, if you have a
sig that has some things typed, but some T.untyped, could we generate a
suggestion and see if we were able to remove any of the T.untyped? Perhaps
such a 'merging' operation actually has more general applications like this one.

Here's another that seems to be potentially auto-correctable (but maybe too special case-y/specific):
# typed: strict

a = ["foo"] + [nil]
# fixed
a = T.let(["foo"], T::Array[T.nilable(String)]) + [nil]

editor.rb:3: Expected T::Enumerable[String] but found [NilClass] for argument arg0 https://srb.help/7002
     3 |a = ["foo"] + [nil]
            ^^^^^^^^^^^^^^^
    https://github.com/sorbet/sorbet/tree/master/rbi/core/array.rbi#L41: Method Array#+ has specified arg0 as T::Enumerable[String]
    41 |        arg0: T::Enumerable[Elem],
                ^^^^
  Got [NilClass] originating from:
    editor.rb:3:
     3 |a = ["foo"] + [nil]
                      ^^^^^
Errors: 1

Another one that would be really helpful and potentially simple since we already do it for interface!, abstract!, etc. is suggesting the addition of extend T::Sig when there's something like sig {void} that produces an error. e.g. sorbet.run

Looks like we already have maybeSuggestExtendTSig used elsewhere. Maybe we can give that suggestion more often.

[ ] Something that would be really helpful is having these suggestions surfaced as autocorrects:

# typed: true
class Foo
    def bar
    end
end

Foo.new.baz

editor.rb:7: Method baz does not exist on Foo https://srb.help/7003
     7 |Foo.new.baz
        ^^^^^^^^^^^
    editor.rb:3: Did you mean: Foo#bar?
     3 |    def bar
            ^^^^^^^
Errors: 1

sorbet.run
I think this might be relatively straightforward to implement and very high usage when the feature is shipped.

I've converted most of these issues into separate tickets for discoverability. See
https://github.com/sorbet/sorbet/milestone/15


update readme for stage 3

As of the September meeting, this proposal is now at stage 3. See https://github.com/tc39/notes/blob/HEAD/meetings/2022-09/sep-14.md#arrayfromasync-for-stage-3.

It says "conditional on editor review"; cf https://github.com/tc39/proposal-array-from-async/issues/14#issuecomment-1246221382

I forgot about this pull request before I already made changes in 60e0cfce046abd3ddf52b0c6743bee4ec9ef7baa, c9b7a77e70a80d5329dbe2011d075cb66a8602df, 88490cd88034f27a536409250b58e204843c72a3. Sorry about that, and sorry about taking so long to address this.
I marked the proposal as “Stage 3 (Conditional on Editor Review)”. I’ve left an additional comment (https://github.com/tc39/proposal-array-from-async/issues/14#issuecomment-1789806147) on next steps towards actual Stage 3.


Remove useless TINYOBJLOADER_IMPLEMENTATION definition when building MuJoCo with CMake

As far as I understand, TINYOBJLOADER_IMPLEMENTATION macro is used to be defined in libraries or executables that consume tinyobjloader only including its header, without linking the corresponding library. However mujoco (at least with the CMake build system provided in this repo) is already linking the tinyobjloader library in which all the symbols are defined, so there is no need to re-defined them.

OK so this is required for our internal build process that we used to generate our official binaries.
The prebuilt library that we ship contains all of MuJoCo's dependencies statically linked in, but with symbols hidden. We still believe that this is the cleanest and safest way for us to ship prebuilt libraries (we also target GLIBC_2.17 aka manylinux2014 aka CentOS 7, and no external C++ ABI surface). This means that in our build we want that file to provide tinyobjloader symbols.
The correct "fix" for this would be to define a CMake variable (MUJOCO_STATIC_TINYOBJLOADER or something like that) that translates to a macro that controls whether TINYOBJLOADER_IMPLEMENTATION is defined.

The correct "fix" for this would be to define a CMake variable (MUJOCO_STATIC_TINYOBJLOADER or something like that) that translates to a macro that controls whether TINYOBJLOADER_IMPLEMENTATION is defined.

Sorry, I had missed that. I will look into this, thanks!

@saran-t I tried to implement in the simplest way possible your suggestions.
What happens with this PR is the following:

If MuJoCo is built with CMake, TINYOBJLOADER_IMPLEMENTATION is not defined
When MuJoCo is built with some other build system not mantained in this repo such as your internal build process, TINYOBJLOADER_IMPLEMENTATION

Is this ok for you? I kind of made the assumption that your internal build process is not based at all on CMake (I guess is blaze/bazel-based), but pleas tell me if this assumption is wrong.

@saran-t I tried to implement in the simplest way possible your suggestions.
What happens with this PR is the following:
* If MuJoCo is built with CMake, `TINYOBJLOADER_IMPLEMENTATION` is not defined

* When MuJoCo is built with some other build system not mantained in this repo such as your internal build process, `TINYOBJLOADER_IMPLEMENTATION`

Is this ok for you? I kind of made the assumption that your internal build process is not based at all on CMake (I guess is blaze/bazel-based), but please tell me if this assumption is wrong.

Hello @saran-t, I was doing a cleanup of PRs that I had open, are you still interested in this change? If yes I can keep the PR open, otherwise perhaps I would close it to cleanup my PRs list. Thanks a lot in advance!

Thanks @saran-t !


UI Fixes before MVP release

[ ] Responsive Issue in Home Page
[ ] Past Events Carousel not center align in responsive
[ ] Pagination not working in blogs component
[ ] Contact Form not working

[ ] Responsive Issue in Home Page
[ ] Past Events Carousel not center align in responsive
[ ] Pagination not working in blogs component
[ ] Contact Form not working

@Bawanthathilan @nisalrenuja @KaveeshaG  What's the update on this?

@Bawanthathilan @nisalrenuja @KaveeshaG  What's the update on this?

@Bawanthathilan fix everything

@Bawanthathilan fix everything

Am I a god to fix everything ? 🙃

CSS God


fix: pointer-events when content has CSS animations

Fixes #158

Fails in Safari and iOS Safari. Needs a bit more work.


feat: PLS-431

See also https://jira.sealsystems.de/jira/browse/PLS-431
Use the following sections to provide more information for changelog and/or release notes:
Details

Updated GitHub Pull Request template
Added dependabot config
Removed roboter
Added package-lock.json to git
Updated scripts
Updated dependencies
Fixed linting
Updated CircleCI config
Updated appveyor config

Breaking Changes
References

/merge

:tada: This PR is included in version 3.3.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Tagging - Placeholder

Will require a new field to collect tag information
TBD

Closing this one since you have the placeholder active for tagging. Once a datastore is integrated, we'll write up requirements for handling tags.


TextField with wordWrap=true causes unusual stretching behaviour.

With word wrapping on:

With it off:

Thinking of just measuring text and adding a "\n" character whenever it reaches a certain length, which actually should be the behaviour of the TextField's word wrapping anyway, but why it results in this behaviour I really don't know.
The behaviour is same in legacy but is somewhat readable.
I also think stretching text is horrible, and the width and height properties shouldn't affect it in this way. For example, reducing the height to smaller than the text font squishes the text, instead of clipping it. My personal opinion on how it should behave. But word wrapping behaviour is unusual and I don't like it ;p

Does this still happen? Doesn't for me.

Oh that was only because the TextField was added to a sprite, and the sprite's width was changed, not the TextField itself. So that was just my problem, none other. Thanks for reminding me to close this :P


Deterministic photo links (e.g. hash / filename)

Hello,
I want to use Lychee as a photo library for my photo blog. I am going to host the blog in a dockerized environment at some service provider, however I would like to save the effort of having to backup the database, so my idea was to just put the photos in a folder on my PC and if something happens to the server I would just upload them again.
However I have noticed that the links seem to be not deterministic. So if I start Lychee, upload some photos and then delete everything again start another new Lychee instance and upload the same photos the link will be different than the first time.
Of course this is a problem if I embed the photos and the links change afterwards.
Is there anyway to configure Lychee in a way that the links given to the photos will be deterministic? Is it for example possible to include the original picture name in the link (which are mostly unique in my photo collection) or have 'human readable' links?

Thank you. I might look into it if I have time, but I don't want to promise anything.

what you can do, is:

take the hash of the file.
truncate it to it's first 16 characters (64 bits), because this is a truncation, we do not mess with the randomness of each bit.
convert the hexadecimal string to an integer and use it as the ID.

Beware, after uploading 2^32 pictures (~4 000 000 000) you have high risk of collisions (two images having the same ID).

Slowly but surely I think I understand the solution. The basic idea is simple to understand, but I am trying to make sure that I also understand the details. However what I don't understand is why you would think that after 4 mio. pictures there would be a high risk of collisions?
Is this a rule of thumb that after 50 percent of the keys are used the risk of collision gets higher?
On the other hand how likely is it for someone to really have 4 mio pictures? Or that Lychee would still be able to handle that much.

after 4 mio. pictures there would be a high risk of collisions?

4 billion

Is this a rule of thumb that after 50 percent of the keys are used the risk of collision gets higher?

This might be a good start. According to that, at 4 billion photos the risk of a collision is about 50%.

On the other hand how likely is it for someone to really have 4 ~mio~ billion pictures?

Not very, but worth considering

Or that Lychee would still be able to handle that much.

Depending on the resources available and how they were distributed, I could see this working. I'm a little tempted to work out some stress test once the CLI import is ready and I'm familiar with it...

Is this a rule of thumb that after 50 percent of the keys are used the risk of collision gets higher?

And to complete what @d7415 said, it is not 50%. The number of possible keys is 2^64, 4 billion is 2^32, so it is half the exponent. Half the key space would be 2^63. ;)

Depending on the resources available and how they were distributed, I could see this working. I'm a little tempted to work out some stress test once the CLI import is ready and I'm familiar with it...

Well, we do get complaints from people with 1000+ photos in an album but my guess is that it's the front end that's the bottleneck...

Oh yeah sorry. Miscounted a few of the zeros yesterday. So if it is 4 billion then it is even less likely. I think I am taking photos now since 2013. I am taking many but i have not yet reached the 1 mio. mark.
However I think regardless of the count there would have to be some mechanism to detect and avoid identical hashes. What do you think?

However I think regardless of the count there would have to be some mechanism to detect and avoid identical hashes. What do you think?

You mean like this :laughing:  : https://github.com/LycheeOrg/Lychee-Laravel/blob/master/app/ModelFunctions/PhotoFunctions.php#L491

Oh yeah sorry. Miscounted a few of the zeros yesterday. So if it is 4 billion then it is even less likely. I think I am taking photos now since 2013. I am taking many but i have not yet reached the 1 mio. mark.

You may assume a multi-user set-up. You can rack up a lot of pictures pretty quickly (with a lot of users but still. :) )


Move KVStore framework to CPAN

The KVStore framework is simple, has a well defined API, and depends on nothing else in the codebase.  It should be moved to CPAN.

I propose moving these to a new  AnyEvent::KVStore namespace.


Upgrade Storm code for Kafka 1.0

The kafka-related storm code is obsolete. Use new Spout API due to Kafka 1.0's new zk schema

fixed


refactor: test-coverage yaml edited

#396 Edited test-coverage-badge workflows
Description
Added github acitons pipeline for test coverage badge.
Changes
List the major changes you have made in bullet points:

grpc required added

Test Policy Compliance

[ ] I have added or updated unit tests for my changes.
[ ] I have included integration tests where applicable.
[ ] All new and existing tests pass successfully.

Code Quality

[x] I have followed the coding standards for this project.
[x] I have performed a self-review of my code.
[x] My code is well-commented, particularly in areas that may be difficult
to understand.

Documentation

[x] I have made corresponding changes to the documentation (if applicable).
[x] I have updated any relevant READMEs or wiki pages.

Additional Comments
I tried this changes in my branch, it's work.

@v0lkan Could you give access permission github actions for read and write ?
Settings>Actions>General>Workflow permissions>Read and write permissions
Checklist
Before you submit this PR, please make sure:

[x] You have read the contributing guidelines and
especially the test policy.
[x] You have thoroughly tested your changes.
[x] You have followed all the contributing guidelines for this project.
[x] You understand and agree that your contributions will be publicly available
under the project’s license.

By submitting this pull request, you confirm that my contribution is made under
the terms of the project’s license and that you have the authority to grant
these rights.

Thank you for your contribution to VMware Secrets Manager
🐢⚡!

Taking a note to merge and test it…
I‘ll merge the changes and see how the pipeline works.
If there’s an issue we can either revert the change, or amend a change.

It's looking good !!

plus;
https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions
From this article I understand that we have 2000 minutes per month.
I think you'd want to check this out.
But other vmware's repositories use github actions.


Type inference is lose inside a promise

TypeScript Version:  3.1.0-dev.201xxxxx

Search Terms:

type literal promises
type inferred promises

Code
interface ResponseA {
    type: 'A',
    payload: any,
}

interface ResponseB {
    type: 'B',
    payload: any,
}

type ResponseKind = ResponseA | ResponseB;

// Does not work in strict mode
async function returnResponseAsync(): Promise<ResponseKind> {
    const type = 'A';
    const payload = {};

    return await {
        type, // type is 'string' type
        payload
    }
}

// Works in strict mode
function returnResponse(): ResponseKind {
    const type = 'A';
    const payload = {};

    return {
        type, // type is 'A' type
        payload
    }
}

This is a minimum reproducible code but I found this working with a complex scenario of observables and promises. However, the bug is still reproducible, because the type is being lose.
Expected behavior:
Inside the promise type type should be inferred as well.
Actual behavior:
Throws because string is not assignable to neither A or B.
Playground Link:
Link
Please notice that in Playground no error is given, because strict mode is not the same as in the TSC.
Related Issues:
Workaround:
Just type the variable with a literal type.
async function returnResponseAsync(): Promise<ResponseKind> {
    const type: 'A' = 'A';
    const payload = {};

    return await {
        type, // type is 'A' type
        payload
    }
}

Just remove the await from return await. It causes the returned object literal to not be contextually typed.
Also note: you shouldn't use return await unless you have one of the rare cases where it's really necessary

I mean that. As I said, I just wanted to recreate the escenario, but actually I'm not just return await. Just returing an object inside an promise, and then the type is lose.

@ajafff I update the issue with another reproducible scenario using Promise.resolve.

We should unwrap a Promise through an await expression to create a contextual type

Hey , can i work on this issue ?

Absolutely! I believe what you'll want to do is start at getContextualType in checker.ts. From there, you'll want to handle the case for AwaitExpression. In that case I think you'll want to retrieve the contextual type from the AwaitExpression itself. Let's call that T. You'll want to contextually type it as T | PromiseLike<T>

@DanielRosenwasser Does the type resolves correctly in the Observable scenario after the PR? I'm afraid I miss explain the problem.
If you notice here the type of the response inside the tap pipe function is string, but should be One.

Note you can fix the function type if you explicitly set the type of the return value, e.g.
const fn = () => 'one'; // return type: string
const fn = () => 'one' as 'one'; // return type: 'one'

function fn() {
  const val = 'one';
  return val; // return type: string
}
function fn() {
  const val = 'one';
  return val as typeof val; // return type: 'one'
}

but also, and this one is less obvious, the following:
function fn() {
  const val: 'one' = 'one';
  return val; // return type: 'one'
}

While I've run into this issue as well, I wonder whether it's a good idea to change the current behaviour. Most often, if a function returns a string literal, the developer wants the function's return type to be string. The same goes for number literals that get widened to number, boolean literals that get widened to boolean etc.


WIP: adding fuzz tests for commitment package #305

In current state do not passes tests - is not clear how to properly fix the problem.

Opened new pull request from branch inside the repo and rebased updates on fresh master https://github.com/ledgerwatch/erigon-lib/pull/420


add resource contents table index for performance

Another high impact index suggested by Azure SQL.

Note that Azure SQL also supports auto-tuning for SQL DBs: https://learn.microsoft.com/en-us/azure/azure-sql/database/automatic-tuning-overview?view=azuresql.  It can create and drop indexes as it deems fit based upon traffic and performance.
I don't like two things about this:

The index is no longer represented in source code.
The dev and prod DBs can have different indexes.

That said, it takes a lot of the pain away and in general "just works."  In the past I've turned it on but still manually created basic indexes (PKs, FKs, unique constraints, and indexes on other columns I know will be needed for lookups such as enums).

@NateMerritt Yeah good callout, I've seen that but agree with what you said about the downsides. I think having the control is worth the extra hassle of a PR now and then to address things. I have been wanting to setup alerts that would ping our alerts channel when there's a new index recommendation but haven't been able to figure out how.


Has the installation method changed?

I was recently running a workflow with better-bibtex, and the computer I was working on had to have a clean wipe. As a result I have to reinstall programs including better-bibtex. I could swear that last time I installed it by searching for the Firefox plugin through Firefox's usual add-ons system. Now however I can only find this page about better-bibtex. I can't really make heads or tails about how to download and install it from here. I get a zip file that I can unzip, and then... ?
I guess the primary question is: what happened to the add-on being in the Firefox database, and how can I install better-bibtex now?

The installation method hasn't changed, at least not in a long while. There may at one time have been a version on addons.mozilla.org (I did at some point try, but honestly don't remember if I ever actually put it there), but AMO is a fairly hostile place for larger addons (which is also why Zotero itself isn't on there), so I'm self-hosting the addon.
There's no zipfile involved, and installation is exactly like the installation of Zotero itself; you just download the xpi from the latest release and install that as per the installation instructions. On the "latest release" page you will indeed also find a zipfile, which you don't need. I can't prevent that from appearing alas, but it's the source code for that release for those who are interested.
If you still had a version installed from addons.mozilla.org, you have not been upgraded all that time. I've self-hosted BBT since at least 0.8.18, possibly earlier still, which went out in April 2015.

Huh. My other computer that wasn't wiped had Better Bibtex 1.6.74 on it. I could swear I've never downloaded this from github, but apparently I was mistaken. Also it seems that in my zeal to hit the big green "clone or download" button on the Code page, I completely missed the "installation" page. Here I was just very worried that I had done something wrong.
Thank you for pointing me in the right direction!

It doesn't need to be github, it was at one time hosted on a website, and I
did have an automatic upgrade path from that to github. It's just not
possible to automatically upgrade from AMO to non-AMO, or vice versa.
Mozilla actively and deliberately prevents it. So if you have anything
post-0.8.28, you must have at one time installed the xpi manually.
Github is in many ways not ideal for end-users, but it's simplified my dev
and release process tremendously. The green download button is one of those
things that is squarely targeted at developers, not users.


[TASK] Combine all TYPO3_CONF_VARS into one recursively merged array

This will make it easier for developers to add keys or new sections to
the TYPO3_CONF_VARS. Also it won't run into problems when keys are not
set by the DefaultConfiguration.php
The Problem/Issue/Bug:
How this PR Solves The Problem:
Manual Testing Instructions:
Automated Testing Overview:

Related Issue Link(s):
Release/Deployment notes:

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Tobias Kretschmann seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

It looks like this has a problem with TestDdevFullSiteSetup, see https://circleci.com/gh/drud/ddev/16636 - you should be able to run it manually, make testpkg TESTARGS="-run TestDdevFullSiteSetup", or run in your favorite IDE or whatever.

I think if you could rebase this against current master we'd get rid of some of the test failures. Thanks! Or ask me to.

This has a minor gofmt difficulty, https://circleci.com/gh/drud/ddev/16779?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-checks-link - you have to run gofmt -s -w pkg/ddevapp/typo3.go to fix it. make staticrequired will show this in advance of testing.

Requested community comment in Slack.

I took the liberty of rebasing this to current; the most important change was that trusted Hosts pattern has been simplified dramatically.
I'd appreciate it if you could take a look (and test) and make sure that you're happy with the result.
I'm also a little concerned about community acceptance:

Does this work on TYPO3 v8/9/10 ?
Does it seem like an appropriate technique?


Images cached to disk not loaded until af_setImageWithURL called?

I'm experiencing weird behaviour when trying to retrieve an image that is in the disk cache but not in the memory cache.
If I call af_setImageWithURL, the image is downloaded and cached to the disk as expected.
The second time I launch the app, I call af_setImageWithURL and the image is loaded from the disk as expected. However, when I call imageForRequest it is still nil.
imageForRequest only ever returns the image after af_setImageWithURL has been called at least once - even if the image already exists in the disk cache.
It seems like imageForRequest ignores the disk cache and only uses the memory cache. Is this the expected behaviour or a bug? If the former, what is the correct way to retrieve an image from either the disk or memory cache?
      // Download image or fetch from cache.
      let cache = UIImageView.af_sharedImageDownloader.imageCache;
      let url = NSURL(string: "https://upload.wikimedia.org/wikipedia/commons/e/e0/Clouds_over_the_Atlantic_Ocean.jpg")!;
      iconView.af_setImageWithURL(url);

      // Retrieve image from memory or disk.
      let req = NSURLRequest(URL: url);
      if let _ = cache?.imageForRequest(req, withAdditionalIdentifier: nil) {
         // Image is set the second time imageForRequest is called.
         print("image in cache!");
      } else {
         // Image is always nil the first time imageForRequest is called per app launch.
         // (even if the image has been cached to disk from a previous launch).
         print("image somehow not in cache?");
      }

Thank you!

Your observation is exactly how the image caching was designed to work. It is only an in-memory cache, not an on-disk cache. Therefore, asking the ImageCache directly for the on-disk image will never return the on-disk image.
Calling the af_setImageWithURL API will load the image from the on-disk cache, put it in the in-memory cache and apply it to the image view. Then, calling imageForRequest after that happens will return the in-memory image. This design leverages all the power of NSURLCache along with the customization of the ImageCache.
You can find a bunch more info and history on this topic in https://github.com/Alamofire/AlamofireImage/issues/5.
Cheers. 🍻


Issue with k8s.io/docs/tutorials/kubernetes-basics/update/update-intro/

This is a Bug Report

Problem:
The carousel to explain updates is not working.  Clicking on the forward arrow doesn't do anything.  No errors are visible on the console when clicking on it.

Proposed Solution:
Page to Update:
k8s.io/docs/tutorials/kubernetes-basics/update/update-intro/

Thanks for the report.
/language en
/triage bug

/kind bug

#14895


SONOFF SNZB-01 not working!!!

Hi.
I have a SONOFF SNZB-01 button. I bought the premium version of the program. I made a firmware for him. When in the Device type is select (End device vithout route), everything works as it should, when Device type is select (power saving mode), it does not connect to the zigbee network at all.
P.S. In my premium version of programm is 8 inputs and outputs not a 16. its normally?

Hi,

Could you please show me your settings? Did you try to place this button closely to the coordinator? Please note, the firmware tries to connect about 1 minute. You need to press a button periodically, to extend this interval.
The PSM firmware supports 8 channels only. There is the separate "16-channel" version.

Button placed from coordinator aprox 50cm. Why button with end device setting conect to coordinator ~10sec

Could you please try to select the "CC2530 (without external oscillator)" board type?

I combine ptvo firmware with efekta converter and that work fine. this option work "CC2530 (without external oscillator)"


Recsys: pass isFollowing and incognito

Waiting on OK from Johnny here too.

Going to merge this one together with other recsys PR.


Add missing exports to package.json for admin-ui-extensions to fix build issue

Fixes: https://github.com/Shopify/shopify-cli-extensions/issues/383
Background
Missing exports in the package.json had extensions build failing
Solution
Added missing exports

I don't think this was broken as the broken flow that was reported was working prior to a recent release. It just had been a very long time since we published this library and we published a patch this week.
As I pointed out above, simply removing this API is clearly breaking dependents. And so, removing this API would consist on a breaking change and should be done through a major version release. Maybe we can align this for the next major release, but I don't think this is reason enough to do it now.

@vividviolet thank you for the pointer to the React library that is making use of these subpaths. I agree this is a good pattern, and better than checkout's version where we manually re-export everything (https://github.com/Shopify/ui-extensions/blob/main/packages/checkout-ui-extensions-react/src/index.ts). Can you open an issue to adopt this in the other packages? It would be great to have an agreed-upon set of entrypoints into the packages (for example, I'd personally prefer "api" over "extension-api"; I have been playing with an adjusted structure for when we have a single extension type for the different surfaces https://github.com/Shopify/ui-extensions-internal-test/tree/main/packages/ui-extensions/src/surfaces/checkout).
Separately, any reason why we have the "you can grab everything" mapping, "./*": "./*" (https://github.com/Shopify/ui-extensions/blob/main/packages/admin-ui-extensions/package.json#L14)? Because of how Loom builds packages, this is almost never desirable (the build outputs are deeply nested, with a weird directory structure).

I have been playing with an adjusted structure for when we have a single extension type for the different surfaces https://github.com/Shopify/ui-extensions-internal-test/tree/main/packages/ui-extensions/src/surfaces/checkout).

@lemonmade Cool! This makes sense to me. We'd have a set of shared components at the top that can be re-exported by the different surface areas.
I think this can be made into a generic too in order to share between the surface areas.
I create the issue to follow up around standardizing re-exports here.


fire module dependency

I had an issue with running this python script initally and got the following error.
ModuleNotFoundError: No module named 'fire'
(pip3 install fire did not work)
This can be solved by installing fire using pipenv
python3 -m pipenv install fire
may be worth to add as documentation

I also added a comment here related to this https://community.developer.atlassian.com/t/upcoming-new-security-scanning-activities-on-marketplace-apps/43715/15?u=james.dellow

Hi there - This is technically called out in the README in a minor link above the python section, but I do agree the docs need some love. We've been scrambling to add features that the docs have take an unfortunate backseat.
I'll file a public issue, so it's off my internal to-do list.


Ahrefs performance issues report

Follows: https://github.com/appsignal/docs-nextjs/issues/157

[x] View the report
[x] Decide what needs to be fixed pre-launch
[ ] Improve performance

Not sure why but these pages perform poorly:
https://app.ahrefs.com/site-audit/3769844/12/data-explorer?columns=pageRating%2Curl%2Ctraffic%2ChttpCode%2Csize%2CtimeToFirstByte%2CloadingTime%2Cdepth%2Ccompliant%2CincomingAllLinks%2Corigin&filterCollapsed=true&filterId=c012a4a3d1d05fe39aa1a3fb19ae5868&issueId=c64d7cbc-d0f4-11e7-8ed1-001e67ed4656&sorting=-pageRating

We got additional 13 pages in the new adref report. If I test manually, I don't see the difference.
We will look into this post-release.

This is resolved, so closing this one.


Samsung Internet Regression

Popup seems to be using the Firefox for android workaround that just routes to /settings
This didn't work before perhaps due to missing apis and now the android logic is triggered
        if (result?.os === 'android') {
          this.api.browserAction.setPopup({
            // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426484
            // Setting the popup to empty string which should allow onClicked
            // handlers to work is buggy on android firefox.
            // We work around this by setting a particular popup for android
            // which only uses chrome.tabs.create({url: 'coil.com/settings})
            popup: this.api.runtime.getURL('static/popupAndroid.html')
          })

fixed with #2858


Timewindow's cellfn access the object.

With the recent changes that adds previous_quantity in the aggregator, the timewindow's cellfn should be able to access it.
Changes: Move up the timewindow's cellfn to access the whole object instead of just the quantity.

Coverage remained the same at 86.863% when pulling 0fd004dd927bed42eeb914f20e050e45999b0b80 on KRuelY:timeWindowAdjustment into d53877e978f690204abc305b1a2040339c57b5a3 on cloudfoundry-incubator:master.


[Improvement] Allow to Write Custom Connection Handlers.

Currently we are using URLConnection from java.net and this should be removed and more abstract approach should be taken while making connection in RemoteConnection class.
///todos

remove var connection: URLConnection this field from RemoteConnection
use a common interface instead.
make RemoteConnection open to inheritance.

released v1.2


Modify topolvm's e2e test to use it from pvc-autoreizer's test.

What

Currently, we use topolvm/example for pvc-autoresizer's test, but topolvm/example is not verified with 3 Kubernetes versions. That's why modify topolvm/e2e to use it from pvc-autoreizer's test.
We want to keep Example simple, so we don't want to add any complex conditional branches to verify with 3 Kubernetes versions.

How

Add a parameter like USE_IMAGE=quay.io/topolvm/topolvm-with-sidecar:0.10.3. skip build image when selected it.
Create a new target on Makefile to make TopoLVM cluster using kind without running test.
Remove TEST_KUBERNETES_TARGET parameter and use KUBERNETES_VERSION instead of TEST_KUBERNETES_TARGET.

Checklist

[ ] Finish implementation of the issue
[ ] Test all functions
[ ] Have enough logs to trace activities
[ ] Notify developers of necessary actions

closed via  #444


Change of add-on container image location, breaks update

Problem/Motivation
Add-ons could change download / image / dockerhub / container location. In this case, add-on updates will fail is the end-user has it installed already.
Expected behavior
The update to happen without issues (d0h)
Actual behavior
The add-on update will fail. Since Hass.io will try to download it from the "old" location since that is the configuration still loaded.
Steps to reproduce

Install an add-on
After installation move the add-on to a new location on Dockerhub
Update the add-on configuration
Create a new release
Try to update

Proposed changes
Currently, Hassio only tracks the version to update. It should track the image as well.
References
https://github.com/home-assistant/hassio/blob/e37ffd6107c909711eadcd5a9f906932ccd43815/hassio/addons/addon.py#L104

This has been resolved with supervisor 147


A001D-CarbonROM-cr-9.0-JV007xp

Only trigger 1 build at a moment

Only trigger 1 build at a moment

sorry I didn't notice, it probably doubled since the pull is the same


apparmor: 2.12.0 -> 2.13.1

Mass rebuild via systemd et al.

Unexpected error: command failed with exit code 1 on aarch64-linux (full log)
Attempted: systemd, libvirt, runc, lxc, apparmor-parser
The following builds were skipped because they don't evaluate on aarch64-linux: libguestfs
Partial log (click to expand)
stripping (with command strip and flags -S) in /nix/store/r3d26ns8xp1y56n11vm7l6rv9yvlk506-mercurial-4.7.2/lib  /nix/store/r3d26ns8xp1y56n11vm7l6rv9yvlk506-mercurial-4.7.2/bin
patching script interpreter paths in /nix/store/r3d26ns8xp1y56n11vm7l6rv9yvlk506-mercurial-4.7.2
/nix/store/r3d26ns8xp1y56n11vm7l6rv9yvlk506-mercurial-4.7.2/share/cgi-bin/hgweb.cgi: interpreter directive changed from "/usr/bin/env python" to "/nix/store/74b1xd5srd6ja54xwznvbrd5hcfl6k1n-python-2.7.15/bin/python"
checking for references to /build in /nix/store/r3d26ns8xp1y56n11vm7l6rv9yvlk506-mercurial-4.7.2...
wrapping `/nix/store/r3d26ns8xp1y56n11vm7l6rv9yvlk506-mercurial-4.7.2/bin/.hg-wrapped'...
cannot build derivation '/nix/store/avr342m25495if2lb50p8gcm7wr6k1jz-go-1.11.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/fhz8dinvw6c4kfcsc8f2wyp03jr4h8yr-govers-20150109-3b5f175.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/2rrl9xlmsq0v13ziszhf5y65z683ymcf-go-md2man-1.0.6.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/0b3a6v8ly8lc64w8w2bs487n00yhdsds-runc-1.0.0-rc5.drv': 2 dependencies couldn't be built
error: build of '/nix/store/0b3a6v8ly8lc64w8w2bs487n00yhdsds-runc-1.0.0-rc5.drv' failed

Timed out, unknown build status on x86_64-darwin (full log)
Attempted: libvirt
The following builds were skipped because they don't evaluate on x86_64-darwin: systemd, runc, libguestfs, lxc, apparmor-parser
Partial log (click to expand)
cannot build derivation '/nix/store/na1m677g7g6w2f6kd20p2dhk9x6sadi0-libxml2-2.9.8.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/zvqp35shvl55yj1dfz8wfvm8q6j8z91n-autogen-5.18.12.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/0md94qwim378yzf2li5lfwy93g9vgixa-libarchive-3.3.2.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/d4igp1n81rs5b1q17d1psrxa226lycwq-libxslt-1.1.32.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/djjr5lyxkj2shbdrmgn0d32ndiy54bfa-xhtml1-20020801.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/254vdhqq1bvns1rln5snn8958m6h4jgf-cmake-3.12.1.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/091ayw06d1r5p67v7wbpiqvbmzik1sgg-gnutls-3.5.10.drv': 14 dependencies couldn't be built
cannot build derivation '/nix/store/j5bii1mpfipdjp38s0j41f442wmkr7wx-yajl-2.1.0.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/dj10d77rw8gny2z3kj2iz6qi154wlwll-libvirt-4.7.0.drv': 18 dependencies couldn't be built
error: build of '/nix/store/dj10d77rw8gny2z3kj2iz6qi154wlwll-libvirt-4.7.0.drv' failed

Timed out, unknown build status on x86_64-linux (full log)
Attempted: systemd, libvirt, runc, libguestfs, lxc, apparmor-parser
Partial log (click to expand)
stripping (with command strip and flags -S) in /nix/store/b6zkv30jkmifak5dcqqvqm6shs4f3k9y-perl5.28.0-Sys-Virt-4.7.0/lib
patching script interpreter paths in /nix/store/b6zkv30jkmifak5dcqqvqm6shs4f3k9y-perl5.28.0-Sys-Virt-4.7.0
checking for references to /build in /nix/store/b6zkv30jkmifak5dcqqvqm6shs4f3k9y-perl5.28.0-Sys-Virt-4.7.0...
shrinking RPATHs of ELF executables and libraries in /nix/store/36j758g406vvkapgdi3vmp73317965mr-perl5.28.0-Sys-Virt-4.7.0-devdoc
gzipping man pages under /nix/store/36j758g406vvkapgdi3vmp73317965mr-perl5.28.0-Sys-Virt-4.7.0-devdoc/share/man/
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/36j758g406vvkapgdi3vmp73317965mr-perl5.28.0-Sys-Virt-4.7.0-devdoc
checking for references to /build in /nix/store/36j758g406vvkapgdi3vmp73317965mr-perl5.28.0-Sys-Virt-4.7.0-devdoc...
cannot build derivation '/nix/store/pg2j1x4znq9r17z84mipwi7jq94xbvxv-libguestfs-1.38.6.drv': 1 dependencies couldn't be built
error: build of '/nix/store/pg2j1x4znq9r17z84mipwi7jq94xbvxv-libguestfs-1.38.6.drv' failed

@GrahamcOfBorg eval

@GrahamcOfBorg build systemd apparmor-parser

No attempt on x86_64-darwin (full log)
The following builds were skipped because they don't evaluate on x86_64-darwin: systemd, apparmor-parser
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

Success on aarch64-linux (full log)
Attempted: systemd, apparmor-parser
Partial log (click to expand)
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/b3138s7y161sz3yg2ki6fgarp9j2zqmq-systemd-239-man
checking for references to /build in /nix/store/b3138s7y161sz3yg2ki6fgarp9j2zqmq-systemd-239-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/rjl0dsqv2fba99vqkw7m1bg477sfmm85-systemd-239-dev
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/rjl0dsqv2fba99vqkw7m1bg477sfmm85-systemd-239-dev/lib
patching script interpreter paths in /nix/store/rjl0dsqv2fba99vqkw7m1bg477sfmm85-systemd-239-dev
checking for references to /build in /nix/store/rjl0dsqv2fba99vqkw7m1bg477sfmm85-systemd-239-dev...
/nix/store/5zfibniqhs22c57svmb4kfh4jj9wals1-systemd-239
/nix/store/qpx4922inj6hwrvszza3jm00c8jfqnby-apparmor-parser-2.13.1

Success on x86_64-linux (full log)
Attempted: systemd, apparmor-parser
Partial log (click to expand)
shrinking RPATHs of ELF executables and libraries in /nix/store/a5ivwnabyllxkxn3fbc3lv4mxj8nfa9j-systemd-239-man
gzipping man pages under /nix/store/a5ivwnabyllxkxn3fbc3lv4mxj8nfa9j-systemd-239-man/share/man/
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/a5ivwnabyllxkxn3fbc3lv4mxj8nfa9j-systemd-239-man
checking for references to /build in /nix/store/a5ivwnabyllxkxn3fbc3lv4mxj8nfa9j-systemd-239-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/n33zrqk0ymsmagi4yk9s4j5drmmf20xd-systemd-239-dev
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/n33zrqk0ymsmagi4yk9s4j5drmmf20xd-systemd-239-dev/lib
patching script interpreter paths in /nix/store/n33zrqk0ymsmagi4yk9s4j5drmmf20xd-systemd-239-dev
checking for references to /build in /nix/store/n33zrqk0ymsmagi4yk9s4j5drmmf20xd-systemd-239-dev...

@GrahamcOfBorg build systemd apparmor-parser

No attempt on x86_64-darwin (full log)
The following builds were skipped because they don't evaluate on x86_64-darwin: systemd, apparmor-parser
Partial log (click to expand)

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.

Success on aarch64-linux (full log)
Attempted: systemd, apparmor-parser
Partial log (click to expand)
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/8gkx0yry9lh6k37w3aplav2v786rgfak-systemd-239-man
checking for references to /build in /nix/store/8gkx0yry9lh6k37w3aplav2v786rgfak-systemd-239-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/7abiwawqbylhj6qzy7i1bad8ncp05304-systemd-239-dev
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/7abiwawqbylhj6qzy7i1bad8ncp05304-systemd-239-dev/lib
patching script interpreter paths in /nix/store/7abiwawqbylhj6qzy7i1bad8ncp05304-systemd-239-dev
checking for references to /build in /nix/store/7abiwawqbylhj6qzy7i1bad8ncp05304-systemd-239-dev...
/nix/store/1c27hxdiwj2g77xd11mfk17izcnm9kz6-systemd-239
/nix/store/iphigq93yjsxvzx7bvljjddvc3rvxhwi-apparmor-parser-2.13.1

Success on x86_64-linux (full log)
Attempted: systemd, apparmor-parser
Partial log (click to expand)
shrinking RPATHs of ELF executables and libraries in /nix/store/ki1q9w9x5lywhhv50r3j6s7x21hvhqkb-systemd-239-man
gzipping man pages under /nix/store/ki1q9w9x5lywhhv50r3j6s7x21hvhqkb-systemd-239-man/share/man/
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/ki1q9w9x5lywhhv50r3j6s7x21hvhqkb-systemd-239-man
checking for references to /build in /nix/store/ki1q9w9x5lywhhv50r3j6s7x21hvhqkb-systemd-239-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/jp5vsjyndxzcrw8cc5m30cia70xbx2k7-systemd-239-dev
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/jp5vsjyndxzcrw8cc5m30cia70xbx2k7-systemd-239-dev/lib
patching script interpreter paths in /nix/store/jp5vsjyndxzcrw8cc5m30cia70xbx2k7-systemd-239-dev
checking for references to /build in /nix/store/jp5vsjyndxzcrw8cc5m30cia70xbx2k7-systemd-239-dev...

@vcunat could this be included in the next batch of staging changes? I expect it to be safe, judging by the changelog.

We use staging-next, so merges to staging don't need to be batched.


add auth tables migrations for new routes

@zeroxbt We should expand this migration to include also update route, as it will be part of the 6.0.4 release

@zeroxbt We should expand this migration to include also update route, as it will be part of the 6.0.4 release

@zeroxbt, @djordjekovac  do we still need this?


Custom, Prefix and Shorthand Path

this close #45
close #55
and close #61
The following situations were added

prefix system: The prefix follows the following rule /{{prefix}}/{{action_name}}

// Path generated
// /v1/send_donation
#[action(
    prefix = "v1",
)]
pub struct SendDonationAction;

Custom path: the custom path obeys the format that is set, being {{prefix}} and {{action_name}} reserved fields that will be replaced in compilation when processing the macro, the default value is /{{prefix}}/{{action_name}}

// Case 1: no prefix
// Path generated: /api/my_super_app/send_donation
#[action( custom_path = "{{prefix}}/my_super_app/{{action_name}}" )]
pub struct SendDonationAction;

// Case 2: with prefix
// Path generated: /v1/my_super_app/send_donation
#[action(
    prefix = "v1",
    custom_path = "{{prefix}}/my_super_app/{{action_name}}",
)]
pub struct SendDonationAction;

// Case 3: no replacement
// Path generated: /v1/my_super_app
#[action(
    prefix = "v1",
    custom_path = "my_super_app",
)]
pub struct SendDonationAction;

Shorthand syntax for Action Links: In this case it is simple when the beginning of the href does not match the generated path then add it.

// Case 1: example of normal use
// href generated: /v1/send_donation?amount=5
#[action(
    prefix = "v1",
    link = {
        label = "Send 5 SOL",
        href = "?amount=5",
    },
)]
pub struct SendDonationAction;

// Case 2: misuse, but expected behavior
// href generated: /v1/send_donation/api/send_donation?amount=5
#[action(
    prefix = "v1",
    link = {
        label = "Send 5 SOL",
        href = "/api/send_donation?amount=5",
    },
)]
pub struct SendDonationAction;

I really love this PR, I feel like these were all easy wins that will greatly improve DX.
From reading the description provided, specially this part:

Shorthand syntax for Action Links: In this case it is simple when the beginning of the href does not match the generated path then add it.

// Case 1: example of normal use
// href generated: /v1/send_donation?amount=5
#[action(
    prefix = "v1",
    link = {
        label = "Send 5 SOL",
        href = "?amount=5",
    },
)]
pub struct SendDonationAction;

// Case 2: misuse, but expected behavior
// href generated: /v1/send_donation/api/send_donation?amount=5
#[action(
    prefix = "v1",
    link = {
        label = "Send 5 SOL",
        href = "/api/send_donation?amount=5",
    },
)]
pub struct SendDonationAction;

Wouldn't the expected behavior here in Case 2 be an href /api/send_donation?amount=5? My thinking process here is something like: Given that the URL starts with / we assume it's "absolute". If the value was api/send_donation?amount=5 then I'd expect it to generate an href like /v1/send_donation/api/send_donation?amount=5 .
This could be worked around by a simple solution: Append the href to the base path when it doesn't start with / and use the exact path when the href starts with /.

I don't really like the name custom_path, I'd prefer something like path unless it breaks something or it's some sort of reserved name.


[FEATURE] Create a CONTRIBUTORS.md File

I propose adding a CONTRIBUTORS.md file to recognize and document the contributions of all collaborators in the project.
Details
The file can:

List contributors' names, GitHub handles, and their contributions.
Use tools like All Contributors for automation.
Encourage community involvement by showcasing recognition.

Benefits

Promotes transparency and inclusivity.
Motivates new contributors.
Helps maintain a history of contributions.

Alternatives
A GitHub Contributors Graph or a section in the README.md listing contributors could be considered as alternatives.
Additional context
This feature will encourage better collaboration and maintain a record of community contributions.

Hi @that-ar-guy
We do this currently by the change log docs/CHANGELOG-v1.md.
This way contributions are included in each release. Feel free to add an update for your last PR.

Got it, thanks for clarifying! That approach works well. I’m good with it and won’t add more at this point.


Town Guard attacked by Iron Golems

Minecraft Version:
1.16.5
Forge Version:
36.2.2
Mod Version:
1.0.1
Single Player or Server:
Single Player
Describe problem (what you were doing; what happened; what should have happened):
Testing out town guards, spawning them alongside iron golems, villager guards (Guard Villagers), and gatekeepers (Blue Skies). They all attack the town guards, I'm pretty sure town guards are supposed to defend villages so it wouldn't make sense for other village defenders to attack town guards.
Log file link:
Doesn't give information
Video/images/gifs (direct upload or link):

Yeah, i have same issue. This issue made Town Guards seem useless


Avoid fixing permissions; add regexp alias file, add AWS SES outgoing email support

This PR is not intended to be merged as-is, please indicate whether you want all/some/none of it and I can cherry-pick accordingly. It has:

avoid fixing permissions if they're OK #190
support regexp alias file
support outgoing email via AWS SES

I added docs to the README, but I would move that to the wiki.

Thanks for the work @tve
Let's check these little things and I'll merge.

This PR is ready from my point of view. Please let me know if there's anything else you would like changed.

Thank you @tve, really nice work and wiki documentation.


Clicking on a Week Now goes to previous week

Description
I upgraded to version 1.4.2 today and found that when clicking on a week to create a weekly note, it opened the previous week's note.
Example: I clicked on W43 on the calendar view and it opened Week 42's note.
I've been able to get around this bug by modifying my default date format for my weekly note to [Week] ww+1 . This had been working in the previous version I had installed, so I believe this bug was introduced in v1.4.2.

I tried to reproduce this issue and I cannot - calendar view correctly navigates for me
have you recently made any changes to other settings? first date of week probably?
could you provide screenshot of properties for W42 and W43 notes

First day of the week is set to Sunday. I'm beginning to think it may be related to files not created by the plugin aren't working properly. Trying W44 works properly, so I will just have to be careful when looking at previous data.
Thank you for looking at this and thank you for the plugin, it's awesome 😄 . I'm closing this issue as its not a problem

It might be that journal data in note frontmatter were wrong for some reason and as result note title differs from what journal assumes that note to be connected to.


Fixed cross-node preemption example

The constraint between P and Q should be pod affinity rather than anti-affinity in order to the example to be correct.
Fixes #7149

This change is

/assign @wojtek-t @bsalamat
for tech review.

@bsalamat @glikson  - going to informally toss a hold on this while you resolve the comments, looks like this is still pending a technical accuracy review pass.
/hold
/assign

/assign @bsalamat

/lgtm
Thanks, @glikson!

/hold cancel
/approve


V4 list-group with an active li, invisible link

It seems when an li in .list-group with .active, links aren't visible
See : https://jsfiddle.net/m6zz8sw4/1/

Move class="list-group-item active" to the <a> tag.

Why not do it as instructed in the doc?

Use s or s to create actionable list group items with hover, disabled, and active states by adding .list-group-item-action. We separate these pseudo-classes to ensure list groups made of non-interactive elements (like s or s) don’t provide a click or tap affordance.

    Cras justo odio

Dapibus ac facilisis in
Morbi leo risus
Porta ac consectetur ac
Vestibulum at eros

Here is the link referenced by @Quy : https://v4-alpha.getbootstrap.com/components/list-group/#links-and-buttons

Yes it works well with your example @Quy , but according to the documentation we can use both <ul> and <div>. So for me the behavior should be the same. Am I Wrong ?

I would think so too, however, going by the examples in the documentation, use  <ul> for non-interactive elements and <div> with a or button for interactive elements.

I think I'll close this as a won't fix for now given we try to keep those list groups as singular large click areas. If you need the inner hyperlink, .text-white is also available.


"gsteamclean.exe returned -1" error when starting gsteamclean.exe.

So I just downloaded the new release (v.0.5.2) and when I start gsteamclean.exe I get this error as a popup:

"gsteamclean.exe returned -1"

If I start it as admin, I still get the error. After I click "Ok", the program still doesn't open.
I get no log when this happens, but the log I get for the regular "steamclean.exe" looks like this:

2016-01-05 13:03:18 WARNING: Unable to read script information from file steamclean.py
2016-01-05 13:03:18 INFO: 64bit operating system detected>
2016-01-05 13:03:18 INFO: Registry data at HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Valve\Steam used to determine installation path
2016-01-05 13:03:18 INFO: Steam installation path found at C:\Program Files (x86)\Steam
2016-01-05 13:03:18 INFO: Game installations located at C:\Program Files (x86)\Steam\SteamApps\common
2016-01-05 13:03:18 INFO: Checking C:\Program Files (x86)\Steam\SteamApps\common

Another result from the CLI:
Checking E:\Steam\SteamApps\common
Traceback (most recent call last):
  File "<string>", line 368, in <module>
  File "<string>", line 225, in find_redist
IndexError: list index out of range
steamclean returned -1

Please try version 0.5.3 and let me know if this is resolved. I tried to catch more errors that may result in this.

The program starts now, atleast, so this "bug" has been fixed.
I'm still unable to clean anything as no files are displayed when I scan.
Should I post the log here, or create a new issue?

Please attach the log if able. Are you also supplying extra directories to have checked, or only the default?

I am run it with and without extra steam directories, with the same result.
steamclean_20160107-1322.txt

If possible can you try to run the script found in the dev branch directly? Either should work as the code is shared. I added some logging which may catch or ignore the offending file.

Commit  cf1a0ba should catch this will extra logging.
Error -1 is generic, to get full error please run the source script from a terminal window to help narrow the cause down.


fix: catch context errors from http provider

Description
It seems from attemption to perform state sync that the light client is not correctly detecting when the context gets cancelled or the deadline is exceeded as the error is being wrapped
12:53PM INF error from light block request from primary, removing... error="post failed: Post \"https://rpc-snapscale.lunaroasis.net:443\": context deadline exceeded" height=354290 module=light primary={}

This PR checks to see if context deadline exceeded is contained within the error and then returns the actual context error

PR checklist

[ ] Tests written/updated
[ ] Changelog entry added in .changelog (we use
unclog to manage our changelog)
[ ] Updated relevant documentation (docs/ or spec/) and code comments

[not blocking] just curious, why is the text encoding broken in the error message in the PR description? Is there an issue for that already?

[question] why does golangci-lint fail here for unrelated changes? Do we need a new issue for that?

why does golangci-lint fail here for unrelated changes?

ahhhhhhhhhhh

Is it possible to include a unit test so that we don't introduce a regression to this behavior when we pull from upstream?

Yeah I can look into that


Update record timestamp in MockProducer

The timestamp in the callback is returning -1. It should rather return the timestamp in the ProducerRecord object if available or return NO_TIMESTAMP if not available.
More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

Thanks, @gowthamgutha this change makes sense to me.
However, the ProducerRecord#timestamp field is a Long object and the check record.timestamp() == 0 is causing a NullPointerException in the MockProducerTest.
Maybe you can expand the check to something like (record.timestamp() == null || record.timestamp() == 0) ?

Thanks for the reply. I updated the PR.


Improper use could cause undefined behaviour

There are two places I can think of in this library where UB can occur in safe code:
1. CommandFdExt::fd_mappings
The fd_mappings function has the following warning in the documentation

Warning: Calling this more than once on the same command, or attempting to run the same command more than once after calling this, may result in unexpected behaviour.

This clearly violates the rule put forward in The Rustonomicon:

No matter what, Safe Rust can't cause Undefined Behavior.

This means that the library should either:

Have runtime checks to prevent calling the fd_mappings or spawn function more than once. Panicking is not considered unsafe
This is analogous to the indexing ([]) operator of slices - trying to access an out of bounds index causes a panic
Mark the fd_mappings function as unsafe - this makes it clear that there is a contract that needs to be fulfilled in order to call the function and the user must assert they understand it by using the unsafe {} block
This is analogous to the unsafe get_unchecked method of a slice

In both cases the documentation should be updated accordingly (replacing the warning with a Panics or Safety section)
2. FdMapping
The other potential source of UB is the FdMapping struct. As per the documentation for FdMapping:

The parent_fd must be kept open until after the child is spawned.

This is clearly another contract that must be fulfilled by the crate user and improper usage can and will lead to UB. While getting the RawFd from an OwnedFd (or any other type - using the IntoRawFd trait) is not unsafe, using a RawFd is. The logic is essentially the same as with raw pointers:

Getting a raw pointer is safe (see Vec::as_ptr)
Dereferencing a raw pointer is unsafe

Rust's standard library already provides a way to use file descriptors safely: the OwnedFd and BorrowedFd types. See the I/O safety section in std::io docs for more details. They can be used to ensure that parent_fd will in fact be opened while we have a reference to a OwnedFd or BorrowedFd.
Fixing this problem is a bit more nuanced. The simple option would be to make either the fd_mappings function or FdMapping constructor unsafe (well, currently there is no FdMapping::new function, so the interface would need to be changed - thread) and document the safety contract (namely: the user must ensure parent_fd is not closed until the child is spawned).
A more sound solution could be making it so that fd_mappings has a safe variant which takes either BorrowedFds or OwnedFds for the parent_fd. (I'm not sure how should child_fd be implemented, as it doesn't refer to an existing fs - leaving it as a RawFd might be a valid solution).
The usage could look like this (modified example from the docs):
With BorrowFd:
let file = File::open("Cargo.toml").unwrap();

let mut command = Command::new("ls");
command.arg("-l").arg("/proc/self/fd");

let fd: BorrowedFd = file.as_fd();

command
    .fd_mappings(vec![
        FdMapping::from_borrowed_fd(
            /* parent_fd: */ fd, // or &fd ?
            /* child_fd: */ 3,
        ),
    ])
    .unwrap();

// We must use lifetime annotations to make sure the borrowed fd is still valid at this point
// This might require creating a wrapper over `Command`
let mut child = command.spawn().unwrap();

// The file is still valid at this point, but two processes have file descriptors to it
// Are there any valid use cases for this?
// The behaviour could be unexpected, as two processes have access to the same file
file.write(/*...*/);

// We can drop the file - this closes the file descriptor owned by file,
// but no the duplicated one, used by the new thread
drop(file);

child.wait().unwrap();

With OwnedFd:
let file = File::open("Cargo.toml").unwrap();

let mut command = Command::new("ls");
command.arg("-l").arg("/proc/self/fd");

let owned_fd = OwnedFd::from(file);
// OwnedFd::from<File> consumes `file`
// so the variable `file` is no longer valid at this point

command
    .fd_mappings(vec![
        FdMapping::from_owned_fd(
            /* parent_fd: */ owned_fd, // We transfer ownership of owned_fd
            /* child_fd: */ 3,
        ),
    ])
    .unwrap();

let mut child = command.spawn().unwrap();
// OwnedFd (just as File) implements Drop, which closes the owned stream
// The internal implementation should consider when the OwnedFd is dropped
// Of course it should still be valid when we make the `dup2` syscall
// We should probably examine how it is implemented for standard streams in std::process
//
// The documentation should make it clear when the original file descriptor will be closed
// This is especially important when using pipes, where we expect all the descriptors on the writeable end to be closed,
// so that the reading end can end with an EOF

child.wait().unwrap();

I think FdMapping.parent_fd would ideally be a BorrowedFd, and CommandFdExt::preserved_fds should also take BorrowedFds. The problem is that they should have a lifetime that lasts at least as long as the Command, but there is no way of expressing this. Requiring them to have a 'static lifetime would be correct but not useful, as most BorrowedFds are constructed from an OwnedFd with a finite lifetime.
Taking OwnedFd instead would avoid the lifetime issues, but may require the caller to duplicate the file descriptor first, which is not ideal.

On further reflection I think OwnedFd is reasonable, as it's unlikely that the parent process would want to use the file descriptors further after spawning a child with them, and if it really wants to it can dup them. Please take a look at #23 and #25.

I also think taking OwnedFd is the right solution in this case, due to the lack of a lifetime annotation on the Command struct. I would just suggest documenting when the OwnedFd is dropped (and so when is the file descriptor closed).
Consider this example, which uses the os_pipe crate:
fn get_fd3_output() -> Vec<u8> {
    let (mut reader, writer) = os_pipe::pipe().unwrap();

    // Let's assume we have a "my_bin" executable which doesn't take any inputs
    // and it "prints" it's output to FD3.
    // Let's also assume the output is very long and will not fit in the pipe buffer.
    let command = Command::new("my_bin")
        .fd_mappings(vec![FdMapping {
            parent_fd: writer.into(),
            child_fd: 3
        }]).expect("FD mappings should be valid")
        .stdout(Stdio::null())
        .stderr(Stdio::null())
        .stdin(Stdio::null());

    let mut child = command.spawn().unwrap();

    let mut buf: Vec<u8> = vec![];
    // The .read_to_end method will block until it receives an EOF
    // But we will not see EOF until all FDs to the writeable end of the pipe are closed
    // If the OwnedFd is not dropped at this point, a deadlock will occur!
    reader.read_to_end(&mut buf);

    child.wait().unwrap();
    buf
}

Would the behaviour be any different if we were to do drop(command) earlier?
fn get_fd3_output_v2() -> Vec<u8> {
    let (mut reader, writer) = os_pipe::pipe().unwrap();

    let command = Command::new("my_bin")
        .fd_mappings(vec![FdMapping {
            parent_fd: writer.into(),
            child_fd: 3
        }]).expect("FD mappings should be valid")
        .stdout(Stdio::null())
        .stderr(Stdio::null())
        .stdin(Stdio::null());

    let mut child = command.spawn().unwrap();
    drop(command); // <-- will this drop the inner OwnedFd?

    let mut buf: Vec<u8> = vec![];
    // If the OwnedFd is not dropped at this point, a deadlock will occur!
    reader.read_to_end(&mut buf);

    child.wait().unwrap();
    buf
}

Good point. Added documentation of this to #25.

Fixed by #23 and #25.


Speech vibration artifacts

Has anyone observed vibration artifacts when reconstructing speech? I can reproduce this with the provided pretrained model by converting the original audio into mel spectrogram and using vocos to reconstruct (no TTS in between). Example (pay attention to the word "carnival"): Original vs Generated
I trained my own model with own dataset that has the exact speech in question but still observed the artifacts. Does anyone have suggestions on how we may fix the artifact?
Side note: Anecdotally, this happens more with high pitch voice.

Training more ~3M actually fixed most of the problem.


Cannot read the rancher (v1.5.1) start the container`s port number.

What version of docker are you running?

 If so, what is that image? - no
What is the exact command you are running registrator with?
What is the exact command you are running your container with?

docker run -d \
    --name=registrator \
    --net=host \
    --volume=/var/run/docker.sock:/tmp/docker.sock \
    gliderlabs/registrator:latest \
      consul://localhost:8500

A log capture of all the docker events before, during, and after the issue.

2017/4/5 下午4:40:462017/04/05 08:40:46 ignored: 7420e027963b no published ports
2017/4/5 下午4:41:562017/04/05 08:41:56 ignored: 7420e027963b no published ports
2017/4/5 下午4:42:162017/04/05 08:42:16 ignored: 7420e027963b no published ports
2017/4/5 下午4:43:312017/04/05 08:43:31 ignored: 7420e027963b no published ports
2017/4/5 下午4:44:012017/04/05 08:44:01 ignored: 7420e027963b no published ports
2017/4/5 下午4:44:362017/04/05 08:44:36 ignored: 7420e027963b no published ports

If relevant, Dockerfile for application that is having issues.

Description of the problem:
I use the rancher(v1.5.1) to manage and run the container,
 but as long as it is rancher start container registrator cannot read into port,
 would you please tell me what the solution to this case?

@fudali113  If you use managed network in rancher the problem is obvious. CNI doesn't publish ports as CNM, that is default networking framework for docker that's supported by registrator. My solution is to use these flags:

-internal to use EXPOSED ports(from Dockerfile)
-useIpFromLabel=io.rancher.container.ip to use CNI IP

It would be great if you could give an example docker-compose.yml for this. It's not clear from this page or the doco page how to use these two options.

@juliangamble Ok, I'm going to do it tommorow. But keep in mind, that it works with rancher managed network that is CNI network and works because rancher set this label. If you publish ports or you use docker networking, e.g. bridge, host and so on, it won't work(but you can set this label manually).

@juliangamble This is docker-compose's registrator definition:
    registrator:
      image: gliderlabs/registrator:master
      net: host
      restart: unless-stopped
      volumes:
      - /var/run/docker.sock:/tmp/docker.sock
      command:
      - -internal
      - -useIpFromLabel=io.rancher.container.ip
      - -cleanup
      - consul://localhost:8500

N.B. This feature works only with master branch(tag).

Interesting - this is what I had setup before you had posted (posting for the benefit of others that run across this):
registrator:
  image: gliderlabs/registrator:master
  restart: always
  container_name: registrator
  net: host
  volumes:
    - /var/run/docker.sock:/tmp/docker.sock
  command:
    - -internal
    - -cleanup
    - consul://<IP_ADDRESS>:8500
  labels:
    - io.rancher.scheduler.global=true
    - io.rancher.container.network=false
    - io.rancher.container.dns=true

Since I was running registrator in rancher.
Then I did a tweak on my container docker-compose.yml to enable viewing of my ports for rancher network managed containers internally via registrator and externally mapped to a port I could use (my port range is restricted):
  ports:
    - "50888:80"
    - "80:80"

Thanks for this. It didn't solve my problem. (Needing to run 16 containers with internal port 8080 (tomcat maven) across four hosts.) There weren't enough internal ports.
So I ended up writing my own rancher pull request to solve this issue:
https://github.com/juliangamble/registrator/tree/rancher-metadata-link
Hope it works for you!
(Any code review feedback or assistance getting this through the pull request process would be much appreciated).


Add commands for organization management

$subject

create organization
update organization info
update organization metadata
search organizations
delete organizations

Hi @shashimalcse , I'd like to work on this. Could u pls assign this to me?

@pavinduLakshan i have assigned you. Thanks


APN payload not following Notification Specification in some cases

{
    aps =     {
        "content-available" = 1;
    };
    id = "97de34d7-c2c5-42b1-9fa4-341faffdf3c6";
    item = "7518ebf7-1f88-4f2a-a5db-c0c6c275e921";
    type = "finished_block_measurement";
}

{
    aps =     {
        "content-available" = 1;
    };
    id = "7518ebf7-1f88-4f2a-a5db-c0c6c275e921";
    type = "new_item";
}

id and item are not in the specification.

See also #23


Second code block to update retrieving-a-certificate-revocation-list.md

Adding VariantClear calls per Copilot & manual code review.  CSS customer report.

Adding the "hr = " for the call to pCertAdmin2->GetCAProperty

@microsoft-github-policy-service agree


Fix old code

The NOAA API has changed. Python 3.5 is no longer supported. It's just old.

Fixed with latest push.

Fixed with latest push.


Fix error with extra-manifests

Using the fileexists function on the extra-manifests directory throws the following error when it exists:

╷
│ Error: Error in function call
│
│   on .terraform/modules/k8s.kube-hetzner/kustomization_user.tf line 2, in locals:
│    2:   extra_manifests_exists       = fileexists("extra-manifests")
│     ├────────────────
│     │ while calling fileexists(path)
│
│ Call to function "fileexists" failed: "extra-manifests" is a directory, not
│ a file.

The function can be used only on a file, not a directory.
A safer solution would be to use the try function if there is some error with fileset.

@kayiplar I hadn't tried that one, thank you! See the context in which it was introduces at the end of https://github.com/kube-hetzner/terraform-hcloud-kube-hetzner/pull/827.

@kayiplar Finally added toset back, but it's the same actually. It's been released in v2.2.3 🚀
@nikolaszimmermann FYI this fix, my previous "fix" wasn't ideal as I had not tested it fully. Now everything should be good.

Thanks a lot for taking care!Am 20.06.2023 um 04:09 schrieb Karim Naufal @.***>:
@kayiplar Finally added toset back, but it's the same actually. It's been released in v2.2.3 🚀
@nikolaszimmermann FYI this fix, my previous "fix" wasn't ideal as I had not tested it fully. Now everything should be good.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>