Duplicate identifier when using identifierNamesGenerator: 'mangled'

Hi!
I'm not sure if this constitutes a bug or not, as I haven't seen a proper error yet, only a warning from SizeLimitsPlugin:
Error parsing bundle asset "/workspace/frontend/dist/js/app-bundle-9144a3e50714133abf44.js": Identifier 'k' has already been declared (1:3083)
Expected Behavior
The identifierNamesGenerator should produce unique identifiers within the same scope.
Current Behavior
Notice two k identifiers bellow:
    const k = function() {
        let H = !![];
        return function(I, J) {
            const K = H ? function() {
                if (J) {
                    const L = J[b('0x56')](I, arguments);
                    J = null;
                    return L;
                }
            } : function() {};
            H = ![];
            return K;
        };
    }();

    function k(M) {
        const hk = f(this, function() {
        .....

Steps to Reproduce
I'm using<EMAIL_ADDRESS>with the following options:
const OBFUSCATOR_OPTIONS = {
  seed: 1984,
  selfDefending: true,
  identifierNamesGenerator: 'mangled',
  domainLock: ['example.local', 'example.com'],
};

Your Environment

Obfuscator version used: 0.24.6
Node version used: 10.17.0

Thanks for the all the hard work on this project!

Hi, can you show this two functions before obfuscation?

Hi,
It looks like the code is part of the domainLock feature, here's what the second k looks like:
    function k(M) {
        const hk = f(this, function() {
            const c = function() {
                    return '\x64\x65\x76';
                },
                d = function() {
                    return '\x77\x69\x6e\x64\x6f\x77';
                };
            const e = function() {
                const i = new RegExp('\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d');
                return !i['\x74\x65\x73\x74'](c['\x74\x6f\x53\x74\x72\x69\x6e\x67']());
            };
            const f = function() {
                const j = new RegExp('\x28\x5c\x5c\x5b\x78\x7c\x75\x5d\x28\x5c\x77\x29\x7b\x32\x2c\x34\x7d\x29\x2b');
                return j['\x74\x65\x73\x74'](d['\x74\x6f\x53\x74\x72\x69\x6e\x67']());
            };
            const g = function(k) {
                const l = ~-0x1 >> 0x1 + 0xff % 0x0;
                if (k['\x69\x6e\x64\x65\x78\x4f\x66']('\x69' === l)) {
                    h(k);
                }
            };
            const h = function(m) {
                const n = ~-0x4 >> 0x1 + 0xff % 0x0;
                if (m['\x69\x6e\x64\x65\x78\x4f\x66']((!![] + '')[0x3]) !== n) {
                    g(m);
                }
            };
            if (!e()) {
                if (!f()) {
                    g('\x69\x6e\x64\u0435\x78\x4f\x66');
                } else {
                    g('\x69\x6e\x64\x65\x78\x4f\x66');
                }
            } else {
                g('\x69\x6e\x64\u0435\x78\x4f\x66');
            }
        });
        hk();
   ....

Dont understand how you get two same identifier names for two helper functions (one for domain lock, one for self-defending).
Cannot reproduce, for me this identifiers are always different
var k = function() {
        var c = !![];
        return function(d, e) {
            var f = c ? function() {
                if (e) {
                    var g = e['apply'](d, arguments);
                    e = null;
                    return g;
                }
            } : function() {};
            c = ![];
            return f;
        };
    }();
    var a0 = k(this, function() {
        var c = function() {
                return '\x64\x65\x76';
            },
            d = function() {
                return '\x77\x69\x6e\x64\x6f\x77';
            };
        var e = function() {
            var i = new RegExp('\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d');
            return !i['\x74\x65\x73\x74'](c['\x74\x6f\x53\x74\x72\x69\x6e\x67']());
        };
        var f = function() {
            var j = new RegExp('\x28\x5c\x5c\x5b\x78\x7c\x75\x5d\x28\x5c\x77\x29\x7b\x32\x2c\x34\x7d\x29\x2b');
            return j['\x74\x65\x73\x74'](d['\x74\x6f\x53\x74\x72\x69\x6e\x67']());
        };
        var g = function(k) {
            var l = ~-0x1 >> 0x1 + 0xff % 0x0;
            if (k['\x69\x6e\x64\x65\x78\x4f\x66']('\x69' === l)) {
                h(k);
            }
        };
        var h = function(m) {
            var n = ~-0x4 >> 0x1 + 0xff % 0x0;
            if (m['\x69\x6e\x64\x65\x78\x4f\x66']((!![] + '')[0x3]) !== n) {
                g(m);
            }
        };
        if (!e()) {
            if (!f()) {
                g('\x69\x6e\x64\u0435\x78\x4f\x66');
            } else {
                g('\x69\x6e\x64\x65\x78\x4f\x66');
            }
        } else {
            g('\x69\x6e\x64\u0435\x78\x4f\x66');
        }
    });

Thanks for looking into this! I'll extract this specific file and try to reproduce independently of the current setup (webpack).

This issue is probably has the same problem as  https://github.com/javascript-obfuscator/javascript-obfuscator/issues/550
So, i want to improve variable names preserving.

I originally had transformObjectKeys enabled and had issues (the code din't run) as well, so I disabled and it runs, but got this duplicated identifier.

The options itself do not affect this behaviour. The problem is more complex: a generated identifier can be the same as an existing identifier in the code.  Just remember all identifiers in the source code and regenerate identifier name if it the same as the one in the stored names.
more complex - do the same thing, but stored identifier names are attached to their lexical scopes.

Currently, i'm trying to implement the second approach

Can you try this branch?
https://github.com/javascript-obfuscator/javascript-obfuscator/pull/552
Will it help?

Can confirm that identifierNamesGenerator doesn't produce duplicated identifiers anymore, but transformObjectKeys doesn't works yet. Here's the runtime error I get:
Uncaught ReferenceError: Must call super constructor in derived class before accessing 'this' or returning from derived constructor
Here's the obfuscated code snippet:
        var d0 = cZ(0x0)
          , d1 = cZ['n'](d0)
          , d2 = cZ(0x26)
          , d3 = cZ(0x25);
        class d4 extends d1['a'][a4('0x60')] {
            constructor(d7) {
                var d8 = {};
                d8[a4('0x40')] = this['props'][a4('0x19')]; // <<<< line with error
                super(d7),
                this[a4('0x113')] = d8,
                this['close'] = this['close'][a4('0x15')](this);
            }

And here's the original TS code:
class ModalEndGame extends React.Component<Props, State> {

  constructor(props: Props) {
    super(props);

    this.state = {
      open: this.props.ended,
    };

    this.close = this.close.bind(this);
  }
 .....

Thank you very much for looking into this!

@slig try now

I'm having the same issues as before. I deleted the node_modules/javascript-obfuscator and node_modules/webpack-obfuscator/node_modules/javascript-obfuscator and installed again using:
yarn add https://github.com/javascript-obfuscator/javascript-obfuscator.git#variable-preserve-improvements
to make sure.

That is strange. My tests was fixed.

 Will try more carefully later today / earlier tomorrow. Thanks again!

What version number did you see, when obfuscated you code? 0.25.0?

Hi, yes, 0.25.0. This time though it seems like transforObjectKeys is working.
After using:
yarn add https://github.com/javascript-obfuscator/javascript-obfuscator.git#variable-preserve-improvements
I made sure there was not an javascript-obfuscator inside webpack-obfuscator/node_modules and checked to see if this new file was present: cat node_modules/javascript-obfuscator/test/functional-tests/generators/identifier-names-generators/mangled-identifier-names-generator/fixtures/string-array-storage-name-conflict-2.js.
I've sent you an email with the code that produces this duplicated error.
Thanks again!

Can you try this branch?
https://github.com/javascript-obfuscator/javascript-obfuscator/pull/555/

Hi, still getting duplicated identifiers at runtime. Thanks again!

Did you get
Uncaught SyntaxError: Identifier 'q' has already been declared?

Reproduced it. Will check

Can be easily reproduced on obfuscator.io with:
const c = 1;

and
identifierNamesGenerator: 'mangled';
domainLock: true;

All other options should be disabled
All options

Updated PR. Please try now.

Sorry, somehow missed this notification. Will try later today. Thanks again!

Now all tests should be on variable-preserve-improvements branch

Released as 0.25.0


I changed how to use the following example to compile the executable problem, and how should the location of the project directory be stored in the specified path ？

Can you please elaborate the issue? It is unclear to me what is issue here.


scripts: board_v1_to_v2: Fix CONFIG_SOC_SERIES_ exclusion

Testing r"(?!SERIES_).*$" was not correct as we need to consider lines not starting by SERIES.
Fix this and make the condition globally more simple.

@nordicjm Fixes https://github.com/zephyrproject-rtos/zephyr/pull/67737/files/c69a0dfc6d6d85b58bf744a2f2974e308bad7d8e..f44a12b5c5f5079f34a11faddcd2ac180801272d#r1467673354


Revert "build(deps): bump adaptivecards-templating from 2.1.0 to 2.2.0 (#216)

This reverts commit a0be7826409889c3a78f3ab8e13fb4c0be4cfee5.

this pr is to fix cannot find module 'adaptivecards/src/schema'
../../node_modules/adaptivecards-templating/lib/json-schema-card.d.ts(1,31): error TS2307: Cannot find module 'adaptivecards/src/schema' or its corresponding type declarations.


wont compile

wont compile because lua directories aren't included by default and idk how to include them

A long time ago, before this was ported to 2013 from 2007, these were included in the out of the box .proj files. One presumably would need to update VPC scripts to add these, or at least manually add them to the created projects. This should be a basic task for anyone working with Visual Studio.


rename evmjit to evmc

jit-ed or not, the correct name should be "evmc".

Has this name ever been correct?

it has been not maintained for 2 years, we just revived it.


Forwardport

https://github.com/divio/django-cms/pull/5528 and https://github.com/divio/django-cms/pull/5525

Coverage decreased (-5.4%) to 83.703% when pulling d3986bef3b68d8b2d83c607ab8319b5b9528bd96 on vxsx:feature/infra-gulp-errors-forwardport into 38621b4b3e9e7ac4e8f8dabe3c047c87a206774f on divio:develop.


Link to spring-data-elasticsearch is broken on spring-data project site

On this page http://projects.spring.io/spring-data/ under "Community modules" the link for "Spring Data Elasticsearch" points to http://projects.spring.io/spring-data-elasticsearch that currently which leads to a 404.
Should it point to https://github.com/spring-projects/spring-data-elasticsearch?

I've pinged the spring-data team about this and they fixed the link.
Thanks for this report!


Bake texture in latent space or in image space

hi, thanks again for the great effort. Have you tried baking the texture in image space in diffusion steps? Why do you choose to bake the texture directly in latent space, rather than decode to image space, bake then encode back? It is more intuitive to me, like computing LPIPS loss in image space in SnycDiffusion.
Also, I have tried to texture in latent space while getting fuzzy results directly, could you help me analyze the difference?

Direct baking

Could you explain in details about your experiment of "directly texture in latent space"? Do you mean encoding a RGB texture to latent space, apply it to the surface of the object, render a latent camera view, then decode the camera view to RGB?


Roll our own tracing test utility

Description of proposed changes:
Currently, we use (my fork of) the tracing-test library, which provides a macro that initializes a tracing subscriber and then injects a logs_contain function for you to use for assertions. So for example,
#[test]
#[tracing_test::traced_test]
fn my_cool_test() {
    tracing::info!("Hello");
    assert!(logs_contain("Hello")); // the `logs_contain` function is created by the macro and appears out of thin air
}

When looking into the issue that Alex was hitting while trying to update substrate, I realized that the tracing-test library

Installs a global tracing subscriber and panics if one is already installed (this is what Alex was hitting)
Uses a bunch of statics
Really doesn't need to be a macro

So I propose we just roll our own. This also fixes the issue Alex was hitting by not relying on a global subscriber. It's also a tiny amount of code, it's easier to understand than a macro, and it gets rid of a dependency. With this PR, the earlier example would look like
#[test]
fn my_cool_test() {

    // call `trace` (or another entry point function) to start collecting logs
    let logs = traced_test::trace();

    tracing::info!("Hello");
    assert!(logs_contain("Hello"));
}

Practical tips for PR review & merge:

[ ] All GitHub Actions report PASS
[ ] Newly added code/functions have unit tests

[ ] Coverage tools report all newly added lines as covered
[ ] The positive scenario is exercised
[ ] Negative scenarios are exercised, e.g. assert on all possible errors
[ ] Assert on events triggered if applicable
[ ] Assert on changes made to storage if applicable

[ ] Modified behavior/functions - try to make sure above test items are covered
[ ] Integration tests are added if applicable/needed

Codecov Report

Merging #972 (0d5cfba) into dev (9da4678) will decrease coverage by 0.02%.
The diff coverage is 81.91%.

:exclamation: Current head 0d5cfba differs from pull request most recent head 5fef48b. Consider uploading reports for the commit 5fef48b to get more accurate results

@@            Coverage Diff             @@
##              dev     #972      +/-   ##
==========================================
- Coverage   77.63%   77.61%   -0.02%
==========================================
  Files          75       76       +1
  Lines       11387    11458      +71
==========================================
+ Hits         8840     8893      +53
- Misses       2547     2565      +18

Impacted Files
Coverage Δ

pallets/creditcoin/src/ocw/tests.rs
96.71% <ø> (-0.01%)
:arrow_down:

pallets/offchain-task-scheduler/src/ocw/nonce.rs
99.37% <ø> (-0.01%)
:arrow_down:

test/traced-test/src/lib.rs
76.71% <76.71%> (ø)

...allets/creditcoin/src/ocw/tasks/verify_transfer.rs
96.02% <100.00%> (ø)

pallets/offchain-task-scheduler/src/ocw/tests.rs
100.00% <100.00%> (ø)

runtime/src/tests/task_scheduling.rs
100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


feat(ground_segmentation): add time_keeper

Description
This PR will add time keeper feature for ground_segmentation.
The time tracking is set only for relatively long processing time functions/methods.

Notes for reviewers
None.
Interface changes
None.

Effects on system behavior
None.

@a-maumau Thank you for your PR,
I think there are no time keeper for below functions
    │   ├── 0.02% checkBreakGndGrid: total 0.14 [ms], avg. 0.00 [ms], run count: 427548
    │   ├── 0.01% recheckGroundCluster: total 0.09 [ms], avg. 0.00 [ms], run count: 164117
    │   ├── 0.01% checkContinuousGndGrid: total 0.04 [ms], avg. 0.00 [ms], run count: 269943
    │   ├── 0.02% checkDiscontinuousGndGrid: total 0.12 [ms], avg. 0.00 [ms], run count: 354528
    │   └── 81.57% rest: 512.40 [ms]

Could you check this?

similar to https://github.com/autowarefoundation/autoware.universe/pull/8597#issuecomment-2311360906

@badai-nguyen Sorry for my poor explanations and making some confusions.

The time tracking is set only for relatively long processing time functions/methods.

This meant "I remove some timekeeper from the code".
The reason I removed the timekeeper from some methods is that its processing time is relatively small compared to the other parts.
It was not intended in this PR, but I found that adding the timekeeper for some method make the entire process slow later.
For example, following two images are output from debug tools.

The first image shows the visualization of processing_time_ms of the current code (no timekeeper). Second image is showing the case when the timekeeper added to the all methods.
In the second image, the processing time of scan_ground_filter ranged in like 160~240 ms. I think this is caused by too many call of some methods with timekeeper, I guess.

At least, we can say the overall processing has reduced if we remove the timekeeper from some methods.

@technolojin It seems it is taking time for the for-loop which depends on the input point cloud number, and this might indicate the sample result of rest in the top PR comment comes from too many timekeeper.
For example in the case of adding timekeeper only for few methods,
100.00% faster_filter: total 24.29 [ms], avg. 24.29 [ms], run count: 1
    ├── 64.59% convertPointcloudGridScan: total 15.69 [ms], avg. 15.69 [ms], run count: 1
    ├── 31.13% classifyPointCloudGridScan: total 7.56 [ms], avg. 7.56 [ms], run count: 1
    ├── 3.76% extractObjectPoints: total 0.91 [ms], avg. 0.91 [ms], run count: 1
    └── 0.52% rest: 0.13 [ms]

convertPointcloudGridScan

https://github.com/autowarefoundation/autoware.universe/blob/81934e4b6beb00a443edfc03380e1c25b2321056/perception/autoware_ground_segmentation/src/scan_ground_filter/node.cpp#L133-L158 : 8.962 ms
https://github.com/autowarefoundation/autoware.universe/blob/81934e4b6beb00a443edfc03380e1c25b2321056/perception/autoware_ground_segmentation/src/scan_ground_filter/node.cpp#L161-L165 : 4.043 ms
8.962 + 4.043 ~ 13 ms (total is 15.69ms)

classifyPointCloudGridScan

the top loop take: 7.541 ms (total is 7.56 ms)

@badai-nguyen Sorry for my poor explanations and making some confusions.

The time tracking is set only for relatively long processing time functions/methods.

This meant "I remove some timekeeper from the code".
The reason I removed the timekeeper from some methods is that its processing time is relatively small compared to the other parts. It was not intended in this PR, but I found that adding the timekeeper for some method make the entire process slow later.
For example, following two images are output from debug tools.
 The first image shows the visualization of processing_time_ms of the current code (no timekeeper). Second image is showing the case when the timekeeper added to the all methods.
In the second image, the processing time of scan_ground_filter ranged in like 160~240 ms. I think this is caused by too many call of some methods with timekeeper, I guess.
 At least, we can say the overall processing has reduced if we remove the timekeeper from some methods.

@a-maumau thank you for your clarification.

It makes sense to me know since I also got quite the same result at my side

It's also a good point to known that timekeeper quite takes time to process. :heart:

Output change at 45de8e7 :
100.00% faster_filter: total 2810.32 [ms], avg. 18.25 [ms], run count: 154
    ├── 69.23% convertPointcloudGridScan: total 1945.50 [ms], avg. 12.63 [ms], run count: 154
    │   ├── 51.90% horizontal_angle_grouping: total 1458.67 [ms], avg. 9.47 [ms], run count: 154
    │   ├── 17.24% sort: total 484.54 [ms], avg. 3.15 [ms], run count: 154
    │   └── 0.08% rest: 2.29 [ms]
    ├── 26.85% classifyPointCloudGridScan: total 754.67 [ms], avg. 4.90 [ms], run count: 154
    ├── 3.12% extractObjectPoints: total 87.62 [ms], avg. 0.57 [ms], run count: 154
    └── 0.80% rest: 22.52 [ms]

@technolojin The reason for adding the new block (scope) in those lines might not be that clear. Would it be alright to remove that explanation?

@technolojin The reason for adding the new block (scope) in those lines might not be that clear. Would it be alright to remove that explanation?

I do not think the new blocks are not clear.
It is possible to separate those by methods, name it by its functionality(, and measure the time).
This process (separate a long code to blocks) is meaningful and useful to maintain a complex code readable and manageable.

sorry for the messing up the things...
@technolojin could you kindly remove the unrelated reviewers?

@technolojin I applied the suggestions in e8c448a.
Sorry for the noisy commits.

@Shin-kyoto I resolved the conflict.

@Shin-kyoto can you review again please?


Cannot load some third-party ARPA-format LMs

What steps will reproduce the problem?

1. Compile trunk (r48)
2. Download an arpa LM e.g. the LM in
http://www.keithv.com/software/giga/lm_giga_64k_nvp_3gram.zip
3. Run evaluate-ngram which loads the model, e.g.

evaluate-ngram -lm lm_giga_64k_nvp_3gram.arpa -eval-perp data.txt

What is the expected output? What do you see instead?

0.001   Loading LM lm_giga_64k_nvp_3gram.arpa...
Assertion failed: (p >= &line[lineLen]), function LoadLM, file
src/NgramModel.cpp, line 329.
Abort trap

What version of the product are you using? On what operating system?

r48, MacOSX

Darwin stephen-marquards-macbook-pro.local 10.6.0 Darwin Kernel Version 10.6.0:
Wed Nov 10 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386

Please provide any additional information below.

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 9 Mar 2011 at 1:01

Perhaps the context in the third-party ARPA-format LMs exist the unigram whose length is so long. It will lead to the length truncation. When loading the LM, it only create array with fixed length to save everty line of LM. The fixed length is too small to save too long unigram or other gram.

The above answer maybe wrong. It's another bug. This bug occurs I think maybe because of the format of third-party LMs have a little difference with mitlm ARPA format.
I was using kenlm toolkit to generate LM and then to use mitlm toolkit to interpolation. It occurs the same problem. When loading the third-party LMs, you can correct the conditional probabilities and bows in the code so that it can better to load third-party LMs.

@cmathx could you please elaborate on how you fixed the issue?


README: specs.md -> spec.md

Fix a typo in README.md that linked to the missing file specs.md instead of spec.md.

Thank you!


Drop support for EOL Python 3.6 and add 3.11

I didn't add the Trove classifier for 3.11 because it's still in beta, but as this is a pure Python project we probably could add now?

I didn't add the Trove classifier for 3.11 because it's still in beta

Added it now, 3.11 is in final RC with full release out in a week or two!
https://peps.python.org/pep-0664/

That was quick :smile:

@hugovk thanks for help! These changes are now available in version 2.6.0 :rocket:


Mouseover on box inside box with nanoscroller

Hello,
In the example http://citmake.com/lionbar/ have a box inside the other, both with nanoscroller. The problem is that when I move the mouse over any box, all bars are displayed.
What do you suggest to fix this?
Thank you!

Clearly a CSS selector issue. It's sunday today so at best, i'll get this fixed tomorrow. But if you do, figure it out first, do a pull request and help the interwebz. Thanks!

I think I already fixed this, I could push soonish.

Go ahead @kristerkari :-)

Check if this works for you. It uses the CSS child selector to only select a direct child, so inner scrollbars are not shown when the outer div is hovered.

Thanks! @diopear , this should be fixed now. Please visit the download link for the latest CSS file. Cheers, everyone!

I checked and this currently does not work exactly as the native lion scrollbar, so I think that I still need to do one more patch to hide the outer scrollbar when the inner one is hovered.

It works great now. Thanks, guys. You are very fast :)


Support change tracking of non-primitive types

Issue #9753
This is primarily focused at allowing providers to generate type mappings for non-primitive type mappings. It can also be used for non-primitive types that are used through value conversions, but #10961 covers adding fluent API for this. Also, this implementation does not attempt to address perf issues, but I added at note to #9422.
I'm not happy with the name ValueComparer--we should discuss in API review.

For my understanding:

Would this allow change tracking when I'm using value conversion to transform a complex type to a JSON-serialized string for example? (doesn't seem to work as of 2.1.0-preview2-final)
Would this require explicit support from the provider?
Thanks!

@ThomasWeiss Yes, but only if a ValueComparer is implemented for the type being mapped. It that's a database type, then ideally the provider should implement the comparer. If it's a custom type that you have defined, then you would need to implement the comparer.

@ajcvickers Here is what I've tried:
class MyComplexType
{
    public string Field { get; set; }
    public override bool Equals(object obj)
    {
        if (obj is MyComplexType t)
        {
            return (Field == t.Field);
        }
        else
        {
            return false;
        }
    }
}
class MyEntity
{
    public MyComplexType Complex { get; set; }
}

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
    var myComplexTypeValueComparer = new ValueComparer<MyComplexType>((t1, t2) => t1.Equals(t2), t => t.GetHashCode());
    modelBuilder.Entity<MyEntity>().Property(p => p.Complex).Metadata.SetValueComparer(myComplexTypeValueComparer);
    modelBuilder.Entity<MyEntity>().Property(p => p.Complex)
        .HasConversion(c => JsonConvert.SerializeObject(c), c => JsonConvert.DeserializeObject<MyComplexType>(c));
}

Updating Complex.Field in MyEntity, then calling SaveChanges seems to trigger the ValueComparer, however it ends up comparing 2 same instances of MyComplexType (confirmed with object.ReferenceEquals) so it doesn't detect the update and Complex doesn't get serialized. That's with 2.1.0-preview2-final. May I have missed something in my configuration?
Thanks again for your help!

@ThomasWeiss You'll need to provide a GetHashCode that is consistent with Equals--just the normal thing that is always needed when equality is implemented--and also in this case a Snapshot expression because EF needs to make a copy of this object in order to later compare against that copy.

I have the same problem (with JSON fields also). I took the code by @ThomasWeiss and added GetHashCode and Snapshot expressions, but the change to entity is still not detected. Full code is below. Can you tell me what's wrong?
    public class MyComplexType {
        public string Field { get; set; }
        public override bool Equals(object obj) {
            if (obj is MyComplexType t) {
                return (Field == t.Field);
            } else {
                return false;
            }
        }
        public override int GetHashCode() {
            return Field.GetHashCode();
        }
    }
    public class MyEntity {
        public int Id { get; set; }
        public MyComplexType Complex { get; set; }
    }

    public class TestDbContext : DbContext {

      public DbSet<MyEntity> MyEntities { get; set; }

      protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {
        base.OnConfiguring(optionsBuilder);
        optionsBuilder.UseInMemoryDatabase("Test");
      }

      protected override void OnModelCreating(ModelBuilder modelBuilder) {
        var myComplexTypeValueComparer = new ValueComparer<MyComplexType>((t1, t2) => t1.Equals(t2), t => t.GetHashCode(), t => new MyComplexType { Field = t.Field });
        modelBuilder.Entity<MyEntity>().Property(p => p.Complex).Metadata.SetValueComparer(myComplexTypeValueComparer);
        modelBuilder.Entity<MyEntity>().Property(p => p.Complex)
            .HasConversion(c => JsonConvert.SerializeObject(c), c => JsonConvert.DeserializeObject<MyComplexType>(c));
      }

    }

    [TestClass]
    public class UnitTest1 {
        [TestMethod]
        public void TestMethod1() {

            using (var db = new TestDbContext()) {

                var entity = new MyEntity { Complex = new MyComplexType { Field = "Value 1 "}};
                db.Add(entity);
                db.SaveChanges();

                entity.Complex.Field = "Value 2";
                Assert.IsTrue(db.Entry(entity).Property(p => p.Complex).IsModified, "Property is modified"); // This fails
                Assert.AreEqual(EntityState.Modified, db.Entry(entity).State, "Entity is modified"); // This also fails

            }

        }
    }

Strange, I got it working if I reload the entity from database (set state to Detached, reload with Find). With simple fields that is not required.
            using (var db = new TestDbContext()) {

                var entity = new MyEntity { Complex = new MyComplexType { Field = "Value 1 "}};
                db.Add(entity);
                db.SaveChanges();

                // Added THIS
                db.Entry(entity).State = EntityState.Detached;
                entity = db.MyEntities.Find(entity.Id);

                entity.Complex.Field = "Value 2";

                db.ChangeTracker.DetectChanges(); // Just in case

                Assert.IsTrue(db.Entry(entity).Property(p => p.Complex).IsModified, "Property is modified"); // This fails
                Assert.AreEqual(EntityState.Modified, db.Entry(entity).State, "Entity is modified"); // This also fails

            }


docker in lxd, crashes if use swarm ...

Hey,
i use docker in lxd. if i will use swarm and init docker crashes with following message:
WARN[2018-03-01T12:12:17.588518549Z] Error (Unable to complete atomic operation, key modified) deleting object [endpoint_count zpnvfcscmn415cb652gg10jce], retrying....
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1d4d195]

In older docker.io versions swarm works ...
Gruß
Sam

Sorry for the delay, but this looks like a general Docker issue, not something specific to the https://hub.docker.com/_/docker/ image (which is what this repository is for).  I'd recommend trying the Docker Community Forums, the Docker Community Slack, or Stack Overflow for help figuring out what's going on there.


Log Driver memory usage and the sync.Pool message pool

Builtin Docker loggers, such as the json-file logger used in this repo, call this function: https://github.com/moby/moby/blob/master/daemon/logger/logger.go#L40 for each .Log(msg) call. What are the memory and CPU implications of this? I've tried using both the msg allocation strategy in this repo as well as using logger.NewMessage for each log entry in consumeLog's loop, each result in a ballooning of CPU and Memory usage over time.
I'm not sure if it is sync.Pool causing this or if it is just the Go runtime using more and more resources until there is some amount of resource pressure. Or it could be something else entirely, any tips would be great by anyone who happens to see this. Thanks!

Oh, I just realized you, @cpuguy83 , are the one who committed all the messagePool code. In addition to the above questions is there a particular reason you don't use logger.NewMessage in this example driver? Thanks for making it by the way!

No reason, just built this quickly for running tests, not sustained usage.


implement the rest of the urlFor... methods ..  urlForFindRecord is only one currently supported

Finally got this one: https://github.com/danielspaniel/ember-data-factory-guy/releases/tag/v2.9.2


Wconnell/issue1

basic model, data and trainer implementation.
unable to perform testing on cuda yet.

closes #1


Issue with k8s.io/docs/concepts/scheduling-eviction/taint-and-toleration/

Broken link in the section https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/#taint-nodes-by-condition
"node conditions" is pointing to https://kubernetes.io/docs/concepts/scheduling-eviction/pod-eviction#node-conditions which returns a 404.

This issue will be resolved when the PR #28797 is merged.
/kind bug
/kind cleanup

This issue was resolved by the PR #28797.
/close

/close


Changing security questions

When I go to my profile page to change my security questions. I see a list of my questions with a link to edit, when I click edit I see a blank field for an answer.
This has been flagged as confusing to some users who may think thier answers are not saving.
Suggested change:
Change the link to say "Change"
Change the label to say "New answer"

Private Zenhub Image


Error loading a project leads to data loss

I was finally able to repro an issue where we crash and clear the main.ts file losing the user's data.
Repro steps:

Create a project.
Change the project name to an invalid name (something with a space)
Reload the page. Pxt will complain about unable to load the file.
Reload the page again. Pxt will clear all your data and even if you change the file name to something valid again, your script is lost.

Is this a "localhost" only problem? I can rename the project with space without issues.

Yeah it appears so.


Translation

Some Words are not translated 100% are giving confusion, example instead of Installieren (install) there is Installiert (installed).

Hi @theo-69,
The translations are here:
https://github.com/oznu/homebridge-config-ui-x/tree/master/ui/src/i18n
Would you mind creating a PR to fix any changes you think should be made?
@razer4908

no problem will try this week

done, will check later if there is more ;-)

I already corrected myself, but the merge of my PR didn´t changed anything in Config Ui X

strange, I have it on one of my homebridges but not on all. There where only one or two small misunderstandings. Like "Installiert" instead of "Installieren" And I thought "Config" is making more sense then "Konfig"

I also stuggled between "Config" and "Konfig" but @oznu has given this before so i did not change it. Thank you for correcting.  "Installiert" instead of "Installieren" was also an not wanted eyecatcher for me
I hope this time everything will be fine :)

