text:
Unable to get admin rights

Hi again, I think I get all the possible issues with Esky...But for sure, Esky will be soon dead stable :)
I'm trying to get admin rights through the function call app.get_root(). I need them because when my program is installed on the user's computer, the executable files are in the system files/directories. Ex: C:\Program Files.
But app.get_root() causes an exception on both Windows and Linux (I haven't tried yet on OSX).
On Linux:
Traceback (most recent call last):
  File "/home/djipey/informatique/python/ChemBrows/updater.py", line 59, in run
    self.app.get_root()
  File "/usr/lib/python3.5/site-packages/esky/__init__.py", line 312, in get_root
    self.sudo_proxy.start()
  File "/usr/lib/python3.5/site-packages/esky/sudo/__init__.py", line 140, in start
    self.close()
  File "/usr/lib/python3.5/site-packages/esky/sudo/__init__.py", line 156, in close
    self.pipe.read()
  File "/usr/lib/python3.5/site-packages/esky/sudo/sudo_base.py", line 123, in read
    raise EOFError
EOFError

So I modified sudo_base.py to get infos:
        self.check_connection()
        sz = self._read(4)
        print(len(sz))
        print(sz)
        if len(sz) < 4:
            raise EOFError

And when I run my program, I get:
0
b''

So I guess there is a problem with the object SecureStringPipe.
Also, I sometimes have another exception, still on Linux:
Traceback (most recent call last):
  File "/home/djipey/informatique/python/ChemBrows/updater.py", line 59, in run
    self.app.get_root()
  File "/usr/lib/python3.5/site-packages/esky/__init__.py", line 312, in get_root
    self.sudo_proxy.start()
  File "/usr/lib/python3.5/site-packages/esky/sudo/__init__.py", line 136, in start
    msg = self.pipe.read()
  File "/usr/lib/python3.5/site-packages/esky/sudo/sudo_base.py", line 121, in read
    sz = self._read(4)
  File "/usr/lib/python3.5/site-packages/esky/sudo/sudo_unix.py", line 82, in _read
    return os.read(self.rfd,size)
OSError: [Errno 9] Mauvais descripteur de fichier

It randomly appears, but the first one is the main one.
On windows:
  File "C:\Users\djipey\Desktop\ChemBrows_freeze\updater.py", line 59, in run
    self.app.get_root()
  File "C:\Python34\lib\site-packages\esky\__init__.py", line 312, in get_root
    self.sudo_proxy.start()
  File "C:\Python34\lib\site-packages\esky\sudo\__init__.py", line 123, in start
    (self.proc,self.pipe) = spawn_sudo(self)
  File "C:\Python34\lib\site-packages\esky\sudo\__init__.py", line 83, in spawn_sudo
    return _impl.spawn_sudo(proxy)
  File "C:\Python34\lib\site-packages\esky\sudo\sudo_win32.py", line 313, in spawn_sudo
    execinfo.lpVerb = "runas"
TypeError: bytes or integer address expected instead of str instance

it's good we are giving the code base a work out haha. I believe i encountered similar errors when playing around with the function as well. How are you calling it? I haven't touched this code much, maybe ryan will have some pointers when he gets back from his travels at the end of the week.

I'm actually calling it from a PyQt GUI programm, but in a very simple way. It opens a window (gksudo, I guess) to ask for my password.
I realize this cannot work at all.
Looking at the file, I can see the function _read is not implemented yet, and will return None.
So in the read fucntion:
    def read(self):
        """Read the next string from the pipe.

        The expected data format is:  4-byte size, data, signature
        """
        self.check_connection()
        sz = self._read(4)
        if len(sz) < 4:
            raise EOFError
        sz = struct.unpack("I",sz)[0]
        data = self._read(sz)
        if len(data) < sz:
            raise EOFError
        sig = self._read(self._read_hmac.digest_size)
        self._read_hmac.update(data)
        if sig != self._read_hmac.digest():
            self.close()
            raise RuntimeError("mismatched hmac; terminating")
        return data

len(sz) will always be 0, and the function will fail with an EOFError exception.

when running the tests on Linux a window is thrown up asking for a password (this works successfully)

Yes, this part works successfully. But when I press enter in the window, I get the EOFError exception.

hitting enter runs fine for me when executing from test_esky.py , might be worth poking around and see what is happening differntly

How do you run the test ? I would like to try.

on master just do
python2 -m pytest
if esky is able to get root it will prompt you for your password
if u run the program with sudo it won't even need to ask you.

I tried, it runs, all the tests pass, but I'm not asked for a password:
 python2 -m pytest
==================================================================================== test session starts =====================================================================================
platform linux2 -- Python 2.7.10, pytest-2.8.3, py-1.4.31, pluggy-0.3.1
rootdir: /home/djipey/informatique/python/esky, inifile:
collected 38 items

tests/test_esky.py ......................................

================================================================================= 38 passed in 12.02 seconds =================================================================================

im getting 40 tests on my system, run pytests with -v and see what is different
im guessing this is returning false for you...
https://github.com/cloudmatrix/esky/blob/master/esky/tests/test_esky.py#l202
platform linux2 -- Python 2.7.6 -- py-1.4.28 -- pytest-2.7.1 -- /usr/bin/python
rootdir: /home/alfa/Documents/git/esky, inifile:
collecting ... collected 40 items
test_esky.py::TestEsky::test_esky_cxfreeze PASSED
test_esky.py::TestEsky::test_esky_cxfreeze_needsroot PASSED
test_esky.py::TestEsky::test_esky_lock_breaking PASSED
test_esky.py::TestEsky::test_esky_locking PASSED
test_esky.py::TestFSTransact::test_copy_dir PASSED
test_esky.py::TestFSTransact::test_copy_dir_exists PASSED
test_esky.py::TestFSTransact::test_copy_dir_over_file PASSED
test_esky.py::TestFSTransact::test_copy_file PASSED
test_esky.py::TestFSTransact::test_copy_file_over_dir PASSED
test_esky.py::TestFSTransact::test_move_dir PASSED
test_esky.py::TestFSTransact::test_move_dir_exists PASSED
test_esky.py::TestFSTransact::test_move_dir_over_file PASSED
test_esky.py::TestFSTransact::test_move_file PASSED
test_esky.py::TestFSTransact::test_move_file_over_dir PASSED
test_esky.py::TestFSTransact::test_move_file_with_unicode_name PASSED
test_esky.py::TestFSTransact::test_no_move_outside_root PASSED
test_esky.py::TestFSTransact::test_remove PASSED
test_esky.py::TestFSTransact::test_remove_abort PASSED
test_esky.py::TestPatch::test_apply_patch_fail_when_sourcefile_has_been_deleted PASSED
test_esky.py::TestPatch::test_apply_patch_old PASSED
test_esky.py::TestPatch::test_apply_patch_with_filelist PASSED
test_esky.py::TestPatch::test_apply_patch_with_filelist_removal_of_files_not_in_filelist PASSED
test_esky.py::TestPatch::test_copying_multiple_targets_from_a_single_sibling PASSED
test_esky.py::TestPatch::test_diffing_back_and_forth PASSED
test_esky.py::TestPatch::test_patch_bigfile PASSED
test_esky.py::TestPatch_cxbsdiff::test_apply_patch_fail_when_sourcefile_has_been_deleted PASSED
test_esky.py::TestPatch_cxbsdiff::test_apply_patch_old PASSED
test_esky.py::TestPatch_cxbsdiff::test_apply_patch_with_filelist PASSED
test_esky.py::TestPatch_cxbsdiff::test_apply_patch_with_filelist_removal_of_files_not_in_filelist PASSED
test_esky.py::TestPatch_cxbsdiff::test_copying_multiple_targets_from_a_single_sibling PASSED
test_esky.py::TestPatch_cxbsdiff::test_diffing_back_and_forth PASSED
test_esky.py::TestPatch_cxbsdiff::test_patch_bigfile PASSED
test_esky.py::TestPatch_pybsdiff::test_apply_patch_fail_when_sourcefile_has_been_deleted PASSED
test_esky.py::TestPatch_pybsdiff::test_apply_patch_old PASSED
test_esky.py::TestPatch_pybsdiff::test_apply_patch_with_filelist PASSED
test_esky.py::TestPatch_pybsdiff::test_apply_patch_with_filelist_removal_of_files_not_in_filelist PASSED
test_esky.py::TestPatch_pybsdiff::test_copying_multiple_targets_from_a_single_sibling PASSED
test_esky.py::TestPatch_pybsdiff::test_diffing_back_and_forth PASSED
test_esky.py::TestPatch_pybsdiff::test_patch_bigfile PASSED
test_esky.py::TestFilesDiffer::test_files_differ PASSED
========================== 40 passed in 94.47 seconds

Of course, I only have 38 items, and not the ones I want:
 python2 -m pytest -v
==================================================================================== test session starts =====================================================================================
platform linux2 -- Python 2.7.10, pytest-2.8.3, py-1.4.31, pluggy-0.3.1 -- /usr/bin/python2
cachedir: .cache
rootdir: /home/djipey/informatique/python/esky, inifile:
collected 38 items

esky/tests/test_esky.py::TestEsky::test_esky_lock_breaking PASSED
esky/tests/test_esky.py::TestEsky::test_esky_locking PASSED
esky/tests/test_esky.py::TestFSTransact::test_copy_dir PASSED
esky/tests/test_esky.py::TestFSTransact::test_copy_dir_exists PASSED
esky/tests/test_esky.py::TestFSTransact::test_copy_dir_over_file PASSED
esky/tests/test_esky.py::TestFSTransact::test_copy_file PASSED
esky/tests/test_esky.py::TestFSTransact::test_copy_file_over_dir PASSED
esky/tests/test_esky.py::TestFSTransact::test_move_dir PASSED
esky/tests/test_esky.py::TestFSTransact::test_move_dir_exists PASSED
esky/tests/test_esky.py::TestFSTransact::test_move_dir_over_file PASSED
esky/tests/test_esky.py::TestFSTransact::test_move_file PASSED
esky/tests/test_esky.py::TestFSTransact::test_move_file_over_dir PASSED
esky/tests/test_esky.py::TestFSTransact::test_move_file_with_unicode_name PASSED
esky/tests/test_esky.py::TestFSTransact::test_no_move_outside_root PASSED
esky/tests/test_esky.py::TestFSTransact::test_remove PASSED
esky/tests/test_esky.py::TestFSTransact::test_remove_abort PASSED
esky/tests/test_esky.py::TestPatch::test_apply_patch_fail_when_sourcefile_has_been_deleted PASSED
esky/tests/test_esky.py::TestPatch::test_apply_patch_old PASSED
esky/tests/test_esky.py::TestPatch::test_apply_patch_with_filelist PASSED
esky/tests/test_esky.py::TestPatch::test_apply_patch_with_filelist_removal_of_files_not_in_filelist PASSED
esky/tests/test_esky.py::TestPatch::test_copying_multiple_targets_from_a_single_sibling PASSED
esky/tests/test_esky.py::TestPatch::test_diffing_back_and_forth PASSED
esky/tests/test_esky.py::TestPatch::test_patch_bigfile PASSED
esky/tests/test_esky.py::TestPatch_cxbsdiff::test_apply_patch_fail_when_sourcefile_has_been_deleted PASSED
esky/tests/test_esky.py::TestPatch_cxbsdiff::test_apply_patch_old PASSED
esky/tests/test_esky.py::TestPatch_cxbsdiff::test_apply_patch_with_filelist PASSED
esky/tests/test_esky.py::TestPatch_cxbsdiff::test_apply_patch_with_filelist_removal_of_files_not_in_filelist PASSED
esky/tests/test_esky.py::TestPatch_cxbsdiff::test_copying_multiple_targets_from_a_single_sibling PASSED
esky/tests/test_esky.py::TestPatch_cxbsdiff::test_diffing_back_and_forth PASSED
esky/tests/test_esky.py::TestPatch_cxbsdiff::test_patch_bigfile PASSED
esky/tests/test_esky.py::TestPatch_pybsdiff::test_apply_patch_fail_when_sourcefile_has_been_deleted PASSED
esky/tests/test_esky.py::TestPatch_pybsdiff::test_apply_patch_old PASSED
esky/tests/test_esky.py::TestPatch_pybsdiff::test_apply_patch_with_filelist PASSED
esky/tests/test_esky.py::TestPatch_pybsdiff::test_apply_patch_with_filelist_removal_of_files_not_in_filelist PASSED
esky/tests/test_esky.py::TestPatch_pybsdiff::test_copying_multiple_targets_from_a_single_sibling PASSED
esky/tests/test_esky.py::TestPatch_pybsdiff::test_diffing_back_and_forth PASSED
esky/tests/test_esky.py::TestPatch_pybsdiff::test_patch_bigfile PASSED
esky/tests/test_esky.py::TestFilesDiffer::test_files_differ PASSED

================================================================================= 38 passed in 12.73 seconds =================================================================================

aha... so you are also missing
test_esky_cxfreeze
have you got cxfreeze installed on python2?

I hadn't, thanks. Now I have 40 items too.
test_esky_cxfreeze_needsroot fails, as expected:
python2 -m pytest -v
==================================================================================== test session starts =====================================================================================
platform linux2 -- Python 2.7.10, pytest-2.8.3, py-1.4.31, pluggy-0.3.1 -- /usr/bin/python2
cachedir: .cache
rootdir: /home/djipey/informatique/python/esky, inifile:
collected 40 items

esky/tests/test_esky.py::TestEsky::test_esky_cxfreeze_needsroot FAILED

I was asked my password this time. Here is the log for the test:
out.txt

interesting... and if you run it with sudo?

It PASSED

:+1: do you have any idea why it would work on my system and not yours?

Because I'm very lucky ?
Nope, right now I don't have a clue. I'm running Manjaro Linux. And you ? Coud it be possible that my program can still manage the update process on another distribution ?

I'm on Ubuntu 14.10 x86.
Actually i think cxfreeze doesn't bundle any of the c libraries that it used when it compiles, so you will only be able to install and run your app on a computer that has the dlls of the same version as most of the time there are backwards incompatible changes.
https://en.wikipedia.org/wiki/Dependency_hell
it's a big issue on linux, there are no guarantees your app will even work on the next or previous release of the same os you built it on. Might be better to go with source distribution on linux...

Hum I don't know, I applied a fix on sudo_win32 to fix the issue I mentionned at first. Still a bytes thing.
After that, I get the same error on Windows AND on Linux. So the issue is not platform specific.

I actually get (randomly) one of the following exception when I try to use app.get_root()
Traceback (most recent call last):
  File "/home/djipey/informatique/python/ChemBrows/updater.py", line 60, in run
    self.app.get_root()
  File "/usr/lib/python3.5/site-packages/esky/__init__.py", line 312, in get_root
    self.sudo_proxy.start()
  File "/usr/lib/python3.5/site-packages/esky/sudo/__init__.py", line 136, in start
    msg = self.pipe.read()
  File "/usr/lib/python3.5/site-packages/esky/sudo/sudo_base.py", line 121, in read
    sz = self._read(4)
  File "/usr/lib/python3.5/site-packages/esky/sudo/sudo_unix.py", line 83, in _read
    return os.read(self.rfd,size)
TypeError: an integer is required (got type NoneType)

OR
Traceback (most recent call last):
  File "/home/djipey/informatique/python/ChemBrows/updater.py", line 59, in run
    self.app.get_root()
  File "/usr/lib/python3.5/site-packages/esky/__init__.py", line 312, in get_root
    self.sudo_proxy.start()
  File "/usr/lib/python3.5/site-packages/esky/sudo/__init__.py", line 140, in start
    self.close()
  File "/usr/lib/python3.5/site-packages/esky/sudo/__init__.py", line 156, in close
    self.pipe.read()
  File "/usr/lib/python3.5/site-packages/esky/sudo/sudo_base.py", line 123, in read
    raise EOFError
EOFError

OR
Traceback (most recent call last):
  File "/home/djipey/informatique/python/ChemBrows/updater.py", line 60, in run
    self.app.get_root()
  File "/usr/lib/python3.5/site-packages/esky/__init__.py", line 312, in get_root
    self.sudo_proxy.start()
  File "/usr/lib/python3.5/site-packages/esky/sudo/__init__.py", line 140, in start
    self.close()
  File "/usr/lib/python3.5/site-packages/esky/sudo/__init__.py", line 157, in close
    self.pipe.write(b("CLOSE"))
  File "/usr/lib/python3.5/site-packages/esky/sudo/sudo_base.py", line 141, in write
    self._write(struct.pack("I",len(data)))
  File "/usr/lib/python3.5/site-packages/esky/sudo/sudo_unix.py", line 86, in _write
    return os.write(self.wfd,data)
BrokenPipeError: [Errno 32] Relais brisé (pipe)

super @rfk , any idea ?

intersting... i also recieved broken pipe errors when using travis ci which i was unable to fix, i just disabled the tests.. rfk will be busy until the end of the week but nice work!

Ok, I'll try to figure something out by myself until then.
I would say something in SecureStringPipe is closed before self.pipe.read()
But there might are several issues here.

i have never had the issue on my system, on travis server however we receive
  File "/tmp/tmpkF5fDk/scripts/script1.py", line 83, in <module>
  File "/home/travis/build/timeyyy/esky/esky/__init__.py", line 311, in get_root
    self.sudo_proxy.start()
  File "/home/travis/build/timeyyy/esky/esky/sudo/__init__.py", line 140, in start
    self.close()
  File "/home/travis/build/timeyyy/esky/esky/sudo/__init__.py", line 156, in close
    self.pipe.read()
  File "/home/travis/build/timeyyy/esky/esky/sudo/sudo_base.py", line 123, in read
    raise EOFError
EOFError

this is also the same error but we get this error message if we remove print statements from script1.py
  File "/home/travis/build/timeyyy/esky/esky/__init__.py", line 311, in get_root
    self.sudo_proxy.start()
  File "/home/travis/build/timeyyy/esky/esky/sudo/__init__.py", line 125, in start
    raise RuntimeError("sudo helper process terminated unexpectedly")
RuntimeError: sudo helper process terminated unexpectedly

Where does script1.py comes from (can I see it ?) ? And how can a print statement in script1.py change the final exception we get ?

esky/tests/eskytester/script1.py ( this is built into an esky run using subprocess.Popen)
I think the traceback is captured differntly by subprocess.Popen if we print to stdout during execution of the process (i'm not sure though)

ok so the first thing i'm noticing on travis ci is that if i turn the sudo option off for travis ci,
esky.sudo.can_get_root() still returns true even thought we cannot get root.
This gives the eoferror, i also receive the eoferror when sudo is enabled though.
How do i go about starting python with different permissions on my local machine?

Hum I'm not sure I really understand the whole process of Esky getting the sudo rights. But the fact that can_get_root() will always return True is not a problem, is it ? The question is indeed why you don't observe this behaviour on your machine.

i'm not an expert unfortunately. If we can find out how to reproduce the problem on my system i think it will take us a step in the right direction.

32 bit python ? Why ? So you have Ubuntu x86 and windows 7.
You don't have any problem getting root with ubuntu, right ?
What about windows ? What architecture do you run, and do you encounter the problem ?

i was having a hard time installing some libraries in the 64bit :), all my python versions are 32bit,

ok we could be on the right path, i just tested on appveyor and the x64 fails while the x86 works, https://ci.appveyor.com/project/tim83455/esky-vaa8s/build/1.0.88.

Ok, so from what you said:

this is also the same error but we get this error message if we ADD print statements from script1.py

  File "/home/travis/build/timeyyy/esky/esky/__init__.py", line 311, in get_root
    self.sudo_proxy.start()
  File "/home/travis/build/timeyyy/esky/esky/sudo/__init__.py", line 125, in start
    raise RuntimeError("sudo helper process terminated unexpectedly")
RuntimeError: sudo helper process terminated unexpectedly

I looked at l125 of init.py:
    def start(self):
        (self.proc,self.pipe) = spawn_sudo(self)
        if self.proc.poll() is not None:
            raise RuntimeError("sudo helper process terminated unexpectedly")

so left.proc is not operational. proc is returned by the spawn_sudo function of the sudo_* files.
Here is the one of sudo_unix.py:
def spawn_sudo(proxy):
    """Spawn the sudo slave process, returning proc and a pipe to message it."""
    rnul = open(os.devnull,"r")
    wnul = open(os.devnull,"w")
    pipe = SecureStringPipe()
    c_pipe = pipe.connect()
    if not getattr(sys,"frozen",False):
        exe = [sys.executable,"-c","import esky; esky.run_startup_hooks()"]
    elif os.path.basename(sys.executable).lower() in ("python","pythonw"):
        exe = [sys.executable,"-c","import esky; esky.run_startup_hooks()"]
    else:
        if not esky._startup_hooks_were_run:
            raise OSError(None,"unable to sudo: startup hooks not run")
        exe = [sys.executable]
    args = ["--esky-spawn-sudo"]
    args.append(base.b64pickle(proxy))
    # Look for a variety of sudo-like programs
    sudo = None
    display_name = "%s update" % (proxy.name,)
    if "DISPLAY" in os.environ:
        sudo = find_exe("gksudo","-k","-D",display_name,"--")
        if sudo is None:
            sudo = find_exe("kdesudo")
        if sudo is None:
            sudo = find_exe("cocoasudo","--prompt='%s'" % (display_name,))
    if sudo is None:
        sudo = find_exe("sudo")
    if sudo is None:
        sudo = []
    # Make it a slave process so it dies if we die
    exe = sudo + exe + esky.slaveproc.get_slave_process_args() + args
    # Pass the pipe in environment vars, they seem to be harder to snoop.
    env = os.environ.copy()
    env["ESKY_SUDO_PIPE"] = base.b64pickle(c_pipe)
    # Spawn the subprocess
    kwds = dict(stdin=rnul,stdout=wnul,stderr=wnul,close_fds=True,env=env)
    proc = KillablePopen(exe,**kwds)
    return (proc,pipe)

The bug is somewhere in this function (I think).

I'm investigating as hell:
I commented 2 lines in sudo_base.py:
    def read(self):
        """Read the next string from the pipe.

        The expected data format is:  4-byte size, data, signature
        """
        self.check_connection()
        sz = self._read(4)
        # if len(sz) < 4:
            # raise EOFError

To get rid of the EOFError and get more info:
File "/home/djipey/informatique/python/esky/esky/sudo/sudo_base.py", line 125, in read
    sz = struct.unpack("I",sz)[0]
struct.error: unpack requires a string argument of length 4

But be careful, the error doesn't actually come from sudo_base.py (the file containing the parent class), but from sudo_unix.py.
Looking at sudo_unix.py:
    def _read(self,size):
        print(self.rfd)
        print(size)
        print(os.read(self.rfd, size))
        return os.read(self.rfd,size)

And I get:
14
4
and an empty string !
Shouldn't os.read return something ?

on my working system i get
13
4
and and empty string

On the system that gives the EOFError ? (I mean, the one with 32bit libs ?)

How is it possible ?? It should crash with:
        sz = self._read(4)
        # if len(sz) < 4:
            # raise EOFError
        sz = struct.unpack("I",sz)[0]
        data = self._read(sz)

in sudo_linux.py. Your variable sz is empty if _read returns an empty string.

All tests run fun on my 32bit system, this is the system im talking about

That's very strange. Could you check the value of sz after sz = self._read(4) in sudo_linux.py please ?

For future us and whoever will read this:
The problem (for now) seems to come from from the file descriptor. It seems I can not get the right value.
While (most of the time) I get self.rfd = 14, tim gets 13.

I think we really need @rfk , we didn't move much for a while.

Digging through old commits..
i found testing older commits than this kept locking up ( something this commit fixes),
commit 3bd459b909a8a5007d069c5f4a59d00c91120e48
Author: Ryan Kelly <ryan@rfk.id.au>
Date:   Mon Sep 5 10:47:03 2011 +1000

    esky.sudo: monitor helper process to avoid deadlock if it dies

we are still seeings the same behavior

random error messages
works on x86 python2
fails on x64 python2

Thanks for reaching out.  Unfortunately this project is no longer actively maintained, so I'm going to move it into archive mode:
https://rfk.id.au/blog/entry/archiving-open-source-projects/

authors: JPFrancoia rfk timeyyy

repo: cloudmatrix/esky


text:
fix: updating resizing status if resize is pending

Closes #134

/test

/ok-to-merge

While writing the release notes, I could not figure out why we are doing this. Are we sure we want to ship this in the next patch release? This is our last chance to revert it.

We thought this change was needed but no longer do. This can be reverted.

Also we don't have any E2E tests written for this. It seems a bit lame to me to proceed. I'd rather postpone this when we have a clearer idea about why we need this and what we need to do to test it works. Do you agree?

Yes, this can be reverted. Unfortunately the underlying context is not clear here too.

source: gharchive/pull-request

authors: gbartolini jlong49 leonardoce mnencia sxd

repo: cloudnative-pg/cloudnative-pg

license_type: permissive

license_source: github-api


text:
チャットのパフォーマンスについて調査/修正

https://github.com/cloudnativedaysjp/dreamkast/pull/1013 でチャットを FIFO キューで処理するようにしたがポーリングに時間がかかっているようで自分のローカルでは反映まで数秒かかっている(キューは SQS を使用)
FIFOキューから標準キューに切り替えると即時反映されていることを確認した。
キュー自体の config で解消できるか/本当にこれが問題の真因なのかを調査する必要がありそう

このテストに使用したキューは  https://sqs.ap-northeast-1.amazonaws.com/$aws_account/test と https://sqs.ap-northeast-1.amazonaws.com/$aws_account/dreamkast-devFifoQueue.fifo です

FIFO キューはリアルタイムを要求するユースケースには不向きとのことで将来的には移行が必要になりそう（これについては一旦議論済み）。
この問題は表面的には配信遅延時間を 0 秒に設定することで回避できそうです。
ただ遅延時間０秒の設定の副作用については引き続き調査します。
高負荷テストができればというのはありますね。

配信遅延時間についてはアプリケーション/コンシューマの制御などを考慮するためのオプションであるためこれを0秒に設定することによる懸念の発生などはなさそう

source: gharchive/issue

repo: cloudnativedaysjp/dreamkast

license: MIT


text:
CFPエントリー時のプライバシーポリシー文言の変更

青山さん経由で、エントリー時に威圧感がある（登壇者にセミナーなどの営業メールを送るよという印象）との指摘。
実際は、エントリーだけではリストには含まれないので、文言をもっと柔らかく実情に即したものに変更した方が良いかも知れない。
インプレスと相談の上、文言を検討。

「登壇者にCFPを登録してもらうページ」に書いてあるこの文言って、このセッションのタイトルとかを、宣伝メールに使うよってことですかね？
それとも登壇者にセミナーなどの営業メールを送るよって意味ですかね？
後者的な文言にとらえて微妙な感情を持ってる人もいるっぽかったので、少し変えても良いでした。

文言作成→Contentsチームに確認→インプレスさん（法務）確認→実装依頼へ

@nabemasat これって急ぎではないと思うんですがずっと残っててもまた忘れそうなので、やれるときに確認して貰っていいですか

@ito-taka @miyana0907  こちらの内容で登壇者向けプライバシーポリシーを改正したいと思います。法務部への確認について連携できれば幸いです。
（旧）登壇者向け 個人情報保護方針(プライバシーポリシー)
ご登録いただきました個人情報は、イベントの運営会社である株式会社インプレスが管理し、電話/電子メール/郵送等による、各種サービスやセミナー開催情報などの情報提供に利用させて頂きます。インプレス社の詳しいプライバシーポリシーに関しましてはこちらをご覧下さい。
↓
（案）登壇者向け 個人情報保護方針(プライバシーポリシー)
ご登録いただきました個人情報は、イベントの運営会社である株式会社インプレスが管理し、電子メール/SNSによる、本イベントの準備に必要なご連絡にのみ利用させていただきます。インプレス社の詳しいプライバシーポリシーに関しましてはこちらをご覧下さい。

@jacopen お待たせしました。下記の文言でFIXしましたので、CNDT2022CFP時に反映をお願いできますか。
文面：
個人情報の取り扱いについて

ご登録いただきました個人情報は、本イベントの運営会社である株式会社インプレスが管理し、
電子メールまたはSNSのメッセージ機能により、本イベントご登壇に関する選考結果
その他のご連絡・お問合せ対応の目的のために利用させていただきます。
上記をあらかじめご同意の上、ご登録をお願いいたします。

▼以下、法務からのコメント
今回はインプレスが単体で管理し目的も連絡のみかと思いますので、インプレスのプライバシーポリシーへのリンクは省略しております。また「登壇者向け 個人情報保護方針(プライバシーポリシー)」というタイトルについては、全体のプライバシーポリシーと混同する可能性もあるため、単に「個人情報の取り扱いについて」という文言に変更しております。

authors: jacopen nabemasat


text:
当前Cloud Native线上虚拟峰会主页中的合作伙伴栏缺少云原生社区

问题描述：
当前云原生社区跟CNCF有合作，会作为Cloud Native合作伙伴，在Cloud Native官网https://cncf.lfasiallc.cn/#也应该会有展示。
但点开网站后，合作伙伴这里缺少云原生社区的图标，需要跟进下。（当前该活动的一些其他准备活动也需要跟进）

这个 @Matthew-Dong 正在跟进。

已和 CNCF 侧交流，计划于 7/6 更新

done

已经增加

同时再公告下，今日云原生社区成为了CSDI Summit（中国软件研发管理行业技术峰会）的媒体合作伙伴。

authors: Matthew-Dong Miss-you rootsongjc

repo: cloudnativeto/community


text:
Renamed access token

what

Renamed access token

why

More consistent naming

references

Dupe of #338

repo: cloudposse/build-harness

license_source: bigquery


text:
fixing enabled flag

what

Fixing resource creation when enabled flag is = false

why

Some resources were still created even when the enabled flag was false

/test all

/rebuild-readme

/test all

/test all

/test all


text:
Add Support for Application Version Label

Hello, gents.
I've taken your module for one of my projects, it made him work perfectly. Create all needed resources. But it didn't deploy any code to created environment. I bring small fix that helps me to deploy code.

I'm ready to make any code style changes. Today it's the first day with terraform for me and your modules help me for a rapid start.

Thanks @velmoga ! I'll have @aknysh take a look. Also, have a look at this repo for an advanced reference architecture using CodeBuild/CodePipeline for CI/CD:
https://github.com/cloudposse/terraform-aws-jenkins

@osterman thanks for fast reply. I've fixed code format. Waiting for review.

@velmoga
thank you for testing and submitting the PR.
just a few questions to confirm (since you are testing it now, and the doc does not say anything specific https://www.terraform.io/docs/providers/aws/r/elastic_beanstalk_environment.html#version_label):

Do you need to always provide a value for var.version_label or it could be empty?
If left empty, will it deploy the latest version?

thanks

var.version_label can be an empty string. It defined as default value.
In this case elastic beanstalk deploy clean environment with demo page.

Your AWS Elastic Beanstalk PHP application is now running on your own dedicated environment in the AWS Cloud

You are running PHP version 7.1.13```

Something like this.

Also I use your rds module to deploy database and they can't work together with beanstalk module.
https://github.com/velmoga/terraform-aws-rds/commit/597510d74eac4afbe2f511e3c1cb03de8bf592c0
They have same security group name. I made fix, but it doesn't looks great to contribute it.

authors: aknysh osterman velmoga


text:
engine_type seems to support only ActiveMQ

Found a bug? Maybe our Slack Community can help.

Describe the Bug
Documentation states that engine_type can be ActiveMQ or RabbitMQ. Despite that, creation of the resource with engine_type = "RabbitMQ" fails. I can see that at the time of writing (2021-03-08), this module uses aws_mq_broker under the hood, which does not support RabbitMQ yet (see https://github.com/hashicorp/terraform-provider-aws/pull/16108). Probably this is just documentation issue, but if there is a way to spin up aws RabbitMQ broker, please advise. Thanks in advance!
Expected Behavior
Successful creation of the resource
Steps to Reproduce
Steps to reproduce the behavior:

Create resource using module:

module "mq_broker" {
  source = "cloudposse/mq-broker/aws"
  namespace                    = "ns"
  stage                        = "test"
  name                         = "rabbit"
  apply_immediately            = true
  auto_minor_version_upgrade   = true
  deployment_mode              = "SINGLE_INSTANCE"
  engine_type                  = "RabbitMQ"
  engine_version               = "3.8.6"
  host_instance_type           = "mq.t3.micro"
  publicly_accessible          = true
  general_log_enabled          = true
  audit_log_enabled            = true
  use_existing_security_groups = true
  existing_security_groups     = [aws_security_group.my.id]
  encryption_enabled           = false
  use_aws_owned_key            = false
  vpc_id                       = data.aws_vpc.my_vpc.id
  subnet_ids                   = data.aws_subnet_ids.my_vpc.ids
  mq_application_user          = data.aws_ssm_parameter.app_login.value
  mq_application_password      = data.aws_ssm_parameter.app_password.value
  mq_admin_user                = data.aws_ssm_parameter.admin_login.value
  mq_admin_password            = data.aws_ssm_parameter.admin_password.value
}

Run terraform apply
Enter yes
See error

Error: expected engine_type to be one of [ACTIVEMQ], got RabbitMQ

  on .terraform/modules/mq_broker/main.tf line 71, in resource "aws_mq_broker" "default":
  71:   engine_type                = var.engine_type

Screenshots
If applicable, add screenshots or logs to help explain your problem.
Environment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:

OSX 11.2.1
terraform --version

terraform --version
Terraform v0.14.7
+ provider registry.terraform.io/hashicorp/aws v3.31.0
+ provider registry.terraform.io/hashicorp/null v3.1.0
+ provider registry.terraform.io/hashicorp/random v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0

Additional Context

This is due to the terrafor-aws-provider 3.31.0 not including the changes to add the rabbitMQ broker. Here is the RD that adds rabbitmq to the provider and has been earmarked for the 3.32.0 release.

@leigh507 @leriel are you gents still seeing this with 3.32.0? Seems we are good to close this one out with the release of 3.32, but want to confirm before doing so.

authors: Gowiem leigh507 leriel

repo: cloudposse/terraform-aws-mq-broker


text:
Test settings

what

why

references

/terratest

repo: cloudposse/terraform-example-module


text:
Update versions.tf to support tf .14

Adds support for Terraform 0..14 (currently in beta2)
I've currently got it pinned to  < 0.14.1 to be conservative. Can update to < 0.15 or similar.
what

Bumps versions.tf to support terraform 0.14

why

I make extensive use of this label module (it's an amazing contribution to the TF ecosystem. Thank you!)
I am currently running into an unrelated issue w/ TF 0.13. The proposed workaround for that unrelated issue does not work for me at this time.
The solution is to use tf 0.14 which is in beta, now.

references
Fixes https://github.com/cloudposse/terraform-null-label/issues/104

Thanks for the super fast turn around!
Glad to see you're no longer using ceilings for versions. i'll have an updated commit in a moment.

/rebuild-readme

/test all

@aknysh Any changes to null-label should include an update to context.tf to use the new version and its new functionality (if any).

authors: Nuru aknysh kiddom-kq

repo: cloudposse/terraform-null-label


text:
GSD Request

--- GSD JSON ---
{
  "vendor_name": "Linux",
  "product_name": "Kernel",
  "product_version": "versions from v5.6 to before v5.15.11",
  "vulnerability_type": "unspecified",
  "affected_component": "unspecified",
  "attack_vector": "unspecified",
  "impact": "unspecified",
  "credit": "",
  "references": [
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cf7da0d66cc1a2a19fc5930bb746ffbb2d4cd1be",
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c26ac0ea3a91c210cf90452e625dc441adf3e549"
  ],
  "extended_references": [
    {
      "type": "commit",
      "value": "cf7da0d66cc1a2a19fc5930bb746ffbb2d4cd1be",
      "note": "introduced"
    },
    {
      "type": "commit",
      "value": "c26ac0ea3a91c210cf90452e625dc441adf3e549",
      "note": "fixed"
    }
  ],
  "reporter": "joshbressers",
  "reporter_id": 1692786,
  "notes": "",
  "description": "mptcp: clear 'kern' flag from fallback sockets\n\nThis is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven.\nThis ID is fixed in Linux Kernel version v5.15.11 by commit c26ac0ea3a91c210cf90452e625dc441adf3e549, it was introduced in version v5.6 by commit cf7da0d66cc1a2a19fc5930bb746ffbb2d4cd1be. For more details please see the references link."
}
--- GSD JSON ---

This issue has been assigned GSD-2021-1002746

repo: cloudsecurityalliance/gsd-database


text:
UVI Request

--- UVI JSON ---
{
  "vendor_name": "Linux",
  "product_name": "Kernel",
  "product_version": "versions from  to before v4.9.290",
  "vulnerability_type": "unspecified",
  "affected_component": "unspecified",
  "attack_vector": "unspecified",
  "impact": "unspecified",
  "credit": "",
  "references": [
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8e4814a461787e15a31d322d9efbe0d4f6822428"
  ],
  "extended_references": [
    {
      "type": "commit",
      "value": "8e4814a461787e15a31d322d9efbe0d4f6822428",
      "note": "fixed"
    }
  ],
  "reporter": "joshbressers",
  "reporter_id": 1692786,
  "notes": "",
  "description": "scsi: core: Put LLD module refcnt after SCSI device is released\n\nThis is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven.\nThis ID is fixed in Linux Kernel version v4.9.290 by commit 8e4814a461787e15a31d322d9efbe0d4f6822428. For more details please see the references link."
}
--- UVI JSON ---

This issue has been assigned UVI-2021-1001946

repo: cloudsecurityalliance/uvi-database


text:
UVI Request

--- UVI JSON ---
{
  "vendor_name": "Linux",
  "product_name": "Kernel",
  "product_version": "versions from v4.20 to before v5.4.136",
  "vulnerability_type": "unspecified",
  "affected_component": "unspecified",
  "attack_vector": "unspecified",
  "impact": "unspecified",
  "credit": "",
  "references": [
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=13b5b7fd6a4a96dffe604f25e7b64cfbd9520924",
    "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a9508e0edfe369ac95d0825bcdca976436ce780f"
  ],
  "extended_references": [
    {
      "type": "commit",
      "value": "13b5b7fd6a4a96dffe604f25e7b64cfbd9520924",
      "note": "introduced"
    },
    {
      "type": "commit",
      "value": "a9508e0edfe369ac95d0825bcdca976436ce780f",
      "note": "fixed"
    }
  ],
  "reporter": "joshbressers",
  "reporter_id": 1692786,
  "notes": "",
  "description": "igc: Fix use-after-free error during reset\n\nThis is an automated ID intended to aid in discovery of potential security vulnerabilities. The actual impact and attack plausibility have not yet been proven.\nThis ID is fixed in Linux Kernel version v5.4.136 by commit a9508e0edfe369ac95d0825bcdca976436ce780f, it was introduced in version v4.20 by commit 13b5b7fd6a4a96dffe604f25e7b64cfbd9520924. For more details please see the references link."
}
--- UVI JSON ---

This issue has been assigned UVI-2021-1001316


text:
Configuration for continuation prompt (like PS2 or PROMPT2 in some shells)

Sometimes, we want to reuse queries by copy-and-paste, but multi-line prompts make it harder.
spanner> SELECT *
      -> FROM Singers
      -> WHERE SingerId = 1;

It is harder to reuse than indentation like
spanner> SELECT *
         FROM Singers
         WHERE SingerId = 1;

Currently, the prompt string for continuous line is hard coded.
https://github.com/cloudspannerecosystem/spanner-cli/blob/v0.10.4/cli.go#L353
It would be nice to have configuration like PROMPT2  in some shells or bool flag (--only-indent-multiline?).

I have implemented the prototype.

Sorry for the delayed comment.
The reason why I chose -> for the multiline prompt is just because it's used in mysql command. There is no any other good reason for that.
I have used spanner-cli and experienced several times that the current prompt (->) is hard to use for copy/paste, so I'm not hesitate to change it.
Do you have any good example we should keep using -> as a prompt? If not, I think we can just remove it.

I'm not confident enough to say that prompt2 is harmful.
It can be more useful in interactive query writing if it can display current processing information.
e.g. %_ of zsh PROMPT2
$ ls '
quote> ' "
dquote> " `
bquote> ` (
> ps ) $(
cmdsubst> ls )

It seems psql has similar functionality(%R)
https://www.postgresql.org/docs/current/app-psql.html#APP-PSQL-PROMPTING

In prompt 2 %R is replaced by a character that depends on why psql expects more input: - if the command simply wasn't terminated yet, but * if there is an unfinished /* ... */ comment, a single quote if there is an unfinished quoted string, a double quote if there is an unfinished quoted identifier, a dollar sign if there is an unfinished dollar-quoted string, or ( if there is an unmatched left parenthesis.

Thank you for sharing the reference, but still I'm not sure if it's really useful or not.
I checked this blog article about Prompt2 usage for Postgres, but I feel it's more complicated and hard to understand what that prompt means.
Excerpt from the article:

[local] gabe@my_database=# SELECT
[more] - > '
[more] ' > name
[more] ' > '
[more] - > FROM users;

Of course, it depends on the prompt the user sets, but instead of letting the user to choose the prompt, I want to provide the best option that's useful for most of the use cases.
In that sense I still lean toward the option that removes the prompt at all.

Maybe we can 1) change the default prompt2 as an empty string and 2) provide the command line option to allow users to change the prompt2.
But I'm wondering how many users will use that command line option.

I checked this blog article about Prompt2 usage for Postgres, but I feel it's more complicated and hard to understand what that prompt means.

I think the example of that article is not practical because multiline string literals are not popular in regular SQL queries.
Personally speaking, mismatched parentheses in subqueries is a daily problem.
sqlite have similar functionality in continuation prompt.
sqlite> SELECT '
'  ...> 1' FROM (
(x1...> SELECT 2
(x1...> )
   ...> ;

After investigating, I think parser status in continuation prompt is common and useful feature in SQL interactive shells in ideal, but it is not low hanging fruits.
I'm worried that removing the continuation prompt completely in default will confuse users because they won't know if they're still in the middle of typing.
So I think that adding --prompt2 option is a conservative choice.

Currently, the statement separator (gsqlsep) only considers quotes and comments, so some change is required to show if they are inside parentheses.

I have come to the following thought:

Without the ability to show parser status, there is no particular reason to customize the continuation prompt string.
People who care about copy-and-paste will probably use ~/.spanner_cli.cnf to default the continuation prompt to just whitespace.
Given the conventions of interactive shells, it would be nice for users to see the continuation prompt (->) by default.

So I think spanner-cli needs a boolean flag to set the continuation prompt to whitespace.
Typical use case:

no_prompt2 = true in .spanner_cli.cnf
marely used --no-prompt2=false to override  setting in spanner_cli.cnf

I suspect that feedback on issues is biased towards only heavy users.
I think we need to go back to why continuation prompts exist as a convention.
I don't yet do deep research about retionale of PROMPT2, but I think this question is an example of the need for continuation prompts for novice users.
https://stackoverflow.com/questions/19710968/sqlite3-prompting-instead-of-sqlite
Novice users (and sometimes I) can forget to input terminating semicolon(;).
Without a continuation prompt, a novice user would not aware that spanner-cli was continuing to read and wait for something.
spanner> SELECT 1

                 broken?
                 ^C

spanner> SELECT 1
             ->
             -> (What is wanted? Let me see...)

I found that PostgreSQL ML contains a similar topic.
https://www.postgresql.org/message-id/5467.1304089798@sss.pgh.pa.us

MySQL document also have many sentence about the prompt.
https://dev.mysql.com/doc/refman/8.4/en/entering-queries.html

I understand it's not a good idea to remove the continuation prompt by default as it confuses users when the terminating semicolon is not entered.
Given that removing the continuation prompt likely confuses users (even heavy users as well), I feel it's not also a good idea to provide the option to remove the continuation prompt.
If there is a situation when a user wants to copy the multi-line query itself, it can be accomplished by looking back the query history (Ctrl-P or ↑ key) and get the folded single-line query. It's not a perfect solution as it cannot copy the query result together, but I think it can be used as a workable solution.

I'm glad to agree abount the default continuation prompt.

Given that removing the continuation prompt likely confuses users (even heavy users as well), I feel it's not also a good idea to provide the option to remove the continuation prompt.

I feel that prompt2 in ini file can be "Shooting Yourself in the Foot", but it is useful in some situation and it is not strange to have conguration like that.

If there is a situation when a user wants to copy the multi-line query itself, it can be accomplished by looking back the query history (Ctrl-P or ↑ key) and get the folded single-line query. It's not a perfect solution as it cannot copy the query result together, but I think it can be used as a workable solution.

Currently, line edit history only get a single line of a past query.
If it will be changed to get a folded query, non-trivial problem is happened if newline have some meaning like:

comments
quoted string or literals

It's afraid that it silently changes the meaning of a query.
I feel it is more serious problem than copy-and-paste.

I feel that prompt2 in ini file can be "Shooting Yourself in the Foot", but it is useful in some situation and it is not strange to have conguration like that.

Yes, it's not strange to have that option, but the only concern I have is it likely becomes "yet another" option that might be used by only a few users in a limited situation, and we have to keep maintaining it.
Of course we already have many optional options (10 options) and I'm struggling to keep the balance for what we should add/shouldn't add to keep the tool simple.

It's afraid that it silently changes the meaning of a query. I feel it is more serious problem than copy-and-paste.

I think it's not so serious because I don't think many people enter comments or multi-line literals in an interactive way. If it's really serious, we have to change even the current implementation with stopping showing the query history when multi-line query is used, but I haven't heard of such issue yet.

One random idea to avoid adding a new option is making a new prompt variable in --prompt option that disables the continuous prompt.
For example, when a user specify --prompt='spanner-cli\t>\c' (\c indicates disabling the continuous prompt, for example), it stops showing the continuous prompt.
The downside is that it's not intuitive, but given that it might be used by only a few (heavy) users in a limited situation, that might be acceptable.
It's just a random thought though.

Yes, it's not strange to have that option, but the only concern I have is it likely becomes "yet another" option that might be used by only a few users in a limited situation, and we have to keep maintaining it.
Of course we already have many optional options (10 options) in spanner-cli and I'm struggling to keep the balance for what we should add/shouldn't add to keep the tool simple.

I think it may be a problem to keep --help simple.
This can be partially resolved by making prompt2 an option that can only be specified in the ini file and not from the command line.
Prompt2      *string `ini-name:"prompt2" description:"Set the prompt2 to the specified format"`

psql's PROMPT2 is not a command line option, it is a variable can be set:

\set PROMPT2 value in .psqlrc (can be set interactively)
--variable=PROMPT2=value

I think it's not so serious because I don't think many people enter comments or multi-line literals in an interactive way. If it's really serious, we have to change even the current implementation with stopping showing the query history when multi-line query is used, but I haven't heard of such issue yet.

I think this is a related but independent problem to prompt2,
multi-line editing and multi-line history problem.

Users often executes written queries, which may have comments, in interactive tool.

Even when the -f and --file= flags are appropriate.

If the history is executable, users expects this meaning must not be changed.
The Executable history will be a target of reedit and reuse.

Current history implementation shows every unexecutable line flagment for multi-line queries.
This is noise in the history, but it's not dangerous.
My thought:

Current behavior(show every line history)

I feels it is unnoying but not dangerous.

Show multi-line query as folded single line.

I am doubting it is dangerous in some situation.

Stop to show history of multi-line query.

I think It is safe and better than current behavior.
Sometimes history-back doesn't show the previous query.

This behavior may surprise users.

Natively support multi-line editing with history.

I think it would be ideal, but a high hanging fruit because of a lack of implementation.
chzyer/readline and fork(ergochat/readline) doesn't implement https://github.com/chzyer/readline/issues/212
hymkor/go-multiline-ny seems to support multi-line editing, but it can't save and restore history.

One random idea to avoid adding a new option is making a new prompt variable in --prompt option that disables the continuous prompt.

It is a possible implementation.
If the ini only option is acceptable, I think it is no reason to extend prompt to disable the continuous prompt.
I'm a bit curious to know how much users are using the --prompt command line option rather than the prompt setting in .spanner_cli.cnf.

Random thought
To avoid the explosion of command line options, it may be time to introduce the concept of general variables.

This can be partially resolved by making prompt2 an option that can only be specified in the ini file and not from the command line.

It's better than providing nothing, so +1 on this change as an initial implementation.

I'm glad we agreed on the prompt2 ini option choice.
I have noticed there are some design choices about prompt2 indentation.

Align to PROMPT1 width in default
No default alignment

Current behavior is 1 in all situation, but there is a corner case.
If prompt is long, simple query can reach line end easily.
Assumes prompt = "[\\p:\\i:\\d]\\t> ".

I am doubting if the default padding is useful.
It is not bad without padding.

Proposed behavior

No default padding.
The default prompt2 value is "      -> ", it is the string of the same length as the default prompt spanner>  .
It is a room to add psql style padding %w(whitespaces of the same length as the prompt), or more magical left padding.

My thoughts about the prompt alignment are

The main use case for disabling prompt 2 is making it easy to copy & paste the multi-line query, so default alignment is not needed if the prompt2 is set with empty string ("").
For other use cases (mainly for default users), the readability is more important and I think it's more readable if the multi-line query is aligned with default alignment (i.e. keep current behavior).

For other use cases (mainly for default users), the readability is more important and I think it's more readable if the multi-line query is aligned with default alignment (i.e. keep current behavior).

I assume that readability can be compromised when the prompt is long.
Consider the case where project, instance and database have reached their maximum length.
Project ID: 30 characters
Instance ID: 60 characters
Database ID: 30 characters
If spanner-cli always right align continuation prompt to first prompt line, \p\i\d produces 120 characters, and there is very little room to write a query.

User modify prompt not to use prompt variables.

Current possible workaround
Information provided by prompt variables is useful to avoid operation mistake, so it is not ideal.

Use modify prompt2 to ``

A possible solution for your expected behavior without modifying prompt.
Continuation prompt is useful as discussed, so it is not ideal.

Support multi-line prompt and right align to the last line.

It doesn't answer general long prompt, but it may be nice for user want many information in prompt.

Never align prompt2

It won't satisfy your expectation.

Let user choose the alignment

It makes prompt2 more complicated, but I expect it can satisfy all users expectation.
I think it is similar to the spec discussed in pgsql-hackers

Define it as "difference between PROMPT1's width and the total width
of non-%w elements in this prompt".

FYI: I can't found other implementation which support prompt configuration and default alignment.
psql
postgres=# \set PROMPT1 veryyyyyyyyyyyyyyylooooooooooooooooooonnnng=#
veryyyyyyyyyyyyyyylooooooooooooooooooonnnng=#SELECT 1
postgres-#
postgres-#
postgres-# ;

sqlite
sqlite> .prompt veryyyyyyyyyyyyyyylooooooooooooooooooonnnng>
veryyyyyyyyyyyyyyySELECT 1
   ...>
   ...>
   ...> ;

mysql: It doesn't support prompt configuration.

Maybe "readability" was not good word. Let me rephrase it.
spanner-cli is an interactive CLI, so I assume that users write multi-line query in real time. When user writes multi-line query from the first line to the second line, if the prompt is not aligned, the user has to move their eyes back and forth to check whole query. This process continues until the whole query is constructed. This is apparently not good for usability.
I think the example in the last reply is the edge case and doesn't reflect the real use case. If it's difficult to write a multi-line query with prompt alignment due to short space, the same is true for the single-line query. So I guess that nobody use such a long project/instance/database names or long prompt.
Anyway, instead of having a bike-shedding discussion around an edge case, let's focus on solving the core issue we have discussed - unable to copy/paste multi-line query. To achieve that, what we have discussed are:

Allow users to disable continuous prompt in ini file as prompt2 variable.
No extra space for continuous prompt if user sets an empty string to prompt2 so that multi-line query is easy to be copied.

OK, we should talk about a concrete solution.

Allow users to disable continuous prompt in ini file as prompt2 variable.

Add prompt2(string) and no_prompt2_alignment(bool) ini option.
The default is prompt2="-> " and no_prompt2_alignment=false to continue current behavior.
If user want to disable default alignment, no_prompt2_alignment=true will be set.

I think it is a possible solution for all personas. What do you think?

I want to fork some problem to another issue.

I think the example in the last reply is the edge case and doesn't reflect the real use case. If it's difficult to write a multi-line query with prompt alignment due to short space, the same is true for the single-line query. So I guess that nobody use such a long project/instance/database names or long prompt.

I guess it is simply because prompt configuration with prompt variables is a rarely used feature.
I have seen many project/instance/database ids which are same pattern like {company}-{service}-{environment} by convention.
I believe prompt variables are helpful feature, and if some users don't use this feature to avoid longer prompt, newlines in prompt will solve this problem.
#186

I don't know if we've reached an agreement.
My proposal

Add prompt2(string) and no_prompt2_alignment(bool) ini option.
The default is prompt2="-> " and no_prompt2_alignment=false to continue current behavior.
If user want to disable the default alignment, no_prompt2_alignment=true will be set.

Sorry for the delayed response.
As I commented at https://github.com/cloudspannerecosystem/spanner-cli/issues/183#issuecomment-2332818121, I don't think we need to allow users to customize the prompt alignment.
Also my proposal at that comment was providing prompt2 variable, but more direct option to disable the prompt2 would be user-friendly as there is no useful use case to change the prompt2 string.
So my updated suggestion is:

Allow users to disable continuous prompt in ini file with no_prompt2 option.
No extra space for continuous prompt if user sets no_prompt2, so that multi-line query is easy to be copied.

Since there seems to be no consensus on implementing prompt2 again, I don't think there is any need to discuss customizing prompt2 any further.
I'll use my own build with my patchset if it is needed.
I have no -1 to your suggestion as an official feature for spanner-cli.

authors: apstndb yfuruyama

repo: cloudspannerecosystem/spanner-cli


text:
get_feature() for redis should return feature_key

Description

get_feature() in redis_container_crawler.py and redis_host_crawler.py should return 'feature_key' ('redis') and not 'feature_type' ('application'), as in the nginx plugin.
How to Reproduce

Log Output

Debugging Commands Output

Output of docker version:
(paste your output here)

Output of docker info:
(paste your output here)

Output of python --version:
(paste your output here)

Output of pip freeze:
(paste your output here)

Please confirm @tatsuhirochiba

OK, I understand. I will fix it asap.

repo: cloudviz/agentless-system-crawler


text:
fix(hz): handler middleware name

What type of PR is this?

fix
Check the PR title.

[ ] This PR title match the format: <type>(optional scope): <description>
[ ] The description of this PR title is user-oriented and clear enough for others to understand.

(Optional) Translate the PR title into Chinese.
修复生成的 handler 中间件命名的问题
(Optional) More detail description for this PR(en: English/zh: Chinese).

en: Fix the problem of naming the generated handler middleware
zh(optional): 修复生成的 handler 中间件命名的问题
背景：
形如 "a/b" & "a/b/c" 这种路由的定义，生成的代码如下:
root := r.Group("/", rootMw()...)
{
_a := root.Group("/a", _aMw()...)
_a.GET("/b", append(_bMw(), hertz.Method1)...)
_b := _a.Group("/b", _bMw()...)
_b.POST("/c", append(_method2Mw(), hertz.Method2)...)
}

可以看到_a.GET("/b", append(_bMw(), hertz.Method1)...)和_b := _a.Group("/b", _bMw()...)共用了同一个 middleware 函数。产生问题的原因是没有严格区分 "group middleware" 和 "handler middleware" 的命名方式，导致生产的代码共用了同一个中间件函数。
预期生成的代码为：
root := r.Group("/", rootMw()...)
{
_a := root.Group("/a", _aMw()...)
_a.GET("/b", append(_method1Mw(), hertz.Method1)...)
_b := _a.Group("/b", _bMw()...)
_b.POST("/c", append(_method2Mw(), hertz.Method2)...)
}

是否有break：
如果有类似的路由注册，会多生成一个中间件，需要用户本身注意下是否需要增加修改中间件的内容
Which issue(s) this PR fixes:

_a := root.Group("/a", _aMw()...)
如果是这样的命名风格，实际上如果有注册/a/a/c的场景，就变成：
_a := _a.Group("/a", _aMw()...)
_a.POST("/c", append(_method2Mw(), hertz.Method2)...)
了？

_a := root.Group("/a", _aMw()...) 如果是这样的命名风格，实际上如果有注册/a/a/c的场景，就变成： _a := _a.Group("/a", _aMw()...) _a.POST("/c", append(_method2Mw(), hertz.Method2)...) 了？

这里解了命名冲突，会生成如下：
root := r.Group("/", rootMw()...)
{
_a := root.Group("/a", _aMw()...)
{
	_a0 := _a.Group("/a", _a0Mw()...)
	_a0.GET("/b", append(_method1Mw(), hertz.Method1)...)
}
}

authors: FGYFFFF welkeyever

repo: cloudwego/hertz


text:
F-score on CORD dataset

Thanks for the excellent work! I am trying to reproduce the result on CORD dataset. However, I find the f-score results in your paper are somewhat different from that in LayoutLMv2 paper. Specifically, LayoutLMv2*-base achieves 96.05 and LayoutLMv2*-large achieves 97.24 in your paper. While in LayoutLMv2 paper, LayoutLMv2-base achieves 94.95 and LayoutLMv2-large achieves 96.01. Could you give an example of BROS fine-tuning on CORD dataset? Thanks!

Thank you for your interest in our work!
The scores can be different because the fine-tuning script of LayoutLMv2* is our own implementation and the fine-tuning settings (e.g. batch size, # training steps) of LayoutLMv2 are unknown.
You can conduct fine-tuning experiments by preprocessing the CORD dataset similarly to the datasets in this repo.

repo: clovaai/bros


text:
Question regarding dataset downloading

Dear authors,
I am new to this VoxCeleb dataset and have trouble downloading the videos from the scripts given. I follow the instructions in the Data Preparation section but only get the audio part of the dataset. May I ask how I can download the videos (in .mp4 or .m4v format maybe) containing both visual and audio parts? Thanks in advance.
Regards

Hey @itsmag11
I found this helpful - https://github.com/kaneelgit/msi_voxceleb/blob/main/video_classification_2d.ipynb

Thanks @padiarushi3012 !
I found the test set downloading command from the post you gave. For anyone who also have the same problem, I post the command here for easy reference:
!wget "https://thor.robots.ox.ac.uk/~vgg/data/voxceleb/vox1a/vox2_test_mp4.zip"
Moreover, I found the dataset page provided by the author which is much clearer than that hosted on the https://www.robots.ox.ac.uk/ website. The link is here. Everything related to downloading the dataset should be clear on this page.
Then I'll close the issue.

Hi @itsmag11 ,
Thanks for the response, and I've fetched the username and password via the form. Turns out they are sending the exact same username and password pairs (I got the same pair as this thread posted in Apr 2021 https://github.com/clovaai/voxceleb_trainer/issues/117#issue-933475286). My rerunning prep_data.py still gave me the 404 issues, looks like their internal issues on the dataset maintenance.
Regarding the mirror page you shared, it looks much clear and well-organised. Big thanks! I'm playing with the verification data and the data can be downloaded with the given username and password pair. I'll probably manually download my interested data.
Again, thanks a lot. Have a nice day.

@Mercurise Not a problem.
And for the downloading issue, I just thought of that I have changed all urls of files in lists/fileparts.txt from http://www.robots.ox.ac.uk/ to http://thor.robots.ox.ac.uk/  following someone's solution somewhere. Hope it solves your problem.


text:
add context to predictor http requests

What type of PR is this?
kind/enhancement
What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

Codecov Report

Merging #701 (3bfa44e) into main (e2ffa5f) will increase coverage by 0.47%.
The diff coverage is n/a.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##             main     #701      +/-   ##
==========================================
+ Coverage   13.60%   14.07%   +0.47%
==========================================
  Files          66       72       +6
  Lines        7492     7923     +431
==========================================
+ Hits         1019     1115      +96
- Misses       6391     6724     +333
- Partials       82       84       +2

see 43 files with indirect coverage changes

authors: codecov-commenter dixudx

repo: clusternet/clusternet


text:
Week 3

Input
Name
Luka Bronius
Class
Tech 2 - 211
Repo link
https://github.com/GittyHoo/NewLifePets
Summary
This week I finally managed to do quite some work with my backend teacher, Janno. He sat down with me and helped me get my code in order. He also helped me with creating a server and connecting that server with my code/website. I was totally blown away by how hard backend and frontend can be in the first few weeks, which made me feel very stressed and demotivated, but because of the help that I got from Janno, I start to feel motivated again. I still don't understand a lot of things, but I'm slowly getting there.
Resources used
This week I did quite some research as to how to re-create a swiping feature, like in tinder. For this I used the following youtube tutorials:

https://www.youtube.com/watch?v=9yLxmbICrTM
https://www.youtube.com/watch?v=5bxFSOA5JYo&t=157s
https://www.youtube.com/watch?v=W6NZfCO5SIk, I haven't watched this tutorial yet, but it's a beginner's guide to javascript.
the following link is also a tutorial I still need to watch: https://www.youtube.com/watch?v=pyySPJeRvSo

Any thoughts?
I do think that there should be more classes for the people that are really REALLY new to javascript. This is no shade to the teachers, as they really try to make us understand js/html/css, but I'd like to have some more live-coding with very very simple javascript, where they explain (almost) every element and every move. But I guess this is the: self-studying part, which can be hard when you don't even understand what to (re)search.

Hi Luka. I'm happy to see you've been working. I understand that there's a need for more live-coding and guidance, but that's part of development; it's primarily self-studying. Don't forget to make use of the channels in MS Teams!

authors: GittyHoo sjagoori


text:
add github sponsors?

@cmdruid please, allow the community to send donations to support an incredible project

Thank you for your kind offer to donate!
I looked into Github Sponsors, and it seems to involve adding a bank account and going through KYC. Unfortunately I don't want to do any of that.
I will take bitcoin though, please feel free to donate sats here:
bitcoin : bitcoin:bc1qnx8julmud2vqdqngxw9rmuv3js67kq9rzvtmm5
lnurl   : lnurl:cmd@stacker.news
Also if there's a better way to add donations to this project without having to KYC, let me know.

authors: cmdruid lucasnuic

repo: cmdruid/tapscript


text:
Fix #884, remove code repetition in ProcessNormalization and AsymPow

Dear All. This PR fixes #884. Unfortunately I could not figure out a proper place for new logKappa function, so I created a new file for it. If there is a better place for it, please do not hesitate to tell me.
The code compiles without any problems but some test fail after running pytest via conda in test/ directory:
========================================================================== test session starts ==========================================================================
platform linux -- Python 3.8.0, pytest-8.2.2, pluggy-1.5.0
rootdir: /home/pitkajuh/bin/HiggsAnalysis/CombinedLimit/test
plugins: anyio-4.4.0
collected 0 items / 8 errors

================================================================================ ERRORS =================================================================================
________________________________________________________________ ERROR collecting validation/test_AS.py _________________________________________________________________
validation/test_AS.py:13: in <module>
    datacardGlob("simple-counting/counting-B5p5-Obs[16]*.txt"),
validation/TestClasses.py:439: in datacardGlob
    base = os.environ["CMSSW_BASE"] + "/src/HiggsAnalysis/CombinedLimit/data/benchmarks/"
../../../../anaconda3/envs/combine/lib/python3.8/os.py:673: in __getitem__
    raise KeyError(key) from None
E   KeyError: 'CMSSW_BASE'
________________________________________________________________ ERROR collecting validation/test_BS.py _________________________________________________________________
validation/test_BS.py:13: in <module>
    datacardGlob("simple-counting/counting-B5p5-Obs[16]*.txt"),
validation/TestClasses.py:439: in datacardGlob
    base = os.environ["CMSSW_BASE"] + "/src/HiggsAnalysis/CombinedLimit/data/benchmarks/"
../../../../anaconda3/envs/combine/lib/python3.8/os.py:673: in __getitem__
    raise KeyError(key) from None
E   KeyError: 'CMSSW_BASE'
________________________________________________________________ ERROR collecting validation/test_BT.py _________________________________________________________________
validation/test_BT.py:15: in <module>
    datacardGlob("simple-counting/counting-B5p5-Obs[16]*.txt"),
validation/TestClasses.py:439: in datacardGlob
    base = os.environ["CMSSW_BASE"] + "/src/HiggsAnalysis/CombinedLimit/data/benchmarks/"
../../../../anaconda3/envs/combine/lib/python3.8/os.py:673: in __getitem__
    raise KeyError(key) from None
E   KeyError: 'CMSSW_BASE'
________________________________________________________________ ERROR collecting validation/test_FC.py _________________________________________________________________
validation/test_FC.py:13: in <module>
    datacardGlob("simple-counting/counting-B5p5-Obs[16]*-Syst30U.txt"),
validation/TestClasses.py:439: in datacardGlob
    base = os.environ["CMSSW_BASE"] + "/src/HiggsAnalysis/CombinedLimit/data/benchmarks/"
../../../../anaconda3/envs/combine/lib/python3.8/os.py:673: in __getitem__
    raise KeyError(key) from None
E   KeyError: 'CMSSW_BASE'
________________________________________________________________ ERROR collecting validation/test_HN.py _________________________________________________________________
validation/test_HN.py:261: in <module>
    datacardGlob("simple-counting/counting-B5p5-Obs[16]*-S*[Uy].txt"),
validation/TestClasses.py:439: in datacardGlob
    base = os.environ["CMSSW_BASE"] + "/src/HiggsAnalysis/CombinedLimit/data/benchmarks/"
../../../../anaconda3/envs/combine/lib/python3.8/os.py:673: in __getitem__
    raise KeyError(key) from None
E   KeyError: 'CMSSW_BASE'
_______________________________________________________________ ERROR collecting validation/test_MCMC.py ________________________________________________________________
validation/test_MCMC.py:13: in <module>
    datacardGlob("simple-counting/counting-B5p5-Obs6*.txt"),
validation/TestClasses.py:439: in datacardGlob
    base = os.environ["CMSSW_BASE"] + "/src/HiggsAnalysis/CombinedLimit/data/benchmarks/"
../../../../anaconda3/envs/combine/lib/python3.8/os.py:673: in __getitem__
    raise KeyError(key) from None
E   KeyError: 'CMSSW_BASE'
________________________________________________________________ ERROR collecting validation/test_PLC.py ________________________________________________________________
validation/test_PLC.py:13: in <module>
    datacardGlob("simple-counting/counting-B5p5-Obs[16]*.txt"),
validation/TestClasses.py:439: in datacardGlob
    base = os.environ["CMSSW_BASE"] + "/src/HiggsAnalysis/CombinedLimit/data/benchmarks/"
../../../../anaconda3/envs/combine/lib/python3.8/os.py:673: in __getitem__
    raise KeyError(key) from None
E   KeyError: 'CMSSW_BASE'
________________________________________________________________ ERROR collecting validation/test_htt.py ________________________________________________________________
validation/test_htt.py:17: in <module>
    datacardGlob("htt/125/htt_*_8TeV.txt"),
validation/TestClasses.py:439: in datacardGlob
    base = os.environ["CMSSW_BASE"] + "/src/HiggsAnalysis/CombinedLimit/data/benchmarks/"
../../../../anaconda3/envs/combine/lib/python3.8/os.py:673: in __getitem__
    raise KeyError(key) from None
E   KeyError: 'CMSSW_BASE'
======================================================================== short test summary info ========================================================================
ERROR validation/test_AS.py - KeyError: 'CMSSW_BASE'
ERROR validation/test_BS.py - KeyError: 'CMSSW_BASE'
ERROR validation/test_BT.py - KeyError: 'CMSSW_BASE'
ERROR validation/test_FC.py - KeyError: 'CMSSW_BASE'
ERROR validation/test_HN.py - KeyError: 'CMSSW_BASE'
ERROR validation/test_MCMC.py - KeyError: 'CMSSW_BASE'
ERROR validation/test_PLC.py - KeyError: 'CMSSW_BASE'
ERROR validation/test_htt.py - KeyError: 'CMSSW_BASE'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 8 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================================== 8 errors in 24.11s ===========================================================================

I am not sure if these errors have anything to do with the edits I made. I ran the tests by executing pytest command in test/ directory. I don't know if this is the proper way to run the tests. I did not find any information how to run tests. Can anyone provide any insight on this?

It seems that the files I edited had unnecessary white spaces. My text editor automatically removes them. Is this ok?

Very nice initiative!
About the place to put your function: I would create a new file to collect these free math functions, just like we do in RooFit:
https://github.com/root-project/root/blob/master/roofit/roofitcore/inc/RooFit/Detail/MathFuncs.h#L86
Mabye CombineMathFuncs.h. Then we can also put other repeated code there.

authors: guitargeek pitkajuh


text:
Adding ceiling function

Added the ceiling function code, including the alias for CEIL and CEILING, in addition to a SQL test and a unit test for the utility function. Ceiling function has support for type Decimal, Integer, Big/Small/Tiny/Integer.

Coverage decreased (-0.01%) to 75.046% when pulling 034d1193d0c9693d7c7e09644079cb479c10202f on selwyni:master into b117a8aa4315daf8a222f79607f0389278ddce84 on cmu-db:master.

Coverage decreased (-75.05%) to 0.0% when pulling e2e876c3854cba5cfdb599180125861d57509eae on selwyni:master into 6f65f44c4cd9c45f05aa344ed8696186cc2deab6 on cmu-db:master.

Coverage decreased (-75.05%) to 0.0% when pulling 67337d1c13556dbf8b7c4081841149c9313c047a on selwyni:master into 6f65f44c4cd9c45f05aa344ed8696186cc2deab6 on cmu-db:master.

Coverage decreased (-0.08%) to 74.978% when pulling 67337d1c13556dbf8b7c4081841149c9313c047a on selwyni:master into 6f65f44c4cd9c45f05aa344ed8696186cc2deab6 on cmu-db:master.

Coverage decreased (-0.08%) to 74.975% when pulling 67337d1c13556dbf8b7c4081841149c9313c047a on selwyni:master into 6f65f44c4cd9c45f05aa344ed8696186cc2deab6 on cmu-db:master.

@saatviks Your PR seems to now contain commits from other PRs. You may to merge your changes into a clean branch.

@apavlo I'm sorry I dont understand. My PR #889 is already merged. This is another team's PR.

Coverage decreased (-0.08%) to 74.975% when pulling 1c1f95660f2536e277fefcfa4a0b1f34eaf54161 on selwyni:master into e309a32a1ba08a422670717c61e8d2b0e35fd007 on cmu-db:master.

Coverage increased (+0.1%) to 75.173% when pulling 3c64f160d383cef3b535fc2fae7a4448e1201812 on selwyni:master into e309a32a1ba08a422670717c61e8d2b0e35fd007 on cmu-db:master.

What is the status of this PR?

Ready to merge

Not yet, it has to be reviewed.

I'll get on it, my bad

Coverage decreased (-0.02%) to 75.069% when pulling f61536f0407528d0978f31860f62851b885158b2 on selwyni:master into d9d120bb451c9bd4d7fb3993fef47c5c5cba06ab on cmu-db:master.

Coverage increased (+0.05%) to 75.138% when pulling 95f6447aeb18dcaa2e2821580ae94a6841a9574f on selwyni:master into d9d120bb451c9bd4d7fb3993fef47c5c5cba06ab on cmu-db:master.

Coverage increased (+0.2%) to 75.302% when pulling 02f093f0d162f0fd2ce2f28835e605403e8b0775 on selwyni:master into d9d120bb451c9bd4d7fb3993fef47c5c5cba06ab on cmu-db:master.

Coverage increased (+0.2%) to 75.298% when pulling 02f093f0d162f0fd2ce2f28835e605403e8b0775 on selwyni:master into d9d120bb451c9bd4d7fb3993fef47c5c5cba06ab on cmu-db:master.

Coverage increased (+0.2%) to 75.305% when pulling 02f093f0d162f0fd2ce2f28835e605403e8b0775 on selwyni:master into d9d120bb451c9bd4d7fb3993fef47c5c5cba06ab on cmu-db:master.

Coverage increased (+0.2%) to 75.279% when pulling 02f093f0d162f0fd2ce2f28835e605403e8b0775 on selwyni:master into d9d120bb451c9bd4d7fb3993fef47c5c5cba06ab on cmu-db:master.

@selwyni I cleaned up the code a little bit. Can you run clang-format on the files you've changed here?

Coverage increased (+0.2%) to 75.287% when pulling 1ef63fb62f0fa94a97cde961d8728e785a00c0f9 on selwyni:master into d9d120bb451c9bd4d7fb3993fef47c5c5cba06ab on cmu-db:master.

Coverage decreased (-0.1%) to 75.281% when pulling aab4fc7320afff975b37e023f57c2ec5d8c674c8 on selwyni:master into c8b6b93371f76ba2b9c7bd692e1450c186bd8ef9 on cmu-db:master.

Coverage decreased (-0.08%) to 75.3% when pulling 272f1e6206eea4070582f0a0e9e14587133aeeb6 on selwyni:master into bbcf739c0508550f55ab8242c9e83e579238bb67 on cmu-db:master.

Coverage decreased (-75.4%) to 0.0% when pulling fd933c07bc4fa84d2c047826d83185c0c91f44ce on selwyni:master into 6de9e1533cfa32be651733afdff502e7e36c4d11 on cmu-db:master.

@selwyni It seems like the build failed because there are conflicts you haven't resolved (e.g. in decimal_type.cpp).

Coverage decreased (-0.07%) to 75.348% when pulling 0f0a1670803ccac10dfab007e400926af301d207 on selwyni:master into 6de9e1533cfa32be651733afdff502e7e36c4d11 on cmu-db:master.

The ceil test was not passed. Could you look into that? @selwyni
59: [ RUN      ] DecimalFunctionsSQLTest.CeilTest
59: 2017-12-08 00:45:21 [test/sql/testing_sql_util.cpp:58:ExecuteSQLQuery] INFO  - Query: select id, ceil(income) from foo;
59: decimal_functions_sql_test: /home/travis/build/cmu-db/peloton/src/catalog/proc_catalog.cpp:129: std::unique_ptr<peloton::catalog::ProcCatalogObject> peloton::catalog::ProcCatalog::GetProcByName(const string&, const std::vector<peloton::type::TypeId>&, peloton::concurrency::Transaction*) const: Assertion `((*result_tiles)[0]->GetTupleCount() <= 1)' failed.

Coverage decreased (-0.07%) to 75.844% when pulling 9384bd4e03fb5647af3ecd9a4fed37688d1a4708 on selwyni:master into b9f1e4339746fc3caca9907b364af30e21ea311a on cmu-db:master.

I will merge this after the build passeds.

Coverage decreased (-0.08%) to 75.859% when pulling a9eb618c4023ae504ff4b762972a6316bf30be8b on selwyni:master into 6641f022210166b250ab34f4b765cb4a22960aa1 on cmu-db:master.

@selwyni Can you rebase?

Coverage decreased (-0.09%) to 75.852% when pulling a625071ddffab6423eea0e365115562374dd72a0 on selwyni:master into 6641f022210166b250ab34f4b765cb4a22960aa1 on cmu-db:master.

authors: apavlo coveralls hzxa21 pmenon saatviks selwyni

repo: cmu-db/peloton


text:
feat: mobile survey toc on medium devices

closes #729
Prerequisites:

[x] Unless it is a hotfix it should be merged against the dev branch
[x] Branch is up-to-date with the branch to be merged with, i.e. dev
[x] Build is successful
[x] Code is cleaned up and formatted

Summary

Awesome, thanks @sgratzl - LGTM :)

Awesome, thanks @sgratzl - LGTM :)

