Update isSupportedDomain

Pivotal story:
https://www.pivotaltracker.com/story/show/178482911
The method should check the supported domain zone by making a network call to the ProxyReader (or proxy) (except .zil)
This PR relies on #45  and should be merged after.

To make navigation on commits easier the base branch has been updated to #45, we will need to update it to uns once #45 is merged


Computing partial trace outputs for statevectors and density matrices

It would nice to have basic density matrix related functionalities that are part of basic quantum information theory computations (partial trace, entropy, fidelity, purity..)

@rajaiitp Could you please be more specific about the mathematical formulation of these ? Thanks.

Partial trace of qubits marked by index i,j
Partial trace_{ij}(rho_ijkl) =  Trace_{ij}(rho_ijkl) =Sum_{i=(0,1),j=(0,1)} rho_ijkl
Von-Neuman Entropy of density matrix
Entropy = - trace( rho log rho)
trace over all qubit indices.
Fidelity between 2 density matrices rho, sigma
Fidelity(rho,sigma) = (tr(sqrt(sqrt(rho)sigma sqrt(simga)))^2
here sqrt is defined as diagonalize, sqrt and undiagonalize
n_th purity of a density matrix rho,
Purity(n,rho) = tr(rho^n)

Hey @rajaiitp could you please make sure the formulae above are correct ? Thanks.

In my opinion, this could go with the introduction of a Result type.

@Roland-djee yes the formulae above are correct, just edited some brackets, didnt know we had support for latex on here. I dont know what a Result type is

@rajaiitp Is this still needed in qadence?
We could resolve this in qadence 2 using runtimes.

Rarely used. Its just a property of the state that sometimes people care to look into. (probably used once or twice so far at best)


Concurrency Strategy fails for timeout case - ThreadLocals not bounded to timeout thread

Hello guys,
I have a custom concurrency strategy that copy Spring RequestAttributes ThreadLocal to another Thread.
It's work very well for a case of Exception, fallback function is called OK, but for a timeout case when my Callable is called the concurrent thread doesn't have the Thread Locals and I get a exception from Spring.
The problem seems that wrapCallable must be called  before to set ThreadLocals to HystrixTimer Thread use it.
For now we will disable timeout feature, but would be nice that it works too for our threadlocal case:
Test case
package com.netflix.hystrix.timeout;

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletWebRequest;

import com.netflix.config.ConfigurationManager;
import com.netflix.hystrix.strategy.HystrixPlugins;

public class CircuitBreakerThreadIsolationTimeoutTest {

	@Before
	public void setup() {
		RequestContextHolder.setRequestAttributes(new ServletWebRequest(new MockHttpServletRequest()));
		HystrixPlugins.getInstance().registerConcurrencyStrategy(new CustomConcurrencyStrategy());
		ConfigurationManager.getConfigInstance().setProperty("hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds", 1);
	}

	@Test
	public void mustCallFallbackOnTimeout() {
		String fallbackResponse = new MyHystrixCommand().execute();

		assertEquals("fallback", fallbackResponse);
	}
}

Custom Concurrent Strategy
package com.netflix.hystrix.timeout;

import java.util.concurrent.Callable;

import org.springframework.web.context.request.RequestContextHolder;

import com.netflix.hystrix.strategy.concurrency.HystrixConcurrencyStrategy;

public class CustomConcurrencyStrategy extends HystrixConcurrencyStrategy  {

	public <T> Callable<T> wrapCallable(final Callable<T> callable) {
		return new CustomCallable<>(callable, RequestContextHolder.currentRequestAttributes());
    }
}

Custom Callable
package com.netflix.hystrix.timeout;

import java.util.concurrent.Callable;

import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;

public class CustomCallable<T> implements Callable<T> {

	private final Callable<T> callable;
	private final RequestAttributes requestAttributes;

	public CustomCallable(final Callable<T> callable, final RequestAttributes requestAttributes) {
		this.callable = callable;
		this.requestAttributes = requestAttributes;
	}

	@Override
	public T call() throws Exception {
		try {
			RequestContextHolder.setRequestAttributes(requestAttributes);
			return callable.call();
		} finally {
			RequestContextHolder.resetRequestAttributes();
		}
	}
}

My Command
package com.netflix.hystrix.timeout;

import com.netflix.hystrix.HystrixCommand;
import com.netflix.hystrix.HystrixCommandGroupKey;
import com.netflix.hystrix.HystrixCommandKey;
import com.netflix.hystrix.HystrixThreadPoolKey;

public class MyHystrixCommand extends HystrixCommand<String> {

	public MyHystrixCommand() {
		super(Setter
				.withGroupKey(HystrixCommandGroupKey.Factory.asKey("GROUP"))
				.andThreadPoolKey(HystrixThreadPoolKey.Factory.asKey("THREAD-POOL"))
			    .andCommandKey(HystrixCommandKey.Factory.asKey("timeout-command")
			    ));
	}

	@Override
	protected String run() throws Exception {
		Thread.sleep(5);
		return "must not be called";
	}

	@Override
	protected String getFallback() {
		return "fallback";
	}

}

We have the same problem with spring sleuth tracing and hystrix.
If we use hystrix-core 1.5.11 it works and with 1.5.12 it fails. I think it is this commit that broke it https://github.com/Netflix/Hystrix/commit/951c6f9daa6dc469911b2e29a77fd85d90b4ab1e
The wrapCallable is being called on the timer thread in 1.5.12

Is there any progress on this? Apart from downgrading to 1.5.11, is there a workaround?

@whiskeysierra Maybe it's a bit overkill, but before finding this issue I implemented what's explained in #1653


probably resources leak when LOG_LEVEL=trace

Hi!
I've just faced up with significant resources consumption running turnserver-healthcheck as docker-container with LOG_LEVEL=trace
Pay attention to the "File Descriptors used" & CPU usage metrics, as well as memory:

1st peak was produced by sending ~20 requests once per minute
2nd and 3rd ~5 requests once per minute.
The resource consumption reset when the container was restarted.
After disabling LOG_LEVEL=trace I can't see any troubles running ~30 checks per minute for more than 1.5 hrs
Host environment: t3.medium instance in AWS (2CPU, 4G RAM), Amazon Linux 2
Have a nice day!

Hello,
thank you for reporting! I will take a look at the issue.


Documentation : Using SQLite for Testing

Additional section with instructions on running tests using in memory SQLite,   This makes running tests around 20 times faster.

It might be better to leave "dev only" code out of the core project.
In my local environment I have the following in my _ss_environment.php file, and doesn't touch local code.
// Select DB connector
if(!defined('SS_DATABASE_CLASS')) {
	if (php_sapi_name() == "cli") {
		// Testing dev db config
		define('SS_DATABASE_CLASS', 'SQLite3Database');
		define('SS_SQLITE_DATABASE_PATH', ':memory:');
		define('SS_DATABASE_USERNAME', 'root');
		define('SS_DATABASE_PASSWORD', '');
	} else {
		// Standard dev db config
	}
}

That does make perfect sense :)

I think your code is probably ok for testing. ;) It adds value so lets merge it in!


add ignore_network_errors_at_startup

This change is revival of #735, for v0.14 out_forward.
This parameter is used for the case: deployment systems will create the DNS records of hosts in <server>.

@repeatedly Could you review this change?

@repeatedly ping

Really?
I got following error and stopped timer.
2017-01-05 16:25:30 +0900 [info]: adding match pattern="forward.**" type="forward"
2017-01-05 16:25:30 +0900 [info]: adding forwarding server 'fooooobarrrr:24444' host="fooooobarrrr" port=24444 weight=60 plugin_id="object:3ff48a97a9dc"
2017-01-05 16:25:30 +0900 [warn]: failed to resolve node name when configured server="fooooobarrrr" error_class=SocketError error="getaddrinfo: nodename nor servname provided, or not known"
2017-01-05 16:25:30 +0900 [info]: adding match pattern="**" type="null"
2017-01-05 16:25:30 +0900 [info]: adding source type="forward"
2017-01-05 16:25:30 +0900 [info]: using configuration file: <ROOT>
  <source>
    @type forward
  </source>
  <match forward.**>
    @type forward
    flush_interval 5s
    ignore_network_errors_at_startup true
    retry_limit 4
    max_retry_wait 4
    <server>
      host "fooooobarrrr"
      port 24444
    </server>
    <buffer tag>
      flush_interval 5s
      retry_max_times 4
      retry_max_interval 4
    </buffer>
  </match>
  <match **>
    @type null
  </match>
</ROOT>
2017-01-05 16:25:30 +0900 [info]: starting fluentd worker pid=31724 ppid=31696 worker="0"
2017-01-05 16:25:30 +0900 [info]: delayed_commit_timeout is overwritten by ack_response_timeout
2017-01-05 16:25:30 +0900 [info]: fluentd worker is now running
2017-01-05 16:25:31 +0900 [error]: Unexpected error raised. Stopping the timer. title=:out_forward_heartbeat_request error_class=SocketError error="getaddrinfo: nodename nor servname provided, or not known"
  2017-01-05 16:25:31 +0900 [error]: /Users/repeatedly/dev/fluentd/fluentd/lib/fluent/plugin/out_forward.rb:607:in `getaddrinfo'
  2017-01-05 16:25:31 +0900 [error]: /Users/repeatedly/dev/fluentd/fluentd/lib/fluent/plugin/out_forward.rb:607:in `resolve_dns!'
  2017-01-05 16:25:31 +0900 [error]: /Users/repeatedly/dev/fluentd/fluentd/lib/fluent/plugin/out_forward.rb:593:in `resolved_host'
  2017-01-05 16:25:31 +0900 [error]: /Users/repeatedly/dev/fluentd/fluentd/lib/fluent/plugin/out_forward.rb:569:in `send_heartbeat'
  2017-01-05 16:25:31 +0900 [error]: /Users/repeatedly/dev/fluentd/fluentd/lib/fluent/plugin/out_forward.rb:340:in `block in on_timer'
  2017-01-05 16:25:31 +0900 [error]: /Users/repeatedly/dev/fluentd/fluentd/lib/fluent/plugin/out_forward.rb:333:in `each'
  2017-01-05 16:25:31 +0900 [error]: /Users/repeatedly/dev/fluentd/fluentd/lib/fluent/plugin/out_forward.rb:333:in `on_timer'
  2017-01-05 16:25:31 +0900 [error]: /Users/repeatedly/dev/fluentd/fluentd/lib/fluent/plugin_helper/timer.rb:77:in `on_timer'
  2017-01-05 16:25:31 +0900 [error]: /Users/repeatedly/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/cool.io-1.4.5/lib/cool.io/loop.rb:88:in `run_once'
  2017-01-05 16:25:31 +0900 [error]: /Users/repeatedly/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/cool.io-1.4.5/lib/cool.io/loop.rb:88:in `run'
  2017-01-05 16:25:31 +0900 [error]: /Users/repeatedly/dev/fluentd/fluentd/lib/fluent/plugin_helper/event_loop.rb:77:in `block in start'
  2017-01-05 16:25:31 +0900 [error]: /Users/repeatedly/dev/fluentd/fluentd/lib/fluent/plugin_helper/thread.rb:66:in `block in thread_create'