Just figured out, you have to clear your browser cache :-)

and found some lower upper case typos will fix them, just for the Eye ;-)


Update LICENSE

Summary

few grammatical changes that enhances the entire document made with proper research
Full changelog

[Implement ...]
[Add related tests]
...

Issue reference

Fix #[issue number]

 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.You have signed the CLA already but the status is still pending? Let us recheck it.

@RohitYandigeri you cannot change the license, otherwise it is not sny ore the same license, see: https://www.apache.org/licenses/LICENSE-2.0
Thus closing this.

@bungle can you please provide me one tshirt ? For appreciation


endstone_runtime.dll Access denied

Describe the bug
LoadLibrary failed to load endstone_runtime.dll with error 5
To Reproduce
Steps to reproduce the behavior:

Run endstone
Let it download bedrock server
And error

Screenshots

Translation: ...error 5: Access denied
Details:

OS: Windows 11
Endstone Version: <IP_ADDRESS>

Additional context
It's not problem with my filesystem, I gave it all permissions and even run it as administrator. And after closing message box, this happens in console: OpenThread failed with error 18. Issue where it's also happened: #35.

This looks like an issue on your end, and there’s not much we can do about it. I'd suggest trying a reboot to see if that helps.

The problem was that python was installed from the Microsoft store, reinstalled via the legacy installer and it worked! So issue, that I referenced, have this same issue, because he's also got microsoft store python version: https://github.com/EndstoneMC/endstone/issues/35#issuecomment-2293803801. It would be cool to add a warning about this in readme.


