How to create an interactive ssh shell to remote host?

How to create an interactive ssh shell to remote host?

Something like this:
use std::io::prelude::*;
use std::net::{TcpStream};
use ssh2::Session;

// Connect to the local SSH server
let tcp = TcpStream::connect("<IP_ADDRESS>:22").unwrap();
let mut sess = Session::new().unwrap();
sess.set_tcp_stream(tcp);
sess.handshake().unwrap();
sess.userauth_agent("username").unwrap();

let mut channel = sess.channel_session().unwrap();
// See https://docs.rs/ssh2/0.4.0/ssh2/struct.Channel.html#method.request_pty
channel.request_pty(
   "xterm",
    None,
    Some((80, 24, 0, 0)),)),
).unwrap();

// Run the user's shell.  Alternatively, use channel.exec() to run a specific command
channel.shell().unwrap();

// Now you can read/write the channel to interact with the shell

How many times should i read from the channel  when call write function?
write "ls -l"  need to read twice.
write "pwd" just to need read once.
or sleep for a while to wait remote data before read .
is any cool way to handle this situation?

I am unable to read from the channel after authenticating and starting shell.
I should be able to read the prompt at least, but reading just hangs.
Tried against two different hosts running two different ssh daemons, both v2.

@wez : The following fails to read a response:
#[cfg(test)]
mod tests {
  use std::io::prelude::*;
  use std::net::{TcpStream};
  use ssh2::Session;

  #[test]
  fn ls(){
    let tcp = TcpStream::connect(("<IP_ADDRESS>", 22)).unwrap();
    let mut sess = Session::new().unwrap();
    sess.set_tcp_stream(tcp);
    sess.handshake().unwrap();
    sess.userauth_password("user", "password")).unwrap();
    println!("Connected");

    let mut channel = sess.channel_session().unwrap();
    let mut s = String::new();

    channel.request_pty(
     "xterm",
      None,
      Some((80, 24, 0, 0))
    ).unwrap();

    channel.shell().unwrap();

    channel.write(b"ls\n").unwrap();
    match channel.read_to_string(&mut s) {
      Ok(c) => { println!("Read {} bytes: {}", c, s); }
      Err(e) => { println!("Error while reading: {}", e); }
    }
    channel.wait_close();
    println!("{}", channel.exit_status().unwrap());
  }
}

FWIW, channel.exec("ls").unwrap(); does work. But this issue is about an interactive shell.

read_to_string attempts to read until it reaches EOF but EOF is never received: the shell session is still alive because it is waiting for input; you effectively have the classic logical deadlock that is common when trying to manage interactive child processes.
Instead, you want something like this:
    channel.shell().unwrap();

    // send the command and then exit the shell so that
    // it closes the stream when it is done
    channel.write(b"ls\nexit\n").unwrap();

    // repeatedly read some data and treat it as utf-8.
    // This isn't sufficient for a real interactive session because you will receive
    // partial buffers that are incomplete utf-8 and you'll want to properly buffer
    // them up and decode them, but this is good enough for a basic demo
    loop {
        let mut buf = [0u8; 1024];

        match channel.read(&mut buf) {
            // the channel has closed and we got an EOF
            Ok(0) => break,
            // We got some data; try to decode it as utf-8
            Ok(c) => {
                let slice = &buf[0..c];
                match std::str::from_utf8(slice) {
                    Ok(s) => print!("{}", s),
                    Err(e) => {
                        // TODO: you should buffer this up and try to stick it together
                        // with the next chunk of data that you read later on
                        eprintln!("output was not utf8: {}", e);
                        break;
                    }
                }
            }
            Err(e) => {
                println!("Error while reading: {}", e);
                break;
            }
        }
    }
    channel.wait_close().unwrap();
    println!("{}", channel.exit_status().unwrap());

How can you write, read, write, read, etc. without having to close and open channels repeatedly?
In the example above, I can't read the response to channel.write(b"ls\n"). I don't get a response until I write(b"exit\n").
Say, for example, I want to delete the file with the most characters in its name. So I want to ls, process the results, then rm. I don't want to have to exit, then acquire a new channel in between the ls and the rm.

I'm not following along closely here, but I had subscribed when I was battling through this. I didn't end up using my solution, but I did get the basics of an interactive shell working. Hopefully this helps a bit.
Note - this uses some functionality from termion for convenience:

termion::raw::IntoRawMode - avoids double echo of content typed into shell
termion::async_stdin - manages stdin in a separate thread to enable reading it without blocking the current thread.

        if sess.authenticated() {
            let mut channel = sess.channel_session()?;

            channel.request_pty("xterm", None, None).unwrap();
            channel.handle_extended_data(ssh2::ExtendedData::Merge);
            channel.shell()?;

            let stdout = io::stdout();
            let mut stdout = stdout.lock().into_raw_mode().unwrap();
            let mut stdin = async_stdin();

            let mut buff_in = Vec::new();
            while !channel.eof() {
                let bytes_available = channel.read_window().available;
                if bytes_available > 0 {
                    let mut buffer = vec![0; bytes_available as usize];
                    channel.read_exact(&mut buffer)?;
                    stdout.write(&buffer)?;
                    stdout.flush()?;
                }

               // Using async_stdin to avoid blocking, should this also respect the WriteWindow?
                stdin.read_to_end(&mut buff_in)?;
                channel.write(&buff_in)?;
                buff_in.clear();

                // Unsure of best practice, but this feels responsive and avoids pegging the CPU
                std::thread::sleep(std::time::Duration::from_millis(50));
            }
            channel.wait_close()?;
        }

I ultimately abandoned this code because I quickly found myself in the weeds toward reinventing the shell functionality of ssh with limited time and understanding:

How can I reliably drop the server's banner?
How can I reliably send initial commands to configure the remote shell (my original attempt would appear in the banner, and hadn't dug in enough to know the "right" way/time to send them)
How would I support ProxyCommand (to proxy through a netcat tunnel)
Do SSH shells normally merge stdout/stderr?

So for now, I've resorted to shelling out to ssh, and just kept this snippet around in case I ever make time for contributing to a more complete interactive SSH shell abstraction.

Simple interactive ssh shell to my vagrant host.
`
extern crate crossbeam;
use crossbeam::channel::{unbounded, TryRecvError};
use ssh2::Session;
use std::io::prelude::*;
use std::net::TcpStream as StdTcpStream;
use std::thread;
fn main() {
let tcp = StdTcpStream::connect("<IP_ADDRESS>:22").unwrap();
let mut sess = Session::new().unwrap();
sess.set_tcp_stream(tcp);
sess.handshake().unwrap();
sess.userauth_password("root", "vagrant").unwrap();
let mut channel = sess.channel_session().unwrap();

channel.request_pty("xterm", None, None).unwrap();

channel.shell().unwrap();

sess.set_blocking(false);

let (trx, rev) = unbounded();

thread::spawn(move || loop {
    let stdin = std::io::stdin();
    let mut line = String::new();
    stdin.read_line(&mut line).unwrap();
    trx.send(line).unwrap();
});

loop {
    let mut buf = vec![0; 4096];
    match channel.read(&mut buf) {
        Ok(_) => {
            let s = String::from_utf8(buf).unwrap();
            println!("{}", s);
        }
        Err(e) => {
            if e.kind() != std::io::ErrorKind::WouldBlock {
                println!("{}", e);
            }
        }
    }

    if !rev.is_empty() {
        match rev.try_recv() {
            Ok(line) => {
                let cmd_string = line + "\n";
                channel.write(cmd_string.as_bytes()).unwrap();
                channel.flush().unwrap();
            }

            Err(TryRecvError::Empty) => {
                println!("{}", "empty");
            }

            Err(TryRecvError::Disconnected) => {
                println!("{}", "disconnected");
            }
        }
    }
}

}
`
this can execute command interactively and print remote stdout.
some hints to command completion by Tab key ?

@knightflower1989 The key to supporting tab completion is actually sending the tab character to the remote channel (remote shell is doing the completion), capturing the channel output (which includes control characters to properly print the tab completion), then writing that to stdout. So you can't simply read stdin line-by-line (read_line), because currently you'd only send the tab character after hitting enter.
Then I assume you're seeing double output of the things you interactively enter (I might be missing something), and your println is adding a newlines for every response which might affect how the autocomplete renders (the newline would affect the control characters that move the cursor around the way that autocomplete does). Effectively this is where setting stdout in raw_mode is important, to disable echo of what you type locally. That way you capture stdin (byte-by-byte, not line-by-line), send it to the remote channel, and print the channel output (which includes the bytes you sent it).
This is what my previous snippet does. Sets stdin in raw mode using termion::raw::IntoRawMode and uses termion::async_stdin to setup the stdin thread like yours, except it isn't limited to reading line-by-line.

a concrete implementation of a fully interactive ssh session can be found in my terminal emulator (https://wezfurlong.org/wezterm/); there are some additional layers involved there that make it a bit harder to see what is going on, so here are some pointers:

The portable_pty crate implementation in https://github.com/wez/wezterm/tree/master/pty/src (docs at https://docs.rs/portable-pty/0.2.0/portable_pty/) abstracts dealing with a pty/tty for posix, windows, serial ports and ssh sessions
This file contains session establishment, authentication prompts and the pty setup https://github.com/wez/wezterm/blob/master/src/ssh.rs#L353
Once established, the read side (obtained via https://docs.rs/portable-pty/0.2.0/portable_pty/trait.MasterPty.html#tymethod.try_clone_reader) is spawned into a thread that is dedicated to reading the output from the peer and running it through the escape sequence parser and feeding the output to the terminal model: https://github.com/wez/wezterm/blob/master/src/mux/mod.rs#L48
Separately from all of that, the UI translates keypresses and writes them to the write side

The key thing to note is that the terminal has no idea about when a command begins or ends; that is known only by whatever is running on the other end of the ssh session, and as a client you have no way to know from the ssh protocol what is going on beyond receiving the output stream and detecting when the stream has terminated, so you'll either need the remote program to co-operate with you (eg: by emitting special marker output that you can match on), or by having your program hard code some matching/scraping logic specific to the task at hand.

Here is my solution which forwards stdin, stdout, and stderr. Some notes:

Unlike anowell's solution it doesn't have any ugly busy loop.
Unlike knightflower1989's solution it doesn't block stdin while reading stdout.
I haven't thought about what happens when streams are closed, or the SSH channel closes much.
One of these three channel could probably go on the main thread, but I put all three in separate threads for simplicity and symmetry.
Some of the Result type annotations are unnecessary but I put them in because it gets pretty confusing otherwise!
Not extensively tested yet!

fn execute_and_forward(session: &Session, command: &str) -> anyhow::Result<i32> {
  let mut channel = session.channel_session()?;
  channel.exec(command)?;

  let mut ssh_stdin = channel.stream(0);
  let mut ssh_stdout = channel.stream(0);
  let mut ssh_stderr = channel.stderr();

  let all_result: Result<u64, io::Error> = crossbeam::scope(|s| {
    let stdin_handle = s.spawn(|_| {
      let stdin = io::stdin();
      let mut stdin = stdin.lock();
      io::copy(&mut stdin, &mut ssh_stdin)
    });

    let stdout_handle = s.spawn(|_| {
      let stdout = io::stdout();
      let mut stdout = stdout.lock();
      io::copy(&mut ssh_stdout, &mut stdout)
    });

    let stderr_handle = s.spawn(|_| {
      let stderr = io::stderr();
      let mut stderr = stderr.lock();
      io::copy(&mut ssh_stderr, &mut stderr)
    });

    // The unwrap() means the main thread will panic if the inner threads panicked.
    let stdin_result: Result<u64, io::Error> = stdin_handle.join().unwrap();
    let stdout_result: Result<u64, io::Error> = stdout_handle.join().unwrap();
    let stderr_result: Result<u64, io::Error> = stderr_handle.join().unwrap();

    stdin_result.and(stdout_result).and(stderr_result)
  })
  .unwrap(); // Should never panic because all scoped threads have been joined.

  // Return Err if any of the threads errorred.
  all_result?;

  // Wait for SSH channel to close.
  channel.wait_close()?;
  let exit_status = channel.exit_status()?;
  Ok(exit_status)
}

this comment about blocking on https://github.com/alexcrichton/ssh2-rs/issues/189#issuecomment-640271049 also applies here

useful

I implemented the solution proposed by @anowell.
It works great, but after exit on the remote host, the next character I type is not read by the program.
On first run.
Select index -->'x)' of device to initiate a connection:ssh 12
All characters are read and a connection is made----^^^^^
After SSHing. I get
Select index -->'x)' of device to initiate a connection:12
..............................................character 1 is ignored---^^----character 2 prints and works/fails as expected.
Any Ideas? I'm quite new at rust. So, any pointers would be greatly appreciated.
fn start_ssh(index: usize, ipl: &Vec<IpAddr>) {
    if index < ipl.len() {
        let ip = ipl[index];
        let tcp = TcpStream::connect(format!("{}:22", ip)).unwrap();
        let mut sess = Session::new().unwrap();
        sess.set_tcp_stream(tcp);
        sess.handshake().unwrap();
        sess.userauth_password("user", "password").unwrap();

        if sess.authenticated() {
            let mut channel = sess.channel_session().unwrap();

            channel.request_pty("xterm", None, None).unwrap();
            channel
                .handle_extended_data(ssh2::ExtendedData::Merge)
                .unwrap();
            channel.shell().unwrap();

            let stdout = io::stdout();
            let mut stdout = stdout.lock().into_raw_mode().unwrap();
            let mut stdin = async_stdin();

            let mut buff_in = Vec::new();
            while !channel.eof() {
                let bytes_available = channel.read_window().available;
                if bytes_available > 0 {
                    let mut buffer = vec![0; bytes_available as usize];
                    channel.read_exact(&mut buffer).unwrap();
                    stdout.write(&buffer).unwrap();
                    stdout.flush().unwrap();
                }

                // Using async_stdin to avoid blocking, should this also respect the WriteWindow.unwrap()
                stdin.read_to_end(&mut buff_in).unwrap();
                channel.write(&buff_in).unwrap();
                buff_in.clear();

                // Unsure of best practice, but this feels responsive and avoids pegging the CPU
                std::thread::sleep(std::time::Duration::from_millis(50));
            }
            channel.wait_close().ok();
        }
    }
}

    loop {
        // Prints a list of results
        let mut ip_list = Vec::new();
        for (n, (mac, dev)) in result.iter().enumerate() {
            println!();
            println!("{}) Name: {}", n, dev.1);
            println!("Ip: {} | Mac: {}", dev.2, mac);
            ip_list.push(dev.2)
        }
        // grab user choice
        let mut input_cnct = String::new();
        print!("\nSelect index -->'x)' of device to initiate a connection: ");
        io::stdout().flush().expect("Unable to flush stdout");
        io::stdin()
            .read_line(&mut input_cnct)
            .expect("Failed to read line");
        // trim newline character
        let cnct = input_cnct.trim();

        // After exiting ssh connection first charecters in not read.
        print!("choice {} : ", cnct);

        // options for multiple paths
        let choice: Vec<&str> = cnct.split_whitespace().collect();
        if cnct.is_empty() == false {
            match choice[0] {
                "b" => {
                    println!("Slected q");
                    Command::new("clear").status().unwrap();
                    break 'select;
                }
                "ssh" => {
                    if choice.len() != 2 {
                        println!("Must pass exactly two Arguments, 'ssh' and index selection.")
                    } else {
                        println!("sshing to dev # {}", choice[1]);
                        let c: usize = match choice[1].trim().to_string().parse() {
                            Ok(n) => n,
                            Err(_) => continue,
                        };
                        // call ssh function from @anowell
                        start_ssh(c, &ip_list);
                    }
                }
                _ => {
                    let c: usize = match choice[0].trim().to_string().parse() {
                        Ok(n) => n,
                        Err(_) => continue,
                    };
                    start_vnc(c, &ip_list);
                }
            }
        }
    } //end select loop

```

@psymole - You lose one character because of you're calling async_stdin() more than once and mixing it with io::stdin(). If you look at the implementation of async_stdin, it creates an mpsc channel and then spawns a thread. That thread consumes bytes from the TTY in a loop and sends them to the mpsc channel. The thread loops until the channel send fails (or TTY closes).
So in your scenario, once you exit the remote host, the instance of AsyncReader (returned by async_stdin) is dropped. That causes the mpsc channel to be dropped and thus closed. But the thread is still waiting for the next byte from the TTY. As soon as the next byte arrives from the TTY (after your prompt), it tries to send it on the mpsc channel, but it fails because the channel is closed. That byte is lost, and the async_stdin loop ends so it stops consuming additional bytes from the TTY.
And actually, after the SSH session exits, you have io::stdin().read_line() and async_stdin() both waiting for input which creates a race condition; it might not always be the first byte that is lost. And it's weird because they aren't even both opening stdin; termio's async_stdin is reading /dev/tty instead.
Resolving this will require you to rethink usage of stdin/TTY input to ensure you can't ever have a situation where 2 threads are simultaneously waiting for stdin/tty input. A few options:

Make all input reading share access to stdin or TTY collected from a single, long-lived thread (e.g. call async_stdin() before your main loop, and share that returned instance of AsyncReader in both functions to read input).
Remove async_stdin and use non-blocking IO (O_NONBLOCK) for stdin in start_ssh (e.g. nonblock). Then you don't need a separate thread for reading stdin, and each iteration in the SSH session loop just reads whatever is available. Select, poll, and epoll are other unix facilities that would similarly enable checking stdin without blocking.
Just shell out to ssh instead. ☺

@psymole - I'm not sure if I follow your scenario, but openssh does have ControlMaster (-M) and ControlPath (-S) concepts. I'm not sure how much logic goes into setting up a ControlMaster (is it just a matter of getting the path to the underlying unix socket?), but if you could emulate that in your app, then shelling out could skip auth. But then you probably also have to think through when/how to terminate/timeout the control master.
Or, if it's just a question of shelling out with username/password, sshpass may work (which automates password interaction). It seems intentional (and probably wise) that openssh didn't expose a flag for non-interactive password auth, so if you can use public key auth, -i <identify_file> is easier to automate.
Hopefully that at least helps you sort through the options and tradeoffs that make sense for your app.

I have a fair bit of experience using SSH programmatically - for VSCode style remote access rather than an interactive shell - but this is what I've learnt. Might be useful:

VSCode's remote SSH extension is closed source but I'm pretty sure it basically does system("ssh ...")
For a work project using Electron we used this library.
For a personal project I wrote a simple custom SSH binary using Go (easy to cross-compile and good built in SSH library). I communicate with it over stdin/stdout using a simple JSON protocol which then switches to the SSH stdin/stdout when connected.

Pros/cons:

Using the ssh2 library was very easy but it was moderately buggy and we are trusting JavaScript developers to get security right which seems risky to put it mildly.
The Go approach was pretty easy to do and also means you get a binary you can easily use from any language. I trust the Go authors to get SSH right much more than the ssh2 author. Maybe more than the libssh2 authors since so many security errors are memory errors.
Shelling out to ssh has the huge disadvantage that it isn't designed for programmatic access so you end up hackily detecting password prompts and so on using regexes. However it has the huge advantage of supporting all the crazy ways people use SSH - ssh-agent, ProxyCommand, host aliases, etc.

In the end even when using the JS ssh2 library we ended up parsing .ssh/config to at least support host aliases.
So yeah, pick your poison - either have something robust that means you'll end up implementing .ssh/config manually, or take the hacky option and spend your life dealing with unexpected output differences (foreign languages, modified clients, etc.).
I can post the code for my Go shim if anyone wants.


how to hidden the delete image button?

Laravel Version: 5.8.
PHP Version:
Laravel-admin: 1.6.11

Description:
sometimes, we need to hidden the delete image button, but we don't find the document about that, who know about that? thanks~
Steps To Reproduce:

Where to hide the button？

Where to hide the button？

in form image field

The button is hidden by default
Show me the screenshot or codes?

when id edit it the button show

@youruan 这是个bug，提交了commit 03896d5来修复这个问题，等下个版本发布生效

@youruan 这是个bug，提交了commit 03896d5 来修复这个问题，等下个版本发布生效

收到 多谢


Reformat the DG to match the styling requirements

Could you add an acknowledgement to AB3? Like in the README:
[Acknowledgements]
This project is based on the AddressBook-Level3 project created by the [SE-EDU initiative](https://se-education.org/).

This project is based on the AddressBook-Level3 project created by the [SE-EDU initiative](https://se-education.org/).

Thank you for your suggestions. I have made corresponding changes.


Add St. Louis, MO

Closes #519
In issue #778 a new letter was submitted with the entire board of aldermen as recipients. I used that list of recipients here instead of just the President of the Board. I did not use the newly submitted letter.

Original issue must contain pr-ready label before implementing. Content team must take a look at all content-needs-review requests before a PR is made. Sorry :^(


future feature is not defined:annotations

python: 3.11.2
ironpython:  3.4.0
vs studio: vs 2022
Description
`
ScriptRuntime pyRuntime = Python.CreateRuntime();
        var engine = Python.CreateEngine();

        var pyScope = engine.CreateScope();
        var paths = engine.GetSearchPaths();

        string pathToVirtualEnv = @"C:\Program Files\Python311";

        paths.Add(pathToVirtualEnv +@"\Lib");
        paths.Add(pathToVirtualEnv + @"\Lib\site-packages");
        paths.Add(pathToVirtualEnv + @"\DLLs");
        engine.SetSearchPaths(paths);

        dynamic py = engine.ExecuteFile(AppContext.BaseDirectory + @"IAMed/prescript_cluster.py");

`
when run at " dynamic py = engine.ExecuteFile(AppContext.BaseDirectory + @"IAMed/prescript_cluster.py");"
show error: future feature is not defined:annotations

__future__.annotations was added in Python 3.7 and so is not available in IronPython 3.4 (which is based on Python 3.4).


map-cols overrides cell fill of map-rows

I would like to color all cells in columns but the the header row should have a different color.
Sadly map-cols overrides any fill from map-rows. Maybe it would be possible to specify to order of execution, because in this case I would like map-rows to override map-cols.
#tablex(
  columns: (1fr,) * 9,
  align: center + horizon,
  auto-vlines: true,
  inset: 8pt,
  stroke: 0.5pt,
  header-rows: 1,
  (), (), (), vlinex(stroke: 2pt), (), (), vlinex(stroke: 2pt),
  map-cells: cell => {
    set text(11pt)
    strong(cell.content)
  },
  map-cols: (col, cells) => cells.map(c =>
    if c == none {
      c
    } else {
      (..c, fill: if calc.rem(col, 3) == 0 { blue.lighten(50%) } else { if calc.rem(col, 3) == 1 { green.lighten(50%)} else { red.lighten(50%) } })
    }
  ),
  map-rows: (row, cells) => cells.map(c =>
    if c == none {
      c
    } else {
      (..c, fill: if row == 0 { black.lighten(87%) })
    }
  ),

  [*Zeichen*], [*Dezimal*], [*Binär*],[*Zeichen*], [*Dezimal*], [*Binär*],[*Zeichen*], [*Dezimal*], [*Binär*],
  [a], [97], [1100001], [j], [106], [1101010], [s], [115], [1110011],
  [b], [98], [1100010], [k], [107], [1101011], [t], [116], [1110100],
  [c], [99], [1100011], [l], [108], [1101100], [u], [117], [1110101],
  [d], [100], [1100100], [m], [109], [1101101], [v], [118], [1110110],
  [e], [101], [1100101], [n], [110], [1101110], [w], [119], [1110111],
  [f], [102], [1100110], [o], [111], [1101111], [x], [120], [1111000],
  [g], [103], [1100111], [p], [112], [1110000], [y], [121], [1111001],
  [h], [104], [1101000], [q], [113], [1110001], [z], [122], [1110010],
  [i], [105], [1101001], [r], [114], [1110010], [#text(8pt,[Leerzeichen])], [32], [0100000],
)

This isn't really an intended use-case for map-cols and map-rows, as you're changing fill based on info from both columns and rows. There are two main alternatives here:

Using the tablex fill parameter as a function, as per the docs:

fill: Color with which to fill cells' backgrounds. Defaults to none, or no fill. Must be either a color, such as blue; an array of colors (one for each column in the table - if there are more columns than colors, they will alternate); or a function (column, row) => color (to customize for each individual cell).

So, in your example, you'd have something like:
#import "@preview/tablex:0.0.5": tablex, vlinex

#set page(width: 400pt)
#tablex(
  columns: (1fr,) * 9,
  align: center + horizon,
  auto-vlines: true,
  inset: 8pt,
  stroke: 0.5pt,
  header-rows: 1,
  (), (), (), vlinex(stroke: 2pt), (), (), vlinex(stroke: 2pt),
  map-cells: cell => {
    set text(11pt)
    strong(cell.content)
  },

  fill: (col, row) => if row == 0 {
     black.lighten(87%)
  } else if calc.rem(col, 3) == 0 {
     blue.lighten(50%)
  } else if calc.rem(col, 3) == 1 {
     green.lighten(50%)
  } else {
     red.lighten(50%)
  },
  [*Zeichen*], [*Dezimal*], [*Binär*],[*Zeichen*], [*Dezimal*], [*Binär*],[*Zeichen*], [*Dezimal*], [*Binär*],
  [a], [97], [1100001], [j], [106], [1101010], [s], [115], [1110011],
  [b], [98], [1100010], [k], [107], [1101011], [t], [116], [1110100],
)

If you depend on more than just the cell's coordinates, you can use map-cells for this purpose as well. Here, it would look like this:

#import "@preview/tablex:0.0.5": tablex, vlinex

#set page(width: 400pt)
#tablex(
  columns: (1fr,) * 9,
  align: center + horizon,
  auto-vlines: true,
  inset: 8pt,
  stroke: 0.5pt,
  header-rows: 1,
  (), (), (), vlinex(stroke: 2pt), (), (), vlinex(stroke: 2pt),
  map-cells: cell => {
    // !!! dont discard the cell !!!
    // override its content attribute
    // instead of returning the content,
    // to ensure rowspans colspans etc are kept
    cell.content = {
      set text(11pt)
      strong(cell.content)
    }
    let row = cell.y
    let col = cell.x
    cell.fill = if row == 0 {
       black.lighten(87%)
    } else if calc.rem(col, 3) == 0 {
       blue.lighten(50%)
    } else if calc.rem(col, 3) == 1 {
       green.lighten(50%)
    } else {
       red.lighten(50%)
    }

    cell
  },
  [*Zeichen*], [*Dezimal*], [*Binär*],[*Zeichen*], [*Dezimal*], [*Binär*],[*Zeichen*], [*Dezimal*], [*Binär*],
  [a], [97], [1100001], [j], [106], [1101010], [s], [115], [1110011],
  [b], [98], [1100010], [k], [107], [1101011], [t], [116], [1110100],
)

Of course, if we find a more concrete example where controlling the order of map cols and map rows is actually needed, it could be considered, but in this case I think it'd be unnecessary. I'll be closing this issue as I think this is solved, but feel free to say if you'd like further explanation about something.
Also btw, I suggest not mapping cells to content, as you'd lose any properties you may override for individual cells.
That is, don't return strong(cell.content) on map-cells, but rather do cell.content = strong(cell.content) and then return cell, so that other cell properties aren't discarded, which could lead to very hard to debug errors (e.g. trying to use a rowspanx or colspanx but it not working because rowspan/colspan properties were discarded on cell mapping).


[Bug] missing "Bearer " prefix in "Authorization"

Is this a support request?

[X] This is not a support request

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
2024-09-30T12:46:56+01:00 ERR home/runner/work/headscale/headscale/hscontrol/app.go:357 > missing "Bearer " prefix in "Authorization" header client_address=
Expected Behavior
no errors
Steps To Reproduce
running in docker container
Environment
- OS:linux docker container
- Headscale version:latest
- Tailscale version:latest

Runtime environment

[X] Headscale is behind a (reverse) proxy
[X] Headscale runs in a container

Anything else?
No response

2024-09-30T12:46:56+01:00 ERR home/runner/work/headscale/headscale/hscontrol/app.go:357 > missing "Bearer " prefix in "Authorization" header client_address=

It seems you try to use the headscale API but provide the API key in an invalid format. Can you please share more details, on how you call the headscale API?

2024-09-30T12:46:56+01:00 ERR home/runner/work/headscale/headscale/hscontrol/app.go:357 > missing "Bearer " prefix in "Authorization" header client_address=

It seems you try to use the headscale API but provide the API key in an invalid format. Can you please share more details, on how you call the headscale API?

Hi, can you explain more did not understand your question

Hi, can you explain more did not understand your question

What have you done to get the reported error message?

Hi, can you explain more did not understand your question

What have you done to get the reported error message?

updated headscale

Hi, can you explain more did not understand your question

What have you done to get the reported error message?

updated headscale

Can you please provide more details, what commands did you run, etc? Also, the error message involves the API, are you using a web interface?

services:
headscale:
container_name: headscale
environment:
- PUID=1000
- PGID=1000
- TZ=GB
volumes:
- /var/lib/docker/volumes/headscale/config:/etc/headscale/
- /var/lib/docker/volumes/headscale/keys:/var/lib/headscale/
ports:
- 8080:8080
- 9090:9090
image: headscale/headscale:0.23.0
command: serve
restart: unless-stopped
headscale-ui:
image: ghcr.io/gurucomputing/headscale-ui:latest
container_name: headscale-ui
restart: unless-stopped
networks:
default:
external: true
name: proxy

Please read: https://github.com/gurucomputing/headscale-ui?tab=readme-ov-file#errors-related-to-missing-bearer-prefix and join our discord server at https://discord.gg/c84AZQhmpx for further support with web interfaces.


299 refactoring renaming property cluster 01

This pull request includes the renaming of ten object properties.

appliesOutOf to hasTerritoryExcludes
appliesTo to hasTerritoryIncludes
applyTo to hasTerritoryIncludes
clonedTo to hasClone
isClonedFrom to isCloneOf
dubbedTo to hasDub
isDubbedFrom to isDubOf
isCoveredBy to hasRights
isAgent to hasRelatedAgent
isAnimalGroom to hasAnimalGroom

Reviewers

@JuergenGrupp
@aro-max

I have 3 improvements to this pull request:

I think I have spotted an error in our renaming plan of applyTo:
applyTo is currently only used here: Rights applyTo Asset.
The wording seemed strange at first, because of the plural "apply" instead of "applies". That is why we proposed this change to hasTerritoryIncludes. But the meaning would change with hasTerritoryIncludeand the grammar of applyTo is fully correct and expresses exactly what our intention is.
My conclusion: stick with applyTo and do not rename it.

There is another class to use applyTo with: PublicationEvent.
My conclusion: add the following restriction to the ontology: "Rights applyTo PublicationEvent.

This opens up the opportunity to make "applyTo" and "isCoveredBy" inverse properties.
My conclusion: add the rule applyTo isInverseOf isCoveredBy

Please comment!

Yes @JuergenGrupp, I agree.
@aro-max do you agree with these changes so I can proceed with making the updates?

Yes @JuergenGrupp, I agree.
@aro-max  do you agree with these changes so I can proceed with making the updates?

Here are the latest changes made:

Reinitialized the applyTo object property instead of renaming it to hasTerritoryIncludes.
Removed the Rights hasTerritoryIncludes Asset restriction and replaced it with the Rights applyTo Asset restriction.
Added a new restriction: Rights applyTo PublicationEvent.
Added applyTo object property as the inverse of the isCoveredBy object property, which is renamed to hasRights.

@JuergenGrupp, can you please review the latest changes?

Cleaned up mixed-in property values for rdfs:label and dcterms:description from hasRelatedAgent, ensuring only 3 values for supported languages, and removed owl:IrreflexiveProperty from hasRelatedAgent.


Add support for adjusting range of histogram in transfer function

I have an image that was converted to a short instead of a byte and it demonstrated this issue:

I think we probably want to be able to adjust the range of this plot, but would consider this a minor issue.

@skalarproduktraum we can close this histogram issue as well, right?


Updating ovirt-engine-sdk version to 4.0.5

This is important since it removes dependency on 'curb' gem which does not properly run on all systems.

@miq-bot add-label euwe/yes
@miq-bot add-label 'gem changes'
@miq-bot assign @durandom

LGTM.
some gitter history https://gitter.im/ManageIQ/manageiq?at=57f7ba0fa7c618cd26f087f9

and back to @blomquisg for merging :smile:
@miq-bot assign blomquisg

Euwe Backport details:
$ git log
commit 0ea5c686ca0ec0edd123bb6644c0c151c022b95a
Author: Greg Blomquist<EMAIL_ADDRESS>Date:   Wed Oct 12 08:33:28 2016 -0400

    Merge pull request #11784 from borod108/sdk-update

    Updating ovirt-engine-sdk version to 4.0.5
    (cherry picked from commit c131ab5fb8a4f3583b88517094460d622ff262fc)


ErrorPage tabs

There can be an enumerable service registered which the error page would take as an argument. That service would be used to add tabs and bodies to the error screen as it renders. Tab providers may also wish to indicate which tab should be given focus by default, when it believes an exception or condition specifically related to that tab has arisen.

No plans at this time to implement this.


Missing artifact org.owasp:dependency-check-core:jar:1.3.2-SNAPSHOT

Hi Jeremy,
I try to import dependency-check-cli into my eclipse, the pom file reports an error "Missing artifact org.owasp:dependency-check-core:jar:1.3.2-SNAPSHOT". I guess that's because maven tool can't find it from maven central. And I tried to fix it by specify the version of dependency-check-core:jar to 1.3.1, and it works now. But I think you have a better solution to fix it. Thank you!

If you want to load just the 1.3.2-SNAPSHOT CLI into Eclipse you'll need to
install the rest of the compiled objects into your local repo.
$ git clone https://github.com/jeremylong/DependencyCheck.git
$ cd DependencyCheck
$ mvn install
That will put the 1.3.2-SNAPSHOT jars into your local repo. Let me know if
that answers your qustion.
--Jeremy
On Fri, Oct 30, 2015 at 4:50 PM, Pengyu (Fred) Li<EMAIL_ADDRESS>wrote:

Hi Jeremy,
I try to import dependency-check-cli into my eclipse, the pom file reports
an error "Missing artifact
org.owasp:dependency-check-core:jar:1.3.2-SNAPSHOT". I guess that's because
maven tool can't find it from maven central. And I tried to fix it in the
following way:
org.owasp
dependency-check-core
1.3.1 // original is ${project.parent.version}, and the parent version is
1.3.2-SNAPSHOT.
—
Reply to this email directly or view it on GitHub
https://github.com/jeremylong/DependencyCheck/issues/401.

Got it. Thank you so much!

Out of curiosity, did you import all of DependencyCheck or just the -cli module in Eclipse?
Because if I import all modules, I get some strange error messages (core doesn't seem to be buildable, and modules which depend on core refuse to build). I don't remember of the top of my head, but I can find the exact messages. Just wonder if you got it to work, and possibly how you did it?


Prevent hitslop crash on Android

Motivation
Currently to use the hitSlop property on Android you must define the object properties left, top, right, and bottom or it will crash. iOS allows omitting object properties from the hitSlop.
This change guards and allows the hitSlop object properties to be optional like iOS.
Test plan (required)
Run the example and omit a hitslop property and check it does not crash.

Looks great, thanks for the fix!


Implement household sensitive questions flow

To Test

Start by going to https://test-la-doc-uploader-pr-348.herokuapp.com/flow/laDigitalAssister/howThisWorks and start an application (you need to fill in name for personal info)

Then, add members to your household: https://test-la-doc-uploader-pr-348.herokuapp.com/flow/laDigitalAssister/householdSignPost

Finally, Once you've added (or not added) household members go to https://test-la-doc-uploader-pr-348.herokuapp.com/flow/laDigitalAssister/sensitiveQuestions to test this flow

Seems like the the selections I made on householdWhichPersonalSituations are not getting displayed when I continue and then go back to this page

You are absolutely right. When I check it locally, I can see that the the selections do stay selected. I think the delta is due to this change that you and I made last week in the form flow builder: https://github.com/codeforamerica/form-flow/pull/401 (it's in my local copy but not in the version of form flow that we are accessing on the test site)


Create services for transcript and projects

Create a layer of services in-between the controllers and DAO's that has all the business logic.

This issue was resolved; refer to pr #37.


Usage instructions would be nice . .

It seems that your program is intended for people already familiar with Rclone. Still, it would be nice to have some usage instructions. It would be good also to mention that one needs to have rclone installed for 'RcloneBrowser' to work. Further, you might want to forestall the misunderstanding that your program makes use of an Internet browser program. Finally, it would be good were the program to provide a little more explanation when it opens a terminal; when that happened, my first thought was that something had gone wrong.
Thanks for your work.

Right, this tool is just an extra for rclone command line tool. It is not mean as complete replacement. I'll think about it how I can add extra instructions, but I don't want it to be complete replacement for rclone. You'll need to understand how rclone works to use this GUI, I have no intention to change that.
What do you mean by "misunderstanding that your program makes use of an Internet browser program"? What makes somebody to think that this GUI uses internet browser?

Thanks for your reply.

What do you mean by "misunderstanding that your program makes use of an Internet browser program"? What makes somebody to think that this GUI uses internet browser?

Answer: the use of the word 'browser', combined with the fact that various network utilities - such as Syncthing - have a GUI that works through an Internet browser (such as, for example, Firefox).


Custom Cursor Scaling/Resizing

When playing on a 1440p monitor, the custom cursor plugin makes the cursor too small in my opinion. If there's a way to program cursor resizing/scaling, that would be a great addition to the plugin.

Duplicate of #8782


Licence code

there is no code license in you project
could u please add it

It's here:

https://github.com/ruslo/polly/blob/master/LICENSE

You can find the link in the sectiion with information:


Can't import Span, Arrow, NormalHead from Bokeh

When trying to run in DSX, got the following error:
ImportError: cannot import name Span
Same error for Arrow, and NormalHead
This is under the section of "Visualize and compare replay events"

Could you try removing bokeh from the current pip install command and add and run this line?
!pip install --upgrade bokeh==0.12.5
Then you might need to restart the kernel.  The import should work once bokeh 0.12.5 is installed.
Please comment if this fixes the problem.  Thanks for reporting it.

It fixed the problems. Thanks a lot for the quick response!

thanks for the tip @markstur and for verifying the fix @cenyuzhang ! closing the issue.


[Modules] Provide a way for plugins to verify if they're being run on the correct EFT/SPT version

Similar to how the server has a version check for mods, it would be convenient for modders if we provided a way for client plugins to validate if they're being ran on a specific version of EFT or SPT.

Originally written by Terkoiz

Fulfilled by https://dev.sp-tarkov.com/SPT-AKI/Modules/pulls/13

Originally written by chomp


Dependabot Maven not finding latest version of a dependency

Is there an existing issue for this?

[X] I have searched the existing issues

Package ecosystem
maven
Package manager version
No response
Language version
No response
Manifest location and content before the Dependabot update
https://github.com/quarkusio/quarkus-super-heroes/blob/rhbq-2.13/event-statistics/pom.xml
https://github.com/quarkusio/quarkus-super-heroes/blob/rhbq-2.13/rest-fights/pom.xml
https://github.com/quarkusio/quarkus-super-heroes/blob/rhbq-2.13/rest-heroes/pom.xml
https://github.com/quarkusio/quarkus-super-heroes/blob/rhbq-2.13/rest-villains/pom.xml
dependabot.yml content
https://github.com/quarkusio/quarkus-super-heroes/blob/main/.github/dependabot.yml
Updated dependency
com.redhat.quarkus.platform:quarkus-bom
Current version in the pom.xml files is 2.13.5.Final-redhat-00002
What you expected to see, versus what you actually saw
When I look at the log (https://github.com/quarkusio/quarkus-super-heroes/network/updates/601547269) it says
updater | INFO <job_601547269> Checking if com.redhat.quarkus.platform:quarkus-bom 2.13.5.Final-redhat-00002 needs updating
  proxy | 2023/02/10 11:11:04 [180] GET https://maven.repository.redhat.com:443/ga/com/redhat/quarkus/platform/quarkus-bom/maven-metadata.xml
  proxy | 2023/02/10 11:11:04 [180] 200 https://maven.repository.redhat.com:443/ga/com/redhat/quarkus/platform/quarkus-bom/maven-metadata.xml
  proxy | 2023/02/10 11:11:04 [182] HEAD https://maven.repository.redhat.com:443/ga/com/redhat/quarkus/platform/quarkus-bom/2.13.5.Final-redhat-00002/quarkus-bom-2.13.5.Final-redhat-00002.pom
  proxy | 2023/02/10 11:11:04 [182] 200 https://maven.repository.redhat.com:443/ga/com/redhat/quarkus/platform/quarkus-bom/2.13.5.Final-redhat-00002/quarkus-bom-2.13.5.Final-redhat-00002.pom
updater | INFO <job_601547269> Latest version is 2.13.5.Final-redhat-00002
updater | INFO <job_601547269> No update needed for com.redhat.quarkus.platform:quarkus-bom 2.13.5.Final-redhat-00002

According to https://maven.repository.redhat.com/ga/com/redhat/quarkus/platform/quarkus-bom/maven-metadata.xml there is a newer version available: 2.13.5.SP1-redhat-00002.
<metadata>
  <groupId>com.redhat.quarkus.platform</groupId>
  <artifactId>quarkus-bom</artifactId>
  <versioning>
    <latest>2.13.5.SP1-redhat-00002</latest>
    <release>2.13.5.SP1-redhat-00002</release>
    <versions>
      <version>2.2.3.Final-redhat-00013</version>
      <version>2.2.3.SP1-redhat-00002</version>
      <version>2.2.3.SP2-redhat-00001</version>
      <version>2.2.5.Final-redhat-00006</version>
      <version>2.2.5.Final-redhat-00007</version>
      <version>2.2.5.SP1-redhat-00001</version>
      <version>2.2.5.SP2-redhat-00003</version>
      <version>2.7.5.Final-redhat-00011</version>
      <version>2.7.6.Final-redhat-00006</version>
      <version>2.7.6.Final-redhat-00009</version>
      <version>2.7.6.Final-redhat-00011</version>
      <version>2.7.6.Final-redhat-00012</version>
      <version>2.13.5.Final-redhat-00002</version>
      <version>2.13.5.SP1-redhat-00002</version>
    </versions>
    <lastUpdated>20230126102524</lastUpdated>
  </versioning>
</metadata>

Dependabot doesn't seem to be picking up this version.
Native package manager behavior
No response
Images of the diff or a link to the PR, issue, or logs
Latest dependabot log (as of February 10, 2023): https://github.com/quarkusio/quarkus-super-heroes/network/updates/601547269
Smallest manifest that reproduces the issue
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.quarkus.sample.super-heroes</groupId>
  <artifactId>rest-villains</artifactId>
  <version>1.0</version>
  <name>Quarkus Sample :: Super-Heroes :: Villains Microservice</name>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
    <quarkus.platform.group-id>com.redhat.quarkus.platform</quarkus.platform.group-id>
    <quarkus.platform.version>2.13.5.Final-redhat-00002</quarkus.platform.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>${quarkus.platform.group-id}</groupId>
        <artifactId>${quarkus.platform.artifact-id}</artifactId>
        <version>${quarkus.platform.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-reactive-jackson</artifactId>
    </dependency>
  </dependencies>
  <repositories>
    <repository>
      <id>red-hat-enterprise-maven-repository</id>
      <url>https://maven.repository.redhat.com/ga/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>red-hat-enterprise-maven-repository</id>
      <url>https://maven.repository.redhat.com/ga/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>
</project>

Hi!
I don't know much about Java versioning, but after looking a bit into it, it seems Maven agrees with Dependabot?
$ java -jar ~/.m2/repository/org/apache/maven/maven-artifact/3.9.0/maven-artifact-3.9.0.jar 2.13.5.SP1-redhat-00002 2.13.5-Final-redhat-00002
Display parameters as parsed by Maven (in canonical form and as a list of tokens) and comparison result:
1. 2.13.5.SP1-redhat-00002 -> 2.13.5-sp-1-redhat-2; tokens: [2, 13, 5, [sp, [1, [redhat, [2]]]]]
   2.13.5.SP1-redhat-00002 < 2.13.5-Final-redhat-00002
2. 2.13.5-Final-redhat-00002 -> 2.13.5-redhat-2; tokens: [2, 13, 5, [[redhat, [2]]]]

Could you open an issue with Maven to clarify if this is bug or expected behavior? I think https://issues.apache.org/jira/projects/MNG/issues/MNG-5987?filter=allopenissues may be the place?
Regardless of that, I guess we should add logic to Dependabot to consider the latestVersion metadata, and only if not present (I guess it's optional?) use manual ordering?
Summoning @soulus13 in case he can bring some light here 🙏 (if you find my random pings annoying please let me know, you've been just too helpful for us, so I think it's worth asking, but I don't want to bother you!)

@aloubyansky ^^^

Thank you @deivid-rodriguez for the info.
(if you find my random pings annoying please let me know, you've been just too helpful for us, so I think it's worth asking, but I don't want to bother you!)

I don't find it annoying at all. I'm going to do the same with some of our folks here!

Your example above is a little wrong though (you used 2.13.5.SP1-redhat-00002 and 2.13.5-Final-redhat-00002. It should be 2.13.5.SP1-redhat-00002 and 2.13.5.Final-redhat-00002.
Nonetheless the results are the same:
$ java -jar ~/.m2/repository/org/apache/maven/maven-artifact/3.8.4/maven-artifact-3.8.4.jar 2.13.5.SP1-redhat-00002 2.13.5.Final-redhat-00002

Display parameters as parsed by Maven (in canonical form and as a list of tokens) and comparison result:
1. 2.13.5.SP1-redhat-00002 -> 2.13.5.sp-1-redhat-2; tokens: [2, 13, 5, sp, [1, [redhat, [2]]]]
   2.13.5.SP1-redhat-00002 < 2.13.5.Final-redhat-00002
2. 2.13.5.Final-redhat-00002 -> 2.13.5-redhat-2; tokens: [2, 13, 5, [redhat, [2]]]

Oh, thanks for correcting it. I tried a bunch of combinations and copied a wrong test case. Anyways, I could not make logic from the results. I did read the docs at https://maven.apache.org/ref/4.0.0-alpha-4/maven-artifact/apidocs/org/apache/maven/artifact/versioning/ComparableVersion.html, and found that we do implement the same qualifier priority in Dependabot.

@deivid-rodriguez thanks for the analysis, we should have verified it before making noise about it. The confusing part is that an SP generally appears later than a Final:
java -jar ~/.m2/repository/org/apache/maven/maven-artifact/3.8.4/maven-artifact-3.8.4.jar 2.13.5.SP1 2.13.5.Final
Display parameters as parsed by Maven (in canonical form and as a list of tokens) and comparison result:
1. 2.13.5.SP1 -> 2.13.5.sp-1; tokens: [2, 13, 5, sp, [1]]
   2.13.5.SP1 > 2.13.5.Final
2. 2.13.5.Final -> 2.13.5; tokens: [2, 13, 5]

However, the presence of the redhat qualifier apparently reverses it.
About taking into account
<metadata>
  <groupId>com.redhat.quarkus.platform</groupId>
  <artifactId>quarkus-bom</artifactId>
  <versioning>
    <latest>2.13.5.SP1-redhat-00002</latest>
    <release>2.13.5.SP1-redhat-00002</release>

we need to make sure that if suddenly we release 2.7.7, it doesn't appear as the latest recommended release overall.

However, the presence of the redhat qualifier apparently reverses it.

Its really just adding a - followed by anything that introduces it
$ java -jar ~/.m2/repository/org/apache/maven/maven-artifact/3.8.4/maven-artifact-3.8.4.jar 2.13.5.SP1-x 2.13.5.Final-x
Display parameters as parsed by Maven (in canonical form and as a list of tokens) and comparison result:
1. 2.13.5.SP1-x -> 2.13.5.sp-1-x; tokens: [2, 13, 5, sp, [1, [x]]]
   2.13.5.SP1-x < 2.13.5.Final-x
2. 2.13.5.Final-x -> 2.13.5-x; tokens: [2, 13, 5, [x]]

No worries about noise, it's a good learning exercise for us and maybe a way to get in touch with the upstream maven project!
Regarding the priority here, I observed the same thing. SP is documented as higher than final, but I guess that's only when it's the only qualifier? I guessp1-redhat is considered a custom qualifier, and custom qualifier always have prerelease status and always sort before "final"?
And regarding considering latest, good point! I assumed it was what the author considered the "highest" release, but it could also be "latest", in the chronological sense!

@deivid-rodriguez, surely not bothering me 😃 And version parsing logic in maven when not staying withing the accepted versioning x.y[.z][-A] really changes.
For this case a similar example is even listed in the maven wiki https://maven.apache.org/pom.html#Version_Order_Specification:
"1-sp-1" < "1-ga-1" = "1-1" (trailing "null" values at each hyphen)
so indeed, looks like "it is a feature, not a bug" 😃

Speaking of the author preferences when it comes to the latest recommendations, in Quarkus we have a service that provides this information per "stream", which is typically tied to major.minor in the version. Could we think of ways to integrate that in some form (e.g. a REST call) to fetch the latest recommended versions for specific projects?
For Quarkus we'd cover BOM versions and Maven plugins primarily. However, we have more sophisticated version update support than that. We can analyze which Quarkus extensions are found in the project and suggest the latest recommended combination of those for a given project. Could that be something dependabot would provide some kind of plugin for?

Just my opinion here @aloubyansky, but I would think that dependabot would want to remain neutral to any potential Java-based frameworks and leave it to the package managers to do their work (i.e. Maven & Gradle)?

Basically, it'd not just about latest version updates but taking into account compatibility between the upgraded components.

Sure, just in case it could be interesting to provide version update suggestions based on compatibility info.

I wonder if the same problem exists if using Gradle. I could probably do a little POC and see.

I would think that dependabot would want to remain neutral to any potential Java-based frameworks and leave it to the package managers to do their work (i.e. Maven & Gradle)?

Correct, despite the fact that today we re-implement Maven / Gradle parsing via Ruby/Regex (but poorly). We very much want to move away from that model toward Dependabot being the glue code and leave version resolving to the native package manager tools. Ideally Dependabot finds the manifests, passes them  to the native package manager, then takes the output and turns it into a useful PR. However, that will take a bit of time, which is why issues like https://github.com/dependabot/dependabot-core/issues/1164 are still open.
Practically speaking, that means that if today Dependabot's brittle Ruby/regexes are buggy compared to Maven/Gradle behavior, then we will fix those bugs. But if you're looking for us to extend those to support parsing additional fields, then we're unlikely to do that as we'd rather put the effort into shifting over to the native tooling. Similarly, if you want non-standard behavior or extensions to the native package manager behavior, then I suggest working with the upstream package manager as it'd be pointless to do that here if we plan to rip that all out eventually when we switch to the native tooling.

It's exactly about delegating version updates to tools that can suggest not individual artifact updates but a set that is known to be related but only to those specialized tools.
For example today I have a PoC that reads a multi module project, identifies Quarkus bits in it and suggests which properties, dependencies, BOM imports and plugins should be updated, removed or added pointing to pom.xml files where those changes should be applied.
This could be integrated into a maven plugin or, i guess, a GitHub bot, which is why I wanted to share the idea.

The discussion has wandered a little from the original bug report, so I'm unclear:
Is there still an open bug report here or did we confirm that :dependabot: matches Maven upstream behavior so this can be closed?
I realize there's an implicit feature request for making some bits of this pluggable, but as I mentioned above, the best place is the native package manager for this, and then when we shift over to that we can discuss ways to make it possible to also pull in plugins for native tooling. Although TBH even once it's pluggable it'd probably still require running Dependabot standalone yourself, as we're unlikely to pull in custom plugins in the standard install we would run within the Dependabot service on GitHub.

I think the original issue, although unresolved, is not dependabot's to resolve, based on how maven sees things. You can go ahead @jeffwidman and close it out. If something comes to light later on I can always re-open it.
I really appreciate the promptness of everyone's responses!

I agree. Thanks!

I think, based on a bit more testing with Maven, we should probably look it versioning > latest field and trust what's in there.
This is what I tried (probably there's an easier way to check this but I wasn't sure how to ask mvn: "tell me what you think it's the latest version"):

Set <version>[2.13.5.Final-redhat-00002,)</version> in the pom.xml file.
Run mvn install.
Observe both 2.13.5.Final-redhat-00002 and 2.13.5.SP1-redhat-00002 installed at ~/.m2/repository/...
Change pom.xml to <version>[2.13.5.SP1-redhat-00002,)</version>.
Clear ~/.m2.
Observe only 2.13.5.SP1-redhat-00002 installed.

So it seems author's can override order if they want to and mvn will respect that?
Doing this ourselves too has the added benefit that we don't need to do any sorting at all.

I was curious about how Gradle works, so I created https://github.com/edeandrea/quarkus-gradle-dependabot-test and enabled dependabot. I use the same version (2.13.5.Final-redhat-00002).
First thing I noticed @aloubyansky is that it does not work based on the way we structure our projects. It does not look in gradle.properties for things. On https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file I see this:

[3] Dependabot doesn't run Gradle but supports updates to the following files: build.gradle, build.gradle.kts (for Kotlin projects), and files included via the apply declaration that have dependencies in the filename. Note that apply does not support apply to, recursion, or advanced syntaxes (for example, Kotlin's apply with mapOf, filenames defined by property).

It seems that once I move things directly into settings.gradle and build.gradle, dependabot sees updates to settings.gradle (it opened https://github.com/edeandrea/quarkus-gradle-dependabot-test/pull/1)
So the documentation there should also include settings.gradle. Should it also examine gradle.properties?
This original problem does seem to exist with Gradle as well. See https://github.com/edeandrea/quarkus-gradle-dependabot-test/network/updates/601855201
updater | INFO <job_601855201> Checking if com.redhat.quarkus.platform:quarkus-bom 2.13.5.Final-redhat-00002 needs updating
  proxy | 2023/02/10 20:15:11 [024] GET https://repo.maven.apache.org:443/maven2/com/redhat/quarkus/platform/quarkus-bom/maven-metadata.xml
  proxy | 2023/02/10 20:15:11 [024] 404 https://repo.maven.apache.org:443/maven2/com/redhat/quarkus/platform/quarkus-bom/maven-metadata.xml
  proxy | 2023/02/10 20:15:11 [026] GET https://maven.repository.redhat.com:443/ga/com/redhat/quarkus/platform/quarkus-bom/maven-metadata.xml
  proxy | 2023/02/10 20:15:11 [026] 200 https://maven.repository.redhat.com:443/ga/com/redhat/quarkus/platform/quarkus-bom/maven-metadata.xml
updater | INFO <job_601855201> Latest version is 2.13.5.Final-redhat-00002
updater | INFO <job_601855201> No update needed for com.redhat.quarkus.platform:quarkus-bom 2.13.5.Final-redhat-00002

My guess is its for the same reason?

@deivid-rodriguez We as authors don't really control this metadata apart from release scheduling.
I just tried a simple install into my local Maven repo and here is what I got releasing 1.0.0 then 2.0.0 then 1.0.1:
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.acme</groupId>
  <artifactId>acme-app</artifactId>
  <versioning>
    <release>1.0.1</release>
    <versions>
      <version>1.0.0</version>
      <version>2.0.0</version>
      <version>1.0.1</version>
    </versions>
    <lastUpdated>20230210201325</lastUpdated>
  </versioning>
</metadata>

Notice, there is no latest. It might depend on a specific Maven repo manager what it will be.
@edeandrea yes, i'm pretty sure the reason is the same.

So that means we can't rely on maven-metadata.xml to tell anyone what the latest release of a particular major.minor version is. It's only tracking the latest release based on chronological order.

Right. Dependabot shouldn't change anything in that regard though.

@deivid-rodriguez We as authors don't really control this metadata apart from release scheduling.

I see, thanks for clarifying that. I found the docs here:
https://maven.apache.org/ref/3.9.0/maven-repository-metadata/repository-metadata.html#versioning
Indeed, it seems just chronological order.
So, my conclusions so far, Dependabot is getting this right and maven is getting this wrong??

So, my conclusions so far, Dependabot is getting this right and maven is getting this wrong??

I wouldn't say that, otherwise I shouldn't see a PR in my repo updating from 2.13.5.Final-redhat-00002 to 2.13.5.SP1-redhat-00002?

I wouldn't say that, otherwise shouldn't I see a PR in my repo updating from 2.13.5.Final-redhat-00002 to 2.13.5.SP1-redhat-00002?

Mmmm our conclusion was that in this case 2.13.5.Final-redhat-00002 is higher than 2.13.5.SP1-redhat-00002 so that would be a downgrade, no?

That's what maven thinks, but in reality SP1 is an uogrqde

Oh, sure, but Dependabot needs rules, it can't read library author's minds. If library foo latest version is 4.0.0, and foo's author releases 3.99.99 including new code with juicy features and fixes, Dependabot should not really propose an upgrade there. Instead library foo users should go bug library author and ask her to release the new code as 4.0.1.

Right. I think what we deduced was that dependabot's rules are consistent with maven's.

If we really think 2.13.5.SP1-redhat-00002 is an upgrade over 2.13.5.Final-redhat-00002, and this is a bug in Maven, then we should go ask Maven about this. But according to the docs mentioned by @soulus13 before, this looks like a feature.
However, I still think there's a bug in Maven anyways because it's actually choosing 2.13.5.SP1-redhat-00002 as the latest version.
So, there's two options:

This is a bug in maven version sorting (the result of https://github.com/dependabot/dependabot-core/issues/6637#issuecomment-1426137022 is buggy). Then maven needs to fix the bug, the documentation, and after that we should also fix it in Dependabot's side.

There's a bug in maven version selection (the result of https://github.com/dependabot/dependabot-core/issues/6637#issuecomment-1426268362 is buggy). Then maven needs to fix this and Dependabot does not need to change anything because it's getting this right.

However, I still think there's a bug in Maven anyways because it's actually choosing 2.13.5.SP1-redhat-00002 as the latest version.

Where are you getting that? Maven is choosing 2.13.5.Final-redhat-00002 as the latest version.
$ java -jar ~/.m2/repository/org/apache/maven/maven-artifact/3.8.4/maven-artifact-3.8.4.jar 2.13.5.SP1-redhat-00002 2.13.5.Final-redhat-00002

Display parameters as parsed by Maven (in canonical form and as a list of tokens) and comparison result:
1. 2.13.5.SP1-redhat-00002 -> 2.13.5.sp-1-redhat-2; tokens: [2, 13, 5, sp, [1, [redhat, [2]]]]
   2.13.5.SP1-redhat-00002 < 2.13.5.Final-redhat-00002
2. 2.13.5.Final-redhat-00002 -> 2.13.5-redhat-2; tokens: [2, 13, 5, [redhat, [2]]]

I tried to contact the Maven project about this and will post any updates I get, and link to a public discussion upstream about this if/when it's created.
I'll close this ticket for now, since this does not seem a Dependabot issue (at the moment). We can reopen if it turns out we need to fix anything on our side.

Where are you getting that? Maven is choosing 2.13.5.Final-redhat-00002 as the latest version, which is consistent with dependabot.

Maybe I did it wrong, but in https://github.com/dependabot/dependabot-core/issues/6637#issuecomment-1426268362 I tried an idea to figure out what mvn install considers the latest version. I first set <version>[2.13.5.Final-redhat-00002,)</version> as a requirement, which in my understanding means >= 2.13.5.Final-redhat-00002, and both versions were downloaded. Then I set <version>[2.13.5.SP1-redhat-00002,)</version> and only 2.13.5.SP1-redhat-00002 was downloaded. So I took that as some logic in mvn install is considering 2.13.5.SP1-redhat-00002 as higher.

Few responses to this thread:

correct: metadata/versioning/versions is chronological order of deployed version.
metadata/versioning/latest is considered in SNAPSHOT repositories only

Also, it seems it is (old) code that is confused, maven-resolver (former aether) does it right:

take this example https://github.com/apache/maven-resolver/blob/master/maven-resolver-demos/maven-resolver-demo-snippets/src/main/java/org/apache/maven/resolver/examples/FindNewestVersion.java
apply this patch https://gist.github.com/cstamas/523e618558146550a1cc48b792285492
and run it's main method (even within IDE)
produced output

------------------------------------------------------------
FindNewestVersion
Resolving metadata com.redhat.quarkus.platform:quarkus-bom/maven-metadata.xml from /home/cstamas/Worx/apache-maven/maven-resolver/target/local-repo (enhanced)
Resolved metadata com.redhat.quarkus.platform:quarkus-bom/maven-metadata.xml from /home/cstamas/Worx/apache-maven/maven-resolver/target/local-repo (enhanced)
Resolving metadata com.redhat.quarkus.platform:quarkus-bom/maven-metadata.xml from red-hat-enterprise-maven-repository (https://maven.repository.redhat.com/ga/, default, releases+snapshots)
Downloading: https://maven.repository.redhat.com/ga/com/redhat/quarkus/platform/quarkus-bom/maven-metadata.xml
Downloaded: https://maven.repository.redhat.com/ga/com/redhat/quarkus/platform/quarkus-bom/maven-metadata.xml (1010 B at 0.8 KB/sec)
Resolved metadata com.redhat.quarkus.platform:quarkus-bom/maven-metadata.xml from red-hat-enterprise-maven-repository (https://maven.repository.redhat.com/ga/, default, releases+snapshots)
Newest version 2.13.5.SP1-redhat-00002 from repository red-hat-enterprise-maven-repository (https://maven.repository.redhat.com/ga/, default, releases+snapshots)

Process finished with exit code 0

This means that version sorting (old) code in maven (as tested in comment https://github.com/dependabot/dependabot-core/issues/6637#issuecomment-1426137022) and maven-resolver disagree as well, and this may explain some subtle differences.
Created issue https://issues.apache.org/jira/browse/MNG-7690

Thanks a lot @cstamas!

Thanks @cstamas, I subscribed to that ticket :)

Hello @deivid-rodriguez did any progress get made with the Maven team on this? Seems to still be an issue with dependabot unfortunately (even though its not dependabot's actual problem).

Sorry I never got back to you, I no longer maintain dependabot. Looking at https://issues.apache.org/jira/browse/MNG-7690, I see no further activity, so I guess the answer is no...


Add option to run kubelet in host mount namespace

With the release of Rancher 2.0, development on v1.6 is only limited to critical bug fixes and security patches.


Deployment to Heroku error

Hello
first of all thanks for this amazing project
I don't know if I am wrong but I was trying to deploy gekko to Heroku and had some problems, it runs locally everything are fine. I created a Procfile with "web: node gekko.js"
$ heroku local

Everything runs normal, but when I deploy to Heroku:
$ git push heroku stable:master
$ heroku logs --app name_app -t

to see what is happening on remote server output is:
2016-11-21T14:22:09.576796+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):  Gekko v0.3.4 started
2016-11-21T14:22:09.582297+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):  I'm gonna make you rich, Bud Fox.
2016-11-21T14:22:09.582299+00:00 app[web.1]:
2016-11-21T14:22:09.582300+00:00 app[web.1]:
2016-11-21T14:22:09.586884+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):  Setting up Gekko in realtime mode
2016-11-21T14:22:09.586970+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):
2016-11-21T14:22:09.589600+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):  Setting up:
2016-11-21T14:22:09.589763+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):     Candle writer
2016-11-21T14:22:09.589853+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):     Store candles in a database
2016-11-21T14:22:09.684859+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):
2016-11-21T14:22:09.684862+00:00 app[web.1]:
2016-11-21T14:22:09.725249+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):  Setting up:
2016-11-21T14:22:09.725317+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):     Trading Advisor
2016-11-21T14:22:09.725387+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):     Calculate trading advice
2016-11-21T14:22:09.728704+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):     Using the trading method: RSI
2016-11-21T14:22:09.737581+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):    The trading method requests 1500 minutes of historic data. Checking availablity..
2016-11-21T14:22:09.739717+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):
2016-11-21T14:22:09.739719+00:00 app[web.1]:
2016-11-21T14:22:09.740426+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):    No usable local data available, trying to get as much as possible from the exchange..
2016-11-21T14:22:09.741520+00:00 app[web.1]: 2016-11-21 14:22:09 (INFO):    Preventing Gekko from requesting 1500 minutes of history.
2016-11-21T14:22:09.741726+00:00 app[web.1]: 2016-11-21 14:22:09 (DEBUG):   Fetching exchange data since 240 minutes ago
2016-11-21T14:22:10.136712+00:00 app[web.1]: 2016-11-21 14:22:10 (DEBUG):   Available exchange data:
2016-11-21T14:22:10.137018+00:00 app[web.1]: 2016-11-21 14:22:10 (DEBUG):     from: 239 minutes ago
2016-11-21T14:22:10.137175+00:00 app[web.1]: 2016-11-21 14:22:10 (DEBUG):     to: 0 minutes ago
2016-11-21T14:22:10.137249+00:00 app[web.1]: 2016-11-21 14:22:10 (DEBUG):   Unable to stitch datasets.
2016-11-21T14:22:10.137311+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):    Not seeding locally available data to the trading method.
2016-11-21T14:22:10.137396+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):    The exchange does not return enough data. NaN minutes are still missing.
2016-11-21T14:22:10.139657+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):  Setting up:
2016-11-21T14:22:10.139731+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):     Trader
2016-11-21T14:22:10.139812+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):     Follows the advice and create real orders.
2016-11-21T14:22:10.144510+00:00 app[web.1]: 2016-11-21 14:22:10 (DEBUG): getting balance & fee from Poloniex
2016-11-21T14:22:10.147404+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):
2016-11-21T14:22:10.147406+00:00 app[web.1]:
2016-11-21T14:22:10.466779+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):  trading at Poloniex ACTIVE
2016-11-21T14:22:10.466890+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):  Poloniex trading fee will be: 0.25%
2016-11-21T14:22:10.467059+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):  Poloniex portfolio:
2016-11-21T14:22:10.467403+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):     BTC: 0.000000000000
2016-11-21T14:22:10.467506+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):     USDT: 11.219357580000
2016-11-21T14:22:10.469013+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):  Setting up:
2016-11-21T14:22:10.469245+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):     Advice logger
2016-11-21T14:22:10.469320+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):
2016-11-21T14:22:10.473519+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):  Setting up:
2016-11-21T14:22:10.473656+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):     Profit Simulator
2016-11-21T14:22:10.473770+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):     Paper trader that logs fake profits.
2016-11-21T14:22:10.477619+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):
2016-11-21T14:22:10.477624+00:00 app[web.1]:
2016-11-21T14:22:10.504678+00:00 app[web.1]: 2016-11-21 14:22:10 (INFO):  Starting to watch the market: Poloniex /
2016-11-21T14:22:10.510031+00:00 app[web.1]: 2016-11-21 14:22:10 (DEBUG): scheduling ticks
2016-11-21T14:22:10.513544+00:00 app[web.1]: 2016-11-21 14:22:10 (DEBUG): Requested / trade data from Poloniex ...
2016-11-21T14:22:10.636960+00:00 app[web.1]: 2016-11-21 14:22:10 (DEBUG): Processing 200 new trades. From 2016-11-21 13:26:49 UTC to 2016-11-21 14:21:47 UTC. (an hour)
2016-11-21T14:22:30.530634+00:00 app[web.1]: 2016-11-21 14:22:30 (DEBUG): Requested / trade data from Poloniex ...
2016-11-21T14:22:30.647955+00:00 app[web.1]: 2016-11-21 14:22:30 (DEBUG): No new trades.
2016-11-21T14:22:50.540718+00:00 app[web.1]: 2016-11-21 14:22:50 (DEBUG): Requested / trade data from Poloniex ...
2016-11-21T14:22:50.670565+00:00 app[web.1]: 2016-11-21 14:22:50 (DEBUG): No new trades.
2016-11-21T14:23:07.208303+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-11-21T14:23:07.208303+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-11-21T14:23:07.301153+00:00 heroku[web.1]: Process exited with status 137
2016-11-21T14:23:07.314111+00:00 heroku[web.1]: State changed from starting to crashed

I was looking this error R10 on heroku and said: "This error is often caused by a process being unable to reach an external resource, such as a database, or the application doing too much work, such as parsing and evaluating numerous, large code dependencies, during startup"
Any ideas to fix this?

I haven't used Heroku in yaers, but looking at the docs:

Define a Procfile
This declares a single process type, web, and the command needed to run it. The name web is important here. It declares that this process type will be attached to the HTTP routing stack of Heroku, and receive web traffic when deployed.

And the error:

R10: A web process took longer than 60 seconds to bind to its assigned $PORT.

Heroku is a platform to host "node.js apps", but what they actually mean is node.js web APIs. So you push your code, you tell it what script to run and then Heroku will run your code and expects that have a web server up within 60 seconds of launch.

The problem is that gekko (stable branch) does not actually run a web server. So after 60 seconds heroku is killing it because it things it was unable to start. The logs show that Gekko started just fine, however after a minute heroku killed it.
As for solutions:

You can use a VPS provider that will give you your own (virtual) linux server, and run Gekko there (see here).
I am working on a new version of Gekko that will have a webserver (so in theory you should be able to run it on Heruko). It works way easier than the current one, since you don't have to do a lot of things on the commandline anymore. Read more in #489 (note, backtesting "should" work and I am working right now on running live gekko's).

I am closing this for now! Consider Heroku unsupported until the UI is stable.

You have to change from web to worker, adding a file named Procfile in your root folder and adding this line of code:
worker: node gekko

Then, you have to got to Resources of your heroku project and activate it and deactivate web.

yup my Procfile is
worker: node gekko.js -c config.js

with my package.json containing
"start": "node gekko.js --config config.js"

@EasyAsABC123
Awesome! So this is a way to run gekko CLI in heroku? And have you tested running the UI as well?

@askmike this does the CLI, i messed with the UI 1 time...i am sure i can get it working but it seems to want to use localhost:3000 even after i changed the .env file, i didn't search too hard since i use gekko for live trading.

albertolive thank you very match, it worked, this is additional info for other users:
heroku ps:scale web=0  in order to switch off web dynos
heroku ps:scale worker=1 in order to add worker dynos


npm notice with make compile

When I run make compile, I get the following notice:
npm notice
npm notice New minor version of npm available! 9.4.0 -> 9.5.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.5.1
npm notice Run npm install -g<EMAIL_ADDRESS>to update!
npm notice

Resolved in https://github.com/building-envelope-data/api/commit/9e755436d602f20c3b5865a8112f683a5724e9bc


Private repositories support

Hi there, I've been checking the code in this repo and couldn't think of a way of making this plugin available for private repositories.
Do you guys have any idea or plan to make this work with private repos?

It would have to derive the information locally, rather than scraping the website - totally feasible, but would need work to do so

I had a though on this, and the solution I came up with is not ideal.
The problem is that as far as I can see there is not GitHub API to retrieve the blame for a given file. This is somehow confirmed by the fact that if you search for blame in Octokit you get no results.  There seem to though an early access blame GraphQL API.
So this leaves us to have to retrieve the information locally, and this is where things slightly break.
You can get the list of committers for a file like this:
$ git shortlog -sne path/to/file
     4  Giovanni Lodi<EMAIL_ADDRESS>     2  Peter Parker<EMAIL_ADDRESS>     1  Tony Stark<EMAIL_ADDRESS>
We can also get the list of all the contributors to a repo via Octokit:
client = Octokit::Client.new(:access_token => '...')
contributors = client.contributors('danger/danger')

This API only returns partial information about the users, but we can use the login property to get the actual user object.
contributors.map { |c| c[:login] }.each do |login|
  user = client.user(login)
end

This is how my user looks
mokagio = client.user('mokagio')
puts "#{mokagio.login} - #{mokagio.name} - #{mokagio.email}"
# => mokagio - Giovanni Lodi -
#                              ^ the email is nil! 😱

My email is nil because I chose not to show it publicly in the GitHub settings, as I'm assuming many other user would do to avoid spamming.
So, we have a way to get an array of name + emails of committers to each file, and we can use them to get their GitHub username, which we can then insert in the Danger message. But ☝ , that works only if the information on GitHub is in sync with the Git user.name and user.email.
I wouldn't be surprised if many users had a different name and email from the one they used in their Git configuration.
Does this approach make sense? It's not very robust hey 😞 . Does anyone know if there's better API that we could use?
One option could be to use this only for private repos, and use web scraping for public ones?

Depending on depth that you want to go into it, you could potentially look for the last commit by the email provided, then use the GitHub API for that one commit to see if you have any GitHub account metadata for the email too?

Hey @mokagio after a quick search I've found something that may be useful to get the commiters.
What if you get the list of all commits containing the specific file in repository. In the response you'll receive the commit object which contains the information about commiter.
Please correct me If I'm wrong with assumption 😄

Thanks @orta and @Antondomashnev for the feedback.
In particular thanks to @Antondomashnev I found that Octokit provides a .commits(repo, path: '/path/to/file') which I'm able to use to get an array objects like:
{ author: '@mokagio', commits_count: 42 }

Which we can use to suggest reviewers base on commits count or most recent authors.
I'll submit a PR soonish.
Thanks again 😄 .

rock

Hey @mokagio do you have any half-baked PR that someone could take over or do we need to start from scratch here! Happy holidays! 🎄

Private, non enterprise github repos, do not currently work with danger runs on CI?  Is that a correct understanding?  Is it true that only Enterprise github repos are supported under CI?  My error in Jenkins when I try to post back to http://github.com/duncwa.


fix: check for proxied host before appending port

What kind of change does this PR introduce?
Bug fix
What is the current behavior?
Fixes https://github.com/supabase/storage/issues/543
What is the new behavior?
Avoids invalid URLs such as https://gateway.example.com/storage/v1:8000/upload/resumable/bWxxx where the ":8000" is inserted incorrectly.
Additional context
https://github.com/supabase/storage/pull/545 had partially fixed this

Hey @Obeyed usually the host header doesn't include any uri any specific reason why this change is needed?

You're right / that doesn't make much sense. It actually seems to be some left over "fix" on my end (seemingly no longer relevant). I don't remember where I got it from, but from some old github issue here in the repo. Anyway, thanks for pointing me in the right direction. Closing this.
Just for future reference, hopefully this helps others. These are the changes I made to make it all work as expected:
I added the KONG_PORT_MAPS=443:8000 environment variable in the docker-compose file for the kong service to help Kong set the right values for X-Forwarded-Port header, (see https://docs.konghq.com/gateway/latest/reference/configuration/#port_maps). Without the port_maps the forwarded port is set to the kong service's docker container port instead, which is not right when kong is behind a proxy.
I prepended the path /storage/v1 to the TUS_URL_PATH env, ie. TUS_URL_PATH: /storage/v1/upload/resumable, and
I updated the kong.yml config to not append the path /storage/v1 to the forwarded header on the storage service - it was like this (I don't remember why):
    plugins:
      - name: cors
      - name: request-transformer
        config:
          add:
            headers:
              - "Forwarded: host=$(headers.host)/storage/v1;proto=https"


Tls

Add TLS/Mutual SSL support

@skothari-tibco Can you remove all the other test files that have been changed? It would be better to just have the changes for this specific PR :)

All the changes to other files are due to go fmt. Would that be ok?

Would prefer to not touch a file that doesn't have any significance to this pr...

This PR can be merged after #27

@skothari-tibco  #27, was merged, can you cleanup this PR

It's ready for merge.


[WIP] DON'T MERGE - favour usage for slick profiles instead of driver

Hey @rcavalcanti thanks for your contribution. I have actually already included a part of these changes already. However your addition of profile = ${?jdbc-journal.slick.driver} is a good one.
Could you rebase your branch against the latest master and resolve the conflict? Then I will merge this PR

@WellingR rebased and conflict resolved

@WellingR I pushed a workaround for it.
Not yet sure we must take that path, but let's discuss it next week. I need a fresh mind on Monday to evaluate it.
Eventually, this is something we should try to solve in Slick itself.
We are facing this same issue in Lagom. The reason for that is because here and there (Lagom) we are providing default drivers in a reference.conf file. That's great for quick bootstrap, but now that we want / need to promote slick.profile over slick.driver we run the risk of overriding properties in production system.

A potential solution would be to comment the lines specifying the profile, driver (and perhaps also the other environment related settings such as url, user, password etc).
These commented lines serve as documentation in the reference conf file. But since we cannot provide sensible defaults, it it actually better to not provide these defaults at all.
I ran some of the tests where I removed the profile, which gives a good error message. The same holds if the url is not specified. Somehow if the jdbc driver is not specified the tests seem to pass, maybe slick determines this based on the url.
@rcavalcanti what do you think about this?

@WellingR I also think this is the best to do. I will adapt this PR accordingly and remove the workaround I added.
For the test, it may be that the are overriding those values which would explain why it still works. In any case, the test should define their own values and production code must not define defaults.

@WellingR I updated this PR.

removed workaround added ealier
commented out the database specific settings in reference.conf
removed references to boot2docker and docker (doesn't make sense to have it there)
minor tweaks in comments in reference.conf

BTW, this PR can be easily cherrypicked into akka-2.4 branch


Add log level to Printf method of the Logger interface

Currently it is not possible to define which log-level message has: info or warning or error.
Need to extend Printf method with logLevel variable. I can suggest PR.
It's a breaking change, but don't really see how such feature can be added without breaking change.

You can define your own custom logger, I think that's the thing to do. We send all logs through there, and then the user can choose too suppress them how they wish.

@wagslane for example I want to show only logs with errors. How do I know in my Sprintf implementation if message containing error or just some info?

To not make breaking API changes, we could just add all the prefixes to the
strings we log.
On Sat, Apr 23, 2022, 11:26 AM metalrex100 @.***> wrote:

@wagslane https://github.com/wagslane for example I want to show only
logs with errors. How do I know in my Sprintf implementation if message
containing error or just some info?
—
Reply to this email directly, view it on GitHub
https://github.com/wagslane/go-rabbitmq/issues/72#issuecomment-1107538579,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFHZKVOI7TUFEJ2KORAXGCTVGQXFXANCNFSM5UE6PSAQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

@wagslane so you suggest to make rewrite logs with prefixes with log level?
Before:
chManager.logger.Printf("attempting to reconnect to amqp server from error: %v", err)
chManager.logger.Printf("successfully reconnected to amqp server")

After:
chManager.logger.Printf("[Error]: attempting to reconnect to amqp server from error: %v", err)
chManager.logger.Printf("[Info]: successfully reconnected to amqp server")

?
So in my Printf implementation I will have to define message log-level by searching substring?
Possible solution, but guess you also understand that not really good.

Yeah, I don't love it either. I'll think about it some more
On Sat, Apr 23, 2022, 11:35 AM metalrex100 @.***> wrote:

@wagslane https://github.com/wagslane so you suggest to rewrite logs
with prefixes with log level?
Before:
chManager.logger.Printf("attempting to reconnect to amqp server from error: %v", err)
chManager.logger.Printf("successfully reconnected to amqp server")
After:
chManager.logger.Printf("[Error]: attempting to reconnect to amqp server from error: %v", err)
chManager.logger.Printf("[Info]: successfully reconnected to amqp server")
?
So in my Printf implementation I will have to define message log-level by
searching substring?
Possible solution, but guess you also understand that not really good.
—
Reply to this email directly, view it on GitHub
https://github.com/wagslane/go-rabbitmq/issues/72#issuecomment-1107540018,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AFHZKVPAA2NDVKJGFRLFAWLVGQYGXANCNFSM5UE6PSAQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

@wagslane I see here 2 possible solutions:

Add type LogLevel with constants and change Logger's interface method Sprintf to accept LogLevel type parameter:

type LogLevel string

const (
    Debug   = "debug"
    Info    = "info"
    Warning = "warning"
    Error   = "error"
)

type Logger interface {
    Printf(LogLevel, string, ...interface{})
}

The big question here is to have ...interface{} variadic param, because inside my Printf implementation I don't really know what will it contain and how I should handle it.

Change Logger interface to have separate methods for each log level:

type Logger interface {
    Debug(string)
    Info(string)
    Warn(string)
    Error(string)
}

type MyLogger struct {}

func (m MyLogger) Debug(s string) {
    // do nothing if Debug logs not needed
}

func (m MyLogger) Info(s string) {
    // implement
}

func (m MyLogger) Warn(s string) {
    // implement
}

func (m MyLogger) Error(s string) {
    // implement
}

I prefer 2-nd option. It is more clear and allow to easy suppress any log level.

@wagslane any updates here?

Implemented in 0.9

@wagslane so instead of further discussion you decided to close provided PR and just implement how you see it?

@metalrex100 Hey there! I was waiting for a couple weeks for your PR to be updated, but it was just sitting here with failing tests.
Yeah so I went ahead with the log levels, the variadic params should work just fine (same as the printf). You can see an example in the default standard logger if you're unsure how to use it.

@wagslane we were discussing the logger interface, my message was latest, you didn't answer, but just closed PR and implemented your solution 🫤


Feature Request: Linux init script

An init script would be nice!
Has someone done that already? Best

Thanks


[zh] Change scalability into 可伸缩性

Please describe why this term needs to be updated
Why this term needs to be updated? (briefly)
Distinguish word between Extention & Scalability.

Extention equals "可扩展性"
Scalability equals "可伸缩性"

Affect: #902 #897 #904
From: #902

https://github.com/cncf/glossary/blob/main/content/zh-cn/scalability.md
This needs to be addressed as well

acknowledge, i will raise a PR to refine exising translation


Support entry points (other than console_scripts)

I'm trying to decide how best to specify entry points for a package. I've come up with three possibilities, all of which have a drawback.

Look for a file called entry_points.txt next to flit.ini and use it if it exists. Downside is that I'm not entirely happy about using a file without being explicitly asked to, and without a way to point it to a different file.
Add a field to flit.ini to specify the location of the entry points file. Downside is that in most cases, it's fixed, meaningless boilerplate.
2a. Like 2, but default to 1 if none is specified. Nicer in some ways, but I feel it's even more strange to use a file without being asked to when there is a way to ask us.
Include the extra entry points within flit.ini. I can't think of any neat way of expressing them in INI config, though, and I'm not wild on changing the format just for that.

Ping @Carreau - any preferences, or better still, any amazing option that I've missed altogether?

Implemented with 2a.


don't show python extension install popup when autostarting kernels

Fixes #10011

[x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
[x] Title summarizes what is changing.
[x] Has a news entry file (remember to thank yourself!).
[ ] Appropriate comments and documentation strings in the code.
[ ] Has sufficient logging.
[ ] Has telemetry for feature-requests.
[ ] Unit tests & system/integration tests are added/updated.
[ ] Test plan is updated as appropriate.
[ ] package-lock.json has been regenerated by running npm install (if dependencies have changed).

Codecov Report

Merging #10015 (dc3f011) into main (addafd8) will decrease coverage by 0%.
The diff coverage is n/a.

@@          Coverage Diff           @@
##            main   #10015   +/-   ##
======================================
- Coverage     63%      63%   -1%
======================================
  Files        211      211
  Lines      10097    10097
  Branches    1611     1611
======================================
- Hits        6454     6450    -4
- Misses      3123     3130    +7
+ Partials     520      517    -3

Impacted Files
Coverage Δ

...rc/platform/common/dataScienceSurveyBanner.node.ts
65% <0%> (-6%)
:arrow_down:

...ommon/process/environmentActivationService.node.ts
70% <0%> (+<1%)
:arrow_up:


Add hbase periodic build job

This PR add a new hbase periodic job at UTC 10:00
Related-Bug: theopenlab/openlab#300

recheck

I do not see a request filed for this.

Hi @Melvin,
Thanks for reminding, already post an new issue(Test request) for this.
https://github.com/theopenlab/openlab/issues/300

recheck


Opt out DEVICE_GPU_XLA_JIT and DEVICE_XLA_GPU from ResizeNearestNeigh…

@sanjoy, this is the follow-up of our discussion.  This PR is mainly for discussion purpose at this moment.  I am also holding merging for PR (https://github.com/tensorflow/tensorflow/pull/30336), as it may not be necessary, if we decide to opt out GPU devices.
Dilation-based resizing may create huge convolution for CuDNN.  For example: nearest neighbor resizing from 16x256x256x16 to 16x512x512x16.  The sizes are reasonable.
The following transforms create giant convolutions:

TF2XLA elaborates nearest neighbor resizing into two 1-D convolutions with window size 1021x1, but requires dilation on feature by 511 (not dilation on kernel), i.e.
{ conv(16x256x256x16, 1x1021x1x16, dilation on feature by 511 in dim0) -> conv(16x512x256x16, 1x1x1021x16, dilation on feature by 511 in dim1) }
cudnn_conv_padding_legalization sees the feature dilation.  It removes the feature dilation from the conv and adds physical padding to the input features, because cudnn only has kernel, but not feature dilation, i.e.
{ pad(16x256x256x16, pad 510 zeros before, between, and after pixels in dim0) -> conv(16x131326x256x16, 1x1021x1x16) -> pad(16x512x256x16, pad 510 zeros before, between, and after pixels in dim1)->conv(16x512x131326x16, 1x1x1021x16) }
It causes an error because cudnn doesn't allow tensor to have more than 2G elements, while the first padded tensor has 8G and the second one 16G.

A possible solution is to use a GEMM-based interpolation approach to replace the dilation-based convolution one for some cases during Op::compile().  Before alternative resizing algorithm is available, how about opting out GPU from these OPs to avoid failing entire XLA?  For U-net using multiple resizing ops, leaving nearest neighbor resizing out of XLA doesn't cause observable slow down.

I didn't know about RecursiveCompilabilityChecker::OperationFilter::allow_slow_ops.  It is better way.  Please review the updated changes.


Consider changing focus provider management from input system to registrar

Describe the problem
In the current implementation of the input system and the mixed reality toolkit service locator, there is not a clean way to unregister the focus provider independently of the input system.
As it stands the focus provider is considered a core system in the service locator, but is registered as a dependency of the input system. Unregistering the focus provider does not allow for full cleanup (ex: marking the property value as null in the input system).
Describe the solution you'd like
Ideally, the focus provider and the input system could be decoupled and managed independently in the service locator / registrar. This would involve:

Moving the focus provider profile to be a peer of the other core systems
Add a FocusProvider accessor to the MixedRealityToolkit object
Update the input system to request the focus provider from the registry

Alternatively, the focus manager could be declassifed as a core system and made to be owned and managed by the input system.

Definitely support this. It would also highlight the possibility of - and hopefully encourage - writing custom focus providers.

@Railboy, am I reading correctly that you are supportive of making the focus provider a true peer of the other core services?

you are supportive of making the focus provider a true peer of the other core services?

@davidkline-ms Correct. At some point we'll have to call it quits with this proliferation of core services. But IMO this one makes sense. Its place in the current system obscures how important it is.

XRI provides focus in MRTK3; the XRInteractionManager provides a global store of interaction state and mediation between interactors and interactables.


Create Right Rotate An Array K times.cpp

Please star this repository to show your support, in the meantime I am reviewing your code.


JavaScript code optimization

Please review kubeinvaders.js and open me solvable issue to improve code

Some solvable issues:

Remove Duplicate Code for Repeated XMLHttpRequest Calls
Reduce Use of Global Variables
Replace var with const and let to avoid unintended bugs due to hoisting or scope.
Use Caching for DOM Element Lookups. Repeated use of document.getElementById() and jQuery lookups is inefficient.
Instead of constantly redrawing all aliens, only update and draw what has changed. Use a flag to track if positions or states have changed before redrawing.

Dear @P0203K
Thank you! I would like to start from reducing global variables. I will let you know.