2017-01-05 16:25:31 +0900 [error]: Timer detached. title=:out_forward_heartbeat_request

Oops, I misunderstood the problem... (and the former pull-request also doesn't solve this problem).

@repeatedly I pushed a commit for that case.

@repeatedly hey

@repeatedly pushed updated commits.

LGTM


getstakereport crashes with SIGABRT in debug build

Running getstakereport on 0.20.17 release candidate built with --enable-debug causes a crash with SIGABRT here: https://github.com/pocketnetteam/pocketnet.core/blob/feature/sqlite/src/sync.cpp#L161
I recall seeing this crash back even with reindexer so I do not think this is a new issue.
stack:
Thread 10 "pocketcoin-http" received signal SIGABRT, Aborted.
[Switching to Thread 0x7f5aad60a700 (LWP 278982)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007f5ab37b9859 in __GI_abort () at abort.c:79
#2  0x0000563a8f008da1 in AssertLockHeldInternal (pszName=pszName@entry=0x563a8f231fea "cs_main",
    pszFile=pszFile@entry=0x563a8f30ad03 "wallet/wallet.cpp", nLine=nLine@entry=4316, cs=0x563a8f5046c0 <cs_main>) at sync.cpp:161
#3  0x0000563a8ef05e16 in CMerkleTx::GetDepthInMainChain (this=this@entry=0x563a9df176f0) at wallet/wallet.cpp:4316
#4  0x0000563a8eebdac6 in GetsStakeSubTotal (aRange=std::vector of length 35, capacity 64 = {...}) at wallet/rpcwallet.cpp:4121
#5  0x0000563a8eec2422 in getstakereport (request=...) at wallet/rpcwallet.cpp:4247
#6  0x0000563a8eabd593 in CRPCTable::execute (this=this@entry=0x563a909be328, request=...) at rpc/server.cpp:457
#7  0x0000563a8eda007c in HTTPSocket::HTTPReq (this=<optimized out>, req=req@entry=0x563ab1b21fe0, table=...) at httpserver.cpp:789
#8  0x0000563a8ed984ba in HTTPReq_JSONRPC (req=0x563ab1b21fe0) at httprpc.cpp:126
#9  0x0000563a8ea8aa8b in std::_Function_handler<bool (HTTPRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), bool (*)(HTTPRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>::_M_invoke(std::_Any_data const&, HTTPRequest*&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (
    __functor=..., __args#0=<optimized out>, __args#1=...) at /usr/include/c++/9/bits/std_function.h:88
#10 0x0000563a8eda2d2c in std::function<bool (HTTPRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>::operator()(HTTPRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const (
    this=this@entry=0x563ab0cf0f00, __args#0=<optimized out>, __args#0@entry=0x563ab1b21fe0, __args#1="")
    at /usr/include/c++/9/bits/std_function.h:263
#11 0x0000563a8eda2d88 in HTTPWorkItem::operator() (this=0x563ab0cf0ed0, dbConnection=...) at ./httpserver.h:237
#12 0x0000563a8eda1375 in WorkQueue<HTTPClosure>::Run (selfDbConnection=<optimized out>, this=0x563a90a49760)
    at /usr/include/c++/9/bits/unique_lock.h:103
#13 HTTPWorkQueueRun (queue=0x563a90a49760, selfDbConnection=<optimized out>) at httpserver.cpp:374
#14 0x0000563a8eda1db3 in std::__invoke_impl<void, void (*)(WorkQueue<HTTPClosure>*, bool), WorkQueue<HTTPClosure>*, bool> (
    __f=<optimized out>) at /usr/include/c++/9/bits/invoke.h:89
#15 std::__invoke<void (*)(WorkQueue<HTTPClosure>*, bool), WorkQueue<HTTPClosure>*, bool> (__fn=<optimized out>)
    at /usr/include/c++/9/bits/invoke.h:95
#16 std::thread::_Invoker<std::tuple<void (*)(WorkQueue<HTTPClosure>*, bool), WorkQueue<HTTPClosure>*, bool> >::_M_invoke<0ul, 1ul, 2ul>
    (this=<optimized out>) at /usr/include/c++/9/thread:244
#17 std::thread::_Invoker<std::tuple<void (*)(WorkQueue<HTTPClosure>*, bool), WorkQueue<HTTPClosure>*, bool> >::operator() (
    this=<optimized out>) at /usr/include/c++/9/thread:251
#18 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(WorkQueue<HTTPClosure>*, bool), WorkQueue<HTTPClosure>*, bool> > >::_M_run (this=<optimized out>) at /usr/include/c++/9/thread:195
#19 0x00007f5ab3bc8de4 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#20 0x00007f5ab42f6609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#21 0x00007f5ab38b6293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

frame 2 locals and args:
(gdb) frame 2
#2  0x0000563a8f008da1 in AssertLockHeldInternal (pszName=pszName@entry=0x563a8f231fea "cs_main",
    pszFile=pszFile@entry=0x563a8f30ad03 "wallet/wallet.cpp", nLine=nLine@entry=4316, cs=0x563a8f5046c0 <cs_main>) at sync.cpp:161
161     sync.cpp: No such file or directory.
(gdb) info args
pszName = 0x563a8f231fea "cs_main"
pszFile = 0x563a8f30ad03 "wallet/wallet.cpp"
nLine = 4316
cs = 0x563a8f5046c0 <cs_main>
(gdb) info locals
No locals.

frame 3 locals and args:
(gdb) frame 3
#3  0x0000563a8ef05e16 in CMerkleTx::GetDepthInMainChain (this=this@entry=0x563a9df176f0) at wallet/wallet.cpp:4316
4316    wallet/wallet.cpp: No such file or directory.
(gdb) info args
this = 0x563a9df176f0
(gdb) info locals
pindex = <optimized out>

@tawmaz  Do you have conditions or steps to reproduce?

Here is the my setup:
AMD Epyc 4 core, 8GB RAM

Fully synced and staking enabled
0.20.17 release candidate configured with --enable-debug
conf file:

# Enable public API interfaces
api=1
wsuse=1
daemon=1

# Setting ports
publicrpcport=38081
wsport=8087

# Setting work queue and threads
rpcpublicworkqueue=3000
rpcpublicthreads=30
rpcpostworkqueue=1500
rpcpostthreads=15

Fix which I think we should hold for 0.20.18 release: https://github.com/pocketnetteam/pocketnet.core/pull/131

Fix which I think we should hold for 0.20.18 release: #131

Why do you think it should be moved to 0.20.18? I think this is a good change for 0.20.17

I would need to restart 0.20.17 testing from the beginning if we accept this patch.  It is a simple patch but there is always the possibility of introducing deadlocks or other serious issue.
As far as impact to the community this issue is only visible in debug builds so I think it is okay to wait a few weeks for release.

This fix is being migrated to version 0.20.18


feat(generic): add basic tab completion for top level commands

ISSUES CLOSED: #49
This is just super basic tab completion (just the top level commands).  It looks kind of like this

Blocked by https://github.com/mklabs/node-tabtab/pull/30/files


Updating 1.5 RNs with support for NSX-T v2.5

Please merge for staging. Thank you.

Thanks, @lparis.


#12 Refactored _getCommand to only match complete commands

This modification should sort out the issue mentioned in issue #12. The regex now only matches the complete command or alias. Before it was matching any pattern up to the full command name.
E.G "h" -> "help"
"he" -> "help"
"ha" -> "halp"
"g" -> "gem"
etc.

Changes Unknown when pulling d541a9882925194ae1ab064666aa336998fc3961 on jamesallenuk:master into ** on ggauravr:master**.

hey @jamesallenuk thanks a lot for helping out with this one! Can you add some positive and negative unit tests to make sure this works as expected. Since it's been a while I worked on this, the unit tests would help assess if the regex works as expected and would make it easier to point out some cases where it could potentially fail!

Hey there. Ah good idea. I'll see what I can do. I'm away for a long weekend from tomorrow but will have a look once I'm back. Thanks for creating this and the sample app btw - really quick to get a bot up and running.

So glad to hear it's easy to get up and running! That was the goal of the module. Please share it to more people if you've found this helpful 😃


Behaviours/Plans with identical names

It is currently possible to create Behaviours and possibly Plans/other elements with identical names.

Done :+1:


[Jest 24+] [TypeScript] Current React Native preprocessor for Jest does not support TypeScript syntax

🐛 Bug Report
Jest does not run tests written in TypeScript with the preprocessor provided by React Native in
'RNRootFolder/jest/preprocessor.js'
React Native: 0.58.3
Jest: 24.0.0
Jest has introduced support to run unit tests written in TypeScript in version 24.
ts-jest got outdated because of it, i.e. You are not able to use ts-jest anymore with Jest 24.
For a proposed solution, please see below.
To Reproduce
Create a project written in TypeScript using the default babel preset: 'metro-react-native-babel-preset'.
Expected Behavior
Jest should be able to run unit tests written in TypeScript using the provided preprocessor by React Native.
Code Example
Proposed solution. Modify 'preprocessor.js' to transform TypeScript into ECMAScript 6, this is working fine.
 transformer.transform({
 ...

 plugins: [
        **[require("@babel/plugin-transform-typescript")]**
        ...
    ]

)};

Proposed Babel plugin to be added:
https://www.npmjs.com/package/@babel/plugin-transform-typescript
Environment
React Native Environment Info:
System:
OS: macOS 10.14.3
CPU: (4) x64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
Memory: 40.08 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 8.11.2 - /usr/local/bin/node
npm: 6.7.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 22, 23, 24, 26, 27, 28
Build Tools: 27.0.3, 28.0.3
System Images: android-19 | Intel x86 Atom, android-19 | Google APIs Intel x86 Atom, android-22 | ARM EABI v7a, android-22 | Intel x86 Atom, android-22 | Intel x86 Atom_64, android-22 | Google APIs ARM EABI v7a, android-22 | Google APIs Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.3 AI-182.5<IP_ADDRESS>99772
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.7.0 => 16.7.0
react-native: 0.58.3 => 0.58.3
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-rename: 2.2.2

Use ts-jest.
See documentation.

I'd love to help with this one. Any thoughts or direction other than the proposed solution?