Retry render_async after some time

If request fails and you want to retry it, you should be able to wait for N seconds before firing another request. You can already retry on failure, but it will emit another request right away.
Inspired by this comment https://github.com/renderedtext/render_async/issues/46#issuecomment-490540355
If you would like to see this request, please 👍 this issue.

An event-based retry or reload feature would be nice to have.  In my app which is very interactive, there are many events that require partial updates of the screen after some user editing of records.  The ability to manually trigger a reload of a partial that contains a data table would be awesome.   I.e. repeat the original render_async that the loaded the partial based on a JS event.

Hey, folks! I just released 2.1.7 version where there is this feature! 🎉
Try it out and share your thoughts! We also added a Discord channel where you can get help quickly. I'd be happy to see you there as well. 💚


cannot reproduce official binaries

reload4j has near full Reproducible Build: https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/ch/qos/reload4j/README.md
but there is only one strange difference:
├── META-INF/MANIFEST.MF
│ @@ -2,15 +2,14 @@

│  Implementation-Vendor: QOS.CH Sarl (Switzerland)

│ -Originally-Created-By: Apache Maven Bundle Plugin 5.1.4

│  Export-Package: org.apache.log4j;version="1.2.22";uses:="org.apache.lo

how was this Originally-Created-By field injected in published binaries?
Should the rebuild script do more than just mvn package to get this field injected? (I did not see any profile for that in project's pom.xml)

Hi @hboutemy,
Thank you for your message. I love the idea of https://github.com/jvm-repo-rebuild/reproducible-central.
There is the maven-bundle-plugin declaration on line 297 of relaod4j/pom.xml. Have you noticed that?

how was this Originally-Created-By field injected in published binaries?

The following command is invoked command to deploy artifacts on Maven Central:
mvn deploy -P javadocjar,sign-artifacts
I noticed the toolchains profile but I do no think it is used at all.

I love the idea of https://github.com/jvm-repo-rebuild/reproducible-central.

thank you, it's a huge work, I'm happy that you find it useful

The following command is invoked command to deploy artifacts on Maven Central:
mvn deploy -P javadocjar,sign-artifacts

oh, I now understand: you run mvn twice = once to build initially, once to deploy
and bundle plugin modifies the output on the second run...
ok, I think I'll be able to tweak my rebuild script to do that double mvn invocation process
in the future, I suggest you to clean first when deploying = mvn clean deploy -P javadocjar,sign-artifacts

woohoo, now I am able to reproduce release 1.2.22!
https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/ch/qos/reload4j/README.md

I am very happy to hear that. Awesome news.


Can't get the automatic country's data

Hi, I'm in need of populating some select-option elements as soon as I get the country of the user. Is there any way I could access the data of the country, even before the user inputs his number?
For example:

User in Brazil goes to the site
Input gets the Brazilian flag (because of the auto property)
Get the current country's data in this moment.

You just need to use the .done() method e.g.
$("input").intlTelInput({
    defaultCountry: "auto"
}).done(myCallback);

Actually I will leave this issue open until I (or someone else) finds the time to update the readme with this information, probably just under the defaultCountry option.


font-min/max-size

https://www.w3.org/TR/css-fonts-4/#font-min-max-size-prop

+1
It would be great to review the entire css-font-4 working draft and make sure all the properties are there.  https://www.w3.org/TR/css-fonts-4/

Duplicate of #3097.

Looks like these were removed from the specification, probably because math functions let you accomplish the same: https://caniuse.com/css-math-functions
See https://css-tricks.com/how-do-you-do-max-font-size-in-css/ for examples


Value of web vitals Events in GA

Hi Colleagues!
We have implemented Core Web Vitals Tracking via GTM as recommended here  https://web.dev/vitals/#measure-core-web-vitals-in-javascript
So with this Library https://github.com/GoogleChrome/web-vitals
But I have some questions about the numbers we receive:
CLS - in classic documentation should be like 0.1, 0.25,  In GA we receiving numbers like 1694, etc.
Could you help me with clarifying - 0.1 - it will be 1000, or 100? And 0.25 will be 250 or 2500?
And I also wonder about FID - good Value, in this case, will be 100 and less, am I right?
I need it to properly separate events in GA - https://www.screencast.com/t/v1p00x9INkcW
Thanks in Advance!

But I have some questions about the numbers we receive:
CLS - in classic documentation should be like 0.1, 0.25, In GA we receiving numbers like 1694, etc.
Could you help me with clarifying - 0.1 - it will be 1000, or 100? And 0.25 will be 250 or 2500?

Happy to clarify. If you read closely the code comment from the example in the README, you'll see it says:
// Google Analytics metrics must be integers, so the value is rounded.
// For CLS the value is first multiplied by 1000 for greater precision
// (note: increase the multiplier for greater precision if needed).

In other words, a CLS of 100 in GA will equal 0.1, which is the recommended "good" threshold. Similarly a CLS of 250 in GA will equal the "poor" threshold.

And I also wonder about FID - good Value, in this case, will be 100 and less, am I right?

In the case of FID, the values are in milliseconds, so yes, a "good" value is 100 or less.

But I have some questions about the numbers we receive:
CLS - in classic documentation should be like 0.1, 0.25, In GA we receiving numbers like 1694, etc.
Could you help me with clarifying - 0.1 - it will be 1000, or 100? And 0.25 will be 250 or 2500?

Happy to clarify. If you read closely the code comment from the example in the README, you'll see it says:
// Google Analytics metrics must be integers, so the value is rounded.
// For CLS the value is first multiplied by 1000 for greater precision
// (note: increase the multiplier for greater precision if needed).

In other words, a CLS of 100 in GA will equal 0.1, which is the recommended "good" threshold. Similarly a CLS of 250 in GA will equal the "poor" threshold.

And I also wonder about FID - good Value, in this case, will be 100 and less, am I right?

In the case of FID, the values are in milliseconds, so yes, a "good" value is 100 or less.


Fix missing codecType

Oversight in #266.

Mind squashing the three commits into one, kgo codec: fix missing codecType?
Also this can be merged but wait until the next release

Sure, done. I also tweaked the comment back toward your original suggestion, since on further consideration, having a comment saying 'this line exists to silence the linter' feels like a bad code smell. (If we really just wanted to silence the linter, we could add a comment disabling that check for this function.)


Server is correctly responding to closing request from client

I was trying to build server push application. While using websocket client based on Python and websocket client based on JavaScript, it seems that if they are trying to request to close the connection from the server built by websocket based on Python, this library cannot respond to the closing request correctly and can only wait until timeout.
Then I try to use nodejs to build the server and use the same clients and everything goes right.
So I guess this library's server side is not handling closing request from client side.

Can you provide the code you're using on the client and server side (preferably just the relevant bits), and the error message you're seeing?

import asyncio
import websockets
import json
import time

async def hello(websocket, path):
	print("welcome")
	while True:
		time.sleep(1.5)
		await websocket.send(json.dumps({"type":"verbose","message":"verbose","timestamp":int(time.time()*1000)}))
		print("sent")
		websocket.recv()
	print("end")

start_server = websockets.serve(hello, 'localhost', 9050)

asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()

This is the server code of Python which is causing problems.
var ws = require("nodejs-websocket")

var server = ws.createServer(function (conn) {
    console.log("New connection")
    var timer = setInterval(()=>{
    	conn.sendText(JSON.stringify({type:"verbose", message:"verbose", timestamp:new Date().getTime()}));
    	console.log("sent");
    }, 1500);
    conn.on("close", (code, reason) => {
	    console.log("Connection closed")
	    clearInterval(timer);
    })
}).listen(9050)

This is the server code which do not cause problems.
One of the test client code is written in Python using websocket as well.
import asyncio
import websockets

async def hello():
	async with websockets.connect("ws://localhost:9050") as websocket:
		# name = input("What's your name?")
		# await websocket.send(name)
		# print("> %s" % name)
		# greeting = await websocket.recv()
		print(await websocket.recv())
		print(await websocket.recv())
		print(await websocket.recv())
		websocket.close()
		# print("< %s" % greeting)

asyncio.get_event_loop().run_until_complete(hello())

So when the program runs well (Using JS version as server), the server presents like
New connection
sent
sent
sent
Connection closed

And the client side it only wait several seconds to quit correctly.
However, when using server code with python version, the server continuously sending message even if the client asks to close the request and after tens of seconds, the client has already refused to receive message for a long time, the server find the connection broken and return errors with error_code 1006 which is not 1000 as the usual way.
welcome
sent
sent
sent
sent
sent
sent
sent
sent
sent
sent
sent
sent
sent
sent
sent
sent
sent
Error in connection handler
Traceback (most recent call last):
  File "/home/somefive/miniconda3/lib/python3.6/site-packages/websockets/protocol.py", line 571, in write_frame
    yield from self.writer.drain()
  File "/home/somefive/miniconda3/lib/python3.6/asyncio/streams.py", line 333, in drain
    yield from self._protocol._drain_helper()
  File "/home/somefive/miniconda3/lib/python3.6/asyncio/streams.py", line 204, in _drain_helper
    raise ConnectionResetError('Connection lost')
ConnectionResetError: Connection lost

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/somefive/miniconda3/lib/python3.6/site-packages/websockets/server.py", line 84, in handler
    yield from self.ws_handler(self, path)
  File "server.py", line 11, in hello
    await websocket.send(json.dumps({"type":"verbose","message":"haha","timestamp":int(time.time()*1000)}))
  File "/home/somefive/miniconda3/lib/python3.6/site-packages/websockets/protocol.py", line 320

@Somefive I believe that you are supposed to wrap the while statement in a try catch block.
async def hello(websocket, path):
	print("welcome")
	try:
		while True:
			time.sleep(1.5)  # should really be using asyncio's sleep to not block the thread
			await websocket.send(json.dumps({"type":"verbose","message":"verbose","timestamp":int(time.time()*1000)}))
			print("sent")
			print(await websocket.recv())  # Will not send another message until the server receives a message
	finally:
		print("end")

@JCharante
Yes, try - catch could solve the problem.
However, I still think the proper way to handle a closing request from client side is not by raising an exception. Because, the client side is sending a closing request which means the state of client side is being CLOSING and waiting handshake from server side to close the connection and turn the state into CLOSED. Beside, the try - catch method still need to wait for tens of seconds to catch the connection lost exception however since the client side has already sent a formal request to close the connection, the connection should be closed as soon as the server received that instead of waiting for extra seconds and timeout.

The client code I was actually trying to use is in JavaScript in web front end. I would like to see when user click on close connection button and the state is transformed to successfully CLOSED state so that I can pop up the reconnect window. But currently, it is keeping CLOSING state and hang up there for a long time and it is not an elegant way to destroy the websocket instance to shut down the connection.

FWIW, from what I can tell it looks like the only test of the client closing the connection is here (test_client_closes_connection_before_handshake()), for the connection being closed before the handshake is done.

You wrote websocket.recv() in your example. You probably meant await websocket.recv(). That explains while the loop loops constantly.
You also use time.sleep(1.5) which is blocking, you want the non-blocking await asyncio.sleep(1.5) instead.
Making these changes should make the issue go away.
websockets catches exceptions in connections handlers and performs the closing handshake correctly.
NB - raising an exception when the handler is waiting on websocket.recv() is correct: no message will ever be received. Previously, websocket.recv() returned None in that case, but that required testing for that case after every call to recv(), which was needlessly verbose. An exception is a better way to handle this.

I see, thank you very much!


Migrate to postgresql database

Migrate to postgresql database.

SQLite is good enough for use during development. Switching to postgres / mysql only involves the sys-admin suitably configuring the app when installing it on the production server. We can have a more detailed note about how to do this in the README, but otherwise, no code changes are needed for this.


Add support for backticks

JS backticks makes queries like these easy to read but unfortunately it doesn't work with current implementation. I tried both escape and format. Any reason why it is not implemented?
const sql = `CREATE TABLE ? (
            id int(10) unsigned NOT NULL AUTO_INCREMENT,
            county varchar(255) DEFAULT NULL,
            race enum('B', 'I', 'W', 'A', 'T', 'O', 'U') NOT NULL,
            sex enum('M','F','U') NOT NULL,
            age int(11) DEFAULT NULL,
            city varchar(255) DEFAULT NULL,
            party enum('R','D','L','U') NOT NULL,
            precinct varchar(255) DEFAULT NULL,
            cong_dist int(11) DEFAULT NULL,
            house_dist int(11) DEFAULT NULL,
            sen_dist int(11) DEFAULT NULL,
            voting_method enum('C','M','G','S', 'V', 'B', 'T', 'E', 'L', 'O', 'P') NOT NULL,
            election_lbl date DEFAULT NULL,
            site_name varchar(255) DEFAULT NULL,
            PRIMARY KEY (id)
        )`;

        return this.dropTable().then(() => {
            return super.query(sql, [this.table]);
        });

Are you getting an error?

I was able to run your example with the backticks without issue. Maybe you can help me reproduce the issue, what do I need to change below to not work?
$ node -v
v6.13.0

$ cat foo.js
const mysql = require('mysql');

const sql = `CREATE TABLE ? (
    id int(10) unsigned NOT NULL AUTO_INCREMENT,
    county varchar(255) DEFAULT NULL,
    race enum('B', 'I', 'W', 'A', 'T', 'O', 'U') NOT NULL,
    sex enum('M','F','U') NOT NULL,
    age int(11) DEFAULT NULL,
    city varchar(255) DEFAULT NULL,
    party enum('R','D','L','U') NOT NULL,
    precinct varchar(255) DEFAULT NULL,
    cong_dist int(11) DEFAULT NULL,
    house_dist int(11) DEFAULT NULL,
    sen_dist int(11) DEFAULT NULL,
    voting_method enum('C','M','G','S', 'V', 'B', 'T', 'E', 'L', 'O', 'P') NOT NULL,
    election_lbl date DEFAULT NULL,
    site_name varchar(255) DEFAULT NULL,
    PRIMARY KEY (id)
)`;

console.log(mysql.format(sql, ['table_name']));

$ node foo.js
CREATE TABLE 'table_name' (
    id int(10) unsigned NOT NULL AUTO_INCREMENT,
    county varchar(255) DEFAULT NULL,
    race enum('B', 'I', 'W', 'A', 'T', 'O', 'U') NOT NULL,
    sex enum('M','F','U') NOT NULL,
    age int(11) DEFAULT NULL,
    city varchar(255) DEFAULT NULL,
    party enum('R','D','L','U') NOT NULL,
    precinct varchar(255) DEFAULT NULL,
    cong_dist int(11) DEFAULT NULL,
    house_dist int(11) DEFAULT NULL,
    sen_dist int(11) DEFAULT NULL,
    voting_method enum('C','M','G','S', 'V', 'B', 'T', 'E', 'L', 'O', 'P') NOT NULL,
    election_lbl date DEFAULT NULL,
    site_name varchar(255) DEFAULT NULL,
    PRIMARY KEY (id)
)

So if I print to console my output looks exactly as yours but when I do mysql.query(formatedQuery) I get this error.
errno: 1064,
sqlMessage: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'\'prim1000\' (\n            id int(10) unsigned NOT NULL AUTO_INCREMENT,\n          \' at line 1',
sqlState: '42000',
index: 0,
sql: 'CREATE TABLE \'prim1000\' (\n            id int(10) unsigned NOT NULL AUTO_INCREMENT,\n            county varchar(255) DEFAULT NULL,\n            race enum(\'B\', \'I\', \'W\', \'A\', \'T\', \'O\', \'U\') NOT NULL,\n            sex enum(\'M\',\'F\',\'U\') NOT NULL,\n            age int(11) DEFAULT NULL,\n            city varchar(255) DEFAULT NULL,\n            party enum(\'R\',\'D\',\'L\',\'U\') NOT NULL,\n            precinct varchar(255) DEFAULT NULL,\n            cong_dist int(11) DEFAULT NULL,\n            house_dist int(11) DEFAULT NULL,\n            sen_dist int(11) DEFAULT NULL,\n            voting_method enum(\'C\',\'M\',\'G\',\'S\', \'V\', \'B\', \'T\', \'E\', \'L\', \'O\', \'P\') NOT NULL,\n            election_lbl date DEFAULT NULL,\n            site_name varchar(255) DEFAULT NULL,\n            PRIMARY KEY (id)\n        )'

That's because a table name is not a value but an identifier, so you need to escape the string as an identifier. Try using CREATE TABLE ?? as your first line in your sql string

Docs on escaping identifiers may help clarify as well: https://github.com/mysqljs/mysql/blob/master/Readme.md#escaping-query-identifiers

Thank you. What's the difference between ? and ??.

Thr former escapes values and the latter identifiers.

Adding this one line to the docs could save developers a lot of time unless it is a common knowledge and I am the only one who doesn't know about this.
The other one is this, which gave some people in stackoverflow the impression that all queries are automatically escaped. Maybe we can make the word "Object" bold for emphasis?

When you pass an Object to .escape() or .query(), .escapeId() is used to avoid SQL injection in object keys.

It seems to be common knowledge on how to write SQL in general knowing what a value is vs what an identifier is and where to use what. We have it right in our TOC next to each other so folks can pick exactly what they need. If there is misinformation on things like Stackoverflow and users are only getting info there vs reading the docs here I'm not sure I know how to solve that problem; any thoights I'd be interested to hear :+1:

Maybe we can make the word "Object" bold for emphasis?

I'm not sure I understand what it would emphasize? Using .escape is for value and is what the single question mark is. Using escapeId is for identifiers is for and what the double question mark is. Both take Objects just fine.

When you pass an Object to .escape(), .escapeId() is used to avoid SQL injection in object keys.
Technically this is an object let a = new String('SELECT * from blah blah'); will it escape this. Because of the security implications it needs to be clear that it won't escape auto escape strings.

Report security issues as we ask in https://github.com/mysqljs/mysql/blob/master/Readme.md#security-issues so we have time to address instead of pubically disclosing them putting all module users at risk. I've locked the issue for now. Please continue the discussion in the proper security report.


Get a correct reference to an element from ArrayView

Revival of #371
Since Index trait does not allow us to change the lifetime, I implement it as an associated function ArrayView::elem_ref and ArrayViewMut::elem_ref_mut

Good idea, will look closer at it soon

elem_ref_mut is not sound with Rust borrowing rules. This is a tricky case, where the shared and mutable reference rules don't really correspond to another.
The summary is:

from &'a &'b T we can get a &'b T even if 'b is a greater scope than 'a
from &'a mut &'b mut T we cannot get a &'b mut T because we can only get the shorter of 'a and 'b.

Instead of trying to convince anyone of that rule, here is a program that shows that elem_ref_mut allows producing two simultaneous and equal mut references:
Code link
When I run it, it has this output:
$ cargo test --test aliasing_mut -- --nocapture
running 1 test
In two references with reference 0x7f9fd79fe5cc and 0x7f9fd79fe5cc
test test ... ok

But, since this is undefined behaviour, this output is not required to be there, it could change with compiler optimizations and compiler version.

elem_ref_mut is not sound with Rust borrowing rules.

Yes, and thanks for your careful check. This is an invalid pointer dereferencing.
I cannot find a way to keep this interface, and my answer for this problem is to consume ArrayVeiwMut like ArrayViewMut::into_slice done:
pub fn elem_ref_mut<I: NdIndex<D>>(self, index: I) -> &'a mut A { ... }

Then the two mutable reference cannot exist. (Note: We should rename this into_*.)

I'd like to find a good name for this -- something that's similar to get or index.

Do you find any name? My current candidate is elem and into_elem.

I change the interface of &mut to use move. I also renamed into elem, uelem, into_elem, and into_elem_unchecked

Thanks. If you don't mind, I'll merge this in and brood over the name myself. It's easier to get a feel for it when editing.

Thanks for your revise and merging! and sorry for my later reply...


snapshot_download download speeds are not shown on Kaggle and on some other platforms

Describe the bug
I download models like this e.g. case
!export HF_HUB_ENABLE_HF_TRANSFER=1
snapshot_download(
    repo_id="myrepo/repoid",
    allow_patterns=["flux_dev_fp8_scaled_diffusion_model.safetensors"],
    local_dir=f"{base_path}/Stable-Diffusion"
)

The outputs are like this, not only on Kaggle but also on some other platforms as well
Can this be fixed? zero info is displayed during the download
The download works but we can't see speed or the progress - not even after fully downloaded

System info
Copy-and-paste the text below in your GitHub issue.

- huggingface_hub version: 0.25.1
- Platform: Linux-5.15.154+-x86_64-with-glibc2.35
- Python version: 3.10.14
- Running in iPython ?: Yes
- iPython shell: ZMQInteractiveShell
- Running in notebook ?: Yes
- Running in Google Colab ?: No
- Running in Google Colab Enterprise ?: No
- Token path ?: /root/.cache/huggingface/token
- Has saved token ?: False
- Configured git credential helpers:
- FastAI: 2.7.17
- Tensorflow: 2.16.1
- Torch: 2.4.0
- Jinja2: 3.1.4
- Graphviz: 0.20.3
- keras: 3.3.3
- Pydot: 1.4.2
- Pillow: 10.4.0
- hf_transfer: 0.1.8
- gradio: N/A
- tensorboard: <IP_ADDRESS>
- numpy: 1.26.4
- pydantic: 2.9.2
- aiohttp: 3.9.5
- ENDPOINT: https://huggingface.co
- HF_HUB_CACHE: /root/.cache/huggingface/hub
- HF_ASSETS_CACHE: /root/.cache/huggingface/assets
- HF_TOKEN_PATH: /root/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
- HF_HUB_ETAG_TIMEOUT: 10
- HF_HUB_DOWNLOAD_TIMEOUT: 10

Hmm, thanks for reporting. That seems quite a specific issue :confused: As mentioned in the docs, hf_transfer is a power-user tool that is not necessarily well-polished to be user-friendly. Can't tell why specifically on Kaggle the progress bar doesn't work but not sure we will spent much time investigating it.
Progress bars are working locally, on Colab and in Spaces which are the main use cases for huggingface_hub+hf_transfer.


WIP - [SDL 0177] Alert icon

Fixes #795
This PR is not ready for review.
Risk
This PR makes minor API changes.
Testing Plan
Unit tests have been updated to test the new alertIcon param
Summary
[Summary of PR changes]
CLA

[x] I have signed the CLA

Codecov Report

Merging #1112 into develop will decrease coverage by 0.02%.
The diff coverage is 100%.

@@              Coverage Diff              @@
##             develop    #1112      +/-   ##
=============================================
- Coverage       46.8%   46.78%   -0.03%
- Complexity      4015     4017       +2
=============================================
  Files            453      453
  Lines          22156    22160       +4
  Branches        2513     2513
=============================================
- Hits           10371    10367       -4
- Misses         11174    11184      +10
+ Partials         611      609       -2

Impacted Files
Coverage Δ
Complexity Δ

...main/java/com/smartdevicelink/proxy/rpc/Alert.java
100% <100%> (ø)
20 <2> (+2)
:arrow_up:

...martdevicelink/proxy/rpc/enums/ImageFieldName.java
100% <100%> (ø)
2 <0> (ø)
:arrow_down:

...smartdevicelink/encoder/VirtualDisplayEncoder.java
24.43% <0%> (-4.55%)
8% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95b0b1b...7670e94. Read the comment docs.


[protopuf] Update to 2.2.0

Describe the pull request

What does your PR fix?
Update protopuf to 2.2.0

Which triplets are supported/not supported? Have you updated the CI baseline?
All, Not required

Does your PR follow the maintainer guide?

Yes

Thanks for the update!


Bootswatch 3 Solar theme is 404

@thomaspark: did you remove that?

@XhmikosR, yes, Solar was not included in an official release for v3.

You mean in the last release because it was definitely there.
@jmervine how do you want to proceed?

Closing since the new 3.4.1 version won't have this. Though I still don't get how we have the files in the first place...


ng-repeat fired on hover

Is this normal behavior? Can this be avoided?
https://s3.amazonaws.com/uploads.hipchat.com/136601/989834/HHK0VvyS3TIArW4/select2-loop.gif
Plunker:
http://plnkr.co/edit/CvHxWZzv6V7XK368cZF3?p=preview

Related to https://github.com/angular-ui/ui-select/pull/1211


ControlNet error

[ControlNet] warning: using deprecated '/controlnet/img2img' route
[ControlNet] warning: consider using the '/sdapi/v1/img2img' route with the 'alwayson_scripts' json property instead
Error running process: C:\Users\Utilisateur\Downloads\AUTOMATIC1111_test\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py
Traceback (most recent call last):
File "C:\Users\Utilisateur\Downloads\AUTOMATIC1111_test\stable-diffusion-webui\modules\scripts.py", line 417, in process
script.process(p, *script_args)
File "C:\Users\Utilisateur\Downloads\AUTOMATIC1111_test\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 791, in process
unit = self.parse_remote_call(p, unit, idx)
File "C:\Users\Utilisateur\Downloads\AUTOMATIC1111_test\stable-diffusion-webui\extensions\sd-webui-controlnet\scripts\controlnet.py", line 634, in parse_remote_call
unit.enabled = selector(p, "control_net_enabled", unit.enabled, idx, strict=True)
AttributeError: 'str' object has no attribute 'enabled'

Any idea?

I'm having the exact same issue, thought it was because I was using older ControlNet, but I just updated everything and all the models and it's giving same error.

See #242 and maybe it is a solution.

Disabling multi-ControlNet fixes the issue. I tried whatever this was https://github.com/AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin/pull/242 but it didn't do anything.


use with NeMo or Wav2Vec

Thanks for this great lib.
Can we use it with Wav2Vec or NeMo for online streaming?

No, this is just a webassembly build of the awesome vosk-api library, which only supports Kaldi nnet3 models.


Remove tier4_ad_api_adaptor

Checklist

[X] I've read the contribution guidelines.
[X] I've searched other issues and no duplicate issues were found.
[X] I've agreed with the maintainers that I can plan this task.

Description
Currently, tier4_ad_api_adaptor is imported as a sample API. However, it is now possible to drive the vehicle even with the newly introduced AD API. It's confusing to have two API examples, so I plan to remove tier4_ad_api_adaptor.
Purpose
Unify API samples to default_ad_api.
Possible approaches

Replace code that uses tier4_ad_api_adaptor with default_ad_api.
Remove tier4_ad_api_adaptor from autoware.repos.

Definition of done
Remove tier4_ad_api_adaptor from autoware.repos

Hello @isamu-takagi -san,
https://github.com/autowarefoundation/autoware/blob/c9c4546705bc5a3ef4ebaff0cd151e32b1a5b16b/autoware.repos#L28-L31
Since this comment is present, I guess this issue is still relevant.
Is there a timeline for this issue to be completed? (Is this low priority?)
Could you provide a list of packages to be modified/refactored to achieve this task?

@xmfcx RTC has not been deleted yet.
This will be completed by migrating to this API. I'm currently implementing this API.
https://autowarefoundation.github.io/autoware-documentation/main/design/autoware-interfaces/ad-api/features/cooperation/

@isamu-takagi thanks for the information.
I couldn't find Cooperation API in the default_ad_api.

I'm currently implementing this API.

Is it being implemented into the default_ad_api package?
Are there ongoing PRs for this task?

There are no PRs for AD API yet. I'm currently changing the implementation to match the API.
https://github.com/autowarefoundation/autoware.universe/pull/5590


Fix an error when fn===undefined

This change fixes an error that occurs when reporter is 'xunit' and run is called without callback: " /rbd/pnpm-volume/a49b9a7c-c3f0-42ba-ae66-612ead86e96c/node_modules/.registry.npmjs.org/mocha/5.2.0/node_modules/mocha/lib/reporters/xunit.js:126
fn(failures);  ^
TypeError: fn is not a function "
Requirements

Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
All new code requires tests to ensure against regressions.

Description of the Change

Alternate Designs

Why should this be in core?

Benefits

Possible Drawbacks

Applicable issues

Coverage increased (+0.09%) to 90.588% when pulling 1e08057d2b7924b5b9f167ae15ea8175403252b1 on Lana-Light:patch-1 into 9f02180f1c87cdcb0050c5e2f7b8c74911606435 on mochajs:master.

Hi! Here is link to the project, where this bug occurs. Also there is function run2, which fixes the bug. https://glitch.com/edit/#!/test-function-run?path=server.js:17:0 . When I use mocha.ui('tdd').reporter('xunit').run(function() {}); or mocha.run2 = run2; mocha.ui('tdd').reporter('xunit').run2(); it works, but if mocha.ui('tdd').reporter('xunit').run(); it throws an error. This code if (reporter.done) {       reporter.done(failures, fn);     } attemts to call fn even if it is undefined and cause this error in console

The line you've changed isn't the problematic line in your screenshot...

OK, I understand. Can you please add a test for this?

I have added a test #3620 .

@Lana-Light The lint check is failing.  Did you happen to make these changes directly on GitHub?
After cloning the repo and running npm install, when you commit, your code will automatically be formatted to avoid this problem.
See the step-by-step guide for more info.

@Lana-Light Yes.  It's best practice to do this, as most projects (including this one) ask that you run tests on your changes before sending a PR.  Additionally, Mocha has tooling which will automatically format your code correctly upon commit, which is not invoked when committing on GitHub.
Making changes on GitHub directly should rarely be used for anything other than documentation updates.

LGTM, thanks!


Minimum voltage [V]

Helllo，
Lower voltage cut-off [V]': 2.5  of ParameterValues("Chen2020"). But I can discharge under 1C for 1 hour, the voltage can drop below 2.5 V, indicating that the cut-off voltage here did not work, when I adjusted 1 hour to 2 hours, the results prompted me Experiment is infeasible: 'event: Minimum voltage [V]' was triggered during 'Discharge at 1C for 2 hour'. The returned solution only contains up to step 1 of cycle 1. Where should I look for Minimum voltage [V]?
This is my code
import pybamm
experiment = pybamm.step.string("Discharge at 1C for 1 hour", period = "0.1 minute", temperature = "25oC", tags = ["tag1"])
parameter_values = pybamm.ParameterValues("Chen2020")
model = pybamm.lithium_ion.DFN()
sim = pybamm.Simulation(model, parameter_values = parameter_values, experiment = experiment)
sim.solve()
sim.plot()

You can put the voltage cut off in the experiment, e.g.“Discharge at 1C for 1 hour or until 2.5V”.
To find the minimum voltage just look for that key in the parameter dictionary or do a search, e.g. parameter_values.search(“voltage”).

Thank you for your answer. I know Experiment can complete this operation, but I want to use the parameters inside to automatically stop. If the discharge does not stop when the cut-off voltage or 0% SOC is reached, what is the significance of this parameter? I couldn't find the minimum voltage through searching, it's not in the parameter table of "chen2020". Based on operation, it's probably around 1.5V.

When I try to change the parameters in the table，parameter_values["Open-circuit voltage at 100% SOC [V]"] =
parameter_values["Open-circuit voltage at 0% SOC [V]"] = ，When changing the cut-off voltage of 100% SOC, there will be a change in the output, while when changing the 0% SOC, there will be no change in the output, regardless of how it is changed, even if it is 0. So I hope you can give me a reason.
Thank you so much

The parameter is "Lower cut-off voltage [V]". Use that parameter to explicitly define the minimum voltage in your experiment based on the parameter set.

Thank you very much for your answer！


chore: Bump release-v0.32.x to latest karpenter-core

Fixes #N/A
Description
How was this change tested?
Does this change impact docs?

[ ] Yes, PR includes docs updates
[ ] Yes, issue opened: #
[x] No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 82.409%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
6198

Relevant Lines:
7521

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 82.409%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
6198

Relevant Lines:
7521

💛  - Coveralls


Proposed approach to handling MM import

So this is what I'm proposing to deal with import from the MM. Hopefully fairly unintrusive. It seems to work ok, but as I mentioned there are occasional oddnesses with some toggles not being set quite properly. Perhaps because more stuff is being set all in one go at the beginning and it's triggering things in a slightly different order as a result?
Anyway let me know what you think - although I'm off to bed now so i won't respond this evening...

I don't think requiring the sheet to close and then reopen is a good user experience. Picture a user importing spells. he'd have to import all the spells and then close and reopen the sheet. Or creating a new npc. You'd have to first create the npc and then attach an avatar and t hen close the sheet and then run the command and then open the sheet and then adjust the avatar.
Not would a button click really help this experience much.
This is inherently the problem - if API can't trigger sheetworkers then there is no way to do it automatically right away that I can think of.
I would highly recommend making a bug report and getting an official word from Roll20 because they can't expect sheets to handle this.

Ok, I will try, but as I pointed out in our conversation on Roll20, Riley has already publicly stated that the limitation is deliberate and has outlined a longer-term plan that involves running a copy of the sheet workers on the API server. I think it's extremely unlikely that the appearance of a bug report on an issue that has already been extensively discussed is going to suddenly make them drop what they're doing and change this.
I've invested quite a lot of time in the import script and I'd be... disappointed... to say the least... to see the functionality shelved for months while we wait for a change like this. I agree that the experience isn't ideal but it's better than nothing, which is the current alternative. The impact of the change on the sheet and the sheet-workers is minimal as well, so it's not like it's a huge maintenance issue to have this code in their while we wait for Roll20 to sort this out.
Also, the new NPC import experience is fine - which is one of the major use cases:

Create token
Paste in GM notes text
select token
run !shaped-import
open the newly-created character

Which is exactly what I did with the old import anyway! Granted, spell import won't work nicely without a refresh button, and the experience for updating a character will be worse; but I think there are people out there who are waiting on the MM import functionality who would be pleased to have something that works rather than us delivering nothing at all because it doesn't work quite the way we'd like it to.

For reference, here is the most useful discussion including Riley's response:

https://app.roll20.net/forum/post/2872260/sheetworkers-how-to-react-to-roll-buttons-abilities-and-skills/?pageforid=2877195#post-2877195

More recently, I raised exactly this issue on the Pro forum and explicitly asked for a Roll20 response on the future plans - no response -

https://app.roll20.net/forum/post/3040799/future-plans-for-api-slash-sheet-workers/?pageforid=3040799#post-3040799

And another:

https://app.roll20.net/forum/post/2766747/api-and-sheet-workers

I really don't think that we're going to get rapid movement on this one

As requested:

https://app.roll20.net/forum/post/3123549/api-changes-dont-trigger-sheet-workers/
https://app.roll20.net/forum/post/3123561/incorrect-change-events-firing-for-sheet-workers/

This looks fine on second look. I shouldn't look at pull requests late at night. :P
As you say the process is the same as before:

Create token
Paste in GM notes text
select token
run !shaped-import
open the newly-created character

We'll likely have to do some kind of button for spells - perhaps below the spells area.


[BUG] Workload cannot recover after tainting node

To Reproduce
Steps to reproduce the behavior:

Install Longhorn v1.1.1-rc2 in a cluster of 3 worker nodes
Create a deployment that use a Longhorn RWX/RWO volume of 3 replicas
Find the node where the volume is attaching to, let's call node-1
Taint node-1 with k=v:NoExecute
Longhorn cannot reattach volume -> workload cannot restart

Expected behavior
Longhorn is able to reattach the volume to new nodes
Additional context

The YAML of the RWX volume shows that v.Spec.NodeID: phan-v51-worker-3 but volume cannot attach to node-3 because v.PendingNodeID: phan-v51-worker-1
This is not a common use case. We can wait to see the response from the users.

Workaround:

Remove the taint
Scale down the workload
Add the taint
Scale back the workload

needs the volume controller refactor, where the pending node id is removed and all attachment decisions are based on v.spec.NodeID and v.status.CurrentNodeID is only set once the volume is fully attached/detached to reflect the actual state #1310

A bunch of nodes went unresponsive and got tainted and terminated, most pods rescheduled to new nodes eventually. But some ended up in this state where PendingNodeID is pointing to a node that doesn't exist anymore. Now they're stuck and can't be attached to the new node.

I hit this exact scenario recently on 1.4.2 as a result of an infrastructure issue that resulted in one of the nodes in my cluster being replaced after a period of time.  The LHVs had a pendingNodeID in the status that was no longer valid, and this seemed to block the volume being rescheduled elsewhere with the same errors shown above.
There is a workaround for this, but it involved editing etc directly.  For anyone else that stumbles across this, here are the steps:
First, retrieve the key for the LHV:
etcdctl get --prefix=true /registry/longhorn.io/volumes/longhorn-system/pvc-9af78444-1609-4989-aeb8-e83f73575bf9

Amend the JSON object and remove the values for the .status.pendingNodeID and .status.ownerID, leaving them empty, i.e:
        "ownerID": "",
        "pendingNodeID": "",

Now update that key in etcd:
etcdctl put /registry/longhorn.io/volumes/longhorn-system/pvc-9af78444-1609-4989-aeb8-e83f73575bf9 \
'{ "apiVersion": "longhorn.io/v1beta2" [..]

You don't need to restart anything, after a few seconds if you're watching the UI you should see the status of the volume being updated along with replicas etc.  At that point you can detach / reattach to valid hosts in your cluster.

@yangchiu Can you help verify if the issue is valid? Thank you.

@yangchiu Can you help verify if the issue is valid? Thank you.

Yes, it's still a valid issue. Following the test steps, after tainted the attached node ip-10-0-1-109, the volume got stuck in attaching forever with the following status:
spec:
  nodeID: ip-10-0-1-109
status:
  ownerID: ip-10-0-1-127
  pendingNodeID: ""

And the workload got stuck in Terminating and ContainerCreating unable to recover:
$ kubectl get pods -w -owide
NAME                                  READY   STATUS              RESTARTS   AGE     IP           NODE            NOMINATED NODE   READINESS GATES
longhorn-test-minio-7d5979494-j9wf6   1/1     Running             0          16m     <IP_ADDRESS>    ip-10-0-1-35    <none>           <none>
longhorn-test-nfs-6cf649d7fb-vcr2z    1/1     Running             0          16m     <IP_ADDRESS>    ip-10-0-1-35    <none>           <none>
mysql-2-6dfc4fdd7b-xwwzs              0/1     Terminating         0          9m23s   <IP_ADDRESS>   ip-10-0-1-109   <none>           <none>
mysql-2-6dfc4fdd7b-dmxxj              0/1     ContainerCreating   0          6m4s    <none>       ip-10-0-1-35    <none>           <none>

supportbundle_4d8b32af-9537-4bab-a4aa-f5f8b6a45e74_2024-06-28T02-06-07Z.zip

Thanks, I will look at this one soon.

In 2024 on master-head (approaching v1.7.0), the behavior observed by @yangchiu is no longer related to pendingNodeID etc., as Longhorn's attachment logic has completely changed. That field is completely deprecated in favor of a volume attachment controller to choose which node to attach to based on the current desired state of the world.
Today, after following the test steps, we are in the following situation:
There is one Terminating pod and one ContainerCreating pod.
mysql-56c8c6775b-8f5gh                 0/1     Terminating         0                30m    <IP_ADDRESS>        eweber-v126-worker-9c1451b4-kgxdq   <none>           <none>
mysql-56c8c6775b-rph8k                 0/1     ContainerCreating   0                28m    <none>            eweber-v126-worker-9c1451b4-rw5hf   <none>           <none>

The ContainerCreating pod cannot make progress because of a Multi-Attach error.
Warning  FailedAttachVolume  27m   attachdetach-controller  Multi-Attach error for volume "pvc-b23fce3b-cada-43a9-89b8-2eb9b97e39c9" Volume is already exclusively attached to one node and can't be attached to another

In fact, Kubernetes still WANTS the volume attached to the old node. There is only one VolumeAttachment for it.
csi-f1a6eae2f691ad48e39aca528454c64f7c46a3e6c446e6f9a8ecd960895bf0b6   driver.longhorn.io   pvc-b23fce3b-cada-43a9-89b8-2eb9b97e39c9   eweber-v126-worker-9c1451b4-kgxdq   true       31m

As a result, there is only one LonghornAttachmentTicket for the old node. Longhorn is trying to reattach the volume to the old node, but it is impossible (since all of the Longhorn components on the old node are down).
spec:
    attachmentTickets:
      csi-f1a6eae2f691ad48e39aca528454c64f7c46a3e6c446e6f9a8ecd960895bf0b6:
        generation: 0
        id: csi-f1a6eae2f691ad48e39aca528454c64f7c46a3e6c446e6f9a8ecd960895bf0b6
        nodeID: eweber-v126-worker-9c1451b4-kgxdq
        parameters:
          disableFrontend: "false"
          lastAttachedBy: ""
        type: csi-attacher
    volume: pvc-b23fce3b-cada-43a9-89b8-2eb9b97e39c9
  status:
    attachmentTicketStatuses:
      csi-f1a6eae2f691ad48e39aca528454c64f7c46a3e6c446e6f9a8ecd960895bf0b6:
        conditions:
        - lastProbeTime: ""
          lastTransitionTime: "2024-06-28T20:05:58Z"
          message: ""
          reason: ""
          status: "False"
          type: Satisfied
        generation: 0
        id: csi-f1a6eae2f691ad48e39aca528454c64f7c46a3e6c446e6f9a8ecd960895bf0b6
        satisfied: false

Longhorn is working correctly. Until Kubernetes tries to detach the volume from the old node, it should continually attempt to reattach it.
The reason we are stuck is found in the kubelet logs on the old node.
Jun 28 20:40:37 eweber-v126-worker-9c1451b4-kgxdq k3s[753]: I0628 20:40:37.391775     753 reconciler_common.go:172] "operationExecutor.UnmountVolume started for volume \"mysql-volume\" (UniqueName: \"kubernetes.io/csi/driver.longhorn.io^pvc-b23fce3b-cada-43a9-89b8-2eb9b97e39c9\") pod \"942ef69b-2e06-47f3-8bac-cc738c8baa00\" (UID: \"942ef69b-2e06-47f3-8bac-cc738c8baa00\") "
Jun 28 20:40:37 eweber-v126-worker-9c1451b4-kgxdq k3s[753]: E0628 20:40:37.391968     753 nestedpendingoperations.go:348] Operation for "{volumeName:kubernetes.io/csi/driver.longhorn.io^pvc-b23fce3b-cada-43a9-89b8-2eb9b97e39c9 podName:942ef69b-2e06-47f3-8bac-cc738c8baa00 nodeName:}" failed. No retries permitted until 2024-06-28 20:42:39.391919153 +0000 UTC m=+10744.364754873 (durationBeforeRetry 2m2s). Error: UnmountVolume.TearDown failed for volume "mysql-volume" (UniqueName: "kubernetes.io/csi/driver.longhorn.io^pvc-b23fce3b-cada-43a9-89b8-2eb9b97e39c9") pod "942ef69b-2e06-47f3-8bac-cc738c8baa00" (UID: "942ef69b-2e06-47f3-8bac-cc738c8baa00") : kubernetes.io/csi: Unmounter.TearDownAt failed to get CSI client: driver name driver.longhorn.io not found in the list of registered CSI drivers

