Packets 1.8

1.8 support in here !
What needs to be done :

Client has been entirely untested right now.
Server is somewhat tested, I know that server_helloworld.js works.
Need to check if unit tests pass
And obviously, need to add acknowledgements in the README : big thanks to @wtfaremyinitials

I'll go through the things for the PR to be complete tomorrow (checking the unit tests and examples, and finishing the readme). If everything works flawlessly, I'll pull the PR and create a new version on NPM

I'll go through the things for the PR to be complete tomorrow (checking the unit tests and examples, and finishing the readme). If everything works flawlessly, I'll pull the PR and create a new version on NPM

Awesome

Awesome

It seems that the client side is completely broken. From what I've gathered, it looks like it never transitions from the login state to the play state. Where is this supposed to happen? (@roblabla)

https://github.com/andrewrk/node-minecraft-protocol/blob/master/index.js#L336 there ?

var mc = require('../')
  , states = mc.protocol.states

var client = mc.createClient({
  username: 'Player'
});
client.on('connect', function() {
  console.info('connected');
  console.log(client.state);
});

$ node examples/client_echo.js
connected
login

That's half-normal. The "connect" event is emitted when the client actually completes a connection with the server, before any packets is sent.  What you should do is listen for the 'state' event, which is emitted each time there is a state change. That should give you more conclusive evidence. Also, you should run the client with NODE_DEBUG=mc-proto node examples/client_echo.js. This will give you a lot of useful information about which packets are read and written.

$ NODE_DEBUG=mc-proto node examples/client_echo.js
MC-PROTO: 43473 Old-styling packet
MC-PROTO: 43473 writing packetId handshaking.set_protocol (0x0)
MC-PROTO: 43473 { protocolVersion: 47,
  serverHost: 'localhost',
  serverPort: 25565,
  nextState: 2 }
MC-PROTO: 43473 <Buffer 0f 00 2f 09 6c 6f 63 61 6c 68 6f 73 74 63 dd 02>
login
MC-PROTO: 43473 Old-styling packet
MC-PROTO: 43473 writing packetId login.login_start (0x0)
MC-PROTO: 43473 { username: 'Player' }
MC-PROTO: 43473 <Buffer 08 00 06 50 6c 61 79 65 72>
MC-PROTO: 43473 read packetId login.compress (0x3)
MC-PROTO: 43473 { id: 3, threshold: 256 }

node cleanly exits after reading the 0x03 login compression packet.

Just confirmed, onLogin never gets called.

Just confirmed, onLogin never gets called.

Looks like reading compressed packets never got implemented, so everything after 0x03 (set compression) gets dropped. Since 0x02 (login) is sent after 0x03, the login is never received.

I guess parsePacket needs to become async, unless we find a lib that has sync zlib.

@wtfaremyinitials We shouldn't try to make it sync if it involves IO. Making it async shouldn't be too much work anyway.

@roblabla The parse function is in a while loop, so making it work asynchronously will break almost everything. I agree though, we should try to make it async.

My async parseNewStylePacket is pushed to packets-1.8. I have to go right now, but you're welcome to finish that off.

Doesn't really matter too much that it's in a while loop, all we need to do is make the function call itself again in the callback until we meet a terminal condition, effectively turning the whole thing recursive.

I just finished turning the whole thing recursive, but it seems to not work properly. The client connects, doesn't fire any chat events, then cleanly exits after about 10 seconds. (packets-1.8)

Did you ever figure this out? @roblabla

Well, I'm almost done, but the damn thing is entering an infinite recursion and leaking memory until it ooms my machine. Then stuff happened and I sorta never found the time to do this. I'll take a look right now.

OK, so either nodejs has a bug, or I'm going crazy. The code :
   var dataLengthField = readVarInt(buffer, cursor);
   cursor += dataLengthField.size;
   console.log("Got here");
   if(dataLengthField.value != 0) {
     zlib.inflateRaw(buffer.slice(cursor, cursor + dataLengthField.value), function(err, buffer) {
       if (err) console.log(err);
       else console.log("Got a packet v2");
       cursor = 0;
       finishParsing(buffer);
     });
   } else {
     console.log("Got a packet v1");
     finishParsing(buffer);
   }

This code prints "Got Here", but never prints anything else... No error, nothing...

Well I debugged that one. Now, for some reason, crypto.randomBytes never calls my callback. I'm going from hurdle to hurdle here.

Huh that's odd. Can you push a version to roblabla/node-minecraft-protocol that has this issue? I'd be happy to look at it.

@wtfaremyinitials Done. looking at the results of the top command, it looks like the code enters an infinite loop or something, cpu goes to 100%... I don't have any debuggers though, so it's rough debugging that.

After looking at my code long enough in a mean way, I found the culprit for this bug. Now we've got... another bug. Pushing new code.

I never seem to read the Login packet the server is supposed to send me now. I'm debugging using the example/client_chat.js. I'm giving up for now, I need to take a break.

What bug did you find?

@JavaPortals Somehow, the login packet the server sends is never read, no idea why. Could be an infinite loop, or any other kind of bugs. I need to setup myself a proper debugging environment (currently using io.js instead of node.js, which is incompatible with most debuggers out there...). If you find something, please do tell me :D

I'll see what I can do

Should now be working, for the most part. I'll write a quick-n-dirty proxy and use it to test out all the packets in practice.

This should make the protocol 100% complete. Only tests are missing, then I'll squash the commits so only one remains.

Should be ready to merge.

will@arya node-minecraft-protocol(review-108) $ node examples/proxy.js