Hmm, it seems like doesn't use the project babel config (in this case metro-react-native-babel-preset), but has its own list. I wonder if we could require in metro-react-native-babel-preset there, instead of having a lists of plugins, and then call that. That way they would stay in sync.
Otherwise we could probably add typescript support similar as how it's done here: https://github.com/facebook/metro/blob/0e22250d28932716243ec1923db76b9866a5d556/packages/metro-react-native-babel-preset/src/configs/main.js#L172-L183

@rreina I tried reproducing this, I didn't have any luck. Here is what I did.

react-native init TestJestTs --template typescript
yarn test

Here is the reproduction: https://github.com/AndreiCalazans/TestJestTs
@LinusU I think it does use metro-react-native-babel-preset, or at least the the typescript template does. See jest config and dependency

Closing this as we've used babel-jest for .ts and .tsx for some time (years?) now - please open a new issue if you still have issues with TypeScript and React Native's Jest preset.


os: ambiguous mode/perm documentation for Create and OpenFile

What version of Go are you using (go version)?

$ go version
go version go1.12 linux/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/klauer/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/klauer/src/go"
GOPROXY=""
GORACE=""
GOROOT="/home/klauer/opt/go"
GOTMPDIR=""
GOTOOLDIR="/home/klauer/opt/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build968558791=/tmp/go-build -gno-record-gcc-switches"

What did you do?
Run this test program:
package main

import "os"

func main() {
        file, err := os.OpenFile("foo.dat", os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0600)
        if err != nil { panic("1") }
        file.Close()

        file, err = os.Create("foo.dat")
        if err != nil { panic("2") }
        file.Close()

        file, err = os.Create("bar.dat")
        if err != nil { panic("3") }
        file.Close()

        file, err = os.OpenFile("bar.dat", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
        if err != nil { panic("4") }
        file.Close()
}

What did you expect to see?
The documentation for os.Create says:

Create creates the named file with mode 0666 (before umask), truncating it if it already exists. […]

This reads as if mode 0666 always applies.
Likewise, the documentation for os.OpenFile says:

[…] It opens the named file with specified […] perm (before umask), if applicable. […]

This might also lead one to expect that perm is applicable with, e. g., O_CREATE and O_TRUNC.
Hence, one would expect:

$ umask
0022
$ ls -l
-rw------- 1 klauer klauer       0 Feb 26 10:53 bar.dat
-rw-r--r-- 1 klauer klauer       0 Feb 26 10:53 foo.dat

What did you see instead?
The actual behaviour is in line with the analogous flags for the open() function from the POSIX standard:

$ umask
0022
$ ls -l
-rw-r--r-- 1 klauer klauer       0 Feb 26 10:53 bar.dat
-rw------- 1 klauer klauer       0 Feb 26 10:53 foo.dat

The POSIX standard makes it explicitly clear that the mode remains unchanged when the file already exists:

O_CREAT    If the file exists, this flag has no effect except as noted under O_EXCL below.

O_TRUNC    If the file exists and is a regular file, and the file is successfully opened O_RDWR or O_WRONLY, its length shall be truncated to 0, and the mode and owner shall be unchanged.

I suggest the go documentation is likewise explicit. For example I would change the os.Create docs:

Create creates the named file with mode 0666 (before umask), truncating it if it already exists.

to:

Create creates the named file with mode 0666 (before umask) if it does not already exist. If it already exists, it is truncated and the mode remains unchanged.

and the os.OpenFile docs:

It opens the named file with specified flag (O_RDONLY etc.) and perm (before umask), if applicable.

to

It opens the named file with specified flag (O_RDONLY etc.). The perm is applied (before umask) only if a new file is created, and is otherwise ignored.

It just occurred to me that os.MkdirAll might suffer from the same ambiguity, but I just checked and this is not the case.

/cc @ianlancetaylor

Cool, thanks! Commit 3995bc007d94f6923d79f3b18089dab2caaa4580 on googlesource.com contains two typos:

son → on
umark → umask

I can't seem to comment directly on that commit.

One cannot comment directly on the googlesource site. Please feel free to comment on gerrit, which is our code review tool. Use this link - https://go-review.googlesource.com/c/go/+/163744/

Thanks, updated the CL with typo fixes.


Add South Louisiana Community College

Add South Louisiana Community College
https://www.solacc.edu
https://www.solacc.edu/academics/programs-offered/application-software-development/index https://www.solacc.edu/students/technology-resources

@michaelcherrera84 Thank you for your patience while waiting for a review and processing your request. Pull request merged. Please start applying for JetBrains educational subscription at https://www.jetbrains.com/shop/eform/students in an hour, to allow the changes to propagate through JetBrains systems.


ValueError: invalid literal for int() with base 16: '0394,2206'

Trying to build Roboto-Arabic with fontmake gives me the following error:
$ fontmake -g sources/Roboto.glyphs -o otf
INFO:fontmake.font_project:Building master UFOs and designspace from Glyphs source
INFO:glyphsLib:Parsing .glyphs file
INFO:glyphsLib:Casting parsed values
Traceback (most recent call last):
  File "/home/khaled/.local/bin/fontmake", line 11, in <module>
    sys.exit(main())
  File "/python3.6/site-packages/fontmake/__main__.py", line 183, in main
    project.run_from_glyphs(glyphs_path, **args)
  File "/python3.6/site-packages/fontmake/font_project.py", line 376, in run_from_glyphs
    glyphs_path, family_name, mti_source=mti_source)
  File "/python3.6/site-packages/fontTools/misc/loggingTools.py", line 372, in wrapper
    return func(*args, **kwds)
  File "/python3.6/site-packages/fontmake/font_project.py", line 77, in build_master_ufos
    family_name=family_name)
  File "/python3.6/site-packages/glyphsLib/__init__.py", line 89, in build_masters
    filename, include_instances=True, family_name=family_name)
  File "/python3.6/site-packages/glyphsLib/__init__.py", line 65, in load_to_ufos
    data = load(ifile)
  File "/python3.6/site-packages/glyphsLib/__init__.py", line 42, in load
    return loads(fp.read())
  File "/python3.6/site-packages/glyphsLib/__init__.py", line 53, in loads
    cast_data(data)
  File "/python3.6/site-packages/glyphsLib/casting.py", line 525, in cast_data
    _convert_data(data, True, _TYPE_STRUCTURE)
  File "/python3.6/site-packages/glyphsLib/casting.py", line 541, in _convert_data
    _convert_data(cur_data, to_typed, cur_type)
  File "/python3.6/site-packages/glyphsLib/casting.py", line 543, in _convert_data
    data[key] = cur_type.convert(data[key], to_typed)
  File "/python3.6/site-packages/glyphsLib/casting.py", line 82, in convert
    return self.read(data) if to_typed else self.write(data)
  File "/python3.6/site-packages/glyphsLib/casting.py", line 170, in read
    return int(src, 16)
ValueError: invalid literal for int() with base 16: '0394,2206'

Apparently caused by one of the glyphs having unicode = "0394,2206"; and it seems glyphsLib does not like that.

https://github.com/googlei18n/glyphsLib/issues/216


run npm audit fix

run npm audit fix to bump vulnerable libraries .
$ npm audit fix
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

removed 1 package in 3.079s

17 packages are looking for funding
  run `npm fund` for details

fixed 543 of 832 vulnerabilities in 632 scanned packages
  2 package updates for 289 vulnerabilities involved breaking changes
  (use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually)

Thanks!


[Bug]: First message to custom endpoint does not retrieve final chunk

What happened?
I use a custom API integrated in libreChat. For using it I have configured a custom Endpoint. When I start a conversation with the my API, the first assistant prompt (the first response) hangs on the UI and I have to click the "stop" button to continue. All other responses are fine, only the first one hangs.
In the network tab I see that the first response does not have the final chunk received.
I debugged my API and I am sure that my API returns the last chunk (data:[DONE])
Steps to Reproduce

Activate librechat.yaml for custom endpoints
Setup a custom endpoint to an OpenAI Compatible API
Select the new API for a new conversation
Ask it a question (invoke /chat/completions endpoint)
Observe the UI when answer is streamed - it hangs waiting for other chunks where no other chunks are delivered from the custom API

What browsers are you seeing the problem on?
No response
Relevant log output
No response
Screenshots

After I click the stop button next to the prompt field, the conversation continues normally for all other messages:

Screenshots of the Network tab: the first message does not receive the last part with chunk marked as finel

After the first message, all others continue normally and receive their final = true message

Code of Conduct

[X] I agree to follow this project's Code of Conduct

I now saw that when the end of the first response occurs, there is an error in the librechat log file:
{"level":"error","message":"There was an uncaught error: stream ended without producing a ChatCompletionMessage with role=assistant","stack":"Error: stream ended without producing a ChatCompletionMessage with role=assistant\n    at ChatCompletionStream._AbstractChatCompletionRunner_getFinalMessage (/app/api/node_modules/openai/lib/AbstractChatCompletionRunner.js:322:11)\n    at ChatCompletionStream._emitFinal (/app/api/node_modules/openai/lib/AbstractChatCompletionRunner.js:103:152)\n    at /app/api/node_modules/openai/lib/EventStream.js:52:22\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"} {"level":"error","message":"\n\nAn Uncaught OpenAIErrorerror may be due to your reverse-proxy setup or stream configuration, or a bug in theopenai` node package."}
On the next responses in the same conversation there is no such error.
This is the python code that returns the response into chunks:
`async def _resp_async_generator(text_resp: str):
# let's pretend every word is a token and return it over time
tokens = text_resp.split(" ")
for i, token in enumerate(tokens):
    chunk = {
        "id": i,
        "object": "chat.completion.chunk",
        "created": time.time(),
        "model": "jarvis-1.0",
        "choices": [{"delta": {"content": token + " "}}],
    }
    # Log the chunk
    print(f"Chunk {i}: {json.dumps(chunk)}")
    yield f"data: {json.dumps(chunk)}\n\n"
    await asyncio.sleep(0.1)
# Log the end
print("Stream completed: [DONE]")
yield "data:[DONE]"`


Can not add SES303

My SES303 used to work, but stopped doing so some time ago. I removed the device and tried to add it again but that fails with the following error:
status.missing_multiChannelNodeId_1_on_node
Let me know if I can do something to help sort out this issue!

Are using the latest version? This issue should have been resolved
On 10 Apr 2021, 22:44 +0200, Arvid Rosen @.***>, wrote:

My SES303 used to work, but stopped doing so some time ago. I removed the device and tried to add it again but that fails with the following error:
status.missing_multiChannelNodeId_1_on_node
Let me know if I can do something to help sort out this issue!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

I'll check. Stand by ...

I'm using v0.5.4

Ah, sorry, I mixed up the devices. It was ssr303 that was resolved in the latest release.
Let me look into this tomorrow