Kubernetes can't tear down the pod because the CSI plugin is not running on the node to respond to NodeUnpublishVolume and NodeUnstageVolume commands.
We need to consider whether the CSI plugin should be able to tolerate a NoExecute taint. If no, then there's really no way we can expect to make progress.

In fact, I could not reproduce the described behavior on either master-head or in v1.4.x. In both versions (running on Kubernetes v1.28.9 and v1.24.17 respectively):

When the Longhorn components are NOT configured to tolerate the taint we apply, we get stuck in the way I described in https://github.com/longhorn/longhorn/issues/2517#issuecomment-2197639336 and @yangchiu described above that. TBH, I don't really understand how this would not have been the case in the original report (https://github.com/longhorn/longhorn/issues/2517#issue-863269633), since kubelet will not complete pod teardown without contacting the CSI driver on the node. Maybe some older version of Kubernetes behaved differently? I know it was a really long time ago, @PhanLe1010, but do you have any insight on this?
When the Longhorn components ARE configured to tolerate the taint we apply, there is no issue. The old pod terminates and the new pod starts on another node.

I would certainly like to allow the workload to move to a new node when a NoExecute taint is applied, but I don't see any way forward if the NoExecute taint also applies to the Longhorn components. The user should not apply a taint that Longhorn can't tolerate and expect Kubernetes to successfully tear down and recreate pods that use Longhorn volumes.
While both @yankcrime and @excieve are describing valid issues we've seen in the past, I think they are more generically related to the class of strange behaviors that prompted https://github.com/longhorn/longhorn/issues/3715 (and which have generally been fixed by it). If there is some version of the NoExecute taint reproduce steps that can lead to a pendingNodeID issue, its behavior is definitely different after v1.5.0.
Based on my investigation, I think we should close this issue out directly. WDYT @derekbit, @yangchiu, @PhanLe1010?

