Passing data while either app is inactive?

Hey guys I'm using WatchOS 2 and iOS 9
My app has a timer that runs for a user defined amount of time, which can get pretty dangerous with background tasks and I'm worried about asking apple to approve an app that could potentially drain the users battery, which is why I use a local notifications instead of a background mode.
I'm now working in my watch app with WatchOS2 and I'm running into an updating issue where if I wake the watch and ping the phone app isn't responding back because it's asleep, and if the user doesn't have their watch app open while the iPhone app is sending it updates, it's not receiving them and updating the UI...
So here's what I'm wondering, is there anyway for maybe just the watchOS app to continue to get those updates from the iPhone even if it is not awake? It is using a workout session so it's always the forefront of the app. I'm just trying to make sure I'm not missing something before I attempt to dive into this a different way and possibly make more time.
Thanks! (2.0 has been splendid so far by the way amazing work!)

After a couple more hours of research...
I did get this figured out and I'm wondering if someone would be able to modify the docs or if I did a PR if that is okay.
let wormholeSession = MMWormholeSession.sharedListeningSession()
let wormhole = MMWormhole(applicationGroupIdentifier: "group.com.redfitapp", optionalDirectory: nil, transitingType: .SessionContext)
Live data only works in my apps if I use wormholeSession and listen with that. But the regular wormhole is the one that seems to handle the cached/queued messages that get pushed and read when WatchOS/iOS seems fit.
Just something that I think would help a lot of developers who use this across watchos2.

I had to use SessionMessage instead of SessionContext to get it working on my app.

Bingo. @NorthMcCormick I'm sorry for not responding to this earlier, but @madspacer is correct. The SessionMessage messaging type supports much more real time communication and is capable of waking up the other app in watchOS 3.


Add Shorten with Alias option

Added ShortenWithAlias function and adjusted some spacing

Thanks for the great addition! I'm going to merge this, add documentation to the README and release this with version 1.1.7.

 Do you know when you're going to release it? Trying to use this in the current app I'm building. Thanks!

It should be available with v1.1.7 on both GitHub Releases and on NPM as of 3 days ago. We’re you able to find it?


Make args mapper optional

https://github.com/webonyx/graphql-php/commit/9563fc543209b534e0f7309f092d409df59d3995#r148322142
@Warxcell @andrew-demb Please review.

Our tests are green (i.e. args mapper is now clearly optional), thank you.

Released with https://github.com/webonyx/graphql-php/releases/tag/v15.16.1


Instructions are terrible.

Most of us aren't coders, we can't guess what to do with the files please provide adequate instructions.

Being friendly and a thank would have been more appropriate. Guess you couldn't code it yourself,  right 👍?
But since you asked, there are good instructions here:
https://github.com/leandrolima-nyc/SnapmakerJ1#j1-auto-upload-by-kanocz

I'm sorry that this is a hobby project, and I didn't spend much time at the instructions, because it's a command-line tool that doesn't need to be explained to most users who think they need it.
Btw, J1-Upload is a great project that I use it almost every day ❤


Use @StateObject for WithViewStore in iOS 14

We currently use @ObservedObject in WithViewStore, which means anytime the parent view is recreated, a whole new ViewStore is created. This causes a lot of view stores to be needlessly created, which also causes objectWillChange to be pinged many times since the removeDuplicates logic can't be used to its full potential when fresh view stores are being created all over the place.
By swapping out @ObservedObject for @StateObject we can ensure that the view store is only created a single time for the lifetime of the view, and by keeping view stores alive for longer we can better leverage their removeDuplicates work.
For reference, here are the counts of the number of view stores created and objectWillChange emissions in our Todos demo app going through the script of:

Add 5 todos
Complete the first
Change the filter to "Active" and then "Completed

…we get the following counts on main:
ViewStore.init 40
ViewStore.objectWillChange 56

After the changes in this PR, the counts are reduced to:
ViewStore.init 7
ViewStore.objectWillChange 23

And in our Voice Memos demo application, if we:

Record a new 4 second memo
Play the memo back
Record another 4 second memo
Play the memo back

…we get the following counts on main:
ViewStore.init 171
ViewStore.objectWillChange 255

And now those counts are:
ViewStore.init 44
ViewStore.objectWillChange 118