authors: Letsgohyde sgratzl

repo: cmu-delphi/www-covidcast


text:
Add a GOVERNANCE file

It describes what is the role of maintainers and how one can become maintainer.

PTAL @radu-matei and @carolynvs  🙏

This is the same governance document as the spec repo.
There is also a governance document in the community repo.
If we want to make changes, I would like for the various governance documents for projects to be consistent (and ideally in the same place?)

community is a good place to put template documents

Rebased onto master

I agree with @radu-matei that if we change something to the governance then it should be at the organization level. And I agree too with @carolynvs that we should change the process because we don't respect it strictly in practice. We should add this point to the agenda of the next community meeting 👍

Bullet point added on the agenda.

authors: carolynvs radu-matei silvin-lubecki

repo: cnabio/cnab-to-oci


text:
Update ISSUE_TEMPLATE.md

Pre-submission checklist:
Please check each of these after submitting your pull request:

[ ] Are you only including a repo_url if your project is 100% open source? If so, you need to pick the single best GitHub repository for your project, not a GitHub organization.
[ ] Is your project closed source or, if it is open source, does your project have at least 250 GitHub stars?
[x] Have you picked the single best (existing) category for your project?
[ ] Does it follow the other guidelines from the new entries section?
[ ] Have you included a URL for your SVG or added it to hosted_logos and referenced it there?
[ ] Does your logo clearly state the name of the project/product and follow the other logo guidelines?
[ ] Does your project/product name match the text on the logo?
[ ] Have you verified that the Crunchbase data for your organization is correct (including headquarters and LinkedIn)?
[ ] ~10 minutes after opening the pull request, the CNCF-Bot will post the URL for your staging server. Have you confirmed that it looks good to you and then added a comment to the PR saying "LGTM"?