Discussed with @PhanLe1010, @shuo-wu, @PhanLe1010.
We concluded that (modern) kubelet MUST be able to communicate with a running CSI plugin pod on its node in order to make progress. Unless the CSI plugin pod can tolerate the applied taint, there should be no expectation that kubelet can tear down (unpublish and unstage volumes) the old pod. It is expected that this blocks the CSI flow.
Users may choose to set Longhorn taint tolerations (for both user and system deployed components) to tolerate whatever taints they expect to apply before applying them (preferably at install time). If the user finds themselves in stuck in this situation, they have two options:

Remove the NoExecute taint. Use a combination of a NoSchedule taint and manual pod deletion to move workloads off the node while allowing the CSI plugin to run.
Detach all volumes and update the Longhorn taint toleration settings.

I will write a KB to this effect.

I agree with the investigation from @ejweber !

Remove the NoExecute taint. Use a combination of a NoSchedule taint and manual pod deletion to move workloads off the node while allowing the CSI plugin to run.

Maybe the user can drain the node before adding the NoExecute taint?

Verified pass on longhorn master(623884)

Best practices and workaround worked well without any problems
I can successfully drain volume attached node then taint that node. After remove taint and uncordon the node, volume become healthy.


Show Discarded Pile

close with commit https://github.com/sopra-fs23-group-37/client/commit/d22aa689cf53b8dc440ebc32739654613cb7e62f


