Make CkIO safe to use in real application code with proper flush and close calls

Original issue: https://charm.cs.illinois.edu/redmine/issues/27

No body.

Original date: 2013-04-02 21:14:20

Has work resumed on this now that the release is out?

Original date: 2013-05-21 23:59:54

Jim's initial comments from January:

Looking at the current CkIO interface I don't see any way to close or flush a file or to write other than at the beginning of the file.
I think the following interface would be sufficient and general:
void openOutputFile(const char *name, CkCallback ready,
Options opts = Options());
void prepareWrite(Token token, size_t bytes, size_t offset,
CkCallback ready, CkCallback complete);
write() would only need to be modified to handle non-zero offsets
passed to prepareWrite, and it would need to be specified if the
offset passed to write was added to the prepareWrite offset.  It
appears that write can be called multiple times to write at different
offsets and still operate properly.
void closeFile(Token token, CkCallback complete);
For trajectory files usage would look like this:
pe 0 calls openOutputFile()
ready callback calls prepareWrite() for header
ready callback calls write() for header
while ( more steps ) {
complete callback calls prepareWrite() for next frame
ready callback broadcasts to NAMD IO pes
NAMD IO pes call write() for frame
complete callback calls prepareWrite() for header
ready callback calls write() for header
}
complete callback calls closeFile()
For restart files there would probably be two files opened permanently and renamed and over-written without being closed and re-opened.  For each file this would look like:
pe 0 calls openOutputFile("restartname.tmp")
ready callback calls prepareWrite()
ready callback calls write() for header and broadcasts to NAMD IO pes
while ( more steps ) {
NAMD IO pes call write() for frame
complete callback calls {
rename("restartname","restartname.old")
rename("restartname.tmp","restartname")
rename("restartname.old","restartname.tmp")
swap file tokens or open "restartname.tmp" if needed
prepareWrite()
}
ready callback calls write() for header and broadcasts to NAMD IO pes
}
This seems to make every pe open the file, not just the active ones:
if (((CkMyPe() - opts.basePE) % opts.skipPEs == 0 &&
CkMyPe() < lastActivePE(opts)) ||
true) {
files[token].fd = openFile(name);
}
This error reporting is useless:
CkPrintf("Output failed on PE %d: %s", CkMyPe(), strerror(errno));
CkAbort("Giving up");
The string passed to CkAbort needs to contain the name of the file and the error string.

And his subsequent comments:

Thinking about the interface some more, there is no need for a barrier after prepareWrite().  The output pes can either buffer output until that message arrives or write any full stripes and wait for the offset and bytes message to write the partial stripes at the beginning and end of the block.  If writes are not buffered then only the size needs to be defined. That would make the interface more like this:
void openOutputFile(const char *name, CkCallback ready,
Options opts = Options());
void setWriteRange(Token token, size_t bytes, off_t offset,
CkCallback complete);
// requires setWriteRange, must fill range exactly
void bufferedWrite(Token token, const void *data,
size_t bytes, off_t offset);
void setWriteSize(Token token, size_t bytes, CkCallback complete);
// can have gaps, should not be mixed with bufferedWrite calls
void unbufferedWrite(Token token, const void *data,
size_t bytes, off_t offset);
void closeFile(Token token, CkCallback complete);
For trajectory files usage would look like this:
pe 0 calls openOutputFile()
ready callback calls setWriteRange() and write() for header
while ( more steps ) {
complete callback calls setWriteRange() for next frame
and broadcasts token to NAMD IO pes
NAMD IO pes call write() for frame
complete callback calls setWriteRange() and write() for header
}
complete callback calls closeFile()
For restart files there would probably be two files opened permanently and renamed and over-written without being closed and re-opened:
pe 0 calls openOutputFile("restartname.tmp")
ready callback calls setWriteRange() for entire file
and write() for header
and broadcasts token to NAMD IO pes
while ( more steps ) {
NAMD IO pes call write() for frame
complete callback calls {
rename("restartname","restartname.old")
rename("restartname.tmp","restartname")
rename("restartname.old","restartname.tmp")
swap file tokens or open "restartname.tmp" if needed
setWriteRange() for entire file
write() for header
broadcasts token to NAMD IO pes
}
}

Original date: 2013-06-04 21:51:51

Need to ensure that rewriting already open files works, to reduce metadata load.

Original date: 2013-07-09 22:55:12

Now have revamped design implemented on branch phil/ckio-next. The documented public API can be seen in "ckio.h":http://charm.cs.illinois.edu/cgi-bin/gitweb.cgi?p=charm.git;a=blob;f=src/libs/ck-libs/io/ckio.h;hb=refs/heads/phil/ckio-next .
Still to do are

