Stack-ghc linter produces errors when it shouldn't

Information
VIM version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 26 2018 09:35:41)
Included patches: 1-116
Operating System: Ubuntu 18.04
:ALEInfo
 Current Filetype: haskell
Available Linters: ['ghc-mod', 'stack-ghc-mod', 'ghc', 'hdevtools', 'hlint', 'stack-build', 'stack-ghc']
  Enabled Linters: ['hdevtools', 'hlint', 'stack-ghc']
 Suggested Fixers:
  'brittany' - Fix Haskell files with brittany.
  'hfmt' - Fix Haskell files with hfmt.
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
 Linter Variables:

let g:ale_haskell_hdevtools_executable = 'hdevtools'
let g:ale_haskell_hdevtools_options = '-g -Wall'
 Global Variables:

let g:ale_cache_executable_check_failures = 0
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = 100
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = 50
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = {}
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_lint_on_insert_leave = 0
let g:ale_linter_aliases = {}
let g:ale_linters = {'vim': ['vint'], 'cs': [], 'haskell': ['stack-ghc', 'hlint', 'hdevtools', 'hfmt']}
let g:ale_linters_explicit = 0
let g:ale_list_window_size = 10
let g:ale_list_vertical = 0
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = 0
let g:ale_open_list = 0
let g:ale_pattern_options = {}
let g:ale_pattern_options_enabled = 0
let g:ale_set_balloons = 0
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_info = '--'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '>>'
let g:ale_sign_style_warning = '--'
let g:ale_sign_warning = '--'
let g:ale_statusline_format = ['%d error(s)', '%d warning(s)', 'OK']
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
  Command History:

(finished - exit code 1) ['/bin/bash', '-c', 'hlint --color=never --json - < ''/tmp/vgbPARv/710/ImportSpec.hs''']

<<<OUTPUT STARTS>>>
[{"module":"","decl":"","severity":"Error","hint":"Parse error","file":"-","startLine":3,"startColumn":13,"endLine":3,"endColumn":13,"from":"  {-# LANGUAGE OverloadedStrings #-}\n  \n> module Types. (spec) where\n  \n  import           Data.Maybe                            (fromJust)\n","to":null,"note":[],"refactorings":"[]"}]
<<<OUTPUT ENDS>>>

(finished - exit code 1) ['/bin/bash', '-c', 'stack ghc -- -fno-code -v0 ''/tmp/vgbPARv/711/ImportSpec.hs''']

<<<OUTPUT STARTS>>>

/tmp/vgbPARv/711/ImportSpec.hs:3:13: error:
    parse error on input ‘.’
  |
3 | module Types. (spec) where
  |             ^
<<<OUTPUT ENDS>>>

(started) ['/bin/bash', '-c', '''hdevtools'' check -g -Wall -p ''/home/jonathanramsden/repos/tracs-enterprise/trent-testing/test/Types/Control/ImportSpec.hs'' ''/tmp/vgbPARv/712/ImportSpec.hs''']
(finished - exit code 0) ['/bin/bash', '-c', 'hlint --color=never --json - < ''/tmp/vgbPARv/713/ImportSpec.hs''']

<<<OUTPUT STARTS>>>
[]
<<<OUTPUT ENDS>>>

(finished - exit code 1) ['/bin/bash', '-c', 'stack ghc -- -fno-code -v0 ''/tmp/vgbPARv/714/ImportSpec.hs''']

<<<OUTPUT STARTS>>>

/tmp/vgbPARv/714/ImportSpec.hs:11:1: error:
    Could not find module ‘Test.DaysOfOperation’
    Use -v to see a list of the files searched for.
   |
11 | import Test.DaysOfOperation
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
<<<OUTPUT ENDS>>>

(started) ['/bin/bash', '-c', '''hdevtools'' check -g -Wall -p ''/home/jonathanramsden/repos/tracs-enterprise/trent-testing/test/Types/Control/ImportSpec.hs'' ''/tmp/vgbPARv/715/ImportSpec.hs''']
(finished - exit code 1) ['/bin/bash', '-c', 'hlint --color=never --json - < ''/tmp/vgbPARv/716/ImportSpec.hs''']

<<<OUTPUT STARTS>>>
[{"module":"","decl":"","severity":"Error","hint":"Parse error","file":"-","startLine":3,"startColumn":21,"endLine":3,"endColumn":21,"from":"  {-# LANGUAGE OverloadedStrings #-}\n  \n> module Types.Control. (spec) where\n  \n  import           Data.Maybe                            (fromJust)\n","to":null,"note":[],"refactorings":"[]"}]
<<<OUTPUT ENDS>>>

(finished - exit code 1) ['/bin/bash', '-c', 'stack ghc -- -fno-code -v0 ''/tmp/vgbPARv/717/ImportSpec.hs''']

<<<OUTPUT STARTS>>>

/tmp/vgbPARv/717/ImportSpec.hs:3:21: error:
    parse error on input ‘.’
  |
3 | module Types.Control. (spec) where
  |                     ^
<<<OUTPUT ENDS>>>

(started) ['/bin/bash', '-c', '''hdevtools'' check -g -Wall -p ''/home/jonathanramsden/repos/tracs-enterprise/trent-testing/test/Types/Control/ImportSpec.hs'' ''/tmp/vgbPARv/718/ImportSpec.hs''']
(finished - exit code 0) ['/bin/bash', '-c', 'hlint --color=never --json - < ''/tmp/vgbPARv/719/ImportSpec.hs''']

<<<OUTPUT STARTS>>>
[]
<<<OUTPUT ENDS>>>

(finished - exit code 1) ['/bin/bash', '-c', 'stack ghc -- -fno-code -v0 ''/tmp/vgbPARv/720/ImportSpec.hs''']

<<<OUTPUT STARTS>>>

/tmp/vgbPARv/720/ImportSpec.hs:11:1: error:
    Could not find module ‘Test.DaysOfOperation’
    Use -v to see a list of the files searched for.
   |
11 | import Test.DaysOfOperation
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
<<<OUTPUT ENDS>>>

(started) ['/bin/bash', '-c', '''hdevtools'' check -g -Wall -p ''/home/jonathanramsden/repos/tracs-enterprise/trent-testing/test/Types/Control/ImportSpec.hs'' ''/tmp/vgbPARv/721/ImportSpec.hs''']
(finished - exit code 0) ['/bin/bash', '-c', 'hlint --color=never --json - < ''/tmp/vgbPARv/722/ImportSpec.hs''']

<<<OUTPUT STARTS>>>
[]
<<<OUTPUT ENDS>>>

(finished - exit code 1) ['/bin/bash', '-c', 'stack ghc -- -fno-code -v0 ''/tmp/vgbPARv/723/ImportSpec.hs''']

<<<OUTPUT STARTS>>>

/tmp/vgbPARv/723/ImportSpec.hs:11:1: error:
    Could not find module ‘Test.DaysOfOperation’
    Use -v to see a list of the files searched for.
   |
11 | import Test.DaysOfOperation
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
<<<OUTPUT ENDS>>>

(finished - exit code 1) ['/bin/bash', '-c', '''hdevtools'' check -g -Wall -p ''/home/jonathanramsden/repos/tracs-enterprise/trent-testing/test/Types/Control/ImportSpec.hs'' ''/tmp/vgbPARv/724/ImportSpec.hs''']

<<<NO OUTPUT RETURNED>>>

(finished - exit code 0) ['/bin/bash', '-c', 'hlint --color=never --json - < ''/tmp/vgbPARv/725/ImportSpec.hs''']

<<<OUTPUT STARTS>>>
[]
<<<OUTPUT ENDS>>>

(finished - exit code 1) ['/bin/bash', '-c', 'stack ghc -- -fno-code -v0 ''/tmp/vgbPARv/726/ImportSpec.hs''']

<<<OUTPUT STARTS>>>

/tmp/vgbPARv/726/ImportSpec.hs:11:1: error:
    Could not find module ‘Test.DaysOfOperation’
    Use -v to see a list of the files searched for.
   |
11 | import Test.DaysOfOperation
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
<<<OUTPUT ENDS>>>

(finished - exit code 1) ['/bin/bash', '-c', '''hdevtools'' check -g -Wall -p ''/home/jonathanramsden/repos/tracs-enterprise/trent-testing/test/Types/Control/ImportSpec.hs'' ''/tmp/vgbPARv/727/ImportSpec.hs''']

<<<NO OUTPUT RETURNED>>>

(finished - exit code 0) ['/bin/bash', '-c', 'hlint --color=never --json - < ''/tmp/vgbPARv/728/ImportSpec.hs''']

<<<OUTPUT STARTS>>>
[]
<<<OUTPUT ENDS>>>

(finished - exit code 1) ['/bin/bash', '-c', 'stack ghc -- -fno-code -v0 ''/tmp/vgbPARv/729/ImportSpec.hs''']

<<<OUTPUT STARTS>>>

/tmp/vgbPARv/729/ImportSpec.hs:11:1: error:
    Could not find module ‘Test.DaysOfOperation’
    Use -v to see a list of the files searched for.
   |
11 | import Test.DaysOfOperation
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
<<<OUTPUT ENDS>>>

What went wrong
That (repeated) import error is incorrect - the code compiles fine.  You can safely ignore the hdevtools related stuff.
The stack-ghc linter is the most useful one but it sometimes produces errors where there should be none.  They typically seem to relate to files inside the same package as the target file - eg other files outside the package will be fine.
The bug is intermittent - I believe it only happens when temporary files are used and I think it could possibly be fixed by supplying stack with a working directory, however I've done a bit of digging and am struggling to reproduce the same output when calling stack-ghc on a copy of the file directly.
Could you help me understand what ALE does?  I've been reading the source a bit but been finding it a bit hard to follow and haven't seen anything about working directories.
I saved a copy of the file in question to the same tmp path in the hope of recreating the issue.
I've been running stack ghc like this bash -c 'stack ghc -- -fno-code -v0 /tmp/vgbPARv/729/ImportSpec.hs' which is more or less what I copied from the log above.
The two ways I've tried running stack-ghc on the same file are:

locally from the vim working directory.  This produces no errors when either run on the tmp file or on the one in the normal place
from the tmp... directory.  This produces multiple errors when run on the tmp file locally and they don't follow the same pattern that I see in vim.  In this case I get an error per none-global import.  This will just be because stack doesn't know where the rest of that code is.

Since I can't reproduce the output with stack ghc I came to the conclusion that ale must be running stack differently than either of the above.
Could you help shed some light?
If I can reproduce the errors/environment I should be able to help suggest how to run stack ghc to fix this issue/maybe even go in and update the linter myself and submit a pull request.
Btw I love ALE, it's a massive boost to the usefulness of vim when writing Haskell even with this niggle.  Nice one for writing such a useful plugin :)
Cheers
Jonny