Thanks! And please let me know if you need any further information.

@arvid-r Please try the latest test version (v0.5.5) here: https://homey.app/a/com.horstmann/test/

Thanks for the update!
I get a new error now:
status.missing_multiChannelNodeId_2_on_node

@Rocodamelshe are you still able to use your ses303?

@arvid-r , I made another update to v0.5.6, available as test now.
I'm sorry, since I don't have access to anything but the SRT321 I have not been able to verify (or debug) any other devices, so it is a bit of trial and error.

Still:
status.missing_multiChannelNodeId_2_on_node

The SES303 is working like it should. The attached multichannel device is not updating any temperature for now. Gonna try a re-add and let u know.

Hmm, this is odd. I’ll try some more...

Removed the SES303 on version 0.5.6 and added it again. Then i get this:

Ok, so at least there is some consistency between your setups.
I found this in the SES302/303 manual:
"Up to a maximum of five end points supported. The number of end points on the product is detected based on the number of external sensors connected to the product at the time of Inclusion.  If external sensor not connected this command class is not supported.  Note: external digital sensors must have correct hardware address otherwise it will not work."
I'm guessing @arvid-r  doesn't have any external sensors connected and @Rocodamelshe has one connected?

Correct for my part yes.

I guess I need to figure out how the configuration works "If external sensor not connected this command class is not supported.", and dynamically add the command class.

I have no sensor connected.

Let's try v0.5.7 in test now :)

Devices are added! Will let u know tonight if the sensor updates it’s values.

v0.5.7 works with my setup! Well done

Works like a charm, cheers m8!

You are trying to get me drunk @Rocodamelshe!
Thanks!


Routes is specified as both a pip and apt

routes in

files/pips/dashboard

python-rotues in

files/apts/keystone
files/apts/glance
files/apts/nova

Maybe someone with dashboard knowledge can ok moving to python-routes and put it in files/apts/general

xtoddx
we need to document better - but the goal is that we put apts/pips in the project they belong to.  So that those building packages could look at the file and install all of those in centos/redhat/suse/debian/... (so I don't want to move it to general - general is stuff like vim, git, screen, other tools that aren't needed for nova but helpful for devstack)
Regarding moving routes from files/pips/dashboard to files/apts/python-routes - that seems like a good idea

testing this fix in fin-dashboard branch

passes build tests, so I've pushed


docs: Cut 6.5 of docs

Codecov Report

Merging #2259 (f257efe) into master (13b260f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2259   +/-   ##
=======================================
  Coverage   98.22%   98.22%
=======================================
  Files         118      118
  Lines        1918     1918
  Branches      285      285
=======================================
  Hits         1884     1884
  Misses         16       16
  Partials       18       18

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Make icons internally available

Currently,  NSE icons are referenced externally:
WIND_ICONS = 'https://raw.githubusercontent.com/lcarlaw/meso/master/output/windicons.png'
SHEAR1_ICONS = 'https://raw.githubusercontent.com/lcarlaw/meso/master/output/shr1icons.png'
DEVTOR_ICONS = 'https://raw.githubusercontent.com/lcarlaw/meso/deviant-motion/output/devtor.png'
Suggestion: Make these internal to the cloud server app for better internal consistency, perhaps in a resources folder

I uploaded the three png files with this commit.  Do you know if there's a specific address associated with the web instance I should use in the placefiles?  I'm assuming an /assets/windicons.png at the top of the placefile won't work in GR.

Define the url to be the full https:// path and /assets/{subdirectory_if_needed}/{icon_filename}

https://github.com/tjturnage/cloud-radar-server/pull/29 addressed this.  Tested today and looks like they show up at the correct url.


added user ank13 which refers to ankush khobragade

Description

added a new uploader with jenkins account id ank13, github ID @ankk13. @xB-2048, Can you please approve it?
Submitter checklist for adding or changing permissions

Always

[ ] Add link to plugin/component Git repository in description above

For a newly hosted plugin only

[ ] Add link to resolved HOSTING issue in description above

For a new permissions file only

[ ] Make sure the file is created in permissions/ directory
[ ] artifactId (pom.xml) is used for name (permissions YAML file).
[ ] groupId / artifactId (pom.xml) are correctly represented in path (permissions YAML file)
[ ] Check that the file is named plugin-${artifactId}.yml for plugins

When adding new uploaders (this includes newly created permissions files)

[x] Make sure to @mention an existing maintainer to confirm the permissions request, if applicable
[x] Use the Jenkins community (LDAP) account name in the YAML file, not the GitHub account name
[x] Make sure to @mention the users being added so their GitHub account names are known if they require GitHub merge access (see below).
[x] All newly added users have logged in to Artifactory at least once

Reviewer checklist (not for requesters!)

[ ] Check this if newly added person also needs to be given merge permission to the GitHub repo (please @ the people/person with their GitHub username in this issue as well). If needed, it can be done using an IRC Bot command
[ ] Check that the $pluginId Developers team has Admin permissions while granting the access.
[ ] In the case of plugin adoption, ensure that the Jenkins Jira default assignee is either removed or changed to the new maintainer.
[ ] If security contacts are changed (this includes add/remove), ping the security officer (currently @daniel-beck) in this pull request. If an email contact is changed, wait for approval from the security officer.

There are IRC Bot commands for it

Permissions to @ankk13 are approved

@ankk13  please follow instructions in https://github.com/jenkins-infra/repository-permissions-updater/pull/2033/checks?check_run_id=3328334117

@timja Can you please validate this? @ankk13 logged into Jira as a pre-requisite.

@timja Can you please validate this? @ankk13 logged into Jira as a pre-requisite.

he hadn't as of 2 days ago, sorted now

Thanks @timja


Some questions about gitmint.

Hi! First of all, thank's for gateway and force HTTPS features, it's really good.
And there are some questions:

How i can add other languages to new translate feature? Just add export function language(Text) in translator.js, right?
Can u give some short instructions about use proxy_gateway? I want use that line in code: http.post('/login/oauth/access_token' intead of imsun gateway.
Can u rename Powered by on your link and add option on show/hide it or any another variant to hide it?

P.S. I want to integrate Gitmint into Hexo theme NexT, peoples ask for it.

Thanks for your attention.

Yes. add export function ..., and use it in your theme, ex: https://github.com/aimingoo/gitmint#language-translator

The API called in Gitmint at here . so, i'll replace of imsun gateway when you send proxy_gateway in options. ex: https://github.com/aimingoo/gitmint#proxy_gateway-support

I cant. because the original project's owner is imsun, please submit this request to @imsun. but if you wanna hide it only, you can add a  extend theme and a footerHidden option, ex:

// https://github.com/imsun/gitment#3-render-gitment
...
const gitment = new Gitment({
  ...
  footerHidden: true,
  theme: {
    renderFooter: function(state, instance) {
      return (! instance.footerHidden) ? instance.defaultTheme['renderFooter'](state, instance)
        : Object.assign(document.createElement('div’), { className: 'gitment-hidden' })
    }
  }
})

gitment.render('comments')

please affirm that from @imsun at https://github.com/imsun/gitment


[CIF-486] export useCartState (Cart Context) for external usage

Export Cart Context globally for use within CommerceApp.
Description
Code changes:
Within 'Minicart/index.js' export useCartState from './cartContext';
Within the main 'index.js' file, export useCartState from './components/Minicart';
Related Issue
Feature request https://github.com/adobe/aem-core-cif-components/issues/486
Motivation and Context
Currently, the MiniCart context [../components/Minicart/cartContext.js - line 133] is not exported for later use within the CommerceApp. The motivation behind this fix stems from a desire to add new components in the header for a external  business client that will require the current state of the Cart -- ie isOpen or other stored state values.
How Has This Been Tested?
Tested import of useCartState
Screenshots (if appropriate):
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[X] I have signed the Adobe Open Source CLA.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[X] I have read the CONTRIBUTING document.
[
Fixes #486 ] I have added tests to cover my changes and the overall coverage did not decrease.
[ ] All unit tests pass on CircleCi.
[X] I ran all tests locally and they pass.

The checks fail because CircleCI doesn't provide the credentials for PRs filed from a fork. I run the checks on the issues/CIF-486 branch and they are all green

thank you


ledger-live-desktop: 1.12.0 -> 1.15.0

Motivation for this change
Built with appimageTools.wrapType2 instead of wrapping appimage-run
Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

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

Notify maintainers
cc @

Looks good! Tested locally and works for me. It also looks like it resolved a segfault I had gotten with 1.12.0.

Cherry picked in 7f8e4170c53de3b81a912f045eba69cfb9a8541d


hns soft delete

Pull Request Checklist
Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:
See the detailed list in the contributing guide.

[ ] C++ Guidelines
[ ] Doxygen docs
[ ] Unit tests
[ ] No unwanted commits/changes
[ ] Descriptive title/description

[ ] PR is single purpose
[ ] Related issue listed

[ ] Comments in source
[ ] No typos
[ ] Update changelog
[ ] Not work-in-progress
[ ] External references or docs updated
[ ] Self review of PR done
[ ] Any breaking changes?

/azp run cpp - storage

/azp run cpp - storage

/azp run cpp - storage

Let's disable that one test case and take a note in https://github.com/Azure/azure-sdk-for-cpp/issues/3592

/azp run cpp - storage


Added TERRAIN_MASK_PLAIN = 0 const

Added TERRAIN_MASK_PLAIN constant

I'm a bit in doubt on whether to leave this PR or not. I understand why the flag might be missing, because doing any mask comparison against 0 will always succeed 1 & 0 == 0 will always be true. https://godbolt.org/z/72njn_
This would either mean, compare against 0, or compare value == TERRAIN_MASK_PLAIN instead of doing the value & TERRAIN_MASK_WALL == TERRAIN_MASK_WALL. Not having the constant might be more clear for users of the API.

The best(?) solution might be to change it to a bit flag (since that's what this actually is) and make the translation functions back and forth from JS.
Another one might be to change it to an enum and use a u8 representation, like the exits.
Thoughts @daboross ?

I'm not against adding this constant, but I'm not sure how useful it would be either?
Most of the terrain APIs should already deal with the enum screeps::Terrain - which won't use these at all. For the one exception (that I know of) RoomTerrain::get_raw_buffer(), I think we should be able to still use that enum with something like if u8_val == Terrain::Plain as u8 {, or if Terrain::from_u8(u8_val) == Ok(Terrain::Plain)?

If we do add it, I think it should be called something other than TERRAIN_MASK though, since it won't be usable as a bitmask. Maybe we could add three TERRAIN_PLAIN, TERRAIN_WALL and TERRAIN_SWAMP constants specifically for use with get_raw_buffer?
I think the game used to have terrain tiles which were both swamp and wall, and the mask-style constants reflected that (everything's a plain, but some things are also walls or swamps). But the RoomTerrain API, including the raw array, should never contain those values and it kind of treats them less like masks and more like 3 distinct values to use.

I think something like this would still be useful - the most efficient way to process a lot of terrain is RoomTerrain::get_raw_buffer, and that doesn't use the Terrain enum.
I'd be OK with merging this almost as is if it were renamed from TERRAIN_MASK_PLAIN to just TERRAIN_PLAIN to reflect that it can't be used as a mask.

I thought we had removed TERRAIN_MASK_LAVA? 🤔
Could we use a repr(u8) enum and implement get_raw_buffer with it? If I'm correct, it's basically only a reinterpret cast and we get rid of the mask idea that doesn't seem to be true anymore. That'd make the api more consistent.

I thought we had removed TERRAIN_MASK_LAVA? :thinking:

Looking back, I think we removed Terrain::Lava, but not TERRAIN_MASK_LAVA.

Could we use a repr(u8) enum and implement get_raw_buffer with it? If I'm correct, it's basically only a reinterpret cast and we get rid of the mask idea that doesn't seem to be true anymore. That'd make the api more consistent.

I think we could, as long as we can guarantee that get_raw_buffer only ever contains bytes with values 0, 1 and 2. On the other hand, if it contains any u8 with a value not 0, 1 or 2, we get immediate undefined behavior - and the API docs do have a big warning that its current behavior can't be strictly relied upon:

WARNING: this method relies on underlying representation of terrain data. This is the fastest way to obtain terrain data of the whole room (2500 tiles), but users should keep in mind that it can be marked as deprecated anytime in the future, or return value type can be changed due to underlying data representation changing.

I wish we could add it to the CI to catch any problem early... Maybe we could work something out with o4kapuk? I mean, we're basically doing free work for them by making screeps available from rust.

I think I'd probably still be worried about code deployed using older versions of the library suddenly started exhibiting undefined behavior - even if we fix the latest version, it isn't great if our library code has the possibility to suddenly release nasal demons upon consumers :p
I mean a lot of the library code can break, easily, if things change in the future - if it no longer returned an array, that would break things. When any resource or type of part or boost is added and found in the game, our translation code will panic. But to have code that in the future may exhibit undefined behavior seems like it could be much worse?

We could... make it unsafe?
On Wed, Aug 21, 2019 at 11:22 PM David Ross<EMAIL_ADDRESS>wrote:

I think I'd probably still be worried about code deployed using older
versions of the library suddenly started exhibiting undefined behavior -
even if we fix the latest version, it isn't great if our library code has
the possibility to suddenly release nasal demons upon consumers :p
I mean a lot of the library code can break, easily, if things change in
the future - if it no longer returned an array, that would break things.
When any resource or type of part or boost is added and found in the game,
our translation code will panic. But to have code that in the future may
exhibit undefined behavior seems like it could be much worse?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/rustyscreeps/screeps-game-api/pull/222?email_source=notifications&email_token=ABBF5FA2WXTFD3A5XU5XFYDQFYA6BA5CNFSM4ILOBH5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD43X64A#issuecomment-523730800,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABBF5FB2PGAYRXYRM4ZEEKDQFYA6BANCNFSM4ILOBH5A
.

What about making a wrapper around the Vec<u8> which treats it like a [[Terrain; 50]; 50]? We could get the optimization of loading it all at once with some safety if it checked the u8 value is valid when it retrieves it from the array.
I'm still wary of marking it unsafe because it would still require people to buy into that unsafety, and I don't think there's anything they can really do to guarantee the invariants continue to be upheld. I mean ideally everywhere we require users to use unsafe they'll have a strict set of guidelines that if they follow, then the code will behave. There aren't any guidelines that can be followed which will make the transmute continuously valid, though?

Not beside "please keep the API updated", true.
But we circled back: if we have a vector of u8, we're still attached to those constants.
Back to the API warning, maybe we can hope they'd broadcast such a change and try to react appropriately quickly (js people would have the same issue).
Or we can bite the bullet and check that the numbers are indeed, 0, 1 or 2. Whether panicking or UB is best would be left for the reader to decide...
We can always let the user pick their poison and implement both, although that would still not solve the constants issue 😆

But we circled back: if we have a vector of u8, we're still attached to those constants.

If it's only used internally though, maybe we wouldn't need to expose the constants? Like if the interface is either get(x: u32, y: u32) -> Terrain or local() -> LocalRoomTerrain which then has a similar get method, then we may need TERRAIN_PLAIN / TERRAIN_MASK_SWAMP / TERRAIN_MASK_WALL, but no one else should.
Sorry, I just really don't like UB :p

I can understand that!
In translating the js number to a rust u8, it's already doing a check to ensure it's not overflowing. Why not then use that same check and try, not to transmute, but safely cast to a Terrain? It wouldn't be that much more expensive. We get to still expose the raw method, but at least make sure it's not returning weird numbers.

If we were to do the check directly after loading the buffer, I'd just worry about the performance of checking all 2500 u8 values in the buffer. But I guess we're already copying 2500 u8s, doing that many < checks can't be too bad, right?

with a bit of luck, it'll be vectorized :D
Honestly, given that we fetch from a database every time we query the world of screeps.....
(with caching, but still...)

Otherwise, we'd have to use f64 as we cannot guarantee it would even be an integer.

Closing until someone expresses the wish to see this back in.


do i really need bootstrap for this?

Hi,
Looks great implementation!
there are other implementations  but outdated and not so configurable like this one.
In my project i have my own CSS framework and not interested in using bootstrap (or adding just for this package).
I looked at the package and i saw it uses bootstrap (hence the title of the repo :)
How do i make it use only the needed CSS for sweetalert and no bootstrap.
Thanks!

It really just uses bootstrap for a few things like btn style classes. You
could technically right your own css rules to implement those few styles.
On Aug 21, 2017 7:09 PM, "Pantchox"<EMAIL_ADDRESS>wrote:

Hi,
Looks great implementation!
there are other implementations but outdated and not so configurable like
this one.
In my project i have my own CSS framework and not interested in using
bootstrap (or adding just for this package).
I looked at the package and i saw it uses bootstrap (hence the title of
the repo :)
How do i make it use only the needed CSS for sweetalert and no bootstrap.
Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/djorg83/react-bootstrap-sweetalert/issues/17, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADG2_VKAE27H7_jNxr-WFoGWqLVokc4Nks5sag4_gaJpZM4O97Us
.

great, so then i can remove any dependencies of the react-bootstrap in the package.json right? since it only uses CSS classes and no other react components - i imply that from what you are saying.


BIGTOP-2478: Zookeeper does not have any smoke tests

These tests are very basic for now. We just run "zkServer.sh status" and
verify that the output is reasonable.
More complex tests are blocked by either a) needing multiple Zookeeper
nodes (doesn't really make sense for a smoke test), or b) needing to
have Zookeeper REST spun up, which Bigtop does not currently do.

This looks good as a very, very basic ZK test. See the small nit I had tho.

@rvs: Whoops. Fixed the name. Thank you :-)


Referencing instance method 'encode()' on 'Array'

Hi @yonaskolb
I have an issue on my POST request model.

There is an error when building the project.

sorry, just solve it

@keithcml  how did you solve this?


Status Bar

I'm kind of making an app which hide status bar as a default!
Is there any way to keep hide status bar even the material dialog pop upped?

This library just wraps around stock Android dialogs so you would need to research how to do that with dialogs in general.

@TheFinestArtist in case you didn't find a fix, I managed to do this by the below:
MaterialDialog materialDialog = new MaterialDialog.Builder(activity)
                .title(R.string.dialog_title)
                .adapter(adapter, null)
                .build();

materialDialog.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
materialDialog.show();

//Set the dialog to immersive
materialDialog.getWindow().getDecorView().setSystemUiVisibility(
                activity.getWindow().getDecorView().getSystemUiVisibility());

//Clear the not focusable flag from the window
materialDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);


add changie

Prereview checklist

[ ] The CHANGELOG.md has been updated under the # Unreleased header using the appropriate sub-headings with links to the appropriate issues/PRs.
[ ] All tests pass in CI
[ ] PR was self-reviewed

I think it would make sense to add some documentation that outlines the usage flow. Could you add something and link it the README.md ? And then the pull request template should perhaps also be updated to reference that or so..?

https://github.com/input-output-hk/partner-chains-smart-contracts/pull/167/files#diff-eca12c0a30e25b4b46522ebf89465a03ba72a03f540796c979137931d8f92055R28 ?


Practice Lab: Managing Identities in Azure AD - remove Get-MgUser licensing note

Practice Lab: Managing Identities in Azure AD
Exercise 1
Task 2
Step 9
The Get-MgUser cmdlet (in version 2.3.0 of Microsoft.Graph.Users) does not return the isLicensed property unless you ask for it.
Replace:
Verify that the list of users from your tenant is displayed. Also take note of which users have a license assigned. Any user with the isLicensed value of False has not been assigned a license.
With:
Verify that the list of users from your tenant is displayed.
-Or-
Replace the PowerShell code in step 9 with:
Get-MgUser  -Property DisplayName, UserPrincipalName, AssignedLicenses, AssignedPlans, LicenseAssignmentStates, LicenseDetails | Select-Object DisplayName, UserPrincipalName, AssignedLicenses, AssignedPlans, LicenseAssignmentStates, LicenseDetails

I have reviewed this and added your suggested changes.


Bring back changes from release-v1.6.1 into main

Bring back changes from release-v1.6.1 into main
Supersedes #4380

I don't see the tamo's commit in the list, is it expected?

I don't see the tamo's commits in the list, is it expected?

hu, not it isn't.
I made a new branch starting from release-v1.6.1, then rebase it on main.

Huum, that's strange because my commits were definitely merged into the v1.6.1; https://github.com/meilisearch/meilisearch/pull/4366


[Roadmap] Localize country names

Found this repo that has all the country names in various languages. https://github.com/umpirsky/country-list
Will need to:

Pull the json file for the country
Load the file dynamically otherwise the js bundle will be too big
Store the result in redux
Update the dataFilter on the CountriesTable component
Update WorldMap component to do a name lookup

Completed in #240


Add examples to README and missing docstrings

Fix #33
@fingolfin Would you be so kind as to review this? I am mostly interested to see if some obvious things are left undocumented.

Codecov Report

Merging #36 (1966bff) into master (1b452b6) will decrease coverage by 3.71%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
- Coverage   76.42%   72.70%   -3.72%
==========================================
  Files           9        8       -1
  Lines         509      458      -51
==========================================
- Hits          389      333      -56
- Misses        120      125       +5

Impacted Files
Coverage Δ

src/engine/layout.jl
92.12% <ø> (ø)

src/engine/texelements.jl
86.88% <ø> (ø)

src/parser/parser.jl
70.80% <ø> (-0.43%)
:arrow_down:

src/parser/texexpr.jl
80.00% <ø> (ø)

src/parser/commands_registration.jl
34.78% <0.00%> (-51.14%)
:arrow_down:

src/MathTeXEngine.jl

Continue to review full report at Codecov.

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

@fingolfin Thanks for the review!


Backup et restore persistent volume

Hello,
I begin with vDVS and I would like to know how to backup and restore properly a persistent docker volume.
I already tried snapshot or Veeam Backup but a restore doesn't work
Have you a good methode ?
Thx in advance
Jeremie

May I add my two cents to the question. There is a need for backing up persistent volumes as there is a need to backup any type of data. The data may have been deleted by accident or the user may want to restore the data as it was at a specific date. How do we do that ?
Any recommended approach ?

@govint it is not clear what's vSphere support for backup of independent disks. So far I could find none. Veem does not support it. I cannot really use vsphere-storage-for-docker if I cannot do regular backups of it. How are we supposed to backup these? What's the proposed "official" solution?
One want to use vsphere-storage-for-docker in a docker cluster, so that it's available regardless what node in the cluster an app is scheduled to. In this respect vsphere-storage-for-docker performs admirably. But since these volumes is the only state the apps have it's extremely valuable and needs to be backed up.

echoing the statements above.  We want to build an enterprise solution and need backup for the persistent volumes.   The point of having persistent data is so it's always there and useable but if not backed up (with of course ability to restore!) consistently there is great potential for loss of data and outages/customer dissatisfaction.  does VMware have a solution or recommendation?

I'm with the above. I'm really eager to try this out for real but without backup and restore I have a hard time using this for real.
Any ideas? From VMware? From the community?

My only way to Backup/Restore files in persistent volume with vDVS is give a constraints to containers on 1 host and only possible to restore simple files not DB :(

This is just what I have been thinking about last couple of days. Would be great to have some backup strategy.

Presently, the plugin only implements the docker plugin interface and can create and attach these volumes only to containers. The vSphere features for backup, supported for VMDKs, may not apply for these volumes (at least not wholly). There is no way presently, to make snaps of individual container volumes (snapshotting the whole VM seems just wrong if multiple volumes are in use and don't need to be snap'ed).
Backup apps shouldn't expect to backup container volumes the way VMDKs are. Yes, they are VMDKs on the backend but these are container volumes and the way to access is to have them attached to a container and then backup data. The sequence should be like,

Stop app.
Attach container volume to backup container.
Backup data and terminate backup container.
Start app.
That's possibly what will work for now. I'm not sure the volume plugin should attempt to build out backup and restore within itself or as extensions. The user should be able to build this capability around what the volume plugin provides as a volume provisioning entity.

@govint One can back up a VM without downtime. Stopping the app sounds severe.  I understand that there is not better solution right now and I thank you for your thoughts.

Thinking this thru a bit more, possible approaches could be as below.
Backup volume data on unmount:

When a container stops running, the volume is unmounted, the plugin watches for the last unmount (in the case that the volume is used by multiple containers on the host) and proceeds to create a backup of the volume. The exact implementation of the backup could be a clone of the volume or a compressed image of the disk contents stored separately and locally (later to more storage backends as thats feasible).
a. The plugin backs up all data in the volume while the app may not necessarily be wanting everything backed up. See below how this may be improved.
b. The plugin supports new options on volume create to support backup and TTL for backups.
i. enable  - enable backup of the volume. Volume inspect on the volume lists the backups available.
ii. ttl - time to live for the backup, the plugin will delete backups older than this time for backups of the volume.
The plugin adds meta-data per volume to track what backups are available and the time at which they were created.
c. To restore a backup the user inspects the volume to figure what backups exist for it.
d. Do volume create to create a new volume with options specifying a) the source volume and b) the specific backup of that volume. The driver creates the new volume and populates it with the data from the specified backup.
e. Deleteing a volume removes all of its backups as well. Except those volumes that were explicitly created from backups (d) above.

To reduce the amount of backed up data to exactly what the application wants, the user provides volume create time options to specify a) a  backup command and b) a restore command that is run by the volume plugin when it creates a backup or restores from a backup.
The command gets a source and destination file paths that the command can then use to pick specific data off the source and write to the destination, to create the backup . The user gets to provide these commands and hence control exactly what data to backup and restore. Rather than have the plugin create backups that are full copies of the application data.
This approach can at best restore to the point when the volume was last unmounted (or the application stopped running). These aren't incremental either as there is no way to figure what blocks changed since the last backup anyway. Does this work better than no backups?

So the apps would need to unmount a volume to trigger a backup ?
Mmm not sure it helps. Can we expect the following to be fixed ? It would also help I believe

@chris7444 can you fix the link please?

https://github.com/vmware/vsphere-storage-for-docker/issues/2065

@chris7444, I don't believe we can take a clone of a volume when its still in use. Then again, how is app data consistency handled if volume data is copied over arbitrarily.

@govint It is up to the application to decide this. Many applications have what it takes to recover data from "crash consistent" backups. Who is stopping a DB today or unmounting the FS that contains the data to take a backup or snapshot ?

Yes it is axectly my use case, how to backup DB with no stop container who attach volumes ?

OK, verified that the clone of a volume won't happen unless the source volume is not in use. We can do the clone of a container volume provided all containers that are presently using the volume are paused, the volume is cloned and then containers are resumed. Which should allow a PIT copy of the container volume to be created. Which could actually be scripted vs. needing any code to handle this in the plugin.

@govint Let me make sure I understand
user wants to clone volume X

user pauses all containers accessing volume X
docker pause...

user clones the volume
docker volume create --driver=vsphere --name=CloneVolumeX -o clone-from=VolumeX -o access=read-only

user resumes the containers
# docker unpause...

is that it ?

My bad, I should have verified the flow first. This will need some changes on the ESX host side to handle the clone. Let me make those changes, try it out first.


cannot find the Transit Node when Node#A connects to Node#B

transit node is not returned when node#A connects to Node#B,   it returns Node#B instead.

this is a bug. When searching relay nodes, we has filtered nodeA, but forgotten the nodeB.

Fixed


fix bugs

hi guys please help me to fix this

This is connected to my pinned and minted and personally created nft on my phantom I should only be able to receive help or royalties for MY work!


Clipboard is emptied when application quits

Could be nice to have something like clipmenu but integrated with the top bar.

Qlipper is Qt native and seems to do the job nicely. Apart from having too many user-visible configuration options.
Maybe we can trim it down.

Let's see if https://github.com/helloSystem/ISO/commit/d1f34936dc9c60acc44ca731a851d48755165300 will do the job. Please comment if it doesn't.


refactor: avoid using the elf module for performance reasons

Hi,
importing a module is associated with costs as the information is parsed for any file scanned. Using this rule in a rule set which does not yet use the elf module therefore increases the run time significantly. We also think that using the module is not needed as using the strings without pinning them to the entry point is specific enough.
What do you think?

Thank you for reporting this issue. The team is running a test to determine the performance impact of entry point matching, and any side effects this PR might introduce. We're concerned that matching this pattern anywhere within the file may generate false positives. It is typical that virus identification signatures need to be more specific to avoid clashing with otherwise benign code.

Our analysis shows no detection accuracy impact for this PR. There's a big performance improvement on the other hand. Some stats based on a sizable ELF dataset:
$time yara old.yara samples/
real    3m1.643s
user    4m16.908s
sys     5m7.558s

$time yara new.yara samples/
real    0m7.559s
user    0m51.090s
sys     0m10.651s
Thanks for the PR.


After latest update now receive a git error trying to clone plugins

Describe the bug
The latest update broke lazy's ability to clone plugin repos. Every time I try to update or install plugins I get an error "error: unkown option 'also-filter-submodules'.
Which version of Neovim are you using?
Neovim 0.8.1 on Ubuntu, git version 2.25.1
To Reproduce
Make sure to read https://github.com/folke/lazy.nvim/wiki/Minimal-`init.lua`-to-Reproduce-an-Issue
Steps to reproduce the behavior:

Launch neovim on ubuntu

Expected Behavior
Before the recent update lazy was working great after I migrated my packer config. I decided to clear out my packer cache files and so I did that with lazy as well just thinking I would reload all my plugins again. This updated lazy to the latest version and now I am getting the git error. My guess is the version of git that you can install with apt on ubuntu doesn't support the option for also-filter-submodules. I can updated git using their ppa but this may become a big deal for many users.
Screenshots

Duplicate of #83


Enable Bitcode Support

It is now possible to build WebRTC with Bitcode enabled.
https://blog.andyet.com/2015/10/20/building-webrtc-with-bitcode

seems like link is not working now.


Fix shell-env timeout (kill the process if it times out)

@jim-docker what if we just mark "shell env" as "invalid" during boot and skip shell-env within terminal if we see an invalid shell?


[Bug] Compatible problem caused by LMQ(Light Message Queue)

Before Creating the Bug Report

[X] I found a bug, not just asking a question, which should be created in GitHub Discussions.

[X] I have searched the GitHub Issues and GitHub Discussions  of this repository and believe that this is not a duplicate.

[X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment
CentOS 7.3
RocketMQ version
4.8.x upgrade to 4.9.3+
JDK Version
OpenJDK 1.8.0_202
Describe the Bug
During the process of broker upgrade, the consumer will get the consume offset from the broker when client rebalance occurs. When the RocketMQ broker version is upgraded from 4.8.x to 4.9.x and the LMQ function is enabled. The broker will only initialize the LmqConsumerOffsetManager as follows:
this.consumerOffsetManager = messageStoreConfig.isEnableLmq() ? new LmqConsumerOffsetManager(this) : new ConsumerOffsetManager(this);

And the persistent file name of LmqConsumerOffsetManager is lmqConsumerOffset.json, which is different from the original consume offset file name consumerOffset.json. For the above reasons, the new version LmqConsumerOffsetManager cannot load the previous consume offset when the broker restarts. The broker side will return consume offset 0 to the client. As follows:

Based on the above logic, when the consume offset is 0 at the consumer side, which is less than the minimum consume offset, it will start to pull from the minimum offset. Lead to consumption accumulation and consumption duplication.

Consumer clients would consume from the oldest offset when get consume offset 0.
Steps to Reproduce

Broker version less than 4.9.3.
There's topics who's min offset is bigger than 0.
Broker version upgrade to version 4.9.3+

What Did You Expect to See?
Consumer offset should not be reset to minimum.
What Did You See Instead?
Consumer offset was reset to minimum.
Additional Context
No response

Broker roll back from version 4.9.3+ to version 4.9.3-, which would also cause compatible problem.


Declarative Server Maintenance

Summary
Describe a concept on how we can put a Server into Maintenance mode. Also evaluate what it would mean to move it back into an operational state.
The Kubernetes community has a KEP extending the Node API by a declarative approach in handling Node maintenance: https://github.com/kubernetes/enhancements/issues/4212
We should see how those concepts can be applied for our Server objects.
Implications to consider:
How is the maintenance state influences the behaviour of controllers sitting on top of the metal API e.g.:

Cluster API provider
Gardener Machine Controller Manager
etc.

Expected outcome:

Concept document describing the above ideas and identifying potential missing fields/concepts in the metal types

To kick of some discussion here is a short sketch, which more or less is a trimmed down version of the NodeMaintenance proposal.
We introduce the ServerMaintenance custom resource to signal maintenances on Servers.
// +enum
type ServerMaintenanceStage string

const (
// Idle announces a maintenance.
Idle ServerMaintenanceStage = "Idle"
// InMaintenance shuts down servers, potentially releasing server claims.
InMaintenance ServerMaintenanceStage = "InMaintenance"
// As long as no other maintenance is applied to a server, they are made ready again.
Complete ServerMaintenanceStage = "Complete"
)

type ServerMaintenance struct {
    ...
    Spec ServerMaintenanceSpec
    Status ServerMaintenanceStatus
}

type ServerMaintenanceSpec struct {
    // ServerSelector selects servers for this maintenance.
    ServerSelector *v1.ServerSelector

    // The order of the stages is Idle -> InMaintenance -> Complete.
    // The default value is Idle.
    Stage ServerMaintenanceStage

    // Reason for the maintenance.
    Reason string
}

As soon as the Stage is set to InMaintenance all selected Servers will have their .spec.power set to Off.
The respective ServerClaims, if any, can either be re-bound or kept.
Likely, such a setting needs to be added to a ServerClaim.
On completion all selected Servers will have .spec.power to On, when no other ServerMaintenance with stage InMaintenance selects a Server.
Completed ServerMaintenances need to be garbage collected eventually.
The cloud-provider-manager-metal can have a watch on ServerMaintenances and forward information about ServerMaintenances into it's Kubernetes cluster.
Do we need some mechanism to block/deny maintenances on Servers?

@Nuckal777 thanks for input!
I'm pretty sure, that we must not power off servers in such an implicit manner. For instance, firmware updates, especially which require server reboot, should be also considered as maintenance. Hence, it might not be reasonable to force server power off.
Apart from that, any of controllers which work with Server CR would have to loop over ServerMaintenance objects to find whether server is in maintenance or not. This could be solved by the additional field or condition in servers status, however, it might cause data race between controllers as soon as both spec (to switch power) and status (to set maintenance state) have to be updated.
From my perspective, maintenance state should be represented in .spec of the Server CR:

it is explicit
it can be set by other operators
server controller itself will be able to determine whether object being reconciled is in maintenance or not

From my perspective, maintenance state should be represented in .spec of the Server CR

There is an issue with that design: When 2 controllers powered off a Server and one controller is finished, the finished controller will set the power state to on and the second controller to off. The controller start fighting over that field. metal3 uses a similar design for that reason. Further reasoning is in the declarative node API proposal.

For instance, firmware updates, especially which require server reboot, should be also considered as maintenance.

Why couldn't a the firmware upgrade handling create a ServerMaintenance and delete it after finishing?

Apart from that, any of controllers which work with Server CR would have to loop over ServerMaintenance objects to find whether server is in maintenance or not.

I agree. This would be a disadvantage.

I like the idea of having an own resource initiating the Maintenance of a Server. Regarding the ServerClaim binding: Power management and other updates will only happen, when the Server is in a Reserved state - meaning once a Server is in Maintenance, only the MaintenanceReconciler should perform operations on the Server e.g. creating a BootConfiguration to boot into the BIOS/Firmware update mode etc.

There is an issue with that design: When 2 controllers powered off a Server and one controller is finished, the finished controller will set the power state to on and the second controller to off. The controller start fighting over that field. metal3 uses a similar design for that reason. Further reasoning is in the declarative node API proposal.

As @afritzler mentioned, it should be done in such a way, that particular controller may manage server's power state only if server is in particular state. Like if server is in Reserved state, then only ServerClaim controller could power it on/off, if server is in Maintenance state, then only Maintenance controller could power it on/off and etc.

Why couldn't a the firmware upgrade handling create a ServerMaintenance and delete it after finishing?

It definitely could, but I was pointing that is not necessarily need to power off the server in maintenance state.

After reading the node in-place update discussion of Gardener, I had some time to look into the topic again.
It was never explicitly mentioned in this ticket, but I think there are to main use cases for the maintenance of a Server:

updating/configuring BIOS/Firmware
hardware failure and replacement

Am I missing something from the metal-operator perspective?
As with the BIOS updates, I think we should focus on managing maintenances on a single Server first.
Declaring a maintenance for multiple Servers via a label selector can be added with an additional CRD.
That way we also work around the issue that the set of selected Servers by a maintenance can be larger than the subset of Servers, which can be maintained at once due to higher level concerns.
So, if I understand both of your correctly, you'd like the declaration of a maintenance to be a mean of moving the permission of power-cycling a Server from the ServerClaim controller to a different controller.
An alternative ServerMaintenance object, which targets a single Server, could like:
// +enum
type ServerMaintenanceStage string

const (
// Idle announces a maintenance.
Idle ServerMaintenanceStage = "Idle"
// InMaintenance shuts down servers, potentially releasing server claims.
InMaintenance ServerMaintenanceStage = "InMaintenance"
// As long as no other maintenance is applied to a server, they are made ready again.
Complete ServerMaintenanceStage = "Complete"
)

type ServerMaintenance struct {
    ...
    Spec ServerMaintenanceSpec
    Status ServerMaintenanceStatus
}

type ServerMaintenanceSpec struct {
    // ServerRef selects a server for this maintenance.
    ServerRef *v1.ObjectReference

    // The order of the stages is Idle -> InMaintenance -> Complete.
    // The default value is Idle.
    Stage ServerMaintenanceStage

    // TargetState specifies the state the server should be moved to
    // when the stage changes to InMaintenance
    TargetState ServerState

    // Reason for the maintenance.
    Reason string
}

Potentially, a list of maintenances can also be inlined into the Server object.
An exemplary upgrade flow for a Server could then look like this:

The Server is in the Reserved status in the beginning
ServerBIOS/ServerFirmware spec is changed
Respective controller creates a ServerMaintenance object in the Idle maintenance stage
This would signal to external systems (e.g. MCM) that a maintenance is necesscary

External system prepares maintenances (e.g. migrating payload)

External system updates the ServerMaintenance stage to InMaintenance
Server status is changed to Updating (based on target state in the ServerMaintenance object)

"Detaches" the Server from the ServerClaim controller and hands the responsibility for it over to the controller, which handles the upgrade

When the Update is done the maintenance stage in of the ServerMaintenance object is set to Complete
Server status is changed back to Reserved, because a ServerClaim exists

Moves the responsibility back to the ServerClaim controller

The hardware failure case would be similar, but require a different controller, which just turns the power off and another HardwareFailure state on the Server object.
Servers in the Available state can be moved to InMaintenance stage upon creation of the ServerMaintenance object.

How about adding a maintenance window as well? So one can decide when a bios or firmware upgrade should take place.

On-site discussion with @afritzler:

Ownership for ServerMaintenances could be tracked in namespaces and enforced by RBAC. E.g. firmware upgrade operator.
TargetState can be dropped.
Completed maintenance are to be garbage collected after a certain duration.


Implemented KRYPTO.ecdsaRecover hook

Duplicate PR because the old one got closed accidentally.
Reviewer checklist

[ ] Test coverage: stack test --coverage
[ ] Public API documentation: stack haddock
[ ] Style conformance: stylish-haskell

Jenkins: Add to whitelist


[BUG] UEFI USB boot is not working

Describe the bug

Booting from UEFI USB written by BalenaEtcher with Harvester v1.1.1 ISO lands on GRUB prompt instead of Harvester option to create new cluster or join existing cluster.

To Reproduce
Steps to reproduce the behavior:
Write ISO to USB with version 1.1.1 or 1.1.2 ISO and try to boot via UEFI method
Expected behavior

UEFI USB boot should present Harvester menu options
Support bundle

Environment

Harvester ISO version: v1.1.1
Underlying Infrastructure (e.g. Baremetal with Dell PowerEdge R630): Dell PowerEdge R640 with BIOS 2.14.2

Additional context
Add any other context about the problem here.

@davidcassany Hi David, did you see this error before? Wondering if https://github.com/harvester/harvester/issues/2204 can help.
Some findings by @masteryyh

While I'm investigating this issue, I found out a workaround that may bypass this problem: use tools like rufus on Windows and use its "ISO mode" to create a bootable Harvester USB device instead of balenaEtcher or dd, which I already tested without issue.

@davidcassany The ISO is at https://releases.rancher.com/harvester/v1.1.2/harvester-v1.1.2-amd64.iso
The ISO is still created with luet-makeiso, not yet switching to elemental.

@bk201 @masteryyh
I've always seen this on multiple devices - a mix of Dell PowerEdge series or even just ThinkCenter Lenovo devices that I have around the apartment.
I always thought that this just might have been a limitation of the hardware possibly-not having the most recent versions of firmware & an adequate version of GNU GRUB.
So, I was just figuring that I've "always" just been working on older hardware and it was always on my side.
In fact, because I've always seen this it's prompted me to open up:

3590
Which lead to the recent-ish PR of:
298 on harvester/docs (I've added you both as reviewers to that now)

Also to note, the "iso" flashing utility has no noticeable effect on whether or not the issue is reproduced.
I've used:

Balena Etcher v1.18.4
Popsicle v1.3.0 pretty neat usb-flasher from the fantastic folx at Pop!_OS

However, I can not replicate this with v1.0.0.
As that immediately shows the GNU GRUB Menu with Harvester Installer v1.0.0 as an option.
The GNU GRUB version in that is 2.04 - not 2.06 like with v1.1.1

When I went through the #3789  issue, I also had that situation when I was booting UEFI.

It seems fixed by issue https://github.com/harvester/harvester/issues/2204, tested with multiple platform.

Test steps:

Prepare an ISO built with latest code;
Use dd or balenaEtcher to create a USB bootable device from this ISO;
Try to boot with this device in both UEFI and legacy BIOS environment;
Both of them should boot into harvester installer without problem.

This looks great :+1: :smile:  - thanks for the fix @masteryyh - it boots directly to the installer, so no need for set root=(hdN,msdos1) && then chainloader ... - the installer launches without a problem - tested with v1.2.0-rc1
https://github.com/harvester/harvester/assets/5370752/3a613a97-f69f-4362-aa4e-fa409aded44f
I'll go ahead and close this out.


[ARCTIC-1609] Check if is a hive table in execute in HiveCommitSyncExecutor

Why are the changes needed?
Fix #1609
Brief change log

Make HiveCommitSyncExecutor always enabled.
Check if is a hive table in execute.

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[x] Run test locally before making a pull request

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable)

@wangtaohz cc


Rename from wechaty-puppet-puppeteer -> wechaty-puppet-wechat

For a better name for the Wechaty ecosystem.
Breaking changes

WECHATY_PUPPET_PUPPETEER_HEAD -> WECHATY_PUPPET_WECHAT_PUPPETEER_HEAD
WECHATY_PUPPET_PUPPETEER_STEALTHLESS -> WECHATY_PUPPET_WECHAT_PUPPETEER_STEALTHLESS

Wechaty & Wechaty Getting Started repos are up to date with this issue.


Border none does not work on 0.12

Hi,
I have had this in my ~/.config/sway/config since many months ago:
for_window [class="^urxvt"] border none

And it always removed the border to my urxvt256c-ml terminal windows.
Since the update to sway 0.12 this does not happen any more and now my terminal has the border.
Has the syntax changed or is the feature broken?

You might need instance instead of class now.

Thanks.
for_window [instance="urxvt256c-ml"] border none

works as expected :)


Add configuration of extra_fields

Fixes issue #7

Thanks for contributing this, can you please update the documentation to reflect this additional flag?
Please include specific references to logbook and how it breaks if the flag is set to True.


Double badge on gear icon looks off

I have an update pending, and also "manage workspace trust", seems like it's trying to show both badges

Actually I don't know why the trust badge shows up, because the workspace is already trusted

Running Insiders from a couple days ago, when we updated Insiders this afternoon.

Remember that we missed builds for a couple days so if you fixed it this week, probably missing the fix

Actually I don't know why the trust badge shows up, because the workspace is already trusted

@sbatten typo in that message: inheret -> inherit

if this bug is still out, this will likely repro again since we update so often, I'll keep my main repo in unknown for a while to get this to repro.
@gjsjohnmurray thanks, I've since replaced that whole message in insiders

the double badge has not occurred for me since this issue was opened and my folder is consistently in the unknown state to encourage both badges. please re-open if you still see it.


Maybe deployment should be integerated into Hugo

I've mentioned my approach on this issue: https://github.com/spf13/hugo/issues/1543#issuecomment-211708203
This repo just contains files to include with "hugo new", whereas s3up could be a hugo deploy command that runs from CI or a local machine.
The challenge is that everyone has different preferences for preprocessors, CI providers, and deployment locations.

hugo deploy is a thing now


Changes AGPL to BSD-3 licenses

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
4 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.03%) to 98.999%