We think this reduction in objects created should help improve performance and reduce the amount views are recomputed.
Backwards compatibility
We want these changes to be backwards compatible with past versions of TCA, which means supporting iOS 13. Since @StateObject is iOS 14+, and because WithViewStore is highly generic over many types of contexts (see #1323), we had to employ some tricks to make this work. Things will get a lot simpler once we remove the deprecations in #1323.
We hope this is 100% backwards compatible with everyone's code, but because we had to tweak some generic constrains in ForEachStore and SwitchStore there is a slight chance you get a compiler error if you are depending on the exact shape of those generics. We think this should be extremely rare, but if you run into a problem, please open a discussion.

The @StateObject approach is very nice. The AnyView is unfortunate but I think unavoidable to maintain iOS 13 compatibility with built-in wrappers. I would just like to mention that using @StateObject ties the ViewStore to the view's identity instead of to the store's instance. This works most of the time, because we (almost?) always use a single closure to scope. Even if the ViewStore is not following the same Store instance as the one from the view, it usually produces the expected results.
However, if we manage to create an example where the store's behavior changes without changing the view's identity, we can see this phenomenon at play.
For example, if you remplace CounterView by the example below, you can check that the first view is not spotting the difference when you toggle the shouldDouble flag. It however does with the current version that is in main.
struct CounterView: View {
  let store: Store<CounterState, CounterAction>
  @State var shouldDouble: Bool = false
  var body: some View {
    // Added ---
    WithViewStore(
      store.scope(
        state: shouldDouble ? { 2 * $0.count } : { $0.count }
      )
    ) { Text("\($0.state)") }

    WithViewStore(
      store.scope(
        state: { (shouldDouble ? 2 : 1) * $0.count }
      )
    ) { Text("\($0.state)") }

    Button(shouldDouble ? "Double" : "Simple") {
      shouldDouble.toggle()
    }

    // Current ---
    WithViewStore(self.store) { viewStore in
      HStack {
        Button {
          viewStore.send(.decrementButtonTapped)
        } label: {
          Image(systemName: "minus")
        }

        Text("\(viewStore.count)")
          .monospacedDigit()

        Button {
          viewStore.send(.incrementButtonTapped)
        } label: {
          Image(systemName: "plus")
        }
      }
    }
  }
}

The function switching is clearly something exotic, and solving it at the root would end up identifying scopes, and thus open the way Store/ViewStores reuses, or even to the creation of a graph. In both cases, way beyond the purpose of this PR.
I don't think there is something inherently wrong with the PR. I just wanted to bring this change of behavior to the attention.

@tgrapperon Very interesting, thanks for highlighting that difference! So, if non-TCA state influences the scoping of a WithViewStore, we may see a divergence of behavior.
It's a bummer to have that change in behavior, even though it does seem like an edge case, so we should think about it a bit more. Looking more towards the future, we are hoping that we can make stores/scoping a bit lazier so that as soon as the state object is hydrated we never have to do another scoping on that store again.
I played around with this in a way that introduced breaking API changes and it resulted in an even more massive drop off in the counts. But of course, that all hinges on this change.

@tgrapperon Can you think of any times you've needed the behavior you described? Used outside state to influence the scope of a store?
I search for .scope( in isowords and all uses of scope that open up a custom closure seem to be pure data transformations based on the input. There is one case where we do reference outside state, but it just so happens that outside state is static and so would not be affected by this.
I'm also realizing that any logic you do in these scopes is basically untestable / very hard to test since it is outside the purview of the reducer. So, maybe this is something we should be discouraging people from anyway. I'm wondering if we should proceed with this style and document its behavior.

There is one case where we do reference outside state, but it just so happens that outside state is static and so would not be affected by this.

Also that scope closure did not need to be written that way at all. Not sure why we did that! It can be written using only the input of the closure. 🙃

@mbrandonw No, I don't think I actually ever needed it. I only constructed it for the purpose of being wrong, as it occurred to me that this was now possible.
Even If I would need something environment dependent from a parent (like a size class for example), I would perform the logic inside the scope closure instead of vending different ones, and it would work as expected.
The only thing that is different is that the viewStore in the closure is not the ViewStore of the store, but possibly a ViewStore of a "ghost" of this store, which is normally not problematic given the way TCA works. Other issues are maybe possible, but I'm not seeing one right now.
The issue is that the weird scoping can happen outside of the View, from a parent for example:
ChildView(state: horizontalSizeClass == .compact ? { $0.first } : { $0.firstAndSecond })

(and even without involving foreign data (but foreign logic)):
ChildView(state: viewStore.isActive ? { $0.first } : { $0.firstAndSecond })

The problem is that this is non local, there is no way to know from the ChildView's standpoint. The closure switch is equivalent to changing the "structural identity" of the scoped store, and this is something that is not exploited (yet) in TCA. If this would be the case, the ViewStore instance could be installed into the ViewState scoped Store that would be itself preserved when scoping from a parent, alleviating the need for a StateObject. But this is a very complex topic with deep ramifications.
I think that, in the mean time, the best is to recommend to avoid the pattern above (which fortunately requires more work than one unique closure that preserves the scoping identity).

As long as there is only one closure in the scope, this is fine I think, as everything that needs to be captured will be captured and this won't change during the whole lifetime of the scope (even if the state value changes, the first instance captured by StateObject will behave the same as all the next ones, as it has the same function with the same inputs (or similar ones themselves).
Or it is? I now have doubts about what happens when you capture the viewStore when scoping from a WithViewStore itself. I think it effectively works, as it ultimately flows back to the root Store, but I will need to think more about it.

We're gonna go ahead and merge this, but everyone please do let us know if you see anything interesting happen while running this code. We're also going to improve the documentation to let people know what they should and shouldn't be doing in scope transformations.

We're also going to improve the documentation to let people know what they should and shouldn't be doing in scope transformations.

@mbrandonw Good call. Your implementation looks solid.

I searched for .scope( ... realizing that any logic you do in these scopes is basically untestable / very hard to test since it is outside the purview of the reducer. So, maybe this is something we should be discouraging people from anyway.

I came to the same conclusion after looking through old projects that might have been using a closure like this. In all cases I would have be able to restructure things to avoid running into issues with @StateObject

Looking more towards the future, we are hoping that we can make stores/scoping a bit lazier so that as soon as the state object is hydrated we never have to do another scoping on that store again.

I like the sound of this :)


Fixing #55. @auth checks the resolver exists first.

Issue #, if available:
https://github.com/aws-amplify/amplify-cli/issues/55
Description of changes:
@auth checks the resolver exists first before applying the auth rule correcting a bug.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This is based on top of https://github.com/aws-amplify/amplify-cli/pull/115 so we should work on merging that first.

This also fixes https://github.com/aws-amplify/amplify-cli/issues/93. A boolean condition was always evaluating to true but is now fixed.


ImageView - support to load images from PNG, JPG, and other formats

Search & integrate a library

for PNG --> one option is: https://github.com/lvandeve/lodepng

for JPEG --> https://github.com/libjpeg-turbo/libjpeg-turbo

for GIF --> https://github.com/lecram/gifdec


Moving container from a node to another one in runtime

Description
Hello.
I am trying to move a container from a node to another one, during runtime.
I have a skeleton of the code. See (mainly the method move)
package control;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import com.google.common.collect.ImmutableList;
import com.spotify.docker.client.DockerClient;
import com.spotify.docker.client.exceptions.DockerException;
import com.spotify.docker.client.messages.ServiceCreateResponse;
import com.spotify.docker.client.messages.swarm.EndpointSpec;
import com.spotify.docker.client.messages.swarm.EndpointSpec.Mode;
import com.spotify.docker.client.messages.swarm.Node;
import com.spotify.docker.client.messages.swarm.Placement;
import com.spotify.docker.client.messages.swarm.PortConfig;
import com.spotify.docker.client.messages.swarm.Service;
import com.spotify.docker.client.messages.swarm.ServiceSpec;
import com.spotify.docker.client.messages.swarm.Task;
import com.spotify.docker.client.messages.swarm.TaskSpec;

import entities.ServAndNode;

public class Control{
	//the key is the service id
	private Map<String,ServAndNode> relation = new HashMap<String, ServAndNode>();

	public Map<String, ServAndNode> getRelation(){
		return this.relation;
	}

	public static void move(DockerClient docker ,  String servID) throws DockerException, InterruptedException {
		// https://docs.docker.com/engine/swarm/services/#placement-constraints
		// placement constraints set where the service should be deployed

		List<String> constraints = getConstraints(docker);

		Service service = getService(docker, servID);

		/*
		 * here, we configure the task template
		 */
		Placement place = Placement.create(constraints);
		TaskSpec taskSpec = TaskSpec.builder()
				.containerSpec(service.spec().taskTemplate().containerSpec())
				.networks(service.spec().networks())
				.placement(place)
				.restartPolicy(service.spec().taskTemplate().restartPolicy())
				.build();

		/*
		 * here we are getting the EndpointSpec
		 */
		//modificar essa lista?
		//List<PortConfig> ports = service.endpoint().ports().asList();
		Mode mode = service.endpoint().spec().mode();
		EndpointSpec endPoint = EndpointSpec.builder()
				//.ports(service.endpoint().ports()) // ports
				.mode(mode)
				.build();
		/*
		 * now, lets deal with the spec
		 */
		String serviceName = "bd";
		ServiceSpec spec = ServiceSpec.builder()
				.updateConfig(service.spec().updateConfig())
				.labels(service.spec().labels())
				.name(serviceName)
				.taskTemplate(taskSpec)
				.endpointSpec(endPoint)
				.mode(service.spec().mode())
				.build();

		ServiceCreateResponse newServiceResponse = docker.createService(spec);

		// clone svc.spec() but changing
		// svc.spec().taskTemplate().placement() by
		// Placement.create(constraints);

		//service id, service version and the spec of the new service
		docker.updateService(newServiceResponse.id(), service.version().index()+1 , spec);

	}

	public void setRelation(DockerClient docker) throws DockerException, InterruptedException {
		List<Task> tasks = docker.listTasks();
		ServAndNode servAndNode;
		for(Task task : tasks) {
			//here I am setting the service id, the node id, the service name and the node name
			servAndNode = new  ServAndNode(task.serviceId(), task.nodeId(),
					this.getServiceName(docker, task.serviceId()) , this.getNodeName(docker, task.nodeId()));
			this.relation.put(task.serviceId(), servAndNode);
		}
	}

	private static List<Placement> placementConstraints(DockerClient docker) throws DockerException, InterruptedException {
		List<Task> list = docker.listTasks();
		List<Placement> local = new ArrayList<Placement>();
		for(Task t : list) {
			local.add(t.spec().placement());
		}
		return local;
	}

	private static List<String> getConstraints(DockerClient docker) throws DockerException, InterruptedException{
		List<Placement> placements = placementConstraints(docker);
		String rules [] = new String [placements.size()];
		List<String> constraints = new ArrayList<String>();
		for(int i = 0; i < placements.size() ; i++) {
			if(placements.get(i).constraints() != null)
				rules[i] = placements.get(i).constraints().toString();
			else
				//mexi aqui!!!!!
				//rules[i] = "[node.hostname == slave";
				rules[i] = "null";
			constraints.add(rules[i]);
		}
		return constraints;

	}

	private String getNodeName(DockerClient docker, String nodeID) throws DockerException, InterruptedException {
		List<Node> list = docker.listNodes();
		for(Node n : list)
			if(n.id().equals(nodeID))
				return n.description().hostname();
		return null;
	}

	private static Service getService(DockerClient docker, String serviceID) throws DockerException, InterruptedException {
		List<Service> list = docker.listServices();
		for(Service s : list)
			if(s.id().equals(serviceID))
				return s;
		return null;
	}
	private String getServiceName(DockerClient docker, String serviceID) throws DockerException, InterruptedException {
		List<Service> list = docker.listServices();
		for(Service s : list)
			if(s.id().equals(serviceID))
				return s.spec().name();
		return null;
	}

}

I have a mongo DB running on a node called vinicius . I want to migrate it to a node called slave
How Can I fix this code to do what I want?
See the errors and the main class:
package main;

import com.spotify.docker.client.DefaultDockerClient;
import com.spotify.docker.client.DockerClient;
import com.spotify.docker.client.exceptions.DockerCertificateException;
import com.spotify.docker.client.exceptions.DockerException;

import control.Control;
import entities.ServAndNode;

public class Test {

	public static void main(String[] args) throws DockerCertificateException, DockerException, InterruptedException {
		// TODO Auto-generated method stub

		DockerClient docker = DefaultDockerClient.fromEnv().build();
		// [servID=9gokanuqk1nse5f0z24iu9b3m, nodeID=k74wi8f89rzxzro4smmq5gyxk ,servName=app_mongodb, nodeName=vinicius-VPCEG17FB]
		String node1 = "slave";

		Control control = new Control();
		control.setRelation(docker);
		//get the keys
		ServAndNode info = control.getRelation().get("9gokanuqk1nse5f0z24iu9b3m");

		control.move(docker, info.getServID());

		System.out.println(control.getRelation().values());

	}

}

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" com.spotify.docker.client.exceptions.DockerRequestException: Request error: POST unix://localhost:80/services/create: 500, body: {"message":"rpc error: code = Unknown desc = key '[node.hostname' is invalid"}

	at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:2691)
	at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:2641)
	at com.spotify.docker.client.DefaultDockerClient.createService(DefaultDockerClient.java:1837)
	at com.spotify.docker.client.DefaultDockerClient.createService(DefaultDockerClient.java:1826)
	at control.Control.move(Control.java:76)
	at main.Test.main(Test.java:26)
Caused by: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
	at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1020)
	at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:816)
	at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:92)
	at org.glassfish.jersey.client.JerseyInvocation$5.completed(JerseyInvocation.java:773)
	at org.glassfish.jersey.client.ClientRuntime.processResponse(ClientRuntime.java:198)
	at org.glassfish.jersey.client.ClientRuntime.access$300(ClientRuntime.java:79)
	at org.glassfish.jersey.client.ClientRuntime$2.run(ClientRuntime.java:180)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:340)
	at org.glassfish.jersey.client.ClientRuntime$3.run(ClientRuntime.java:210)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Maybe I found the problem. But I still need some help
changing the method placementConstraints to :
private static List<Placement> placementConstraints(DockerClient docker) throws DockerException, InterruptedException {
		List<Task> list = docker.listTasks();
		List<Placement> local = new ArrayList<Placement>();
		for(Task t : list) {
			if(t.spec().placement() == null)
				t.spec().placement().constraints().add("slave");
			System.out.println(t.spec().placement());
			local.add(t.spec().placement());
		}
		return local;
	}

I realized the most of all placement are null. But how Can I set this?

I'm not sure what is going wrong. This is a lot to digest.
Are you able to do what you want to do using the docker CLI? If you are able to do that, it might help you and us understand how to translate to the API calls.

As a side note, I don't think you need Service getService(DockerClient docker, String serviceID). We have Service DockerClient.inspectService(String serviceId).

I see.
In fact, I really did not tryed to do that with CLI.
Yet, if the java client can get some data from the running containers, I think it do not need to be considered.
By the way, I need to know I can create a Placement with my nodes and how to set it correctly on the ServiceSpec

Let make it simple?
How can I implement a way to move a running container from one node to another one?
I got a very small template, and you can see it here, on the last method called move

I think what you’re doing is on the right track. You have a running service. You need to issue an updateService call to that service's ID, using a ServiceSpec on which you have set the placement constraint node.hostname == whatever. That is what your code appears to do, so I think you’re probably almost there.
I do see some problems with the placementConstraints method you posted in your comment above.
if(t.spec().placement() == null)
	t.spec().placement().constraints().add("slave");