Deploy preview for landscape ready!
Built with commit 045f4b2474d3a575e493f5cf072fcf4f6c4d3f20
https://deploy-preview-948--landscape.netlify.com

repo: cncf/landscape


text:
making operator frameworks guidelines clearer

@OmerKahani @thschue - do you think this is clearer?

@nolar @thschue @OmerKahani - are you happy with the changes to the questions?

Yes, looks good to me. Thanks. But I cannot approve or resolve anything anyway.

authors: Jenniferstrej nolar

repo: cncf/sig-app-delivery


text:
Linking to stdc++fs.lib fails

I tried building my project with nana with latest commit (commit ffa170b5f560dbf899030bdeb0e539aa95b0364) and was unable to do so beacuse of linkage error:
LNK1104	cannot open file 'stdc++fs.lib'
I am using Visual Studio 15 2017 version 15.9.11.

There is not a stdc++fs file in Visual Studio. Please remove the linker option.

Yes, I did that already. My point is why CMake generates project with such linker option in the first place.

Okay so my question is do we really need to link stdc++fs explicitly in file select_filesystem.cmake? We already define target_compile_features(nana PUBLIC cxx_std_17) in CMakeLists.txt so is it really necessary? This linking part breaks my builds on Windows.
https://github.com/cnjinhao/nana/blob/39c3f85627571e9d3420781787a576ce8e300ac1/build/cmake/select_filesystem.cmake#L46
https://github.com/cnjinhao/nana/blob/39c3f85627571e9d3420781787a576ce8e300ac1/CMakeLists.txt#L33