Make the current scope available for stubbing everywhere

From the discussion in #108: it is necessary to have access to the compiling scope in all example groups, as in https://github.com/rodjek/rspec-puppet/commit/d3f737e0e7e28c6e1a942b06d432f060bf9d51d8

Indeed.  I'd like to be able to express a spec along the lines of:
        it 'should be deprecated' do
          scope.expects(:warning).with('... is deprecated.')
          ...
        end

+1
Want to test for certain situations where it leads to warnings instead of failures.

@DavidS any progress on this by any chance? :-)

This is - sadly - still a side^3 project for me.

Any chance of this getting addressed anytime soon?
I ran into multiple cases where this would have been useful.

@smu-ggl my comment from last year still applies. Sadly. The most I can currently invest is reviewing code.

@rodjek looks like this was briefly added to a milestone, but then removed. Any update on this?

Resurrecting the thread!
Here's how I'm doing it currently:
let(:pre_condition) do
  # Mask `warning` for testing
  <<~PRE_CONDITION
  function warning($message) { notify { 'warning_test': message => $message } }
  PRE_CONDITION
end


Overriding VERSION_ID in /etc/os-release causes tce-load mirror URL to break

It looks like the Dockerfile build overrides VERSION_ID in /etc/os-release.  This is used by the getMirror function in /etc/init.d/tc-functions to find the MIRROR URL.
As a result, any tce-load or tce install command will fail with 404 error, because the 20.10.11 Boot2Docker version does not match the current repo mirror URL for Tiny Core Linux version (12.0 => 12.x):  http://repo.tinycorelinux.net/12.x/x86_64/tcz/
Example:
tce-load -wi python
Downloading: python.tcz
Connecting to repo.tinycorelinux.net (<IP_ADDRESS>:80)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: python.tcz.md5.txt: No such file or directory
Error on python.tcz