/Users/will/Projects/node-minecraft-protocol/examples/proxy.js:85
      console.log(`client<-server: Error in packetId ${state}.0x${packetId.val
                  ^
SyntaxError: Unexpected token ILLEGAL

will@arya node-minecraft-protocol(review-108) $ mocha
Beginning write test
Finished write test in 4.145 seconds

buffer.js:784
    throw TypeError('value is out of bounds');
          ^
TypeError: value is out of bounds
    at TypeError (<anonymous>)
    at checkInt (buffer.js:784:11)
    at Buffer.writeInt8 (buffer.js:892:5)
    at Array.writeByte [as 1] (/Users/will/Projects/node-minecraft-protocol/lib/protocol.js:1190:10)
    at write (/Users/will/Projects/node-minecraft-protocol/lib/protocol.js:1430:17)
    at /Users/will/Projects/node-minecraft-protocol/lib/protocol.js:1489:14
    at Array.forEach (native)
    at createPacketBuffer (/Users/will/Projects/node-minecraft-protocol/lib/protocol.js:1484:10)
    at Client.write (/Users/will/Projects/node-minecraft-protocol/lib/client.js:199:16)
    at Object.<anonymous> (/Users/will/Projects/node-minecraft-protocol/test/benchmark.js:49:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /usr/local/lib/node_modules/mocha/lib/mocha.js:185:27
    at Array.forEach (native)
    at Mocha.loadFiles (/usr/local/lib/node_modules/mocha/lib/mocha.js:182:14)
    at Mocha.run (/usr/local/lib/node_modules/mocha/lib/mocha.js:394:31)
    at Object.<anonymous> (/usr/local/lib/node_modules/mocha/bin/_mocha:394:16)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

Woot :smile:


Point to public OCMock instead of fork

Points to same revision as Firebase's Package.swift
#no-changelog

Need to migrate to #import <OCMock/OCMock.h>

Closing in favor of https://github.com/google/GoogleUtilities/pull/73


Rust coordinator grpc

Adds a GRPC server using the generated GRPC services. Incorporates #98, the issues there should be resolved
The server does:

Client/Server authentication using TLS

signed certificates for localhost are included for testing, do not use in production
password for the CA certificate is 123456

Accepts both coordinator requests and ndarray requests.
A test client is also included

Rebased on master after #98 got merged.

I did several changes:

Merged crates xain-proto and xain-grpc-api into xain-grpc to mimic the directory structure of the Python implementation better.
Split the client/server into 4 binaries {coordinator,numproto}_{client,server}.
Simplified logging setup so that there is less code and we print info level on the screen by default.
Added more comments to the code and a new readme file to xain-grpc.

Hopefully the code is a bit easier to follow now and I didn't make any unintended changes :)
As far as I'm concerned, this PR is now fully ready for review.

I can also help take over #111 if this looks good!

pinging @r-marques for review

Left few comments. Can't review the actual Rust code for lack of expertise in Rust.
@r-marques did you already have a look?

Added a command to generate the certificates instead of putting them into the repos.

I also enabled CircleCI to to run on forked pull requests. Hopefully when a new commit comes in the CI should be triggered.

We have CI failures, but they seem unrelated to this PR.

We have CI failures, but they seem unrelated to this PR.

There were some missing system dependencies for the rust job on the CI (cmake for grpcio-sys and go for boringssl).
Syncing we the current master should fix that.

And the failing python tests are because they require access to aws and forked pull requests don't have access to those environment variables

Merged with the master branch and now the only remaining problem is that this PR can't access AWS.


Adding CMake Option to Build qcint

Summary
This PR adds the cmake option to build qcint instead of vanilla libcint. Users can specify from the command line like this:
cmake -B build -DUSE_QCINT=ON

When users specify USE_QCINT=ON and do not define BUILD_MARCH_NATIVE, they are warned that qcint may fail to compile, which happens when CMAKE_C_FLAGS doesn't contain any flags anything to turn vectorization on. This problem was behind #1173.
Next Steps
This is a somewhat loose check. If users specify CMAKE_C_FLAGS=-O3, but not BUILD_MARCH_NATIVE, then the warning is unnecessary. At the same time, I think it would complicate CMakeLists.txt to try to check all ways that users could turn on vectorization. Do other people have thoughts on this?

I think I fixed the bug building qcint when BUILD_MARCH is off by just switching on SSE3...

@susilehtola, thanks for taking a look. Indeed switching on SSE3 (or AVX or AVX512f) fixes the problem, but I wasn't sure of the best way to check (from within CMake) if any of those have been turned on, do you know? If you have a good way, then we can raise an error during the CMake configuration if they aren't turned on. Since I didn't know of any good way to do it, I left it as a warning, like I mentioned in the original post, it's a "loose check".

Well, the fix from last May should still be in place in CMakeLists.txt
if(BUILD_MARCH_NATIVE)
  message("Build with -march=native")
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -O2")
else()
  # This appears to be the lowest version that compiles
  message("Build with -march=sse3")
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3 -O2")
endif()

Is it not included in the version the bug was filed on?

@susilehtola, thanks for pointing that out, I somehow missed that part of qcint's CMakeLists.txt file. But to answer your question: yes that is part of the cmakelists.txt file for the version of qcint I'm using (5.1.1). Oddly enough, when I specify that only I want to build qcint (i.e. not specifying any compiler flags), the build of just qcint succeeds, but when I try to build everything at once it fails. Just to be clear:

Fails for PySCF because qcint build step fails

cmake -B build -DUSE_QCINT=ON
cmake --build build --parallel --verbose

Succeeds for qcint, fails for PySCF

cmake -B build -DUSE_QCINT=ON
cmake --build build --parallel --target libcint --verbose    # Succeeds
cmake --build build --parallel --verbose                     # Fails


Manually rebasing string diagnostic tests from @shawnce PR 1688

What's in this pull request?
This pull request manually rebases a number of string diagnostic tests that were written by @shawnce (originally from #1688), and includes a number of minor fixes and adjustments to ensure they work correctly with the latest codebase.
Note that there are still numerous tests that fail; however, none of those tests are ones touched by this PR.

Before merging this pull request to apple/swift repository:

[ ] Test pull request on Swift continuous integration.

Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
    Platform     | Comment
    ------------ | -------------
    All supported platforms     | @swift-ci Please smoke test
    OS X platform               | @swift-ci Please smoke test OS X platform
    Linux platform              | @swift-ci Please smoke test Linux platform

Validation Testing
    Platform     | Comment
    ------------ | -------------
    All supported platforms     | @swift-ci Please test
    OS X platform               | @swift-ci Please test OS X platform
    Linux platform              | @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

Paging @gribozavr

@austinzheng Thank you!  I have left some comments.

Hi @gribozavr, I've made the changes you desired and rebased onto the latest commit. I believe all the tests should now pass properly, but I'm running them locally just to make sure. Let me know if you have any questions or further changes you want me to make!

Thank you!


I dont know how to make hover work after using purgeCss in laravel mix

Hi,
I spent last 8 hours trying to make it work and i have tried everything i could find on web. So i need a help. :)
I am using Laravel mix latest version, tailwind latest and laravel-mix-purgecss in my laravel project.
Problem:
When i run npm run dev/watch, everything works. When i hover over my element, it shows me my customised colors defined in tailwind.config.js. Works as expected.
However, when i run npm run prod, hover is not working for bg-color
Please notice that hover does work for text-color.
I have items define in my config/categories.php like so:
return [
    'categories' => [
        [
            'id' => 1,
            'name' => 'Equipment',
            'textColor' => 'text-a4a-equipment-red',
            'bottomBorderColor' => 'border-a4a-equipment-red',
            'bgColor' => 'bg-a4a-equipment-red',

This is the code i am having in my blade template -please note comment with explanation:
<a href="/list/{{ $category['id'] }}" class="
            flex
            {{$category['textColor']}}
            flex-col
            w-32 h-32
            mb-1
            border-1
            border-a4a-box-border
            hover:text-green-600 **// THIS WILL ALWAYS WORK, npm run dev or NPM run prod**
            hover:{{ $category['bottomBorderColor'] }} // value is 'border-a4a-equipment-red' defined in tailwind.config.js. THIS NEVER WORK ON npm run prod
            md:w-48
            md:h-48
            md:mb-2
            md:m-0
            items-center
            justify-center
            shadow-xl
            bg-white">

            {!! $category['name']  !!}

Here is my webpack file:
require('laravel-mix-purgecss');
const tailwindcss = require('tailwindcss');

mix.sass('resources/sass/main.scss', 'public/css/main.css').options({
    processCssUrls: false,
    postCss: [tailwindcss('./tailwind.config.js')],
});

mix.js('resources/js/app.js', 'public/js').purgeCss({
    extractorPattern: /[\w-:/]+(?<!:)/g
});
mix.version();

Let me show you now my tailwind config:
module.exports = {
    theme: {
        extend: {
            margin: {
                above: '-mt-20',
                hover: '-mt-40'
            },
            borderWidth: {
                '1': '0.5px',
            },
            colors: {
                'transparent-black': 'rgba(0,0,0,.2)',
                'a4a-box-border': '#D8D8D8',
                'a4a-equipment-red': '#AF0B28',
                'a4a-livestock-orange': '#F15A2C',
                'a4a-auctions-yellow': '#FDB82C',
                'a4a-vehicles-green': '#7DC242',
            },...

I have tried to screen record what i am referring to.
https://www.dropbox.com/s/oml3zhkzs2esq4b/screen%20recording%202562-11-07%20at%2020.58.33.mov?dl=0
Thanks in advance for any suggestions.

The problem is you are using string concatenation to dynamically create a class name. Purgecss doesn't actually run your code so it doesn't know to keep that class. You should make sure to have the full class name in your source file and avoid interpolation.
Explained in the docs here:
https://tailwindcss.com/docs/controlling-file-size#writing-purgeable-html

@adamwathan thanks for quick reply. I have read documentation.
I do have a full class name- please look here:
// value is category['bottomBorderColor'] => 'border-a4a-equipment-red', ```

You see? What am i missing?

The full class name hover:border-a4a-equipment-red never appears in your source code so Purgecss doesn't know to keep it.

I think for your situation I would add a hoverBottomBorderColor key in your categories file:
return [
    'categories' => [
        [
            'id' => 1,
            'name' => 'Equipment',
            'textColor' => 'text-a4a-equipment-red',
            'bottomBorderColor' => 'border-a4a-equipment-red',
            'hoverBottomBorderColor' => 'hover:border-a4a-equipment-red',
            'bgColor' => 'bg-a4a-equipment-red',

Then update your HTML to reference that when needed:
<a href="/list/{{ $category['id'] }}" class="
            flex
            {{$category['textColor']}}
            flex-col
            w-32 h-32
            mb-1
            border-1
            border-a4a-box-border
            hover:text-green-600 **// THIS WILL ALWAYS WORK, npm run dev or NPM run prod**
            {{ $category['hoverBottomBorderColor'] }} // value is 'border-a4a-equipment-red' defined in tailwind.config.js. THIS NEVER WORK ON npm run prod
            md:w-48
            md:h-48
            md:mb-2
            md:m-0
            items-center
            justify-center
            shadow-xl
            bg-white">

            {!! $category['name']  !!}

Also make sure Purgecss is scanning your config/categories.php file:
mix.js('resources/js/app.js', 'public/js').purgeCss({
    folders: ['config', 'resources'],
    extractorPattern: /[\w-:/]+(?<!:)/g
});

@adamwathan thank you very much. This solved it and now everything works. Thank you!


APEX: messed up JSON with APEX_TRACE_EVENT=1 for Google Trace Events

Due to other problems I have with OTF2 (it hangs on exit, I may create a different issue for that), I'm giving a try to Google Trace Events Format with APEX_TRACE_EVENT=1.
I was able to run the my code, it has a clean exit and it produces the output. Unfortunately, the json produced is messed up like if there is a race-condition between multiple ranks writing to the same json file.
Eventually I was able to open the json after fixing manually the messed up parts of the file. In my specific runs I was able to quickly figure out what to remove (clearly losing a few entries) thanks also to the Google Tracing Tool that was pointing me to the buffer position where it found a grammar problem.
I didn't try to create a minimal reproducible example since it may not be so easy and deterministic, anyway I can help in testing it with my code which till now always generates a wrongly-formed json.
HPX team mentioned you @khuck as the APEX expert, let me know if I can help you in some way or I can provide you more information via other specific tests.
(OT: it may be interesting having a chat/call with you about the general topic "annotation". I'm open to that, let me know!)
Specifications

HPX Version: 1.6.0
Platform (compiler, OS): GCC on Linux

@albestro hey there ... I would be surprised if there are race conditions writing to the stream, but it is certainly possible.  A couple of questions:

Which version of HPX are you using, and which version of APEX?
OTF2 hanging on exit: did it write the archive at all?  If it hang, it would have hung in the event unification process at the end.  There's a new unification process that uses HPX, and in some cases we were seeing hangs but it was many months ago.
Can you share the json file?  Each rank writes to its own file, assuming that each rank knows its rank id.  How are you running the HPX application?  Is it using TCP or MPI for the transport layer?

I think the issue is exactly that the ranks don't know what id they are (networking is off in HPX). I know @biddisco worked on that at some point, and possibly even made it work, but given that it's not tested it's probably broken. @biddisco do you remember where the rank was supposed to be set if networking is off?
@khuck in the meantime, if I remember correctly it's possible to set the output filename for OTF2 files with an environment variable. Is it possible to do the same for the google trace event files?

hey @khuck! thanks for your quick reply!

Which version of APEX?  I assume 2.3.1, the default for HPX 1.6.0

Correct, using default selected. From HPX CMake configure process I see apex : git checkout -q v2.3.1

OTF2 hanging on exit: did it write the archive at all?  If it hang, it would have hung in the event unification process at the end.  There's a new unification process that uses HPX, and in some cases we were seeing hangs but it was many months ago.

APEX_OTF2=1 srun -n 2 -c36 /users/ialberto/workspace/dla-future/builds/daint/miniapp/miniapp_reduction_to_band --matrix-size 10240 --block-size 512 --grid-rows 2 --grid-cols 1 --nwarmups=0 --nruns 1 --hpx:use-process-mask
[OTF2] src/otf2_archive_int.c:3945: error: File does already exist: Could not create archive trace directory!
[OTF2] src/otf2_archive_int.c:1108: error: File does already exist: Couldn't create directories on root.
OTF2 Error: 17, File does already exist
[0]
[0] 26.1765s nanGFlop/s (10240, 10240) (512, 512) (2, 1) 18
Closing OTF2 event files...
Closing OTF2 event files...
Writing OTF2 definition files...
Writing OTF2 Global definition file...
Writing OTF2 Node information...
Writing OTF2 Communicators...
Closing the archive...
done.
// here it hangs...

After killing it, the content of the folder is
OTF2_archive/
|-- APEX
|   |-- 0.def
|   |-- 0.evt
|   |-- 1.def
|   |-- 1.evt
|   |-- 10.def
|   |-- 10.evt
|   |-- 11.def
|   |-- 11.evt
|   |-- 12.def
|   |-- 12.evt
|   |-- 13.def
|   |-- 13.evt
|   |-- 14.def
|   |-- 14.evt
|   |-- 15.def
|   |-- 15.evt
|   |-- 16.def
|   |-- 16.evt
|   |-- 17.def
|   |-- 17.evt
|   |-- 18.def
|   |-- 18.evt
|   |-- 2.def
|   |-- 2.evt
|   |-- 3.def
|   |-- 3.evt
|   |-- 4.def
|   |-- 4.evt
|   |-- 5.def
|   |-- 5.evt
|   |-- 6.def
|   |-- 6.evt
|   |-- 7.def
|   |-- 7.evt
|   |-- 8.def
|   |-- 8.evt
|   |-- 9.def
|   `-- 9.evt
|-- APEX.def
`-- APEX.otf2

But if I open it with Vampir, I get an empty trace

Can you share the json file?  Each rank writes to its own file, assuming that each rank knows its rank id.  How are you running the HPX application?  Is it using TCP or MPI for the transport layer?

NOTE: A thing that may be relevant and I forgot to specify: I built HPX_WITH_NETWORKING=off.
I'm running my application with 2 ranks on the same node, and the application itself uses MPI directly.
APEX_TRACE_EVENT=1 srun -n 2 -c36 /users/ialberto/workspace/dla-future/builds/daint/miniapp/miniapp_reduction_to_band --matrix-size 10240 --block-size 512 --grid-rows 2 --grid-cols 1 --nwarmups=0 --nruns 1 --hpx:use-process-mask

Here it is trace.tar.gz. If you try to load it with Google Format tool it says the bytes offset where it fails. Just for reference, a couple of errors:
line 95424: the entry is truncated (after "ts" field) and a new one starts
{"name":"hpx_main","ph":"X","pid":173700657,"tid":19,"ts":1615799668667355.000{"name":"hpx_main","ph":"X","pid":0,"tid":19,"ts":1615799668616451.000000, "dur": 83.561636,"args":{"GUID":14411518807585721556,"Parent GUID":14411518807585721555}},

line 252987: there is the termination of the array (end of first rank data?) but then data continues, but starts truncated
{"name":"APEX MAIN", "ph":"E","pid":0,"tid":0,"ts":1615799684527165.500000}
]
}

x_main","ph":"X","pid":0,"tid":13,"ts":1615799683699657.750000, "dur": 32.267636,"args":{"GUID":2305843009213702076,"Parent GUID":6917529027641089785}},

Based on what you've said, it sounds like the ranks are writing to the same file.
Which MPI are you using?  Which batch system?  Without HPX networking, APEX can sometimes guess the ranks based on environment variables:
https://github.com/khuck/xpress-apex/blob/7c511f63ae648b20991be7caec6d346a9dc7f675/src/apex/utils.cpp#L417-L450
If this is a Cray system, I might have to add support for their variable (CRAY_PMI_RANK for example).

Yes, it's Cray MPICH with Slurm

Slurm should have been caught, but I'll add support for CRAY...

I gave a quick look at the snippet of code you mentioned, and I did a quick test.
$ srun -n 2 -o "%t-env.txt" printenv
$ grep "SLURM_PROCID" *-env.txt
0-env.txt:SLURM_PROCID=0
1-env.txt:SLURM_PROCID=1

I got the same results with 2 ranks being them on a single node or on separate nodes. So, I would confirm your expectation, if that snippet of code gets called, it would be able to extract data from SLURM environment variables.

Hey, just to be sure...
https://github.com/khuck/xpress-apex/blob/7c511f63ae648b20991be7caec6d346a9dc7f675/src/apex/utils.cpp#L417-L450
Are you sure that you use the return type and not the argument? because, I would say that the argument should be a reference and not a value...
uint64_t test_for_MPI_comm_rank(uint64_t commrank) { # WARNING here commrank is not passed by reference
    // ...

    // Slurm - last resort
    tmpvar = getenv("SLURM_PROCID");
    if (tmpvar != NULL) {
        commrank = atol(tmpvar);
        return commrank;
    }
    return commrank;
}

It seems that the function had the intention to give back the results both as return value and as "out" argument, but in the latter case you don't get it because commrank is not passed by reference.
Does it sound to you?

I just copied the function test_for_MPI_comm_rank in my small example, I slightly changed it to print out which branch was falling in, and it returns the correct value
srun -n 2 a.out
SLURM
1
SLURM
0

So, I think we should look in other directions. Do you have any suggestion on how to debug this?

You could try printing out the trace file name when the file is created:
https://github.com/khuck/xpress-apex/blob/7c511f63ae648b20991be7caec6d346a9dc7f675/src/apex/trace_event_listener.cpp#L324
If you are getting two unique file names, then there is something else going on.

I've just checked, and I get exactly the same filename.
Specifically, saved_node_id == 0 and ss.str() == "trace_events.0.json".
While I wait for your next suggestion on how to go on investigating this, I take the chance to ask you one question (I have more about this topic, it would be nice to quickly discuss with you about a couple of things. Let me know if you are open to this and how we can organize it in case).
So, once this will be fixed, when using Google Trace Tool we are supposed to open each rank trace in a separate window, right?

@albestro It would appear there are two issues here.  First, there is a bug in the OTF2 library, which I thought we had reported and had been fixed.  In OTF2, you need to patch the otf2_archive_set_collective_callbacks method in src/otf2_archive_int.c.  The declaration of the status variable is without an initialization, which causes the error message from non-zero ranks.  That also bypasses some other initialization which leads to other problems down the line.  To fix it, change that line (line 1086 in version 2.2) to:
    OTF2_ErrorCode status = OTF2_SUCCESS;

The second issue is that when HPX is configured without parcel port support, HPX can't tell APEX how many ranks there are, and the rank ID for each process. That's OK, as long as the MPI implementation sets some environment variables.  I have added additional support for Cray systems which might take care of the issue with both tracing outputs - OTF2 and Google Trace Events.  Please configure HPX with -DHPX_WITH_APEX_TAG=develop and see if that additional support helps.

I did like you suggested, but without luck.

Patched manually OTF2
Built HPX 1.6.0 with APEX=develop

Google Trace Events still creates a single file with the usual "output-overlaps" between ranks.
OTF2, still hangs on exit
Closing OTF2 event files...
Closing OTF2 event files...                                                                                Writing OTF2 definition files...
Writing OTF2 definition files...
Writing OTF2 Global definition file...
Writing OTF2 Node information...                                                                                Writing OTF2 Communicators...
Closing the archive...
done.
// here it waits forever

If I kill the process, I get
{stack-trace}: 13 frames:
0x2aaab37dd2d0  : /apps/daint/UES/xalt/xalt2/software/xalt/2.8.10/lib64/libpthread.so.0(+0x132d0) [0x2aaab37dd2d0] in /apps/daint/UES/xalt/xalt2/software/xalt/2.8.10/lib64/libpthread.so.0
0x2aaab37d887d  : pthread_cond_wait [0x1fd] in /apps/daint/UES/xalt/xalt2/software/xalt/2.8.10/lib64/libpthread.so.0
0x2aaab16348ac  : boost::asio::detail::scheduler::run(boost::system::error_code&) [0x28c] in /project/csstaff/ialberto/libraries/hpx-1.6.0/build/install_here/lib64/libhpx.so.1
0x2aaab1e9c70a  : hpx::util::io_service_pool::thread_run(unsigned long, hpx::util::barrier*) [0x14a] in /project/csstaff/ialberto/libraries/hpx-1.6.0/build/install_here/lib64/libhpx_core.so
0x2aaab1616e15  : hpx::runtime_distributed::wait() [0x255] in /project/csstaff/ialberto/libraries/hpx-1.6.0/build/install_here/lib64/libhpx.so.1
0x2aaab16123f5  : hpx::runtime_distributed::run(hpx::util::function<int (), false> const&) [0x15] in /project/csstaff/ialberto/libraries/hpx-1.6.0/build/install_here/lib64/libhpx.so.1
0x2aaab16d9c9d  : /project/csstaff/ialberto/libraries/hpx-1.6.0/build/install_here/lib64/libhpx.so.1(+0x2d9c9d) [0x2aaab16d9c9d] in /project/csstaff/ialberto/libraries/hpx-1.6.0/build/install_here/lib64/libhpx.so.1
0x2aaab16d9f0c  : /project/csstaff/ialberto/libraries/hpx-1.6.0/build/install_here/lib64/libhpx.so.1(+0x2d9f0c) [0x2aaab16d9f0c] in /project/csstaff/ialberto/libraries/hpx-1.6.0/build/install_here/lib64/libhpx.so.1
0x2aaab16da7e5  : hpx::detail::run_or_start(hpx::util::function<int (hpx::program_options::variables_map&), false> const&, int, char**, hpx::init_params const&, bool) [0x845] in /project/csstaff/ialberto/libraries/hpx-1.6.0/build/install_here/lib64/libhpx.so.1
0x4178af        : /users/ialberto/workspace/dla-future/builds/daint/miniapp/miniapp_reduction_to_band() [0x4178af] in /users/ialberto/workspace/dla-future/builds/daint/miniapp/miniapp_reduction_to_band
0x2aaab4f7334a  : __libc_start_main [0xea] in /lib64/libc.so.6
0x41817a        : /users/ialberto/workspace/dla-future/builds/daint/miniapp/miniapp_reduction_to_band() [0x41817a] in /users/ialberto/workspace/dla-future/builds/daint/miniapp/miniapp_reduction_to_band
{what}: Interrupt
{stack-trace}: 15 frames:
0x2aaab37dd2d0  : /apps/daint/UES/xalt/xalt2/software/xalt/2.8.10/lib64/libpthread.so.0(+0x132d0) [0x2aaab37dd2d0] in /apps/daint/UES/xalt/xalt2/software/xalt/2.8.10/lib64/libpthread.so.0
0x2aaab427f894  : /opt/cray/pe/lib64/libmpich_gnu_82.so.3(+0x215894) [0x2aaab427f894] in /opt/cray/pe/lib64/libmpich_gnu_82.so.3
0x2aaab4284178  : MPIDI_CH3I_Progress [0x9c8] in /opt/cray/pe/lib64/libmpich_gnu_82.so.3
0x2aaab41cad6d  : MPIC_Wait [0x4d] in /opt/cray/pe/lib64/libmpich_gnu_82.so.3
0x2aaab41cb4ed  : MPIC_Sendrecv [0x1ed] in /opt/cray/pe/lib64/libmpich_gnu_82.so.3
0x2aaab40fee94  : MPIR_Barrier_intra [0xa4] in /opt/cray/pe/lib64/libmpich_gnu_82.so.3
0x2aaab40ff4d2  : MPIR_Barrier [0x12] in /opt/cray/pe/lib64/libmpich_gnu_82.so.3
0x2aaab41de41d  : MPIDI_Cray_shared_mem_coll_opt_cleanup [0x13d] in /opt/cray/pe/lib64/libmpich_gnu_82.so.3
0x2aaab41dbddb  : MPIDI_Cray_coll_finalize [0x1b] in /opt/cray/pe/lib64/libmpich_gnu_82.so.3
0x2aaab426e3cc  : MPID_Finalize [0x2c] in /opt/cray/pe/lib64/libmpich_gnu_82.so.3
0x2aaab417bb8d  : PMPI_Finalize [0x29d] in /opt/cray/pe/lib64/libmpich_gnu_82.so.3
0x4178d5        : /users/ialberto/workspace/dla-future/builds/daint/miniapp/miniapp_reduction_to_band() [0x4178d5] in /users/ialberto/workspace/dla-future/builds/daint/miniapp/miniapp_reduction_to_band
0x2aaab4f7334a  : __libc_start_main [0xea] in /lib64/libc.so.6
0x41817a        : /users/ialberto/workspace/dla-future/builds/daint/miniapp/miniapp_reduction_to_band() [0x41817a] in /users/ialberto/workspace/dla-future/builds/daint/miniapp/miniapp_reduction_to_band

@albestro this looks more like a shutdown race condition.  Did you at least get a valid OTF2 trace?  I'll see if I can reproduce the race condition.
Is there any way you can share the application that is causing this deadlock?

@severinstrobl

As I encounter a very similar issue with APEX/OTF2, here is a small example program that allows me to reliably reproduce the issue. The OTF2 output deadlocks even earlier here, all I get is:
Closing OTF2 event files...
Writing OTF2 definition files...

The path OTF2_archive/APEX is created, but no files.

I don't know if that's exactly the case, because as you can see in a previous message, I get some output files.
@khuck

@albestro this looks more like a shutdown race condition. Did you at least get a valid OTF2 trace? I'll see if I can reproduce the race condition.

The output folder is populated with files, but when I open it with Vampir I don't get anything (as in the previous https://github.com/STEllAR-GROUP/hpx/issues/5239#issuecomment-799309260)

Is there any way you can share the application that is causing this deadlock?

It's a miniapp of my library, I don't have any problem sharing it with you, but it may require some work on your side to prepare the environment (it is spack based so it won't require too much). Before that, I can try to see if I can reproduce it with a more simple example...I'll let you know.
In the meanwhile, is it worth separating the two issues "otf2 hanging" and "google trace events single-file race-condition"?

Hey @khuck, yesterday I found the time for giving this a look.
I'm keeping thinking that the root of the two problems, i.e. "OTF2 hang" and "Google Trace overlap", might be the same. It looks like a race-condition in both cases, once it ends up with an hanging, the other one with a write on the same file concurrently, but that's just my speculation without having much knowledge about this stuff.
Yesterday I worked on the OTF2 problem. Curiously enough, after a few tries, I was able to reproduce the problem with a super simple executable
#include <hpx/hpx.hpp>
#include <hpx/hpx_init.hpp>
#include <mpi.h>

int hpx_main() {
  hpx::make_ready_future<void>().then([](auto&&){
    int rank;
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
    hpx::util::annotate_function _(std::to_string(rank));
  });
  return hpx::finalize();
}

int main(int argc, char** argv) {
  MPI_Init(&argc, &argv);
  auto ret_code = hpx::init(argc, argv);
  MPI_Finalize();
  return ret_code;
}

I'm not really sure everything is needed to reproduce it, but it is simple enough and at the same time it looks very similar to my classic run (just as reminder HPX_WITH_NETWORKING=OFF and my program uses MPI directly).
The game changer to reproduce the OTF2 hang was the number of ranks. In fact, the probability to get a hang is directly proportional to the number of ranks I use (e.g. generally 8 is a good number, but with more it was way more frequent = almost every run was hanging).
An important point about this, it is that I worked in a multi rank per node configuration, and I did not have the chance to test it with multiple nodes yet (I can try). I think this may be quite useful for you to narrow down the problem, even considering what you were saying in your previous comments.
I don't know how the OTF2 is expected to work (one folder per rank? one folder per node?), but for you it may be insightful to see the following stacktrace.
In order to collect it, I ran a "hanging configuration" with multiple ranks on a single node, and among these ranks I saw that there was a number of ranks waiting on MPI_Finalize (and these printed "done" saying that they finished writing the OTF2 archive), and the remaining ones (not a fixed number over different runs) were the "hanging" ones, so I attached to one of them and I printed the stacktrace of the more interesting thread. Here you are.
(gdb) bt
#0  0x00002aaaaee8add7 in unlink () from /lib64/libc.so.6
#1  0x00002aaaaee0bde9 in remove () from /lib64/libc.so.6
#2  0x00002aaaac065173 in apex::otf2_listener::reduce_metrics (this=0xeeab00) at /users/ialberto/workspace/hpx/apex/src/apex/otf2_listener.cpp:2487
#3  0x00002aaaac060f0a in apex::otf2_listener::on_shutdown (this=0xeeab00, data=...) at /users/ialberto/workspace/hpx/apex/src/apex/otf2_listener.cpp:952
#4  0x00002aaaabfc1c6c in apex::finalize () at /users/ialberto/workspace/hpx/apex/src/apex/apex.cpp:1513
#5  0x00002aaaabfbd214 in apex::finalize_hpx_runtime () at /users/ialberto/workspace/hpx/apex/src/apex/apex.cpp:194
#6  0x00002aaaabfd3e25 in hpx::util::detail::callable_vtable<void ()>::_invoke<void (*)()>(void*) (f=0xf94ba0)
    at /users/ialberto/workspace/hpx/libs/core/functional/include/hpx/functional/detail/vtable/callable_vtable.hpp:93
#7  0x00002aaaab3858f6 in hpx::util::detail::basic_function<void (), false, false>::operator()() const (this=0xf94b90)
    at /users/ialberto/workspace/hpx/libs/core/functional/include/hpx/functional/detail/basic_function.hpp:228
#8  hpx::components::server::runtime_support::call_shutdown_functions (this=0xe5cf20, pre_shutdown=true)
    at /users/ialberto/workspace/hpx/src/runtime/components/server/runtime_support_server.cpp:1117
#9  0x00002aaaab3af44a in hpx::actions::detail::component_invoke<hpx::components::server::runtime_support, void, void (bool), bool>(std::integral_constant<bool, false>, unsigned long, int, void (hpx::components::server::runtime_support::*)(bool), bool&&) (lva=15060768, f=
    (void (hpx::components::server::runtime_support::*)(hpx::components::server::runtime_support * const, bool)) 0x2aaaab385830 <hpx::components::server::runtime_support::call_shutdown_functions(bool)>, vs#0=@0x1a64d1c: true) at /users/ialberto/workspace/hpx/libs/full/actions_base/include/hpx/actions_base/component_action.hpp:54
#10 0x00002aaaab3ae5b3 in hpx::actions::action<void (hpx::components::server::runtime_support::*)(bool), &hpx::components::server::runtime_support::call_shutdown_functions, hpx::components::server::runtime_support::call_shutdown_functions_action>::invoke<bool> (lva=15060768, comptype=0, vs#0=@0x1a64d1c: true)
    at /users/ialberto/workspace/hpx/libs/full/actions_base/include/hpx/actions_base/component_action.hpp:106
#11 0x00002aaaab3b36b7 in hpx::actions::detail::action_invoke<hpx::components::server::runtime_support::call_shutdown_functions_action>::operator()<bool> (this=0x2aaaaac35dd0)
    at /users/ialberto/workspace/hpx/libs/full/actions_base/include/hpx/actions_base/basic_action.hpp:80
#12 hpx::util::detail::invoke_fused_impl<0ul, hpx::actions::detail::action_invoke<hpx::components::server::runtime_support::call_shutdown_functions_action>, hpx::tuple<bool> > (
    f=..., t=...) at /users/ialberto/workspace/hpx/libs/core/functional/include/hpx/functional/invoke_fused.hpp:79
#13 0x00002aaaab3b3397 in hpx::util::functional::invoke_fused::operator()<hpx::actions::detail::action_invoke<hpx::components::server::runtime_support::call_shutdown_functions_action>, hpx::tuple<bool> > (this=0x2aaaaac35def, f=..., t=...) at /users/ialberto/workspace/hpx/libs/core/functional/include/hpx/functional/invoke_fused.hpp:136
#14 0x00002aaaab3b2d8d in hpx::actions::trigger<void, hpx::util::functional::invoke_fused, hpx::actions::detail::action_invoke<hpx::components::server::runtime_support::call_shutdown_functions_action>, hpx::tuple<bool> > (cont=..., f=..., vs#0=..., vs#1=...) at /users/ialberto/workspace/hpx/libs/full/actions/include/hpx/actions/trigger.hpp:45
#15 0x00002aaaab3b1f58 in hpx::traits::action_trigger_continuation<hpx::actions::typed_continuation<void, hpx::util::unused_type>, void>::call<hpx::util::functional::invoke_fused, hpx::actions::detail::action_invoke<hpx::components::server::runtime_support::call_shutdown_functions_action>, hpx::tuple<bool> > (f=..., cont=...)
    at /users/ialberto/workspace/hpx/libs/full/actions/include/hpx/actions/traits/action_trigger_continuation.hpp:28
#16 hpx::actions::detail::continuation_thread_function<hpx::components::server::runtime_support::call_shutdown_functions_action>::operator() (this=0x1a64cb0)
    at /users/ialberto/workspace/hpx/libs/full/actions_base/include/hpx/actions_base/basic_action.hpp:180
#17 0x00002aaaab3b1508 in hpx::util::detail::callable_vtable<std::pair<hpx::threads::thread_schedule_state, hpx::threads::thread_id> (hpx::threads::thread_restart_state)>::_invoke<hpx::actions::detail::continuation_thread_function<hpx::components::server::runtime_support::call_shutdown_functions_action> >(void*, hpx::threads::thread_restart_state&&) (
    f=0x1a64cb0, vs#0=@0x2aaaaac35edc: hpx::threads::thread_restart_state::signaled)
    at /users/ialberto/workspace/hpx/libs/core/functional/include/hpx/functional/detail/vtable/callable_vtable.hpp:93
#18 0x00002aaaac55d9d1 in hpx::util::detail::basic_function<std::pair<hpx::threads::thread_schedule_state, hpx::threads::thread_id> (hpx::threads::thread_restart_state), false, false>::operator()(hpx::threads::thread_restart_state) const (vs#0=hpx::threads::thread_restart_state::signaled, this=0x1a78880)
    at /users/ialberto/workspace/hpx/libs/core/functional/include/hpx/functional/detail/basic_function.hpp:228
#19 hpx::threads::coroutines::detail::coroutine_impl::operator() (this=0x1a78760) at /users/ialberto/workspace/hpx/libs/core/coroutines/src/detail/coroutine_impl.cpp:74
#20 0x00002aaaac55cff2 in hpx::threads::coroutines::detail::lx::trampoline<hpx::threads::coroutines::detail::coroutine_impl> (fun=0x1a78760)
    at /users/ialberto/workspace/hpx/libs/core/coroutines/include/hpx/coroutines/detail/context_linux_x86.hpp:92
#21 0x0000000000000000 in ?? ()
(gdb) f 2
#2  0x00002aaaac065173 in apex::otf2_listener::reduce_metrics (this=0xeeab00) at /users/ialberto/workspace/hpx/apex/src/apex/otf2_listener.cpp:2487
2487                rc = std::remove(my_lock_filename.str().c_str());
(gdb) print my_lock_filename.str().c_str()
$1 = 0x1a9c3a0 "OTF2_archive/.metrics.lock.all"
(gdb)

At the very end of the above gdb session, you can see I selected the frame 2 and I printed the name of the file it was waiting to unlink (I thought it may be useful for your analysis). I also report here the status of the folder. Just as a side note, if I do touch .metrics.lock.all it unlocks and the run exists correctly.
ialberto@nid00008:/scratch/snx3000/ialberto/temp/OTF2_archive> ls -al
total 40
drwxr-xr-x 3 ialberto csstaff 4096 Apr 14 08:31 .
drwxr-xr-x 3 ialberto csstaff 4096 Apr 14 08:28 ..
-rw-r--r-- 1 ialberto csstaff  288 Apr 14 08:31 .metrics.0
-rw-r--r-- 1 ialberto csstaff  316 Apr 14 08:31 .metrics.reduced.0
-rw-r--r-- 1 ialberto csstaff  754 Apr 14 08:30 .regions.0
-rw-r--r-- 1 ialberto csstaff  767 Apr 14 08:30 .regions.reduced.0
-rw-r--r-- 1 ialberto csstaff  154 Apr 14 08:31 .threads.0
-rw-r--r-- 1 ialberto csstaff    0 Apr 14 08:31 .threads.lock.all
drwxr-xr-x 2 ialberto csstaff 4096 Apr 14 08:30 APEX
-rw-r--r-- 1 ialberto csstaff 2257 Apr 14 08:31 APEX.def
-rw-r--r-- 1 ialberto csstaff  229 Apr 14 08:31 APEX.otf2

This may be just the effect and not the root of the problem, but with your knowledge and experience about these libraries you may be able to understand better the bigger figure.
As always, I'm open to any other test/check you want me to do.
note: I'm using HPX 1.6.0, APEX develop, OTF2 patched

@albestro Ah, this makes perfect sense!  The "file based" method is the "least good" choice among HPX, MPI and shared filesystems for doing event unification, which is required by OTF2.  My guess is that the file-based solution isn't working, probably because the application doesn't know how many total ranks there are!  Ideally, if you configure APEX with HPX, it uses HPX to do the event unification at the end.  However, you aren't using HPX parcel ports,  so that is not an option.
Here are some possible solutions, from easiest to hardest:

If you could run an MPI job and see what environment variables (if any) are available on your system that tell you how many MPI ranks are in the job?  I could then add support for that variable in here: https://github.com/khuck/xpress-apex/blob/f5a776a2d2a475cd9d64cd3a1d1dfa6fc88de27d/src/apex/utils.cpp#L466

If MPI is used, APEX could use MPI collectives to do the event unification.  That works great, and is how OTF2 is designed to work.  However, because HPX isn't configured with MPI support, APEX doesn't have paths to the MPI headers or libraries.  I could see if it's possible to add support in APEX configuration for MPI without HPX having to know about it.

solution number 1 will be a faster fix than number 2...

Aha! Good catch!
Tested my basic example with khuck/xpress-apex@e029c42 and I can see the difference with both OTF2 and GoogleTraceFormat!

OTF2: just the root rank manages the OTF2 archive (not anymore all ranks printing "closing the archive") and Vampir shows the trace.
GoogleTraceFormat: it does not produce anymore a single "trace_events.0.json", but one output file per rank...so no race-condition anymore!

I'll give a try as soon as possible with my miniapp, but I think this issue can be closed.
@khuck I take the chance to point you to this discussion https://github.com/STEllAR-GROUP/hpx/discussions/5263, which I'd like to have with you about a "guideline" on how it is better to use APEX.
Thanks for your support and in advance for any comment on the discussion!


Use truncated base TaskRun name for lookup

Changes
Without this, a base TaskRun name longer than 57 (i.e., maxGeneratedNameLength) characters will not match the names of any existing TaskRuns, resulting in an infinite number of TaskRuns getting created.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:

[x] Includes tests (if functionality changed/added)
[ ] Includes docs (if user facing)
[x] Commit messages follow commit message best practices

Release Notes
n/a

I probably should have created an issue for this too, but hey.

/lgtm

resulting in an infinite number of TaskRuns getting created

Aaaah, that be good logic. Lemme try.

Augh logic doesn't work as things are structured - getTaskRunName(...) is the only way we can map between the PipelineTask and its TaskRun. PipelineRun.Status.TaskRuns is a map of the result of getTaskRunName(...) and a TaskRunStatus, and TaskRunStatus doesn't have any info about the PipelineTask in it! Ow ow ow ow.

Augh logic doesn't work as things are structured - getTaskRunName(...) is the only way we can map between the PipelineTask and its TaskRun. PipelineRun.Status.TaskRuns is a map of the result of getTaskRunName(...) and a TaskRunStatus, and TaskRunStatus doesn't have any info about the PipelineTask in it! Ow ow ow ow.

Ugh!!!! I guess this worked just fine back when we were statically generating the names :woman_facepalming:
Maybe we need to add some PipelineTask info into the Status?

Yeah, that's what I'm doing now. =)

...and done.

@bobcatfish @vdemeester - fyi, once this approach has been approved, I'm going to squash this down to avoid three different implementations in the history. =)

This approach agreed up makes a lot of sense.  🎉 👍

I wonder how much information related to TaskRuns status should be in the PipelineStatus (on top of my head, should the steps "status" be in there ?) – thinking out loud

@vdemeester  I could see going either way! I kind of think it should be all or nothing - all of the status info including steps, or none of it (and you have to go lookup the TaskRun to see it)

/meow space

@bobcatfish Comments addressed, squashed, ready to go from my side. =)


help

How do i do it on a rpi4 with raspberry pi os bit 64?
I did everything but did not work so I adjusted to using
sudo docker run --name blogo -v $(pwd)/articles:/app/articles -p 3000:3000 arm32v7/node:14
And idk how to fix it cause it does not run on port 3000 (localhost:3000)

The app is not made with node, so I don't think it will work. Could you share whatever error you were getting so I can try find a solution?

chevron_right
docker run --name blogo -v $(pwd)/articles:/app/articles -p 3000:3000 pluja/blogo -d
docker: Error response from daemon: Conflict. The container name "/blogo" is already in use by container "ccbca129790d7d661f3891ea005a95dd35ed798e7731302957f6ddaae2d56a9c". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
chevron_right
sudo docker run --name blogo -v $(pwd)/articles:/app/articles -p 3000:3000 pluja/blogo -d
docker: Error response from daemon: Conflict. The container name "/blogo" is already in use by container "ccbca129790d7d661f3891ea005a95dd35ed798e7731302957f6ddaae2d56a9c". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.

Then I tried this but still
docker rm blogo
blogo
chevron_right
docker run --name blogo -v $(pwd)/articles:/app/articles -p 3000:3000 pluja/blogo -d
docker: Error response from daemon: create $(pwd)/articles: "$(pwd)/articles" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path.
See 'docker run --help'.

The issue is with this: create (pwd)/articles" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed.
can you run:
docker rm blogo
Then (note the qutoing around the volume definition):
docker run --name blogo -v "$(pwd)/articles:/app/articles" -p 3000:3000 pluja/blogo -d

What volume do I put then as in the storage cap? Sowy I'm confused here I'm new to docker

Anyone know?

Hi, I don't quite understand your question. Please:

Stop and remove all blogo containers that you have. You can use this command:

docker ps -a | grep "blogo" | awk '{print $1}' | xargs -r docker rm -f

Repeat the self-hosting steps as stated in the readme.md

Get back if you have any further issues.

like you said to read the pwd so like idk what to put there

also
alfonsop123@raspberrypi:~ $ docker ps -a | grep "blogo" | awk '{print $1}' | xargs -r docker rm -f
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.45/containers/json?all=1": dial unix /var/run/docker.sock: connect: permission denied
alfonsop123@raspberrypi:~ $ sudo docker ps -a | grep "blogo" | awk '{print $1}' | xargs -r docker rm -f
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Delete "http://%2Fvar%2Frun%2Fdocker.sock/v1.45/containers/702f3b43bd61?force=1": dial unix /var/run/docker.sock: connect: permission denied
permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Delete "http://%2Fvar%2Frun%2Fdocker.sock/v1.45/containers/5587f40d1b7e?force=1": dial unix /var/run/docker.sock: connect: permission denied
alfonsop123@raspberrypi:~ $

I am sorry, but I can't assist you further. It appears that there is a misunderstanding here. To resolve the error, please carefully read the message it provides as the solution often lies there. I can't be a support team for generic Linux issues, since it's very inefficient and time-consuming. A simple web search will give you the solution: https://is.gd/cUheno
I’m here to help with issues specific to blogo. For other problems, I recommend using resources like Stack Overflow or a quick web search. Learning to research and resolve issues independently will be more beneficial in the long run.
I tried to reproduce your issue locally, but following the steps I am able to host blogo locally without issues. If you have any problems that are directly related to blogo, please share and I will try to assist.

This is not completed, its still pending...


Errors     :D

I gave basic errors, you can edit them to your specifications.

Des

Thanks

app1 = App()
app2 = App()
app1.run()
app2.run()

Traceback (most recent call last):
   File "/file/path/", line 5, in <module>
    app2 = App()
AppError: can't create multiple App instances. Use tukaan.Window instead.

Please note this is only skeleton code: if you like it, you can keep it, if you don't, you don't have to, or you can make the final edits.

app1 = App()
app2 = App()
app1.run()
app2.run()

Traceback (most recent call last):
   File "/file/path/", line 5, in <module>
    app2 = App()
AppError: can't create multiple App instances. Use tukaan.Window instead.

Looks perfect!

Honestly, I don't see the point of this PR.
Since I'm using custom error messages everywhere in the code, there's no need for these defaults. The example just confirms this, these defaults have nothing to do with this example error.

app1 = App()
app2 = App()

Traceback (most recent call last):
   File "/file/path/", line 5, in <module>
    app2 = App()
AppError: can't create multiple App instances. Use tukaan.Window instead.

https://github.com/tukaan/tukaan/blob/5e25f488dd4f3960c2ff385fbb8c0a10eb31bf9a/tukaan/app.py#L25

Perhaps dig for more errors and add those here?


Added testing for the search endpoint

Closes #183

To-do: Add expected exception testing around the search endpoint.


publish new rpm/deb releases

RPMs for releases newer than 1.13 are not published (checked stable and unstable)
Related (closed) issue: https://github.com/kubernetes/release/issues/739
Posting this here to get more visibility.

RPMs and DEBs are available at https://build.opensuse.org/package/show/devel:kubic:libcontainers:stable:cri-o:1.21/cri-tools


An empty pull request mesage with a github template creates a wrongly titled PR

When a Github template is appended to a pull request message, and the first line is empty (no title), a pull request is still made with the templates first line as the title.
This seems to be happening because editor trims whitespace before the title and body are parsed.
Given a template such as:

----

Contributing Guidelines.md

Expected outcome:
Error message indicating empty title.
Actual outcome:
A PR will be created with the title ----
Demonstration
Here's a playground that simulates the steps.
https://play.golang.org/p/Vxx-QPQI2ka

Thank you for looking into this!
When we invoke the text editor, we try to process the text within the same way git commit would; i.e., hub tries to split title & body in an ideally identical way, down to stripping of commented-out lines and removing blank lines. You can see that git does the same:
$ git commit --allow-empty -F-
(reading log message from standard input)

----

Contributing
<Ctrl-D>

$ git show --pretty='%s' HEAD  # show subject
----
$ git show --pretty='%b' HEAD  # show body
Contributing

This feature doesn't seem great when combined with pull requests templates, though. Do you suggest that we stop trimming leading space in all cases? Could this potentially break excpectations of people when authoring messages in repos that don't have a template?

Of course!
Trimming out blank lines can make sense when you're expecting to start from an empty message. But it does start to break down when with templates.
I think it is a bit odd to manipulate user input in this case.  Attempting to find this elsewhere by removing spaces, especially with a template, seems like a stretch.
I understand the reasoning to stick with similar logic to git commit. But I might argue that it shouldn't do this either!
But I'm sure that making this change will break someones workflow.
I mean, you could only trim leading spaces if there isn't a template. But I think changes in logic based on something like that could end up being confusing.


fix for #8664: Emit folding ranges for multi-line where clauses

#8664
I added a test that assert folding multi-line where clauses while leaving single lined one. Please, let me know if the code needs further improvements.

There is_multiline check being done above already. For not hiding the where
clause itself, yeah, I guess we need a special case, but it seems that the
special case is better fit for the common code-path, not for the
continious_range one.
On Tue, 27 Apr 2021 at 17:39, m5tfi @.***> wrote:

@.**** commented on this pull request.
In crates/ide/src/folding_ranges.rs
https://github.com/rust-analyzer/rust-analyzer/pull/8674#discussion_r621274839
:

           // Fold where clause

           if node.kind() == WHERE_CLAUSE && !visited_where_clauses.contains(&node) {

               if let Some(range) =

                   contiguous_range_for_where(&node, &mut visited_where_clauses)

               {

                   res.push(Fold { range, kind: FoldKind::WhereClause })

               }

           }

But when we fold the where clause as a whole, it hides the where keyword
fn foo()where
A: Foo,
B: Foo,
C: Foo,
D: Foo, {}
will be:
fn foo()/* */ {}
instead of
fn foo()where /* */ {}
and i won't be able to check if it's a multi-line where clause or not, am
I missing something ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/rust-analyzer/rust-analyzer/pull/8674#discussion_r621274839,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANB3M3M4NCADY3QSOMS33DTK3EDTANCNFSM43T7UENQ
.

There is_multiline check being done above already

According to rustfmt (here). The indent_style of the where predicates defaults to "block". so, there will always be a newline \n.
fn foo()
where
    A: Foo,
{
}

Therefore, the is_multiline check above will always count where clauses as multi-line even if there was only one predicate.
So, I check if the first predicate matches the last one to make sure it's more than one, and start the fold at the end of the where keyword (second token) and end the fold at the end of the last comma (last token).
fn contiguous_range_for_where(
    node: &SyntaxNode,
    visited: &mut FxHashSet<SyntaxNode>,
) -> Option<TextRange> {
    let first_where_pred = node.first_child();
    let last_where_pred = node.last_child();

    if first_where_pred != last_where_pred {
        let mut it = node.descendants_with_tokens();
        if let (Some(_where_clause), Some(where_kw), Some(last_comma)) =
            (it.next(), it.next(), it.last())
        {
            let start = where_kw.text_range().end();
            let end = last_comma.text_range().end();

            visited.insert(node.clone());
            return Some(TextRange::new(start, end));
        }
    }
    None
}

I think my naming for the function might be misleading.

I am sorry, It's my third contribution ever on github and I made a couple of mistakes.
TLDR It is passing all the tests on my machine now.
I was working inside the ide crate and forgot to run tests for the whole project (outside the ide crate) before pushing. Then, I thought that I should merge with the recent commit in the original repo before trying to fix the failed test, but that failed another test (tidy::check_merge_commits) as I didn't know that I am not allowed to merge. So, I followed the stdout instructions, made a soft reset and fixed the issues.
Now, It's passing all of the tests on my machine. Can we try the github tests again please?

No worries about git! It took we a while to figure out a good workflow again. The tests are re-run automatically after every push.

I think my naming for the function might be misleading.

Yeah, seems like it! It looks like we handle  where clauses like a special case -- they are unlike items like mods that can be folded completely, and they are unlike items like uses or commets, which are folded if there's a consequiteve group of them.
So let's reflect this in code, and handle where clauses separaetly, without trying to mimic existing code.
In  particular, visited_where_clauses.contains(&node) seems to be just a remenant of consequitve logic and isn't needed for where clauses?

visited_where_clauses.contains(&node) seems to be just a remenant of consequitve logic and isn't needed for where clauses

That's true, sorry about that, i removed it now. I also renamed the function name to a better name (i think).

The tests are re-run automatically after every push.

It keeps giving me this message :

Shame on you for not trusting noobs (I am just kidding).

There's something I faced and couldn't solve. All the tests ran successfully locally on my Linux and on Github, but when I tried to run the tests locally on Windows10, It failed 2 tests:

tests::lexer_tests
tests::parser_tests

I checkout the oldest commit, before any of my changes, and these 2 tests still failed. Should I create an issue for it, or is it just something wrong with my development environment ?

failures:

---- tests::lexer_tests stdout ----

error: expect test failed
   --> D:\monkey\rust-analyzer\crates/syntax/test_data\lexer/ok\0006_chars.txt

You can update all `expect![[]]` tests by running:

    env UPDATE_EXPECT=1 cargo test

To update a single test, place the cursor on `expect` token and use `run` feature of rust-analyzer.


Fix bugs in opening hours

I think there has been a bug when merging different stuff, this should fix it. Sorry!

Thanks! 😊


[Storage] "BlobClient undelete" live test failure

This might be similar to the segment result having a valid nextMarker but an empty result array
BlobClient undelete
Failed 9h ago
Duration0:00:15.757
Failing build20200128.1
Ownernot available

Debug

Work items

Attachments

History

Attachments*

Error message
Cannot read property 'deleted' of undefined

Stack trace
TypeError: Cannot read property 'deleted' of undefined
    at /home/vsts/work/1/s/sdk/storage/storage-blob/test/blobclient.spec.ts:255:44
    at step (/home/vsts/work/1/s/common/temp/node_modules/.pnpm/registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:136:27)
    at Object.next (/home/vsts/work/1/s/common/temp/node_modules/.pnpm/registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:117:57)
    at fulfilled (/home/vsts/work/1/s/common/temp/node_modules/.pnpm/registry.npmjs.org/tslib/1.10.0/node_modules/tslib/tslib.js:107:62)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:229:7)

Thanks @jeremymeng , will take a look.

Another repro on 2/21/20:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=267022&view=ms.vss-test-web.build-test-results-tab&runId=8997566&resultId=100036&paneView=debug

Fixing this issue with #7293.
We suspect the "soft-delete enabling" won't take effect immediately/after waiting for 15 seconds.

Not seeing failures in last 30 days. Consider it fixed by #7293.


timecmd InvalidOperation at tme.ps1:7

InvalidOperation: C:\Users\nguyenc\scoop\apps\psutils\current\time.ps1:7
Line |
   7 |  & $cmd @args
     |    ~~~~
     | The expression after '&' in a pipeline element produced an object that was not
     | valid. It must result in a command name, a script block, or a CommandInfo object.

~#@❯ $PSVersionTable
Name                           Value

PSVersion                      7.2.0-preview.6
PSEdition                      Core
GitCommitId                    7.2.0-preview.6
OS                             Microsoft Windows 10.0.21390
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Same. I'm trying to run it from cmd.exe, so I need to type timecmd.
> timecmd
The expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name, a script block, or a CommandInfo object.
At C:\ProgramData\scoop\apps\time\current\time.ps1:7 char:3
+ & $cmd @args
+   ~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : BadExpression

00:00:00.0708228


Excalidraw: Publishing without files (images, PDF...)

Hi Ole,
I'm still working with your plugin and my digital garden works mostly fine 👍 One thing is bugging me, though:
When I export / publish an .excalidraw.md file, the transcluded (or linked) files like images or PDF-documents aren't uploaded automatically as they would from a normal Markdown note.
I looked into your code and saw, that there is no asset management for Excalidraw files (if I read it correctly - I'm still not very skilled in JavaScript). Because all linked and transcluded files are listed in the frontmatter of an Excalidraw file I guess it wouldn't be too hard to add this support.
Please don't bother looking into this, if I'm the only person using this feature!

This might be relevant:
https://docs.excalidraw.com/docs/codebase/json-schema#attributes
  // files data for "image" elements, using format `{ [fileId]: fileData }`
  "files": {
    // example of an image data object
    "3cebd7720911620a3938ce77243696149da03861": {
      "mimeType": "image/png",
      "id": "3cebd7720911620a3938c.77243626149da03861",
      "dataURL": "data:image/png;base64,iVBORWOKGgoAAAANSUhEUgA=",
      "created":<PHONE_NUMBER>454,
      "lastRetrieved":<PHONE_NUMBER>454
    }
    /* ...other image data objects */
  }


docker swarm join swallows errors

When joining as a manager, and the join fails (for example, when specifying an incorrect --advertise-addr value), docker swarm join does not report an error. Instead runs for awhile, and then exits silently, leaving the node in a bad state.
Example:
root@ip-172-31-12-164:~# docker swarm join --token <token> --advertise-addr <IP_ADDRESS> <manager addr>

root@ip-172-31-12-164:~# docker node ls

Error response from daemon: rpc error: code = 2 desc = raft: no elected cluster leader

cc @tonistiigi

#dibs

@aaronlehmann I am working to replicate this issue in my local environment. I have a few questions for you. First, is the ip address that you used for the --advertise-addr legitimate and just not for that host or on a different network that cant be reached by the rest of the swarm? Also, when you swarm join is that machine the first machine in the cluster?

Sorry if I am stepping on toes here. Just trying to get my feet wet with the docker project. We use docker for our app at work so I felt like it would be really cool to be able to contribute to a product that we use.

@srodman7689: Have a look at https://github.com/docker/docker/issues/26167, where this was first noticed. The symptoms in that issue were caused by the advertise address inadvertently getting set to an internal IP that the other managers couldn't reach.

@aaronlehmann great, thanks man! I will start looking into that now.

I reproduced the error specified above. Now just gotta figure out how to fix it lol.

@srodman7689 how's it going? Do you need help?

@thaJeztah so far I haven't been able to pin point where I should add the error message. I suppose that I might have started on a issue that was too deep in the code base. Help would be greatly appreciated.

@aaronlehmann would you be able to give some pointers where to look in the code and/or possibly an example?
@srodman7689 also feel free to join the #docker-dev IRC channel on freenode, and ask for assistance (not sure I'm personally able to assist here, but there's usually a someone around to help out)

@thaJeztah Thank you! I will check in with those guys after work and see if I can get any farther.

It looks like this code path is followed in Join (daemon/cluster/cluster.go):
        case <-n.Ready():
                go c.reconnectOnFailure(n)
                return nil

So the channel returned by Ready() gets closed, but that probably shouldn't be happening, because the new node doesn't join raft successfully.
Looking at what causes this channel to be closed, it's triggered by both the agentReady and managerReady channels being closed. In particular, managerReady is being closed prematurely. The runManager function in swarmkit's agent/node.go passes that channel to initManagerConnection
initManagerConnection performs a health check, and closes the channel once the health check succeeds.
Next, I look at the server-side code for the health check, in (*Manager).Run):
        // Set the raft server as serving for the health server
        healthServer.SetServingStatus("Raft", api.HealthCheckResponse_SERVING)
        localHealthServer.SetServingStatus("ControlAPI", api.HealthCheckResponse_SERVING)

        defer func() {
                m.server.Stop()
                m.localserver.Stop()
        }()

        if err := m.RaftNode.JoinAndStart(); err != nil {
                return fmt.Errorf("can't initialize raft node: %v", err)
        }

The ControlAPI health check is set to SERVING status before raft is started, which looks wrong to me. This seems to be the source of the problem. It lets the code in agent/node.go believe the manager has initialized successfully when it has not even joined raft yet.
If I remove this localHealthServer.SetServingStatus call to just after JoinAndStart, it seems to fix the immediate problem. Instead of getting no error, I get:
Error response from daemon: Timeout was reached before node was joined. The attempt to join the swarm will continue in the background. Use the "docker info" command to see the current swarm status of your node.

So I think a PR to https://github.com/docker/swarmkit that moves the initialization of the ControlAPI health check later should fix this bug. Note that the Raft health check initialization needs to stay where it is, because that's necessary for joining the raft cluster.
Let me know if you want to submit such a PR, or if I've spoiled all the fun, I can do it.

I can definitely do the PR. its the least I can do. Would it be ok to submit it after work tonight? It will be around 7 pm CST if that is ok.

Yeah, no time limit :)