You’re checking that t.spec().placement() == null, then doing things with t.spec().placement(). That seems guaranteed to throw a NPE. You should, I think, check instead that t.spec().placement() != null. Or, if t.spec().placement() == null, you should add your desired constraint to a new empty list.
The List that gets returned from t.spec().placement().constraints() is an ImmutableList. You will not be able to add anything to it. Indeed, you can see in the screenshot you posted that your IDE has struck through your invocation of the add method because it knows you can't use this. If you want to add something to this list, you need to first copy it to a mutable list, then add what you want.
The String "slave" is not a constraint. The constraint would need to be "node.hostname == slave".

Try fixing those things and see what happens.

I will try to do what you sugest. See below 2 screenshots to get an ideia of how this is  working
Since from now, thank you for your support

I’m going to close since this issue seems a bit out of the realm of docker client which is just a java library to interact with the remote docker API. If you find a bug with the docker client’s interaction or a missing API call or functionality I can reopen. But it seems like the issue so far is what API methods to call. The methods in this client map one to one to the remote API so once you figure out what docker CLI commands to run or what API endpoints to call, you should be able to easily translate to the methods in this library.


Add file for the time aggregation/resolution of assets and flows

Summary
We need a file describing how the assets and flows variables are aggregated, i.e., the time resolution
Assumption: The number of time steps in the rep period describes the underlying variable times, and therefore is the minimum resolution possible. For smaller resolutions, increase the number of time steps and decrease the time scale.
Basic Example
ID of the asset or flow
id,rp,time_resolution
1,1,[1;1;1;1;1;1;1;1;1;1;1;1]
2,1,[3;3;3;3]
3,1,[4;4;4]

Drawbacks
None
Reference Issues
No response

Blocked by #180


Added generic proper error handling

:+1: tested

:+1:

:-1: due to code duplication

@jdsn I have resolved the code duplication now.

still looks like code duplication, but I don't either know how to do it better :)
but this looks a lot better, so  :+1:


Regarding bugs generated by tasks that require the addition of custom tokens.

System Info
peft==0.7.1
Who can help?
@BenjaminBossan
Information

[ ] The official example scripts
[X] My own modified scripts

Tasks

[ ] An officially supported task in the examples folder
[X] My own task or dataset (give details below)

Reproduction
This is my raw code, I need to fine-tune the LLAMA model on my dataset, and I need to add some dedicated tokens ，（token_{i}As input, i as label).
# LLAMA Tokenizer and model
tokenizer = LlamaTokenizer.from_pretrained(config.checkpoints.path)
model = LlamaForCausalLM.from_pretrained(
    config.checkpoints.path,
    load_in_8bit=True,
    device_map="auto",
    torch_dtype=torch.float16,
)

tokenizer.add_tokens([f"<token_{i}>" for i in range(1025)])

tokenizer.add_tokens([f"{i}" for i in range(257)])

model.resize_token_embeddings(len(tokenizer))

eval_prompt = """
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
task name

### Input:
Front:<token_796><token_301><token_559><token_801><token_272><token_514><token_87><token_272>

### Response:
"""

model_input = tokenizer(eval_prompt, return_tensors="pt").to(model.device)
model.eval()
    with torch.no_grad():
        print("before train")
        print(
            tokenizer.decode(
                model.generate(**model_input, max_new_tokens=100)[0],
                skip_special_tokens=True,
            )
        )
peft_config = LoraConfig(
        task_type=TaskType.CAUSAL_LM,
        inference_mode=False,
        r=8,
        lora_alpha=32,
        lora_dropout=0.05,
        target_modules=["q_proj", "v_proj"],
    )
model = prepare_model_for_kbit_training(model)
model = get_peft_model(model, peft_config)
train_config = {
        "lora_config": peft_config,
        "learning_rate": 1e-4,
        "num_train_epochs": config.train.num_train_epochs,
        "gradient_accumulation_steps": 2,
        "per_device_train_batch_size": 2,
        "gradient_checkpointing": False,
    }
training_args = TrainingArguments(
        output_dir=output_dir,
        # report_to=config.train.report_to,
        overwrite_output_dir=True,
        bf16=True,  # Use BF16 if available
        # logging strategies
        logging_dir=f"{output_dir}/logs",
        logging_strategy="steps",
        logging_steps=10,
        save_strategy="no",
        # optim="adamw_torch_fused",
        optim="paged_adamw_32bit",
        max_steps=total_steps if enable_profiler else -1,
        **{k: v for k, v in train_config.items() if k != "lora_config"},
    )
trainer = Trainer(
            model=model,
            args=training_args,
            train_dataset=train_dataset,
            data_collator=default_data_collator,
            callbacks=[profiler_callback] if enable_profiler else [],
        )

        # Start training
        trainer.train()
model.eval()
    with torch.no_grad():
        print("After train")
        print(
            tokenizer.decode(
                model.generate(**model_input, max_new_tokens=100)[0],
                skip_special_tokens=True,
            )
        )
model.save_pretrained(output_dir)
tokenizer.save_pretrained(output_dir)

The above is the code I trained. After the training, I first called generate method to check whether the model was successfully fine-tuned (it could be called normally in the training script). Then I called save_pretrained(output_dir) method to save the model. I found that the save_pretrained(output_dir) method did not hold ["embed_tokens" and "lm_head"] by default. When I tried to use a trained model for inference, I got an cuda error:
# This is another file
tokenizer = LlamaTokenizer.from_pretrained("tmp/llama-output")

model = LlamaForCausalLM.from_pretrained(
    "tmp/llama-output",
    load_in_8bit=True,
    device_map="auto",
    torch_dtype=torch.float16,
)
eval_prompt = """
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
task name

### Input:
Front:<token_796><token_301><token_559><token_801><token_272><token_514><token_87><token_272>

### Response:
"""