Files with Coverage Reduction
New Missed Lines
%

dkg/pedersen/handler.go
2
90.82%

mino/minogrpc/server.go
2
96.69%

Totals

Change from base Build<PHONE_NUMBER>:
-0.03%

Covered Lines:
12259

Relevant Lines:
12383

💛  - Coveralls


Fixes 2669: Improving parameter descriptions

Summary
Scope of this PR is to improve parameter descriptions for the operations listed on:
https://developers.redhat.com/api-catalog/api/repositories#content-operations
I found 2 scenarios where docs are published. One for upstream and another for downstream. Mention of Optional v/s Required is handled differently in each, hence I am not adding that information in each parameter description.
Testing steps

Hi, thanks for your PR! You've done the right thing by making changes in the code comments to change the descriptions. You'll also need to run the make openapi command, which will regenerate the openapi.json file to update it with the changed descriptions.

You'll also need to rebase again to remove the extra commits that you did not add. That was caused by another issue that has since been fixed.

https://issues.redhat.com/browse/HMS-2669


failed to download stemcell 3263.13 due to fingerprint mismatch

2017/01/11 18:21:38 PivNet Resource version: 0.29.0
2017/01/11 18:21:38 Creating download directory: /tmp/build/get
2017/01/11 18:21:38 Getting release for product slug: 'stemcells' and product version: '3263.13'
ERROR: provided fingerprint: '2016-12-14T03:13:59.009Z' does not match actual fingerprint (from pivnet): '2016-12-16T16:25:28.399Z' - pivnet does not support downloading old versions of a release