Yes since you can have C++17 enabled without using std::filesystem on g++.
And I think clang doesn't need the linker line too.
This is one rare case where checking against the compiler is a viable method:
https://stackoverflow.com/a/50173063

@5cript Thank you for answering. Indeed in order to use std::filesystem with GCC stdc++fs needs to be linked explicitly. I found out that in newest GCC release (9.1) it is not longer required to do that but yeah I suppose we still want to be able to build nana on older versions. Anyway I am going to add PR with changes so that stdc++fs is only linked on GNU using systems.

Solved by https://github.com/cnjinhao/nana/pull/494

repo: cnjinhao/nana


text:
Parse name and version from dependency string

Tag #171
PEP-compliant strings for dependencies have versions/version bounds in them. We just need to grab that and throw it in a data structure like PythonPackage.

Tag #212

Let me know the skills required for this.

I got this and I want to work on this .Consider me for this issue and assign me please.

Hi! In PEP621 there's some information about how a dependency string should look. This would be adding to huak::package::python something like
fn package_parts_from_string(string: &str) -> (name, Option<op>, Option<version>) {}
```

I started this below (but need to rename the function to `package_parts_from_string`.

https://github.com/cnpryer/huak/blob/39f3db3a08f0e08b582348823655f6e18cd9180c/src/huak/package/python.rs#L44-L48

I'd start with a test like

```rs
#[test]
    fn string_from_parts() {
        let (name, version, ans) = ("test", "0.0.0", "test==0.0.0");
        let op: Option<&str> = None;
        let string = "test==0.0.0";

        let res = packate_parts_from_string(string);

        assert_eq!(res1, (name, version, answer);
    }
```
This may not be a complete snippet, but hopefully illustrates the point.

Let me know if you need any help!

I will share the progress by tomorrow.
Thanks

Sorry sir, I have tried understanding it, but not able to pull it off. Pardon me for wasting your time.

I'll take a look at this 😁, don't assign to me just yet

Sorry sir, I have tried understanding it, but not able to pull it off. Pardon me for wasting your time. I even am not sure do I have to make changes to the myproject.ml file or somewhere else.

No worries! Thanks for giving it a shot!

repo: cnpryer/huak


text:
Multiple keywords should parse for 'all' not 'any'

Problem
Currently if you run something like
log-cli sample.log --keywords "[info]" "module1"

It will return wherever any of the keywords are found. As a user I'd expect to get where both keywords are found in the same line.
Solution
Set default to by 'all'. Can add flag in the future for --any.

See #39 for follow up.

repo: cnpryer/log-cli


text:
Doc updates for /health?ready=1

Need to mention in rolling upgrade docs and in load balancer instructions in deployment tutorials.

@a-robinson, @bdarnell, just double-checking here: Should I emphasize the new ready=1 endpoint in instructions for configuring health checks for load balancers? For example: https://www.cockroachlabs.com/docs/dev/deploy-cockroachdb-on-aws.html#step-4-set-up-load-balancing

Yes, it's the most preferred load balancer health check. We've switched cockroach gen haproxy to use it as the default haproxy health check .

@a-robinson, I'd like your input on how to update the rolling upgrade docs to feature health?ready=1. Not sure exactly where to call that out. http://www.cockroachlabs.com/docs/dev/upgrade-cockroach-version.html#step-2-prepare-to-upgrade

If we have a central documentation page around setting up / using a load balancer with us, I'd suggest just including it there and linking to that page. If we don't, it'd be nice to add one :)
But if we don't have such a page, in the short term I think we could change the paragraph to say:

Make sure your cluster is behind a load balancer that uses CockroachDB's readiness health check, or your clients are configured to talk to multiple nodes. If your application communicates with a single node, stopping that node to upgrade its CockroachDB binary will cause your application to fail.

Also, maybe it's just me but it always confuses me that monitoring-and-alerting.html is listed under the "Deploy" heading while all the other monitoring-related pages are under the "Manage" heading.

Add load balancing to the production checklist page, @a-robinson. Also, after Amruta merges an open PR, I'll reorganize the sidenav a bit. I want to list monitoring in the context of deployment, since it's so essential. I think I'll move that stuff up and rename the "Manage" section to "Maintain", making that section all about maintenance tasks (rolling upgrades, decommissioning, etc.).
Also, I'll update the rolling upgrade docs to point to the new section on production checklist.

authors: a-robinson jseldess

repo: cockroachdb/docs


text:
sql: Add column family support for secondary indexes

PR: https://github.com/cockroachdb/cockroach/pull/42073
From release notes:

CockroachDB now allows stored columns in secondary indexes to respect the column family table definitions that they are based on. [#42073][#42073] {% comment %}doc{% endcomment %}

Fixed by #6556.

authors: ericharmeling jseldess


text:
Include reference to enterprise changefeeds created without a sink

Fixes DOC-5180
Brief update to mention that enterprise changefeeds created without a sink and the format option will create a core-style changefeed.
Currently, we only mention this in an example on the CDC Transformations page https://www.cockroachlabs.com/docs/v22.2/cdc-transformations#view-recent-changes-to-a-row.
This PR adds to the CREATE CHANGEFEED page and the Create and Configure Changefeed overview page.
(A couple of small tidy-up edits too.)
Preview
https://deploy-preview-16025--cockroachdb-docs.netlify.app/docs/stable/create-and-configure-changefeeds.html#create

Hey @HonoreDB, I've added you to review this one — I hope you don't mind! I think you were the last person to discuss sinkless changefeeds, so I went ahead and tagged you. Thanks!


text:
Life of a Distributed Transaction: add Parallel Commits info

Addresses #4723.
Summary of changes:

Update places that mention the transaction commit protocol with
references to the STAGING state and a link to the more in-depth
Parallel Commits docs.

Fix a couple of small typos

This change is

Online preview: http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/8aba9c2546f141f5cf930b3d3c0ecd2fafbcbf67/
Edited pages:

v19.2/architecture/life-of-a-distributed-transaction.md

Note: build failures are because this PR depends on content added in #5394

authors: cockroach-teamcity rmloveland


text:
Make roachprod --local work without ssh

I tried to start running some of our roachtests on every PR using --local, but the builder image doesn't have ssh (and probably shouldn't). It's also an extra step for each dev to set up passwordless ssh to localhost before they can use --local

This would be nice for when my login shell isn't posix compliant (I know, I know):
$ roachprod destroy local
local: stopping 2/2
0: Process exited with status 127: Unsupported use of '||'. In fish, please use 'COMMAND; or COMMAND'.
fish:   awk '/ROACHPROD=(1)[ \/]/ { print $1 }' | xargs kill -9 || true;
                                                                 ^

@justinj can't you work around that? Set up a user, put the keys into your actual user's ~/.ssh, give that user /bin/bash as a login shell.

roachprod shouldn't be relying on the user's login shell. it should wrap everything in sh -c itself when needed.

I took a look at what it would take to fix this issue. It isn't particularly difficult, just a bunch of manual lifting. @benesch I'm going to take this off your plate and try to get to it soon.

Huh. I thought I saw a solution that didn't involve much manual lifting at all. Specifically by extracting a Execer interface that both an SSH connection and exec.Command could fulfill.

@benesch I looked at that, but it is more than just extracting an interface as we access Session.{Stdout,Stderr} fields and might have a few other bits that don't fit into a shared interface. I think there also needs to be special handling for Get (there already is for Put) to perform local file copies. I don't think it will be too hard, just need to find a few hours to do the work.

authors: bdarnell benesch danhhz justinj petermattis tschottdorf

repo: cockroachdb/roachprod


text:
changing provisioned_capacity from RU to vCPU - changes to descriptio…

Adapting Standard Tier provisioned_capacity to vCPU instead of RU

changing docs annotations from RU to vCPU
changing example values multiple of 500 to multiple of 1 - e.g. 1000 changed to 2

Commit checklist

[ ] Changelog
[ ] Doc gen (make generate)
[ ] Integration test(s)
[ ] Acceptance test(s)
[ ] Example(s)

@marksoper IIRC you were in favor of closing this right?

authors: fantapop marksoper


text:
[FEATURE] don't fail with untracked files

Is your feature request related to a problem? Please describe.
Not sure if this is a feature request or a bug, but I can't really do much with cog if there any untracked files in a repo.
❯ cog bump --auto -d
Error: Untracked files :
	new: cog.toml

nothing added to commit but untracked files present (use "git add" to track)

But that's not an oversight; I don't want to add that file ATM.
And here it fails even when I'm using the -d option.
In other repos, I may have many more untracked files for various reasons, and I don't want to hassle with adding them to .gitignore.
Describe the solution you'd like
Allow me to configure it to turn this off, or document if it already exists (I looked through the docs but didn't find anything).
Describe alternatives you've considered

Just offer a warning, but proceed.
Remove the check entirely ;-)

I don't really have a strong preference of the three solutions, though actually lean towards the first alternative (warning but not error).

Adding an this option would definitely be a great addition.
I also lean toward the first solution.

Because of it seems not possible, to bump and add untracked or changed files (e.g. files with the updated version info) to the following commit in the pre bump hooks, it is unusable for us in our build pipelines.

Hey @oknozor @mcpride @marcbull @bdarcus :)
I wrote the PR that would implement this feature, feel free to take a look and give some feedbacks ;)

authors: Wassim-AB bdarcus mcpride oknozor

repo: cocogitto/cocogitto


text:
Tweak code reviewer

Description

Include a summary of the new content you're adding or the reason for the change.
Include relevant context.
Do not link to work items.
Any PNG images should be compressed using Tiny PNG or equivalent.

Type of change
Please delete options that are not relevant.

[ ] New document(s)/updating existing
[ ] Fixes
[ ] Styling
[ ] Bug fix (non-breaking change which fixes an issue)

Reviews and merging
You are responsible for getting your PR merged. Address review comments promptly and make sure to merge the PR when ready.
Feel free to 'Enable automerge' - your PR will automatically merge when accepted and passing the build.

ChatGPT's code review:
Code Review

Clarity: The code is relatively clear and well-structured. The naming of the workflow and job is descriptive. However, some of the parameter names in the with section could be more explicit for better understanding.

Efficiency: The code seems efficient in terms of workflow setup and job execution. However, there could be potential performance improvements in the GenAI Code Review step, especially when handling large codebases or multiple pull requests concurrently.

Best Practices: The code generally follows best practices for GitHub Actions workflows. It leverages secrets for sensitive information and utilizes the on event to trigger the workflow on pull request events. One improvement could be to add comments for better code documentation.

Bugs/Security: The code seems secure regarding secrets management and API usage. However, it's crucial to ensure that the external dependency mcclowes/genai-code-review@v1.0.0 is maintained and safe to use. Regularly updating dependencies is recommended to mitigate any vulnerabilities.

Maintainability: To enhance maintainability, consider adding inline comments to explain the purpose of each parameter in the with section. This will help future developers understand the configuration better. Additionally, version pinning for the external action (genai-code-review) can prevent unexpected changes from breaking the workflow.

Suggestions for Improvement

Parameter Naming: Update parameter names in the with section for better clarity. For example, openai_api_key could be renamed to api_key_openai for consistency.

Performance Optimization: Consider optimizing the GenAI Code Review step for better performance, especially when dealing with large codebases. This could involve analyzing the processing time and resource usage of the external action.

Documentation: Add comments to explain the purpose of each parameter in the with section. This will improve code readability and maintainability for future modifications.

Dependency Management: Regularly check for updates to the external action mcclowes/genai-code-review@v1.0.0 to ensure that the latest security patches and features are incorporated.

By implementing these suggestions, the workflow will be more maintainable, secure, and efficient for reviewing AI code in pull requests.

repo: codatio/codat-docs


text:
Update icon URLs to not use relative paths

This PR updates icon URLs to not use relative paths. Maybe could use regression tests, but probably not a huge deal.

Nice, just learned some new things by reviewing! 👍

authors: JoshSmith npendery

repo: code-corps/code-corps-phoenix


text:
Remove redundant else

When else statement is empty it might raise a diagnostic.
Before:
if (true)
{
    //some statement (not a comment)
}
else
{
}

After:
if (true)
{
    //some statement (not a comment)
}

Diagnostic id: CC0089
Category: Usage
Severity: Info
@gandarez is working on it.

Ok, you can update the wiki and add the diagnostic id yourself.
This is related to #88, which you are working, right?
I think this is an Info, category Usage.
@gandarez can you add a test case?

@giggio Yes for sure. I'm saying it's already done. I'm making effort to develop #88

Ok, I updated the description. I noticed you updated the wiki, you need to update the issue as well. I did it already. Check the test case, see if you want to add anything.

Closed by #358.

authors: gandarez giggio

repo: code-cracker/code-cracker