Workaround
Replace the VERSION_ID with current TCL version: 12.0:
sudo /bin/sed -i'' -e 's/VERSION_ID=.*/VERSION_ID=12.0/'  /etc/os-release

Now tce-load works again:
tce-load -wi python'
python.tcz.dep OK
readline.tcz.dep OK
[...SNIP...] # Lots of dependencies here...
Downloading: python.tcz
Connecting to repo.tinycorelinux.net (<IP_ADDRESS>:80)
saving to 'python.tcz'
python.tcz             1% |                                |  145k  0:01:16 ETA
[...SNIP...]
python.tcz            83% |**************************      | 9399k  0:00:01 ETA
python.tcz           100% |********************************| 10.9M  0:00:00 ETA
'python.tcz' saved
python.tcz: OK

Debugging
To check the resulting MIRROR url:
. /etc/init.d/tc-functions ; set -x; getMirror ; set +x

Output:
+ getMirror
+ BUILD=
+ '[' -z '' ']'
++ getBuild
+++ uname -m
++ BUILD=x86_64
++ case ${BUILD} in
++ '[' -f /lib/ld-linux-x86-64.so.2 ']'
++ echo x86_64
+ BUILD=x86_64
+ read MIRROR
++ getMajorVer
+++ getFullVer
++++ grep '^VERSION_ID=' /etc/os-release
+++ verid=VERSION_ID=12.0
+++ echo 12.0
++ fullver=12.0
++ echo 12
+ MIRROR=http://repo.tinycorelinux.net/12.x/x86_64/tcz
+ set +x