it seems the fingerprint changed on pivnet. But can we make this resource not check the fingerprint?

@syslxg this has come up before - see https://github.com/pivotal-cf/pivnet-resource/issues/43.
We ended up not needing to implement this feature, because it's usually an issue with the way resources are passed through a pipeline. Are you passing the stemcell through multiple jobs? Also, the stemcells don't change often, so how often are you seeing this?

We fixed this issue by getting refreshing older references of the resource that we wanted through check-resource. e.g.:
fly check-resource -r PIPELINE_NAME/stemcell -f product_version:3263.8#2016-12-16T16:25:30.148Z


A noisy fog error

This is just annoying but dont seem to beak anything yet..
→ knife ec2 server list
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/rackspace/mock_data.rb:42: warning: duplicated key at line 80 ignored: "name"
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/dhcp_options.rb:54: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/addresses.rb:55: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/images.rb:45: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/internet_gateways.rb:54: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/key_pairs.rb:50: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/network_acls.rb:82: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/network_interfaces.rb:87: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/route_tables.rb:55: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/security_groups.rb:58: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/snapshots.rb:18: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/tags.rb:17: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/volumes.rb:63: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/subnets.rb:58: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/models/compute/vpcs.rb:56: warning: circular argument reference - filters
/home/work/.rvm/gems/ruby-2.2.1@aws_test/gems/fog-1.23.0/lib/fog/aws/requests/compute/describe_network_acls.rb:70: warning: duplicated key at line 74 ignored: "egress"
Can't update the gem 'fog' to the latest & greatest, looks like knife-ec2 have locked it down
○ → bundle update fog
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "fog":
In Gemfile:
knife-ec2 (>= 0) ruby depends on
fog (~> 1.23.0) ruby
I see this PR: https://github.com/chef/knife-ec2/pull/268  , does this mean knife-ec2 should be able to bump up the fog gem versions?
Some info:
|ruby-2.2.1@aws_test| work-virtual-machine in ~/workspace/aws_test
○ → bundle show knife-ec2
<EMAIL_ADDRESS>|ruby-2.2.1@aws_test| work-virtual-machine in ~/workspace/aws_test
○ → bundle show fog
<EMAIL_ADDRESS>

