Java SIGSEGV when running CP-SAT solver

What version of OR-Tools and what language are you using?
Version: 9.9.3963
Language: Java openjdk 21.0.2 2024-01-16 LTS
Which solver are you using (e.g. CP-SAT, Routing Solver, GLOP, BOP, Gurobi)
CP-SAT
What operating system (Linux, Windows, ...) and version?
Ubuntu 21.04 (64-bit, 5.11.0-49-generic)
What did you do?
I attempted to solve a CP model involving:

boolean vars
integer vars
optional fixed size interval vars
no overlap 2d constraint
greater or equal constraints
minimization function

Below I am attaching all the information printed by the CP-SAT solver.
I know a MWE would be required in this cases, but right know my code is quite a mess, if the log below is not enough to trace the issue, let me know and I will try to build a MWE.
What did you expect to see
The program should exit normally.
What did you see instead?
Sometimes a SIGSEGV is detected by the JVM.
This happens randomly, say a bit more than 50% of the times, in the other cases the solver exits normally (with an optimal solution).
So far the SIGSEGV always happened after the solver found an optimal solution (I know that the optimal objective value is 54 and the line [2024-03-22 10:09:07] [INFO   ] com.mypackage.MySolver: Solution #8: value = 54.00, time = 0.03 s is always printed befor the SIGSEGV occurs).
Starting CP-SAT solver v9.9.3963
Parameters: log_search_progress: true log_to_stdout: true log_to_response: true
Setting number of workers to 8

Initial optimization model '': (model_fingerprint: 0x552678ff65309473)
#Variables: 36 (#ints: 1 in objective)
  - 7 Booleans in [0,1]
  - 2 in [0,9]
  - 2 in [0,12]
  - 4 in [0,16]
  - 6 in [0,17]
  - 2 in [0,38]
  - 2 in [0,41]
  - 4 in [0,45]
  - 6 in [0,46]
  - 1 in [0,53]
#kInterval: 28 (#enforced: 28)
#kLinear2: 14
#kNoOverlap2D: 1 (#rectangles: 14, #optional: 14)

Starting presolve at 0.00s
  4.08e-05s  0.00e+00d  [DetectDominanceRelations]
  1.92e-04s  0.00e+00d  [PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1
  4.32e-06s  0.00e+00d  [ExtractEncodingFromLinear]
[Symmetry] Graph for symmetry has 156 nodes and 245 arcs.
[Symmetry] Symmetry computation done. time: 0.000110585 dtime: 7.587e-05
[Symmetry] #generators: 4, average support size: 10
[Symmetry] 15 orbits with sizes: 3,3,3,3,3,2,2,2,2,2,...
[Symmetry] Found orbitope of size 5 x 2
  1.47e-04s  1.88e-06d  [Probe] #probed=14
  3.89e-06s  0.00e+00d  [MaxClique]
  1.58e-05s  0.00e+00d  [DetectDominanceRelations]
  9.02e-05s  0.00e+00d  [PresolveToFixPoint] #num_loops=2 #num_dual_strengthening=1
  9.07e-06s  0.00e+00d  [ProcessAtMostOneAndLinear]
  4.68e-05s  0.00e+00d  [DetectDuplicateConstraints]
  9.99e-06s  8.40e-08d  [DetectDominatedLinearConstraints] #relevant_constraints=14
  5.28e-05s  0.00e+00d  [DetectDifferentVariables] #different=14
  9.96e-07s  0.00e+00d  [ProcessSetPPC]
  7.62e-07s  0.00e+00d  [FindAlmostIdenticalLinearConstraints]
  2.06e-06s  0.00e+00d  [FindBigAtMostOneAndLinearOverlap]
  9.23e-06s  8.45e-07d  [FindBigVerticalLinearOverlap]
  8.10e-07s  0.00e+00d  [FindBigHorizontalLinearOverlap]
  8.89e-07s  0.00e+00d  [MergeClauses]
  1.03e-05s  0.00e+00d  [DetectDominanceRelations]
  6.06e-05s  0.00e+00d  [PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
  7.93e-06s  0.00e+00d  [DetectDominanceRelations]
  4.81e-05s  0.00e+00d  [PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
[Symmetry] Graph for symmetry has 156 nodes and 245 arcs.
[Symmetry] Symmetry computation done. time: 8.1961e-05 dtime: 7.587e-05
[Symmetry] #generators: 4, average support size: 10
[Symmetry] 15 orbits with sizes: 3,3,3,3,3,2,2,2,2,2,...
[Symmetry] Found orbitope of size 5 x 2
  1.23e-04s  1.88e-06d  [Probe] #probed=14
  1.93e-06s  0.00e+00d  [MaxClique]
  1.52e-05s  0.00e+00d  [DetectDominanceRelations]
  6.64e-05s  0.00e+00d  [PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
  5.43e-06s  0.00e+00d  [ProcessAtMostOneAndLinear]
  1.34e-05s  0.00e+00d  [DetectDuplicateConstraints]
  6.30e-06s  8.40e-08d  [DetectDominatedLinearConstraints] #relevant_constraints=14
  3.42e-05s  0.00e+00d  [DetectDifferentVariables] #different=14
  1.27e-06s  0.00e+00d  [ProcessSetPPC]
  9.84e-07s  0.00e+00d  [FindAlmostIdenticalLinearConstraints]
  2.04e-06s  0.00e+00d  [FindBigAtMostOneAndLinearOverlap]
  5.25e-06s  8.45e-07d  [FindBigVerticalLinearOverlap]
  8.63e-07s  0.00e+00d  [FindBigHorizontalLinearOverlap]
  1.06e-06s  0.00e+00d  [MergeClauses]
  1.78e-05s  0.00e+00d  [DetectDominanceRelations]
  7.32e-05s  0.00e+00d  [PresolveToFixPoint] #num_loops=1 #num_dual_strengthening=1
  8.14e-06s  0.00e+00d  [ExpandObjective]

Presolve summary:
  - 0 affine relations were detected.
  - rule 'TODO dual: add implied bound' was applied 252 times.
  - rule 'TODO dual: only one blocking enforced constraint?' was applied 252 times.
  - rule 'TODO dual: only one unspecified blocking constraint?' was applied 6 times.
  - rule 'TODO symmetry: add symmetry breaking inequalities?' was applied 2 times.
  - rule 'linear: reduced variable domains' was applied 2 times.
  - rule 'linear: simplified rhs' was applied 14 times.
  - rule 'presolve: 0 unused variables removed.' was applied 1 time.
  - rule 'presolve: iteration' was applied 2 times.

Presolved optimization model '': (model_fingerprint: 0x9003fb897c7096a0)
#Variables: 36 (#ints: 1 in objective)
  - 7 Booleans in [0,1]
  - 2 in [0,9]
  - 2 in [0,12]
  - 4 in [0,16]
  - 6 in [0,17]
  - 2 in [0,38]
  - 2 in [0,41]
  - 4 in [0,45]
  - 6 in [0,46]
  - 1 in [15,53]
#kInterval: 28 (#enforced: 28)
#kLinear2: 14
#kNoOverlap2D: 1 (#rectangles: 14, #optional: 14)

Preloading model.
#Bound   0.00s best:inf   next:[30,106]   initial_domain
[Symmetry] Graph for symmetry has 156 nodes and 245 arcs.
[Symmetry] Symmetry computation done. time: 0.000113988 dtime: 7.587e-05
[Symmetry] #generators: 4, average support size: 10
[Symmetry] Found orbitope of size 5 x 2
#Model   0.00s var:36/36 constraints:43/43

Starting search at 0.00s with 8 workers.
6 full problem subsolvers: [default_lp, max_lp, no_lp, quick_restart, quick_restart_no_lp, reduced_costs]
1 first solution subsolver: [fj_short_default]
13 incomplete subsolvers: [feasibility_pump, graph_arc_lns, graph_cst_lns, graph_dec_lns, graph_var_lns, packing_precedences_lns, packing_rectangles_lns, packing_slice_lns, rins/rens, rnd_cst_lns, rnd_var_lns, scheduling_precedences_lns, violation_ls]
3 helper subsolvers: [neighborhood_helper, synchronization_agent, update_gap_integral]
#1       0.01s best:92    next:[30,90]    fj_short_default(batch:1 #lin_moves:0 #lin_evals:2 #gen_moves:10 #gen_evals:25 #comp_moves:10 #backtracks:0 #weight_updates:0)
[2024-03-22 10:09:07] [INFO   ] com.mypackage.MySolver: Solution #1: value = 92.00, time = 0.01 s
#2       0.01s best:90    next:[30,88]    violation_ls(batch:1 #solutions_imported:1 #lin_moves:0 #lin_evals:0 #gen_moves:1 #gen_evals:3 #comp_moves:1 #backtracks:0 #weight_updates:0)
[2024-03-22 10:09:07] [INFO   ] com.mypackage.MySolver: Solution #2: value = 90.00, time = 0.01 s
#Bound   0.01s best:90    next:[32,88]    reduced_costs
#Bound   0.01s best:90    next:[34,88]    reduced_costs
#3       0.01s best:88    next:[34,86]    quick_restart_no_lp (fixed_bools=3/110)
[2024-03-22 10:09:07] [INFO   ] com.mypackage.MySolver: Solution #3: value = 88.00, time = 0.01 s
#Bound   0.01s best:88    next:[36,86]    reduced_costs
#4       0.01s best:86    next:[36,84]    quick_restart_no_lp (fixed_bools=7/111)
[2024-03-22 10:09:07] [INFO   ] com.mypackage.MySolver: Solution #4: value = 86.00, time = 0.01 s
#5       0.01s best:62    next:[36,60]    graph_var_lns (d=0.50 s=13 t=0.10 p=0.00 stall=0 h=auto_l0)
[2024-03-22 10:09:07] [INFO   ] com.mypackage.MySolver: Solution #5: value = 62.00, time = 0.01 s
#Bound   0.02s best:62    next:[38,60]    reduced_costs
#Bound   0.02s best:62    next:[40,60]    reduced_costs
#Bound   0.02s best:62    next:[42,60]    reduced_costs
#Bound   0.02s best:62    next:[44,60]    reduced_costs
#Bound   0.02s best:62    next:[46,60]    reduced_costs
#6       0.02s best:60    next:[46,58]    quick_restart_no_lp (fixed_bools=13/142)
[2024-03-22 10:09:07] [INFO   ] com.mypackage.MySolver: Solution #6: value = 60.00, time = 0.02 s
#7       0.02s best:58    next:[46,56]    no_lp (fixed_bools=10/158)
[2024-03-22 10:09:07] [INFO   ] com.mypackage.MySolver: Solution #7: value = 58.00, time = 0.02 s
#Bound   0.02s best:58    next:[48,56]    reduced_costs
#8       0.03s best:54    next:[48,52]    quick_restart_no_lp (fixed_bools=18/160)
[2024-03-22 10:09:07] [INFO   ] com.mypackage.MySolver: Solution #8: value = 54.00, time = 0.03 s
#Bound   0.03s best:54    next:[50,52]    reduced_costs
#Bound   0.04s best:54    next:[52,52]    reduced_costs
#Model   0.14s var:35/36 constraints:29/43
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f0e0db73fdd, pid=27266, tid=27291
#
# JRE version: OpenJDK Runtime Environment Temurin-21.0.2+13 (21.0.2+13) (build 21.0.2+13-LTS)
# Java VM: OpenJDK 64-Bit Server VM Temurin-21.0.2+13 (21.0.2+13-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libortools.so.9+0xf3efdd]  operations_research::sat::SymmetryPropagator::AddSymmetry(std::unique_ptr<operations_research::SparsePermutation, std::default_delete<operations_research::SparsePermutation> >)+0xad
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to **OMISSIS**/core.27266)
#
# An error report file with more information is saved as:
# /home/**OMISSIS**/hs_err_pid27266.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
#

hs_err_pid27266.log
Anything else we should know about your project / environment
Nothing special

can you send me the model ?
model.exportToFile("issue4145.pb.txt");

context: I fixed a crash after release and I want to know if your bug is fixed

it is fixed on main.
We will do a 9.9.1 next week.


Support Documents Translation  Upload

Does this software support document or multiple documents  translation and upload  then documents translated can be downloaded in different format or translation displayed for each document on a section

Need more information, reopen if needed


Missing implementation of visitPatternAssignment during linking

Exception: Missing implementation of visitPatternAssignment
#0      ThrowingAstVisitor._throw (package:analyzer/dart/ast/visitor.dart:2842:5)
#1      ThrowingAstVisitor.visitPatternAssignment (package:analyzer/dart/ast/visitor.dart:2663:56)
#2      PatternAssignmentImpl.accept (package:analyzer/src/dart/ast/ast.dart:10421:50)
#3      AstBinaryWriter._writeNode (package:analyzer/src/summary2/ast_binary_writer.dart:933:10)
#4      AstBinaryWriter.visitNamedExpression (package:analyzer/src/summary2/ast_binary_writer.dart:512:5)
#5      NamedExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:9311:50)
#6      AstBinaryWriter._writeNodeList (package:analyzer/src/summary2/ast_binary_writer.dart:939:19)
#7      AstBinaryWriter.visitArgumentList (package:analyzer/src/summary2/ast_binary_writer.dart:55:5)
#8      ArgumentListImpl.accept (package:analyzer/src/dart/ast/ast.dart:398:50)
#9      AstBinaryWriter._writeNode (package:analyzer/src/summary2/ast_binary_writer.dart:933:10)
#10     AstBinaryWriter._writeOptionalNode (package:analyzer/src/summary2/ast_binary_writer.dart:948:7)

https://dart-review.googlesource.com/c/sdk/+/302882


About representations of alphafold2

Hi !
In the paper, I got interested in its evolutionary and structural representations (msa and pair representations, respectively) to predict highly accurate structure of each proteins.
If representations can be obtained, it can be applied to many studies.
Is it possible to get information about representations ?
Thanks,
Seokju.

Hi Seokju,
Yes indeed, the representations can be requested from AlphaFold with return_representations=True:
https://github.com/deepmind/alphafold/blob/b85ffe10799ca08cc62146f1dabb4e4ee6c0a580/alphafold/model/modules.py#L287
You'd need to set this argument to True in the model runner here or here depending on whether you are using Monomer or Multitmer system.
You should then expect to have the representations returned (among other things) from the model predict call in cell 5 of the AlphaFold Colab (or in a similar place of the non-Colab workflow):
model_runner.predict(processed_feature_dict, random_seed=random.randrange(sys.maxsize))

Thanks,
Anna

Closing this issue for now, feel free to reopen if this is still a problem.

Hi.
in the case of AF-multimer, I am confused what the reprsentations mean.
For example the single representation in the monomer system is quite clear with it being of dimension (r,384). r being the number of residue.
I was getting the representationusing AF-multimer and the dimension is (rhat,384), where rhat is in between the two chains of my heterodimer.
Can you please elaborate on the representation the multimer System returns?
Thanks,
Cedric


InfluxDB writer invalid time parsing

BUG REPORT
Hello guys,
first of all - great work!
My sensors publish SenML json data via MQTT to the assigned channel. This works as expected. The data is also normalized and written into the InfluxDB via the influxdb-writer.
When I checked the data, it seems that the time is not correctly written into the database - the decimal places of the time is ignored when transforming the time into nano-seconds.
Here an example - the SenML looks as follows:
[{"bt":1554381569.992,"n":"COTemperatureRead","u":"Cel","v":34.3},{"bt":1554381569.992,"n":"COTemperatureSet","u":"Cel","v":40},{"bt":1554381569.992,"n":"DHWTemperatureRead","u":"Cel","v":36.5},{"bt":1554381569.992,"n":"DHWTemperatureSet","u":"Cel","v":45},{"bt":1554381569.992,"n":"DriverStatus","v":33},{"bt":1554381569.992,"n":"FanOn","v":0},{"bt":1554381569.992,"n":"FanSpeed","u":"%","v":0},{"bt":1554381569.992,"n":"FeederOn","v":0},{"bt":1554381569.992,"n":"COPumpOn","v":0},{"bt":1554381569.992,"n":"DHWPumpOn","v":0},{"bt":1554381569.992,"n":"PumpMode","v":3},{"bt":1554381569.992,"n":"FuelLevel","v":0},{"bt":1554381569.992,"n":"FuelLevelPerc","u":"%","v":0},{"bt":1554381569.992,"n":"FuelHours","u":"s","v":0}]
When looking into the database I get:
time                channel link name               protocol publisher unit updateTime value

1554381569000000000 389          COPumpOn           mqtt     106            0          0
1554381569000000000 389          COTemperatureRead  mqtt     106       Cel  0          34.3
1554381569000000000 389          COTemperatureSet   mqtt     106       Cel  0          40
1554381569000000000 389          DHWPumpOn          mqtt     106            0          0
1554381569000000000 389          DHWTemperatureRead mqtt     106       Cel  0          36.5
1554381569000000000 389          DHWTemperatureSet  mqtt     106       Cel  0          45
1554381569000000000 389          DriverStatus       mqtt     106            0          33
1554381569000000000 389          FanOn              mqtt     106            0          0
1554381569000000000 389          FanSpeed           mqtt     106       %    0          0
1554381569000000000 389          FeederOn           mqtt     106            0          0
1554381569000000000 389          FuelHours          mqtt     106       s    0          0
1554381569000000000 389          FuelLevel          mqtt     106            0          0
1554381569000000000 389          FuelLevelPerc      mqtt     106       %    0          0
1554381569000000000 389          PumpMode           mqtt     106            0          3
As we see, instead of<PHONE_NUMBER>992000000, I get<PHONE_NUMBER>000000000, what means that the fractional part is ignored.
When I turn on the mongodb-writer, the information is stored as expected ( as<PHONE_NUMBER>.992)
I forgot to say I use Mainflux 0.8.0
Regards,
Boris Bokun
strictit d.o.o.
Belgrade

I can confirm the bug. Line https://github.com/mainflux/mainflux/blob/4f62f89b87d2c0b17819e9a6fd6f1282ca815464/writers/influxdb/messages.go#L115 simply cuts off the decimal value from the time.

@bbokun would it be possible that you pull the fix from @dusanb94's branch, butild the docker and test it?
https://github.com/mainflux/mainflux/pull/689

@drasko @dusanb94
I will try it in the evening. Is that ok?

@bbokun sure, thanks!

@bbokun We merged the fix by @dusanb94
If you can pull the latest docker images or master branch, depending on how you run Mainflux and try now that would be great! Thanks!

@nmarcetic  @drasko @dusanb94
👍
Hi guys,
I pulled the new version and tried it out.
Now it looks good.  Here the results:
Two SenML packets:
[{"bt":1554424254.927,"n":"COTemperatureRead","u":"Cel","v":24.6},{"bt":1554424254.927,"n":"COTemperatureSet","u":"Cel","v":40},{"bt":1554424254.927,"n":"DHWTemperatureRead","u":"Cel","v":33.4},{"bt":1554424254.927,"n":"DHWTemperatureSet","u":"Cel","v":45},{"bt":1554424254.927,"n":"DriverStatus","v":33},{"bt":1554424254.927,"n":"FanOn","v":0},{"bt":1554424254.927,"n":"FanSpeed","u":"%","v":0},{"bt":1554424254.927,"n":"FeederOn","v":0},{"bt":1554424254.927,"n":"COPumpOn","v":0},{"bt":1554424254.927,"n":"DHWPumpOn","v":0},{"bt":1554424254.927,"n":"PumpMode","v":3},{"bt":1554424254.927,"n":"FuelLevel","v":0},{"bt":1554424254.927,"n":"FuelLevelPerc","u":"%","v":0},{"bt":1554424254.927,"n":"FuelHours","u":"s","v":0}]
[{"bt":1554424255.177,"n":"COTemperatureRead","u":"Cel","v":24.6},{"bt":1554424255.177,"n":"COTemperatureSet","u":"Cel","v":40},{"bt":1554424255.177,"n":"DHWTemperatureRead","u":"Cel","v":33.4},{"bt":1554424255.177,"n":"DHWTemperatureSet","u":"Cel","v":45},{"bt":1554424255.177,"n":"DriverStatus","v":33},{"bt":1554424255.177,"n":"FanOn","v":0},{"bt":1554424255.177,"n":"FanSpeed","u":"%","v":0},{"bt":1554424255.177,"n":"FeederOn","v":0},{"bt":1554424255.177,"n":"COPumpOn","v":0},{"bt":1554424255.177,"n":"DHWPumpOn","v":0},{"bt":1554424255.177,"n":"PumpMode","v":3},{"bt":1554424255.177,"n":"FuelLevel","v":0},{"bt":1554424255.177,"n":"FuelLevelPerc","u":"%","v":0},{"bt":1554424255.177,"n":"FuelHours","u":"s","v":0}]
The result in the database:
name: messages
time                channel link name               protocol publisher unit updateTime value

1554424254927000045 389          COPumpOn           mqtt     106            0          0
1554424254927000045 389          COTemperatureRead  mqtt     106       Cel  0          24.6
1554424254927000045 389          COTemperatureSet   mqtt     106       Cel  0          40
1554424254927000045 389          DHWPumpOn          mqtt     106            0          0
1554424254927000045 389          DHWTemperatureRead mqtt     106       Cel  0          33.4
1554424254927000045 389          DHWTemperatureSet  mqtt     106       Cel  0          45
1554424254927000045 389          DriverStatus       mqtt     106            0          33
1554424254927000045 389          FanOn              mqtt     106            0          0
1554424254927000045 389          FanSpeed           mqtt     106       %    0          0
1554424254927000045 389          FeederOn           mqtt     106            0          0
1554424254927000045 389          FuelHours          mqtt     106       s    0          0
1554424254927000045 389          FuelLevel          mqtt     106            0          0
1554424254927000045 389          FuelLevelPerc      mqtt     106       %    0          0
1554424254927000045 389          PumpMode           mqtt     106            0          3
1554424255177000045 389          COPumpOn           mqtt     106            0          0
1554424255177000045 389          COTemperatureRead  mqtt     106       Cel  0          24.6
1554424255177000045 389          COTemperatureSet   mqtt     106       Cel  0          40
1554424255177000045 389          DHWPumpOn          mqtt     106            0          0
1554424255177000045 389          DHWTemperatureRead mqtt     106       Cel  0          33.4
1554424255177000045 389          DHWTemperatureSet  mqtt     106       Cel  0          45
1554424255177000045 389          DriverStatus       mqtt     106            0          33
1554424255177000045 389          FanOn              mqtt     106            0          0
1554424255177000045 389          FanSpeed           mqtt     106       %    0          0
1554424255177000045 389          FeederOn           mqtt     106            0          0
1554424255177000045 389          FuelHours          mqtt     106       s    0          0
1554424255177000045 389          FuelLevel          mqtt     106            0          0
1554424255177000045 389          FuelLevelPerc      mqtt     106       %    0          0
1554424255177000045 389          PumpMode           mqtt     106            0          3
The milliseconds are now visible, and it is ok.
The only thing is that the multiplication with 1e09 gave the expected floating values rounding issues.
For me this is not a problem.
Thanks a lot !


Use 'rasa data convert' to get a json of the nlu instead of reading the file

Right now the nlu file is being read to build an nlu dataframe. This is prone to error because the file may contain comments etc which are being dealt but it's possible that not all possibilities have been covered. Furthermore if we use rasa data convert utility we're not dependent on the file type (markdown vs yaml for Rasa 2)

Tracked in JIRA (ROBO-1789)


Fix centralized search button bug

As a user, I want the search results to load without having to leave the home page (without having press the search button twice)

Before merging this with master, the horizontal-scroll view branch should be merged

The functionality now works, just need to add an instrumented test.


[Bitcoin] BTC transaction fee estimator

https://github.com/Blockstream/esplora/blob/master/API.md#fee-estimates

Going to include this with: https://github.com/hirosystems/stacks-wallet-web/issues/2873

Actually going to reopen and do separately.


Column order (col-first/col_md-last) stops working when column witdh (col-5) is specified

Background:
I'm trying to swap the order of columns between breakpoints, using the method on the docs page under section "Normal flow with ordering (first / last) (can be based on MQ keys)"
Reproduce:
In that section, when you add a size to the column it is breaking the swapped order.
Just change
...
 to

...
 on a large screen and you will see what I mean instantly.
I hope you guys can take a look
Additional:
While col_md-12-first does not work, col_md-first-12 does partly work (only on the breakpoint off course)
Using this kind of sizing in a media query would even be a nice workaround, but only if the breakpoint would be mobile-first.. Then I could just do something like:
. But now there is no way > 1280px

This is still an issue, is there any motion to fix this?
First and last is super helpful, but it can barely be used since most times the columns being created are of sizes, which is when they stop working.


https://github.com/space-wizards/space-station-14/pull/24381 needs reviewing

Entites is spelt wrong
There's a bunch of ToArrays which shouldn't be there
Use DataRecord
Don't use properties unless you need them
There's a bunch of copy-paste between entity and tile anomalies, both for the records and for the spawning logic is entirely copy-paste with comments.

#24449 now


Solution of "Extend BookRestController" not conform to OpenAPI Spec

With task "Extend BookRestController", the attendees are supposed to add a new mapping, so that the following mappings are present in the BookRestController afterwards:
@GetMapping
public List<Book> getAllBooks() {
    // ...
}

@GetMapping("/{isbn}")
public Book getSingleBook(@PathVariable String isbn) throws Exception {
    // ...
}

@GetMapping(params = "author")
public Book searchBookByAuthor(@RequestParam String author) throws Exception {
    // ...
}

This means that for GET requests with path "/book" there are 2 mappings available now. For Spring this is not a problem. But if we add Springdoc/Swagger later, it gives a weird result:

For "GET /book" we have only one operation where the query parameter author is required and which returns only one Book object. The operation getAllBooks returning multiple books does not appear anymore. (Attendees also ask every time why searchBookByAuthor returns only one book and not multiple.)
From my point of view, our BookRestController is no longer OpenAPI conform, because there only one operation may be defined per path and method, see Specification. I suggest to move searchBookByAuthor to another path.

Yes, this is correct. BookRestController doesn't comply withe the OpenAPI specification. However, adding another path probably would make the code more complex.
Could you maybe provide a pull request implementing the structure you have in mind?

Ich antworte einfach mal in Deutsch  😄
Die "billigste" Lösung wäre wahrscheinlich, @RequestParam(required=false) zu verwenden. Dann darf man aber auch keine Validatoren wie @NotNull oder @NotBlank verwenden.


Set the value of an input based on something outside of the form?

I looked in the documentation, and didn't find an answer to this, so I apologize if it's covered and I missed.
Our app has some fields which are linked to each other. Imagine they look like this:
<input name="input-a" onChange={e => {props.handleChange(e); props.updateParentStuff(e)}} />
<input name="input-b" onChange={e => {props.handleChange(e); props.updateParentStuff(e)}} />

When one of the inputs is updated, the parent hits an API to get some kind of value back, and then the other input needs to be updated, or vis-a-versa.  So the flow looks like this:
Update input-a => pass value to parent => call api => return value => update input b
OR
Update input-b => pass value to parent => call api => return value => update input a

The issue is I can't find a way to force an input in the Formik form to have a certain value, outside of setting the initialValue parameter (we're using the render prop).  I'm hacking around this problem right now by taking a state variable in the parent, and merging it with the values which get submitted when the form is.  I'd like to just have the values represent the actual data to be submitted, though.
Thanks!

Hey @kwhitaker!
I believe there is nothing wrong with initialValues being dynamic. As you can see here https://github.com/jaredpalmer/formik/blob/master/src/formik.tsx#L256, when initialValues changes and does not equal, the form is being reset with the new value.

Thanks. I'll take a look and try it again - maybe I[m missing something.

Probably you also want to use - https://github.com/jaredpalmer/formik#enablereinitialize-boolean, which is falseby default.

My suggestion is to make a class component that uses componentWillReceiveProps and pass it outside props. You can also pass it whatever formik props and methods it needs. Within cWRP you can compare changes and then safely call any Formik method. Although it uses context instead of passing formik props directly, this is essentiallyhow formik-persist works.

You can use this concept to make plugins/addons.
const SuperFormik = ({custom, ...props}) =>
  <Formik {...props}
     render={(p) => [
       props.render(p),
      <Persist />,
      <CheckProfanity customThing={custom} />,
      <SomethingElse/>
     ] // imagine that these all do stuff in cWRP and cDU but render `null`
    }
  />

setFieldValue is also useful, for e.g.:
props.setFieldValue('birth_date', selectedDate);

setFieldValue is also useful, for e.g.:
props.setFieldValue('birth_date', selectedDate);

as an option we can pass setFieldValue as props
const handleIcoFrom = (
    setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void
  ) => {
    setFieldValue("accNumber", 55555555);
  };
onClick={() => handleIcoFrom(setFieldValue)}


fix(node): typo in addScript docstring

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

🙏


Add Codecov to test pipeline

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@24caf18). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #40   +/-   ##
=========================================
  Coverage          ?   99.61%
  Complexity        ?      917
=========================================
  Files             ?      164
  Lines             ?     2599
  Branches          ?        0
=========================================
  Hits              ?     2589
  Misses            ?       10
  Partials          ?        0

Continue to review full report at Codecov.

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


Kudu debug console in Azure Portal

Hi
How come the Kudu debug console is different from the console found in the Azure portal for an app service? The Kudu console seems more feature complete (support for tab completion etc).
Will Kudu ever get integrated into the Azure Portal, or is the plan to keep it outside as it´s own thing? I understand there may be different teams developing these products, but from a users perspective, it would be nice to have everything in one place.

The one in Portal is actually using the Kudu API (command controller) under the cover. The difference is that it doesn't use SignalR, and instead uses a single command mode which makes it less of a true console. e.g. you run set foo=1, and it's not actually there, whereas is Kudu Console it is.
I think the reason we couldn't use the SignalR flavor in the Portal is that Portal had concerns over keeping on open connection to the backend, due to the limited number of connections made available by browsers.
Note that Portal does have a direct link to Kudu Console, under Advanced Tools.


slice of maps not parsed properly

Describe the bug
I have a struct with
type SomeStruct struct {
  SomeMember               []map[string]interface{} `json:"some_member,omitempty"
}

This gets parsed as (swagger,json)
"some_member": {
       "type": "array",
               "items": {
                        "type": "\u0026{%!s(token.Pos=1359) string %!s(*ast.InterfaceType=\u0026{1370 0xc0066b3170 false})}"
               }
     },

Your swag version
1.6.3
Your go version
1.13
Does the slice of maps needs to be handled differently?

1.6.3 is too old.
needs upgrading

@sdghchj .. Thanks.. I upgraded, that fixed the issue...  this can be closed....


Update Babel dependencies

What does this PR do?
We are finally moving from Babel 6 to 7! So the big change on this PR is that everything Babel related now uses their "new" namespace: @babel/.
This is breaking because of two reasons:

If you have some custom plugin or something adding settings Babel configuration (or the env preset, like the Angular and React plugins), you need to update them to use the new name: @babel/preset-env.
If you added custom plugins or preset to your target Babel configuration, they now need to be compatible with Babel > 7, so they need to be on @babel/ (at least the officials).

How should it be tested manually?

Try enabling decorators or properties to your target and make sure they still work as expected.
And....

yarn test
# or
npm test

Don't try the other projext plugins yet as they are currently being updated too.

Pull Request Test Coverage Report for Build 221

6 of 6 (100.0%)  changed or added relevant lines in 3 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 219:
0.0%

Covered Lines:
2028

Relevant Lines:
2028

💛  - Coveralls


Slim\Http\Uri expects host to be a string, not null

This is always the case in the real world, but an App test failed to set HTTP_HOST, so this fixes that.

Coverage increased (+32.9%) to 97.966% when pulling d5f510d2ac3deb9e03c764a9353984097032d71f on akrabat:fix-tests into e13f367c8a3f156299838c190bca7390a4d9d050 on slimphp:4.x.


Cannot call API from GraphQL SPRQ server

Create GraphQL server
Checkout the project https://github.com/leangen/graphql-spqr-samples.
Move to spring-boot-sample folder.
Disable cors by editing line 63 in file:
/src/main/java/io/leangen/spqr/samples/demo/controller/GraphQLSampleController.java
@CrossOrigin(origins = "*", allowedHeaders = "*" )
@PostMapping(value = "/graphql", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)

Run in http://localhost:7777
mvn spring-boot:run

Test
Query
{
  getNormalGreeting(person: {
    firstName: "Phong"
    lastName:"Ca"
  })
}

Response
{
  "data": {
    "getNormalGreeting": "Hello Phong!"
  }
}

Create vue-apollo project
HelloComponent
import gql from 'graphql-tag'
const axios = require('axios');
const DEMO = gql`
  {
    getNormalGreeting(person: {
      firstName: "Phong"
      lastName:"Ca"
    })
  }
`
export default {
  name: 'HelloWorld',
  apollo: {
    customers: {
      query: DEMO
    }
  },
  data () {
    return {
      customers: []
    }
  },
  created: function() {
    axios.post('http://localhost:7777/graphql', {
      query: `
        {
          getNormalGreeting(person: {
            firstName: "Phong"
            lastName:"Ca"
          })
        }
      `
    })
    .then(function () {
    })
    .catch(function () {
    })
  }
}

Use axios
Request
General
Request URL: http://localhost:7777/graphql
Request Method: POST
Status Code: 200
Remote Address: [::1]:7777
Referrer Policy: no-referrer-when-downgrade

Response Headers
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://localhost:8080
Content-Type: application/json;charset=UTF-8
Date: Wed, 12 Sep 2018 04:40:54 GMT
Transfer-Encoding: chunked
Vary: Origin
X-Application-Context: application:7777

Request Headers
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,vi-VN;q=0.8,vi;q=0.7
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 158
Content-Type: application/json;charset=UTF-8
Host: localhost:7777
Origin: http://localhost:8080
Pragma: no-cache
Referer: http://localhost:8080/
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Request Payload
{"query":"\n        {\n          getNormalGreeting(person: {\n            firstName: \"Phong\"\n            lastName:\"Ca\"\n          })\n        }\n      "}

Response
{
  "data": {
    "getNormalGreeting": "Hello Phong!"
  }
}

Use gql
Request
General
Request URL: http://localhost:7777/graphql
Request Method: POST
Status Code: 400
Remote Address: [::1]:7777
Referrer Policy: no-referrer-when-downgrade

Response Headers
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://localhost:8080
Connection: close
Content-Type: application/json;charset=UTF-8
Date: Wed, 12 Sep 2018 04:40:54 GMT
Transfer-Encoding: chunked
Vary: Origin
X-Application-Context: application:7777

Request Headers
accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,vi-VN;q=0.8,vi;q=0.7
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 125
content-type: application/json
Host: localhost:7777
Origin: http://localhost:8080
Pragma: no-cache
Referer: http://localhost:8080/
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36

Request Payload
{"operationName":null,"variables":{},"query":"{\n  getNormalGreeting(person: {firstName: \"Phong\", lastName: \"Ca\"})\n}\n"}

Response
{
  "timestamp":<PHONE_NUMBER>695,
  "status": 400,
  "error": "Bad Request",
  "exception": "org.springframework.http.converter.HttpMessageNotReadableException",
  "message": "JSON parse error: Can not deserialize instance of java.lang.String out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token\n at [Source: java.io.PushbackInputStream@58b6376; line: 1, column: 35] (through reference chain: java.util.LinkedHashMap[\"variables\"])",
  "path": "/graphql"
}

This look like an apollo-client issue.

I found some problem, trying compare pet-clinic with my own backend. Problem found on my own backend, so I think this is a backend issue with SPQR server

Thank you @kevinzheng !

It has to do with graphql-variables; the POST-request is a JSON structure with query/operationName being strings, and variables being an object:
    @PostMapping(value = "/graphql", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ResponseBody
    public Map<String, Object> graphql(@RequestBody Map<String, Object> request, HttpServletRequest raw) {
        ExecutionResult executionResult = graphQL.execute(ExecutionInput.newExecutionInput()
                .query((String) request.get("query"))
                .operationName((String) request.get("operationName"))
                .variables((Map<String, Object>) request.get("variables"))
                .context(raw)
                .build());
        return executionResult.toSpecification();
    }


Update user guide

should be my final pr for the ug
closes #259

Codecov Report

Merging #272 (5dc43d0) into master (090adb3) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #272   +/-   ##
=========================================
  Coverage     61.27%   61.27%
  Complexity      977      977
=========================================
  Files           148      148
  Lines          3525     3525
  Branches        423      423
=========================================
  Hits           2160     2160
  Misses         1171     1171
  Partials        194      194

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 090adb3...5dc43d0. Read the comment docs.


Incorrect arguments paseed in GeometryModeler.create_group()

When passing arguments to oeditor.CreateGroup() the list of objects need to be passed as "SubmodelInstance:=" instead of "Parts:=".  I found this in 2021R2 and have a branch called "microdoppler_updates" where this has been fixed.  I'm updating this branch to support the micro-doppler demo created by Arien and Ushe.

The argument is correct for objects but incorrect for 3DComponents. I've modified the methods input arguments to support also 3dcomponent list as input.


Graph Engine VSIX installer will not install to VS 2017

Message warns it;s incompatible. VSIX creation date listed as October 11, 2017

Will update this accordingly.

fixed in #158


List plugins command

🚨 This relies on plugins reporting the types and implementations they contain (#775). Right now they just report version and author.
Add a command similar to porter mixins list that lists installed plugins.
$ porter plugins list
Name        Type                 Implementation    Version                 Author
azure       instance-storage     blob              v0.1.2-beta.1           DeisLabs
aws         instance-storage     s3                v0.1.0                  Amazon

Hi @carolynvs , if this is not done yet, i would like to pickup.

I'd also suggest that we include repository location if possible.

Hey @dev-drprasad I just realized that I missed the notification on this and never replied back! 😬 If you would still like to work on this please feel free! In the future, you should be able to comment and assign issues to yourself, you are a member of the org now, so you don't need to ask and wait for us anymore. ❤


Add new feature to select category of questions

Before starting the game, we can add a page to select what category of questions the player is interested to play.

Might take up this issue if no one is implementing it currently, any guidelines for contributing or should I just fork and pull? @Dharmik48

Thanks for showing your interest to work on this! I will assign this to you.
You can check the CONTRIBUTING.md for the guidelines and the Open Trivia Database for the categories.


Support for UPDATE_AFTER_BIND descriptors.

I think this would be a cool feature to have. If I understand it correctly it would allow much better reuse of a command buffer where everything is the same except for the descriptor sets in use. Only safety caveat would be that two threads can't update a set at the same time. This has been promoted to core in vulkan 1.2 and is supported by the majority of devices.
Changes required that I can think of:

UnsafeDescriptorPool would need an additional field or a flags struct similar to ImageCreateFlags.
DescriptorSetLayout would also need to set this flag. Currently creating this doesn't take any flags.
Would need to ensure that both the pool and the layout agree on the flags.
Somehow would need to have mutable access to UnsafeDescriptorSet if we were to use this feature in the PersistentDescriptorSet and SingleLayoutDescSet.

Perhaps this would be stored in a mutex?

There would need to be some locking mechanism to ensure that descriptor sets aren't updated while the GPU is using them. This requires changes to SyncCommandBuffer. Buffers and images currently have locking, but there's no provision for locking of other types of resources. This is the reason why queries aren't fully safe to use yet, so they should also be considered in any refactoring.

Something else I realised while investigating #1743: Because the descriptors can change after the descriptor set was bound in a command buffer, the only way to validate them would be at submission time. This will require quite a bit more refactoring.


totalDays only works if there is less than a month left.

if time is exactly 1 month from now the totalDays and days is zero.

Never mind. I put seconds and not milliseconds in the :time. Sorry for the nagging.


CB-11672 GCP: Mark the existing 7.2.8 datahub templates as GA

Mark all the templates except for DE HA, DM and RTDM as released from 7.2.8
If 7.2.8 gets released before GCP is GA, customers with GCP entitlement will see this version as released before the announcement.
But marking it as released before, knocks out one item to track from the launch checklist.

See detailed description in the commit message.

retest this please


Add command to terminate all machines via CLI

This PR adds the mechanics to terminate all machines via CLI. Within the command inductiva terminate users can either select the name of the computational resource to kill, or choose the terminate --all option. The latter asks to confirm the termination before proceeding.

Merging this into ssantos_expose-storage to facilitate review and QA of all CLI functionality.


Support full token limits

Nice project. I saw a note here:
https://github.com/smol-ai/developer/blob/03dc5d6d28d38fabf2276ab9a002b273529998b8/main.py#L10
You can get the total tokens for a request, then subtract it from the max tokens the model allows. Here's the cookbook implementation: https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken.ipynb
Without so many models to support you can cut it down, here's an example I grabbed from a codebase I've got for generating full applications from prompts too:
def num_tokens_from_messages(messages):
    """Returns the number of tokens used by a list of messages."""
    try:
        encoding = tiktoken.encoding_for_model("gpt-4")
    except KeyError:
        encoding = tiktoken.get_encoding("cl100k_base")
    num_tokens = 0
    for message in messages:
        num_tokens += (
            4  # every message follows <im_start>{role/name}\n{content}<im_end>\n
        )
        for key, value in message.items():
            num_tokens += len(encoding.encode(value))
            if key == "name":  # if there's a name, the role is omitted
                num_tokens += -1  # role is always required and always 1 token
    num_tokens += 2  # every reply is primed with <im_start>assistant
    return num_tokens

Based on this discussion on the OpenAI community site, max token changes based on the model you're using and if you exceed the max token for a particular model, it will return a 400.
Not sure why they're having the API user set it, but there you go.

yea i'm pretty sure choice of max token affects the output. shorter makes it try to end sooner. this is feature not a bug

Interesting - it's not an issue I've really hit since generally I'm trying to get a lot of output (more stuff per prompt = more bang for your buck). It could help explain why I'm getting less useful outputs from some things though, it doesn't have enough space to create the right hierarchies.
The question I guess is whether it will output needlessly large results. It definitely doesn't fill the full amount each time, broadly I've found gpt-4 to be quite good at doing just what it needs to.

in other words, if max token length is strictly always better, why would openai want us to reduce it down, ever?

TBF it's important when it comes to cost & more, particularly as the context size increases. 8k is a lot, if you really just want a short response it's good to be able to cap it.

8k is a lot, if you really just need a short response it's good to be able to cap it.

yes but notice that the shortness of the requested tokens actually does somewhat affect the generated output - openai is doing something other than next token prediction, that shortens the answer when its about to go over (this is a weak effect, ive observed this rule been broken too, but ive definitely noticed it)

yea i'm pretty sure choice of max token affects the output. shorter makes it try to end sooner. this is feature not a bug

I found this openai community thread reply:
I asked the support and they clarified that GPT-3 will not attempt to create shorter texts with a smaller max_tokens value. The text will indeed just be cut off. So in my case, I guess it makes sense to use a higher value to have more “wiggle room”.
On the other hand I can imagine that OpenAI might do some funky stuff in the background, e.g. prefixes your prompt with "Answer in {max_tokens*0.75} or less words." This would not do exactly that as it's been shown that the model is not THAT capable but it might influence the length.


Property to configure the default rolling window size (defaults to 2)

Ups, looks like this should have come before https://github.com/mvndaemon/mvnd/pull/208 let me try to rebase

merged as c8c5d08e1f562cf08cfcd8f0b02794f1fcac019c


Update Get-MsolRoleMember.md

Example is incorrect/incomplete. Corrected the example.

Docs Build status updates of commit dcf5331:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

azureadps-1.0/MSOnline/Get-MsolRoleMember.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Gracefully handle startup errors

If startup fails, show GUI for 5 minutes, then restart. Fatal error messages (fatal) will be displayed to aid new users with diagnosis.
Todo

[x] differentiate no config (show demo) vs broken config (show fatal error)
[x] expose fatal gui (@naltatis)
[x] rework configured check (@naltatis)
[x] shutdown endpoint -> POST /api/shutdown (@andig)
[x] translation texts (@naltatis)
[x] show anonymised config

Refs https://github.com/spf13/viper/pull/1433, https://github.com/go-yaml/yaml/pull/760

yaml parsing errors should also result in readable error message, currently the process exists on invalid yamls.
Example:
While parsing config: yaml: line 57: did not find expected '-' indicator

yaml parsing errors should also result in readable error message, currently the process exists on invalid yamls.

Gute Idee! Done.

Nicer design for error page.

Der PR enthält komische Dinge- hast du neAhnung, wieso?

 Die Zeile ist ja schon markiert.


Specberus requires http://ev.buaa.edu.cn/ not https://ev.buaa.edu.cn/

csswg.include and fxtf.include are affected: Echidna publication is broken thanks to the recent changes.

The https url works, and should be preferred in general, so I consider this a bug in specberus. I'll report it appropriately.


always: interface name must not have an "I" prefix

Hello
configuration "interface-name": [true, "always-prefix"] not work

This is working when I try it. I presume you have a tslint.json like this?
{
    "extends": "dtslint/dtslint.json",
    "rules": {
        "interface-name": [true, "always-prefix"]
    }
}

Sorry, i forgot add tslint.json in types directory and has changed config in globall tslint.json

It's way not working.
Now dtslint work fine. Thanks

By the way, dtslint/dtslint.json extends tslint:latest already, so it shouldn't be necesssary to specify both.


Some questions about the initialization pattern

Hi, Bo Deyu,
I am a PH.D. of NUDT. Rencently I have read your article FAGCN, it's really inspiring! Wonderful work! However, there is a problem that bothers me. Why do we need to reinit parameters as nn.init.xavier_normal_? What is the impact of using the default truncted norm initialization?

Sorry, the previous issue is due to the network problem. I thought I failed to upload, which is actually not.


the communication between the user and the node seems to be not needed to send the contract id

the data should be IMO communicated to the node without the intervention of the user

I agree that it's a tedious step for the user. Since we cannot create a contract on chain over the RMB (because we need a backend that can receive this request and create the object on chain) we can actually skip the step where the user needs to push the contract ID to the node.
The user creates the contract with a workload definition on chain, the node stream the events from the chain and listens to contract_created events. Whenever a node sees this event, it decodes the event and reads the contract_id. It can then fetch this contract by ID from the chain and read its contents and start billing.

I understand your point but note the following:

The data on the contract can have sensitive information, so only the user can/should can read it. hence allowing the node also to be read this from the chain goes against this requirement.
The node can still miss the blockchain events (network issue, node was down, or any other reason) so it's better if the user can ask the node to deploy something instead then the node will still validate the existence (and hash) of the contract.
The user will still need to contact the node anyway to actually query the status of his deployment.
The contract is mainly for billing, it's an agreement between the node that he is going to deploy a certain set of workloads it's not a carrier of information


tokenization failed in rasa 2.0

Rasa version:
2.2.6
Rasa SDK version (if used & relevant):
Rasa X version (if used & relevant):
Python version:
3.7
Operating system (windows, osx, ...):
osx, ubuntu
Issue:
Currently, rasa hf_transformer implementation use whitespace tokenizer to make tokenization then use transformers tokenizer to make subtokens. This will lead to the failure of languages like Chinese, which does not have whitespace. For intent classification, it does not matter. However, for NER, entities are based on tokens, which are split by whitespace, instead of subtokens. It means none of entities will be extracted since nearly all the entities are not aligned.
I think it is a quite serious fundamental algorithm design problem.
Error (including full traceback):

Command or request that led to error:

Content of configuration file (config.yml) (if relevant):
language: zh
pipeline:
  - name: HFTransformersNLP
    # Name of the language model to use
    model_name: "bert"
    # Pre-Trained weights to be loaded
    # model_weights: "hfl/chinese-roberta-wwm-ext"
    model_weights: "bert-base-chinese"

    # An optional path to a specific directory to download and cache the pre-trained model weights.
    # The `default` cache_dir is the same as https://huggingface.co/transformers/serialization.html#cache-directory .
    cache_dir: null
  - name: LanguageModelTokenizer
    intent_tokenization_flag: true
    intent_split_symboll: "-"
  - name: LanguageModelFeaturizer

Content of domain file (domain.yml) (if relevant):

Thanks for the issue, @rgstephens will get back to you about it soon!
You may find help in the docs and the forum, too 🤗

Hi @XiaoLiuAI, you're correct that this setup is limiting and not ideal for languages that aren't whitespace-tokenized: this is one of the reasons that the HFTransformersNLP component has been deprecated.
We recommend you use the LanguageModelFeaturizer component instead, it will behave the same way, and you can specify the desired Hugging Face model with the same syntax as the HFTransformersNLP used.
You can use any Tokenizer component in the pipeline before LanguageModelFeaturizer, so you should be able to select a Tokenizer that fits your needs and doesn't do whitespace tokenization. If you're confused on how to do this, please check the docs here, and feel free to ask a question in the forum if you get stuck (you can tag me there, my username is felicia)

Hi @XiaoLiuAI, you're correct that this setup is limiting and not ideal for languages that aren't whitespace-tokenized: this is one of the reasons that the HFTransformersNLP component has been deprecated.
We recommend you use the LanguageModelFeaturizer component instead, it will behave the same way, and you can specify the desired Hugging Face model with the same syntax as the HFTransformersNLP used.
You can use any Tokenizer component in the pipeline before LanguageModelFeaturizer, so you should be able to select a Tokenizer that fits your needs and doesn't do whitespace tokenization. If you're confused on how to do this, please check the docs here, and feel free to ask a question in the forum if you get stuck (you can tag me there, my username is felicia)

Closing this issue, if there are any follow-up questions, please post on the forum.

Closing this issue, if there are any follow-up questions, please post on the forum.


[🐞] QWIK Error Code 13 encountered when running Vitest involving either  component or useNavigate() from qwik-city

Which component is affected?
Link and useNavigate in Qwik City (routing)
Describe the bug
This error appears during unit testing with Vitest whenever <Link> component or useNavigate() is used during vitest. It works fine when rendering however and the tests pass as normal, but I get QWIK error code 13's each time the component uses either or both of <Link> or useNavigate().
QWIK ERROR Error: Code(13): Actual value for useContext() can not be found, make sure some ancestor component has set a value using useContextProvider()
at createAndLogError (...\dist-dev\tsc-out\packages\qwik\src\core\util\log.js:68:49)
    at logErrorAndStop (...\dist-dev\tsc-out\packages\qwik\src\core\util\log.js:17:1)
    at qError (...\dist-dev\tsc-out\packages\qwik\src\core\error\error.js:39:3)
    at Module.useContext (...\dist-dev\tsc-out\packages\qwik\src\core\use\use-context.js:211:3)
    at useNavigate (...\node_modules\@builder.io\qwik-city\index.qwik.mjs:539:47)
    at AsyncFunction.Link_component_8gdLBszqbaM (...\node_modules\@builder.io\qwik-city\index.qwik.mjs:808:17)
    at AsyncFunction.invoke (...\dist-dev\tsc-out\packages\qwik\src\core\use\use-core.js:58:6)
    at ...\dist-dev\tsc-out\packages\qwik\src\core\qrl\qrl-class.js:71:18
    at maybeThen (...\dist-dev\tsc-out\packages\qwik\src\core\util\promises.js:21:3)
    at ...\dist-dev\tsc-out\packages\qwik\src\core\qrl\qrl-class.js:57:17

Reproduction
https://github.com/bcha92/qwik-portfolio/pull/14/commits/8d560f2806a99b07692e117f7e75173c130a1fd6
Steps to reproduce
Use any Qwik repository (boilerplate or otherwise), install vite using npm run qwik add vitest, and create these two "example components" below (can be named anything, but the test unit must have spec):
// example.tsx
import { component$ } from<EMAIL_ADDRESS>import { useNavigate, Link } from<EMAIL_ADDRESS>
export const Example = component$(() => {
  const navigateTo = useNavigate();
  return (
    <a class="example-link" href="/" onClick$={() => navigateTo("/")}>
      Home
    </a>
  );
});

export const Example2 = component$(() => <Link href="/" />);

// example.spec.tsx
import { createDOM } from<EMAIL_ADDRESS>import { test, expect } from "vitest";
import { Example, Example2 } from "./example";

test("renders <a> properly", async () => {
    const { screen, render } = await createDOM();
    await render(<Example />);
    expect(screen.innerHTML).toContain(".example-link")
  })

test("renders <Link> properly", async () => {
    const { screen, render } = await createDOM();
    await render(<Example2 />)
    expect(screen.innerHTML).toContain("<child></child>")
  })

afterwards, run vitest testing suite with npm run test.unit
System Info
System:
    OS: Windows 11 10.0.22621
    CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
    Memory: 21.33 GB / 31.92 GB
  Binaries:
    Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 9.7.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 119.0.6045.200
    Edge: Chromium (119.0.2151.72)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    @builder.io/qwik: ^1.2.18 => 1.2.18
    @builder.io/qwik-city: ^1.2.18 => 1.2.18
    undici: ^5.26.0 => 5.27.2
    vite: ^4.4.11 => 4.5.0

### Additional Information

_No response_

I'm getting the exact same error when trying to use Link in storybook. Can reproduce by npm create qwik@latest, npm run qwik add storybook, putting a Link in a component that's included in a story and viewing it with npm run storybook
Component:
import { component$ } from<EMAIL_ADDRESS>import { Link } from<EMAIL_ADDRESS>
export const SimpleLink = component$(() => {
  return (
      <Link href="https://google.com">Google Link</Link>
  );
});

Story:
import type { Meta, StoryObj } from "storybook-framework-qwik";
import { SimpleLink} from "./SimpleLink";

const meta: Meta = {
  component: SimpleLink,
};

type Story = StoryObj;

export default meta;

export const Primary: Story = {
  render: () => <SimpleLink />,
};

Error:
Uncaught Error: Code(13): Actual value for useContext() can not be found, make sure some ancestor component has set a value using useContextProvider()
    at createAndLogError (core.mjs?v=4d25b04c:159:54)
    at logErrorAndStop (core.mjs?v=4d25b04c:108:17)
    at qError (core.mjs?v=4d25b04c:258:12)
    at useContext (core.mjs?v=4d25b04c:3536:11)
    at useNavigate (index.qwik.mjs?v=4d25b04c:357:25)
    at AsyncFunction.Link_component_8gdLBszqbaM [as resolved] (index.qwik.mjs:983:15)
    at AsyncFunction.invokeApply (core.mjs?v=4d25b04c:4390:26)
    at AsyncFunction.invoke (core.mjs?v=4d25b04c:4382:24)
    at core.mjs?v=4d25b04c:8439:35
    at async Promise.all (:6006/index 0)

@thenhawke Although my issue I posted here was about rendering Link or useNavigate() while running Vitest, a testing suite for, I didn't find any issue running Link on development or production on Qwik itself. But then again, I didn't implement a library or framework like React or Storybook as you're using now.
In your particular case, (though I'm only moderately familiar with Storybook) you could try updating the Vite devDep to its latest supported version (i.e. ver. 4.5.1 or its breaking one 5.0.xx) since the npm create qwik@latest boilerplate comes with an older vite version. If that still doesn't fix the issue, you may need to replace the Link with either the html  component or the storybook supported one such as the @storybook/addon-links dependency.

I'm getting the exact same error when trying to use Link in storybook. Can reproduce by npm create qwik@latest, npm run qwik add storybook, putting a Link in a component that's included in a story and viewing it with npm run storybook
Component:
import { component$ } from<EMAIL_ADDRESS>import { Link } from<EMAIL_ADDRESS>
export const SimpleLink = component$(() => {
  return (
      <Link href="https://google.com">Google Link</Link>
  );
});

Story:
import type { Meta, StoryObj } from "storybook-framework-qwik";
import { SimpleLink} from "./SimpleLink";

const meta: Meta = {
  component: SimpleLink,
};

type Story = StoryObj;

export default meta;

export const Primary: Story = {
  render: () => <SimpleLink />,
};

Error:
Uncaught Error: Code(13): Actual value for useContext() can not be found, make sure some ancestor component has set a value using useContextProvider()
    at createAndLogError (core.mjs?v=4d25b04c:159:54)
    at logErrorAndStop (core.mjs?v=4d25b04c:108:17)
    at qError (core.mjs?v=4d25b04c:258:12)
    at useContext (core.mjs?v=4d25b04c:3536:11)
    at useNavigate (index.qwik.mjs?v=4d25b04c:357:25)
    at AsyncFunction.Link_component_8gdLBszqbaM [as resolved] (index.qwik.mjs:983:15)
    at AsyncFunction.invokeApply (core.mjs?v=4d25b04c:4390:26)
    at AsyncFunction.invoke (core.mjs?v=4d25b04c:4382:24)
    at core.mjs?v=4d25b04c:8439:35
    at async Promise.all (:6006/index 0)

@bcha92 Thank for your reply! Turns out I needed this https://qwik.builder.io/docs/api/#qwikcitymockprovider to provide the qwik context to the Link component to get it to render in storybook.
For the issue you're having, since it appears to be a very similar problem, https://qwik.builder.io/docs/integrations/vitest/#usage mentions that if you need to use QwikCity with Vitest that you should check out the <QwikCityMockProvider> component. Have you tried wrapping the jsx returned in the tests with <QwikCityMockProvider>?

@thenhawke Thanks about the QwikCityMockProvier. I'll test that out in the coming days and will close this issue once that's out of the way!


Shouldn't Multi.zip() throw exceptions for collections of different sizes?

I supposed zipping of collections like in python is supposed to work for collections that are of the same size. If they are different, I think it would be a good idea to throw an exception in that case.
BTW, cool library, nice ReadMe.md and good tests!

Hi @Danon,
Thanks for your kind words and interest in IterTools PHP.
For zipping iterables that are different sizes, I think you can make a good argument for both throwing exceptions and iterating as much as you can. The behavior that the library has for zip is to iterate up until the point that the shortest input iterable is exhausted. Python's built-in zip function was the original inspiration for this library--I wanted something similar in PHP. So for IterTools PHP's zip function, I went with Python's behavior because it is well known and provides the most flexibility in how you can use it. Also, each use case is different. For the cases where this is not desirable, the application code could simply check the input sizes prior to zipping and throw the exception there.
FYI: Here is how Python works zipping iterables of different sizes:
>>> for x, y in zip([1, 2, 3], ['a', 'b']):
...     print(x, y)
...
1 a
2 b
>>> for x, y in zip([1, 2], ['a', 'b', 'c']):
...     print(x, y)
...
1 a
2 b

The library also provides a Multi::zipLongest function that will iterate every element of the largest iterable if one has more than another, providing null values for the iterables that run out of data. So there are multiple ways to deal with zipping inputs of different sizes.
Thanks again for your interest in IterTools PHP!
Mark

@markrogoyski
You could design API in sucha a way:

Multi::zipLongest() - assume different lengths - iterates with the higher of the iterators
Multi::zipShortest() - assume different lengths - iterates with the lower of the iterators
Multi::zip() - assumes equal iterators, throws exception otherwise

But of course, that's your library and your decision, so I'm not gonna push it, just asking.
To me, throwing exception is more natural, I rarely ever zip collections of different sizes, so I would prefer the exception. I'm leaving the decision to you.


Add support for Windows wchar paths

#16 explicitly disabled Windows' wide character types due to #15. As suggested in the issue, I also believe this could be solved with some SFINAE by extracting the Windows API calls into a template wrapper so that we can make the compiler choose the right function based on the String's character type, e.g. using std::char_traits<String>::char_type.

Nevermind the bit about char_traits, I forgot that it takes some char type as its template argument and not a string. So for this some custom template struct that gives back the character type of the underlying string would have to be created, e.g. char_type<S>::type, where S may be a char*, std::string, vector<char>, wchar_t* etc.


[DropdownMenu] - Add click properties to items props for handle custom click event

For what version of Nuxt UI are you suggesting this?
v3-alpha
Description
In version 2 of Nuxt UI, a click property can be defined in dropdown items props. In V3, this feature has not yet been implemented wet.
Additional context
No response

You have to use onSelect now: https://ui3.nuxt.dev/components/dropdown-menu#items


API key not valid

I'm learning firebase through Firebase Android Codelab - Build Friendly Chat
I've done all coding according to instruction till the end of Enable Authentication section.
But when trying to test the app I encounter with the following message:
2021-11-13 09:42:17.083 4741-4741/? E/AuthUI: A sign-in error occurred.     com.google.firebase.FirebaseException: An internal error has occurred. [ API key not valid. Please pass a valid API key. ]         at com.google.android.gms.internal.firebase-auth-api.zzto.zza(com.google.firebase:firebase-auth@@21.0.1:4)         at com.google.android.gms.internal.firebase-auth-api.zzuw.zza(com.google.firebase:firebase-auth@@21.0.1:9)         at com.google.android.gms.internal.firebase-auth-api.zzux.zzl(com.google.firebase:firebase-auth@@21.0.1:1)         at com.google.android.gms.internal.firebase-auth-api.zzuu.zzk(com.google.firebase:firebase-auth@@21.0.1:25)         at com.google.android.gms.internal.firebase-auth-api.zztl.zzh(com.google.firebase:firebase-auth@@21.0.1:1)         at com.google.android.gms.internal.firebase-auth-api.zzoj.zza(com.google.firebase:firebase-auth@@21.0.1:2)         at com.google.android.gms.internal.firebase-auth-api.zzvb.zza(com.google.firebase:firebase-auth@@21.0.1:23)         at com.google.android.gms.internal.firebase-auth-api.zzul.zza(com.google.firebase:firebase-auth@@21.0.1:4)         at com.google.android.gms.internal.firebase-auth-api.zzpt.zzq(com.google.firebase:firebase-auth@@21.0.1:4)         at com.google.android.gms.internal.firebase-auth-api.zztp.zzl(com.google.firebase:firebase-auth@@21.0.1:5)         at com.google.android.gms.internal.firebase-auth-api.zzql.zzd(com.google.firebase:firebase-auth@@21.0.1:3)         at com.google.android.gms.internal.firebase-auth-api.zzqk.accept(Unknown Source:6)         at com.google.android.gms.common.api.internal.zacj.doExecute(com.google.android.gms:play-services-base@@17.5.0:2)         at com.google.android.gms.common.api.internal.zah.zaa(com.google.android.gms:play-services-base@@17.5.0:9)         at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.zac(com.google.android.gms:play-services-base@@17.5.0:193)         at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.zab(com.google.android.gms:play-services-base@@17.5.0:158)         at com.google.android.gms.common.api.internal.GoogleApiManager$zaa.zaa(com.google.android.gms:play-services-base@@17.5.0:126)         at com.google.android.gms.common.api.internal.GoogleApiManager.handleMessage(com.google.android.gms:play-services-base@@17.5.0:164)         at android.os.Handler.dispatchMessage(Handler.java:103)         at android.os.Looper.loop(Looper.java:214)         at android.os.HandlerThread.run(HandlerThread.java:67)
It seems the the API key given in mock-google-services.json has expired.
What's the solution for this issue?

The issue is something else I used my own Firebase account but getting same issue

Found the solution, the issue is occurring because
if (BuildConfig.DEBUG) {             FirebaseDatabase.getInstance().useEmulator("<IP_ADDRESS>", 9000)             FirebaseAuth.getInstance().useEmulator("<IP_ADDRESS>", 9099);             FirebaseStorage.getInstance().useEmulator("<IP_ADDRESS>", 9199)         }
here BuildConfig.DEBUG is giving false when app build, that why the emulator is not connection with app

"make sure BuildConfig is imported from Build generated file"
How?

before pasting the above code on onCreate method go to Build -> Rebuild project it will create an Java (generated) folder which contains the BuildConfig file use that BuildConfig

The issue is something else I used my own Firebase account but getting same issue

Me too. I can't found the API KEY

"make sure BuildConfig is imported from Build generated file" How?

before pasting the above code on onCreate method go to Build -> Rebuild project it will create an Java (generated) folder which contains the BuildConfig file use that BuildConfig

Can you please elaborate further? I bypassed the if (BuildConfig.DEBUG) condition by setting it to True, but I still get an exception that the API key is invalid.
I believe the issue is lying with the key truly being expired/invalid, and not with the application logic.

"make sure BuildConfig is imported from Build generated file" How?

before pasting the above code on onCreate method go to Build -> Rebuild project it will create an Java (generated) folder which contains the BuildConfig file use that BuildConfig

Can you please elaborate further? I bypassed the if (BuildConfig.DEBUG) condition by setting it to True, but I still get an exception that the API key is invalid. I believe the issue is lying with the key truly being expired/invalid, and not with the application logic.

Actually the key is truly invalid, but local emulator does not require any valid api key, so for time being use all the code inside if (BuildConfig.DEBUG) without if

SignInActivity.kt
override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)

    // This codelab uses View Binding
    // See: https://developer.android.com/topic/libraries/view-binding
    binding = ActivitySignInBinding.inflate(layoutInflater)
    setContentView(binding.root)

    // Initialize FirebaseAuth
    auth = Firebase.auth    <-- Wrong code
}

Turns out I was having a code segment in the wrong place. Removing it fixed the issue.
There is nothing wrong with the API key at the time of writing.
Try comparing your code with the provided solution in the \codelab-friendlychat-android\build-android folder

Was anyone able to resolve this issue?

Hello its June 23 and I'm still having this same issue today. "E/AuthUI: A sign-in error occurred."

Turns out I was having a code segment in the wrong place.
this was definitely not my issue, but just to be certain I copied the whole SignInActivity and MainActivity from the completed version and pasted it onto my version. The difference I noticed was the code lab said to put some code into the onCreate and the completed one put it instead it onStart. Not sure how much of a difference that made but for my issue, it persisted nonetheless after doing this direct copy paste.

I was using the wrong BuildConfig class
This was also not my issue, I control click the class and see its from the appropriate "build" folder that was generated.

So, I'm stuck. How do i move forward? i would love some guidance here

"make sure BuildConfig is imported from Build generated file" How?

before pasting the above code on onCreate method go to Build -> Rebuild project it will create an Java (generated) folder which contains the BuildConfig file use that BuildConfig

fake you


Incorrect WordPress.Security.ValidatedSanitizedInput.InputNotValidated in some cases

This report is incorrect:
phpcs: WordPress.Security.ValidatedSanitizedInput.InputNotValidated: Detected usage of a non-validated input variable: $_POST

when highlighting this line of code:
$form_id = (int) $_POST['form_id'];

Reason: (int) $_POST['form_id'] will always be an integer regardless of existence or correct/incorrect value of $_POST['form_id']. Casting in this situation is totally fine and is actually a sanitization by itself.
PHP 7.1.0, PHPCS 3.3.1, WPCS 1.0.0

You're missing the check if this $_POST['form_id'] exists in the first place
    $form_id = ( isset( $_POST['form_id'] ) ) ? (int) $_POST['form_id'] : '';
    $form_id = ( ! empty( $_POST['form_id'] ) ) ? (int) $_POST['form_id'] : '';

In this case you only need to add nonce verification 😉

No, there is no need in extra call of isset when type casting to int like in my example. That's a totally valid code with no errors. If form_id doesn't exist - it will be null and typed to 0.

In the case that form_id doesn't exist you'd get a Undefined index: form_id notice. That's why the error is shown. So yes, the error is valid imo.

Ok, I've rechecked, completely forgot to set error_reporting(E_ALL);.
You are correct. Closing this issue.


6.0 Feedback: protocol order changes when opening sort menu

Overview
The order of protocols can shuffle around just by opening the sort menu. It goes back when the menu is closed. Selecting a sort option from the menu properly performs the sorting.
Current Behavior
Opening the sort menu makes some items change position in the protocols list. This appears to happen most commonly with multiple imports of the same protocol. Further testing would be needed to see if it always or only affects adjacent entries for the same protocol.
https://user-images.githubusercontent.com/1958332/169852031-5cf66b9d-fa32-4a39-a985-c46f0890eb8d.mov
Expected Behavior
The list should never reorder just by opening or dismissing the "Sort by" menu.
Steps To Reproduce

Open the app and go to the Protocols tab.
Open and close the "Sort by" dropdown menu without choosing an option.

Operating system
Mac
Robot setup or anything else?
This was found on a make dev build of the app from commit 3686c141a. (Protocol sorting was not yet implemented in 5.1.0b0)

@nusrat813 check if this behavior persists in 6.0.0-alpha.0


nixos/keycloak: init module

Motivation for this change
Request to add a module for keycloak: https://github.com/NixOS/nixpkgs/issues/87673
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

The service will fail to run if the necessary configuration is missing- several property files and standalone.xml in the configuration directory:
├── configuration
│   ├── application-roles.properties
│   ├── application-users.properties
│   ├── logging.properties
│   ├── mgmt-groups.properties
│   ├── mgmt-users.properties
│   └──  standalone.xml
├──  data
....

Note that the current package does not provide database support, the jdbc driver needs to be provided "in-tree" to keycloack: relevant documentation.
But maybe this should be handled by the derivation through a withPostgresql flag?

Yeah that might work well. postgresqlSupport seems to be the most common naming used in nixpkgs. It would be nice if we could be consistent...

Superseded by #99906.


Restful server start failed!

When I run an experiment，A "ERROR: Restful server start failed! "has occurred, I don't know why this problem occurred, I was in the docker container to start the trial, run the command: nnictl create  -c config. yml-p XXXX

I try use  request.get('http://localhost:12306/api/v1/nni/check-status'), An error has occurred，error msg:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 137, in _new_conn
(self.host, self.port), self.timeout, **extra_kw)
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 91, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 81, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 560, in urlopen
body=body, headers=headers)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 354, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 162, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 146, in _new_conn
self, "Failed to establish a new connection: %s" % e)
requests.packages.urllib3.exceptions.NewConnectionError: <requests.packages.urllib3.connection.HTTPConnection object at 0x7fd77c6e1fd0>: Failed to establish a new connection: [Errno 111] Connectionrefused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 376, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 610, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 273, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=12306): Max retries exceeded with url: /api/v1/nni/check-status (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fd77c6e1fd0>: Failed to establish a new connection: [Errno 111] Connection refused',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3/dist-packages/requests/api.py", line 67, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 53, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 480, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 588, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 437, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=12306): Max retries exceeded with url: /api/v1/nni/check-status (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fd77c6e1fd0>: Failed to establish a new connection: [Errno 111] Connection refused',))
Excuse me, why does this happen?

I solved this problem. When I modified localhost  to <IP_ADDRESS>,then i try  request.get('http://<IP_ADDRESS>:12306/api/v1/nni/check-status')
the requests could succeed, but when I used localhost, the NNI Restful server service could not be successfully started.
My solution was to modify /etc/hosts file and add "<IP_ADDRESS> localhost", so that the bug could be successfully solved.
Is it possible to make changes in the original code?

I have this issue too!
I installed nni by pip install and it worked well for days and suddenly one day the error message shows up "Restful server start failed!"
I checked my "/etc/hosts" file and "<IP_ADDRESS> localhost" has been there.
I reinstalled nni with this command "python3 -m pip install nni --no-cache-dir" but nothing changed.

I had the same problem when I tried to run nni in docker container.
I solved this by removing my docker container proxy config file: ~/.docker/config.json
So for those of you who do not use it in docker, I think it is a good idea to check your environment variables like HTTP_PROXY or HTTPS_PROXY and remove them if they are set.

Can we add some FAQs about the common network issue that could cause the start failure of Restful Server?

I have this issue too! The nni is run in docker.
I checked my "/etc/hosts" file and "<IP_ADDRESS> localhost" has been there.

I have this issue too! The nni is run in docker.
I checked my "/etc/hosts" file and "<IP_ADDRESS> localhost" has been there.

@henryslzhao - may you try suggestions in https://nni.readthedocs.io/en/latest/Tutorial/FAQ.html ? thanks.

I also received this error and I don't know how to fix it.
I checked the node version and it is fine. I also unset the http_proxy && https_proxy
Localhost is also added in the hosts but I still have this problem
INFO: expand codeDir: . to C:\kit\code\Mnist-annotation-autoML.
INFO: Starting restful server...
ERROR: Restful server start failed!
INFO: Stdout:

Because Windows uses IPv6 by default when available,  you need to change the IPv6/IPv4 preference by add a prefix policy to prefer IPv4 addresses over IPv6.
Simply check is ping localhost, see if is <IP_ADDRESS> or [::1]
Default Windows prefix policy table:
C:\> netsh interface ipv6 show prefixpolicies
Querying active state...

Precedence  Label  Prefix
----------  -----  --------------------------------
        50      0  ::1/128
        40      1  ::/0
        30      2  2002::/16
        20      3  ::/96
        10      4  ::ffff:0:0/96
         5      5  2001::/32

You can change it with netsh int ipv6 set prefix ::/96 55 3 with run as administrator and reboot after set.  #2398

Thanks a lot, BlanceRay.
However, I run "netsh int ipv6 set prefix ::/96 55 3" with administrator permission but I am still receiving this error and I think it is because of npm.
ERROR: Restful server start failed!
INFO:   Stdout:
            Experiment start time 2020-11-11 08:59:01

INFO:   Stderr:
            Experiment start time 2020-11-11 08:59:01

internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module 'typescript-ioc'
Although I have "typescript-ioc" in "C:\Program Files\nodejs\node_modules\npm\node_modules" directory. my node version is v15.1.0


Add Docker Health Checks to Traffic Ops and Traffic Monitor CiaB images

What does this PR (Pull Request) do?

[x] This PR is not related to any Issue
This PR adds health checks to the Traffic Ops (Golang) and Traffic Monitor CDN-in-a-Box images so you can tell if it is working by running docker-compose ps.

Example output:
                 Name                                Command                  State                                                                               Ports
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cdn-in-a-box_db_1                         /bin/sh -c /run-db.sh            Up             <IP_ADDRESS>:5432->5432/tcp
cdn-in-a-box_dns_1                        /sbin/entrypoint.sh /usr/s ...   Up             <IP_ADDRESS>:9353->53/tcp, <IP_ADDRESS>:9353->53/udp
cdn-in-a-box_edge_1                       /bin/sh -c /run.sh               Up             <IP_ADDRESS>:9000->80/tcp
cdn-in-a-box_enroller_1                   /bin/sh -c /run.sh               Up
cdn-in-a-box_influxdb_1                   /run-influxdb.sh                 Up             <IP_ADDRESS>:8086->8086/tcp
cdn-in-a-box_mid-01_1                     /bin/sh -c /run.sh               Up             <IP_ADDRESS>:9100->80/tcp
cdn-in-a-box_mid-02_1                     /bin/sh -c /run.sh               Up             <IP_ADDRESS>:9200->80/tcp
cdn-in-a-box_origin_1                     /bin/sh -c /run.sh               Up             <IP_ADDRESS>:9300->80/tcp
cdn-in-a-box_smtp_1                       /usr/bin/env run.sh              Up (healthy)   1025/tcp, 1080/tcp, <IP_ADDRESS>:4443->443/tcp
cdn-in-a-box_socksproxy_1                 /run.sh                          Up             <IP_ADDRESS>:9080->1080/tcp
cdn-in-a-box_trafficmonitor_1             /bin/sh -c /run.sh               Up (healthy)   <IP_ADDRESS>:2344->2344/tcp, <IP_ADDRESS>:80->80/tcp
cdn-in-a-box_trafficops-perl_1            /bin/sh -c /run.sh               Up             <IP_ADDRESS>:60443->443/tcp, <IP_ADDRESS>:5000->5000/tcp
cdn-in-a-box_trafficops_1                 /bin/sh -c /run-go.sh            Up (healthy)   <IP_ADDRESS>:2345->2345/tcp, <IP_ADDRESS>:6443->443/tcp
cdn-in-a-box_trafficportal_1              /bin/sh -c /run.sh               Up             <IP_ADDRESS>:443->443/tcp
cdn-in-a-box_trafficrouter_1              /bin/sh -c /run.sh               Up             <IP_ADDRESS>:3333->3333/tcp, <IP_ADDRESS>:2222->3443/tcp, <IP_ADDRESS>:3443->443/tcp, <IP_ADDRESS>:5005->5005/tcp, <IP_ADDRESS>:3053->53/tcp, <IP_ADDRESS>:3053->53/udp,
                                                                                <IP_ADDRESS>:3080->80/tcp
cdn-in-a-box_trafficstats_1               /bin/sh -c /run.sh               Up             <IP_ADDRESS>:2346->2346/tcp
cdn-in-a-box_trafficvault_1               /bin/sh -c /run.sh               Up             <IP_ADDRESS>:8087->8087/tcp, <IP_ADDRESS>:8088->8088/tcp, <IP_ADDRESS>:8098->8098/tcp

Because those containers now have health checks, a user no longer needs to depend on whether the container is Up to know whether Traffic Ops or Traffic Monitor are running. This means that tail -f /dev/null can safely be re-added to the end of those services' run.sh files, which allows a developer to copy in a new traffic_ops_golang or traffic_monitor binary into the container and start it without the container ever exiting (or needing to restart or rebuild CDN-in-a-Box).
Which Traffic Control components are affected by this PR?

CDN in a Box
Documentation

What is the best way to verify this PR?

Start CDN-in-a-Box
For each of Traffic Ops and Traffic Monitor (example written out for Traffic Ops):
i. Make sure Traffic Ops is healthy withdocker-compose ps trafficops

ii. Kill the traffic_ops_golang process:
shell      docker-compose exec trafficops pkill traffic_ops_golang
iii. Wait 10 seconds (the health check runs every 10 seconds)
iv. Make sure Traffic Ops is still running but reported as unhealthy:docker-compose ps trafficops

Expected output:                 Name                                Command                  State                                                                               Ports
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cdn-in-a-box_db_1                         /bin/sh -c /run-db.sh            Up             <IP_ADDRESS>:5432->5432/tcp
cdn-in-a-box_dns_1                        /sbin/entrypoint.sh /usr/s ...   Up             <IP_ADDRESS>:9353->53/tcp, <IP_ADDRESS>:9353->53/udp
cdn-in-a-box_edge_1                       /bin/sh -c /run.sh               Up             <IP_ADDRESS>:9000->80/tcp
cdn-in-a-box_enroller_1                   /bin/sh -c /run.sh               Up
cdn-in-a-box_influxdb_1                   /run-influxdb.sh                 Up             <IP_ADDRESS>:8086->8086/tcp
cdn-in-a-box_mid-01_1                     /bin/sh -c /run.sh               Up             <IP_ADDRESS>:9100->80/tcp
cdn-in-a-box_mid-02_1                     /bin/sh -c /run.sh               Up             <IP_ADDRESS>:9200->80/tcp
cdn-in-a-box_origin_1                     /bin/sh -c /run.sh               Up             <IP_ADDRESS>:9300->80/tcp
cdn-in-a-box_smtp_1                       /usr/bin/env run.sh              Up (healthy)   1025/tcp, 1080/tcp, <IP_ADDRESS>:4443->443/tcp
cdn-in-a-box_socksproxy_1                 /run.sh                          Up             <IP_ADDRESS>:9080->1080/tcp
cdn-in-a-box_trafficmonitor_1             /bin/sh -c /run.sh               Up (healthy)   <IP_ADDRESS>:2344->2344/tcp, <IP_ADDRESS>:80->80/tcp
cdn-in-a-box_trafficops-perl_1            /bin/sh -c /run.sh               Up             <IP_ADDRESS>:60443->443/tcp, <IP_ADDRESS>:5000->5000/tcp
cdn-in-a-box_trafficops_1                 /bin/sh -c /run-go.sh            Up (unhealthy)   <IP_ADDRESS>:2345->2345/tcp, <IP_ADDRESS>:6443->443/tcp
cdn-in-a-box_trafficportal_1              /bin/sh -c /run.sh               Up             <IP_ADDRESS>:443->443/tcp
cdn-in-a-box_trafficrouter_1              /bin/sh -c /run.sh               Up             <IP_ADDRESS>:3333->3333/tcp, <IP_ADDRESS>:2222->3443/tcp, <IP_ADDRESS>:3443->443/tcp, <IP_ADDRESS>:5005->5005/tcp, <IP_ADDRESS>:3053->53/tcp, <IP_ADDRESS>:3053->53/udp,
                                                                                <IP_ADDRESS>:3080->80/tcp
cdn-in-a-box_trafficstats_1               /bin/sh -c /run.sh               Up             <IP_ADDRESS>:2346->2346/tcp
cdn-in-a-box_trafficvault_1               /bin/sh -c /run.sh               Up             <IP_ADDRESS>:8087->8087/tcp, <IP_ADDRESS>:8088->8088/tcp, <IP_ADDRESS>:8098->8098/tcp

If this is a bug fix, what versions of Traffic Control are affected?

master (3995be21c4)
RELEASE-4.1.0
This is when Traffic Ops and Traffic Monitor containers in CDN-in-a-Box were made to exit after the traffic_ops_golang or traffic_monitor process exits.

The following criteria are ALL met by this PR

[x] This PR includes tests
[x] This PR includes documentation
[x] This PR includes an update to CHANGELOG.md
[x] This PR includes any and all required license headers
[x] This PR does not include a database migration
[x] This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

No longer verifying SSL cert in the Traffic Ops health check in 89e6dd9ca2


YARN 0.27 causes command version check in analyzer to fail

Here is the output from analyzer:
The following package managers are activated:
        Gradle, Maven, SBT, NPM, PIP
Scanning project path:
        /app
NPM projects found in:
        oss-attribution-builder/package.json
17:46:30.994 [main] INFO  com.here.ort.util.UtilsKt$log$1 - Running 'npm --version'...
17:46:30.999 [main] DEBUG com.here.ort.util.UtilsKt$log$1 - Keeping temporary files:
17:46:31.000 [main] DEBUG com.here.ort.util.UtilsKt$log$1 - /tmp/npm6011353000025587699.stdout
17:46:31.000 [main] DEBUG com.here.ort.util.UtilsKt$log$1 - /tmp/npm6832287346807849534.stderr
17:46:31.242 [main] INFO  com.here.ort.util.UtilsKt$log$1 - Running 'yarn --version'...
17:46:31.242 [main] DEBUG com.here.ort.util.UtilsKt$log$1 - Keeping temporary files:
17:46:31.243 [main] DEBUG com.here.ort.util.UtilsKt$log$1 - /tmp/yarn2289262920421819612.stdout
17:46:31.243 [main] DEBUG com.here.ort.util.UtilsKt$log$1 - /tmp/yarn792803821624333627.stderr
Exception in thread "main" com.vdurmont.semver4j.SemverException: Invalid version (no patch version): 0.27
        at com.vdurmont.semver4j.Semver.<init>(Semver.java:81)
        at com.vdurmont.semver4j.Semver.<init>(Semver.java:20)
        at com.vdurmont.semver4j.Requirement.isSatisfiedBy(Requirement.java:515)
        at com.here.ort.util.ProcessCaptureKt.checkCommandVersion(ProcessCapture.kt:117)
        at com.here.ort.util.ProcessCaptureKt.checkCommandVersion$default(ProcessCapture.kt:114)
        at com.here.ort.analyzer.managers.NPM.prepareResolution(NPM.kt:116)
        at com.here.ort.analyzer.PackageManager.resolveDependencies(PackageManager.kt:73)
        at com.here.ort.analyzer.Main$main$5.accept(Main.kt:247)
        at com.here.ort.analyzer.Main$main$5.accept(Main.kt:52)
        at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
        at com.here.ort.analyzer.Main.main(Main.kt:245)

If I run yarn --version here is the output:
0.27

Thanks a lot for the report! While yarn 0.27 is not as old as it's version number suggests, I'd actually consider it to be a bug in yarn to not report a semver for its version as usual in the NPM world. Anyway, this should be easy to fix.

I agree, but depending on all tools to return good semver values feels
optimistic. I'd apply the IETF RFC adage of "be strict when sending and
tolerant when receiving" here (https://tools.ietf.org/html/rfc1958#section-3
).
On Mon, Dec 11, 2017 at 12:01 PM, Sebastian Schuberth <
<EMAIL_ADDRESS>wrote:

Thanks a lot for the report! While yarn 0.27 is not as old as it's version
number suggests, I'd actually consider it to be a bug in yarn to not report
a semver for its version as usual in the NPM world. Anyway, this should be
easy to fix.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/heremaps/oss-review-toolkit/issues/129#issuecomment-350840818,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADHXj0StJC38BOsbNFa88n59x_d6wGqXks5s_YongaJpZM4Q9yVt
.


[Suggestion] Pull sites.json at runtime with Javascript

A suggestion to reduce the technology stack here: rather than pre-compiling the HTML with any sites.json or template changes, reduce the page to one file and pull & parse sites.json on site load.
Advantages:

No need to do gulp build for new changes to reflect

Reduces number of commits needed for a single change

Reduces initial page load time

Disadvantages:

Splits page load into multiple requests; can't necessarily be combined, since this would be an async XHR
Overall page load time remains roughly equivalent, but site may not be fully usable between initial HTML load and sites.json load. (this can be sidestepped with loading indicators or accounted for in post-XHR processing)

I'm fully open to thoughts and suggestions to this end; I haven't spent any time toward implementing this change, so I'm not too attached to any specific details here.

I'm already working on something like that but not using javascript. Just Jekyll and yaml.


Adds Thread_Waited_Time and Thread_Waited_Event metrics

Is your feature request related to a problem? Please provide an existing Issue # , or describe.
Adds new metrics published by the metrics API : Thread_Waited_Time(https://docs.oracle.com/en/java/javase/14/docs/api/java.management/java/lang/management/ThreadInfo.html#getWaitedCount()) and Thread_Waited_Event(https://docs.oracle.com/en/java/javase/14/docs/api/java.management/java/lang/management/ThreadInfo.html#getWaitedCount())
Describe the solution you are proposing
A clear and concise description of what you want to happen.
Additional context
Add any other context or screenshots about the feature request here.
Check List

[ ] New functionality includes testing.

[x] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #70 (0e4d404) into main (cdcae41) will decrease coverage by 0.17%.
The diff coverage is 18.75%.

@@             Coverage Diff              @@
##               main      #70      +/-   ##
============================================
- Coverage     72.15%   71.98%   -0.18%
+ Complexity     2928     2923       -5
============================================
  Files           371      371
  Lines         18627    18670      +43
  Branches       1415     1418       +3
============================================
- Hits          13440    13439       -1
- Misses         4612     4656      +44
  Partials        575      575

Impacted Files
Coverage Δ

...ormanceanalyzer/collectors/OSMetricsCollector.java
1.86% <0.00%> (-0.16%)
:arrow_down:

...opensearch/performanceanalyzer/jvm/ThreadList.java
12.34% <0.00%> (-1.61%)
:arrow_down:

...search/performanceanalyzer/metrics/AllMetrics.java
86.63% <100.00%> (+0.04%)
:arrow_up:

...search/performanceanalyzer/model/MetricsModel.java
100.00% <100.00%> (ø)

...g/opensearch/performanceanalyzer/os/OSGlobals.java
56.09% <0.00%> (-7.32%)
:arrow_down:

...ensearch/performanceanalyzer/CertificateUtils.java
84.74% <0.00%> (-6.78%)
:arrow_down:

...formanceanalyzer/PerformanceAnalyzerWebServer.java
68.65% <0.00%> (-5.98%)
:arrow_down:

...nalyzer/rca/net/handler/PublishRequestHandler.java
78.04% <0.00%> (-2.44%)
:arrow_down:

...ensearch/performanceanalyzer/hwnet/NetworkE2E.java
77.47% <0.00%> (-1.81%)
:arrow_down:

...nsearch/performanceanalyzer/rca/RcaController.java
79.29% <0.00%> (-1.33%)
:arrow_down:

... and 4 more

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 cdcae41...0e4d404. Read the comment docs.