Correctness
** -Testing-
** Avoid leaking resources: Deleting session -array elements and the array itself- (Issue #251) once each session is complete
Performance improvements (basics)
** properly mapping the session array elements to PEs
** -limiting open calls to just PEs that (may ever) have elements-
** benchmarking
Portability
** -implementing fallbacks from fdatasync() where that's not available, to (in general order of preference) fsync(), sync(), or nothing.- On Blue Waters sync() is known to pose trouble, so that may be left out of the line-up.
Application Convenience
** -implementing a form of session with a specified 'commit' write to wrap it up after the synchronization but before signalling completion-

Original date: 2013-07-10 16:51:09

Jim's comments:

Looking at redmine, I have no idea what this means:  "implementing a form of session with a specified 'commit' write to wrap it up after the synchronization but before signalling completion"

void startSession(FileReadyMsg *file, size_t bytes, size_t offset, CkCallback ready,
                  char *commitData, size_t commitBytes, size_t commitOffset,
                  CkCallback complete);

The idea is to specify a small write to be performed after the rest of the data is committed to storage (sync calls done). This is exactly the use case of NAMD's trajectory file write - the session is a frame, and the commit write is the file header update to reflect the added frame.

I think file offsets should be off_t rather than size_t.

In general, I would agree with you on that, and in fact tried it early in the initial CkIO development. The trouble is that off_t is defined by POSIX, not C or C++, and so doesn't exist on Windows. Its only difference from size_t is that it's signed rather than unsigned. This only matters when doing pointer-relative seeks. Since writes in CkIO's API are all at absolute positions, the lack of negative range doesn't matter.

The existing error handling is competely unusable for production code. You need to at least print an error message with the name of the file (not done anywhere), what operation failed, and strerror(errno) (missing from open) so the user has some idea what has gone wrong.  The full error message needs to go to CkAbort and not be hidden in a CkPrintf somewhere, and it needs to start with something really loud like "FATAL ERROR:".
The return value of fsyncdata() is not checked, which is a problem since it can return errors from previous write calls.

All system calls are now checked, and their failures reported fully and explicitly.

In the public interface, peStripe and writeStripe would be clearer if they were called stripeSize and writeSize.
For activePEs, basePE, and skipPEs I think the convention is to not capitalize the e in "Pe".

I'll consider the names again, and figure out whether those or something else seems best.

Original date: 2013-07-24 00:05:27

Further revisions made to address Jim's comments and concerns - testing, interface being fully defined, serializability, and event matching.

Original date: 2013-08-09 17:39:31

Caught a bug in the implementation of #226 while implementing session commits. It works now. All that's left is mapping, benchmarking, and tuning.

Original date: 2013-08-22 18:50:21

#275 will be the continuation for performance testing, tuning, etc.

Original date: 2013-08-28 22:48:28

Windows builds now compile successfully.


Remove noop casts in the C code

The casts in the C code prevents implicit casting (e.g., with arithmetic), as defined by the C standard, which is unintuitive. However, many of the casts are noops.
Remove noop casts in the C code generator.

Do you want to allow implicit casts happen? Why is it good?

No, I don't want to allow implicit casts. But implicit casts are part of the C standard, e.g., when doing arithmetic on types with sizes smaller than int.
That's why the generated C code explicitly casts on every operation. But it does so even when it is unnecessary. For example, currently, we can have code like the following, where a, b, and c are uint8_ts:
uint8_t x = (uint8_t) (a + (uint8_t) (b + c))

But the extra typecasts are unnecessary in this context. They are, however, important for comparisons:
bool x = a - b < 0

in which a and b are implicitly cast from uint8_t to a signed int. The comparison is done as an int type, in which case a-b can be negative, if there was overflow.
It's a trade-off trying to have a cleaner backend vs. possibly running into implicit cast surprises.

a and b are implicitly cast from uint8_t to a signed int

possibly running into implicit cast surprises

I find it a very complicated implicitness. I like very much how Ivory gives me strict typing in C programs, and I don't want to lose it.

You are probably right. This could be a lot of error-prone work in the C backend for not a lot of gain and potential bugs. I'll close this ticket.


chore: sort public call requests in the circuits

This removes some patching we were doing in TS around the public call stack items.
Now, we follow the existing pattern to sort public call stack items in TS, then assert the sort in the circuit.
The only difference is that call stack items need a reverse sort, so the one with the lowest side effect counter is last (and so is run first).
Also, started making circuit types in TS readonly.

Benchmark results
No metrics with a significant change found.

Detailed results
All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call  to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.
This benchmark source data is available in JSON format on S3 here.
Proof generation
Each column represents the number of threads used in proof generation.

Metric
1 threads
4 threads
16 threads
32 threads
64 threads

proof_construction_time_sha256
5,738 (+2%)
1,564 (+1%)
719 (+1%)
758 (-2%)
774 (+1%)

L2 block published to L1
Each column represents the number of txs on an L2 block published to L1.

Metric
8 txs
32 txs
64 txs

l1_rollup_calldata_size_in_bytes
1,412
1,412
1,412

l1_rollup_calldata_gas
9,452
9,464
9,476

l1_rollup_execution_gas
616,093
616,105
616,117

l2_block_processing_time_in_ms
1,358
5,139 (+1%)
10,208 (+1%)

l2_block_building_time_in_ms
47,399 (-1%)
187,991
375,354 (+1%)

l2_block_rollup_simulation_time_in_ms
47,227 (-1%)
187,352
374,080 (+1%)

l2_block_public_tx_process_time_in_ms
25,361 (-2%)
105,869
216,780 (+1%)

L2 chain processing
Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric
3 blocks
5 blocks

node_history_sync_time_in_ms
10,012 (+1%)
15,266

node_database_size_in_bytes
14,508,112
21,340,240

pxe_database_size_in_bytes
18,071
29,868

Circuits stats
Stats on running time and I/O sizes collected for every kernel circuit run across all benchmarks.

Circuit
protocol_circuit_simulation_time_in_ms
protocol_circuit_witness_generation_time_in_ms
protocol_circuit_proving_time_in_ms
protocol_circuit_input_size_in_bytes
protocol_circuit_output_size_in_bytes
protocol_circuit_proof_size_in_bytes
protocol_circuit_num_public_inputs
protocol_circuit_size_in_gates

private-kernel-init
159
3,636
22,032 (-1%)
19,990
61,798
86,720
2,643
1,048,576

private-kernel-inner
607
4,204
47,331 (-3%)
88,862
61,798
86,720
2,643
2,097,152

private-kernel-tail
553 (+5%)
3,142 (+11%)
35,407 (+1%)
92,957 (+7%)
76,438
10,624
265
2,097,152

base-parity
6.50
1,242 (+1%)
2,905
128
64.0
2,208
2.00
131,072

root-parity
49.9 (+1%)
69.8 (-1%)
44,239 (+1%)
27,084
64.0
2,720
18.0
2,097,152

base-rollup
809 (+2%)
2,314 (+1%)
74,134
119,578
756
3,648
47.0
4,194,304

root-rollup
114 (-2%)
67.9 (+5%)
19,658 (+2%)
25,297
620
3,456
41.0
1,048,576

public-kernel-app-logic
526 (+1%)
2,864 (+1%)
46,969 (+1%)
103,405
84,766
116,832
3,584
2,097,152

public-kernel-tail
1,196
25,972
155,116
393,850
7,490
10,624
265
8,388,608

private-kernel-reset-small
581 (+1%)
2,274 (+2%)
26,484 (+8%)
118,173
61,798
86,720
2,643
1,048,576

merge-rollup
28.8
N/A
N/A
16,534
756
N/A
N/A
N/A

public-kernel-setup
631 (+1%)
N/A
N/A
103,405
84,766
N/A
N/A
N/A

public-kernel-teardown
536 (+2%)
N/A
N/A
103,405
84,766
N/A
N/A
N/A

private-kernel-tail-to-public
N/A
9,685 (+3%)
82,976 (+1%)
N/A
N/A
116,832
3,584
4,194,304

Stats on running time collected for app circuits

Function
app_circuit_proof_size_in_bytes
app_circuit_proving_time_in_ms
app_circuit_size_in_gates
app_circuit_num_public_inputs

SchnorrAccount:entrypoint
16,128
46,110
2,097,152
437

Token:transfer
16,128
46,163 (+8%)
2,097,152
437

Tree insertion stats
The duration to insert a fixed batch of leaves into each tree type.

Metric
1 leaves
16 leaves
64 leaves
128 leaves
512 leaves
1024 leaves
2048 leaves
4096 leaves
32 leaves

batch_insert_into_append_only_tree_16_depth_ms
11.3
18.4
N/A
N/A
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_16_depth_hash_count
16.7
31.8
N/A
N/A
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_16_depth_hash_ms
0.658
0.566
N/A
N/A
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_32_depth_ms
N/A
N/A
53.1
80.9
262 (-1%)
505
987
1,959
N/A

batch_insert_into_append_only_tree_32_depth_hash_count
N/A
N/A
95.9
159
543
1,055
2,079
4,127
N/A

batch_insert_into_append_only_tree_32_depth_hash_ms
N/A
N/A
0.544
0.499
0.475 (-1%)
0.471
0.468
0.468
N/A

batch_insert_into_indexed_tree_20_depth_ms
N/A
N/A
62.6
119
378
745 (+1%)
1,470
2,930
N/A

batch_insert_into_indexed_tree_20_depth_hash_count
N/A
N/A
106
208
692
1,363
2,707
5,395
N/A

batch_insert_into_indexed_tree_20_depth_hash_ms
N/A
N/A
0.543
0.536
0.513
0.512 (+1%)
0.508
0.509
N/A

batch_insert_into_indexed_tree_40_depth_ms
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
67.4 (+1%)

batch_insert_into_indexed_tree_40_depth_hash_count
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
107

batch_insert_into_indexed_tree_40_depth_hash_ms
N/A
N/A
N/A
N/A
N/A
N/A
N/A
N/A
0.597 (+1%)

Miscellaneous
Transaction sizes based on how many contract classes are registered in the tx.

Metric
0 registered classes
1 registered classes

tx_size_in_bytes
82,705
664,768

Transaction size based on fee payment method
| Metric |  |
| - |  |
Transaction processing duration by data writes.

Metric
0 new note hashes
1 new note hashes
2 new note hashes

tx_pxe_processing_time_ms
11,619 (+5%)
4,236 (+1%)
69,900

Metric
1 public data writes
2 public data writes
3 public data writes
4 public data writes
8 public data writes

tx_sequencer_processing_time_ms
3,220
2,134
6,099 (+2%)
2,310 (+1%)
2,629 (+2%)

Merging as necessary CI files got in


Clarified toggleFilter function in Chips Element Documentation

Linked Issue
Discord thread
Description
Clarified toggleFilter function in Chips Element Documentation

[x] This PR targets the dev branch (NEVER master)
[x] Documentation reflects all relevant changes
[x] Branch is prefixed with: docs/, feat/, chore/, bugfix/
[x] Ensure Svelte and Typescript linting is current - run pnpm check
[x] Ensure Prettier linting is current - run pnpm format
[x] All test cases are passing - run pnpm test
[x] Includes a changeset (if relevant; see above)

@Sarenor I think your solution helped, but was missing one critical piece - the toggle function itself wasn't demonstrated to the end user. I've added this as an additional snippet in the example code:

I cannot recall why I originally introduced the term filter here at all. The use of toggle is much more semantic, so I've simplified it to this as well.
Thanks for the help!


Further develop the clients communication stack.

I've gone from proof-of-concept Client and Clients to a quite nice new one.
Here's a summary of the new operators:

client/mod.rs contains a Client future. This acts as a handler for the TCP socket.

msg_rx_queue queues messages received on the TCP socket's client_rx channel.
msg_tx_queue queues messages to be sent on the TCP socket's client_tx channel.
The handler is controlled by Cmd instructions. These are received on the command_rx channel. The simplest example is Cmd::Transmit(Msg), which instructs sending a Msg on the TCP socket.
A more complex Cmd::ReceiveInto(oneshot::Receiver<Msg>) command is for reading messages from the socket. A oneshot::Receiver<T> is an asynchronous channel for sending exactly 1 message.
These ReceiveInto oneshots are placed on their own queue msg_relay_tx_queue. When a message is received it will be sent to the oneshot at the head of the queue. To safely cancel a ReceiveInto just have the oneshot::Receiver go out of scope (be Dropped).

To explain: GroupCommand, GroupTransmit, GroupReceive, GroupReceiveTimeout.

This has been reworked into a comms crate! \o/


build: pin API Documenter version

Issue or need
Related to #485
Proposed changes
Fixes version of API Documenter dependency in Renovate config
Quick reminders

🤝 I will follow Code of Conduct
✅ No existing pull request already does almost same changes
👁 Contributing docs are something I've taken a look at
📝 Commit messages convention has been followed
💬 TSDoc comments have been added or updated indicating API visibility if API surface has changed.
🧪 Tests have been added if needed. For instance, if adding new features or fixing a bug. Or removed if removing features.
⚙ API Report has been updated if API surface is altered.

#486  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @davidlj95 and the rest of your teammates on  Graphite


B.1.617.2 located in different part of tree than other B.1.617.*

Timetree as of update 2021-07-20:

I suspect the representative genome (earliest sample) being selected for lineage B.1.617.2 is not a good representative, i.e., shaky lineage classification by Pangolin.

Hum - according to curated Pangolin lineage listing:
https://github.com/cov-lineages/pango-designation/blob/master/lineages.csv
this representative genome (India/GJ-NCDC-NIV-INSACOG-240942 is genuinely B.1.617.2

Generated a FASTA file containing the representative genomes in a recent run, do some checks in ft2 and treetime to reproduce this error

ft2 tree seems to have a reasonable placement of B.1.617.2 - note this not the same database as 2021-07-20:

B.1.617.2 is nested in the C clade in the current timetree.nexus output as well, so it's not the conversion from NEXUS to Newick by treetime.py:parse_nexus()

Regenerated FASTA file:
>>> ref_file = 'data/NC_045512.fa'
>>> from covizu.treetime import retrieve_genomes
>>> import json
>>> by_lineage = json.load(open('issue313/by_lineage.json'))
>>> fasta = retrieve_genomes(by_lineage, 'covizu/data/NC_045512.fa')
>>> len(fasta)
1236
>>> list(fasta.keys())[0]
'|B.1|2020-01-24'
>>> outfile = open('issue313.fa', 'w')
>>> for h, s in fasta.items():
...     _ = outfile.write(">{}\n{}\n".format(h, s))
...
>>> outfile.close()

Ran fasttree2:
>>> from covizu.utils.seq_utils import *
>>> handle = open('issue313.fa')
>>> fasta = convert_fasta(handle)
>>> handle.close()
>>> len(fasta)
1236
>>> fasta[0][0]
'|B.1|2020-01-24'
>>> fasta = dict(fasta)
>>> from covizu.treetime import *
>>> nwk = fasttree(fasta, binpath='fasttree2-mp', seed=1)
FastTree Version 2.1.10 Double precision (No SSE3), OpenMP (32 threads)
Alignment: standard input
...
Optimize all lengths: LogLk = -100968.887 Time 337.17
Total time: 526.15 seconds Unique: 1236/1236 Bad splits: 1/1233 Worst delta-LogLk 5.521
>>> len(nwk)
51147
>>> nwk[:50]
"((('B.1.1.154':0.000100745,('B.1.1.269':0.00016792"

Inspecting FastTree2 output, B.1.617.* are scattered:

Changing fasttree2 seed did not visibly alter results.

Using -gtr flag didn't change this outcome either - should probably set this flag in the pipeline anyhow, since substitution rate biases are very skewed.

Inspecting the sequence alignment, there are polymorphisms clustering B.1.617.2 with C.* (i.e., not in other B.1.617.* genomes):

G3302A (shared with C.16)
C4002T (shared with C.*)
C9693T (with C.16)
G10097A (with C.*)
C12789T (with C.16)
C13536T (with C.*)
C23731T (with C.*)

Representative B.1.617.2 genome for this data dump is hCoV-19/Angola/CERI-KRISP-K013496/2020

Re-ran the representative genomes FASTA through Pangolin:
art@orolo:~/git/covizu/issue313$ grep B.1.617 issue313.pangolin.csv
|B.1.617.1|2020-12-01,B.1.617.1,,,B.1.617.1-like,1.000000,0.000000,PANGO-v1.2.36,3.1.7,2021-07-09,v1.2.36,passed_qc,scorpio call: Alt alleles 11; Ref alleles 0; Amb alleles 0; Oth alleles 0
|B.1.617.3|2020-12-01,B.1.617.3,0.0,0.9947973824330366,,,,PLEARN-v1.2.36,3.1.7,2021-07-09,v1.2.36,passed_qc,
|B.1.617.2|2020-12-07,B.1.617.2,0.0,0.9995550161812298,,,,PLEARN-v1.2.36,3.1.7,2021-07-09,v1.2.36,passed_qc,
|B.1.617|2021-02-25,B.1,0.0,0.9901592486729277,,,,PLEARN-v1.2.36,3.1.7,2021-07-09,v1.2.36,passed_qc,
|AY.2|2021-05-18,AY.2,0.0,0.9993121307760784,Delta (B.1.617.2-like) +K417N,1.000000,0.000000,PLEARN-v1.2.36,3.1.7,2021-07-09,v1.2.36,passed_qc,scorpio call: Alt alleles 13; Ref alleles 0; Amb alleles 0; Oth alleles 0

Ok, I'm taking CoVizu out of the picture for a minute.

grabbed lineages.csv file from Pango team (link)
use this script to extract genome sequences from GISAID feed based on this curated listing:

import lzma
import json

# select one sequence name per Pango lineage
lineages = {}
handle = open('lineages.csv')
for line in handle:
    name, lineage = line.strip().split(',')
    if lineage in lineages:
        continue
    lineages.update({lineage: name})

handle.close()
lineages = dict([(v, k) for k, v in lineages.items()])

# stream through provision file and attempt to extract matching sequences
outfile = open('lineages.fasta', 'w')
handle = lzma.open('provision.2021-07-29T00:00:02.json.xz')
for i, line in enumerate(handle):
    if i % 10000 == 0:
        print(i)
    record = json.loads(line)
    name = record['covv_virus_name'].replace('hCoV-19/', '')  # hCoV-19/Australia/NT12/2020
    if name not in lineages:
        continue

    lineage = lineages[name]
    print(lineage)
    seq = record['sequence'].replace('\n', '')
    outfile.write('>{}|{}\n{}\n'.format(lineage, name, seq))

handle.close()
outfile.close()

generated multiple sequence alignment from output FASTA with MAFFT with mafft --thread 12 lineages.fasta > lineages.mafft.fa  - nope, MAFFT bricked my workstation by eating up the RAM.
python3 covizu/minimap2.py issue313/lineages.fasta --align --force-headers -t 8 --outfile issue313/lineages.mm2.fa rapidly generates a pairwise alignment.

Fasttree threw an error:
art@orolo:~/git/covizu/issue313$ fasttree2-mp -nt -gtr < lineages.mm2.fa > lineages.ft2.nwk
FastTree Version 2.1.10 Double precision (No SSE3), OpenMP (32 threads)
Alignment: standard input
Nucleotide distances: Jukes-Cantor Joins: balanced Support: SH-like 1000
Search: Normal +NNI +SPR (2 rounds range 10) +ML-NNI opt-each=1
TopHits: 1.00*sqrtN close=default refresh=0.80
ML Model: Generalized Time-Reversible, CAT approximation with 20 rate categories
Non-unique name 'M.1|Israel/CVL-81-ngs/2020' in the alignment
art@orolo:~/git/covizu/issue313$ grep -E "^>M\.1" lineages.mm2.fa
>M.1|Israel/CVL-81-ngs/2020
>M.1|Israel/CVL-81-ngs/2020

Manually removed duplicate entry - should dig into why this happened though.

Fasttree output for FASTA derived from lineages.csv groups B.1.617.* together, with the exception of B.1.617 itself:

Should probably incorporate lineages.csv to filter early samples.

Modification to dev branch:
diff --git a/covizu/treetime.py b/covizu/treetime.py
index 629e143..f72a800 100644
--- a/covizu/treetime.py
+++ b/covizu/treetime.py
@@ -3,6 +3,7 @@ from subprocess import Popen, PIPE, check_call
 import json
 from tempfile import NamedTemporaryFile
 import os
+import sys
 from io import StringIO
 import re
 import statistics  # Python 3.4+
@@ -147,13 +148,17 @@ def parse_nexus(nexus_file, fasta, callback=None):
     return phy, residuals

-def retrieve_genomes(by_lineage, ref_file, earliest=True):
+def retrieve_genomes(by_lineage, known_seqs, ref_file, earliest=True, callback=None):
     """
     Identify most recent sampled genome sequence for each Pangolin lineage.
     Export as FASTA for TreeTime analysis.

     :param by_lineage:  dict, return value from gisaid_utils::sort_by_lineage
-    :return:  list, (header, sequence) tuples
+    :param known_seqs:  dict, sequences used in Pango lineage designations
+    :param ref_file:  str, path to FASTA file containing reference genome
+    :param earliest:  bool, if False then use most recent genome as lineage representative
+
+    :return:  dict, aligned genome keyed by header "|{lineage}|{coldate}"
     """
     # load and parse reference genome
     with open(ref_file) as handle:
@@ -166,7 +171,16 @@ def retrieve_genomes(by_lineage, ref_file, earliest=True):

     # retrieve unaligned genomes from database
     for lineage, records in by_lineage.items():
-        intermed = [(r['covv_collection_date'], r['diffs'], r['missing']) for r in records]
+        # filter records for lineage-defining genomes
+        curated = filter(lambda r: r['covv_virus_name'].replace('hCoV-19/', '') in known_seqs, records)
+        curated = list(curated)  # resolve generator
+        if len(curated) == 0:
+            if callback:
+                callback("Error in retrieve_genomes(): no sequence names for lineage {} in designated "
+                         "list; may need to update data/lineages.csv".format(lineage))
+            curated = records
+
+        intermed = [(r['covv_collection_date'], r['diffs'], r['missing']) for r in curated]
         intermed.sort(reverse=True)  # descending order
         coldate, diffs, missing = intermed[-1] if earliest else intermed[0]

@@ -215,6 +229,9 @@ def parse_args():
                         help='optional, path to fasttree2 binary executable')
     parser.add_argument('--ttbin', default='treetime',
                         help='optional, path to treetime binary executable')
+    parser.add_argument('--lineages', type=str,
+                        default=os.path.join(covizu.__path__[0], "data/lineages.csv"),
+                        help="optional, path to CSV file containing Pango lineage designations.")

     parser.add_argument('--outfile', default='data/timetree.nwk',
                         help='output, path to write Newick tree string')
@@ -228,7 +245,20 @@ if __name__ == '__main__':
     cb.callback("Retrieving genomes")
     with open(args.json) as handle:
         by_lineage = json.load(handle)
-    fasta = retrieve_genomes(by_lineage, ref_file=args.ref, earliest=args.earliest)
+
+    cb.callback("Parsing Pango lineage designations")
+    handle = open(args.lineages)
+    header = next(handle)
+    if header != 'taxon,lineage\n':
+        cb.callback("Error: {} does not contain expected header row 'taxon,lineage'".format(args.lineages))
+        sys.exit()
+    lineages = {}
+    for line in handle:
+        taxon, lineage = line.strip().split(',')
+        lineages.update({taxon: lineage})
+
+    cb.callback("Identifying lineage representative genomes")
+    fasta = retrieve_genomes(by_lineage, known_seqs=lineages, ref_file=args.ref, earliest=args.earliest)

     cb.callback("Reconstructing tree with {}".format(args.ft2bin))
     nwk = fasttree(fasta, binpath=args.ft2bin)

art@orolo:~/git/covizu$ python3 covizu/treetime.py data/by_lineage.json --ft2bin fasttree2-mp
🏄 [0:00:00.000008] Retrieving genomes
🏄 [0:01:10.399698] Parsing Pango lineage designations
🏄 [0:01:10.744644] Identifying lineage representative genomes
🏄 [0:01:13.200009] Reconstructing tree with fasttree2-mp
Optimize all lengths: LogLk = -162394.947 Time 352.63
Root-Tip-Regression:
 --rate:	8.000e-04
 --r^2:  	0.68

End result looks pretty good:

A bunch of lineages are not being found in lineages.csv:
🚧 [0:01:11.099523] Error in retrieve_genomes(): no sequence names for lineage B.42 in designated list; may need to update data/lineages.csv
🚧 [0:01:11.111504] Error in retrieve_genomes(): no sequence names for lineage B.60 in designated list; may need to update data/lineages.csv
🚧 [0:01:11.236385] Error in retrieve_genomes(): no sequence names for lineage B.43 in designated list; may need to update data/lineages.csv

However grep says otherwise:
art@Wernstrom covizu % grep -E "B\.42" covizu/data/lineages.csv | head -n3
Hong_Kong/VB20024950-2/2020,B.42
Hong_Kong/HKPU42-0302/2020,B.42
Hong_Kong/HKU-200723-045/2020,B.42
art@Wernstrom covizu % grep -E "B\.60" covizu/data/lineages.csv | head -n3
England/PHEC-20028/2020,B.60
England/PHEC-1DE9D/2020,B.60
England/PHEC-1C21A/2020,B.60
art@Wernstrom covizu % grep -E "B\.43" covizu/data/lineages.csv | head -n3
Hong_Kong/HKPU92-1302/2020,B.43
Hong_Kong/HKPU45-0502/2020,B.43
Hong_Kong/HKPU38-3001/2020,B.43

Must be some inconsistency in sequence names.

For B.42 and B.43, the problem is replacing spaces with underscores.
For B.60, there is complete mismatch in sequence names: e.g., England/20138078204/2020

Replacing spaces with underscores in sequence names, now there are far fewer warnings:
art@orolo:~/git/covizu$ python3 covizu/treetime.py data/by_lineage.json
🏄 [0:00:00.000008] Retrieving genomes
🏄 [0:01:10.939756] Parsing Pango lineage designations
🏄 [0:01:11.284046] Identifying lineage representative genomes
🚧 [0:01:11.557216] Error in retrieve_genomes(): no sequence names for lineage B.60 in designated list; may need to update data/lineages.csv
🚧 [0:01:13.473962] Error in retrieve_genomes(): no sequence names for lineage A.2.4 in designated list; may need to update data/lineages.csv
🚧 [0:01:13.900463] Error in retrieve_genomes(): no sequence names for lineage B.1.1.404 in designated list; may need to update data/lineages.csv
art@orolo:~/git/covizu$

Looking better.  Note that D.4 is no longer clustering with B.1.617.*:

Close on successful test of PR #328

About this problem, I experimented there doing a tree of the consensus of each pango lineage only based on manually assigned sequences (lineages.csv), I liked the result, although I didn't try a timetree yet.
Note that the consensus B.1.617.2 is the expected basal sequence, except for G142D, which is either a matter of masking a few sites or correctly handling the NNN.
This approach doesn't fit with your tree of earliest sequences, the consensus of B.1.617.2 is much more basal than the earliest assigned sequences, so its date in the timetree should be several months behind.


Mesh Conformance IPv6 fix

This builds on #2024 by applying it to the mesh conformance host logic as well

/cc @kflynn @howardjohn @michaelbeaumont

@shaneutt @michaelbeaumont @kflynn Any issues with this PR? Would love to get this merged in for 0.8.0

Thanks @keithmattix!
/lgtm


Error appears when Reference tab is opened

System information:

Operating system (distribution) and version win10
DBeaver version 7.2.2

Connection specification:

Database name and version hive

Describe the problem you're observing:
Error appears when Reference tab is opened

This is not a dbeaver bug. Hive driver just doesn't support references read, we can't fix this.
Hopefully future Hive driver versions will add this feature.


Update Gradle packages

Feature request
Is your feature request related to a problem? Please describe. If not describe your motives
At the moment the packages don't make any sense things are separated out that don't make sense such as core and app
Describe the solution you'd like
Change packages to:

server (merge core, app)
api (remove db and web elements)
db (when created merge agent)
web (when created)

Proposed Changes
All changes above (No code changes except moving packages)

Revision: keep app separate for organization purposes because it holds configs, plugins, and a  DB (if using sqlite)

:tada: This issue has been resolved in version 3.0.0-rc.1 :tada:
The release is available on:

v3.0.0-rc.1
GitHub release

Your semantic-release bot :package::rocket:


Component raises an exception in tests when its template renders a partial

Steps to reproduce
Create a component that has a template that uses render to render a partial. e.g.
<%= render "my_partial" %>

Use render_inline(MyComponent.new) to render the component
Expected behavior
The component renders with the partial.
Actual behavior
An Exception is raised
NoMethodError: undefined method `_app_views_my_partial_html_erb___1622271391424259503_260600' for #<MyComponent:0x0000000123c911b0>

It looks like compiling the template turns the render "my_partial" call into the above method, but it's not defined on the component or the view_context.compiled_method_container.
System configuration
Rails version:
6.1
Ruby version:
2.7.1
Gem version:
2.9.1

Looks like the cause wasn't view components themselves, closing for now.

@BlakeWilliams I'm seeing something similar in my app. Can you share what the cause of it was in your case?

@dkniffin I bumped into this, but ultimately came up with this: https://github.com/github/view_component/pull/538

@BlakeWilliams hi i was rendering a view component in test but 'render_inline' method seems to be undefined.
TableRow::TableRowComponent
  renders the assignment row correctly (FAILED - 1)

Failures:

  1) TableRow::TableRowComponent renders the assignment row correctly
     Failure/Error:
       render_inline(described_class.new(
                       @assignment,
                       @current_user,
                       @group,
                       { minute: 30, day: 15, year: 2023, second: 0, hour: 12, month: 10 }
                     ))

     NoMethodError:
       undefined method `render_inline' for #<RSpec::ExampleGroups::TableRowTableRowComponent "renders the assignment row correctly" (./spec/components/table_row_component_spec.rb:13)>
     # ./spec/components/table_row_component_spec.rb:14:in `block (2 levels) in <top (required)>'
     # /usr/local/bundle/gems/webmock-3.14.0/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

Finished in 0.08942 seconds (files took 6.15 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/components/table_row_component_spec.rb:13 # TableRow::TableRowComponent renders the assignment row correctly

Lcov style coverage report generated for RSpec to /workspaces/CircuitVerse/coverage/lcov/CircuitVerse.lcov
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected

i have this right now:
# frozen_string_literal: true

require "rails_helper"

RSpec.describe TableRow::TableRowComponent, type: :component do
  before do
    @primary_mentor = FactoryBot.create(:user)
    @group = FactoryBot.create(:group, primary_mentor: @primary_mentor)
    @assignment = FactoryBot.create(:assignment, group: @group)
    @current_user = FactoryBot.create(:user)
  end

  it "renders the assignment row correctly" do
    render_inline(described_class.new(
                    @assignment,
                    @current_user,
                    @group,
                    { minute: 30, day: 15, year: 2023, second: 0, hour: 12, month: 10 }
                  ))
  end
end

@niladrix719 Is that related to this issue?

@niladrix719 Is that related to this issue?

probably

I had to include this on the spec_helper.rb to make it work
require 'view_component/test_helpers'
require 'view_component/system_test_helpers'
require 'capybara/rspec'
...
RSpec.configure do |config|
  config.include ViewComponent::TestHelpers, type: :component
  config.include ViewComponent::SystemTestHelpers, type: :component
  config.include Capybara::RSpecMatchers, type: :component
...

@BlakeWilliams I see a lot of necro posting here, do you think we should re-open this one


React is not defined after update SPFx

Category

[ ] Question
[ ] Typo
[x] Bug
[ ] Additional article idea

After the update from 1.4.1 to 1.6 I have this error during a "gulp serve"

This indicates the JS file is not found upon rendering... can you provide more information on your project? Have you verified there are no build errors when you ran gulp build (during the gulp serve) process?

My gulp build

my gulp serve.

Everything looks good in the build… could you share more about your project, like package.json? What environment are you running in (SPO / SP2016 / SP2019), etc?

SPO
My package.json


Provide a way to schedule a callback after widgets of the current frame are visible

Internal bug: b/203035704
Internally, there are core 1P host-side APIs that support reporting when the app is interactive for instrumentation of startup latency. These APIs are usually called when an interactive frame is viaible, and it will take care of recording the instant of the call. The collected metric is standardized across all mobile apps. It looks something like this:
void markAppInteractive();

In the context of Flutter 1P apps, a mechanism is needed to call this method when a particular set of widgets are visible to the user. Consider this toy example, where the app needs to mark that it is interactive after the "Interactive!" text has been displayed after an async suspension.
import 'package:flutter/material.dart';

void main() => runApp(
      MaterialApp(
        home: ExampleWithLoadingFrame(),
      ),
    );

/// Simulated.
Future<String> asyncLoad() async {
  await Future.delayed(const Duration(seconds: 1));
  return 'foo';
}

// 1st frame: "Loading..."
// 2nd frame: "Interactive!"
class ExampleWithLoadingFrame extends StatelessWidget {
  final _future = asyncLoad();

  @override
  Widget build(BuildContext context) {
    return FutureBuilder<String>(
      future: _future,
      builder: (_, AsyncSnapshot<String> snapshot) {
        if (snapshot.hasData) {
          // Need some mechanism to report that the app is interactive after this
          // widget is visible on screen.
          return Text('Interactive! ${snapshot.data}');
        } else {
          return const Text('Loading...');
        }
      },
    );
  }
}

Existing Related APIs
There are a few related APIs that are inadequate:
Host-side Embedding APIs
On Android, there is onFlutterUiDisplayed and on iOS there is setFlutterViewDidRenderCallback. These APIs are insufficient because the interactive frame is not necessarily the first frame, as seen in the example above.
addPostFrameCallback
addPostFrameCallback schedules a callback that is executed after the build phase on the UI thread. This gives an approximation of when the widgets are visible, but notably does not include the raster duration for those widgets.
FrameTiming
Using the FrameTiming API from addTimingsCallback, it is possible to collect the raster duration of the upcoming frame. Rough implementation:
/// Marks the upcoming frame as when the app is interactive.
///
/// The metric will be recorded after roughly two seconds.
void markAppInteractiveAfterThisFrame() async {
  final binding = WidgetsBinding.instance;

  final allFrameTimings = <FrameTiming>[];

  late final TimingsCallback timingsCallback;
  timingsCallback = (List<FrameTiming> currentFrameTimings) {
    allFrameTimings.addAll(currentFrameTimings);
  };
  binding.addTimingsCallback(timingsCallback);

  final nextFrameNumber =
      binding.platformDispatcher.frameData.frameNumber + 1;

  // FrameTimings are batched and reported approximately once per second in
  // release mode, so add a delay to avoid missing those events. See
  // [SchedulerBinding.addTimingsCallback].
  // TODO(flutter/flutter#64808): Remove this once timings can be flushed.
  await Future.delayed(const Duration(seconds: 2));
  binding.removeTimingsCallback(timingsCallback);

  final interactiveFrameTiming = allFrameTimings.firstWhere(
    (frameTiming) => frameTiming.frameNumber == nextFrameNumber,
  );

  final interactiveFrameRasterMs =
      interactiveFrameTiming.rasterDuration.inMilliseconds;

  recordDuration(
    'InteractiveFrameRasterDurationMillis',
    interactiveFrameRasterMs,
  );
}

It is also inadequate as these durations are provided after the raster happens, but the 1P APIs take care of recording the instant and must be called as close to when the widgets are visible as possible.
It is also unclear how much will build / raster jank affect this implementation.
Proposal
Similar to addPostFrameCallback, Flutter can provide a addPostFrameRasterCallback. This callback will be scheduled from the raster thread to the UI thread after rasterization of the current frame.
A potential issue is that the UI thread could be blocked when this callback is scheduled. This inaccuracy could be acceptable if the delta is just a few frames. Internally, an additional metric can also be collected using a combination of addPostFrameCallback + raster duration of the last frame (from FrameTiming) to measure how much this inaccuracy is.
cc @xster @dnfield

I'm a bit skeptical that the native Android implementation includes raster time. In particular, is it really including however long hwui/RenderThread operations are taking for the frame of interactivity?

I randomly looked at a few 1P apps using use this markAppInteractive API, and I've noticed that they fall into a few ways:

Using addOnPreDrawListener and then posting a runnable to the main thread - which will exclude the RenderThread timings
Using Choreographer#postFrameCallback which looks like a better approximation

But it does seem like RenderThread timing is not such a big concern for these apps. I guess in that case Flutter's postFrameCallback which only captures build time might be also an acceptable compromise?
For Flutter, capturing raster time could also help measure the impact of performance work on the raster thread (such as Impeller) though, which @iskakaushik and I discussed a bit previously.

I don't think we'll be able to do much better than approximations here.
Could we instead just record things like long raster times and their frame numbers?

The underlying API expects to be called close to where the frame is visible, so providing timings to it is not possible. Even if it could, we might then run into the challenge of synchronizing the clocks used by the host for that API, and the engine.
I think the scheduling delay might be acceptable here though. We may also be able to run an experiment to quantify it.

Yup!


Help building a timed counter.

I'm asking for help.
Problem description
Hi.
I'm trying to build a timed countdown with cursive. 25, 24, 23 .... 0 in seconds.
I've made an atempt by using the Mutation example:  https://github.com/gyscos/cursive/blob/master/examples/mutation.rs
use cursive::Cursive;
use cursive::traits::*;
use cursive::views::{Dialog, OnEventView, TextView};
use cursive::view::{Offset, Position};

fn main() {
    let mut siv = Cursive::default();

    let content = "I want to be a counter!";

    siv.add_layer(
        OnEventView::new(TextView::new(content).with_name("count"))
            .on_event('p', |s| change_content(s)),
    );

    siv.run();
}

fn change_content(siv: &mut Cursive) {
    siv.screen_mut().add_layer_at(
        Position::new(Offset::Center, Offset::Parent(5)),
        Dialog::around(TextView::new("Start counter"))
            .button("Start", |s| {
                s.call_on_name("count", |view: &mut TextView| {

                view.set_content("never let go");
                view.set_content("of the handlebars");
                view.set_content("when you eyes are");
                view.set_content("closed..");
                /*
                    for x in 25..0 {
                        view.set_content(format!("{}", x.to_string()));
                        view.set_content("not even this :/");
                    }
                */
                });
            })
            .dismiss_button("Ok"),
    );
}

On line 26-29 I'm able to update content with view.set_content(). But only the last one is displayed, although I guess the first three entries (26,27,28) actually are shown but in a blink of second, so only the last i left to be shown?
As you can see I've also tried to go with an for-loop, but there, actually nothing at all gets updated for view.set_content()
Can someone explain to me why the for-loop does not work? And am I going the right direction for accomplishing a timed counter, or is there a better way to do this, like in the example Progress?
Environment

Operating system: Linux Devuan Ascii (Debian Stretch)
Backend used: ncurses
NCURSES_VERSION "6.0"
Current locale: en_US.UTF-8
Cursive version: 14

Hi, and thanks for the report!
As you noticed, the callback method is executed instantly, and any intermediate state doesn't have any time to be visible.
This is by design: callbacks are supposed to be run instantly. Actually, cursive will not even refresh the screen until the callback function completes! So even if you added some steps to sleep between changes, you wouldn't actually see the changes. These callbacks are meant to run one action, like view.set_content("never let go"); or view.set_content("of the handlebars");.
What you probably want is to run many different callbacks, each some time apart. For example, after waiting 1 second, we want to trigger something, run a callback to change the text, then keep running as usual for the next second, when another callback will change the content further. We want some chain of logic to progress in parallel of the cursive loop, which is focused on printing the screen and handling user events. We can do that with a separate thread.
let sleep_duration = std::time::Duration::from_millis(1_000);  // 1 second
std::thread::spawn(move || {
    std::thread::sleep(sleep_duration);
    // Run action 1, display "never let go"
    std::thread::sleep(sleep_duration);
    // Run action 2, display "of the handlebars"
    std::thread::sleep(sleep_duration);
    // ...
});

So now all we need is to trigger each action from a separate thread. How? We can't move the s: &mut Cursive in there, but there's another way: Cursive::cb_sink. It gives you the sending half of a pipe, so you can send callbacks from another thread. Let's use it!
let cb_sink = s.cb_sink().clone();
let sleep_duration = std::time::Duration::from_millis(1_000);  // 1 second
std::thread::spawn(move || {
    // Here we are running in the parallel thread. We can block however we want.
    std::thread::sleep(sleep_duration);
    // Run action 1, display "never let go"
    cb_sink.send(Box::new(|s| {
        // _This_ callback will be run in the main thread. Don't sleep here!
        s.call_on_name("count", |view: &mut TextView| view.set_content("never let go"));
    })).unwrap(); // This would only fail if `Cursive` was dropped in the main thread.

    std::thread::sleep(sleep_duration);
    // Run action 2, display "of the handlebars"
    cb_sink.send(Box::new(|s| {
        s.call_on_name("count", |view: &mut TextView| view.set_content("of the handlebars"));
    })).unwrap();

    std::thread::sleep(sleep_duration);

    // Run action 3, display "of the handlebars"
    cb_sink.send(Box::new(|s| {
        s.call_on_name("count", |view: &mut TextView| view.set_content("when you eyes are"));
    })).unwrap();

    std::thread::sleep(sleep_duration);

    // Run action 4, display "closed"
    cb_sink.send(Box::new(|s| {
        s.call_on_name("count", |view: &mut TextView| view.set_content("closed"));
    })).unwrap();
});

Of course something repetitive like that can be simplified:
let cb_sink = s.cb_sink().clone();
let sleep_duration = std::time::Duration::from_millis(1_000);  // 1 second
std::thread::spawn(move || {
    for text in &["never let go", "of the handlebars", "when you eyes are", "closed"] {
        std::thread::sleep(sleep_duration);

        cb_sink.send(Box::new(|s| {
            s.call_on_name("count", |view: &mut TextView| view.set_content(text));
        })).unwrap();
    }
});

(This code would go in the callback from .button("Start", |s| { ... })
Using a separate thread like this is how Progress works, but in a more specialized way.

Hi!
Thank you so much for your very clear and educating answer. I've only quickly tried your code in my own, and at the moment I'm stuck on compiling erros. But I'm sure I will get out of it as soon as I'm able to give coding a bit more time later this week.

I'm really scratching my head right now.
Only by following your last example and writing a list manually and with for text in &["25", "24" ...] , I do get the desired result. Though I can't manage to generate the list automatically.
This is what I've tried:
`
std::thread::spawn(move || {
                 //for text in &["25", "24", "23", "22", "21", "20"] {

                 let mut bucket = vec![];
                 for b in (25..0).rev() {
                     bucket.push(b.to_string());
                 }

                 //for num in (25..0).rev() {
                 for text in bucket {
                     std::thread::sleep(sleep_duration);
                     cb_sink.send(Box::new(move |s| {
                         //s.call_on_name("count", |view: &mut TextView| view.set_content(num.to_string()));
                         s.call_on_name("count", |view: &mut TextView| view.set_content(text));
                     })).unwrap();
                 }

`
As you can see, I have tired some different solutions. All is coming down to somehow give set_content some strings to use. I looked up on the documentation about set_content and StyledString/SpannedString, but I can't understand if it only accepts Strings like "example" and not in any other way?

It's a bit convoluted, but:

TextView::set_content takes a S: Into<StyledString>
StyledString is really a SpannedString<Style>: https://docs.rs/cursive/0.14.0/cursive/utils/markup/type.StyledString.html
We have impl <S, T> From<S> for SpannedString<T> where S: Into<String>, T: Default: https://docs.rs/cursive/0.14.0/cursive/utils/span/struct.SpannedString.html#impl-From<S>
We also have Style: Default: https://docs.rs/cursive/0.14.0/cursive/theme/struct.Style.html#impl-Default
From this we can deduce that any S: Into<String> also implements Into<SpannedString>. This includes, among others, String, &String, and &str: https://doc.rust-lang.org/nightly/alloc/string/struct.String.html#impl-From<%26'_ String>

So set_content should work both with &str or String.
Here's a quick example running on the latest git branch that looks like your code:
use cursive::traits::*;
use cursive::views::{Dialog, TextView};

fn main() {
    let mut siv = cursive::default();
    siv.add_layer(Dialog::around(
        TextView::new("Starting...").with_name("text"),
    ));

    let cb_sink = siv.cb_sink().clone();

    let duration = std::time::Duration::from_millis(1000);
    std::thread::spawn(move || {
        for num in 0..25 {
            std::thread::sleep(duration);
            cb_sink
                .send(Box::new(move |s| {
                    s.call_on_name("text", |v: &mut TextView| {
                        v.set_content(num.to_string())
                    });
                }))
                .unwrap();
        }
        cb_sink.send(Box::new(|s| s.quit())).unwrap();
    });

    siv.run();
}

Yes! It now works as I want/need it to do.
Thank you for the tracing of TextView::set_content. I'll guess I need to get an better understanding of Impl and such.
Either way the only difference I could found with your latest example and my is added brackets around v.set_content(num.to_string()) and that I use the latest git-version as you said.

I would just like to get a confirmation on this, and then we can close the issue. Thanks so much for all your help!

The brackets shouldn't matter; and the latest git master only affects the initialization (Cursive:: default vs cursive::default).
If you have a compiler error message, and/or a complete code to try, I could look into what's going on, but it's a bit tricky to figure it out from what I have so far.

Yes I understand.
It was a while since I looked into it. I might check it out again during the summer. Thanks for all help!


Add a CPU temperature monitor

Description of the new feature / enhancement
To check CPU temperatures right now, we need to install 3rd party apps like CoreTemp, as there is no native implementation. This feature in PowerToys could be used to quickly check CPU temps, probably have it pinned to the taskbar and/or a widget.
eg. CoreTemp's monitor

Scenario when this would be used?
This can be used to quickly check on CPU temperature, and also other stats (like CoreTemp).
Supporting information
No response

Sounds like a nice feature. I'm not sure, but maybe this helps:
There is a command for cmd and powershell to do this wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature. It's result devided by 10 is the temperature in kelvin. From kelvin it shouldn't be that hard, to get to Celsius or Fahrenheit for our american friends. But this Command needs Admin Privilages.
You could either execute this command in your .net code basis or it might guide you to the correct .net library or WMI. Sadly my C# and C++ knowledge is a bit rusty.

for reference, better APIs may need to be created, see - https://github.com/microsoft/Windows-Dev-Performance/issues/101


Change category to be the same as most other Map Editor plugins

Plugins like editor helpers, map validator, lightmap quality, etc. have the "Map Editor" category instead of the "Editor" category.

Thanks! 😅


Add new option --eapreq to send EAP Requests to WPA-Enterprise clients

This function sends out arbitrary EAP Requests that are given as comma separated hex strings with an optional termination flag.

the EAP Request sequence is send out for every network that is associated as a WPA-Enterprise network by the client
every response by the client to a request is responded to by a default or choosen terminating EAP status, client deauthentication or no packet
if the sequence is interrupted and the client reconnects using the same ESSID, the sequence will be resumed
the EAP Request sequence is reset every time the client associates with a different ESSID
WPA-PSK associations are handled as usual

Caveats when using this function:

clients will be authenticated every time they request, even if their status suggests they would be ignored otherwise
clients with more than one network configured for WPA-Enterprise are probed with the EAP Request sequence every time they associate using a different ESSID

--eapreq=<type><data>[:<term>],... : send max. 20 subsequent EAP requests after initial EAP ID request, hex string starting with EAP Type
          response is terminated with :F = EAP Failure, :S = EAP Success, :I = EAP ERP Initiate, :F = EAP ERP Finish,
          :D = Deauthentication, :- = no packet
          default behavior is terminating all responses with a Failure packet, after last one the client is deauthenticated

Great new option and big improvement. Merged.
Thanks.


docs: update API docs on navbar behavior

Related PRs
Documentation for #5072.

@slorber I'm trying to document this new feature. Are we really going to encourage users to provide the type "dropdown"? To me implicitly specifying dropdowns by an additional items field is concise and introduces no ambiguity.
I'll also modify the content in other Navbar item sections. Arranging fields in tables are much easier to follow than code blocks.

Thanks, good catch 😁


Wordpress Login - Sorry, that email address is already used! [error code: unknown]

When I try and login to my wordpress it says:
"There was a problem with your log in: Sorry, that email address is already used! [error code: unknown]"
However if I login with a Wordpress user not in auth0 it creates the user in Auth0 and everything looks normal on that end although I get the above error. If I try and login with a user already in Auth0 it records it as a successful login in Auth0 Dashboard however I always get this error mentioned above and asked to login again.
The same configuration works perfectly on my local machine when logging in.
Even though the Require Verified Email is off If I go into Auth0 and verify the email manually it allows my staging server to login. My local still works either way regardless of if I verify in Auth0 or not.
In case it helps anyone else adding this filter fixed the issue.
function auth0_theme_hook_auth0_get_wp_user( $user, $userinfo ) {
	$found_user = get_user_by( 'email', $userinfo->email );
	$user       = $found_user instanceof WP_User ? $found_user : null;
	return $found_user;
}
add_filter( 'auth0_get_wp_user', 'auth0_theme_hook_auth0_get_wp_user', 1, 2 );

Do you have the "Link Users with Same E-mail" option turned on in the settings?

Hey @nmoinvaz that setting is not turned off on our install

@itjunkii83 - Apologies for the delay, I didn't see a notification for this.
I'm sorry but I'm not totally following your steps here. The error message you mention is a core WP error message passed through to the plugin when you're trying to register a new user that has an email address of an existing user.
If you can write out a step-by-step reproduction here (URL you're on, where the error is appearing, etc), that would be helpful.
Thanks!


Better support for 'deep' recursive acls

that is why I like travis but dislike rèuby 1.8

@roidelapluie lol, I hear ya


Implement snapshot zooming and panning, sliding diff and blend-mode for diff overlay

https://github.com/chromaui/addon-visual-tests/assets/321738/1b1249d1-ba1a-4061-89ed-536e9509d428

📦 Published PR as canary version: 0.0.123--canary.151.7ff0e88.0

:sparkles: Test out this PR locally via:
npm install<EMAIL_ADDRESS># or
yarn add<EMAIL_ADDRESS>

I think this is really rad Gert.
General feedback
It was tough to tell whether I was looking at the latest snapshot or the baseline snapshot on hover. It's made clear when you zoom in, but on the surface I wasn't sure what I was looking at.
Suggestion:

Perhaps you could label each side of the line by default? Not sure if this is more obvious in context of the Storybook UI.

Feedback on line
It was tough to tell what's happening on hover with the line because it seems to use the background color of the ground (white and dark respectively). This was confusing because I thought it may have been an UX artifact or bug.
Suggestion:

Make the line obvious and red #FF440070. This is similar to what tools like Datadog do when you hover over the graphs.
Remove the shadow (because the red makes the line super pronounced)

Feedback on diff blend mode
I was confused by what the difference is between dark green and light green. So when I was moving my cursor left and right to reveal more UI, I couldn't tell what was different.
Suggestion:

Show the regular image (without the diff) when the baseline is in view. Show the diff for the "latest" snapshot on the right hand side.

@domyen I tried a higher contrast line in a prototype I worked up last week. Here's a quick video of it.
https://github.com/chromaui/addon-visual-tests/assets/1123119/4bd95fb0-8a81-4a44-82b9-9a27f706549b
@ghengeveld I agree with Dom that the line is hard to see. I would do something like this when the user clicks on the drag line:

That higher contrast grey line looks good to me @MichaelArestad
In Gert's demo, the interaction is on hover not drag (clicking zoom) so we wouldn't be able to see the blue like you have above. I suspect this is OK and you already know about that, but wanted to call it.

@domyen Yeah. Since we started talking about hover interactions like these (and the zooming), I got to thinking about them a bit more. Something about them doesn't sit quite right with me. It almost feels like I don't have full control over what I want to see. For example, when my cursor enters from one side or the other, the bar goes to where my cursor is, which isn't super useful or intentional. Also, I may want to leave it split a certain way which requires I exit the cursor area from the top or bottom. I know I prefer to click to drag because it feels like I'm in control of what I'm looking at. That said, I'm not overly opinionated on this quite yet and would like to see how others like it.

Yea that's fair re:not feeling in control over what I see. I think you articulated what I was responding to here:

It was tough to tell whether I was looking at the latest snapshot or the baseline snapshot on hover. It's made clear when you zoom in, but on the surface I wasn't sure what I was looking at.

I suspect it'd make sense behind a click like our other diff tools.


[cli] npm Cannot pass in --template parameter

Describe the bug
I tried usingnpm create vite@latest my-vue-app -- --template vue.
It is reasonable to execute and create projects directly.
Actually, it is necessary to select the template again.
--
But Yarn and PNPM do not have this issue, I don't know if this is an incompatibility issue with the code itself or an error with NPM.
And there are only issues with Windows, and there are no issues with the Mac.
Reproduction
none
Steps to reproduce

System Info
System:
    OS: Windows 10 10.0.22621
    CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
    Memory: 4.04 GB / 13.86 GB
  Binaries:
    Node: 18.12.1 - E:\node\node.EXE
    Yarn: 1.22.19 - E:\node\yarn.CMD
    npm: 9.8.0 - E:\node\npm.CMD
    pnpm: 8.6.9 - E:\node\pnpm.CMD
  Browsers:
    Edge: Spartan (44.22621.2283.0), Chromium (117.0.2045.31)
    Internet Explorer: 11.0.22621.1

Used Package Manager
npm
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

See https://github.com/vitejs/vite/issues/13535#issuecomment-1594080964

ok, good, thanks, should this be reflected in the document?

Maybe we can have it in https://vitejs.dev/guide/troubleshooting.html

Maybe we can have it in https://vitejs.dev/guide/troubleshooting.html

ok...This seems too general,i look like.
I have also searched for it in the issue before:search (Maybe the keywords I searched for are not quite correct).
and in vite Land:It seems that there are only questions without answers.

i mean,What if we do this?

Thank you again for telling me the answer to this question.

Those questions are not related to this problem.


Settings: add a way to pull models via the UI

There is no way to pull Ollama models with a GUI, so we want to fix that for users that don't know how to use a CLI.

:tada: This issue has been resolved in version 0.10.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Refactor Entity Class

What is the benefit of new namespace? next we need to move "Model" classes to Model namespace? The current usage is easier to access (no need deep namespace extends) for mostly db based apps.

@samsonasik whats happend, i just followed your tut https://samsonasik.wordpress.com/2015/09/16/practical-git-4-rebasing-conflicted-task-branch-against-primary-branch/

I had the same issue with MGatner's Schemas repository yesterday. I did a rebase with Github Desktop which has always worked before, but this time, the main branch commits appeared again. Still don't know why...

I fixed it by deleting the repo directory in the local machine and then reclone it then rebase and it's worked fine


[md-tabs][md-label] Reactivity issue - value not updated immediately

Steps to reproduce
When using a value as the text of a md-tab, the value is not updated immediately, only at the next value update.
Which browser?
Latest vue-material, vue 2.1.6
Reproduction Link
The example below shows that the value is not immediately updated.
I've put an input with a placeholder to show what should happen
http://codepen.io/FabienLG/pen/KWpjRw

Hi, @fabien-lg
Try this
changeText () {
      this.label = 'LABEL ' + this.val
      let tabData = this.$refs.tab.getTabData()
      tabData.label = 'LABEL ' + this.val
      this.$refs.tabs.updateTab(tabData)
      this.val++
    }

Thanks @VicarEscaped , it works, but why is this necessary?

First, i think you can simplify code by calling this.$refs.mytab.updateTabData().
This is necessary beacause md-label is not reactive and then it's change it doesn't notify parent to display new label.

The new tracking issue for this is #845.


Inconsistent spelling in codebase and docs

Checklist

[X] I've searched for similar issues and couldn't find anything matching
[X] I've included steps to reproduce the behavior

Affected Components

[X] K8sGPT (CLI)
[ ] K8sGPT Operator

K8sGPT Version
k8sgpt version dev
Kubernetes Version
v1.26.0
Host OS and its Version
no
Steps to reproduce

Inconsistent spelling in codebase and docs
The codebase and documentation currently use a mix of British English and American English spellings which can be confusing and inconsistent. For example, there are instances of:

analyse and analyze

To maintain consistency and recommended style, we should standardize on either British English or American English spellings throughout the codebase and documentation. I would recommend using American English as that is a more common convention in software engineering and will be familiar to most readers.
This issue tracks replacing all British English spellings with the American English equivalents (or vice versa if we decide to choose British English). The work will encompass:

Code: Function names, variable names, string literals, etc.
Documentation: All .md files, examples, tutorials, etc.
Comments: Both inline and docblock comments
Any other text in the repository

Let's discuss which English spelling variant we want to standardize on and get this work added to our roadmap. Consistency and coherence in our language and style is an important part of having clean, readable code!
Expected behaviour
no
Actual behaviour
No response
Additional Information
No response

Thanks for raising this. It is fine to standardise on American English but we must leave the alias for British English in the CLI itself


how consumergroup works on several process

Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Sarama Version:1.22.1
Kafka Version:
Go Version:1.12
Configuration
config := sarama.NewConfig()
config.Version = sarama.V1_0_0_0
config.Consumer.Return.Errors = true
config.Consumer.Offsets.Initial = sarama.OffsetNewest
Problem Description
Hi gays，
I used consumergroup, and I found only one process can work.
I test topic has two partitons.
first I start a process and new a consumergroup in process.
But if I start another process want to let consumers which are in the same consumergroup run in  different process. the first process will stop. because the first process in function ConsumeClaim code like:
select {
case msg, ok := <-claim.Messages():
}
ok is false, so I made  process down
just want to know ,how consumergroup works on several process

Hi gays,

:rainbow:
What you are seeing is correct.
When a new consumer joins the consumer group, every consumer in the group will rebalance.
This means the ConsumeClaim loop will exit and claim.Messages() will close. That's why you are seeing that ok is false.
Did you follow the example mentioned in the doc: https://godoc.org/github.com/Shopify/sarama#example-ConsumerGroup ?
Notice the infinite for loop:
    for {
        topics := []string{"my-topic"}
        handler := exampleConsumerGroupHandler{}

        err := group.Consume(ctx, topics, handler)
        if err != nil {
            panic(err)
        }
    }

When a rebalance is triggered, group.Consume/3 will exit with err == nil and the for loop will call Consume again in the next iteration. Now the group will start with the new claims. Since, you have 2 partitions, when both processes are running you will see that each process gets 1 partition (after rebalance).

thanks, now it is running as i wish.
thanks for answer


Racon compatibility?

Hello,
I was wondering if you planned on implementing racon within the tool? Or maybe an output that racon can take?
Thanks,
Chang

Hi,
Thanks for your interest in TideHunter!
I think very likely that Racon will improve the quality of the consensus produced by TideHunter.

I don't have any plan recently since I have been occupied with some other projects.
Do you have any suggestions about that?
Thanks!

Sorry I got sidetracked, but I was planning on using MarginPolish + HELEN to improve the accuracy.
I was thinking of using the first consensus of the POA (as it is currently), and then use the subreads by realigning to the consensus and pass that into MarginPolish.
Does that make sense?

So I guess would it be possible for Tidehunter to output all the subreads as well?

I see your point and I think it makes sense.

I will try to add additional output for the subreads information so that you can implement your idea.
Will update a release when it is done.

In the latest release (https://github.com/yangao07/TideHunter/releases), the subread position information is now output as a ',' separated string in the output file.
Please try it and let me know if it works for you!
Yan

Thanks, I'll try this over the weekend.

Check out the -u/--unit-seq option in the latest release: v1.4.0.
It will give you all the unit sequences of each tandem repeat.


changed source name

hey! I have a v strange issue on grapher but also noticed that my source name was weird. basically variables that I've changed since I first merged this with master aren't being updated correctly. looks fine on staging but not on live server. I am just checking if rebuilding the dataset might help

@veronikasamborska1994 you can merge it now, it might take some time to refresh production though. Watch out for the green light in ETL

@veronikasamborska1994 you can merge it now, it might take some time to refresh production though. Watch out for the green light in ETL

thank youuuu!!

@veronikasamborska1994 it's there now. The entire day was just ETL firefighting and it took me quite some time to make it work again. I'm never gonna rename a country again...


AWS report format

Hi,
You re asking for format: -aws-billing-detailed-line-items--.csv.zip
From AWS documentation I can see that reports are stored like:
//20160101-20160131/<123456789>/-<1>.csv.

The question is, how AWS can generate format you asking automatically?
After finishing of reports generating I got 4 files:
xyz-1.csv.zip
xyz-2.csv.zip
xyz-3.csv.zip
xyz-Manifest.json
What should I do with them?

Hello Yevgeniy,
What you are referring to are the CUR reports.
ICE does not support the CUR reports yet (this is coming soon).
For now, you need to active the Programmatic Billing Reports.
https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-reports-other.html
Nicolas
--
Nicolas Fonrose | Teevity | Founder
+<IP_ADDRESS>.43.31
https://teevity.com - Cloud Costs Analytics built on NetflixOSS
twitter - @nfonrose / @teevity
On Wed, Mar 7, 2018 at 9:23 AM, Yevgeniy Ovsyannikov <
<EMAIL_ADDRESS>wrote:

Hi,
You re asking for format: -aws-billing-detailed-line-items--.csv.zip
From AWS documentation I can see that reports are stored like:
//20160101-20160131/<123456789>/-<1>.csv.

The question is, how AWS can generate format you asking
automatically?
After finishing of reports generating I got 4 files:
xyz-1.csv.zip
xyz-2.csv.zip
xyz-3.csv.zip
xyz-Manifest.json
What should I do with them?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jonbrouse/docker-ice/issues/34, or mute the thread
https://github.com/notifications/unsubscribe-auth/AACUpdTP-YXdmxD4jHFJPVRWSBvpXdpJks5tb5kTgaJpZM4SgCRD
.

Hi Nicolas,
Appreciate your help, thank you
BR, Yevgeniy

Thank you @nfonrose


Consideration: Move this to kubernetes-incubator?

Why is not in kubernetes-incubator? 😅 ... I think it's good work. Maybe under something like http://github.com/kubernetes-incubator/custom-metrics-apiserver-prometheus-adapter. Admittedly my knowledge of kubernetes-incubator is very basic.
I'm guessing it's because maybe kubernetes don't want to manage implementations? Other than that, I can't think of anything else.
cc: @luxas @zacblazic

This was moved from github.com/DirectXMan12/k8s-prometheus-adapter to github.com/kubernetes-sigs/prometheus-adapter is I guess this is now outdated.


Moved illuminate/cache to requirements

This is a blocker for https://github.com/php-cache/integration-tests/pull/60

👎 You need to only have the contracts repo. You can choose any implementation you want. Unfortunately, laravel doesn't provide virtual packages to ensure you have one.

Excuse my ignorance. Doesn't

Excuse my ignorance. Doesn't Illuminate\Contracts\Cache\Repository live in the illuminate/cache?
https://github.com/madewithlove/illuminate-psr-cache-bridge/blob/1.0.1/src/Laravel/CacheItemPool.php#L26

Doesn't Illuminate\Contracts\Cache\Repository live in the illuminate/cache?

No, it's in the contracts repo. Only Illuminate\Cache\Repository in in the cache repo. :)

Maybe the cache package should be added to this package's suggest list though?

I see, You are correct. I'll make sure to update the integration tests PR.
Thank you!


xy_7

Description: Line plotting with two axes
Script URL: https://www.ncl.ucar.edu/Applications/Scripts/xy_7.ncl
Plot URL: https://www.ncl.ucar.edu/Applications/xy.shtml

xy_7_2.py was added in #28, but only one of the two plots from the NCL xy_7.ncl example is being generated: https://geocat-examples.readthedocs.io/en/latest/auto_examples/XY/xy_7_2_lg.html
In the interest of being consistent with the original NCL example, we may want to generate the second plot and also consider renaming the Python script to xy_7.py (or NCL_xy_7.py) to match the original script.


Create _posts/0000-01-02-rkatongole.md

changes x to dynamic variable

created a branch, created a file and made a commit, and opened a pull request

commit


Fix crash when the source is a cameraroll

This PR support load iOS cameraroll
Closes #2652

Thank you for the contribution!
Can you please provide a working app sample that I can verify this fix with? Ideally use https://github.com/hueniverse/react-native-video-test and fork it with the changes needed to use the new feature.

Thank you for the contribution!
Can you please provide a working app sample that I can verify this fix with? Ideally use https://github.com/hueniverse/react-native-video-test and fork it with the changes needed to use the new feature.

@hueniverse Thank you! I was tested my PR. You can see this https://github.com/virgil1996/react-native-video-test

@virgil1996 Thank you. I tested it and it worked as expected. I would like one more reviewer to approve. Hopefully someone will volunteer.

I have the same problem, it is still not possible to download this update?

It should be other reviewer to approve

@nickfujita Is this something you can take care of?

@hueniverse Hello, I was converted to Swift version. But I'm not familiar with this way of writing, you can see if you have any suggestions

@freeboub should be back from vacation soon and will review again. Thanks @virgil1996


Remove events with null stop ids

Quick fix for https://github.com/transitmatters/mbta-performance/issues/16, which is 1 of 2(+?) data qual issues we're running into. This PR drops all events with null stop id's because it messes with our schedule merging algorithms.
2 reasons this is ok:

These phantom events aren't even read from on s3 atm because the events data is partitioned, in part, by stop id
Many of these events are a phantom departure that occurs before the first stop of a route, so we actively don't care about tracking it.

That being said: some of these null-stop events can also be AVL blips, etc, which we might want to look into more at a later date.
Uploaded some data from my laptop to s3, beta dashboard is looking a bit healthier now! (:
https://dashboard-beta.labs.transitmatters.org/green/trips/single/?date=2024-05-08&to=70257&from=70510
https://dashboard-beta.labs.transitmatters.org/blue/trips/single/?date=2024-05-08&to=70039&from=70057

Looks good for the Blue and Green lines. Red and Orange line still look wrong (red is missing a lot of data altogether) but this is an improvement

that makes sense--those would be the lines affected by the alternate stop_id issue (:


Provide workaround for kube-apiserver HA connection loss causing nginx-ingress to not update its endpoints for 15mins

What kind of request is this (question/bug/enhancement/feature request):
bug (but not in Rancher itself)
Steps to reproduce (least amount of steps as possible):

Create a 3 node RKE cluster with all roles, including default nginx ingress
Add a simple http deployment workload running on all 3 nodes
Do some recurring calls to the http workload from outside through the ingress.
Figure out to what apiserver the kubernetes default service is pointing to on the node
sudo cat /proc/net/nf_conntrack | grep <IP_ADDRESS> | grep "ESTABLISHED src=<src_ip>"
Kill the apiserver on the other node (shutdown or pull out network cable) or send SIGSTOP signal (did not test SIGSTOP but should work is explained in tickets below) to apiserver if its on same node
Monitor workload endpoints, nginx-ingress endpoints, nginx-ingress logs, and workload http response.

Result:
Because of issue in k8s go-client and/or other components it does not detect the tcp socket is closed and thus does not reconnect. The endpoints updates are therefore not updated on the nginx-ingress that was connected to the apiserver that was killed. Thus results in possible traffic loss until a timeout kicks in (not sure what) at +/-15mins then nginx-ingress reconnects and everything is happy again.
Other details that may be helpful:
We tried tweaking kernel tcp timeout settings on RancherOS but did not seem to make any difference.
The k8s go-client provides pluggable transports so might be able to do something there.
Issues open:
https://github.com/kubernetes/ingress-nginx/issues/3985
https://github.com/kubernetes/client-go/issues/374
https://github.com/kubernetes/kubernetes/issues/65012
Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI): 2.2.1
Installation option (single install/HA): Rancher HA

Cluster information

Cluster type (Hosted/Infrastructure Provider/Custom/Imported): imported
Machine type (cloud/VM/metal) and specifications (CPU/memory): vmware
Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T22:29:25Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.4", GitCommit:"c27b913fddd1a6c480c229191a087698aa92f0b1", GitTreeState:"clean", BuildDate:"2019-02-28T13:30:26Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}

Docker version (use docker version):

[rancher@rancheros-s-4vcpu-8gb-fra1-03 ~]$ docker version
Client:
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        e68fc7a
 Built:             Tue Aug 21 17:20:43 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.1-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       e68fc7a
  Built:            Tue Aug 21 17:28:38 2018
  OS/Arch:          linux/amd64
  Experimental:     false

Just to clarify, you aren't running rancher at all. It's just a RKE cluster and normal workloads on it? If so, I'd like to transfer this to rancher/rke repo which handles RKE CLI issues.

Hi, the cluster is rke created (latests) and then rancher installed via helm. This issue is present in most k8s clusters and manifest in components that use the standard k8s go-client like nginx ingress controller. Feel free to move it to rke repo.

The issue (https://github.com/kubernetes/client-go/issues/374) was mitigated in the Kubernetes client-go package v0.20.0 (https://github.com/kubernetes/kubernetes/pull/95981), which was released alongside Kubernetes v1.20. ingress-nginx updated to v0.20.0 of the client-go package in v0.42.0 (https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v0.42.0) and Rancher ships ingress-nginx v0.43.0 for RKE CLI/Rancher provisioned Kubernetes clusters with Kubernetes v1.20.
I reproduced the issue in a lab with Kubernetes v1.18.15-rancher1-1 / ingress-nginx v0.35.0, and then tested after upgrading to Kubernetes v1.20.5 / ingress-nginx v0.43.0 and can confirm that this mitigates the issue. An ingress-nginx controller connected to a downed controplane node times out the connection within a minute, establishing a connection to another kube-apiserver and thus correctly updating the available endpoints.


cobs.h: add documentation for cobs_encode() and cobs_decode()

Add some documentation to clarify which information ends up where after en/decoding. I tried to match your comment style (going full-on Doxygen seemed a little over the top for a minimal library like this one), if you prefer a different format I'd be happy to change my PR acoordingly :)
I also added some line breaks to the function signature to match the line length hinted at by your /***************************************************************************** comment blocks.

Thanks for the PR. That's a good improvement.
The same improvement could be made to the functions themselves in cobs.c. Also the corresponding COBS/R functions in cobsr.h and cobsr.c. Do you want to make that change to the PR? Otherwise I'm happy to take this PR as-is, then I would make the update to the other files myself.

Oh! I've had a look at your issues just now, maybe this PR resolves https://github.com/cmcqueen/cobs-c/issues/3? :)

Thanks very much for your contribution!
For issue #3, I intended a wiki page with further description and examples of usage.

Oh right :)
Thanks for merging! I could've squashed all commits into one, sorry if I messed up your commit history.


:instance did not return object error on nested attributes and Mongoid

Hoping someone else has run into this and could point me in the right direction.  I'm trying to use Reform with Mongoid 4 and nested fields and having a problems.
Versions:
Rails 4.0.9
Mongoid 4.0.0
Reform 1.1.1
Form looks like this:
class SkillsEntryForm < Reform::Form
  model :user

  property :title_other

  property :job_role_assignment do
    property :id
    property :job_role_id
    validates :job_role_id, presence: true
  end

  collection :skill_assignments do
    property :id
    property :name
    validates :name, presence: true
  end
end

Params look like this:
params[:user] = {"job_role_assignment_attributes"=>{"job_role_id"=>"5405d8f569702d31ab070000"}, "title_other"=>"", "skill_assignments_attributes"=>{"0"=>{"name"=>"MS PowerPoint Basics"}, "1"=>{"name"=>"MS Word Basics"}, "2"=>{"name"=>"MS Excel Basics"}, "3"=>{"name"=>"MS Project Basics"}, "4"=>{"name"=>"Risk Management"}, "5"=>{"name"=>"Quality Management"}, "6"=>{"name"=>"Project Management Fundamentals"}}}

Saving code:
@user = User.find ABC
@form = SkillsEntryForm.new(@user)
@form.validate(params[:user])

Throws the error(:instance did not return object error) with this stacktrace:
representable (2.0.3) lib/representable/binding.rb:166:in `instance_for'
representable (2.0.3) lib/representable/binding.rb:150:in `create_object'
representable (2.0.3) lib/representable/deserializer.rb:30:in `call'
representable (2.0.3) lib/representable/deserializer.rb:14:in `block in deserialize'
representable (2.0.3) lib/representable/deserializer.rb:11:in `each'
representable (2.0.3) lib/representable/deserializer.rb:11:in `each_with_index'
representable (2.0.3) lib/representable/deserializer.rb:11:in `each'
representable (2.0.3) lib/representable/deserializer.rb:11:in `collect'
representable (2.0.3) lib/representable/deserializer.rb:11:in `deserialize'
representable (2.0.3) lib/representable/bindings/hash_bindings.rb:44:in `deserialize'
representable (2.0.3) lib/representable/bindings/hash_bindings.rb:18:in `read'
representable (2.0.3) lib/representable/binding.rb:72:in `read_fragment_for'
representable (2.0.3) lib/representable/binding.rb:61:in `read_fragment'
representable (2.0.3) lib/representable/binding.rb:42:in `block in uncompile_fragment'
representable (2.0.3) lib/representable/binding.rb:122:in `evaluate_option'
representable (2.0.3) lib/representable/binding.rb:41:in `uncompile_fragment'
representable (2.0.3) lib/representable/mapper.rb:68:in `uncompile_fragment'
representable (2.0.3) lib/representable/mapper.rb:35:in `deserialize_property'
representable (2.0.3) lib/representable/mapper.rb:15:in `block in deserialize'
representable (2.0.3) lib/representable/mapper.rb:14:in `each'
representable (2.0.3) lib/representable/mapper.rb:14:in `deserialize'
representable (2.0.3) lib/representable.rb:34:in `update_properties_from'
representable (2.0.3) lib/representable/hash/allow_symbols.rb:10:in `update_properties_from'
representable (2.0.3) lib/representable/hash.rb:31:in `from_hash'
reform (1.1.1) lib/reform/form/validate.rb:31:in `from_hash'
reform (1.1.1) lib/reform/form/validate.rb:95:in `deserialize!'
reform (1.1.1) lib/reform/form/validate.rb:88:in `update!'
reform (1.1.1) lib/reform/form/active_model.rb:35:in `update!'
reform (1.1.1) lib/reform/form/validate.rb:80:in `validate'
reform (1.1.1) lib/reform/form/multi_parameter_attributes.rb:43:in `validate'
app/controllers/workers/skills_entry_controller.rb:13:in `block in update'

Any thoughts would be appreciated.

@danielfarrell  can you show me an example of how exactly did you fix this problem? (preferably code)

Sorry @demondzeta, it's been a couple of years on this one and I don't have access to anything from that company I was working on at that time, and I don't remember what it was off the top of my head.

@demondzeta This problem is completely unrelated to Mongoid. It's a insufficient populator: http://trailblazer.to/gems/reform/populator.html Come and join the Gitter channel if you need help. https://gitter.im/trailblazer/chat


Visualization of the model

Tomek, what do the physicists would like to see to be able to see in order to tell if the model picked up the "right insights"?
This might not only improve the paper, but may make the package used by more people.

@mdeff: I think we can close this issue.


Newsletters: add 155 (2021-06-30)

[x] Update release/RCs @harding
[x] Add topic links when all content done @harding
[x] Stack Exchange section @bitschmidty
[x] Bitcoin Core #22154 Add OutputType::BECH32M and related wallet support for fetching bech32m addresses @harding
[x] Bitcoin Core #22166 Add support for inferring tr() descriptors @Xekyo
[x] BOLTs #877 Remove HTLC amount restriction @dongcarl

Thanks @bitschmidty @dongcarl @Xekyo for the writing and @bitschmidty and @Xekyo for the reviews!

Great newsletter, team!
Pushed a small commit to remove the check-for-topics comment.
@harding @Xekyo @dongcarl @shesek 🙏

Great work this week, team! Very happy to see that I wasn't missed at all :grinning:


Spirit energy doesn't toggle visibility for homebrew setting

It is just missing the   {{#if data.spiritHomebrew}} clause for the spirit energy section.

Thank you for reporting this issue.
This issue should be fixed with the newest update, please check and see.
If its fixed, please close this issue.


try.html: Make shield label also clickable

Since 648bef473bb5657e5a54, this requires a small rebase.

It looks like the whole  element can be assigned both style and click handler.

@espadrine should be okay now. PTAL.

Thanks for the contribution!

No problemo. :+1:


ResponseFactory: Add a response factory to the public API

Pull Request Template
Description
This change refactors and exposes a factory to create the item and feed responses. This allows users to create the responses which is necessary if users want to create a custom wrapper for the container abstraction.

ItemResponse<Book> itemResponse = this.cosmosClient.ResponseFactory.CreateItemResponse<Book>(responseMessage);

public abstract CosmosResponseFactory
internal abstract CosmosResponseFactoryInternal : CosmosResponseFactory
internal sealed CosmosResponseFactoryCore : CosmosResponseFactoryInternal

Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

This uses the default serializer, correct? So users with a custom one would still need to do it on their end.
If it uses the default serializer, can we explain more why would you use this versus just calling the Type APIs? Sounds like it's a very specific scenario.


Implement Resource panel UI

Description
Implement a new tab in the ArgoCD app resource panel that shows details about the app's tasks/evaluations and their results. Come up with a good UX for showing this information.
Details
The keptn-gateway should have one endpoint to gather and return the needed information.
Request params:

KeptnAppVersion name, namespace

Returned data:

pre/post tasks/evaluations  from app together with the respective results
list of KeptnWorkloads with pre/post tasks/evaluations together with the respective results

Notes
Docs for extending adding a new resource tab

@mowies I am not sure about the complexity , but I would like to take a stab at this. I am a newbie, but happy to take on a challenge.


See where it blows up if we don't have this.

jenkins run python3

jenkins test python 3

jenkins test python 3

jenkins run python 3

jenkins run


PR feedback to use TS Partial

Description

Motivation and Context

How Has This Been Tested?

Markup:

// Paste your FULL Playground.vue here

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)

Checklist:

[ ] The PR title is no longer than 64 characters.
[ ] The PR is submitted to the correct branch (master for bug fixes and documentation updates, dev for new features and breaking changes).
[ ] My code follows the code style of this project.
[ ] I've added relevant changes to the documentation (applies to new features and breaking changes in core library)
[ ] I've added new examples to the kitchen (applies to new features and breaking changes in core library)

Codecov Report

Merging #1 into faSvg-support will not change coverage.
The diff coverage is 100%.

@@              Coverage Diff               @@
##           faSvg-support       #1   +/-   ##
==============================================
  Coverage          85.87%   85.87%
==============================================
  Files                338      338
  Lines               9224     9224
  Branches            2458     2458
==============================================
  Hits                7921     7921
  Misses              1213     1213
  Partials              90       90

Impacted Files
Coverage Δ

...kages/vuetify/src/services/icons/presets/fa-svg.ts
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


refactor(cli): clean up code around codeowners

Current dependencies on/for this PR:

main

PR #1099   👈

This comment was auto-generated by Graphite.

Merge activity

Oct 29, 11:21 PM: @Boshen merged this pull request with Graphite.


Rate Limit Reached

I'm having problems with Facebook reaching its rate limit :/ can someone help me with this :|

This is known issue. It can be solved by caching responses. That's not build into social-feed. Feel free to propose solution by opening a PR or join us on gitter.im/pavel2/social-feed


fix: CompileError ExMachina.Ecto is not loaded on dev

Meanwhile waiting for this PR to be ready, the quick workaround is to replace the 2 occurrences of:
- {:ex_machina, "~> 2.3", only: [:test], runtime: false}
+ {:ex_machina, "~> 2.3", only: [:test, :dev], runtime: false}

Overview
Describe what your Pull Request is about in a few sentences.
Changes
Describe your changes and implementation choices. More details make PRs easier to review.

Change 1
Change 2
...

Testing
Describe how to test your new feature/bug fix and if possible, a step by step guide on how to demo this.

Coverage remained the same at ?% when pulling b014fea10a529dea6971e3db8d7db8d5d4e186f8 on fix-ex-machina-compile-error into 2582df46c5a049ce2bb48efd3a6e726122da6721 on master.

yeah, I am not sure how to resolve this. The other side of the mirror is that there is code in test/support that is useful when doing various stuffs in iex -S mix. From slack:

piotr  1 hour ago
While elixirc_paths excluding test/support in dev sounds clean and reasonable, it would limit the usefulness of running various scripts from iex.
(ex_machina naturally doesn't belong in dev, so I see the point of not liking the workaround)
scripts are: ad hoc hacking and experimenting scripts . They're using things like root_chain_helper (also used in tests) and so forth. Probably also scripts to run omg_performance tests will be affected in :dev
unnawut  24 minutes ago
Can we always run omg_performance in :test? If so then we don’t need to compile "test/support" in :dev.
piotr  < 1 minute ago
well test is gauged (in some aspects like config) towards testing, dev is more prod-resembling but with all the non-prod, handy tools present. omg_performance likes dev much better, so do the ad-hoc scripts I sometimes use.

Having thought about this, if we don't care that an awful lot about cleanliness of the dev env, we could invite the possibility of having test specific code (like ex_machina) there - it will be useless, but do we care that much? Dunno.

Or we add a new compile path for dev & test...
Common elixir configuration:

lib for application code -> compiled in [:dev, :test, :prod]
test/support for test support modules -> compiled in [:test]

So we add:

dev/support for dev support modules -> compiled in [:dev, :test]

Or move those dev & test support modules into a new :omg_dev subapp. Add as a dependency with only: [:dev, :test], and not including it in distillery configs.

Both 1 and 2 look good and would work I think.
1/ seems slightly easier and "smaller"
2/ seems slightly cleaner and more standard
There's also
0/ just ex_machina, only: [:dev, :test] and yolo, dirtiest and simplest.

I'm trying the :omg_dev subapp approach and let you know how it turns out.
I'm avoiding 0/ because it'll be harder to fix down the road, and 1/ is just not conventional. But I might change my mind. 😅

It turns out the subapp approach throws lots of cyclic dependency because Support.* depend a lot on OMG.Eth.* functionalities.
So I stop here instead, with only OMG and OMG.Eth, where most Support.* reside in, having:
defp elixirc_paths(:prod), do: ["lib"]
defp elixirc_paths(:dev), do: ["lib", "test/support"]
defp elixirc_paths(:test), do: ["lib", "test/support"]

While the rest are more or less:
defp elixirc_paths(:prod), do: ["lib"]
defp elixirc_paths(:dev), do: ["lib"]
defp elixirc_paths(:test), do: ["lib", "test/support"]

This way we're scoping down "test/support" in :dev to a minimum and :ex_machina can still be limited to only: [:test].

@pdobacz @pnowosie Can you help trying this PR out? I don't have visibility to what scripting is used so I can't test it thoroughly. Or you can let me know what you need as well.

Also if we're doing some scripting, I'd like to wrap them under some kind of tests so we can make sure it gets covered by new changes.


Images support light and dark mode

#194  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @thisisgoldman and the rest of your teammates on  Graphite

Merge activity

Aug 29, 10:16 PM EDT: @thisisgoldman started a stack merge that includes this pull request via Graphite.


Remove omitempty

Description
Remove omitempty from ScheduledPolicyItems. The backend enforces that ScheduledPolicyItems is not empty, so this omitempty tag is virtually pointless and currently blocks some development in the CLI.
A ticket will be made to implement this change in the backend.
Type of change:

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

Required Checklist:

[ ] I have signed the MongoDB CLA
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] I have added any necessary documentation (if appropriate)
[x] I have run make fmt and formatted my code

closed due to finding a better solution


Allow Overriding of TLS Cert Names

Currently this defaults to looking for a certificate with the FQDN as
its name.  This adds in an override mechanism so I (anyone) can use
whatever they want, for example I use my client cert whose CN is my
email address.

Thanks, LGTM 👍