This is fixed in a later version of Fog, but this project pins to an old release.  If the deps in the gemspec here are bumped this will go away for us Ruby 2.2 users.

Related to https://github.com/chef/knife-ec2/issues/281

Hi,
I've started a new project recently, so you can find some examples of my recenr works here http://tharyguta.infinityemarket.com/oicle
Hope this helps<EMAIL_ADDRESS>


IDEA: Embed cost sensors into the devices they're calculated from

Not doing the template for this one, sorry! I couldn't work out how to structure it into the headings!

This addon 'embeds' the energy / power sensors 'into' the original device:

It's a super clean way of presenting this kind of information, as it reduces the number of individual devices on the system, and puts the energy information directly within the device, so it's available immediately when looking at the device.
Unsure of your thoughts on this, it could be complicated - I'm not 100% on the actual implementation details from powercalc.
I just wanted to draw attention to it as you may not have seen this pattern before, and it could be a good fit.
Unsure.

Yep, this is in the roadmap. I have already checked the powercalc code, but was a bit overwhelming.

I just can't get it to work. Must be something like this:
    @property
    def device_info(self):
        """Return device information to link this sensor with the integration or a specific device."""
        entity_registry = er.async_get(self.hass)
        entity_entry = entity_registry.async_get(self._energy_sensor_id)

        if entity_entry and entity_entry.device_id:
            # If there is a device linked to the user-inputted energy sensor, link the sensor to it.
            return {
                "identifiers": {(DOMAIN, self._energy_sensor_id)},  # Unique identifier for your sensor
                "name": self._device_name,
                "via_device": entity_entry.device_id  # Link to the device of the original energy sensor
            }
        else:
            # Fallback if no device is linked to the energy sensor
            return {
                "identifiers": {(DOMAIN, self._energy_sensor_id)},
                "name": self._device_name,
                "manufacturer": "Custom Integration"
            }

But it's not working


question: what is different between tini and my_init?

For reaping processes and signal handling, there exists tini, which is included in docker itself.
What is the difference to my_init of basimage-docker?
What I know:

tini
my_init

written in C
written in python

tini just starts one process (it is transparent)
my_init can run startup processes,  starts runit and can start a custom comman additonally to it,  and it can start shutdown scripts

reaps processes
reaps processes

handles signals
handles signals

Is there anything important like functionality or reaping/signals or size or stability or ...

Maybe something worth looking into, especially if it is C -- it should be faster than Python.


Mark old crate names for renamed crates as deprecated

We have three crates that have been renamed, but their old names are still published on crates.io without any notes.

bonsai-ethereum-relay
bonsai-ethereum-contracts
risc0-ethereum-view-call

We should mark these as deprecated in some way.

There's a bunch of old risc0 crates too, not sure what the best approach is

One idea would be to publish a new version to each that includes a compile-time warning about the deprecation. We could additionally update the top-level crate docs to include a similar warning.


Add initial test functions for SpaceKLIP using pytest

Copy of https://github.com/kammerje/spaceKLIP_new/pull/16 moved to this repo

This has gotten pretty tangled up with the repo swap... going to make a new replacement branch cleanly.


Feature request : Delay carbs been consider in bolus calculator

Feature request
To facilitate the management of pre-bolus, it would be nice if delay carb (ex : +15 min.) been considered as now for the bolus calculator. After save with bolus button been pressed, carbs could be move at the desired time entered in the previous screen.
Thanks

Please explain the last sentence.

Yes, for sure.
It's normal that future carbs are not considered in the bolus calculator. However, when you have just entered carbs in the meal page, it make sense to include them in the next page, the bolus page, when it is open automatically. The way I was thinking about it is that meal entry should be consider as eated now when you are passing from the meal to the bolus page. Then, after save with or without bolus, this entry meal shout be deleted and a new one, with the delay desired, should be created.
The goal is to permit people that required pre-bolus of 15 minutes to make as realistic as they need with no COB countdown started.
This is not a critical feature, but seam logical.

If I’m understanding you correctly, this could be implemented with for instance a button “include future carbs” in the bolus View recommendation. This way no entries need to be deleted and recreated.

That's make more sense, yes. Could be good to get for people who really need a fifteen minutes pre bolus.