I'll say that's a bug and it can be fixed by changing the working directory. That could be done with a command_callback function and ale#path#BufferCdString. Something like this:
'command_callback': {buffer -> ale#path#BufferCdString(buffer) . 'stack ghc -- -fno-code -v0 %t'},

Thanks for the response
I'll give that a try in my local copy and see if it fixes the issue
does it use the vim working directory by default? I'm pretty sure that'd work fine aswell.
Cheers
Jonny

That sets the working directory to be the directory that the file is in all the time, with cd ... &&

does that include when it gets copied to tmp?
I think it'd actually be better to either set it to the vim working directory or possibly to the buffer's original location.  Does that call do the latter?  I'm not sure which is the right answer as I can't reproduce those specific errors by calling stack ghc from the command line
Is the default behaviour without the extra command to use :pwd as the working directory?

It sets it to the directory the file is in, which should be inside the project. Give it a try and see how well it works. It tends to work for most tools.
The default is that the working directory is effectively random, as it's :pwd at the time the command runs, which could be at any time.

Hi @w0rp . First of all, thanks for a great plugin.
I had a similar issue as OP and was able to work around it by following your suggestion to change the working directory to this file: https://github.com/w0rp/ale/blob/master/ale_linters/haskell/stack_ghc.vim
I can make a PR for this but I'm not sure if it should be changed for everybody, or if it would make more sense to make this behaviour configurable.
What's the usual approach?

The usual approach is to use the ale#path#BufferCdString(a:buffer) function to set the working directory to the directory the file is in, or similar. See other linters for examples. Feel free to create a pull request.

I'm still having this issue.
There seems to be an issue with the stack_ghc linter that isn't present in the ghcid running inside vim (via the plugin). The linter claims that local modules that are imported cannot be resolved.
.vimrc setup
let g:ale_linters = {}
let g:ale_linters.haskell = ['stack_ghc', 'hlint']
let g:ale_haskell_stack_ghc_options = '
      \ -threaded
      \ -rtsopts
      \ -with-rtsopts=-N
      \ -Wall
      \ -Wcompat
      \ -Wincomplete-record-updates
      \ -Wincomplete-uni-patterns
      \ -Wredundant-constraints
      \ -Wmissing-import-lists
      \ -Wmissing-export-lists
      \'

let g:ghcid_command = 'stack exec ghcid --'

In the following file, I'm importing the Models module.
# DatabaseThings.hs

     9 -- import           Database.Beam.Sqlite
    10 import qualified Data.Time.Clock as Time (UTCTime)
    11 import           Database.Beam   (Columnar, Generic, Identity, PrimaryKey)
✘   12 import           Models          (Content)

#### this error shows
Could not find module ‘Models’ Perhaps you meant Module (needs flag -package-key ghc-8.6... import           Models          (Content) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Running ghcid in either vim or the terminal shows no issue.
All good (2 modules, at 18:47:24)

Here is the directory structure
├── src
│   ├── DatabaseThings.hs
│   └── Models.hs

It seems as if the linter is potentially not running in the pwd of the project, but that's just my guess.

This also isn't resolved for me, I never really got my head around what is happening and I couldn't reproduce the error just using stack and running with different working directories.
I don't think the suggested patch helped but am unsure whether I am running a locally patched version (which still has the problem) or whether I updated ALE at some point

I'd like to try and fix this, but I'm pretty unfamiliar with the syntax used in these files. Can you give me some pointers on how to make this compile?
 First of all, thanks for a great plugin.
I had a similar issue as OP and was able to work around it by following your suggestion to change the working directory to this file: https://github.com/w0rp/ale/blob/master/ale_linters/haskell/stack_ghc.vim
I can make a PR for this but I'm not sure if it should be changed for everybody, or if it would make more sense to make this behaviour configurable.
What's the usual approach?

Could you post your fix here?


fix yuv420_to_jpeg: thumbnail_width & thumbnail_height must be aliged with 16 pixel.

from document: https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/libjpeg.txt
The MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16 scanlines on each call to jpeg_write_raw_data()
It will cause illegal memory violation  if the height is not aligned with 16pixel.
sorry for this silly mistake.

This would change the output size of the image, right? I don't think we want to make that change.
In that document they talk about padding the input data, is that something we can do?

we can make the input buffer big enough with zero filled.this can also fix the problem

If that generates the same jpegs as before the switch to yuv that sounds good to me.

it's the same as before


Unable to generate a new PGP key from Windows app

attempted to generate a new PGP key from the windows app.  Ran for about 15 minutes and I gave up.... attempted to close and the app / action isn't closing
my log id: 8a8fe1d38bd62802cf8e5e1c

Which command did you issue?
On Wed, Jul 5, 2017 at 7:25 PM JTS<EMAIL_ADDRESS>wrote:

attempted to generate a new PGP key from the windows app. Ran for about 15
minutes and I gave up.... attempted to close and the app / action isn't
closing
my log id: 8a8fe1d38bd62802cf8e5e1c
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/keybase/client/issues/7644, or mute the thread
https://github.com/notifications/unsubscribe-auth/AA05_2COoTaZX4348RULAXosJOUzKjqxks5sLBuAgaJpZM4OO_Bt
.

the "generate a new key" link / button from within the keybase windows app
On Thu, Jul 6, 2017 at 9:27 AM, Maxwell Krohn<EMAIL_ADDRESS>wrote:

Which command did you issue?
On Wed, Jul 5, 2017 at 7:25 PM JTS<EMAIL_ADDRESS>wrote:

attempted to generate a new PGP key from the windows app. Ran for about
15
minutes and I gave up.... attempted to close and the app / action isn't
closing
my log id: 8a8fe1d38bd62802cf8e5e1c
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/keybase/client/issues/7644, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA05_
2COoTaZX4348RULAXosJOUzKjqxks5sLBuAgaJpZM4OO_Bt>
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/keybase/client/issues/7644#issuecomment-313253823,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJ9TfIufDz0GNuUJDmn38jx2NS8qhmB3ks5sLBvRgaJpZM4OO_Bt
.

I don't think that option exists from the Windows app. Can you tell me exactly what the menu/buttons said?

Hi Max, see attached. keybase 1 image displays my proofs, I can add a pgp key.  keybase 2 image is the next screen.  I'm selecting the top option.

OK, thanks for the info. @zanderz  can you take a look?

Service log shows an error generating the key:
PGP::Generate -> ERROR: Id[0] failed to convert to PGPUserId (James T Smith (2019<EMAIL_ADDRESS>which seemed to reach the GUI process:
From Keybase: log: Thu Jul 06 2017 09:23:28 GMT+1000 (AUS Eastern Standard Time)<PHONE_NUMBER>738): PLC: [
<PHONE_NUMBER>737,
  "Action:",
  {
    "0": "Dispatching action: profile:cancelPgpGen: ",
    "1": "{\"type\":\"profile:cancelPgpGen\"}"
  }
]

I tried to recreate the error by giving a different userid and email during the pgp gen step, but it sill worked for me.
Tracked internally with DESKTOP-4280

Nice......
I tried again, twice with success on the second try.  The first time was as
before with no luck.  The second time, however, I selected a username
without the parens "()".  This worked.  Perhaps there is a problem using
parens?
Regardless, my issue is resolved and I have a fresh certificate.
A request though, I'd like to be able to enter in an expiration date for
the certificate at creation.
Best,
James
On Fri, Jul 7, 2017 at 2:09 AM, Steve Sanders<EMAIL_ADDRESS>wrote:

Service log shows an error generating the key:
PGP::Generate -> ERROR: Id[0] failed to convert to PGPUserId (James T
Smith (2019<EMAIL_ADDRESS>which seemed to reach the GUI process:
From Keybase: log: Thu Jul 06 2017 09:23:28 GMT+1000 (AUS Eastern Standard Time)<PHONE_NUMBER>738): PLC: [
1499297008737,
"Action:",
{
"0": "Dispatching action: profile:cancelPgpGen: ",
"1": "{"type":"profile:cancelPgpGen"}"
}
]
I tried to recreate the error by giving a different userid and email
during the pgp gen step, but it sill worked for me.
Tracked internally with DESKTOP-4280
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/keybase/client/issues/7644#issuecomment-313442835,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJ9TfIYg-qmm3KHGBlKgwhacRY4cFaq4ks5sLQalgaJpZM4OO_Bt
.

Yeah, the front end needs to parse the (x) into a PGP comment.


OutOfRangeError: read less bytes than requested

The training works fine on my local computer and did not work on my Ubuntu Amazon EC2 server when I increased the size of training data.
The first error: [W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at save_restore_v2_ops.cc:184: (out of range, Read less bytes than requested).
My Ubuntu Amazon EC2 server has less memory, less CPU. Reading the error, I am not sure whether that is the problem.
Any clue? Thanks.

Did you perhaps run out of disk space while writing the checkpoint?

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce
Mobile device

It has been 15 days with no activity and the awaiting response label was assigned. Is this still an issue?

I think maybe it is out of memory error. After I increased the instance memory, the error went away. Thanks.

Hey,
I got the same error when I uploaded the zip files on Google Colab and then unzipped them using the !unzip command. Then I deleted each file keeping the directory intact and manually uploaded the files in each sub-directory. However, the error is still the same.

Same i also get the same error when i try to retrain the model using previous checkpoint in google colab.Any one solved it?

I got the error because the process of uploading these files to server machine was interrupted, so the files are corrupted, after I successfully uploaded them again, the error ran away. So if you downloaded the corrupted files, try to download them again and make sure the files are intact. Hope it may help you!

i also get the same error when i restored the model from hdfs.But when download model file to my local disk.it can restore successfully.i do not why

I tried to interrupt while copying the saved_model. And got "read than expected".
Copying again worked fine and smooth. I hope you download the right saved model too.

I got the error because the process of uploading these files to server machine was interrupted, so the files are corrupted, after I successfully uploaded them again, the error ran away. So if you downloaded the corrupted files, try to download them again and make sure the files are intact. Hope it may help you!

That's the case for me, I didn't even notice. Thx, bro.

有遇到过这种问题的吗


 Debugging help, server management, sth else? ^^

There seem to be quite some unrelated changes in there. Do we maybe wanna splice them out a bit to get a cleaner diff? ^^

There seem to be quite some unrelated changes in there. Do we maybe wanna splice them out a bit to get a cleaner diff? ^^

seems to be due to the branch it was based on (pr that is now merged) being included in changes

There seem to be quite some unrelated changes in there. Do we maybe wanna splice them out a bit to get a cleaner diff? ^^

seems to be due to the branch it was based on (pr that is now merged) being included in changes

That should be exactly not the case since the base branch was merged (unless I'm going insane). Unless you're faster, imma splice out some fix to the extent that I understand to reduce the diff a bit ^^

Not sure if we need a test for docker additionally.


How to perform Bitwise Calculation

Hello,
I'm pretty new to this project and FHE. Please correct me if I'm wrong.
I'm trying to use this to perform bitwise calculation. However, I got unexpected result.

from Pyfhel import Pyfhel, PyPtxt, PyCtxt
HE = Pyfhel()
# p=2 creates a GF(2) which should allow me perform Bitwise XOR for addtion, and Bitwise AND for multiplication
HE.contextGen(p=2, m=2048, sec=128)
HE.keyGen()
a = 97
b = 113
ctxt_a = HE.encryptInt(a)
ctxt_b = HE.encryptInt(b)
ctxt_XOR = ctxt_a + ctxt_b
res_XOR = HE.decryptInt(ctxt_XOR)
print(res_XOR)
ctxt_AND = ctxt_a * ctxt_b
res_AND = HE.decryptInt(ctxt_AND)
print(res_AND)

I'm expecting the result as 16, 97, respectively. However, I got -16, and -4625.
Please Help.

Hi @GreyFox-Z , in order to perform bitwise computations there are several things to take into account:

You need to set p=2 in the context generation and use Integer encoding (just like in your example)
You need to provide inputs already modulo p (mod 2), otherwise you will get unexpected behavior (as in your code). The subsequent operations will preserve mod p
Batch encoding is not possible due to the small size of p.
Bitwise decomposition of your inputs must be carried out before encoding/encrypting, and each bit needs its own ciphertext.

One example of this, for your inputs a and b:
import numpy as np
from Pyfhel import Pyfhel, PyPtxt, PyCtxt
HE = Pyfhel()
# p=2 creates a GF(2) which should allow me perform Bitwise XOR for addtion, and Bitwise AND for multiplication
HE.contextGen(p=2, m=2048, sec=128)
HE.keyGen()
a = 97
b = 113
# Defining a function to perform bit decomposition
bit_decomposition = lambda x: np.array(list(map(int, bin(x)[2:])))

a_decomp = bit_decomposition(a)
b_decomp = bit_decomposition(b)

n_bits = len(a_decomp)

ctxt_a = np.empty(n_bits, dtype=PyCtxt)
ctxt_b = np.empty(n_bits, dtype=PyCtxt)

# Encrypting! This can be parallelized!
for i in np.arange(n_bits):
    ctxt_a[i] = HE.encryptInt(a_decomp[i])
    ctxt_b[i] = HE.encryptInt(b_decomp[i])

ctxt_XOR = ctxt_a + ctxt_b
ctxt_AND = ctxt_a * ctxt_b

res_OR = [HE.decryptInt(ctxt_XOR[i])%2 for i in np.arange(n_bits)]
res_AND = [HE.decryptInt(ctxt_AND[i])%2 for i in np.arange(n_bits)]

print(f'res_OR: {res_OR},    res_AND: {res_AND}' )

#>res_OR: [0, 0, 0, 0, 1, 0, 0],    res_AND: [1, 0, 0, 0, 0, 1, 1]

def bit_composition(x):
    res = 0
    for bit in x:
        res = (res << 1) | bit
    return res

print(f'res_OR: {bit_composition(res_OR)},    res_AND: {bit_composition(res_AND)}' )
#> res_OR: 16,    res_AND: 97

Since this looks like an interesting enough functionality, I'll add this example to the Demos.

Hello @ibarrond
Thank you so much for your clarification and detailed explanation.
It is truly appreciated.


vscode extension doesn't work after upgrating to 0.45.23

After upgrating the extension to version 0.45.23, the extension doesn't work anymore with TSX.

Revert to version 0.45.21, there isn't any problem.

Here is the reproduction. There isn't anything special, just a normal React template created by Vite. And I think it's because of this commit.

same here

I'm not sure the reason about that commit, but it works well in my vue project.

I'm not sure the reason about that commit, but it works well in my vue project.

I tried a Vue3 project, and the issue still exsits when upgrating to version 0.45.23. And I use the Windows system, are you using the Mac OS?

This commit seems not resovle this issue , the issue #1565 still exist

And this commit seems not resovle this issue , the issue #1565 still exist

I think it might need to make a revert just as sxzz said.(

The problem is not in #1565
PR is coming #1645

@Flower-F you are on Windows, am I right?

Yes

The problem is not in #1565 PR is coming #1645

Yes, you are right , thx


a running service which is not configured correctly is not fixed by a chef-client run

Cookbook version
0.63.0
Chef-client version
14.3.37
Platform Details
ubuntu 16.04
Scenario:
As described in this post over at the habitat forum, I noticed that one package on a node would not update to the latest available version. After enabling debug logging it turned out that the service is not started with the update strategy specified in the corresponding recipe:
hab_service 'myorg/mypkg-core' do
  action :load
  strategy 'at-once'
  channel node.habitat['channel']
end

It seems like for some unknown reason the package has lost its initially configured update strategy or the configuration probably has been changed over the lifespan of that node. There does not seem to be any means implemented which would check if a service is actually running in the desired state.
Steps to Reproduce:
Expected Result:
This cookbook should probably notice when a service is configured incorrectly / or when a change of configuration occurs after initial setup. The service should most likely be restarted with the updated configuration.
Actual Result:
cookbook does not correct any mismatches in configuration
If we can agree on how to implement this, I'll be happy to help getting this done. I'm no chef expert, so a little help would be much appreciated.

issue appears to be resolved as of recent work, closing


Remove warnings about configuration

Fixes #4293
Ref #4231, #4065
This fixes the regression on sbt 1.2.0 that displays a lot of warnings about configurations.
The warning was added in #4231 in an attempt to fix #4065. This actually highlights somewhat loose usage of configurations among the builds in the wild, and the limitation on the current slash syntax implementation.
I think we can remove this warning for now, and try to fix #4065 by making slash syntax more robust. In particular, we need to memorize the mapping between the configuration name and Scala identifier across the entire build, and use that in the shell.

Thanks for making this change. Adding the logger to Load.reapply also broke the close-watch plugin for sbt 1.2.0 (I needed reapply to remove some settings added by Defaults.scala. I know that you use internal apis at your own risk, but still...).


[Coverity CID :203527]Parse warnings in /usr/include/unistd.h

Static code scan issues seen in File: /usr/include/unistd.h
Category: Parse warnings
Function:
Component: Other
CID: 203527
Please fix or provide comments to square it off in coverity in the link: https://scan9.coverity.com/reports.htm#v32951/p12996

@aasthagr This seems like something that should be waved(?) Can you please take it?


missing base dependency requests

It looks like you are missing the dependency requests in your requirements.txt file
🌵 >python3 -m venv venv
🌵 >source venv/bin/activate
(venv) 🌵 >pip install --upgrade pip
(venv) 🌵 >pip install macrosynergy
(venv) 🌵 >python
Python 3.8.3 (v3.8.3:6f8c8320e9, May 13 2020, 16:29:34)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from macrosynergy.panel.converge_row import ConvergeRow
...
ergy/management/dq.py", line 8, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

Well spotted @DarrahK - thank you.


Exposing secret keys from Android KeyStore is not possible

de.rki.coronawarnapp.util.security.SecurityHelper:64
    /**
     * Retrieves the Master Key from the Android KeyStore to use in SQLCipher
     */
    fun getDBPassword() = keyStore
        .getKey(masterKeyAlias, null)
        .toString()
        .toCharArray()

This doesn't work because the content of the secret key is not exposed.
The current return value of the function is:
android.security.keystore.AndroidKeyStoreSecretKey@{hash}

Please confirm if #189 solved the issue or you think there is more work to be done here.

Hey @jakobmoellersap
#179 does not fix the problem because the toString() method is called on the SecretKey. So the result of the getDBPassword() method is still the same. The content of the SecretKeys generated by the Android KeyStore can not be retrieved.
The architecture documentation for the Android app currently states the following:

SQLCipher is used to encrypt the database. Thus a key is initialised for the database access the first time we access it. The AppDatabase stores the key inside the shared preferences, which are themselves encrypted and bound to the master key from the android key store. On application reset (in the settings), the complete database is reinitialised. The password is randomly generated and is not used outside the storage package for accessing the data.

I implemented a suggestion based on that description in #224.

Resolved thanks to your contribution @aschattney 👍


feat(diagnostic_graph_utils): publish error graph instead of the terminal log

Description
The diag_graph_utils's output to the terminal is a bit too frequent to fill the whole terminal screen.
Instead of the output to the terminal, this PR makes the diag_graph_utils publish the string message of the error diag graph so that the Rviz can visualize it as follows.

Related links
How was this PR tested?
psim worked well
Notes for reviewers
None.
Interface changes
None.

Effects on system behavior
None.

@isamu-takagi
Sorry to be late. Please again review the PR.


liveserver starts port but doesn't load the default browser and i have tried all settings and configuration online but to no avail

Is your feature request related to a problem? Please describe.

Describe the solution you'd like:

Describe alternatives you've considered:

Additional context:

Thanks for reaching out, but I'm afraid there isn't enough information for us to investigate a potential issue here.
Are you able to share your steps that lead to the problem? Perhaps your VS Code project configuration too? Also the version of the extension that you're using.
These would be useful in investigating.


Fixed log errors especially from unused imports and variables

What I did:

Fixed log errors

Files I changed:

InstructorBookingCard.js
InstructorBookingCardModal.js
InstructorHome/index.js
AvailableCourses.js
ParentBookingCard.js
ParentCalendar.js
ParentSidebar.js

Why changes were made:

Fix log errors

[Loom video] !(https://www.loom.com/share/3eedd2164527453284739a503e4b0004)

Great job :) from ashley, pauline, xiao, may, and huimin


Support certs with separate Extended Key Usage

Problem: Right now certs that specify extended key usage must set
both clientAuth and serverAuth.
Solution: Add settings to path additional server cert and use it when
creating ssl server
*Issue #474 *
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@lavacat Please check why CI build failed

@debjanibnrj Thanks for comments. I'll resume working on this.

will add JKS cert support
mixedKeyUsageEnabled means both clientAuth and serverAuth, if it's confusing, happy to use some other name
agree with having .server. and .client. and defaulting to old way. Will refactor

@nicot @debjanibnrj

added keystore, truststore files and integration test in SSLTest.java
added unit tests for all new CertFrom* classes
cleaned up imports

@debjanibnrj based on your question "Why add || extendedKeyUsageEnabled here?"
did a small refactor and added cleaner useKeyStore and useRawFiles variables
Nothing else changed

@hardik-k-shah can you have a look as well

Thanks for your contribution. Added a minor comment but overall looks great!

@debjanibnrj FYI, don't see the new comments. I think I've addressed all older ones.

@debjanibnrj @hardik-k-shah thanks for comments and noticing those mistakes, made all changes as you've suggested.


The newly added k3s agent nodes are unable to access the network of certain namespaces, whereas the initially added nodes are functioning without issues.

Environmental Info:
K3s Version:

[root@MH-HR-sscphjsk ~]# k3s -v
k3s version v1.27.4+k3s1 (36645e73)
go version go1.20.6

Node(s) CPU architecture, OS, and Version:

Linux MH-HR-app6 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Linux MH-HR-xxcj-app1 3.10.0-1160.83.1.el7.x86_64 #1 SMP Wed Jan 25 16:41:43 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Linux MH-HR-app5 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Linux MH-HR-xxcj-app2-2 3.10.0-1160.83.1.el7.x86_64 #1 SMP Wed Jan 25 16:41:43 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Linux MH-HR-xxcj-app2-3 3.10.0-1160.83.1.el7.x86_64 #1 SMP Wed Jan 25 16:41:43 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Linux MH-HR-interface1 3.10.0-1160.83.1.el7.x86_64 #1 SMP Wed Jan 25 16:41:43 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Linux zuzhi-GIS-app-3 4.19.90-23.25.v2101.ky10.x86_64 #1 SMP Tue Jun 21 19:41:22 CST 2022 x86_64 x86_64 x86_64 GNU/Linux
Linux MH-HR-sscphjsk 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Cluster Configuration:

[root@MH-HR-sscphjsk ~]# kubectl get node -o wide
NAME                STATUS   ROLES                  AGE    VERSION        INTERNAL-IP      EXTERNAL-IP   OS-IMAGE                                   KERNEL-VERSION                    CONTAINER-RUNTIME
mh-hr-app6          Ready    <none>                 5d4h   v1.27.4+k3s1   <IP_ADDRESS>    <none>        CentOS Linux 7 (Core)                      3.10.0-1160.76.1.el7.x86_64       containerd://1.7.1-k3s1
mh-hr-xxcj-app1     Ready    <none>                 62d    v1.27.4+k3s1   <IP_ADDRESS>   <none>        CentOS Linux 7 (Core)                      3.10.0-1160.83.1.el7.x86_64       containerd://1.7.1-k3s1
mh-hr-app5          Ready    <none>                 16d    v1.27.4+k3s1   <IP_ADDRESS>    <none>        CentOS Linux 7 (Core)                      3.10.0-1160.76.1.el7.x86_64       containerd://1.7.1-k3s1
mh-hr-xxcj-app2-2   Ready    <none>                 67d    v1.27.4+k3s1   <IP_ADDRESS>   <none>        CentOS Linux 7 (Core)                      3.10.0-1160.83.1.el7.x86_64       containerd://1.7.1-k3s1
mh-hr-xxcj-app2-3   Ready    <none>                 119d   v1.27.4+k3s1   <IP_ADDRESS>   <none>        CentOS Linux 7 (Core)                      3.10.0-1160.83.1.el7.x86_64       containerd://1.7.1-k3s1
mh-hr-interface1    Ready    <none>                 67d    v1.27.4+k3s1   <IP_ADDRESS>   <none>        CentOS Linux 7 (Core)                      3.10.0-1160.83.1.el7.x86_64       containerd://1.7.1-k3s1
zuzhi-gis-app-3     Ready    <none>                 119d   v1.27.4+k3s1   <IP_ADDRESS>   <none>        Kylin Linux Advanced Server V10 (Tercel)   4.19.90-23.25.v2101.ky10.x86_64   containerd://1.7.1-k3s1
mh-hr-sscphjsk      Ready    control-plane,master   119d   v1.27.4+k3s1   <IP_ADDRESS>   <none>        CentOS Linux 7 (Core)                      3.10.0-1160.92.1.el7.x86_64       containerd://1.7.1-k3s1

Describe the bug:

When we initially set up the cluster, we used 1 master node and 5 agent nodes, which operated smoothly and stably for a while. Later, we added two more agent nodes (mh-hr-app5, mh-hr-app6). Now, when new pods are scheduled on these two nodes, they are unable to access Kafka and Zookeeper services in the Confluent namespace. However, access to HTTP-type services remains normal across all namespaces. This leads us to suspect that the network configuration of these newly added agent nodes might be inconsistent with the network configuration script used during the initial cluster installation.
Steps To Reproduce:

Installed K3s:

export INSTALL_K3S_MIRROR=cn
export K3S_URL=https://<IP_ADDRESS>:6443
export INSTALL_K3S_VERSION=v1.27.4+k3s1
export K3S_TOKEN=K10c46dd38636c4073c7d202599f35849e08b53e719f853d89d9134245365e6e7f7::server:1ef415ad804694b2809312d340cc6e34
curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | sh -

Additional context / logs:

[root@MH-HR-sscphjsk ~]# kubectl get pods -n confluent -o wide
NAME                                  READY   STATUS    RESTARTS        AGE   IP            NODE               NOMINATED NODE   READINESS GATES
confluent-operator-7867b75d94-gkr6l   1/1     Running   0               18m   <IP_ADDRESS>   mh-hr-app5         <none>           <none>
zookeeper-0                           1/1     Running   0               18m   <IP_ADDRESS>   mh-hr-interface1   <none>           <none>
kafka-0                               1/1     Running   0               18m   <IP_ADDRESS>   mh-hr-interface1   <none>           <none>
kafkarestproxy-0                      1/1     Running   0               18m   <IP_ADDRESS>   mh-hr-app5         <none>           <none>
ksqldb-0                              1/1     Running   1 (18m ago)     18m   <IP_ADDRESS>   mh-hr-xxcj-app1    <none>           <none>
controlcenter-0                       1/1     Running   0               18m   <IP_ADDRESS>    mh-hr-sscphjsk     <none>           <none>
connect-0                             0/1     Running   6 (3m45s ago)   18m   <IP_ADDRESS>   mh-hr-app5         <none>           <none>
schemaregistry-0                      0/1     Running   7 (5m56s ago)   18m   <IP_ADDRESS>   mh-hr-app5         <none>           <none>
connect-worker0-0                     0/1     Running   6 (3m21s ago)   18m   <IP_ADDRESS>   mh-hr-app5         <none>           <none>
[root@MH-HR-sscphjsk ~]# kubectl get pods -n flink-cluster -o wide
NAME                                       READY   STATUS    RESTARTS        AGE     IP            NODE                NOMINATED NODE   READINESS GATES
sql-person-c-7cfbfd7494-sf2rc              1/1     Running   0               18d     <IP_ADDRESS>   mh-hr-interface1    <none>           <none>
sql-person-b-86b7f966d9-h5dch              1/1     Running   2 (9d ago)      20d     <IP_ADDRESS>    zuzhi-gis-app-3     <none>           <none>
sql-baseemp-745b8b45c4-wl9cr               1/1     Running   4 (8d ago)      19d     <IP_ADDRESS>   mh-hr-xxcj-app1     <none>           <none>
sql-person-a-5455d649dc-6cx48              1/1     Running   3 (2d13h ago)   20d     <IP_ADDRESS>   mh-hr-interface1    <none>           <none>
sql-common-b-5657969474-z88hl              1/1     Running   5 (2d7h ago)    20d     <IP_ADDRESS>   mh-hr-xxcj-app2-3   <none>           <none>
sql-common-b-taskmanager-5-1               1/1     Running   0               2d7h    <IP_ADDRESS>   mh-hr-xxcj-app2-3   <none>           <none>
sql-common-a-taskmanager-6-2               1/1     Running   0               2d      <IP_ADDRESS>   mh-hr-xxcj-app2-3   <none>           <none>
sql-common-a-taskmanager-6-1               1/1     Running   0               2d      <IP_ADDRESS>   mh-hr-xxcj-app2-3   <none>           <none>
sql-common-a-6977f86c77-tsbct              1/1     Running   95 (2d ago)     17d     <IP_ADDRESS>   mh-hr-xxcj-app2-3   <none>           <none>
flink-kubernetes-operator-f4bbff6-fxkr4    2/2     Running   0               23d     <IP_ADDRESS>   mh-hr-sscphjsk      <none>           <none>
sql-person-5dcc7556c8-g4bx4                1/1     Running   0               10h     <IP_ADDRESS>   mh-hr-interface1    <none>           <none>
sql-person-taskmanager-1-1                 1/1     Running   0               10h     <IP_ADDRESS>   mh-hr-interface1    <none>           <none>
sql-person-taskmanager-1-2                 1/1     Running   0               10h     <IP_ADDRESS>   mh-hr-interface1    <none>           <none>
sql-project-performance-taskmanager-2-1    1/1     Running   0               6h47m   <IP_ADDRESS>    mh-hr-app6          <none>           <none>
sql-organ-taskmanager-37-2                 1/1     Running   0               4h4m    <IP_ADDRESS>   zuzhi-gis-app-3     <none>           <none>
sql-organ-taskmanager-37-3                 1/1     Running   0               4h4m    <IP_ADDRESS>   zuzhi-gis-app-3     <none>           <none>
sql-organ-75c65d79f5-g8n5k                 1/1     Running   128 (72m ago)   2d1h    <IP_ADDRESS>    zuzhi-gis-app-3     <none>           <none>
sql-project-performance-taskmanager-7-1    1/1     Running   0               8m35s   <IP_ADDRESS>   mh-hr-app5          <none>           <none>
sql-project-performance-777d59f95f-pddn6   1/1     Running   8 (8m26s ago)   7h46m   <IP_ADDRESS>    mh-hr-app6          <none>           <none>
[root@MH-HR-sscphjsk ~]# kubectl exec -it sql-project-performance-taskmanager-7-1 -n flink-cluster -- bash
root@sql-project-performance-taskmanager-7-1:/opt/flink# curl -v http://kafka.confluent:9092
*   Trying <IP_ADDRESS>:9092...
* connect to <IP_ADDRESS> port 9092 failed: Connection timed out
* Failed to connect to kafka.confluent port 9092 after 127326 ms: Connection timed out
* Closing connection 0
curl: (28) Failed to connect to kafka.confluent port 9092 after 127326 ms: Connection timed out
root@sql-project-performance-taskmanager-7-1:/opt/flink# curl -v http://zookeeper.confluent:2181
*   Trying <IP_ADDRESS>:2181...
^C
-------------------------
root@sql-project-performance-taskmanager-7-1:/opt/flink# curl -v http://controlcenter.confluent:9021
*   Trying <IP_ADDRESS>:9021...
* Connected to controlcenter.confluent (<IP_ADDRESS>) port 9021 (#0)
> GET / HTTP/1.1
> Host: controlcenter.confluent:9021
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Wed, 27 Dec 2023 14:49:34 GMT
< X-Content-Type-Options: nosniff
< X-Confluent-Control-Center-Version: 7.4.0
< X-Confluent-Control-Session: f6528f7b-281a-43eb-8030-ba15409fac62
< Strict-Transport-Security: max-age=31536000
< Cache-Control: no-store
< X-Frame-Options: SAMEORIGIN
< Last-Modified: Mon, 01 May 2023 04:47:08 GMT
< Content-Type: text/html
< Accept-Ranges: bytes
< Vary: Accept-Encoding, User-Agent
< Content-Length: 7119
<
--------------------------
[root@MH-HR-sscphjsk ~]# kubectl exec -it sql-person-taskmanager-1-2 -n flink-cluster -- bash
root@sql-person-taskmanager-1-2:/opt/flink# curl -v http://kafka.confluent:9092
*   Trying <IP_ADDRESS>:9092...
* Connected to kafka.confluent (<IP_ADDRESS>) port 9092 (#0)
> GET / HTTP/1.1
> Host: kafka.confluent:9092
> User-Agent: curl/7.81.0
> Accept: */*
>
* Empty reply from server
* Closing connection 0
curl: (52) Empty reply from server

root@sql-person-taskmanager-1-2:/opt/flink# curl -v http://controlcenter.confluent:9021
*   Trying <IP_ADDRESS>:9021...
* Connected to controlcenter.confluent (<IP_ADDRESS>) port 9021 (#0)
> GET / HTTP/1.1
> Host: controlcenter.confluent:9021
> User-Agent: curl/7.81.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Wed, 27 Dec 2023 14:52:27 GMT
< X-Content-Type-Options: nosniff
< X-Confluent-Control-Center-Version: 7.4.0
< X-Confluent-Control-Session: f6528f7b-281a-43eb-8030-ba15409fac62
< Strict-Transport-Security: max-age=31536000
< Cache-Control: no-store
< X-Frame-Options: SAMEORIGIN
< Last-Modified: Mon, 01 May 2023 04:47:08 GMT
< Content-Type: text/html
< Accept-Ranges: bytes
< Vary: Accept-Encoding, User-Agent
< Content-Length: 7119
[Original agent node iptable--list configuration.log](https://github.com/k3s-io/k3s/files/13782385/Original.agent.node.iptable--list.configuration.log)
[New agent node iptable--list configuration.log](https://github.com/k3s-io/k3s/files/13782386/New.agent.node.iptable--list.configuration.log)

Cluster networking is not namespaced. I suspect that your problem is related to inter-node CNI traffic - as you noted, the problem has more to do with which nodes the pods are running on. Confirm that the correct ports are open on the security groups for the nodes you just added, for whatever flannel backend you're using.

The issue has been resolved. It was evident from all scenarios that the traffic between nodes was abnormal. We later found out that the network team had implemented a blocking strategy without our knowledge. After readjusting the network rules, the cluster is now functioning well.


feat: Impersonated Client w/ Universe Support

🦕

Looks like this is out of scope for TPC atm. Going to close this for now.


Add doc-test in DeepLabv3 when docker is updated with mmcv

🚀 Feature Request
Deeplabv3 doc-tests were moved due to mmcv not installed in docker image. These should be added back when the docker image is updated.

Closing. Tracking elsewhere as low pri


bug - Response content length limit

The current Limit for the response content length is 65,535 which is in kbytes only ~65kb.
Use a u32 to reach a max length of 4GB.

4.294.967.295 bytes is now the limit


Closing as fixed.


Minimal Mode screws up picture aspect ratio

Without:

With:

Minimal mode has a fixed size, will fix soon :tm:

Fixed in 1.59


release-v3.14 - Cherry-pick Upgrade docs fixes (#3516)

Description

Related issues/PRs

Todos

[ ] Tests
[ ] Documentation
[ ] Release note

Release Note

None required

Deploy preview for calico ready!
Built with commit c7ae7542e2362b1520c1750b2eb85438881ab1c4
https://deploy-preview-3518--calico.netlify.app


Week (June 5 - 11): Investigating Kernel Density Estimates

Investigate KDE's for points of inflection and create a report (due via pull requests on June 11). This report should describe what KDEs do and points where bias may occur. Visualizations are greatly recommended.

Present report in June 12 lab meeting.

KDE Prelim.pdf


Kubernetes cluster leave not triggering

Hi,
I am trying to build a VerneMQ cluster that auto-scales on GKE. Scaling up works like a charm and the new nodes are added to the cluster. When downscaling, the node doesn't leave the cluster before the container is exited. I believe this piece is responsible from bin/vernemq.sh:
# SIGTERM-handler
sigterm_handler() {
    if [ $pid -ne 0 ]; then
        # this will stop the VerneMQ process
        /vernemq/bin/vmq-admin cluster leave node=VerneMQ@$IP_ADDRESS -k > /dev/null
        wait "$pid"
    fi
    exit 143; # 128 + 15 -- SIGTERM
}

When using the DOCKER_VERNEMQ_DISCOVERY_KUBERNETES env variable, the node name changes to<EMAIL_ADDRESS>Suggested fix:
# SIGTERM-handler
sigterm_handler() {
    if [ $pid -ne 0 ]; then
        # this will stop the VerneMQ process
        if [ ! -z $VERNEMQ_KUBERNETES_HOSTNAME ]; then
            /vernemq/bin/vmq-admin cluster leave node=$VERNEMQ_KUBERNETES_HOSTNAME-k > /dev/null
        else
            /vernemq/bin/vmq-admin cluster leave node=VerneMQ@$IP_ADDRESS -k > /dev/null
        fi
        wait "$pid"
    fi
    exit 143; # 128 + 15 -- SIGTERM
}

The current flow is that I manually enter the leave command before downscaling. That way the connected client sessions are rerouted to the other nodes before the containers exits. Thanks for looking in to this.

@alexdesmet thanks.. is the issue that the VerneMQ leave takes too long, or is the issue a nodename issue?
The snippet you provided fixes it for you?

@ioolkos I haven't edited the script itself inside the container as it is write protected. I do have observed the following:
When executing the cluster leave command by using the IP address of the container, the leave command outputs "done". But the node is still a part of the cluster.
vernemq@vernemq-1:~$ vmq-admin cluster leave<EMAIL_ADDRESS>-k
Done
vernemq@vernemq-1:~$ vmq-admin cluster show
+-----------------------------------------------------------+-------+
|                           Node                            |Running|
+-----------------------------------------------------------+-------+
<EMAIL_ADDRESS>true  |
<EMAIL_ADDRESS>true  |
+-----------------------------------------------------------+-------+

When entering the command with the full nodename, everything goes as aspected:
vernemq@vernemq-1:~$ vmq-admin cluster leave<EMAIL_ADDRESS>-k
Migrated 0/0 queues and 0/0 messages
Done

On the other node:
vernemq@vernemq-0:/usr/sbin$ vmq-admin cluster show
+-----------------------------------------------------------+-------+
|                           Node                            |Running|
+-----------------------------------------------------------+-------+
<EMAIL_ADDRESS>true  |
+-----------------------------------------------------------+-------+

I could solve this myself by providing a preStop script in the container yaml but I feel it could be solved cleaner and more generic for all clusters using nodenames in stead of IP addresses.

I have implemented this workaround for the time being
lifecycle:
    preStop:
        exec:
            command:
              - /bin/sh
              - -c
              - /vernemq/bin/vmq-admin cluster leave<EMAIL_ADDRESS>-k;sleep 5

@alexdesmet your addition in the sigterm handler is correct. Happy to review a PR.

I'll go ahead and close this issue. Thanks for the merge!


Scrolling on mobile makes this plugin disappear

Hi. Thanks for helping.
It's supposed to disappear when the user is scrolling and appear again when is reading. Maybe it can be set to don't do that on mobile.
What cellphone were you using when you discovered the bug?

Found the similar disappearing behavior on OnePlus One running Chrome.

I tried it again and yeah it's not bugged, it reappears after a few seconds, however what is bugged is when you scroll to the top. Then it disappears. Just try scrolling casual a bit and then scroll all the way to the top.

(on a LG G2, 4.4.2, Chrome)

I tested in Android and iPhone and couldn't replicate the issue. I think I know what it can be: when the estimated time has passed, it considers that the user has finished reading and doesn't show the gauge anymore.
The same thing when the scroll is going up, it considers that the user is not reading so the gauge stops appearing.
I should consider if this feature (or bug) will still be present in the next version. In which case I should document it better.


Kafka : Define access log record format

Parent Issue #1551 : Kafka parser for proxy
Related issue #1606 : Kafka : Define access log record format
Related Issue #1633: Kafka: Initial base code for policy enforcement and api


Change the colors of keyword, keyword name and function name

Closes #4047

@nlhkabu Is this ok?

Thanks again for this PR @nividonis
If you'd like to continue on this area, there are two more issues open associated with improving the code highlighting theme:
https://github.com/pypa/warehouse/issues/4400
https://github.com/pypa/warehouse/issues/3939
Let me know if you'd like to work on either of these!

@nlhkabu Sorry for the late response. I see that someone has already taken those two issues, but I will definitely find something I like when my schedule clears up


panic: Unexpected error from context packet: context deadline exceeded

2017-02-03 22:51:39.543127 I | control: step 3: stopping databases...
2017-02-03 22:51:39.543264 I | control: sending message [index: 0 | operation: "Stop" | database: "etcdv3" | endpoint: "<IP_ADDRESS>:3500"]
2017-02-03 22:51:40.543563 I | control: sending message [index: 1 | operation: "Stop" | database: "etcdv3" | endpoint: "<IP_ADDRESS>:3500"]
2017-02-03 22:51:41.543750 I | control: sending message [index: 2 | operation: "Stop" | database: "etcdv3" | endpoint: "<IP_ADDRESS>:3500"]
2017-02-03 22:51:50.337145 I | control: got response [index: 0 | endpoint: "<IP_ADDRESS>:3500" | response: success:true datasize:2840425696 ]
2017-02-03 22:51:50.885129 I | control: got response [index: 1 | endpoint: "<IP_ADDRESS>:3500" | response: success:true datasize:2852999600 ]
panic: Unexpected error from context packet: context deadline exceeded

goroutine 32325 [running]:
panic(0xd527e0, 0xc4283a2450)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/coreos/dbtester/vendor/google.golang.org/grpc/transport.ContextErr(0x13ad980, 0x1638c98, 0x1638c98, 0x1, 0x0)
	/home/gyuho/go/src/github.com/coreos/dbtester/vendor/google.golang.org/grpc/transport/transport.go:566 +0x213
github.com/coreos/dbtester/vendor/google.golang.org/grpc/transport.(*Stream).Header(0xc42025a4b0, 0xf73720, 0xc42e933a70, 0x13bb860)
	/home/gyuho/go/src/github.com/coreos/dbtester/vendor/google.golang.org/grpc/transport/transport.go:241 +0x11a
github.com/coreos/dbtester/vendor/google.golang.org/grpc.recvResponse(0x0, 0x0, 0x13b7c00, 0x1638c98, 0x0, 0x0, 0x0, 0x0, 0x13aee00, 0xc42b552640, ...)
	/home/gyuho/go/src/github.com/coreos/dbtester/vendor/google.golang.org/grpc/call.go:61 +0xaa
github.com/coreos/dbtester/vendor/google.golang.org/grpc.invoke(0x7f1dd3a03218, 0xc42be7d440, 0xf07f1c, 0x1d, 0xe45d20, 0xc42cc66000, 0xe45e00, 0xc4283a23d0, 0xc42033e900, 0x0, ...)
	/home/gyuho/go/src/github.com/coreos/dbtester/vendor/google.golang.org/grpc/call.go:208 +0x8a1
github.com/coreos/dbtester/vendor/google.golang.org/grpc.Invoke(0x7f1dd3a03218, 0xc42be7d440, 0xf07f1c, 0x1d, 0xe45d20, 0xc42cc66000, 0xe45e00, 0xc4283a23d0, 0xc42033e900, 0x0, ...)
	/home/gyuho/go/src/github.com/coreos/dbtester/vendor/google.golang.org/grpc/call.go:118 +0x19c
github.com/coreos/dbtester/agent/agentpb.(*transporterClient).Transfer(0xc42e1de0d8, 0x7f1dd3a03218, 0xc42be7d440, 0xc42cc66000, 0x0, 0x0, 0x0, 0x0, 0xc426e1c0f8, 0x9)
	/home/gyuho/go/src/github.com/coreos/dbtester/agent/agentpb/message.pb.go:183 +0xd2
github.com/coreos/dbtester/control.sendReq(0xc42013bd00, 0x10, 0x100000001, 0xc4201695c0, 0x27, 0x0, 0xc4201450e0, 0x11, 0x0, 0x186a0, ...)
	/home/gyuho/go/src/github.com/coreos/dbtester/control/step1_start_database.go:79 +0x55f
github.com/coreos/dbtester/control.bcastReq.func1(0xc420164200, 0xc4200ca000, 0xc42f5d6e40, 0xc42f5d6de0, 0x2)
	/home/gyuho/go/src/github.com/coreos/dbtester/control/step1_start_database.go:36 +0xa5
created by github.com/coreos/dbtester/control.bcastReq
	/home/gyuho/go/src/github.com/coreos/dbtester/control/step1_start_database.go:41 +0x1df

2017-02-03 22:51:47.551742 I | agent: upload signal received; saving CSV at "/home/gyuho/system-metrics.csv"
2017-02-03 22:51:47.557469 I | agent: CSV saved at "/home/gyuho/system-metrics.csv"
2017-02-03 22:51:47.592697 I | agent: CSV saved at "/home/gyuho/system-metrics-interpolated.csv"
2017-02-03 22:51:47.592730 I | agent: stopped collecting metrics; uploading logs to storage "etcd-development"
2017-02-03 22:51:47.592895 I | agent: uploading database log ["/home/gyuho/database.log" -> "2017Q1-02-etcd-zookeeper-consul/01-write-1M-keys-client-variable/etcd-v3.1-go1.7.4-3-database.log"]
2017-02-03 22:51:48.395598 I | remotestorage: uploading "/home/gyuho/database.log" ---> "2017Q1-02-etcd-zookeeper-consul/01-write-1M-keys-client-variable/etcd-v3.1-go1.7.4-3-database.log"
2017-02-03 22:51:48.633653 I | remotestorage: finished uploading "/home/gyuho/database.log"
2017-02-03 22:51:48.633738 I | agent: uploading system metrics data ["/home/gyuho/system-metrics.csv" -> "2017Q1-02-etcd-zookeeper-consul/01-write-1M-keys-client-variable/etcd-v3.1-go1.7.4-3-system-metrics.csv"]
2017-02-03 22:51:49.441899 I | remotestorage: uploading "/home/gyuho/system-metrics.csv" ---> "2017Q1-02-etcd-zookeeper-consul/01-write-1M-keys-client-variable/etcd-v3.1-go1.7.4-3-system-metrics.csv"
2017-02-03 22:51:49.750763 I | remotestorage: finished uploading "/home/gyuho/system-metrics.csv"
2017-02-03 22:51:49.750807 I | agent: uploading system metrics interpolated data ["/home/gyuho/system-metrics-interpolated.csv" -> "2017Q1-02-etcd-zookeeper-consul/01-write-1M-keys-client-variable/etcd-v3.1-go1.7.4-3-system-metrics-interpolated.csv"]
2017-02-03 22:52:06.584878 I | remotestorage: uploading "/home/gyuho/system-metrics-interpolated.csv" ---> "2017Q1-02-etcd-zookeeper-consul/01-write-1M-keys-client-variable/etcd-v3.1-go1.7.4-3-system-metrics-interpolated.csv"
2017-02-03 22:52:06.957609 I | remotestorage: finished uploading "/home/gyuho/system-metrics-interpolated.csv"
2017-02-03 22:52:06.957651 I | agent: uploading agent logs ["/home/gyuho/agent.log" -> "2017Q1-02-etcd-zookeeper-consul/01-write-1M-keys-client-variable/etcd-v3.1-go1.7.4-3-agent.log"]
2017-02-03 22:52:07.992588 I | remotestorage: uploading "/home/gyuho/agent.log" ---> "2017Q1-02-etcd-zookeeper-consul/01-write-1M-keys-client-variable/etcd-v3.1-go1.7.4-3-agent.log"
2017-02-03 22:52:08.233964 I | remotestorage: finished uploading "/home/gyuho/agent.log"
2017-02-03 22:52:08.234231 I | agent: Transfer success!

agent was taking awhile to finish uploads. Will just bump up the timeout.


[v1.4.2] New test cases for DateOfBirth

Overview

New test cases for DateOfBirth
If dob specified is today, it is now a valid input
New error message if dob entered is after today
CommandParserTestUntil prints more details about errors now

Coverage increased (+0.1%) to 59.501% when pulling 80666a244e51a55e9a54c4f9fe2dfa5039e2d276 on kylerwsm:master into 73913205b88c053eafd2e8674a5c8b29285f0a9b on CS2103-AY1819S2-W17-2:master.

Approved, thanks for the work kyler!


Cow: Watch cyberassetrecovery.pro

Cow requests the watch of the watch_keyword cyberassetrecovery\.pro. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

cyberassetrecovery\.pro has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Dragonrage in Charcoal HQ


Make Zend\Loader\PluginBroker LocatorAware

Implement LocatorAware interface
Tries to load plugin classes from the locator if it has been set

Reviewed, merged, and pushed to master. I also added a test to ensure that the locator gets invoked if set.


Output is null for some coco images

I test the demo.jpg, the output is good,
but i test other images:
etc: coco2014/val2014/COCO_val2014_000000290868.jpg
the model cannot detect anything even i remove the 0.3 threshold.
could you test the image, i create a public url https://tva1.sinaimg.cn/large/007S8ZIlly1gewio2zjwoj30cu0h0q4t.jpg
you can download it and test.
Please fix this bug, thanks alot

ok, it is mmdet bug, now they fix it


Support Remote key types when doing key splitting on encrypt

see equivalent java-sdk issue for details https://github.com/opentdf/java-sdk/issues/153

dupe of https://github.com/opentdf/platform/issues/1479


Failed to add XamlAnimatedGif to C++/Cx Windows Store App!

XamlAnimatedGif is a Class Library, could not use for C++ or Javascript project.
XamlAnimatedGif should support C++ or Javascript project at next version?

Hi,
It's a .NET library, so it only works with .NET.
To make it work with C++ projects I think it would have to be a WinRT component, but I don't know how to do that, and I don't know C++ well enough to do that.
For JavaScript, I don't think you need a library at all... animated GIFs are supported natively in HTML


Make code.check:extensions_fuzzed configurable

Currently the envoy.code.check update is broken pending #27373 landing
that can probably land - so this issue is more about the code.check configurability
when i created the toolshed repo, i shifted everything, and then tried to make anything liable to change configurable in envoy - at least that has been the gradual intention
in this case the check is a bit kludgy in how it resolves the filters, now that it has been moved to bazel i think we should probably being using a bazel query to pass the filters to the tool

cc @vehre-x41


Fix/post filter unit tests

What
Fixed broken unit test for graceful service shutdown
Added Kafka Producer Mock with Close function
How to review
run make test and make test-component
Who can review
Team B

@PauloPortugal https://github.com/ONSdigital/dp-cantabular-filter-flex-api/pull/43/commits/4de95d226641b0e727836e9cf45fa5ef54f87790 now has a commit message describing the reason for the fix.


How do I use 2dimensional Arrays?

I want to use functions like
[OpenCLKernel]         void feedForward([Global]float[] inputs, float[,] weights, [Global]float[] outputs)         {             outputs[i] = inputs[j] * weights[j,i];         }
for my NN
How do I do that?

You need to reduce the 2D array down into a 1D array.
https://stackoverflow.com/questions/35442327/2d-array-as-opencl-kernel-argument


Resolve api key from string resources

Goal
When using metada like on below example upload process is broken so api returns '@string/bugsnag_api_key' not valid key.

Changeset
It will fix string reference from string resources.
Tests
It tested for flavor and flavorless projects for both type project string resource reference resolve apiKey.

Thanks for opening this PR - unfortunately I don't think we're likely to accept this as it doesn't have any tests and also logs out the API key.


delta-config: Custom CLI config per node, as delta on top of release default

Also includes reflect-based generic Node property retrieval method (TODO: refactor others)
Also auto-enables connected interfaces

thanks for the ideas, @jbemmel
CLI config is enabled in #708
auto-up of interfaces is added in #709
the reflection part, as discussed, is not something I am comfortable to take in just yet


[Bug]Jenkins Opensearch is building snapshot that will fail on a patch release

Describe the bug
There seems like an issue with the jenkins due to it is also running --snapshot
2021-12-09 18:55:45 ERROR    Error building job-scheduler, retry with: ./build.sh manifests/1.1.1/opensearch-1.1.1.yml --component job-scheduler --snapshot
Traceback (most recent call last):
  File<EMAIL_ADDRESS>line 40, in check
    properties.check_value_in("Implementation-Version", versions)
  File<EMAIL_ADDRESS>line 55, in check_value_in
    raise PropertiesFile.UnexpectedKeyValuesError(key, expected, value)
system.properties_file.UnexpectedKeyValuesError: Expected to have Implementation-Version=any of [None, '<IP_ADDRESS>-SNAPSHOT', '<IP_ADDRESS>-SNAPSHOT', '1.1.1-SNAPSHOT', '1.1.0-SNAPSHOT'], but was '<IP_ADDRESS>'.

We are trying to release 1.1.1 based on 1.1.0 core, and the --snapshot is trying to build on non-exist 1.1.1 core.
Thanks.
To reproduce
./build.sh manifests/1.1.1/opensearch-1.1.1.yml --component job-scheduler --snapshot
Expected behavior
snapshot is disabled for patch releases, or it is building based on the patch core version.
Screenshots
If applicable, add screenshots to help explain your problem.
Host / Environment
No response
Additional context
No response
Relevant log output
No response

[Triage] @peterzhuamazon Could you please update the progress here.

I'm fixing this.

total 8
drwxr-xr-x   3 zhujiaxi  staff    96 Dec  9 17:09 dist
drwxr-xr-x   3 zhujiaxi  staff    96 Dec  9 17:10 libs
-rw-r--r--   1 zhujiaxi  staff  3853 Dec  9 17:10 manifest.yml
drwxr-xr-x  14 zhujiaxi  staff   448 Dec  9 17:10 plugins

Fixed in https://github.com/opensearch-project/opensearch-build/pull/1281


to.be.reverted to not work as expected in your example

Hi, I've used your boilerplate for a personal project, but I found out that VM revert are not caught correctly.
Reproduce steps :
https://github.com/NomicFoundation/hardhat-boilerplate/blob/13bd712c1285b2de572f14d20e6a750ae08565c0/test/Token.js#L101-L103
Remove to.be.revertedWith :
      await expect(
        hardhatToken.connect(addr1).transfer(owner.address, 1)
      );

Test still passes :
✔ Should fail if sender doesn't have enough tokens
Any idea why ?  I found your boilerplate code really useful, too bad I cannot use it
Thanks

If you do await expect(...something...), the promise returned inside the expect will be captured by Chai. If you then don't assert anything on that promise, then the result will be discarded and the test pass.
To check that the transaction indeed fails, remove the expect too:
await hardhatToken.connect(addr1).transfer(owner.address, 1)

Thanks a lot for taking time to answer ! I had misunderstood its behavior


Force Jackson version

It seems that #3579 didn't work :(
See the following Slack thread:
https://testcontainers.slack.com/archives/C1SUBPZK6/p1607967117450100

For people who might find this bug, and aren't on Slack: the (shaded) org.testcontainers.shaded.com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector has references to (non-shaded) com.fasterxml.jackson.annotation.*.
A band-aid for our usecase was to add jackson-annotations:2.9.0 on the test classpath – TestContainers 1.15.1 includes jackson-databind:2.8.8, but the JacksonAnnotationIntrospector references the JsonMerge annotation which wasn't added before 2.9.0 🤔

The non-shaded reference isn't a problem, actually.
The actual issue comes from the fact that Jackson Databind 2.9+ does not work with annotations 2.8 and requires them to be 2.9 or higher.


Alternate CSS for use with grappelli

Not sure how you could package alternate static files for different admin styles... but this is what i use to make it look nicer with grappelli.

from tabbed_admin import TabbedModelAdmin as TabbedModelAdminBase

class TabbedModelAdmin(TabbedModelAdminBase):
    """
    Subclass including some CSS fixes for grappelli.
    """
    class Media:
        css = {
            'all':  ('core/css/tabbed-admin.css',)
        }

.ui-tabs {
    background-color: white;
    border: 0;
    min-width: 960px;
}

.ui-widget textarea,
.ui-widget input,
.ui-widget select {
    font-family: Arial, sans-serif;
}

.ui-widget {
    font-family: Arial, sans-serif;
    font-size: 1em;
}

.ui-tabs .ui-tabs-panel {
    background-color: white;
    padding: 5px 4px 0;
}

.ui-tabs .ui-tabs-anchor {
    font-size: 9pt
}

.ui-widget-content {
    background: none;
}

.ui-tabs .ui-widget-content a {
    color: #309BBF;
}

.ui-tabs .ui-widget-content a:hover {
    color: #444;
}

.ui-tabs .ui-widget-header {
    background-image: linear-gradient(#E5E5E5, #DBDBDB);
}

.ui-tabs .ui-state-default {
    background-image: linear-gradient(#CEE9F2, #E1F0F5);
}

.ui-tabs .ui-state-active {
    background-image: linear-gradient(#CEE9F2, #fff);
    border-color: #BBB;
}

.ui-tabs .ui-state-active a {
    color: #444;
}

Hi Florian,
I am so sorry, I missed this thread. Thanks a million for your contribution, this is really awesome. I have put it by default when grappelli is in INSTALLED_APPS. And released version 0.0.6 from it.
Thansk again, and all my apologies

cool :+1: :smile:


Room - System message for room name change shows "renamed from #B to #B"

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.32-3
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:

Create a room with name A
Go to room header
Go to Settings
Click Room name
Change to name B
Return to room chat

Expected Result:
The system message says "You renamed this room from #nameA to #nameB
Actual Result:
The system message says "You renamed this room from #nameB to #nameB"
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/9b072b6c-feab-419a-aaf8-d2d1dea49185
View all open jobs on GitHub

We think that this bug might be related to #vip-vsp.
CC @quinthar

This isn't reproducible on the latest main

Issue is not reproducible on Production
https://github.com/Expensify/App/assets/78819774/2ab2abd6-00a0-4f94-b813-729813568caf

This issue is related to the backend. This happens when we use staging backend

Can confirm this is a backend issue, working on a fix.

Anyway, not a deploy blocker for NewDot.

@s-alves10 does this only happen on staging backend and not production backend?

PR to fix the backend was merged

Backend fix is deployed to production already.


Use zeroes instead of whitespaces as padding bytes

When generating ids for conflicts, rally uses spaces as padding bytes. I rarely see spaces in ids, so I think this is less realistic than using zeroes? Furthermore Elasticsearch has some optimizations for ids that look like base64 or numeric ids, which get defeated by the usage of spaces.

The following patch should do the trick:
diff --git a/esrally/track/params.py b/esrally/track/params.py
index c7c079a..5f8bb3f 100644
--- a/esrally/track/params.py
+++ b/esrally/track/params.py
@@ -622,7 +622,7 @@ def build_conflicting_ids(conflicts, docs_to_index, offset, shuffle=random.shuff
     all_ids = [0] * docs_to_index
     for i in range(docs_to_index):
         # always consider the offset as each client will index its own range and we don't want uncontrolled conflicts across clients
-        all_ids[i] = "%10d" % (offset + i)
+        all_ids[i] = "%010d" % (offset + i)
     if conflicts == IndexIdConflict.RandomConflicts:
         shuffle(all_ids)
     return all_ids

Changing this makes ids compressed at the Elasticsearch level rather than Lucene. It tends to help because Elaticsearch's level compression does things a bit more efficiently since it doesn't need to preserve ordering (while Lucene needs to for range queries). This means you won't see Lucene's LowercaseAsciiCompression class in the hot classes reported by telemetry.

As a data point, I can index geonames 5% faster (230k docs/s -> 242k docs/s quite consistently) with this change if no fields are indexed in the mapping (enabled=false on the root object mapper), which is likely a best-case scenario for this change.

Thanks for the analysis. I think the id structure is a leftover from the pre-Rally days even. :) This definitely makes sense to change. @drawlerr can you please look into this?


[Docs] MeshModel User Guides

Desired State
User Guide can include:

MeshModel Browser in Settings in Meshery UI
mesheryctl system model commands
Meshery Designer, which allows them to configure components
MeshMap, which allows them to interact with and create designs with components

Contributor Guides and Handbook

📚 Instructions for contributing to documentation

Meshery documentation site and source

🛠 Meshery Build & Release Strategy
🎨 Wireframes and designs for Meshery UI in Figma (open invite)
🙋🏾🙋🏼 Questions: Discussion Forum and Community Slack

@leecalcote I want to work on this issue.   I have a question do I need jekyll since I am working on md file & docs ?

@leecalcote I want to work on this issue. Will you assign me.

Thank you, gents. @parth721, yes, Jekyll use is required.
@Yana-Gupta, see @Boombag0607 if you have questions.

@leecalcote can 2 of us work on this issue?

@Yana-Gupta @parth721 any updates?

@Yana-Gupta @parth721 any updates?

Yes, I am working on it.

@Yana-Gupta @parth721 any updates?
Yes its almost done

@Boombag0607 Before push it on GitHub should show you for a review ? Is it a good idea

@parth721 you can make a Pull Request mentioning this issue, I can review it there.

@Boombag0607 can suggest me push it now or not, there is an issue with heading

@parth721, if the issue is resolved, you can make a PR.


use host networking for filebeat so that the stats have the correct n…

…ode information

[x] Chart version not bumped (the versions are all bumped and released at the same time)
[x] README.md updated with any new values or changes
[x] Updated template tests in ${CHART}/tests/*.py
[ ] Updated integration tests in ${CHART}/examples/*/test/goss.yaml

matches changes I made to metricbeat to get hostnames reporting properly on Digital Ocean

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

jenkins test this please

Hi @pbecotte,
We got an issue with this PR and Filebeat 7.5.0. The fact is that enabling hostNetwork by default fail our tests in 7.5.0 (and even if tests are OK with 7.4.2, we are not in a good state as filebeat reported an error of pod already used but didn't fail).
We also have use cases where hostNetwork is not possible (OpenShift for example).
FYI we'll have to disable hostNetwork by default and allow enabling it in by setting hostNetworking=true.

As I mentioned, I am not an elastic stack expert, so if that's necessary that's great :) It is important to mention though, without these changes nothing actually worked on digital ocean. Everything came up, but the metrics were all using container names as hostnames and none of the server level metrics were aggregating.
Would just ask to check that the metrics all look right with the changed config before making any decisions. The code that the comments implied were supposed to fix that didn't seem to work, and I iterated on it for a while before resorting to this approach.

FYI it HostNetwork was disabled by default in https://github.com/elastic/helm-charts/commit/538af31822d3bbbac93b1a270493b4818a983666. In your case where you need it, you'll just need to set HostNetworking: true in your values.


Refactor and improve get_thread_name

The code is now better structured and readable.
Anytime we fail to read a thread name we now fall back to a Hex ID.
Closes https://github.com/emilk/loguru/issues/157

I tested it and I approve, it's working as expected on Windows. I didn't review the changes in detail though.


Fix/logging print nargs

Closes #580
Very simple fix, basically switching % with , in the logger calls.
I added some tests too!

Tested this locally in Docker using the following (TravisCI isn't running on PRs?)
FROM centos:7
COPY . /usr/local/src/
WORKDIR /usr/local/src
RUN python install.py /usr/local/share/
CMD /usr/local/share/bin/rez/rez-selftest -s bash

# # Alternatively, also include tcsh
# RUN yum install -y tcsh
# CMD /usr/local/share/bin/rez/rez-selftest

then docker build --rm -t local/rez . && docker run --rm -it local/rez


Data type for data

The data type for data sometimes uses any and sometimes uses unknown. In one instance, it uses string | number | boolean | array | object | null. This should be consistent.

Agree.

I think a type definition would be a good idea. This was also recommended by @aeschli in https://github.com/microsoft/language-server-protocol/pull/833#discussion_r335145613.

Fully agree and Martin's proposal makes sense.


Demo for Jens - do not push live

#atcp Modified some stuff

@andyruth : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#label:"aq-pr-triaged"

#hold-off


Added platform querystring

React native was failing with the following error Error validating module options: child "platform" fails because ["platform" is required]

Looks good. Thanks for the update!


What is braket_form?

Hi, Kai-Hsin
I know braket in physics, but i get two different diagram with/without braket_form when I use print_diagram() .

So, my question is that: What is braket_form, and its use?
source code:
#include
#include "cytnx.hpp"
using namespace std;
int main(int argc, char *argv[])
{
cytnx::Bond bd_1(2, cytnx::BD_BRA);
cytnx::Bond bd_2(3, cytnx::BD_BRA);
cytnx::Bond bd_3(5, cytnx::BD_KET);
vector<cytnx::Bond> bds = {bd_1, bd_2, bd_3};

cytnx::UniTensor B;
B.Init(bds, {}, 2);
//cout << B << endl;
B.print_diagram();

cout << "**********************" << endl;

cytnx::Tensor tn = cytnx::arange(30).reshape({2, 3, 5});
//cout << tn << endl;
cytnx::UniTensor C;
C.Init(tn, 2);
C.print_diagram();

return 0;

}

The UniTensor can be tagged or untagged base on the property of Bonds that is pass-in when initialize the UniTensor.

If the Bonds of UniTensor is tag with BD_BRA or BD_KET, we called it tagged UniTensor. On the other hand, if the Bonds of UniTensor are all BD_REG, the UniTensor is un-tagged, which is nothing but a nornal Tensor with additional enhance feature such as "labels", "contract" etc.

This is a little bit different from uni10. In uni10, no BD_REG is provided.
The important concept of difference are:

The BD_REG Bonds (as well as un-tagged UniTensor) are specifically handy in the case where the Network algo. are without symmetry, and the BRA/KET is not so important ( as in uni10 sometimes we just let all the bond to be BD_BRA which is redundant when it comes to the real implementation) .

Bonds from 2 untagged UniTensors can contract as long as the label are match.  HOWEVER, if the Bonds are tagged with BD_BRA / BD_KET, we explicitly defines that the Bond should be in physical Bra/Ket space. Thus, When contract 2 UniTensor, BD_BRA Bond can ONLY contract with BD_KET Bond, as the physical bra-ket operation.

the Rowrank defines the Bonds in left / right. For example, if the UniTensor is rank-5, and Rowrank=2. The first two Bonds will appears in left, and the other 3 Bonds will appears in right.

From 3., Since the BD_KET should physically appears on the left side of UniTensor (as ket should live on the col space), and BD_BRA should physically appears on the right side of UniTensor( as bra should live on the row space). if one permute a BD_KET Bond to the right ( or BD_BRA to the left), it cause the mismatch We called this status as braket_form=False and the Bond that is mismatch will have a star symbol indicating the mismatch.

Now, lets look at your example.
In your UniTensor B, you initialize with tagged Bonds  bd_1 (BD_BRA),  bd_2 (BD_BRA) and bd_3 (BD_KET). So UniTensor B is tagged Tensor.
In your UniTensor C, you initialize a UniTensor from a Tensor tn, so the default behavior for this is that the UniTensor will always be untagged when initialize from a Tensor. The is equivalent as:
cytnx::UniTensor C2({ Bond(2), Bond(3), Bond(5) },{},2);
C2.put_block(tn);


MNT: Adjust to changes in intake

This is the location of RemoteCatalog on the default branch of intake, I suspect it is better to shim it here and make sure the deprecation is noted in intake.

Passes tests against intake master (currently 51b1a183) and intake 0.6.0 locally.

7593462 is either wrong or incomplete.

Reported upstream, as linked above.


Question: using system-wide OCaml (or no OCaml at all)

I want to compile and install a C++ application using opam so I need opam but can skip installing OCaml.
It looks like that OCaml versions specified in yml file are passed in opam switch command directly and I can't say system instead of compiler version. Can you clarify this part of README?

Well, I thought a little bit more and maybe I do not need this action in my case..

There is currently a project called actions-ml to reduce compilation time. The interface is exact same and the setup time is less than one minute. It will be released as an official action soon.
https://github.com/actions-ml/setup-ocaml

Thanks, I will wait your announce on https://discuss.ocaml.org/
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, March 14th, 2021 at 6:53 PM, Sora Morimoto @.***> wrote:

There is currently a project called actions-ml to reduce compilation time. The interface is exact same and the setup time is less than one minute. It will be released as an official action soon.
https://github.com/actions-ml/setup-ocaml
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

You will be able to use the system compiler from v2. But I don't recommend that because it's fast enough with the caching feature.


Joplin (pre-release) 2.10.6 New Note display

Hello,
Ever since installing Joplin (pre-release) 2.10.6, the floating buttons for new note do not display. They are replaced with the normal UI layout. I believe it is because there was a new implementation of the New Note button.
Does anyone know how to fix this?
Thank you

No possible fix?

@Son-Vegitto, I was looking into a fix but my CSS skills are rather limited. I can confirm from my testing, though, that it is because Joplin replaced that part of the UI layout.  In this theme, the selector being used to grab that section prior to the UI refresh was this:
div[height="50"] > div:nth-child(2) {
In the new UI, that div doesn't have a height=50 attribute, so it's never selected.  It does; however, have the .new-note-todo-buttons class where it did not before. So, if someone could figure out how to update from there, it's certainly doable.


Section cut views

DisplayStyleSettings now has a ClipStyle property consisting of:

a boolean indicating whether cut geometry should be produced; and
a CutStyle specifying how the cut geometry should be drawn (ViewFlags, edge symbology, and optional symbology overrides);

The section-cut graphics contain planar polyfaces for solid geometry (closed volumes); and, if edges are enabled for the view, planar line strings for sheets.
When drawing a view that has a clip and a clip style specifying cut graphics should be produced, we augment each design model's tile tree with another tile tree that produces only the cut geometry. The clip vector is encoded in compressed form into the tile tree's Id. During tile selection we trivially cull tiles not intersecting the clipping planes.
Incidentally cleaned up JSON types for clipping-related types (used to be any).
TODO for this PR:

Test with various scenarios (animation, classification, etc etc).

TODO longer-term:

Produce cut graphics for dynamic element graphics (interactive editing).
Address ugly edges produced for cut geometry if original geometry was a polyface.
Generate section-cut geometry for element graphics (interactive editing workflows)
Somehow(?) produce section-cut graphics for geometry that is transformed by a schedule script??
Allow limited symbology overrides of geometry inside or outside the clipping planes

This could only affect line pattern, color, and locatability; maybe an option to discard surfaces (only useful if view has edges enabled). Not hugely useful.

Corresponding native PR.

Closing - wrong target branch.

Is it expected that clip style lines should look like this?

Is it expected that clip style lines should look like this?

@markschlosseratbentley Yes, that keyin is for testing overriding aspects of section-cut graphics symbology.
Here's the code that produces it.

@markschlosseratbentley if your question is about the diagonal edges, that's mentioned in the TODO in PR description.

@markschlosseratbentley if your question is about the diagonal edges, that's mentioned in the TODO in PR description.

Yes, that's what I was referring to - Ah, okay, I see it in the TODO.

Is it expected that clip style lines should look like this?

@markschlosseratbentley Yes, that keyin is for testing overriding aspects of section-cut graphics symbology.
Here's the code that produces it.

Thanks.

I built this and tested it out - it works well for me.

ViewClipModifyTool changes are approved.

@bbastings but you didn't click "Approve".


Remove deprecated components

The deprecated consolidated and distributed KafkaChannel implementations have been removed.
Automatic migration from the consolidated KafkaChannel is provided as part of the eventing-kafka-broker implementation.
The deprecated single tenant KafkaSource implementations has been removed.
Automatic migration from the single tenant KafkaSource implementation is provided as part of the eventing-kafka-broker implementation.

Proposed Changes

Remove channels and st source

Release Note
The deprecated consolidated and distributed `KafkaChannel` implementations have been removed.
Automatic migration from the consolidated `KafkaChannel` is provided as part of the eventing-kafka-broker implementation.

The deprecated single tenant KafkaSource implementations has been removed.
Automatic migration from the single tenant KafkaSource implementation is provided as part of the eventing-kafka-broker implementation.

/cc @matzew @aliok @creydr

Removed the unnecessary jobs in https://github.com/knative/test-infra/pull/3795


Upload a screenshot of the data flow, and embed in README.md

Closing for now as this is foreseen to still change a lot in the near future.


SugarIcon and other enhancements to Vue components

Added:

SugarIcon component with generateIconWithColors() to get the base64 string and colorizeIcon() to set the background (similar to icon.colorize())
Promises in place of callbacks wherever possible.

Updated:

SugarJournal: createEntry() to create a new datastore entry.
SugarL10n: timestampToElapsedString() to convert timestamps to Sugarizer elapsed strings and modified get() method which is no longer dependent on webl10n.
SugarToolbar: Added icon prop which can be used to dynamically set the toolitem icon.
SugarTutorial: Code refactoring and fixing icons.

Nice. Thanks.


on my local 'dev' copy, the navbar includes the links, but the live version no longer does :(

@j6k4m8 please help :(

I changed some things yesterday — didn't look like I affected the nav, but make sure you've pulled the latest. If it's actually gone I'll see what's up


"Răscăeți" is listed in the drop-down menu

Description:
"Răscăeți" is listed in the drop-down menu alongside its corresponding county according to the law
Precondition:
The website is up an running.

Step 1
Type "Răscăeți" in the search bar.

Expected results
The location is listed in the drop-down menu as "Comuna Răscăeți, DÂMBOVIȚA".


PhpdocLineSpan - Allow certain types to be ignored

This feature was requested here: #5886
Basically the new null option values allow you to enforce one or more styles for some types, but not all. You can now have single line PHPDocs enforced for properties and constants, but allow both single and multiline PHPDocs for methods. Without this change you'd be forced to pick a style for every type (or it would default to multi).
It's a non-breaking change, by the way.

Thank you @devfrey.


1.58bitnet - is it {-1,0,1}?

Hi, thank you for providing 1.58bit implementation. Nice work! I looked through many bitnet1.58 implementations and noticed that they all use the method suggested in "The Era from 1-bit LLMs: Training Tips, Code and FAQ". The weights of the models that are currently trained according to this recipe are not numbers in the set {-1, 0, 1} and values in the interval (0,1). Is this the way it should be?

The formula describing the quanztization of weights ("The Era of 1-bit LLMs: All Large Language Models are in 1.58 Bits").
Implementation proposal ("The Era of 1-bit LLMs: Training Tips, Code and FAQ").
Weights quantization test.
Model during training.

Can't speak for the author but the general idea is ternary is better since what's being built is really a directed acyclical knowledge graph. Ternary can be represented in 1.58 bits since you only need 1 bit for 1 and 0 and an additional sign bit on the rare occasion you have a -1.

According to https://github.com/microsoft/unilm/blob/master/bitnet/The-Era-of-1-bit-LLMs__Training_Tips_Code_FAQ.pdf
During training, x and w are scaled, quantized, and then rescaled back to the original scale.
(Probably due to how the straight through estimators are used.)
During inference, rescaling are applied after linear operation. (p.6 fig.4)
Weights are saved in the form of {-1, 0, 1} plus a separate scaling coefficient.


Reusing same pattern in a rule

Here is an example of grammar that I would like to have:
heredoc = "<<<" marker:[\w]+ "\n" text:[\s\S]+ "\n" marker {
    return text.join('');
}

Right now it doesn't work but It would be nice to be able to use marker later in the rule. So I properly parse:
<<<HELLO
1
2
3
HELLO

This is trivially can be implemented by this grammar:
heredoc = "<<<" begin:marker "\n" @$_+ "\n" end:marker (
	&{ return begin === end; }
  / '' { error(`Expected matched marker "${begin}", but marker "${end}" was found`); }
);
_ = (!"\n" .);
marker 'Marker' = $_+;

I do not think that we need a special case for handling such situations unless someone can give reasonable arguments. For example, it can be hard to customize error message. Of course, you can try to make a PR realizing this feature.
Also, remember, that peggy does not use RegExps in their grammar to match symbols, constructions like [\s\S] will not work

This seems to do the job:
heredoc = "<<<" begin:marker "\n" text:$($marker_char+ "\n")+ end:marker (
    &{ return begin === end; }
  / '' { error(`Expected matched marker "${begin}", but marker "${end}" was found`); }
) {
	return {
    	type: 'literal',
        value: text
   };
}
marker_char = (!"\n" .);
marker 'Marker' = $marker_char+;

Here is my playground on Codepen https://codepen.io/jcubic/pen/NWvGmjv it should generate JavaScript code.

This is becoming really complex and not so trivial to create. Maybe it's worth adding something like start:marker ... end:start (or some other syntax) that will allow back-references.

Reference full feature request: https://github.com/pegjs/pegjs/issues/669

That one is different because it was for different rules as array raw data. That one can be solved by using a validator/option.
But here you reference the pattern in the same rule at runtime, the value user uses not the one I've hardcoded in the grammar.

I'm fine with this approach If you don't think it's a good idea to add this feature then you can close.

Let's keep it open a few more days in case someone else thinks it's a great idea and doesn't like the work-around.

@Mingun I again needed to add validation with error (now I fully understand how this works), but I think that your example is not documented. The README don't shows that you can use {} anywhere in the code and that you can use this pattern:
name:(rule / '' { error('xxx') })

Are there any other patterns like this? If yes then they should be documented separately (maybe on Wiki list of useful single rule examples on one page), no one have time to read full grammar to search for patterns that you can use.


docs: zh-CN/docs/user_docs chinese version issue list

The following pages lack Chinese version:

[x] https://kusionstack.io/zh-CN/docs/user_docs/getting-started/usecases/deliver-first-project  #256
[x] https://kusionstack.io/zh-CN/docs/user_docs/getting-started/kusion-ide  #256
[ ] https://kusionstack.io/zh-CN/docs/user_docs/concepts/konfig
[ ] https://kusionstack.io/zh-CN/docs/user_docs/concepts/kusion
[ ] https://kusionstack.io/zh-CN/docs/user_docs/guides/working-with-k8s/service
[ ] https://kusionstack.io/zh-CN/docs/user_docs/guides/working-with-k8s/resource-spec

It seems that many Chinese pages can refer to this book——kusion-in-action-book.

The Chinese version will be removed.


Automated cherry pick of #8114: fix: filter cloudprovider/network by host-schedtag-id

Cherry pick of #8114 on release/3.4.
#8114: fix: filter cloudprovider/network by host-schedtag-id

/lgtm
/approve


Add multiple 'docs' section and the possibility to rename them

Summary
As more or less shown in the original Doks website, could be added the possibility to have multiple 'docs' section, each one with the respective lateral panel submenus? And consequently the possibility to rename the 'docs' sections in arbitrary names?
Basic example
Something similar in the original Doks website where both the Docs and Showcase section have each their own separate submenus.
Motivation
This would greatly improve the structure of very extended websites with a lot of articles.

That's where the create command comes in handy:
https://getdoks.org/docs/overview/commands/#docs-based-tree

That's where the create command comes in handy:
https://getdoks.org/docs/overview/commands/#docs-based-tree

Well, then I apologize for opening this request. I thank you for this beautiful theme.

We are able to create multiple docs sections but the sidebar is not working in the new docs section. Do we have to manually create the sidebar folder and code inside the layouts for the left navigation to work?

See https://github.com/h-enk/doks/discussions/538#discussioncomment-6264981


Calling emit() on an object, only seems to deliver the signal to that object not others connected to the same signal

See attached project. Try running swift TestSignals and notice that if SpinningCube._input() is active, and ListenerNode._input() is commented out, that ListenerNode._on_pressed() never gets called. It also seems to be that if you try to use SpinningCube.pressed from ListenerNode._ready(), without also using the #signal() macro in the ListenerNode class, this will fail to find the signal with this error message:
ERROR: In Object of type 'ListenerNode': Attempt to connect nonexistent signal 'pressed' to callable 'ListenerNode::_on_pressed'.
at: connect (core/object/object.cpp:1282)

HelloSwiftGodotKit.zip

This is behaving as expected, but its understandable why anyone would see it as a bug :/
Godot's signal mechanism connects an instance emitting the signal to another node. This is unusual for a notification pattern which normally allows another object to globally observe a notification/signal without needing to know about the emitting instance.
From the code in the zip file:
@Godot
class ListenerNode: Node {
    #signal("pressed", arguments: ["event" : InputEvent.self])

    @Callable func _on_pressed(event: InputEvent) {
        print("event = \(event)")
    }

    override func _ready() {
        connect(signal: pressedSignal, to: self, method: "_on_pressed")
    }

    override func _input(event: InputEvent) {
        guard event.isPressed() && !event.isEcho() else { return }
        emit(signal: pressedSignal, event)
    }
}

In _ready here, the code is attempting to connect an instance of ListenerNode to a signal which ListenerNode does not emit.
Compared with:
    func addSpinningCube(_ pos: Vector3) {
        let n = SpinningCube()
        n.position = pos
        rootNode.addChild(node: n)
        if !listening {
            n.connect(signal: pressedSignal, to: n, method: "_on_pressed")
            listening = true
        }
    }

This call to connect is correct because it's connecting an instance of SpinningCube.

Yes, I see the error of my ways now. Thanks!


Sample Setup - Sample.js does not exist

@unicodeveloper thanks for checking it up. File has been added and linked. :+1:


Simplify GDVIRTUAL_REQUIRED_CALL calls

Follow-up to #67588
This method is named differently, hence I missed it previously.
Some usages were funny.
https://github.com/godotengine/godot/blob/cd491c6e47bb41ccf596189676c0c5d4a72226cc/scene/resources/style_box.cpp#L51-L55

Thanks!


[Q] How can I configure only see best values on run table?

Hello, thank you for your amazing works.
When I train the model, wandb logger tracks the model performance and update on run table. But I can confirm only latest values from the log.
How can I see best values from logs on run table?
Thank you.

Hello, thank you for your kind answer.
But I wanna to see the best values overall table, not only specified column. With your code, I should update best variables manually.. No way for this?

Hello, thank you for your kind answer.
But I wanna to see the best values overall table, not only specified column. With your code, I should update best variables manually.. No way for this?

@JihwanEom you can programmatically configure metrics to store the max or min value for individual runs with define_metric.  To view the max across all runs in a table just sort by the column or columns you care about.