Thank you for the issue, I never use tce-load in the image . . .😅
After some researching, I assumed that VERSION_ID only impacts /etc/init.d/tc-functions.
v20.10.12-rc1 fixed the issue by patching /etc/init.d/tc-functions.
Please let me know if this fixes the issue and won't cause side effect in your scenario.

It's my fault that didn't notice your PR #38.
I'd like to keep VERSION_ID and VERSION are related, let me know your thought.

@silver886  My apologies for not replying sooner! (busy with work)
I was able to find some time to test this, and it does fix the issue!  Tested with:
BOOT2DOCKER_URL='https://github.com/silver886/boot2docker/releases/download/v20.10.12-rc1/boot2docker.iso'

 docker-machine create --driver virtualbox \
   --virtualbox-boot2docker-url "$BOOT2DOCKER_URL" \
   --virtualbox-hostonly-cidr "<IP_ADDRESS>/21" \
   dm-test

DOCKER_MACHINE_NAME=$(docker-machine active 2>/dev/null)
[ -z $DOCKER_MACHINE_NAME ] && DOCKER_MACHINE_NAME=$(docker-machine active | head -n1)
[ -z $DOCKER_MACHINE_NAME ] && errorout "Cannot find active docker-machine name... make sure the VM is running"

eval $(docker-machine env $DOCKER_MACHINE_NAME)

docker-machine ssh $DOCKER_MACHINE_NAME  'tce-load -wi ntpclient.tcz'

Installed new boot2docker.iso, started the VM, and loaded the ntpclient.tcz package successfully!
Thanks for fixing this issue!


Disable tab indentation detection based on extension

editor.detectIndentation detects whether to use tabs or spaces for indentation based on the contents of the document - which is nice and what I want.
What isn't so nice is it also seems to decide which indentation char to use based on the file extension.
A .yaml file, for instance, will default to spaces if editor.insertSpaces is disabled, even in an empty document.
I assume there's some sorta mapping along the lines of "if .java or .js use tabs, if .yaml use spaces," and that mapping ignores whether editor.insertSpaces is enabled or not.
I think it either shouldn't ignore it (i.e. if editor.insertSpaces is disabled, use tabs in all empty documents) or be configurable.
TLDR I want indentation detected based on contents, not contents and extension.

By default, VS Code configures the following special settings for the yaml language:
  // Configure settings to be overridden for the yaml language.
  "[yaml]":  {
    "editor.insertSpaces": true,
    "editor.tabSize": 2,
    "editor.autoIndent": "advanced"
  }

You can override these in your user settings or workspace settings using the language selector e.g:
  // Configure settings to be overridden for the yaml language.
  "[yaml]":  {
    "editor.insertSpaces": false,
    "editor.tabSize": 4,
    "editor.autoIndent": "advanced"
  }

The upcoming VS Code version will improve the settings UI around language specific settings. In the case of editor.insertSpaces, it will now show that, by default, some languages are configured differently:


The agent reports docker process samples when enable_process_metrics: false

Description
We have noticed that on new default behavior of filtered process samples, the process samples for docker are still reported.
To reproduce install an agent to monitor an environment with docker(add at least one container) and disable process metrics:
enable_process_metrics: false

Note you should still be able to disable process samples when running on docker using the metrics_process_sample_rate: -1 setting in the infra-agent.

We also noticed that the "include_matching_metrics" setting was not being applied against docker processes when running the containerized agent.
The linked fix aims to solve both scenarios: enable_process_metrics and include_matching_metrics.


(bug): Its not possible to use helm built-in objects in jsonPatches and strategicMergePatches

Its not possible to use helm built-in objects in jsonPatches and strategicMergePatches
  jsonPatches:
  - target:
      version: apps/v1
      kind: DaemonSet
      name: {{`{{ .Release.Name }}`}}
      namespace: {{`{{ .Release.Namespace }}`}}
    patch:
    - op: add
      path: /metadata/annotations/foo
      value: bar

reading document at index 1: yaml: invalid map key: map[interface {}]interface {}{".Release.Name":interface {}(nil)}

helmfile version v0.125.7

This isn't bug but rather a feature request :)


Issues with the animate command

When i use  /ex animate <player> sit
I get the following error http://mcmonkey.org/paste/18005
I also can't use lshift to dismount
When I use /ex animate <player> stop_sitting
It teleports me over 8000 blocks up in the air
It would also be nice to use a location for animate sit because otherwise you would always fly in the air

Is this still a problem?

Hey Morphan, thanks for asking, almost forgot about it.
Tested it now: The error is gone and when i make stop_sitting the player can move again.
I don't know if this is an issue but I like the way it works: When I make players sit, they can't stand up on their own with shift.


Fix out of bounds with RPi5 extra pwm channels

Our project happened to switch a Raspberry Pi 5 and our hardware PWM stopped working. It seems that there is an out of bounds panic when indexing into the pwm_channels array when using the Channel enum. The 4 channel support was added yesterday. However now the Channel index can go out of bounds. This makes pwm_channels a [u8; 4]. And when older Pi models attempt to use Channel 2 and 3, they default to 0 and 1 again.
This definitely needs iteration, but I added a temporary fix so we can iterate on it.

Thanks for the PR. However, for now I'm going to revert the number of channels back to 2 and rethink how best to handle this in a future update, so this temporary fix won't be needed. I'm planning on releasing the 0.21.0 update soon to add support for the new Pi devices, and don't want it held back by PWM-related issues.
I would also recommend only working with stable releases, as the master branch is what I use for development and may include features that haven't been fully implemented yet.

We Channel::Pwm0 and Pwm1 on a RPi 5, but they get forced to file 2 and 3 based on the hardcoded DeviceInfo pwm_channels on the latest release, so I figured I'd try yesterdays patch. But I'll use my fork until 0.22.0 then. Thank you for your hard work, we've been loving your project. Let me know if I can be of any help.

We Channel::Pwm0 and Pwm1 on a RPi 5, but they get forced to file 2 and 3 based on the hardcoded DeviceInfo pwm_channels on the latest release

Those are the correct values on a Pi 5 for PWM0 and PWM1, unless something changed in a new Raspberry Pi OS release or you have a different configuration. See this post on the Raspberry Pi forum.

We use dtoverlay=pwm-2chan,pin=12,func=4,pin2=13,func2=4 which should be a pretty common setup. It maps the channels to files 0 and 1, but currently 2 and 3 are forced on rpi5

Thanks for pointing this out. I ran some tests and came across the same problem.
It looks like this was changed in 0.18.0 after an issue was discovered on the Pi 5 related to using the incorrect pwmchip and channel ID. However, it was only corrected for GPIO18 and GPIO19.
I'll tackle this in the next release.

The issue has been fixed in the current development build, and works correctly on both a Pi 5 and older models for all 4 standard GPIO pins, with a new with_pwmchip method for nonstandard configurations. This also reintroduces the additional two PWM channels as required for the Pi 5.


[New game]: Fidget Spinner

🎮 Game Request
Game logic and basic description
The logic of the game is that the turns will keep increasing as you press the space bar, and it will reduce its speed and stop at a point where you stop pressing the space bar
Point down the features
Game points
We use tkinter for this
Select program in which you are contributing
GSSoC24
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @Gamerking177 !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

Hey @Gamerking177!
We are already having a similar game request in #4119 👀
Make sure you come up with a cool unique idea 😀
Waiting for your new game idea 💗.

Hey @Gamerking177 ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇


What's the meaning of wtf flow ?

Version
2.6.11
Reproduction link
https://github.com/vuejs/vue/blob/0551226f8bf0884e31bb686b7116b60f1eaf77e6/src/core/instance/lifecycle.js#L270
Steps to reproduce
I found wtf flow on the source code at line:
https://github.com/vuejs/vue/blob/0551226f8bf0884e31bb686b7116b60f1eaf77e6/src/core/instance/lifecycle.js#L270
What is expected?
https://github.com/vuejs/vue/blob/0551226f8bf0884e31bb686b7116b60f1eaf77e6/src/core/instance/lifecycle.js#L270
What is actually happening?
https://github.com/vuejs/vue/blob/0551226f8bf0884e31bb686b7116b60f1eaf77e6/src/core/instance/lifecycle.js#L270

I found wtf flow on the source code at line:
https://github.com/vuejs/vue/blob/0551226f8bf0884e31bb686b7116b60f1eaf77e6/src/core/instance/lifecycle.js#L270

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server, gitter or StackOverflow.


Create GitHub Page

References #118
Create a github page for GoVizzy, in accordance with provided specifications.

[t:60]
Spent time researching templates, first draft done.

Page done, PR up.
[t:30]