model_input = tokenizer(eval_prompt, return_tensors="pt").to(model.device)
model.eval()
with torch.no_grad():
    print("After train")
    print(
        tokenizer.decode(
            model.generate(**model_input, max_new_tokens=100)[0],
            skip_special_tokens=True,
        )
    )
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:09<00:00,  1.65s/it]
After train
../aten/src/ATen/native/cuda/Indexing.cu:1141: indexSelectLargeIndex: block: [78,0,0], thread: [32,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
../aten/src/ATen/native/cuda/Indexing.cu:1141: indexSelectLargeIndex: block: [78,0,0], thread: [33,0,0] Assertion `srcIndex < srcSelectDimSize` failed.

adapter_config.json:
{
  "alpha_pattern": {},
  "auto_mapping": null,
  "base_model_name_or_path": "checkpoints/llama2",
  "bias": "none",
  "fan_in_fan_out": false,
  "inference_mode": true,
  "init_lora_weights": true,
  "layers_pattern": null,
  "layers_to_transform": null,
  "loftq_config": {},
  "lora_alpha": 32,
  "lora_dropout": 0.05,
  "megatron_config": null,
  "megatron_core": "megatron.core",
  "modules_to_save": null,
  "peft_type": "LORA",
  "r": 8,
  "rank_pattern": {},
  "revision": null,
  "target_modules": [
    "v_proj",
    "q_proj"
  ],
  "task_type": "CAUSAL_LM"
}

Expected behavior
model.resize_token_embeddings(len(tokenizer)) is usually performed to add custom tokens to the initial LLM. The default save_pretrained() behavior is not saved. I think this is logically missing. The save_pretrained() method should be able to save ["embed_tokens", "lm_head"] by default,That's the first question.

After that, I added the parameters modules_to_save=["embed_tokens", "lm_head"] in LoraConfig, which made the checkpoint do hold both layers of parameters, but again ran into problems when I tried to load them.
RuntimeError: Error(s) in loading state_dict for LlamaForCausalLM:
        size mismatch for model.embed_tokens.modules_to_save.default.weight: copying a param with shape torch.Size([33272, 4096]) from checkpoint, the shape in current model is torch.Size([32000, 4096]).
        size mismatch for lm_head.modules_to_save.default.weight: copying a param with shape torch.Size([33272, 4096]) from checkpoint, the shape in current model is torch.Size([32000, 4096]).

The weight of the model loaded from adapter_model is still only 32000 token embedding size. I have to load it from the base model checkpoint and then execute the following code to properly reason with the trained model:
tokenizer = LlamaTokenizer.from_pretrained("tmp/llama-output")

model = LlamaForCausalLM.from_pretrained(
    "tmp/llama-output",
    load_in_8bit=True,
    device_map="auto",
    torch_dtype=torch.float16,
)
model = LlamaForCausalLM.from_pretrained(
    config.checkpoints.path,
    load_in_8bit=True,
    device_map="auto",
    torch_dtype=torch.float16,
)
# redo resize
model.resize_token_embeddings(len(tokenizer))
model = PeftModel.from_pretrained(model, "tmp/llama-output/logs_test")

Although my problem was eventually solved, I think it was missing in the implementation logic of the peft library, which was confusing for tasks that needed to add custom tokens. I could reason directly in the training script, and I didn't realize that the saved model didn't record my changes to the embedded layer. Being a peft newbie might not be too friendly, and I spent the day reading about related issues to solve my problems. Look forward to improvements.

By the way, I tried to save after calling Model.merge_and_unload () during the process of solving the problem, which I think can save all model weights including ["embed_tokens" and "lm_head"] layers, I added the code as follows:
model = model.merge_and_unload()
    model.save_pretrained(output_dir)
    tokenizer.save_pretrained(output_dir)
    with torch.no_grad():
        print("After merge")
        print(
            tokenizer.decode(
                model.generate(**model_input, max_new_tokens=100)[0],
                skip_special_tokens=True,
            )
        )

This saves the entire model weight directly in the save directory, which gives normal results in my training script:
before train

Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
task name

### Input:
Front:<token_796><token_301><token_559><token_801><token_272><token_514><token_87><token_272>

### Response:
"""

    <token_123>......
    ms
    182

    mis（messy output）

After train

    Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
task name

### Input:
Front:<token_796><token_301><token_559><token_801><token_272><token_514><token_87><token_272>

### Response:
 217 115 32 51 39 128 180 0 (right output)

After merge

    Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
task name

### Input:
Front:<token_796><token_301><token_559><token_801><token_272><token_514><token_87><token_272>

### Response:
  217 115 32 51 39 128 180 0 (right output)

But when I used another inference script to load the saved model, I got confused output. I thought the problem was with the Model.save_pretrained (output_dir) method.

Thanks for reporting this. As you mention, we indeed offer a solution but it could be better documented. Do you have a suggestion where in the documentation we could best put that information?

By the way, I tried to save after calling Model.merge_and_unload () during the process of solving the problem

Note that if you do that, you will save the whole model, not only the adapter, resulting in a much larger file. Depending on your use case, you may want to avoid that. Also, it means that you cannot disable the adapter anymore after loading, which could also be something you may need.

Thanks for reporting this. As you mention, we indeed offer a solution but it could be better documented. Do you have a suggestion where in the documentation we could best put that information?

By the way, I tried to save after calling Model.merge_and_unload () during the process of solving the problem

Note that if you do that, you will save the whole model, not only the adapter, resulting in a much larger file. Depending on your use case, you may want to avoid that. Also, it means that you cannot disable the adapter anymore after loading, which could also be something you may need.

Thanks for your reply, I think you can explain some of the fine-tuning scenarios that require changes to the vocabulary in the documentation, which may be more friendly to peft newobs. Specifically, you and I think we can add instructions for this scenario here（https://huggingface.co/docs/peft/v0.7.1/en/tutorial/peft_model_config）.


Container call inputs/outputs

User Story
As an opspec implementor
I want explicit inputs & outputs from container calls
In order to unambiguously determine their inputs/outputs
Example
inputs:
  input1:
    file: {}
  input2:
    socket: {}
outputs:
  output1:
    dir: {}
  output2:
    socket: {}
run:
  container:
    inputs:
      image: { ref: alpine }
      fs:
        /rootDir:
          mode: 600
          /childDir1:
            /file1.txt:
              data: i'm a text file
              mode: 600
            /file1:
              data: $(input1)
          /childDir2:
            /file2.sh:
              data: |
                #!/usr/bin/env sh
                echo "i'm an executable shell script"
              mode: 777
      sockets:
        host1: $(input2)
    outputs:
      output1: $(fs./rootDir)
      output2: $(sockets.'/var/run/docker.sock')

container type will be more flexible


Fixed #35107: Added documentation about stdin

Added documentation that clarified that stdin is not an attribute of BaseCommands. Provided an example of how to use sys.stdin instead.

Closing per ticket.


[Bug]   Failed to execute system command  java.lang.NumberFormatException: For input string: "api95_40010"

Search before asking

[X] I searched in the issues and found nothing similar.

Version
1.0.0
Describe the bug and provide the minimal reproduce step
I restart cluster , it occur error when I restart datanode.
What did you expect to see?
sucess start
What did you see instead?
Failed to execute system command
java.lang.NumberFormatException: For input string: "api95_40010"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:589)
at java.lang.Long.parseLong(Long.java:631)
at org.apache.iotdb.consensus.iot.logdispatcher.IndexController.restore(IndexController.java:135)
at org.apache.iotdb.consensus.iot.logdispatcher.IndexController.(IndexController.java:57)
at org.apache.iotdb.consensus.iot.logdispatcher.LogDispatcher$LogDispatcherThread.(LogDispatcher.java:209)
at org.apache.iotdb.consensus.iot.logdispatcher.LogDispatcher.lambda$new$1(LogDispatcher.java:79)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
at org.apache.iotdb.consensus.iot.logdispatcher.LogDispatcher.(LogDispatcher.java:80)
at org.apache.iotdb.consensus.iot.IoTConsensusServerImpl.(IoTConsensusServerImpl.java:129)
at org.apache.iotdb.consensus.iot.IoTConsensus.initAndRecover(IoTConsensus.java:135)
at org.apache.iotdb.consensus.iot.IoTConsensus.start(IoTConsensus.java:109)
at org.apache.iotdb.db.service.DataNode.active(DataNode.java:320)
at org.apache.iotdb.db.service.DataNode.doAddNode(DataNode.java:162)
at org.apache.iotdb.db.service.DataNodeServerCommandLine.run(DataNodeServerCommandLine.java:95)
at org.apache.iotdb.commons.ServerCommandLine.doMain(ServerCommandLine.java:58)
at org.apache.iotdb.db.service.DataNode.main(DataNode.java:132)
2022-12-05 17:23:17,005 [Thread-1] INFO  o.a.i.c.conf.CommonConfig:302 - System will reject write operations when shutting down.
2022-12-05 17:23:17,011 [1-server-thread1] INFO  o.a.r.s.i.RaftServerImpl:1045 - 1@group-000200000005: takeSnapshotAsync SnapshotManagementRequest:client-05049C4E2F77->1@group-000200000005, cid=1, seq=0, RO, null, Create:
2022-12-05 17:23:17,012 [1-server-thread1] INFO  o.a.ratis.conf.ConfUtils:46 - raft.server.snapshot.creation.gap = 1024 (default)
2022-12-05 17:23:17,014 [pool-34-IoTDB-ratis-bg-disk-guardian-1] INFO  o.a.i.c.r.RatisConsensus:709 - Raft group group-000200000005 took snapshot successfully
2022-12-05 17:23:17,014 [Thread-1] INFO  o.a.i.d.s.IoTDBShutdownHook:69 - IoTDB exits. Jvm memory usage: 0 GB 251 MB 873 KB 496 B
Anything else?
No response
Are you willing to submit a PR?

[ ] I'm willing to submit a PR!

HI, this bug is caused by our internal code handling host with -. We will fix it in the next version. If you're deploying 1.0 for your current environment, could you remove the - from all hosts or replace it with another symbol, such as _?

Hi, this issue have been fixed in this PR, which will be released in 1.0.1~


Mixed LTR/RTL support

Is it possible to add support for mixed LTR/RTL? This plugin implements it, but it's been deprecated.

It's supported in Obsidian RTL for over a year.
Just switch to Auto direction mode, which can be configured in the plugin settings to be the default.

Works like a charm, amazing! Thanks!


nested_object conversion issue

https://github.com/aws-samples/cql-replicator/blob/24cc53f1b8c80c81204165cf4dbb55c1915920fc/glue/sbin/keyspaces/CQLReplicator.scala#L174
if we have such scheme in aws keyspaces
CREATE TABLE channel.channels (
    id timeuuid PRIMARY KEY,
    alias text,
    company_id text,
    created timestamp,
    description text,
    name text,
    photo text,
    sessiondata text,
    sessionid timeuuid,
    sessionlastid timeuuid,
    state text,
    type text,
    updated timestamp,
    user frozen<user>,
    users map<text, text>
)

users map<text, text> generating nested_object like (when we exporting it from cassandra table):
"users":"{\"g.Wngn-ynR5hl-AAAC\":{\"id\":\"g.Wngn-ynR5hl-AAAC\",\"name\":null,\"photo\":null,\"type\":\"g\",\"t\":null}}"
there is no change to store string like this so processed string should looks like:
users":"{\"g.Wngn-ynR5hl-AAAC\":\"{\\\"id\\\":\\\"g.Wngn-ynR5hl-AAAC\\\",\\\"name\\\":null,\\\"photo\\\":null,\\\"type\\\":\\\"g\\\",\\\"t\\\":null}\"}"

Hi @dubrovine, I tried to replicate your issue, here is my result:
Source:

Target:

Both your examples replicated as is with no changes.

Sorry. I forgot to mention that we are trying to replicate from UDT
here is the original cassandra scheme:
`CREATE TABLE channel.channels (
    id timeuuid PRIMARY KEY,
    alias text,
    company_id text,
    created timestamp,
    description text,
    name text,
    photo text,
    sessiondata text,
    sessionid timeuuid,
    sessionlastid timeuuid,
    state text,
    type text,
    updated timestamp,
    user frozen<user>,
    users map<text, frozen<user>>
)`

users map<text, frozen<user>>
here is keyspaces scheme:
`CREATE TABLE channel.channels (
    id timeuuid PRIMARY KEY,
    alias text,
    company_id text,
    created timestamp,
    description text,
    name text,
    photo text,
    sessiondata text,
    sessionid timeuuid,
    sessionlastid timeuuid,
    state text,
    type text,
    updated timestamp,
    user text,
    users map<text, text>
)`

users map<text, text>
so we trying to avoid UDTs and using text (json string instead)
for example we exports one record from cassandra & receiving such query
INSERT INTO channel.channels JSON '{"id":"c6f05420-0f1c-11e8-8ca4-eff552a6d2cd","alias":null,"company_id":"i88430253129","created":"2018-02-11 11:14:50.596Z","description":null,"name":"test","photo":null,"sessiondata":null,"sessionid":null,"sessionlastid":null,"state":null,"type":"help","updated":null,"user":"{\"id\":\"g.Wngn-ynR5hl-AAAC\",\"name\":null,\"photo\":null,\"type\":\"g\",\"t\":null}","users":"{\"g.Wngn-ynR5hl-AAAC\":{\"id\":\"g.Wngn-ynR5hl-AAAC\",\"name\":null,\"photo\":null,\"type\":\"g\",\"t\":null}}"}'
I am trying to insert directly into keyspaces table & got error

@dubrovine I think, the problem is in the structure map<text, frozen> that has V defined by the frozen UDT. Currently, the CQLReplicator can transform only non-nested UDTs, for example, the user: frozen column maps to user: text in the target table. Let me check if there is quick workarounds.

@dubrovine you are missing double quotes around UDT inside MAP: "users":"{"g.Wngn-ynR5hl-AAAC":"{"id":"g.Wngn-ynR5hl-AAAC","name":null,"photo":null,"type":"g","t":null}"}".

yeap. you're right (I was mentioned it in the first comment)
is it possible to add double quotes in CQLReplicator.scala ?

@dubrovine I've added another support function to transform nested UDT objects in collections to text (MAP<Type, UDT> to MAP<Type, Text<):

Limitations: Supports only Map structure. Pleas use this branch to test it your environment. Please, keep me posted after your tests I will merge it.

hello there.
to be honest we didn't have time to check everything carefully
since we received this news AWS KEYSPACES UDT SUPPORT
actually THIS seems like fix everything and we don't need to make any conversion


Dealing with 0-based and 1-based index offset

Currently, if I run in Lua a javascript function that returns an array, it will return a 0-based table. So, for example, when I do this, I won't be able to iterate through the result like I'd normally do in Lua and I'm forced to use a numeric for:
local title_divs = window.document:getElementsByClassName("post-title")

Should this result in 1-based tables?

I guess it should, yes. I'll take a look...


travis: increase timeout to 120 minutes

Observed on this build: https://app.travis-ci.com/github/lightningnetwork/lnd/builds/261672783
Sounds like Travis is red most of the time because it simply takes longer than 30 minutes to run the build.

Yayy, green Travis :tada:


chore: type hints

Description

With #229 being merged, types of components are being exported, use these types and reduce number fo eslint warning that it throws.
Possible solution(s)

Import the types from /package/component_name/types.d.ts and use then in place where any is being used.
Additional context

@anantJjain, are you still working on this or may I proceed with it?

My bad guys I have been working on this! I forgot to link the issue.


Use parameters after script name as arguments to script on VM

I'm thinking the new convert-image.sh script will need command line parameters to specify the kind of image wanted, and buildbot would need to pass them via the run command. With ArgumentParser I'm not sure how to pass all the parameters after the script name to the script, so I did this: https://github.com/dreamlayers/buildbot/commit/574d78f88399695db44106930c18c85c3418ebfa Not sure if this change is wanted because I removed ArgumentParser from the run command, but it was unnecessary there anyways.

Let's try to keep the argument parser, it can be useful to generate a help message. To capture the rest of the arguments you can try nargs='*'.
But maybe a better way is to pre-concatenate the arguments. That maps well to kitchen's expectations that the entire command is passed as a single argument.
$ ./buildbot run "shared/myscript.sh --with=some args in quotes"

Fixed in 47dd7e87


Improve the ColorSelector

These changes enable the user to click and drag inside the color selector's panel and slider.

Nice, thanks :)


linear projection "bias=True" != original t2t implementation transformer

Hi,
In modeling.py line 866:
with tf.variable_scope("output"):           attention_output = tf.layers.dense(               attention_output,               hidden_size,               kernel_initializer=create_initializer(initializer_range))
You are setting the bias of the dense layer = True, where in the original implementation of transformer they are setting it to False. There is any reason for doing that?
Thanks.

No particular reason, we didn't attempt to make it 100% compatible with the original implementation and minor changes like this probably aren't important.


Sliding only works on the first click.

The first image clicked will slide to the centre; after that clicking on an image has no effect.
Removing this code
// this.refs.stage.style['pointerEvents'] = 'none';
from lime 247 appears to solve the problem.

Hey @jculloty , thanks for brining this issue up. I'll take a look at this.

Quick update on these tickets. I came across some dependency issues when I ran it locally, so I'm going to be updating the repo in order to get everything up to date. I'll keep you updated on the state of affairs going forward

Fixed with newest release

This bug still exists in 0.2.18 master as of today. I removed the line and everything works fine otherwise. FWIW, here is my basic structure of the items in the coverflow
Coverflow
  div onClick={e=>this.clickHandler(e)}
    img

@revgum thanks for the PR! Looks great


Passing arguments other than skopt.space.space.Dimension

Hi,
I'm following the example given in the doc of skopt.utils.use_named_args.
I'm wondering is there a way of passing arguments other than those in skopt.space.space.Dimension (e.g. a Python string) to an objective function?
I tried to put a variable of other types in the search-space list but it isn't allowed.
(ValueError: All elements in list must be instances of <class 'skopt.space.space.Dimension'>)

By appending Categorical([an_hashable_obj], name='name') vars into the search_space list, it's possible to parse args of other types.


fix #1542 issue with AutoComplete display text on iPad

39fde06 is fine for me, as far as Travis succeed.


Varnish PURGE not allowed from php-debug

When saving a product during a php debug session, Varnish rejects the purge:
*   << Request  >> 1245412
-   Begin          req 1245411 rxreq
-   Timestamp      Start:<PHONE_NUMBER>.059978 0.000000 0.000000
-   Timestamp      Req:<PHONE_NUMBER>.059978 0.000000 0.000000
-   ReqStart       <IP_ADDRESS> 39308 a0
-   ReqMethod      PURGE
-   ReqURL         /
-   ReqProtocol    HTTP/1.1
-   ReqHeader      X-Magento-Tags-Pattern: ((^|,)cat_p_1(,|$))
-   ReqHeader      Host: varnish
-   ReqHeader      X-Forwarded-For: <IP_ADDRESS>
-   VCL_call       RECV
-   VCL_acl        NO_MATCH purge
-   VCL_return     synth
-   VCL_call       HASH
-   VCL_return     lookup
-   Timestamp      Process:<PHONE_NUMBER>.060007 0.000029 0.000029
-   RespHeader     Date: Tue, 07 Jul 2020 15:22:52 GMT
-   RespHeader     Server: Varnish
-   RespHeader     X-Varnish: 1245412
-   RespProtocol   HTTP/1.1
-   RespStatus     405
-   RespReason     Method Not Allowed
-   RespReason     Method not allowed
-   VCL_call       SYNTH
-   RespHeader     Content-Type: text/html; charset=utf-8
-   RespHeader     Retry-After: 5
-   VCL_return     deliver
-   RespHeader     Content-Length: 278
-   Storage        malloc Transient
-   RespHeader     Connection: keep-alive
-   Timestamp      Resp:<PHONE_NUMBER>.060122 0.000144 0.000115
-   ReqAcct        80 0 80 210 278 488

After some digging, this is what I came up with:
In images/varnish/6.0/Dockerfile and images/varnish/4.1/Dockerfile the ACL PURGE environment variable is set as
ENV ACL_PURGE_HOST  php-fpm

In images/varnish/context/default.vcl the purge ACL is set to this value:
acl purge {
    "${ACL_PURGE_HOST}";
}

It would be great if the php-debug host could be included in the configuration, too, if only as it would have saved me an hour debugging the issue. :)
I would be happy to open a PR, but unfortunately I don't know the syntax to include two hosts in ACL_PURGE_HOSTS...

Since these are development focused images, I'm included to have the default in the Dockerfile simply be <IP_ADDRESS> which should have the effect of allowing PURGE requests from any other container on the project's docker network. Making this value incluce more than a single hostname or a single CIDR address range would require a bit of an overhaul, and you are correct, it should accept PURGE requests from php-fpm, and debug, and also from php-blackfire, etc.
As the port is not published to the host machine, there shouldn't be any issues arising from allowing PURGE from anywhere by default in the container image (this would be a potential concern if the image was being used in a production Kuberenetes Pod for example however)

The varnish images have been updated to default ACL_PURGE_HOST to <IP_ADDRESS>/0 resolving the inability to PURGE from php-debug container:
$ warden shell -c 'curl -X PURGE -H "X-Magento-Tags-Pattern: *" varnish'
<!DOCTYPE html>

    <title>200 Purged</title>

Error 200 Purged

Purged

Guru Meditation:

XID: 2

Varnish cache server

$ warden debug -c 'curl -X PURGE -H "X-Magento-Tags-Pattern: *" varnish'
<!DOCTYPE html>

    <title>200 Purged</title>

Error 200 Purged

Purged

Guru Meditation:

XID: 32770

Varnish cache server

In order for this to take effect, you'll want to pull the latest images via warden env pull varnish followed by warden env up -d varnish
Appreciate you surfacing this issue, and providing the detail around what was going on (I'm honestly surprised nobody else had encountered and reported this by now!)


Is the CUDA toolkit required as a user?

Is the CUDA tookit a requirement for users (not devs)? If so, it should probably be documented on the README. I'm happy to submit a PR adding it here and in TorchSharpExamples.
Details:

I did not have CUDA torchsharp issues with old versions and Cuda 11.2 installed, but with torchsharp v0.100.2 I was getting errors about CUDA not being available, including with the CUDA C# tutorial in TorchSharpExamples.
The problems went away after I installed CUDA 11.7 via winget install Nvidia.CUDA -v 11.7.

I see, thank you. I can confirm that after further inspection does look like it was a driver issue. I have a different PC with new drivers but no Nvidia toolkit, and cuda torchsharp works fine there.


REST fallback does not use most fine-grained error code available when parsing errors

When canonical (gRPC) error codes are mapped to HTTP status codes, in some cases the mapping is lossy. Multiple canonical error codes map to one HTTP status code. For example ABORTED and ALREADY_EXISTS both map to 409. By using only the HTTP status code (409) a client would not be able to differentiate how to retry these errors.
The error response returned from Google's JSON HTTP APIs includes the gRPC error code in error.status, so this behavior can be addressed by parsing error.status and only falling back to the http status code if the grpc code is not provided.

Fix PR opened: #1633


Missing python3-dev dependency

Describe the bug
Failure to install Python dependencies due to missing python3-dev package. Package is not mentioned in Install dependencies.
To Reproduce

Install Ubuntu 20.04 LTS on a machine.
Follow Getting Started Guide
Fail on last step of Get Zephyr and install Python dependencies

Expected behavior
No errors after pip3 install --user -r ~/zephyrproject/zephyr/scripts/requirements.txt.
Impact
Annoyance. Solved via sudo apt install python3-dev.
Screenshots or console output
  ...
  psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
      9 | #include <Python.h>
        |          ^~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for psutil1
  ...

Environment (please complete the following information):

OS: Ubuntu 20.04 LTS
Toolchain: N/A
Commit SHA: 7778c22b6031ae766df7cd08522eb9675a0aeb69

@dieselburner would you mind sending a PR for this?

@dieselburner would you mind sending a PR for this?

Yes, give me a moment.

@carlescufi here you go.

@carlescufi here you go.

Thanks!


Conform Rational to Strideable

And to SignedNumber along the way.
Closes #71.

Codecov Report

Merging #93 into master will increase coverage by 0.61%.
The diff coverage is 95.5%.

@@            Coverage Diff             @@
##           master      #93      +/-   ##
==========================================
+ Coverage   88.57%   89.18%   +0.61%
==========================================
  Files          47       47
  Lines        1400     1415      +15
==========================================
+ Hits         1240     1262      +22
+ Misses        160      153       -7

Impacted Files
Coverage Δ

ArithmeticTools/CategoryTheory.swift
50% <ø> (ø)
:arrow_up:

ArithmeticToolsTests/RationalTests.swift
100% <100%> (+1.17%)
:arrow_up:

ArithmeticTools/Rational.swift
67.28% <33.33%> (+6.89%)
:arrow_up:

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 dcaf322...ff567f8. Read the comment docs.


CRLDP without HTTP

As per CABF BR, if the CRLDP extension is present, an HTTP URI MUST be present.
https://crt.sh/?id=5669744&opt=cablint shows that this isn't always the case, this should raise an error.

Fixed

With https://github.com/awslabs/certlint/commit/2eca217a37b625cc05584b484625c820685c1823, every certificate that contains the CRL Distribution Points extension is being flagged with "E: BR certificates with CRL Distribution Point must include HTTP URL".
ISTM that you either need to:

Prepend 2 SPACEs at the beginning of the 'URI:http://' string.
or
Add the following line immediately before the inner "unless":
dps.each(&:lstrip!)


Pods stuck in ContainerCreating on AKS due to "MountVolume.SetUp failed for volume "docker-socket" : hostPath type check failed: /var/run/docker.sock is not a socket file"

Bug description
Following the otherwise excellent zero-to-binderhub guide on Azure Kubernetes Service (AKS), the binderhub-image-cleaner and build-pods are stuck in ContainerCreating, causing Binderhub to hault when opening a repo in the frontend
Expected behaviour
Binderhub to start running pods as they are initiated from the frontend
Actual behaviour
Containers are stuck in ContainerCreating.
kubectl get pod

NAME                                                           READY   STATUS              RESTARTS   AGE
binder-5cd459bb48-dbshg                                        1/1     Running             0          22m
binderhub-image-cleaner-2xwp5                                  0/1     ContainerCreating   0          26m
binderhub-image-cleaner-67jp8                                  0/1     ContainerCreating   0          26m
binderhub-image-cleaner-fngnb                                  0/1     ContainerCreating   0          26m
build-bjornarfjelldal-2dbinderhubtest-5fpublic-ea7ba3-507-ae   0/1     ContainerCreating   0          20m
hub-679cbfcdfb-v9vlq                                           1/1     Running             0          24m
proxy-b9cfd6db4-g9djn                                          1/1     Running             0          24m
user-scheduler-7b68bd9d58-4lbvm                                1/1     Running             0          26m
user-scheduler-7b68bd9d58-szwlc                                1/1     Running             0          26m

Doing a
kubectl describe pod
reveals that #810  is not the case here, as all pods are created in the provided namespace.
However, the events reveal the following:

Events:
Type     Reason       Age                  From               Message

Normal   Scheduled    12m                  default-scheduler  Successfully assigned binderhub/build-bjornarfjelldal-2dbinderhubtest-5fpublic-ea7ba3-507-ae to aks-nodepool1-35493018-vmss000002
Warning  FailedMount  3m59s (x4 over 10m)  kubelet            Unable to attach or mount volumes: unmounted volumes=[docker-socket], unattached volumes=[docker-socket docker-config kube-api-access-rngrq]: timed out waiting for the condition
Warning  FailedMount  102s                 kubelet            Unable to attach or mount volumes: unmounted volumes=[docker-socket], unattached volumes=[kube-api-access-rngrq docker-socket docker-config]: timed out waiting for the condition
Warning  FailedMount  29s (x14 over 12m)   kubelet            MountVolume.SetUp failed for volume "docker-socket" : hostPath type check failed: /var/run/docker.sock is not a socket file

How to reproduce

Set up a fresh resource group / cluster / containerregistry on AKS
Follow the instructions on the zero-to-binderhub guide
Log on to binder via http://external-ip from kubectl get svc (binder)
Observe frontend stuck at "Waiting for build to start...", and the new build-container stuck in "ContainerCreating" together with three binderhub-image-cleaner containers
Do a kubectl describe pod to reveal in the events the following error:

`Warning  FailedMount  29s (x14 over 12m)   kubelet            MountVolume.SetUp failed for volume "docker-socket" : hostPath type check failed: /var/run/docker.sock is not a socket file``
Your personal set up

Local OS:
macOS 11.4, helm version.BuildInfo{Version:"v3.6.2", GitCommit:"ee407bdf364942bcb8e8c665f82e15aa28009b71",

AKS/Binderhub:

AKS (with and without autoscaling)
Binderhub 0.2.0-n645.h06139f0
Full outputs:
kubectl describe deployment binder

Name:                   binder
Namespace:              binderhub
CreationTimestamp:      Fri, 06 Aug 2021 09:42:24 +0200
Labels:                 app.kubernetes.io/managed-by=Helm
Annotations:            deployment.kubernetes.io/revision: 2
meta.helm.sh/release-name: binderhub
meta.helm.sh/release-namespace: binderhub
Selector:               app=binder,component=binder,release=binderhub
Replicas:               1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  0 max unavailable, 1 max surge
Pod Template:
Labels:           app=binder
component=binder
heritage=Helm
name=binder
release=binderhub
Annotations:      checksum/config-map: bf3518883aba64f5e06a30baa56237c2be3505735e23aa8656f2b7d845ccd0e9
checksum/secret:
Service Account:  binderhub
Containers:
binder:
Image:      jupyterhub/k8s-binderhub:0.2.0-n641.h73c6ebd
Port:       8585/TCP
Host Port:  0/TCP
Args:
--config
/etc/binderhub/config/binderhub_config.py
Requests:
cpu:      200m
memory:   512Mi
Liveness:   http-get http://:binder/versions delay=10s timeout=10s period=5s #success=1 #failure=3
Readiness:  http-get http://:binder/versions delay=0s timeout=3s period=5s #success=1 #failure=1000
Environment:
BUILD_NAMESPACE:        (v1:metadata.namespace)
JUPYTERHUB_API_TOKEN:  <set to the key 'hub.services.binder.apiToken' in secret 'hub'>  Optional: false
Mounts:
/etc/binderhub/config/ from config (rw)
/etc/binderhub/secret/ from secret-config (rw)
/root/.docker from docker-secret (ro)
Volumes:
config:
Type:      ConfigMap (a volume populated by a ConfigMap)
Name:      binder-config
Optional:  false
secret-config:
Type:        Secret (a volume populated by a Secret)
SecretName:  binder-secret
Optional:    false
docker-secret:
Type:        Secret (a volume populated by a Secret)
SecretName:  binder-build-docker-config
Optional:    false
Conditions:
Type           Status  Reason

Available      True    MinimumReplicasAvailable
Progressing    True    NewReplicaSetAvailable
OldReplicaSets:
NewReplicaSet:   binder-5cd459bb48 (1/1 replicas created)
Events:
Type    Reason             Age   From                   Message

Normal  ScalingReplicaSet  34m   deployment-controller  Scaled up replica set binder-5f8d69cf76 to 1
Normal  ScalingReplicaSet  30m   deployment-controller  Scaled up replica set binder-5cd459bb48 to 1
Normal  ScalingReplicaSet  30m   deployment-controller  Scaled down replica set binder-5f8d69cf76 to 0

kubectl describe pod build-bjornarfjelldal-2dbinderhubtest-5fpublic-ea7ba3-507-ae

Name:         build-bjornarfjelldal-2dbinderhubtest-5fpublic-ea7ba3-507-ae
Namespace:    binderhub
Priority:     0
Node:         aks-nodepool1-35493018-vmss000002/<IP_ADDRESS>
Start Time:   Fri, 06 Aug 2021 09:48:06 +0200
Labels:       component=binderhub-build
name=build-bjornarfjelldal-2dbinderhubtest-5fpublic-ea7ba3-507-ae
Annotations:  binder-repo: https://github.com/bjornarfjelldal/binderhubtest_public
Status:       Pending
IP:
IPs:
Containers:
builder:
Container ID:
Image:         jupyter/repo2docker:2021.01.0
Image ID:
Port:
Host Port:
Args:
jupyter-repo2docker
--ref
507897685c11f5c0984d097c541b614edf12c6d2
--image
shopacrbinderhub.azurecr.io/binderhub/binder-bjornarfjelldal-2dbinderhubtest-5fpublic-ea7ba3:507897685c11f5c0984d097c541b614edf12c6d2
--no-clean
--no-run
--json-logs
--user-name
jovyan
--user-id
1000
--push
https://github.com/bjornarfjelldal/binderhubtest_public
State:          Waiting
Reason:       ContainerCreating
Ready:          False
Restart Count:  0
Limits:
memory:  0
Requests:
memory:     0
Environment:
Mounts:
/root/.docker from docker-config (rw)
/var/run/docker.sock from docker-socket (rw)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-rngrq (ro)
Conditions:
Type              Status
Initialized       True
Ready             False
ContainersReady   False
PodScheduled      True
Volumes:
docker-socket:
Type:          HostPath (bare host directory volume)
Path:          /var/run/docker.sock
HostPathType:  Socket
docker-config:
Type:        Secret (a volume populated by a Secret)
SecretName:  binder-build-docker-config
Optional:    false
kube-api-access-rngrq:
Type:                    Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds:  3607
ConfigMapName:           kube-root-ca.crt
ConfigMapOptional:
DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:
Tolerations:                 hub.jupyter.org/dedicated=user:NoSchedule
hub.jupyter.org_dedicated=user:NoSchedule
node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type     Reason       Age                  From               Message

Normal   Scheduled    28m                  default-scheduler  Successfully assigned binderhub/build-bjornarfjelldal-2dbinderhubtest-5fpublic-ea7ba3-507-ae to aks-nodepool1-35493018-vmss000002
Warning  FailedMount  14m (x2 over 16m)    kubelet            Unable to attach or mount volumes: unmounted volumes=[docker-socket], unattached volumes=[kube-api-access-rngrq docker-socket docker-config]: timed out waiting for the condition
Warning  FailedMount  12m                  kubelet            Unable to attach or mount volumes: unmounted volumes=[docker-socket], unattached volumes=[docker-config kube-api-access-rngrq docker-socket]: timed out waiting for the condition
Warning  FailedMount  5m37s (x7 over 26m)  kubelet            Unable to attach or mount volumes: unmounted volumes=[docker-socket], unattached volumes=[docker-socket docker-config kube-api-access-rngrq]: timed out waiting for the condition
Warning  FailedMount  91s (x21 over 28m)   kubelet            MountVolume.SetUp failed for volume "docker-socket" : hostPath type check failed: /var/run/docker.sock is not a socket file

Let me know if anything else is needed!
Edit: input files, obviously.
helm upgrade --cleanup-on-fail \   --install binderhub jupyterhub/binderhub \   --namespace binderhub \   --create-namespace \   --version=0.2.0-n645.h06139f0 \   --values config.yaml \   --values secret.yaml
is ran with
config.yaml:

config:
BinderHub:
hub_url: http://external-ip-from-binder-pod
use_registry: true
image_prefix: shopacrbinderhub.azurecr.io/binderhub/binder-
DockerRegistry:
token_url: "https://shopacrbinderhub.azurecr.io/oauth2/token?service=shopacrbinderhub.azurecr.io"

secret.yaml:
registry:
url: https://shopacrbinderhub.azurecr.io
username:
password:

I'm quite confident this is an issue that has been experienced several times before, try look around and see if you can connect this issue to already reported issues and their solutions @bjornarfjelldal !

Hi! Thanks for your quick reply, @consideRatio ! I forgot about the input data of course, it's now a part of the first post, at the very bottom, in additon to here:
helm install binderhub jupyterhub/binderhub --version=0.2.0-n645.h06139f0 --namespace=binderhub -f secret.yaml -f config.yaml
config.yaml:

config:
BinderHub:
hub_url: http://<IP_ADDRESS>
use_registry: true
image_prefix: shopacrbinderhub.azurecr.io/binderhub/binder-
DockerRegistry:
token_url: "https://shopacrbinderhub.azurecr.io/oauth2/token?service=shopacrbinderhub.azurecr.io"

secret.yaml:

registry:
url: https://shopacrbinderhub.azurecr.io
username:
password:

I believe I have tried to search for this the past few days before handing in the towel and raising an issue myself, allthough I must admit I am pretty new to this, and how to navigate around github as well. Sorry for any inconvenience..!
I previously mentioned #810 not to be the same cause, and #528 is sort of the same but should have been fixed three years ago, and #1284 I don't see what to alter..?  Apart from those I can't seem to find any similar issues when searching for "ContainerCreating", "MountVolume.Setup failed" and "docker-socket".

It never ceases to amaze me how you try solving something for days, countless hours searching, but the factor solving it is asking for help, before suddenly figuring something out.
I needed to enable dind:

dind:
enabled: true
daemonset:
image:
name: docker
tag: 18.09.2-dind

A setting I missed as it was at the very botttom of the tutorial, and it didn't seem like something obligatory. Sorry for the inconvenience again, @consideRatio, but thank you for your response!

It never ceases to amaze me how you try solving something for days, countless hours searching, but the factor solving it is asking for help, before suddenly figuring something out.
I needed to enable dind:

dind:
enabled: true
daemonset:
image:
name: docker
tag: 18.09.2-dind

A setting I missed as it was at the very botttom of the tutorial, and it didn't seem like something obligatory. Sorry for the inconvenience again, @consideRatio, but thank you for your response!

Would it be possible for you to share a code snippet of your entire config file that you got working in the end?

"Would it be possible for you to share a code snippet of your entire config file that you got working in the end?"
I also second this. For me, the symptom is exactly the same. But applying the 'dind' syntax to config.yaml and then upgrade the helm does not help. So, my guess is the syntax is still wrong.

I ran into the same problem. You want to read and do section 3.7.3 of https://binderhub.readthedocs.io/en/latest/zero-to-binderhub/setup-binderhub.html#create-config-yaml
The root problem is that k8s has moved away from docker as a solution for containerization, as a result many k8s clusters aren't running on top of docker anymore so the assumption that binderhub can use the host Docker is invalid.
For me I just added:
imageBuilderType: dind
dind:
  daemonset:
    image:
      name: docker
      tag: 18.09.2-dind

to my config.yaml file.


wip: make quitAndInstall work on macos

gotta clear all listeners on all the windows for quitAndInstall
to work. Now auto-update works as expected on mac.
thanks to the proposed fix on this issue:
https://github.com/electron-userland/electron-builder/issues/1604#issuecomment-372091881
fixes: https://github.com/ipfs-shipyard/ipfs-desktop/issues/851
License: MIT
Signed-off-by: Oli Evans<EMAIL_ADDRESS>

I'm still testing this out, as i think IFPS shutdown time can still prevent it from working.


🐞 [Bug] TFRobot: is it mount or mount_point

What happened?
Is it a mount or a mount_point?
Both succeed in deployment (that mean no validation is applied in this case), but only with mount_point the mount point was changed on the deployment disk.

which network/s did you face the problem on?
Dev
Twin ID/s
No response
Node ID/s
No response
Farm ID/s
No response
Contract ID/s
No response
Relevant log output
ssd:
      - size: 15
        mount_point: '/mnt/ssd'

in the json and the yaml the key is mount_point

Fixed in a19f6d81c7b7aeb1a95d9e6ddf9345b55a72c6a3

verified,


Product Managers' Merged PR Leaderboard in Apr 2024

Thank you to all those who have successfully merged PRs in Nov. The following list is sorted in an alphabetical order.

[x] Adityayxt

#4135
#4214
#4259

[x] jzhupup

#3758
#4034
#4176
#4194
#4243
#4296

[x] justedennnnn

#4164
#4174
#4302
#4307

[x] lemontrees123

#4136
#4137
#4154
#4155
#4161
#4211
#4228
#4274
#4293

[x] qiupingdai

#4191
#4195
#4198
#4245

[x] samzong

#4151
#4153
#4190
#4217
#4226
#4295
#4297

[ ] Ye-Ting
[x] wlp1153468871

#4141
#4147
#4233
#4251

[x] zhiyingfang2022

#4131
#4215
#4280
#4292
#4298
#4309

[ ] Zhuzhenghao

Notes:

Check all merged PRs in Apr
Check more contribution details from OSS Insight website
Check the real name from a GitHub ID to know who is who

Thanks for your efforts in last month. This will be closed.


06/19/2018 21:36 : Create Pull Request for branch prTesting_2018061921 -> master

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

split/updateTestCon.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


ingress: Support shared load balancer mode

Description
The current implementation of Ingress reconciliation in Cilium creates a LoadBalancer Service per Ingress resource. This is not the most efficient use of resources, and can be made much more efficient by sharing a single LoadBalancer config across all Ingress resources in the cluster.
The goal of this PR is to support shared and dedicated mode, which are as per below:

dedicated mode (current behavior): each Ingress resource will have its own dedicated Load Balancer.
shared mode: all Ingress resources will use the same LB.

In the shared mode, if there is any conflicting with path/host, the request will be still load balancing to respective backends equally.
Fixes: https://github.com/cilium/cilium/issues/21270
Tasks
Documentation tasks can be done in subsequent PRs or after first round of review

[x] Add a new Ingress annotation ingress.cilium.io/loadbalancer-mode:shared|dedicated. The default for if that annotation is not present will be shared, since that's how most ingress controllers work.
[x] Add a config setting for the default ingress mode, either dedicated or shared. This will default to dedicated for now.
[ ] Update docs with instructions on using the new annotation, or changing the default.
[x] Add a new code path that translates all shared LB Ingress resources into a new internal representation and then translates the internal representation into a single CiliumEnvoyConfig resource that can be consumed by the Cilium proxy layer.
[x] Ensure that Ingress conformance tests still pass on the shared LB

[x] Existing Ingress conformance test is updated to run with dedicated LB mode
[x] New Ingress conformance test is added for shared LB mode.

[ ] Update documentation

[ ] Annotations reference
[ ] Getting Started Guide

Testing
Two conformance tests in GHA give the coverage of running Ingress in one mode.
Manual testing is done to make sure that there is no issue when users toggle LB mode for particular Ingress. Please find below the details

Toggle LB mode from shared to dedicated LB mode
# Basic Ingress is created with shared mode, hence the Ingress IP is same as shared LB service IP in kube-system
$ kg ing
NAME            CLASS    HOSTS   ADDRESS          PORTS   AGE
basic-ingress   cilium   *       <IP_ADDRESS>   80      28s
$ ksysg services cilium-ingress
NAME             TYPE           CLUSTER-IP       EXTERNAL-IP      PORT(S)                      AGE
cilium-ingress   LoadBalancer   <IP_ADDRESS>   <IP_ADDRESS>   80:30018/TCP,443:31340/TCP   14h

# Sanity check with curl
$ curl http://<IP_ADDRESS>/details/1
{"id":1,"author":"William Shakespeare","year":1595,"type":"paperback","pages":200,"publisher":"PublisherA","language":"English","ISBN-10":"1234567890","ISBN-13":"123-1234567890"}%

# Toggle from shared to dedicated mode
$ k annotate ing basic-ingress io.cilium.ingress/loadbalancer-mode="dedicated" --overwrite
ingress.networking.k8s.io/basic-ingress annotated

# New Ingress IP due to new LB
$ kg ing
NAME            CLASS    HOSTS   ADDRESS          PORTS   AGE
basic-ingress   cilium   *       <IP_ADDRESS>   80      2m36s

# Checking again with curl, new IP should work
$ curl http://<IP_ADDRESS>/details/1
{"id":1,"author":"William Shakespeare","year":1595,"type":"paperback","pages":200,"publisher":"PublisherA","language":"English","ISBN-10":"1234567890","ISBN-13":"123-1234567890"}%

Toggle LB mode from dedicate to shared LB mode (Continued from previous testing)
$ k annotate ing basic-ingress io.cilium.ingress/loadbalancer-mode="shared" --overwrite
ingress.networking.k8s.io/basic-ingress annotated

$ curl http://<IP_ADDRESS>/details/1
{"id":1,"author":"William Shakespeare","year":1595,"type":"paperback","pages":200,"publisher":"PublisherA","language":"English","ISBN-10":"1234567890","ISBN-13":"123-1234567890"}%

# Dedicated LB IP should be timeout
$ curl -v http://<IP_ADDRESS>/details/1
*   Trying <IP_ADDRESS>:80...

/test

Great work! :+1:
I've completed a first pass and left some (minor) comments, I'll do a second pass tomorrow.

/test

It might be a little late but I just tested this PR, and it doesn't appear to use shared load balancers only if the annotation io.cilium.ingress/loadbalancer-mode: shared is set, even if --ingress-default-lb-mode='shared' is set.
i.e. If you have --ingress-default-lb-mode='shared' and make an ingress with no annotation, it'll be a dedicated loadbalancer
$ k logs cilium-6w4wm | grep shared
Defaulted container "cilium-agent" out of: cilium-agent, mount-cgroup (init), apply-sysctl-overwrites (init), mount-bpf-fs (init), clean-cilium-state (init), install-cni-binary (init)
level=info msg="  --ingress-default-lb-mode='shared'" subsys=daemon
level=info msg="  --ingress-shared-lb-service-name='cilium-ingress'" subsys=daemon


Add: Constraint reusing data object in createElement

Reusing a data object breaks things, such as events.
I was asked by @posva to document this and create a PR.

I will let the docs team look at this but I think it makes more sense to integrate the non-duplication of data into the previous example instead of adding a new section

(I forgot to add this link last Tuesday, the PR originated from this issue: https://github.com/vuejs/vue/issues/10303#event-2502744994)

I agree with @posva. Also, the code example is syntactically incorrect.


ignore 0pdd and other chatbots

How about to add feature for ignoring users, I believe it's needed to prevent conversations like this: https://github.com/objectionary/jeo-maven-plugin/issues/650#issuecomment-2265249581. Would be convenient to maintain some list where architect can configure what are the users/chatbots to ignore:
For instance: ignore-users.z
0pdd
rultor

@yegor256 WDYT?

Let's add configuration argument to the plugin:
- uses<EMAIL_ADDRESS>  with:
    options: |
      ignore_bots=0pdd,rultor


[ISSUE #6105] Optimize the timer implementation in Remoting

close #6105

Codecov Report

Merging #6116 (dfca035) into develop (975b4f1) will increase coverage by 0.03%.
The diff coverage is 81.25%.

@@              Coverage Diff              @@
##             develop    #6116      +/-   ##
=============================================
+ Coverage      43.23%   43.27%   +0.03%
- Complexity      8846     8856      +10
=============================================
  Files           1094     1094
  Lines          77137    77140       +3
  Branches       10057    10057
=============================================
+ Hits           33350    33379      +29
+ Misses         39623    39596      -27
- Partials        4164     4165       +1

Impacted Files
Coverage Δ

...e/rocketmq/remoting/netty/NettyRemotingServer.java
58.41% <80.00%> (-0.86%)
:arrow_down:

...e/rocketmq/remoting/netty/NettyRemotingClient.java
40.63% <81.81%> (-0.16%)
:arrow_down:

...q/namesrv/routeinfo/BrokerHousekeepingService.java
70.00% <0.00%> (-10.00%)
:arrow_down:

.../rocketmq/client/producer/RequestFutureHolder.java
81.39% <0.00%> (-6.98%)
:arrow_down:

.../org/apache/rocketmq/remoting/netty/TlsHelper.java
71.57% <0.00%> (-6.32%)
:arrow_down:

...org/apache/rocketmq/common/stats/StatsItemSet.java
44.77% <0.00%> (-5.98%)
:arrow_down:

...tmq/remoting/protocol/body/ConsumerConnection.java
95.83% <0.00%> (-4.17%)
:arrow_down:

...ava/org/apache/rocketmq/filter/util/BitsArray.java
58.11% <0.00%> (-1.71%)
:arrow_down:

...he/rocketmq/client/trace/AsyncTraceDispatcher.java
82.21% <0.00%> (-1.45%)
:arrow_down:

...rg/apache/rocketmq/remoting/netty/NettyLogger.java
13.60% <0.00%> (-1.37%)
:arrow_down:

... and 32 more

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


Update docs to add note on include-tasks ordering (#1056)

Have you signed the contributor license agreement?
Have you followed the contributor guidelines?
Have you run make test and make it and both finish without errors?
Did you choose a descriptive title and description for your PR?
(Only for maintainers) Did you apply appropriate labels and a milestone?

@gingerwizard can you please have a look at this PR?

Thanks for your change @gavinfowler! This looks good to me and the CI build passes as well. I'll merge it soon and it will be released with the next Rally release 2.0.3.
Im going to modify the the title to "Clarify task execution order in docs with respect to --include-tasks #1102" and added a description.


connot import in1d

I can install cupy, I suppose. Because the code said that
Successfully installed cupy-cuda101-6.5.0
ERROR: Exception:
Traceback (most recent call last):
  File "E:\anaconda\envs\ts\lib\site-packages\pip\_internal\cli\base_command.py", line 153, in _main
    status = self.run(options, args)
  File "E:\anaconda\envs\ts\lib\site-packages\pip\_internal\commands\install.py", line 501, in run
    wheel_cache.cleanup()
  File "E:\anaconda\envs\ts\lib\site-packages\pip\_internal\utils\temp_dir.py", line 80, in __exit__
    self.cleanup()
  File "E:\anaconda\envs\ts\lib\site-packages\pip\_internal\utils\temp_dir.py", line 100, in cleanup
    rmtree(self._path)
  File "E:\anaconda\envs\ts\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "E:\anaconda\envs\ts\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
    raise attempt.get()
  File "E:\anaconda\envs\ts\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "E:\anaconda\envs\ts\lib\site-packages\pip\_vendor\six.py", line 693, in reraise
    raise value
  File "E:\anaconda\envs\ts\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "E:\anaconda\envs\ts\lib\site-packages\pip\_internal\utils\misc.py", line 140, in rmtree
    onerror=rmtree_errorhandler)
  File "E:\anaconda\envs\ts\lib\shutil.py", line 516, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "E:\anaconda\envs\ts\lib\shutil.py", line 395, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "E:\anaconda\envs\ts\lib\shutil.py", line 395, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "E:\anaconda\envs\ts\lib\shutil.py", line 395, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "E:\anaconda\envs\ts\lib\shutil.py", line 400, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "E:\anaconda\envs\ts\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] 拒绝访问。: 'C:\\Users\\WANG\\AppData\\Local\\Temp\\pip-install-gat6a1wf\\cupy-cuda101\\cupy\\cuda\\cudnn64_7.dll'

I don't know what these mean, am I install it correctly?
And when I run import cupy, it can work, but I cannot use in1d.
When I run from cupy import in1d, I got this ImportError: cannot import name 'in1d' from 'cupy' (E:\anaconda\envs\ts\lib\site-packages\cupy\__init__.py)
here is my information
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Apr_24_19:11:20_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.1, V10.1.168
my system is windows10
i reinstall cupy with pip install cupy-cuda101 --no-cache-dir
thx for ur time.

Do you still see this issue?
It seems that the installation succeeds but it fails to clean-up temproary file.
I would suggest trying in fresh env or trying again after reboot.


modernc.org/sqlite tests fail using go1.19 rc1 and rc2

(opening this on behalf of someone who does not have a GitHub account)
modernc.org/sqlite v1.17.3 (f40342ecdc29), tagged about a month ago, passes all tests with up to and including go1.18.3 (1.18.4 was not tried) on supported targets as listed here.
The tests fail with Go1.19 rc1 and rc2 on linux/riscv64, windows/arm64 and windows/amd64. The full list here includes also platforms not officially supported.
The windows builders failure mode: https://gitlab.com/cznic/builder/-/raw/master/logs/modernc.org/sqlite/win64, ie. something seems to have changed in handling of long paths on Windows.
The linux/riscv64 timeouts after a 24 hour limit. Before the tests ran for about 12 hours to completion.

It seems likely the windows failure is related to a Go version check in the test that needs to account for 1.19.

It would be helpful to have goroutine dumps for the linux/riscv64 timeouts — if the system is deadlocked somewhere we would need at least some starting point to unravel it.
Did the Windows issues turn out to be fixed by https://gitlab.com/cznic/sqlite/-/commit/1cd30edd99d4b46618cf0190efadc8fc94e2a701?

Think we tracked down the linux/ricsv64 timeout to the 1.19 RLIMIT_NOFILE change. The test that was hanging tries to exhaust all possible file descriptors and with 1.19 there are now likely many more of them. A change will be made to ensure the hard limit stays reasonable. That possibly explains the failures on the other (unsupported) platforms as well.
Going to close this! Thanks for your patience and attention.