Also, if raft isn't started yet, should we move the health setting
healthServer.SetServingStatus("Raft", api.HealthCheckResponse_SERVING)
to after the join and start as well?

And thanks for that man. I am really excited to start contributing to docker and you guys are awesome!

@srodman7689 thank you for contributing, it's really appreciated. Also, don't worry to make mistakes; we've all been there, and are there to help you (bear with us if it's busy and we don't respond in time :sweat_smile:)

I definitely will. And thank you again.

Also, if raft isn't started yet, should we move the health setting
healthServer.SetServingStatus("Raft", api.HealthCheckResponse_SERVING)
to after the join and start as well?

Nah, it's a bit of a special case. JoinAndStart needs this health check to be initialized already so the other side can verify its reachability.

Cool. thx.

I was able to go ahead and create the pull request https://github.com/docker/swarmkit/pull/1555

Thanks @srodman7689! :+1:
@aaronlehmann Can we close this issue? I'm not sure the fix made it into a SwarmKit vendoring yet.

Thanks @srodman7689! :+1:
@aaronlehmann Can we close this issue? I'm not sure the fix made it into a SwarmKit vendoring yet.

Not yet.

Looks like this was vendored (but I don't recall which version)


public call to close missing

libusb hidapi has a close function:
https://github.com/libusb/hidapi/blob/master/hidapi/hidapi.h#L481
This crate has a call to it via ffi::hid_close(device)
But the crate itself doesn't expose the close - is there a way how we could do it?
Problem is that we open a device multiple times what leads to errors after a couple of minutes and we would like to close it before opening it again.

i have the same question

If you want to close a device, you need to drop the HidDevice.


Update samtools and bcftools to version 1.14

Replacement for https://github.com/disq-bio/disq/pull/157 (see the detailed history there). In addition to the upgrades, this also repairs some sketchy VCF test files that newer versions of samtools reject; fixes a sketchy reads test; and contains a work-around for a samtools bug with counting unmapped reads.

We might want to wait until CI tests (https://github.com/disq-bio/disq/issues/160) are running again before we merge this.

Thanks, @cmnbroad!
Note the basic CI test is running and has passed for this pull request.  I agree that it would be good to wait to merge until the full end-to-end tests are running again.

Sorry to have let this drop for a while!  I will merge this now because adding a new Github Actions workflow needs to happen on the main branch.


Bug 2131165: Fixed in virtual machine statuses card the dark mode and removing icons

Signed-off-by: Dana Orr<EMAIL_ADDRESS>
📝 Description
In dark mode the additional status in the virtual machine statuses card was not visible enough.
And I removed the icons in the additional status because they are the same.
🎥 Demo
Before:

After:

/bugzilla refresh

/lgtm


Deprecated Values for IMS 0.1.20 HA OS 2024.1.3 11.4

IMS version: 0.1.20
Home Assistant OS
Core: 2024.1.3
Supervisor: 2023.12.0
Operating System: 11.4
Frontend: 20240104.0
Logger: homeassistant.const
Source: helpers/deprecation.py:205
First occurred: 12:40:33 (3 occurrences)
Last logged: 12:40:33
LENGTH_MILLIMETERS was used from ims, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfLength.MILLIMETERS instead, please create a bug report at https://github.com/t0mer/ims-custom-component/issues
PRESSURE_HPA was used from ims, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPressure.HPA instead, please create a bug report at https://github.com/t0mer/ims-custom-component/issues
SPEED_METERS_PER_SECOND was used from ims, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfSpeed.METERS_PER_SECOND instead, please create a bug report at https://github.com/t0mer/ims-custom-component/issues

Fixed. Would be available on next version, for now it's just a log warning


DiffChange is hijacked for changed line in SignColumn

Description
It looks like suddenly my color setting for 'DiffChange' is now used for the coloring of changed lines indicator in SignColumn. The other color settings 'DiffAdd' or 'DiffDelete' don't seem to affect Gitsigns line change indicators in SignColumn.

Neovim version
v0.9.5 (LuaJIT 2.1.1702233742)
Operating system and version
Linux
Expected behavior
'DiffChange' not to affect the line change indicator, because I want to keep it this way for my diff views.
Actual behavior
'DiffChange' affects the line change indicator in SignColumn.
Minimal config
for name, url in pairs{
  gitsigns = 'https://github.com/lewis6991/gitsigns.nvim',
  ayu = 'https://github.com/Shatur/neovim-ayu'
} do
local install_path = vim.fn.fnamemodify('gitsigns_issue/'..name, ':p')
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system { 'git', 'clone', '--depth=1', url, install_path }
end
vim.opt.runtimepath:append(install_path)
end

require('gitsigns').setup()

require('ayu').colorscheme()
require('ayu').setup {
  overrides = function()
    if vim.o.background == 'dark' then
      return {
        LineNr = {fg = '#6e6e6e'},
        Normal = {fg = '#e6e1cf', bg = '#0a0e14'},
        NormalNC = {bg = '#21201c'},
        DummyDum = {bg = '#21201c'},
        SpecialKey = {fg = '#3c87d3'},
        CursorLine = {bg = '#1d222a'},
        ColorColumn = {bg = '#1f1f1f'},
        WinSeparator = {fg = '#2d5986', bg = '#0a0e14'},
        Visual = {bg = '#3d3d3d'},
        Search = {fg = '#0f1419', bg = '#ebd460'},
        DiffAdd = {fg = '#5f87af', bg = '#0a0e14'},
        DiffChange = {fg = '#5f87af', bg = '#0a0e14'},
        DiffDelete = {fg = '#5f87af', bg = '#0a0e14'},
        DiffText = {fg = '#ffee05', bg = '#e00000', bold = true},
        Directory = {fg = '#8798ab'},
        Comment = {fg = '#8b96a2'},
        Folded = {fg = '#4385cb', bg = '#14191f'},
        FoldColumn = {fg = '#7493b4', bg = '#14191f'},
      }
    else
      return { NormalNC = {bg = '#f0f0f0'} }
    end
  end
}

Steps to reproduce

mkdir gitsigns_issue
cd gitsigns_issue
git init
touch file
git add file
git commit -m 'initial commit'
nvim --clean -u minimal.lua file
Add lines
commit lines
change some lines
delete some lines
add some lines
watch messed up Change line indicator in SignColumn
make some changes in 'DiffChange'
see how change line indicator in SignColumn changes
make some changes in 'DiffAdd'
see how change line indicator in SignColumn ISN'T changed
same with DiffDelete

Gitsigns debug messages
No response
Gitsigns cache
No response

Gitsigns has its own set of highlights defined in the docs. It will default to some fallbacks but for the best experience these need to be defined.

Thank you for the quick reply.
I found the missing settings for me:
GitSignsAdd = {fg = '#0cbb0c', bg = '#0a0e14'},
GitSignsChange = {fg = '#2085e9', bg = '#0a0e14'},
GitSignsDelete = {fg = '#e00000', bg = '#0a0e14'},
Yet I could omit the setting 'bg' here, as this is already set by SignColum highlight group.
Thank you very much for developing this very useful plugin working in the background, but much more needed than obvious.


Discriminated Unions for CSSRule

There are a few types in lib.dom.d.ts that reference a type property that corresponds to a constant number. For instance, CSSRule has a "type" property that can be set to one of (CHARSET_RULE, FONT_FACE_RULE, etc...) depending on which type of rule it is. These are constants defined as a particular number in the spec. Would it be possible to make CSSRule a union type (of the various types of CSSRules) discriminated by a specific constant type property on each concrete CSS Rule type?
This same question applies to other DOM constructs as well (Node['nodeType'] comes to mind at the moment) but I figure those may not be the place to start doing this.

I just came across this issue while working on a CSS-in-JS library. Currently, an assertion needs to be made after checking for the value of CSSRule.type.


Add support of multiple instance of bots

Let's imagine that we have installed 2nd bot on the same VPS server.
So right now when we will try to stop bot from 2nd bot, it will stop also from 1st bot.
More details about impelemention of finding and killing processes which is used in stop_bot function

This seems like a big feature to implement.
By multiple bot instances support do you just mean killing only one of the two instances or add full ability to switch and control both from telegram?
If we just manage to distinguish the killing the user could create two telegram bots and manage them saparately that way.

Each binance-trade-bot should have its own telegram bot.
So when I like in BinanceTradeBot1 it should kill first bot of binance-trade-bot and it should not touch process of 2nd bot.
So we should know that we are killing the process from a folder of settings.ROOT_PATH variable and not all processes of binance-trade-bot.
So for that case we are getting all of processes and check with pwdx command that specific PID is related to BTB-manager-telegram.

We should also be managing process killing before updates of not only Binance Trade Bot but also BTB Manager Telegram.


python version

wich python version is originaly intended for this repo? had problems loading mels from disk had to improvize, also compatibility issues betwen tensorflow 1.15.2 and numpy 1.13

3.6. not pyhon is the problem but incomplete requirements/instructions


strokeStyle不支持渐变吗

还没有做渐变额
2018-06-10 23:06 GMT+08:00 wuqu85<EMAIL_ADDRESS>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/bobiscool/wxDraw/issues/76, or mute the thread
https://github.com/notifications/unsubscribe-auth/AIpyqa1cGL20BHEnZyHp_1Iv99Y747Ghks5t7TXegaJpZM4UhwAW
.


[Comms] Görli Testnet Contributors Call #0

Görli Testnet Contributors Call #0
Date / Time

Friday, November 16th, 2018
9pm UTC

Agenda

Hello, world!
Overview roadmap & milestones

Clique and Aura
Görli and Classic
Cores and Tools

Progress current tasks

Website for Görli
Testnet bridges
Görli to replace Ropsten
Görli Classic to replace Morden Classic

Client updates

Parity Ethereum w/ Görli
Nethermind w/ Görli

Discussion open issues
Outlook

All contributors and volunteers invited. Join Gitter for invite: gitter.im/goerli/testnet

@noot & @CFDevelopment will have a demo of the bridge and bridge UI!

+1
=roninkaizen ;-)

Here's a gift from the Geth team :) https://github.com/ethereum/go-ethereum/pull/18121

Btw, just my 2c on "Görli to replace Ropsten". I don't think that's a wise decision. I think the "official" Ethereum test network should always try to mimic mainnet as much as possible, and most essentially use the same consensus mechanisms to detect issues before they have a chance to hit mainnet (e.g. difficulty adjustment consensus issue).
Having a PoA testnet too  for developers is fine. Wiping and relaunching a new PoW "official" testnet is also fine. Lets just not make the mistake of killing the primary testing point of Ethereum.

I'll be there! Is the plan forward for Kovan and Rinkeby going to be discussed or is that out of scope for this meeting? If Infura is going to add support for Goerli, it'd be great to be able to understand if we are committing to supporting a replacement for one of the existing testnets or an additional testnet.

Here is the recording of the livestream from the call: https://youtu.be/TWak0-Rnves

Awesome, thank you!

Ok, I've slept on it. I don't feel so strongly about a PoW testnet any more, as long as we make hard forks more strict and add an additional "private" PoW fork test before touching any testnet.

  But if nobody keeps it alive, I'm not sad if Ropsten dies.

i see it from a more practical "point"-
as there are enough people still willing to run ropsten the way,
they did "so far" us as community with the "newer" engine can only offer them to look around,
if that testing conditions are better or same ways "productive" as with with ropsten itself.
time will show which kind of structure will be kept up, cause running such systems/nodes can cost money if you do not use solar-panels on your own house. and one house is not a network ;-)
in this case the community of devs i have met are interested in an "not pure parity" PoA-Testnet
with pairing possibilites of geth and nethermind as well as pantheon.
a broad variety of client types made me join ethereum "ealier days"-
why should this principle be changed while providing testnet-structures?
As long as it is a valid testplattform,  devs will use the clique engine to find about its inherent health and possibilities.
More variety within a testnet is a win but not a must-
we decide about it, while using a network to test.
there is no win situation for ropsten for sure, neither for goerli-
it`s an approach and with goerli i see different possibilities of chain-structures now
much more clear.
at the end the networks will "co"exist as chains exist which needed to be tested and people are willing and able to run such structure "long-term" mostly uninterrupted.

Closing in favour of #33

Recording: https://www.youtube.com/watch?v=TWak0-Rnves


on windows8.1 compiler error

1. SDK version（SDK 版本）
{
SW_V2112_csdk
}

2. In what kind of operation problems appear, and how to reproduce the problem ?（什么样的操作步骤问题会出现，是否是稳定复现，如何复现问题？）
{
Yesterday I updated my OS from windows 7 to windows8.1.But SDK is not compiling errors are given below:
C:\projects\GPRS_C_SDK>build.bat demo adc
CSDTK PATH: C:\CSDTK42
build folder exist
number of processors: 4
Build host is WINDOWS
MAKE              init
MAKE              libs
MAKE              libs/gps
MAKE              libs/gps/minmea
PREPARING         libgps_debug.a
MAKE              libs/utils
MAKE              libs/cjson
PREPARING         liblibs_debug.a
MAKE              demo/adc
LDGEN  by csdk    cust.ld
LD                adc.elf
ElfCombine        Elf binary & map file
GEN               stripped (rm syms) elf file adc.elf
mips-elf-ld.exe: hex/adc/adc.elf: access beyond end of merged section (-99877376)
CP                AUDIO CFP FILE......
AUDIO CFG         No audio cfp file
SREC              adc.srec for flash/romulator
53
C:/projects/GPRS_C_SDK/platform/compilation/cust_rules.mk:543: recipe for target 'bin' failed
make[1]: *** [bin] Error 181
C:/projects/GPRS_C_SDK/platform/compilation/cust_rules.mk:371: recipe for target 'lod' failed
make: *** [lod] Error 2
ROM    total:1048576 Bytes     used:688 Bytes
RAM    total:1048576 Bytes     used:16 Bytes
Start Time : 17:27:54.91
End   Time : 17:28:05.66
Build Time : 10.975s
C:\projects\GPRS_C_SDK>
}

after installing visual c++ redistributable 2010 problem solved.


aws: flip async provider runtime guard to default true

Commit Message: flip async provider runtime guard to default true
Additional Description: per https://github.com/envoyproxy/envoy/pull/30626#issuecomment-2286396182
Risk Level: Low
Testing: Unit
Docs Changes: Changelog
Release Notes:
Platform Specific Features:
[Optional Runtime guard:] envoy_reloadable_features_use_http_client_to_fetch_aws_credentials
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

/wait


modify regbuild to fix one bug

when there is no space between the 'destination file name' and the end of comment tag, meanwhile there is some comment in this block, the bug occurs. just like this:
<!-- build:js scripts/combined.concat.min.js-->
<!-- some comment -->
<script type="text/javascript" src="scripts/this.js"></script>

<script type="text/javascript" src="scripts/that.js"></script>
<!-- endbuild -->

so I send a pr to fix this bug.
btw, this repo's version has not updated.
thanks!

Thanks. Published as 0.3.12.


Cassandra 2.2.3

Install is failing: http://bot.brew.sh/job/Homebrew Versions Pull Requests/1143/version=el_capitan/testReport/junit/brew-test-bot/el_capitan/install_homebrew_versions_cassandra22/
Audit is failing too: http://bot.brew.sh/job/Homebrew Versions Pull Requests/1143/version=el_capitan/testReport/junit/brew-test-bot/el_capitan/audit_homebrew_versions_cassandra22___strict___online/
Also, can you squash this to a single commit? Thanks!

Yeah sorry about that, I'm still working on it. Trying to figure out why https://archive.apache.org/dist/cassandra/2.2.3/apache-cassandra-2.2.3-bin.tar.gz fails on wget but downloads ok on the browser.

@mikemcquaid Do you have any docs or pointers on whats best to add for the test block?

@djchen Something like what jenkins.rb does in Homebrew core would be good. If you're feeling extra-kind a PR to add that to the Homebrew core Cassandra formula would be great too.

Thanks for the pointers. I looked at the possibility of the doing the same thing with Cassandra and did not see a good way of telling it to use the tmp dir for writing data to. I've added a very basic test do block for now.

@djchen That's fine for now. Mind making a pull request with the test block to Homebrew's main repository for cassandra.rb too? Thanks!

Will do on the PR to the main repo. Desc updated, should be under 80 chars now.

@mikemcquaid Are we good to merge this?

Thanks for your contribution to Homebrew!  You rock!
Apologies for the delay here!


URI.parse should not use decodeURIComponent when parsing the querystring of a clicked link

VSCode Version: 1.25.0-insider b7e6e04666ca8dde560b69081c43365dce77d12a
OS Version: Mac OS 10.12.6

Steps to Reproduce:

In a comment in any code file, type https://google.com/?a=%2B
Command-clicking it should open https://google.com/?a=%2B in a browser
Instead, it loads https://google.com/?a=+ which is not the same URL (an HTTP server would parse this as {a: ' '} rather than {a: '+'} as intended)

Does this issue occur when all extensions are disabled?: Yes
Root cause seems to be that https://github.com/Microsoft/vscode/blob/6fae52876b1f9e549a6e1b91789d5fff82d61f0c/src/vs/base/common/uri.ts#L228 calls decodeURIComponent on the query string.
This is incorrect behavior, as the query string '+' is distinct from the query string '%2B'. For instance, if you have a script that, when run, prints a URL that url-encodes an email address like<EMAIL_ADDRESS>in a query parameter, when clicked, the browser would send a query parameter that would decode on the server to test<EMAIL_ADDRESS>The correct fix would be to have the URI class represent query strings in their encoded form, only decoding them as needed. But this might cause problems with other users of the class that have relied on the assumption that the query string is decoded.
(Note that it would be incorrect to do the inverse; calling encodeURIComponent on the decoded query string would change all the ampersands delimiting query parameters into their encoded equivalents.)
This would likely fix https://github.com/Microsoft/vscode/issues/32026 but this problem is more general.

This has nothing to with parse but with toString, esp. toString(skipEncoding: boolean) which is how we call it when opening uris for the browser (which will then do the http-specific encoding).
@bpartridge What is your issue here? Is this just a dupe of #32026?


[$250] Migrate PronounsPage.js to function component

Class Component Migration
Filenames

[ ] src/pages/settings/Profile/PronounsPage.js

type: React.Component
has state values: true
has refs: false
has context: false
lifecycle methods: componentDidUpdate

Task

We currently have some class components in our codebase that we would like to refactor to a function component.
Here's a link with some general advice on how to refactor a class component to a function component: https://react.dev/reference/react/Component#alternatives
If you need additional guidance, please ask in #expensify-open-source
Test for any regressions and verify that there are no breaking changes

@mountiny taking this issue off HOLD as per this Slack post
IMPORTANT: If anything unexpected pops up during the refactor/review:

[ ] Take it to #expensify-open-source to get clarification on.
[ ] Prefix the conversation with [HOOK REFACTOR] so that we can find it easily.
[ ] Link the result of the conversation in this section of the Design Doc titled “Best Practices Conversations”
[ ] Add it to the STYLE.md guide in this open PR so we can reference it and apply any teachings in the next phase

Thanks, making this weekly as I am currrently working on Roadmap issue.

⚠ Could not update price automatically because there is no linked Upwork Job ID. The BZ team member will need to update the price manually in Upwork.

Heads up! The pricing for this issue has been adjusted based on the scope of the work and the fact that no complex bug investigations or proposal are required.

havent priritized this with manual requests and app deploy

Shipped th manula requests, now I will work on those and hopefully get time for this one too

low priority

@mountiny I can grab it from ya if you can't prioritize it. shouldn't take too long.

@marcaaron go ahead, i will be out for the conference half of the next week too so wont get to this most likely.
Are there still some left tho for later? Would love to make some refactoring on my own to make sure i improve my hooks/ functional components skills

I will try to look into this this week

stil would love to do this

@mountiny can I volunteer for this?

Would love to work on this.

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/~01f14689d635da27eb

@priyeshshah11 Do you have any other functional component issues assigned to you?

I want to work on this issue

Would love to take this.

I would like to take this

@priyeshshah11 Do you have any other functional component issues assigned to you?

@mountiny No I don't

Thanks everyone, be on a look out for other migration issues, assigning @priyeshshah11  as they were the first one to raise hands after the announcement

Hey! Idk. How is it even fair when people who are on slack get an update regarding that issue they try to work on it but if there is no place where you get to know that the issue is created then how can someone comment or work for it?

@Vishrut19 Are you not in slack channel? You should definitely be there. Here you have contributing guidelines https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md

I am there on the Slack channel. When I commented on this issue at that moment only I saw about this issue on slack as well.

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/~019cd393456c38df2c

I would like to work on this issue

Offers sent to @priyeshshah11 and @aimane-chnaif on Upwork

@lschurr I am OOO til 19 June, adding you in case this gets merged and deployed this week and is eligible for payment before I am back. Thanks

Still up for this if the task frees up

I am also available since very long

The issue has Reviewing label and there is open PR to solve it here https://github.com/Expensify/App/pull/20178, this is not available to work on.

Regressions not relevant here, everyone has been paid in Upwork, closing

Hi @laurenreidexpensify & @mountiny, I asked this question in #20095 & had a chat with Christina (the bug-zero member in that issue) & was told to ask that question here.
So I am just asking that if there are two issues & someone fixes them both within one PR shouldn't they get paid for the one that has the higher compensation if not for both?

Oh sorry, maybe I shouldn't have reopened this GH just trying to bring attention to @priyeshshah11 comments ^. I can help with questions about https://github.com/Expensify/App/issues/20095 - @priyeshshah11 was not compensated in that GH because I only paid the reporter on the GH.
I suggested @priyeshshah11 bring the compensation into this GH since this is where the fix happened.

I'll close the issue - sorry I don't think it needs to be open to discuss payment

@priyeshshah11 sorry for this, it would be helpful to write it down here.

what PR you have written
which issues did it solve
how much you got paid?

That will help us quickly take a loook if we should add more compensation, thanks!

@priyeshshah11 sorry for this, it would be helpful to write it down here.

what PR you have written
which issues did it solve
how much you got paid?

That will help us quickly take a loook if we should add more compensation, thanks!

@mountiny yeah sure

I created this PR https://github.com/Expensify/App/pull/20178
It solved #16296 & fixed #20095
I only got paid $250 for #16296

Thanks reopened the other issue

Yes, feel free to comment there


Remove GitInfoContributor unnecessary value processing

Removes unnecessary time-related values processing from GitInfoContributor. Resolves #706.

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

/azp run

After further review, I understand a bit more what's happening here. Steeltoe is missing a piece that Spring has, and that's configurable serialization of this value (and others). Spring converts it to epoch time and lets the serializer decide what it should look like over the wire. This piece must have just been missed originally
Your current change is good, and we internally went back and forth on it but are thinking the time should still be parsed, and as a follow-up the serialization options should be made configurable

Thanks @DaviGia


Close button in rewarded Ad doesn't work

I'm trying to use the rewarded AdUnit and after presenting the advertisement, the close button (at the right top corner) doesn't work! (in Android application):
here is my system information:
System:
OS: macOS 11.1
CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
Memory: 18.62 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 13.13.0 - /usr/local/bin/node
Yarn: 1.22.5 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.1 - /usr/local/bin/pod
SDKs:
iOS SDK: Not Found
Android SDK:
API Levels: 25, 27, 28, 29
Build Tools: 27.0.3, 28.0.3, 29.0.2
System Images: android-28 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 3.2 AI-181.55<IP_ADDRESS>56338
Xcode: /undefined - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_121 - /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.63.4 => 0.63.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

@aliunco - Can you email me at<EMAIL_ADDRESS>We can track down the bad ad together.

@aliunco - Can you email me at<EMAIL_ADDRESS>We can track down the bad ad together.


Possible Rule: no hover without focus

It would be helpful to have a rule that suggested you shouldn't have onMouseEnter / onMouseLeave without also mapping those to onFocus / onBlur. (Ideally, I guess we'd use onFocusIn / onFocusOut when those come to react...)
I'm auditing an an app right now where a warning for this would have sent a good reminder about keyboard accessibility. :)

Additionally, it seems like no-static-element interactions would benefit from recommending onMouseEnter / onMouseLeave be added to the list?
https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md#rule-details
I support you could use a callback for simply toggling presentational visual content, where there's likely not an accessibility concern, but that seems unlikely given the :hover pseudo-selector works just fine.

Additionally, it seems like no-static-element interactions would benefit from recommending onMouseEnter / onMouseLeave be added to the list?

@cycomachead this is configurable.

It would be helpful to have a rule that suggested you shouldn't have onMouseEnter / onMouseLeave without also mapping those to onFocus / onBlur. (Ideally, I guess we'd use onFocusIn / onFocusOut when those come to react...)

Yes, I could see this being helpful. Please do propose a PR if you have the time!