Question: persist nested entities

Hello, I'm trying to persist an entity with a nested entity inside it, but the nested one does not persisted on DB and the return value of the OneToMany is not an array either (when logged to console or returned as JSON). Here's the structure:
// recipe.entity.ts
@Entity()
export class Recipe extends BaseEntity {
  @Property({ unique: true, length: 100 })
  name: string;

  @OneToMany({
    entity: () => IngredientRecipeUsage,
    mappedBy: 'recipe',
    orphanRemoval: true,
    cascade: [Cascade.ALL],
  })
  ingredients = new Collection<IngredientRecipeUsage>(this);

  constructor(data: Partial<Recipe>) {
    super();
    Object.assign(this, data);
  }
}

// ingredient-recipe-usage.entity.ts
@Entity()
export class IngredientRecipeUsage extends BaseEntity {
  @ManyToOne()
  ingredient: Ingredient; // another entity, omited for brevity

  @ManyToOne()
  recipe: Recipe;

  @Property({ columnType: 'int' })
  amount: number;
}

MikroORM is in use together with NestJS, here's a snippet of the controller and service:
// recipe.controller.ts
@Post()
  async createOne(@Body() data: Recipe): Promise<Recipe> {
    const { em } = this.orm;
    const mappedData: Recipe = em
      .getDriver()
      .mapResult(data, em.getMetadata().get(Recipe.name));
    console.log(mappedData);
    return this.service.createOne(mappedData);
  }

// recipe.service.ts
async createOne(data: EntityData<Recipe>): Promise<Recipe> {
    const recipe = this.repo.create(data); // this.repo: EntityRepository<Recipe>
    await this.repo.persistAndFlush(recipe);
    return recipe;
  }

Given the request payload and its response:
// request
{
    "name": "Recipe 1",
    "ingredients": [
        {
            "ingredient": "cff72889-e5f4-4d91-a6ec-43b16564fdfb", // an Ingredient record with such id exists on DB
            "amount": "1"
        }
    ]
}

// response
{
    "id": "21a1505b-9b47-4142-994e-d8ff48ca874b",
    "ingredients": {
        "initialized": true,
        "dirty": false
    },
    "name": "Recipe 1",
    "created_at": "2020-07-21T10:10:06.892Z"
}

I'm wondering what did I do wrong and how to resolve:

The ingredients JSON returned an object while I wanted an array (since its a OneToMany, should be IngredientRecipeUsage[], seems it's the Collection<IngredientRecipeUsage> instead?
The ingredients field, while provided on the request body, does not persisted on the DB.

What I have read is that entities are by default cascading when persisted, eventhough I added the Cascade.ALL just to make sure. What did I miss/do wrong?

I see. I tried to change it to wrap(this).assign(data) on the Recipe constructor like so:
constructor(data: EntityData<Recipe>) {
    super();
    wrap(this).assign(data);
  }

and got this error:
[Nest] 21525   - 07/22/2020, 11:01:59 PM   [ExceptionsHandler] Cannot convert undefined or null to object +1286ms
TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Function.assign (/home/dep/Development/proj/foodcrate/kitchen/node_modules/mikro-orm/dist/entity/EntityAssigner.js:17:16)
    at Recipe.prototype.assign (/home/dep/Development/proj/foodcrate/kitchen/node_modules/mikro-orm/dist/entity/EntityHelper.js:35:56)
    at new Recipe (/home/dep/Development/proj/foodcrate/kitchen/dist/src/common/entities/recipe.entity.js:22:32)
    at TransformOperationExecutor.transform (/home/dep/Development/proj/foodcrate/kitchen/node_modules/class-transformer/TransformOperationExecutor.js:117:32)
    at ClassTransformer.plainToClass (/home/dep/Development/proj/foodcrate/kitchen/node_modules/class-transformer/ClassTransformer.js:17:25)
    at Object.plainToClass (/home/dep/Development/proj/foodcrate/kitchen/node_modules/class-transformer/index.js:20:29)
    at ValidationPipe.transform (/home/dep/Development/proj/foodcrate/kitchen/node_modules/@nestjs/common/pipes/validation.pipe.js:41:39)
    at transforms.reduce (/home/dep/Development/proj/foodcrate/kitchen/node_modules/@nestjs/core/pipes/pipes-consumer.js:16:33)
    at processTicksAndRejections (internal/process/task_queues.js:86:5)

I've turned on debug mode and no sql has been executed yet after the change above.

And what is in the data?

Also, after re-reading some pages, all the examples have the objects initialized manually, as in this page: https://mikro-orm.io/docs/entity-manager#persisting-and-cascading
const author = new Author('Jon Snow', 'snow@wall.st');
author.born = new Date();

const publisher = new Publisher('7K publisher');

const book1 = new Book('My Life on The Wall, part 1', author);
book1.publisher = publisher;

Is it needed that all the relations are initialized beforehand (via constructors, or findOne from a repository for existing ones)? Can the ORM handle nested creation like so, or is there a preferable way to do so:
const book1 = new Book('My Life on The Wall, part 1', { name: 'Jon', email<EMAIL_ADDRESS>}); // a new Book record as well as a new Author record created

since that's what I'm aiming to do with my code at the OP. Sorry if this kind of derails the issue, but I think its similar.
Basically I want to be able to create new record for both Recipe and IngredientRecipeUsage hopefully in one method without initializing everything manually and linking them together by hand, if possible.

Maybe create a reproduction. It should work with the assign method as well as with em.create(). PK will be considered as existing entity, and an object as new one.

Okay, I'll try to setup a reproduction repo

Okay, I made a repository here: https://github.com/davenathanael/mikro-orm-678
While I made it, I fixed the TypeError: Cannot convert undefined or null to object error is because Nest is trying to create a Recipe object for parsing the request body on the controller, I suppose. Not related to MikroORM, I'm sorry.
Regarding to the Collection being printed as an object, I tried the repo without using class-transformer's @Expose to change the serialized JSON keys, and the Collection printed correctly, as an array. When I installed class-transformer and add the @Expose decorator to an entity, then the Collection printed as an object. I'm not sure if it's a bug/incompability or a mistake on my setup.
The nested entity is not being persisted on DB is explained on the repository readme. Thanks! :)

There is no need to use class-transformer here, MikroORM handles the serialization internally (each entity has toJSON() method, you can also override it to customize the bahaviour). Cant help with that, never used it myself (never even needed it).

Ah I see. I'm using class-transformer for serializing multi-word fields as snake_case, I guess I'll handle them separately. How about the ingredients collection not persisted to DB? Is it because of the usage of class-transformer as well?

You are passing ingredient_usage into the em.create(), which is the first problem, as the ORM does not know anything about such key (you feed only class-transformer with that metadata). So it basically gets ignored, as an unknown key.
Also having those object ctor params, ORM will never pass them to your constructor - it works only when you have one param per property (and the names must match, e.g. Book has ctor with title and author, then those will be provided, but you will never get the "data object" there). If you want to have it like this, you need to call the constructor yourself.
Unfortunately em.create() does not handle the collection updates properly, so you really need that wrap().assign() call - but that requires to have EM instance provided explicitly, so you cannot use it from the constructor (as at that time the entity never has EM assigned).
-const recipe = em.create(Recipe, data);
+const recipe = wrap(new Recipe()).assign(data, { em: this.em });

Then it will properly construct the entity and assign the collection items, firing 2 queries in a transaction:
[query] begin
[query] insert into `recipe` (`name`) values ('Recipe 1') [took 1 ms]
[query] insert into `ingredient_recipe_usage` (`amount`, `ingredient_id`) values (1, 1) [took 1 ms]
[query] commit

You are passing ingredient_usage into the em.create(), which is the first problem, as the ORM does not know anything about such key (you feed only class-transformer with that metadata). So it basically gets ignored, as an unknown key.

My bad, sorry. It is a bad example because my use case is to have the request payload the same as how it is stored at DB following the ORM's naming strategy (Underscore), I didn't think of that when I made that example. Now it is sorted out because I use em.getDriver().mapResult() to convert the fields.
Okay, currently I'm able to follow along and produce the same result as yours there, with wrap instead of create, and get the same queries. But the second insert query didn't specify any recipe_id value, that should be the id of the first insert query. I'm not quite confident with my SQL knowledge, but is it not possible to specify the recipe_id of the inserted ingredient_recipe_usage record within the same transaction?

Mmmm I see, yes that is supported, the problem is how the assign helper handles the collection update - if you did it manually, things would be propagated correctly and the FK would be set:
const recipe = new Recipe();
recipe.ingredients.add(...); // this way it would be propagated to the owning side

Will try to do something about this in v4, its really confusing, and as I said, the way with em.create() should work here too.

Ah I see, thanks for explaining :), its ok I can do manually for now. Tried to do it and decided to use a DTO for the controller, and changed the service method like so:
async createOne(dto: CreateRecipeDto): Promise<Recipe> {
    const recipe = new Recipe();
    recipe.name = dto.name;
    recipe.sellingPrice = dto.sellingPrice;

    const ingredients = await Promise.all(dto.ingredients.map(async (u) => {
      const usage = new IngredientRecipeUsage();
      usage.amount = u.amount;
      usage.ingredient = await this.ingredientRepo.findOneOrFail({ id: u.ingredient });
      return usage;
    }));
    console.log(ingredients);
    recipe.ingredients.add(...ingredients);

    console.log('created recipe:');
    console.log(recipe);
    await this.repo.persistAndFlush(recipe);
    return recipe;
  }

and this is the log I printed, with the [constructor] dto: part is print of the DTO received at the constructor, thus the data given:
[constructor] dto:
{
  name: 'Recipe 5',
  test: 2,
  ingredients: [ { ingredient: 1, amount: 11 } ],
  selling_price: 200
}
[Nest] 7432   - 07/23/2020, 8:39:40 PM   [MikroORM] [query] select `e0`.* from `ingredient` as `e0` where `e0`.`id` = 1 limit 1 [took 2 ms]
[
  IngredientRecipeUsage { amount: 11, ingredient: Ingredient { id: 1, name: 'Ingredient 1' } }
]
created recipe:
Recipe {
  ingredients: Collection {
    '0': IngredientRecipeUsage { amount: 11, ingredient: [Ingredient] },
    initialized: true,
    dirty: false
  },
  name: 'Recipe 5',
  sellingPrice: undefined
}
[Nest] 7432   - 07/23/2020, 8:39:40 PM   [MikroORM] [query] begin
[Nest] 7432   - 07/23/2020, 8:39:40 PM   [MikroORM] [query] insert into `recipe` (`name`, `selling_price`) values ('Recipe 5', NULL) [took 1 ms]
[Nest] 7432   - 07/23/2020, 8:39:40 PM   [MikroORM] [query] insert into `ingredient_recipe_usage` (`amount`, `ingredient_id`) values (11, 1) [took 1 ms]
[Nest] 7432   - 07/23/2020, 8:39:40 PM   [MikroORM] [query] commit

Ignore the sellingPrice and selling_price

I'm still getting no recipe_id on the query executed, is the way I do the collection update correct?

Can you upgrade your repository? For me it does work:
[query] begin
[query] insert into `recipe` (`name`) values ('Recipe 1') [took 3 ms]
[query] insert into `ingredient_recipe_usage` (`amount`, `ingredient_id`, `recipe_id`) values (1, 1, 6) [took 1 ms]
[query] commit

Btw if you do not want to load the Ingredient entity, you can use repo.getReference() instead, which is a sync method to construct a reference to an entity (which is basically an entity that has only the PK set).
(I am also getting some class-transformer recursion error, but that is outside of the scope of what I can help with - in general you should serialize the entity via wrap(e).toJSON() first, which will handle the conversion from a Collection wrapper to a plain array.)

Btw if you do not want to load the Ingredient entity, you can use repo.getReference() instead, which is a sync method to construct a reference to an entity (which is basically an entity that has only the PK set).

Ah, that's new to me. It'll be cleaner since I do not want to actually load the entity and having the repository there. Thanks!

(I am also getting some class-transformer recursion error, but that is outside of the scope of what I can help with - in general you should serialize the entity via wrap(e).toJSON() first, which will handle the conversion from a Collection wrapper to a plain array. - commenting out the ClassSerializerInterceptor fixes that)

Yeah sorry didn't mention that on my last message, I do comment out the ClassSerializerInterceptor at the app start. I no longer use class-transformer and use the toJSON instead.

Can you upgrade your repository? For me it does work:

Anyway, I've update the issue repository https://github.com/davenathanael/mikro-orm-678, when you have the time please kindly check it :)
Thank you so much in advance:)

Both assign() and em.create() are fixed in v4 via #683.
The problem with your example repository is that you do not define the 1:m correctly - you are missing mappedBy there, that would point to the owning side. Without that the ORM does not know where to propagate to.
  @OneToMany({
    entity: () => IngredientRecipeUsage,
    orphanRemoval: true,
    eager: true,
    mappedBy: usage => usage.recipe,
  })
  ingredients = new Collection<IngredientRecipeUsage>(this);

I also made the mappedBy required in v4, iirc the reason why it's optional is that you can specify the opposite only (owner -> inverse), but in general we should always specify this on the inverse side (which 1:m relation is).

My bad! Sorry didn't realised I missed the mappedBy haha. Thank you for all the help! @B4nan
Whoa that's great, I'm looking forward to v4! Cheers :D

Well not really your bad, there should have been some validation, pretty much all the other entity definition mistakes are validated, its weird that I forgot to validate this one :]


BATCH_COMPLETED_GROUP minimal SQL Server version

BATCH_COMPLETED_GROUP is supposed to work for SQL Server 2016 and newer, however for SQL Server 2017 I am getting following:
Msg 40517, Level 16, State 1, Line 6
Keyword or statement option 'BATCH_COMPLETED_GROUP' is not supported in this version of SQL Server.

The documentation link: https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions?view=sql-server-2016
Same query works fine in SQL Server 2019. Can you please confirm the minimal SQL Server version for BATCH_COMPLETED_GROUP (and maybe other classes)?

@vasek-cz -- Vasek, thank you for your question.
@DavidTrigano -- David, please look into this issue.

Hi @vasek-cz,
BATCH_COMPLETED_GROUP works with SQL Server 2019 only (same for BATCH_STARTED_GROUP)
@WilliamAntonRohm you can go ahead and close this request.


Using other models than mixtral leads to CUDA error

Describe the issue as clearly as possible:
I have tried using other models such as NousResearch/Meta-Llama-3-8B-Instruct and THUDM/glm-4-9b-chat. I was using the sample code below:
from outlines import models, generate, samplers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "THUDM/glm-4-9b-chat"
if torch.cuda.is_available():
    llm = AutoModelForCausalLM.from_pretrained(model_id, device_map='auto', trust_remote_code=True)
else:
    raise Exception('GPU not available')
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
if tokenizer.pad_token_id is None:
    # Required for batching example
    tokenizer.pad_token_id = tokenizer.eos_token_id
model = models.Transformers(llm, tokenizer)

prompt = """You are a sentiment-labelling assistant.
Is the following review positive or negative?

Review: This restaurant is just awesome!
"""

generator = generate.choice(model, ["Positive", "Negative"])
answer = generator(prompt)

Then, it always resulted in the following error:

My env:

Python 3.10
Cuda 12.2
Pytorch 2.3
transformers 4.41.2

Steps/code to reproduce the bug:
Detailed in the descriptions.

Expected result:
Expected to output without any errors.

Error message:
No response
Outlines/Python version information:
Version information

```
(command output here)
```

Context for the issue:
No response

Please provide package version info.
See this thread as well, it may be a bad pytorch version.
https://github.com/pytorch/pytorch/issues/21819#issuecomment-2029036618

Please try CUDA_LAUNCH_BLOCKING=1.
If that fails try torch=2.3 or torch=2.0.
If that fails, please re-open the issue with details on your environment so I can try reproducing your error.


Django 4 support

It crashes before starting.
  File "/usr/local/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/local/lib/python3.9/site-packages/django/apps/registry.py", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/usr/local/lib/python3.9/site-packages/django/apps/config.py", line 123, in create
    mod = import_module(mod_path)
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/local/lib/python3.9/site-packages/django_fsm_log/apps.py", line 6, in <module>
    from django_fsm.signals import pre_transition, post_transition
  File "/usr/local/lib/python3.9/site-packages/django_fsm/__init__.py", line 11, in <module>
    from django_fsm.signals import pre_transition, post_transition
  File "/usr/local/lib/python3.9/site-packages/django_fsm/signals.py", line 4, in <module>
    pre_transition = Signal(providing_args=['instance', 'name', 'source', 'target'])
TypeError: __init__() got an unexpected keyword argument 'providing_args'

Sorry, it is a issue with outdated django-fsm.


Add last state to the status within actions

Feature or idea description
My expectation of ioBroker Adapters is, that if a state is acknowledged, then the state is the state which have been accepted by the adapter. When someone changes a "ACTION", then the state will be un-acknowledged. Within ioBroker it is possible to get the last acknowledged state as well.
This adapter works different.
Detailed example:
ACTIONS.HEADLIGHT is per default "null".
The state will be loaded into
settings.headlight
May be I need some more explanation about the idea behind the separation of ACTIONS and the current status.
possible Solution:
The state could be copied with ack:ture to the ACTIONS for these statues.
Version of "husqvarna-automower"-adapter
v0.3.2-beta.1
Additional information & file uploads
If you agree I will create a PR.

I agree that .settings.cuttingHeight and .settings.headlight are available also in ACTIONS. So we can possibly merge them together.

could you please check v0.3.3-beta.2 (https://github.com/ice987987/ioBroker.husqvarna-automower/tree/development) if this version meets your expectation?

implemented with v0.4.0


A Kind Request for Citing our Point-Bind Project

Hi, thanks for this great project PointBLIP that directly aligns 3D with LLM!
Here is our project Point-Bind that first aligns 3D point clouds with LLM and other modalities, which is released in June, 2023. We also conduct 3D question answering, 3D retrieval and text-3D generation tasks. Given the high similarity of our two projects concerning idea (3D LLM) and implementation (a projection layer), we would be highly appreciated that you can consider citing our project. We will also cite yours.
The characters of Point-Bind are as follows:

The following are our examples of 3D question answering:

Thanks very much for your understanding!

Thank you very much for your attention. PointBind is an excellent project. We believe it has made a significant contribution to aligning point cloud and text modalities. The reason we didn't initially provide a citation is that PointBind was originally affiliated with llama-adapter (ImageBing-LLM). Later, it transitioned to OpenGVlab, and we couldn't locate a suitable citation path at that time.
We will soon update the GitHub page, further improving the code and resolving citation issues. We hope to contribute to the point cloud community together with you.

We sincerely appreciate your understanding :). Hope to make the 3D community better together with you!


Add wrap_key_to_file syscall

These syscall are required because RSA keys can get bigger than the data that can be transmitted through wrap_key.

I think we can close this for the time being and create a new PR if we want to upstream the extension.


terraform plan -var-file Description Modification required.

However, your variables file need not follow either of the two preceding conventions. In that case, specify your variables file name with the -var-file parameter where your variable file name does not carry an extension. The following example illustrates this point:
==>
However, the variable file does not need to follow one of the two previous rules. In this case, specify the variable file name using the -var-file parameter for a file structured as a key-value. The following example illustrates this point.
Ref: https://www.terraform.io/docs/commands/plan.html
-var-file=foo - Set variables in the Terraform configuration from a variable file. If a terraform.tfvars or any .auto.tfvars files are present in the current directory, they will be automatically loaded. terraform.tfvars is loaded first and the .auto.tfvars files after in alphabetical order. Any files specified by -var-file override any values set automatically from files in the working directory. This flag can be used multiple times.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: d6a7a232-6e5d-ae1d-3b57-71fb75740fb4
Version Independent ID: 1573ac54-ab15-2649-cccd-2dd64c640fc1
Content: Tutorial - Create an Azure VM cluster with Terraform and HCL
Content Source: articles/terraform/terraform-create-vm-cluster-with-infrastructure.md
Service: terraform
GitHub Login: @TomArcherMsft
Microsoft Alias: tarcher

Hi @Sanses Thanks for your feedback. We will review and update as appropriate.

@Sanses I am assigning the issue to content author for reviewing the feedback and updating the document accordingly.
@TomArcherMsft Can you please look into this and update the document as applicable.

@VikasPullagura-MSFT Closing issue. Please advise if you have specific actionable feedback. #please-close


chore: Drop Std.Data.Nat.Lemmas from Omega dependencies.

This moves a bunch of lemmas around to remove the remaining lemmas in Std.Data.Nat.Lemmas from Omega's dependencies.
It may lose some organization, but at least the remaining lemmas could potentially use Omega.

@joehendrix, this is set, I think incorrectly, as a PR to bump/v4.7.0. I'm going to switch it back to main now.


NoMethodError in single_events#show

Exception in Hacken.in
NoMethodError in single_events#show
undefined method `strftime' for nil:NilClass
View on Bugsnag
Stacktrace
app/models/single_event.rb:116 - name_with_date
app/models/single_event.rb:155 - to_opengraph
app/controllers/single_events_controller.rb:8 - show

View full stacktrace

Change bde1260d already had a TODO: Fix resulting bugs in views but this looks more like someone forgot to do their nil-checks:
"#{self.full_name} am #{self.occurrence.strftime("%d.%m.%Y um %H:%M")}"

Nil shakes fist

The issue is still reproducible, so I dug a bit into the production database and it looks like there are two faulty SingleEvents with no occurrence and there is not much we do here, as this constraint isn't validated anywhere (probably a relict from our MySQL switch #364):
SELECT id, name, created_at, occurrence FROM single_events WHERE occurrence is NULL;
  id  | name |     created_at      | occurrence
------+------+---------------------+------------
 3290 |      | 2014-01-27 20:33:33 |
 2516 |      | 2013-09-06 08:57:56 |
(2 rows)

My proposed fix: Set an arbitrary date from the past and let's never talk about them again. E.g.
UPDATE single_events SET occurrence='2013-06-22 22:00:00' WHERE id IN (2516,3290);

Yay, nay? :)

Yay!

Do it, @bascht

Never occurred again.


[WIP][MB-2415] Copy changes - SM Create profile / Contact info page

Description
Continued copy changes on SM create profile/Contact info page.
Please see attached screenshots, these corrections go top to bottom on the page:

Lowercase C and I in Your contact info
Lowercase C and P Best contact phone
Remove period after the sentence below Best contact phone
Alternate phone (optional)

Alternate phone (optional)  optional not bolded
Lowercase P in phone

Remove period after the sentence below Alternate phone
Lowercase E in Personal email

Setup
Add any steps or code to run in this section to help others prepare to run your code:
make server_run
make client_run

Create a new SM, progress to page with heading Your contact info
Code Review Verification Steps

[ ] Code follows the guidelines for Logging
[ ] There are no aXe warnings for UI.
[ ] This works in Supported Browsers and their phone views (Chrome, Firefox, IE, Edge).
[ ] User facing changes have been reviewed by design.
[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

References

Jira story for this change

Screenshots
Before

After

Warnings

:warning:

Please include the Jira ID at the start of the title with the format MB-123 or [MB-123]

  Generated by :no_entry_sign: dangerJS against 3f2c70dd5883b764d9c8352e8c5d3beed7e26308


typo in sentence - Rignt now groupchat is limited to developer preview,

Rignt (Right) now groupchat is limited to developer preview,

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 0d266eb0-2a29-db56-aeaf-dd14dfcdbe66
Version Independent ID: d7a1fa1d-c083-9232-2259-4f8b267c7ee3
Content: Send and receive messages with a bot - Teams
Content Source: msteams-platform/concepts/bots/bot-conversations/bots-conversations.md
Product: msteams
GitHub Login: @o365devx
Microsoft Alias: o365devx

Thanks for letting us know; PR created to fix the typo.


Send Video

If I wish to send a video in mp4 format, how do I send it?

TitlesendFile Method Leading to Premature Python Function Completion
Description:
I havesendFile method within a Python class that is intended to send video messages. The send_video_message function calls sendFile, which uses asynchronous JavaScript syntax. The problem arises because the results from the JavaScript function appear to be returned after the send_video_message function has already completed execution, leading to an "An error occurred" message.
The core of the issue seems to be the asynchronous nature of the JavaScript code that is executed by a method named sync_page_evaluate within theThreadsafeBrowser class.
Here
def send_video_message(self, to, video_path, caption=None):
    try:
        result = self.client.sendFile(
            to=to,
            pathOrBase64=video_path,
            nameOrOptions='video.mp4',
            caption=caption
        )
        if result.get('sendMsgResult', {}).get('messageSendResult') == 'OK':
            print("Video File sent successfully:", result)
            return True
        else:
            print("Video File sent failed:", result)
            return False
    except Exception as e:
        print("An error occurred:", e)
        return False

And heresendFile method that
def sendFile(self, to, pathOrBase64, nameOrOptions, caption):
    to = self.valid_chatId(to)
    options = {"type": 'auto-detect'}
    if isinstance(nameOrOptions, str):
        options["filename"] = nameOrOptions
        options["caption"] = caption
    elif isinstance(nameOrOptions, dict):
        options = nameOrOptions

    _base64 = ''
    if pathOrBase64.startswith('data:'):
        _base64 = pathOrBase64
    else:
        if pathOrBase64 and os.path.exists(pathOrBase64):
            _base64 = self.convert_to_base64(pathOrBase64)
        if not options.get("filename"):
            options["filename"] = os.path.basename(pathOrBase64)
    if not _base64:
        raise Exception("Empty or invalid file or base64")

    return self.ThreadsafeBrowser.sync_page_evaluate("""async ({ to, base64, options }) => {
    const result = await WPP.chat.sendFileMessage(to, base64, options);
    return {
      ack: result.ack,
      id: result.id,
      sendMsgResult: await result.sendMsgResult,
    };
  }""", {"to": to, "base64": _base64, "options": options})

The issue I need to resolve is how to correctly wait for the asynchronous JavaScript function to complete and return the result to the Python method, so that I can accurately log whether the sending of the video message was successful or not. It seems that the sync_page_evaluate method might not be handling the asynchronous operation as expected, causing the Python code to proceed before the JavaScript promise is fulfilled. Any suggestions or advice on how to ensure the Python function waits for the complete result from the JavaScript function would be greatly appreciated.

error is like: playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. ?

update from git and try:
result = self.client.sendFile(..., timeout_=60)
timeout_ : second

This problem can occur when sending pictures or messages when the network is not good.

Is there a function that can query the dialog box and query whether the message has been sent, so it may not be more practical to wait until the result

All method should be async so we should as it with await
To use them in sync function, we use run_thafe, run thafe need time out
In your case send media take lone time, so custom time out or use async


*type and **type is not parsed properly for Python 2 type hints

Environment data

Language Server version: 2021.4.2
OS and version: Ubuntu 16.04
Python version (& distribution if applicable, e.g. Anaconda): 2.7.12

Expected behaviour
*type and **type type hints are parsed properly by Pylance.
Actual behaviour
*type and **type type hints raise an error.
Logs

I did not manage to get any relevant log, even with Trace-level logging enabled.
Code Snippet / Additional information

def test_fun(*args, **kwargs):
    # type: (*int, **float) -> int
    return sum(args) + sum(round(kwarg) for kwarg in kwargs.values())

According to PEP-484, this should be the standard way to type hint * and ** arguments in older versions of Python. However, writing the type hint that way raises errors:

In the code, args is considered to have type Tuple[Any, ...] and kwargs is considered to have type Dict[str, Any].
However, it looks like using line-by-line type hints work:
def test_fun(
    *args,  # type: int
    **kwargs,  # type: float
):
    # type: (...) -> int
    return sum(args) + sum(round(kwarg) for kwarg in kwargs.values())

Here, args is considered to have type Tuple[int, ...], and kwargs is considered to have type Dict[str, float].
I also tried removing the * and **:
def test_fun(*args, **kwargs):
    # type: (int, float) -> int
    return sum(args) + sum(round(kwarg) for kwarg in kwargs.values())

In that case, Pylance does find the right types, args is considered to have type Tuple[int, ...] and kwargs to have type Dict[str, float], but this is inconsistent with the expected format (and I find it also harder to read).

Pylance is designed for Python 3 and doesn't generally support Python 2. It does have minimal support for function annotation comments with the goal of supporting type stubs for libraries that work with Python 2 and 3, but this support has many limitations.
I'm curious why you are still using function annotation comments in your code. Is it not feasible to switch to Python 3 syntax?
We don't plan to make any further significant investments in Python 2 function annotation comments. However, in this particular case, it's simple to eliminate the parsing error that you're seeing (just a one-line change), so I'll make that change in the parser. I'm not adding full semantic validation (e.g. verifying that * and ** parameter annotations line up with the corresponding *args and **kwargs parameters in the signature). That would require a much bigger investment.
The parser change will be included in the next release of pylance.

Thank you very much for taking the time to fix that, despite it being a Python 2 issue specifically!
Unfortunately, I'm currently working on a pretty large codebase running in Python 2, which is why I cannot use the Python 3 syntax. We are working on a transition to Python 3, but in the meantime, we try as much as possible to write Python 2 code that can also be interpreted as Python 3 code. Thanks to that, I've found that Pylance is really useful for me to analyze the code, despite it being Python 2 code. There are of course some limitations, and having to use type comments instead of type annotations is one of them.


[terra-clinical-data-grid][terra-clinical-item-collection] Updated keycode-js to v2

Summary
The open issue #656 identified an older version (v1) of keycode-js still being used in terra-clinical-data-grid. I saw the same older version being used in terra-clinical-item-collection so I updated that to version 2 as well.

Closes #656
Deployment Link

https://terra-clinical-deployed-pr-#.herokuapp.com/
Testing
Ran Jest tests and WDIO tests locally for terra-clinical-data-grid and terra-clinical-item-collection. None of the snapshots or screenshots needed to be updated.
Thank you for contributing to Terra.
@cerner/terra

@gabeparra01 thanks for the contribution!

@gabeparra01 thanks for the contribution!


[2.x] Fix TransportService constructor due to changes in core

Description
Add a tracer field for the TransportService constructor in our test cases
Core change to add tracer in MockNioTransport https://github.com/opensearch-project/OpenSearch/pull/10143/files#diff-f37f7447c76ba79901c3298a1addce39d103ce72efc5a75a1f7602a4e2829b62R115
core changes to add tracker in TransportService https://github.com/opensearch-project/OpenSearch/commit/27cddec134844a8061b9a7f9cc5eee2e4622feec
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

All tests pass locally after a couple retries, not sure why we are seeing such an increase in flaky tests. More prevelant on github even. This fix however does solve compilation issues

Shouldn't we get this change on main and then backport to 2.x?

https://github.com/opensearch-project/OpenSearch/pull/10143/files#diff-f37f7447c76ba79901c3298a1addce39d103ce72efc5a75a1f7602a4e2829b62R115

I usually agree its just that main is pretty broken right now with other things so I am trying to get it fixed on 2.x and 2.11 first then I can forward port this change


[Feat] Add Exclusive Discounts & Offers page/pop-up

Description
I propose adding an Exclusive Discounts & Offers page or pop-up to showcase special promotions, discounts, and limited-time offers available to users. This feature aims to increase user engagement, drive sales, and reward loyal customers with exclusive deals. The page or pop-up will be easily accessible and customizable, ensuring that users are informed about ongoing promotions.
Screenshots
No response
Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I'm a GSSoC'24-Extd contributor
[X] I'm a Hacktoberfest'24 contributor
[X] I am willing to work on this issue (optional)

Hey @Anwishta, sorry for the late reply. I’ve been a little busy due to my health condition. We have converted the entire code to Next.js and Tailwind CSS for better backend integration. You raised a good issue, but it was based on the old HTML and CSS version. We’ve moved everything to Next.js and Tailwind CSS. Please look into that, and don’t forget to join our Discord Serverfor the latest website announcements and features.

And also please give Star us ⭐

Please don't be discouraged. I will close the issue for now, but you can raise a new one that is truly needed for our website. Thank you.


BUG: Fix unicode errors for py2 client and py3 server.

cc @llllllllll

Thanks, can you add a short entry to docs/source/whatsnew/0.11.1.txt?

Coverage decreased (-0.005%) to 89.576% when pulling c58fac8648135388f476f021389e9754da9dc900 on ssanderson:more-unicode-fun into dfb2c3b75cc03980dc2277b0ac8fd0f2d1bde56f on blaze:master.

@kwmsmith updated.

Coverage decreased (-0.005%) to 89.576% when pulling 98bf0c4379bb5cf1fefec7b340394ef3040bc5bc on ssanderson:more-unicode-fun into dfb2c3b75cc03980dc2277b0ac8fd0f2d1bde56f on blaze:master.

Thanks fam


Update Docs to Include "Added in", "Changed in", "Removed in" for Features

Proposed Changes
Like https://github.com/nautobot/nautobot/pull/1745, but everywhere.

Justification
More likely to go do RTD docs which may not be the same version as installed for a lot of users and may not be obvious to load the right docs version in footer.

Substantially addressed in #2400. May be closeable?

Closed via #2400. We've been using a pretty nifty plugin from a pretty nifty maintainer. ;)


Taskbar personlaization

Description of the new feature / enhancement
This feature would allow users to be able to see the names of windows. it would be identical to the built-in windows 10 taskbar feature.  You would be able to check a box and the names of the windows would show on the taskbar like so:

Scenario when this would be used?
This would be used for better accessibility and would streamline processes for a lot of people.
Supporting information

/feedbackhub


Golang net resolver error messages are incorrect.

What version of Go are you using (go version)?
go1.14.13
Does this issue reproduce with the latest release?
Yes. At least the latest on go playgound
What operating system and processor architecture are you using (go env)?
go env Output
louper$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hthulasi/Library/Caches/go-build"
GOENV="/Users/hthulasi/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY="git.soma.salesforce.com"
GONOSUMDB="git.soma.salesforce.com"
GOOS="darwin"
GOPATH="/Users/hthulasi/go"
GOPRIVATE="git.soma.salesforce.com"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/hthulasi/go/src/git.soma.salesforce.com/GovCloud-SecDev/louper/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/17/vmjmghsj28d4lzrx7mqshr9r0000gp/T/go-build117441851=/tmp/go-build -gno-record-gcc-switches -fno-common"
louper$

What did you do?
If I update/set a the DNS resolver to a custom address the error when host can't connect or couldn't resolve is using the incorrect DNS server address in the response. Example: play.golang.org link: https://play.golang.org/p/LmTM-eOy3q-
What did you expect to see?
I see the error message indicating that it failed with the provisioned DNS server.  I am assuming this is just invalid error message but not an issue with golang not using the correct DNS server.
What did you see instead?
It is using the default DNS server (likely configured through DSCP) in the error message instead of <IP_ADDRESS>.
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
addr: []
err: lookup google.com on <IP_ADDRESS>:53: dial udp <IP_ADDRESS>:53: connect: no route to host
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
from default resolver
addr: []
err: lookup gafwefjawioefjoawjfoaewif.com on <IP_ADDRESS>:53: dial udp <IP_ADDRESS>:53: connect: no route to host

from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
addr: []
err: lookup google.com on <IP_ADDRESS>:53: dial udp <IP_ADDRESS>:53: connect: no route to host
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
from custom resolver
addr: []
err: lookup gafwefjawioefjoawjfoaewif.com on <IP_ADDRESS>:53: dial udp <IP_ADDRESS>:53: connect: no route to host

Duplicate of 43703. Closing this.

Duplicate of 43703. Closing this.


Change CloudFlare Lib back to Leaf.xNet

Switching back to good old leaf.xnet. But with cookie handling fixes.
Though it doesn't work with all sites it's better than the current state.
There is already on open issue over at leaf to fix the non working sites: https://github.com/csharp-leaf/Leaf.xNet/issues/53

Loong explanation for masterecho ;)
They haven't really fixed their stuff. It's still having problems on some sites.
But I merged the cookie handling ruri made after changing to Cloudflaresolver(re) to his old implementation of leaf. So it solves a few problems we had with leaf before. (some errors about object instance or reference)
A bit of history:
On BB and early OB we used leaf. But then the object errors and also problems on some sites came up.
So we changed to Cloudflaresolver
But this was discontinued - they even deleted the GitHub.
And had in meantime the same problem on some sites as current version of leaf.xnet.
So I discovered CloudflaresolverRE.
This  is the "Reawakening" of Cloudflaresolver and was easy to implement by ruri basically just by changing the reference to the new package - and it fixed the problem with some sites.
But it only was working great in debugger - on runner it seemed that only one of all bots was able to solve the challenge.
So I searched for an alternative and came back to leaf and noticed they just haven't fixed their code as they didn't know there is an issue.
So this issue was opened: https://github.com/csharp-leaf/Leaf.xNet/issues/53 and I/we to go back to leaf when the issue is resolved.
But as I heard more and more that users were complaining about the current CloudflaresolverRE versions i gave some a preview of my leaf build and they were happy. So I made the PR and after demi also gave his ok ruri merged it.


Tracks.Write(): way to preserving more media attributes in SDP

Sometimes, we want attributes other than a:rtpmap / a:fmtp, but there's no way to send such SDP in the current interface.
For example, ONVIF streaming spec (https://www.onvif.org/specs/stream/ONVIF-Streaming-Spec.pdf) uses a:sendonly / a.recvonly (See section 5.3.2 Connection setup for a bi- directional connection).

Hello, Tracks.Write() is used only by the server to generate a clean SDP that is sent to the readers. This SDP must be cleaned since it regulates the communication between a reader and gortsplib's server, and this must not be influenced by any parameter set by the publisher, except for the codec.
It doesn't influence the communication between a publisher and gortsplib, that happens in a separate context with respect to the communication between a reader and gortsplib.
It is not used by the client.
It is not used to communicate with ONVIF devices.
why do you need this feature?

I don't think It's usually needed. This is rather an "enhancement request".
And I'm not talking about communicating with existing ONVIF devices.
This is needed when someone wants to implement his own ONVIF compliant RTSP server(device) using your library, since ONVIF server has to send SDP that include a=sendonly or a=recvonly lines.

now tracks.Write() writes the tracks as they are.
A cleaning operation is performed during NewServerStream(tracks).
SDP of tracks can then be edited by calling ServerStream.Tracks() and editing the tracks.


Uint8Array not converted to byte[]

I'm returning what I believe is a Uint8Array from a "native" JS method, but it is throwing this exception in AsyncReturn().
assert.ts:8 Uncaught Error: Assertion failed: Invalid array object: 216,129,120,126,226,157,61,141,153,225,159,227,200,40,203,202,249,120,249,143,248,65,209,240,79,45,29,238,15,59,146,112,194,49,135,45,14,166,46,84,12,195,4,170,223,204,115,60,246,226,50,36,148,28,15,128,141,7,169,143,59,116,203,90,218,149,20,27,181,163,27,74,14,223,128,57,64,149,244,252,217,77,73,182,225,165,78,30,144,113,32,215,124,81,210,170
Code is at:
https://github.com/ianopolous/Peergos/blob/doppio/ui/doppio/natives/peergos_crypto_hash_ScryptJS.js

There are two issues with what you are trying to do.
First: DoppioJVM does not directly map JVM arrays to JS arrays, since JVM arrays are also JVM objects -- so they have a class, methods, etc. DoppioJVM wraps JS arrays and typed arrays in a JVM object with an array property, which you need to construct like other JVM objects.
Second: a byte[] array is an Int8Array -- they are signed integers. You need to convert the Uint8Array into an Int8Array first.
Once you have the Int8Array, you can do the following to construct a byte array with no copying:
Doppio.VM.Util.newArrayFromDataWithClass(thread, thread.getBsCl().getInitializedClass(thread, '[B'), i8Array);

Also, if you have assertion checking enabled, you are using a development build of DoppioJVM (which is super useful for debugging). Hopefully that is intentional. :)
If it is not, you should use a much faster release build of DoppioJVM that strips assertions from the JVM once you have something shippable.

Excellent, thank you! That fixed it. For the reference of others I had to do:
    var hashedBytes = some UInt8Array....;
    var i8Array = new Int8Array(hashedBytes);
    var javaByteArray = Doppio.VM.Util.newArrayFromDataWithClass(thread, thread.getBsCl().getInitializedClass(thread, '[B'), i8Array);
    thread.asyncReturn(javaByteArray);

Note that your solution is actually copying the Uint8Array.
From MDN:

When called with a typedArray argument, which can be an object of any of the typed array types (such as Int32Array), the typedArray gets copied into a new typed array. Each value in typedArray is converted to the corresponding type of the constructor before being copied into the new array.

To do it zero-copy, you need to pass in the raw ArrayBuffer, offset, and length:

When called with a buffer, and optionally a byteOffset and a length argument, a new typed array view is created that views the specified ArrayBuffer. The byteOffset and length parameters specify the memory range that will be exposed by the typed array view.  If both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer is viewed.

Example:
var i8Array = new Int8Array(hashedBytes.buffer, hashedBytes.byteOffset, hashedBytes.byteLength);

Thanks, John. In this case it's only 96 bytes, but I'll need that later on for 5MiB arrays after erasure decoding.


ScriptRunner must not commit if autoCommit is false

MyBatis version
3.4.1
Problem
ScriptRunner explicitly commits the connection at the end of executeFullScript and executeLineByLine methods, even if autoCommit is set to false. So in fact the connection is always committed after each execution of a script. What if the user wants to execute multiple scripts and commit them all once after the last one has successfully finished? With this bug, there is no way.
Expectation
if autoCommit is set to false, ScriptRunner must never attempt to commit the connection and should leave it to the caller to do so.

What if the user wants to execute multiple scripts and commit them all once after the last one has successfully finished?

ScriptRunner does not support multiple scripts that way.
But it supports multiple SQLs in a single script and the connection is rolled back if one of the SQLs failed.
If you need finer control over connection, check out SqlRunner.
Please let me know if I am missing something!

In my opinion the common and widely accepted understanding about autoCommit is neglected in this scenario. If backward compatibility wasn't an issue, I would have changed the current behavior so autoCommit=false guarantees no committing in any case, not even after each script. That would be the best option.
Otherwise there needs to be another method to completely turn autoCommit off. If you agree I can work on that. Btw I'm not sure what name suits that method! disableAutoCommit()?

A little background: ScriptRunner was developed for (and is still used by) Migrations and its purpose is to execute statement(s) in a single script.
So, if you want to execute multiple scripts without committing the connection, ScriptRunner is just not the right tool.
Have you checked SqlRunner? It's designed for more general use cases.
It would also be possible to concatenate multiple input sources into a single java.io.Reader in your code and pass it to ScriptRunner#runScript() if that meets your requirement.

So, if you want to execute multiple scripts without committing the connection, ScriptRunner is just not the right tool.

It could be. All it had to do was simply to no commit if autocommit is false, which I strongly believe should have been written this way in the first place. SqlRunner is using an established concept in an unfamiliar way.
non-autocommit  as implemented by SqlRunner means the entire script is implicitly committed if all statements in that script succeed !!! No one would ever expect that until they run into error and try to find the code that is responsible for committing the connection without their acknowledgment.

BTW SqlRunner is not a candidate to replace ScriptRunner, so I'm still insisting on fixing ScriptRunner rather than using SqlRunner to reinvent the wheel.

As I mentioned, ScriptRunner was developed for Migrations and its auto_commit option has a different meaning than the term's common usage.
Here is the description.
http://www.mybatis.org/migrations/init.html
# If set to true, each statement is isolated
# in its own transaction. Otherwise the entire
# script is executed in one transaction.

It is true that the name is a little bit confusing, but the option works as designed and changing the behavior is simply not an option because it will break Migrations and test cases that depend on it.
I would suggest you to write your own script runner that suits your needs.
It should be fairly simple especially without lines specific to Migrations.
Hope this makes thing clearer.


Add MRD Number on patient model

[ ] Add an option to link (enter) MRD number to the patient.
[ ] Use the mrd number in abdm user initiated care context linking patient discovery

To be taken up after ABDM plug conversion

@rithviknishad   I would like to work on this issue, please assign it to me

I would like to work on this , pls assign it to me

already part of questionnaire


Upgrade to uuid v1.0

The uuid crate recently had its first stable release.

Will this be a breaking change? Will a code that uses Tiberius with uuid 1.0 and uuid 0.x somewhere else work without type errors?

Will this be a breaking change? Will a code that uses Tiberius with uuid 1.0 and uuid 0.x somewhere else work without type errors?

It'll be a breaking change, yeah. Projects that use uuid with Tiberius will need to upgrade to 1.0. Not sure there's much to be done about that, though; right now projects that use uuid with Tiberius are stuck on v0.8 even if they want to upgrade. 🤷🏽

Ok. So it means a new major version for Tiberius.

Good that we are still on 0. where no rules apply to anything :D


Hyprctl Reload to not wake up EDP-1 or laptop monitor

Description
First, Im not sure if this already been asked but I couldnt find it..
Anyway, I have this on my config
bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, preferred, auto, 1"
bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable"
When I close my laptop lid, All workspaces and the external monitor became now the "main" display and all workspaces including mouse cursor moved to external monitor. (which is good)
However, when I change something on the settings, i.e. change some color settings, or monitor settings, the hyprctl reload wakes up the eDP-1. Closing and opening lid will of course disable the laptop's main display.
One solution is to of course disable the hyprctl reload, however, the waybar that I set to reload during wallpaper automatic change does not work anymore.
so probably you can set that if the Lid Switch is on, laptop monitor wont be wake up during reload.... something like that

this is precisely how hyprctl keyword works. It's temporary until the next reload.
if you want permanent solutions, you can always source = monitorConfig.conf and echo your settings to the config.
monitor= keywords are overwrite, so you can set your regular rules at the top, then source your monitorconfig, and whatever you put in that config will overwrite the rules in the main config.

thanks for your reply.
I forgot to mention that this are the contents of my hyprland.conf
Sourcing external config files
$configs = $HOME/.config/hypr/configs
source=$configs/ENVariables.conf
source=$configs/Execs.conf
source=$configs/Keybinds.conf
source=$configs/Laptops.conf
source=$configs/Monitors.conf
source=$configs/WindowRules.conf
source=$configs/Settings.conf
and nothing else. Are you suggesting that I should also populate hyprland.conf?

source=$configs/MonitorSetup.conf and then echo "monitor=...." > $configs/MonitorSetup.conf

alright cool.. I got it now.. Appreciate your quick reply.
But this is my last question I promise :)
So I created another LaptopDisplay.conf file and  add as a source
and then on edited this part as like this.
bindl = , switch:off:Lid Switch,exec,echo "monitor = eDP-1, preferred, auto, 1" > $configs/LaptopDisplay.conf
bindl = , switch:on:Lid Switch,exec,echo "monitor = eDP-1, disable" > $configs/LaptopDisplay.conf
I tested it and it works...
So my last question, is how you mean? Did I do it right?

looks fine

Thanks.....
Before I close this.. I just want to add some notes regarding this so others, if they will search about it, will know the caveats about this approach
As ive said this is not for you Lord Vaxerski but for others
while this approach works,
bindl = , switch:off:Lid Switch,exec,echo "monitor = eDP-1, preferred, auto, 1" > $configs/LaptopDisplay.conf
bindl = , switch:on:Lid Switch,exec,echo "monitor = eDP-1, disable" > $configs/LaptopDisplay.conf
be very careful and REMEMBER to OPEN your laptop lid before shutting down your laptop. If you dont open laptop lid before shutting down, next boot, no laptop display since last entry was to disable eDP-1

exec-once = echo "" >$configs/laptopdisplay.conf?

exec-once = echo "" >$configs/laptopdisplay.conf?

oh my.... why I didnt thought about that...
thanks a million :)

hmmmm I dont know if I am doing wrong but it didnt work..... while the
exec-once = echo "" >$configs/laptopdisplay.conf
does indeed erase the contents of the laptopdisplay.conf
there is no display. Until I connect the external monitor again.
So, to give you an idea of what I am doing...
I added
exec-once = echo "" >$configs/laptopdisplay.conf
I have a Monitors.conf and contents is only
monitor=,preferred,auto,1
then I have these, on my Laptops.conf
bindl = , switch:off:Lid Switch,exec,echo "monitor = eDP-1, preferred, auto, 1" > $configs/LaptopDisplay.conf
bindl = , switch:on:Lid Switch,exec,echo "monitor = eDP-1, disable" > $configs/LaptopDisplay.conf
I close the lid, and then shutdown my laptop.
remove the external monitor, and boot up my laptop.
NO display on laptop and will only have display once I reconnect external monitor

sorry.... got it now
need to add like this instead :)
exec-once = echo "monitor=eDP-1,preferred,auto,1" >$configs/laptopdisplay.conf

If my monitor is only 1336, can I use 1920?
this one :
monitor = DP-3, 1920x1080@240, auto, 1

If my monitor is only 1336, can I use 1920?
this one :
monitor = DP-3, 1920x1080@240, auto, 1

If my monitor is only 1336, can I use 1920?
this one : monitor = DP-3, 1920x1080@240, auto, 1

What exactly do you mean?


Incorrect info in readme

The readme says pandoc.PANDOC_PATH = '/usr/bin/pandoc' but it should be pandoc.core.PANDOC_PATH = '/usr/bin/pandoc'.

pandoc.PANDOC_PATH = '/usr/bin/pandoc'
Didn't worked here, but
pandoc.core.PANDOC_PATH = '/usr/bin/pandoc'
yes.
So I confirm the error on Python2. (Thanks for the tip @hedleyroos )

You should just use pypandoc, as this project looks to no longer be maintained.

Good point...

@msabramo I hadn't seen this one, thanks!


python/ops/variable_scope.py, variable_scope() is not backward compatible

https://github.com/tensorflow/tensorflow/commit/3d1ee95e612b1987e664ca46a7c584872d36dde9#diff-57dece591b2185b1c01f712d53baef96L1089
It used to accept "" as name_of_scope, newer version TF will produce an error.
if default_name is None and not name_or_scope:
      raise TypeError("If default_name is None then name_or_scope is required")

By reading the newer code, I believe disallowing "" as scope name wasn't your team's intension.
A simple fix could make this function completely backward compatible.

Indeed, it looks like it was meant to be "... and not name_or_scope is None", right? Would you be willing to send a PR correcting this?

I think it should be "... and not name_or_scope is None".
PR is up:
https://github.com/tensorflow/tensorflow/pull/4619


Add the ability to clone and read binary indexes to the C API.

This is in addition to Enet4/faiss-rs#79 which contains the faiss-sys related changes to consume these two functions and the rest of the C API for binary indexes.

Hello! The changes seem to be in order, but I would appreciate it if you sent this PR to the upstream repository instead, so that the bindings may continue to link to the main development branch.

Certainly! Thanks for your feedback.


Clerk SDK integration for user management

just a record for user (maybe user_id), we do not save user information.
API

POST /login
verify __session in cookies
get_or_create(user_id)

success: get -> 200
success: create -> 201
error: __session not found or invalid __session: 401
error: clerk failed -> 502
error: others -> 500

POST /logout
TBD

flow ref: https://github.com/atarigo/official-website/issues/11


fix: hex values

While working on an app (using micro-stacks) I noticed that if a function argument that is serialized and prefixed with 0x, it will cause the wallet to completely break with no feedback :S but this fixes it :~)
cc/ @kyranjamie @fbwoolf

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


m: Remove unnecessary dependencies from event-listener-strategy

We never actually end up using pin_utils, it was a mistake to leave that in.
We can get around pin_project_lite by implementing manual pin projection.

it seems that this breaks MSRV but idk why...

what does m: stand for?

m stands for "maintenance". I use it for PRs with no public changes.

it would be nice to compare this side-by-side with the expanded version using pin-project-lite, to see how they get around the MSRV thingie...

It look like pin_project_lite just calls Pin::new_unchecked on the result of Pin::get_unchecked_mut. I adjusted this PR to use that strategy instead.

pin_project_lite just calls Pin::new_unchecked on the result of Pin::get_unchecked_mut

pin-project{,-lite} does not just call those unsafe functions. In this PR's macro, implementing Unpin or Drop on the generated structure or adding the #[repr(packed)] attribute to the input struct can cause unsoundness.
(Even though it may seem simple at first glance, using the unsafe parts of the Pin API correctly is not always easy. e.g., https://github.com/rust-lang/futures-rs/pull/2649, https://github.com/tokio-rs/tokio/pull/2612, etc.)

pin-project{,-lite} does not just call those unsafe functions. In this PR's macro, implementing Unpin or Drop on the generated structure or adding the #[repr(packed)] attribute to the input struct can cause unsoundness.
(Even though it may seem simple at first glance, using the unsafe parts of the Pin API correctly is not always easy. e.g., rust-lang/futures-rs#2649, tokio-rs/tokio#2612, etc.)

Hmm, this is a good point. Maybe we shouldn't remove pin-project-lite, just so that we can piggyback off of that package's guarantees.

Closed in favor of #56


How can i get exception's error code and message?

I want to get all of exception's error code,have any document?
Like HTTP Status Code.

Does this help:  https://github.com/cloudfoundry/cloud_controller_ng/blob/master/vendor/errors/v2.yml

Thanks @rboykin. That's exactly the artifact I was going to point him to.
Does that help @liuxg123?

I'm going to close this issue due to inactivity, but feel free to re-open it if you need more help.


Do not use GetPrimitiveArrayCritical(...) due multiple not-fixed bugs…

… related to GCLocker
Motivation:
GetPrimitiveArrayCritical(...) may cause multiple not-fixed bugs related to the GCLocker while there is little gain for our use-case. We should just use GetByteArrayRegion(...) and copy into a small on-stack buffer.
See also:

https://shipilev.net/jvm/anatomy-quarks/9-jni-critical-gclocker/#_g1
https://bugs.openjdk.java.net/browse/JDK-8048556
https://bugs.openjdk.java.net/browse/JDK-8057573
https://bugs.openjdk.java.net/browse/JDK-8057586

Special thanks to @jayv @shipilev @apangin for the pointers.
Modifications:
Replace GetPrimitiveArrayCritical(...) with GetByteArrayRegion(...)

@netty-bot test this please

I hope Region Pinning in JDK may help eliminate or alleviate this problem in the future.


How do I set the pretrained model download path?

I want to change the download path of the esmfold pre-trained model , what should I do

in the python script add these 2 lines:
import torch.hub as hub
hub.set_dir("path/to/folder/where/you/store/models")

it works, Thanks


Enable sdpa export for SD unet component

Enable sdpa export for pytorch v2.1.0 or higher

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


LRU list can return fewer than the requested number of items for a DC-wide query

See title, I'll work on this tomorrow.

Eh, tomorrow morning, I've been doing basically nothing but important work.


abc

xyz

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.


update packages

:white_check_mark: Build TheIdServer 7.1.1-fix-dependencies1-0002 completed (commit https://github.com/Aguafrommars/TheIdServer/commit/0eba6ba418 by @)


Krhubert/container

@ilgooz this one was not ready to merge, there is few regressions in the code

I confirm this PR has been reverted. Let's continue the discussion on https://github.com/mesg-foundation/core/pull/336


feat: Upgrade to parachain 0.7.x

Changes lots of denominations from Satoshi/Planck to BTC/DOT respectively. Please pay extra attention that I didn't break anything when reviewing
Depends on https://github.com/interlay/polkabtc-js/pull/286
Considers a relayer registered if stake > 0
Replace request is no longer Accepted/Pending but Pending/Completed/Cancelled
Adds several @polkadot dependencies. Different versions were installed by polkabtc-js and polkabtc-stats and type conflicts would appear due to lack of a default explicit package. I'll try to remove these once I can test https://github.com/interlay/polkabtc-js/pull/286

Note: all those comments are not breaking. We'll merge this now and fix later today.


100% quality looks worse than 99%

100% seems to smooth things out too much, also blockier
Examples (converted to png because github skill issue):
See the wall, floor, arm, text also looks better in 99%
99% (173kb):

100% (20kb):

Related issue (with additional example) https://github.com/T8RIN/ImageToolbox/issues/891

I'll look into it.
However your meaning that You could remove 100% option because that would mean lossless and it isnt is wrong.
AVIF and JXL as well have dedicated compression mode that mean loseless, quality 100 just max quality but not loseless.
Also this library always embed AVIF with YUV 4:2:0 that cannot be loseless by itself due to chroma downsampling. Loseless AVIF's theoretically can be possible only for YUV 4:4:4 any other chroma format changes the chroma and this is already not loseless. I don't know exactly what YUV range does libheif use for chroma range, highly likely it's TV range Y ( 16 - 235 ), UV ( 16 - 240) not PC range ( 0 -255 ) and that would mean loseless AVIF cannot be achieved at all.

Yes i meant removing 100% quality because the library doesnt do lossless

Fixed


cmake: Use Zephyr SDK by default on all host operating systems

This commit updates the Zephyr build system to use the Zephyr SDK by
default for all host operating systems, when ZEPHYR_TOOLCHAIN_VARIANT
environment variable is not explicitly set.
Note that the Zephyr SDK is now available on all three major host
operating systems (i.e. Linux, macOS, Windows), and there is no reason
to exclude this behaviour for non-Linux hosts anymore.
Signed-off-by: Stephanos Ioannidis<EMAIL_ADDRESS>

Ready for review. DNM until Zephyr SDK 0.14.0 is released.

Zephyr SDK 0.14.0 has been released.
Ready for final review and merging.


Broken bulletpoint styling in docs

The bulletpoints on this page are not rendering correctly: https://docs.pachyderm.com/latest/reference/s3gateway_api/

Thanks, @yusef. In general, we need to make sure that we add a blank line between a paragraph and a list. For example:
To do:

1.
1.
1.

instead of:
To do:
1.
1.
1.

The latter won't render correctly.


logs > 16k block the driver completely for that container

Docker version 19.03.11, build 42e35e61f3
fluentd-async v0.2
When logging normal sized messages the driver works fine. Printing a (few) message(s) > 16k seem to block the driver completely for that container, the message never comes true (while it did with the normal fluentd driver). Killing that container becomes difficult too.

Hello @chrismaes87, thanks for reporting this bug. I fixed it in ca439b00. You can now update to v0.3 :wink:


docker image not available in v1.12.0

docker image not available in v1.12.0

Hello,
The image is now hosted on the "appclacks" registry: appclacks/cabourotte:v1.12.0


annealing function

hello:
I have a question about setting annealing function parameter t0,  whether it is releted about training setting steps？

Hi~ Yes, t0 is a hyperparameter of the annealing function, and it decides the middle point of the curve. In other words, when the training timestep is equal to t0, the return value of the annealing function would be 0.5.


Add failing integration-test null selected fieled coalesced to zero

Illustrate #2284
Test failing with
Row not matching expectations: {"array_field": [1, 2, 3], "struct_field": {"int_field": 10, "str_field": "abc"}, "struct_field_opt": {"int_field": 0}} expected null, but was:<{"int_field": 0}>

As far as I see the root cause comes from the received serialized_binary_rows. Can the issue be escalated ?


Option to loop movie

Use Case
Please provide a use case to help us understand your request in context
Hi. I am using the endocytosis simulation in talks and to introduce people to my work. I find myself wishing that I could loop the animation and stare at it, for presentation and hypothesis-generating reasons.
Acceptance Criteria
Please describe how you know this is done
If there's a flag or button in which we can toggle whether or not to loop the animation
Details
Please provide any helpful specifications

Thanks for your input! That definitely sounds useful. We'll discuss how to prioritize and implement this in one of our meetings soon.

Design is done, implementation is tracked here https://github.com/simularium/simularium-website/issues/298


New version: AgileBits.1Password version 8.10.34

Checklist for Pull Requests

[ ] Have you signed the Contributor License Agreement?
[ ] Is there a linked Issue?

Manifests

[ ] Have you checked that there aren't other open pull requests for the same manifest update/change?
[ ] This PR only modifies one (1) manifest
[ ] Have you validated your manifest locally with winget validate --manifest <path>?
[ ] Have you tested your manifest locally with winget install --manifest <path>?
[ ] Does your manifest conform to the 1.6 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

turns out @PckgrBot created a pr just before I did.


glb + docker 20.10.2 errors

invalid from flag value my-glb-host.name.com/libjpeg-turbo:2020-08-25-1: missing or empty Content-Length header

if I downgrade to 19.03 docker it works fine.

It looks like Cloud Run removes the Content-Length header by default, which Docker 20.10 does no longer accept.

It looks like Cloud Run removes the Content-Length header by default, which Docker 20.10 does no longer accept.

By looking at the relevant Docker code, I did stumble upon these lines:
https://github.com/docker/distribution/blob/master/registry/client/repository.go#L333
It looks like Google Cloud Run strips the Content-Length header for HEAD requests, but not GET. By returning an error on HEAD requests, we force Docker to re-try using a GET request.
Definitely not a nice workaround, but it works for the time being:
https://github.com/OFFLINE-GmbH/serverless-registry-proxy/commit/6c98a0837a00b33f28b80bdfd42977bd7e1f5fda

By looking at the relevant Docker code, I did stumble upon these lines:
https://github.com/docker/distribution/blob/master/registry/client/repository.go#L333
It looks like Google Cloud Run strips the Content-Length header for HEAD requests, but not GET. By returning an error on HEAD requests, we force Docker to re-try using a GET request.
Definitely not a nice workaround, but it works for the time being:
https://github.com/OFFLINE-GmbH/serverless-registry-proxy/commit/6c98a0837a00b33f28b80bdfd42977bd7e1f5fda


re2.exe not responding

I have tried both nightly and regular build.  When I launch the game with the mod installed i just get the black game window. And it says not responding. Have to force it to shutdown.
SteamVR 1.22.11
Valve Index
Nvidia 3090 driver 512.15
Any ideas?

Ah ok i gotta start it from steam. I get a warnign about

I can press ok and it works. But it says it will affect perfoamnce. And I do get alot of frame drops in game

Disable Hardware Accelerated GPU Scheduling as pointed out here: https://github.com/praydog/REFramework/issues/147
Lower your SteamVR resolution
Switch to DX12

Read the Troubleshoting FAQ


influxdb error when installing

Here is the screenshot of what happens.
Installing on Synology,  I have tried 50 different trys, But always get an influxdb error when installing

Thank You
Maybe, You could make a Synology install package for this, Please ?

This must be an influxdb problem on my synology, I gotta learn how to remove influxdb completely and start over.


Changes to leptos, leptos_meta, leptos_actix/leptos_axum, and leptos_config to support cargo-leptos-beta

Hi @gbj and @akesson, I have made several changes to leptos to support the cargo-leptos beta.
I hope both of you can take some time to review this, especially @akesson since it needs to work with cargo-leptos. I think I have it working with my stack, but would love your input.
Changes:

Add id prop to <Stylesheet/> component to allow cargo-leptos' new css feature to work
Rename RenderOptions to LeptosOptions and delete KDL file writing
Read LeptosOptions from Cargo.toml in the [package.metadata.leptos] section, sharing keys with cargo-leptos
Conditional WASM filename based on PACKAGE_NAME env var. If deploying a bundle built with cargo-leptos, PACKAGE_NAME env var will need to manually set
Allowed Server Functions to set status of form redirects

This should allow for one source of truth for people using cargo-leptos or wasm-pack, and streamline some things.
It appears that cargo-leptos beta also does not support workspaces, as a bunch of paths are relative to the cargo root, which changes to the workspace root when in a workspace. This will prevent modifying the examples in leptos(and having them run with cargo-leptos watch), at least with the present example format. It shouldn't deter operation with wasm-pack

Why do you need to read the Cargo.toml file? It's fine now, but with workspace support, you'll have a difficult (read impossible) time finding the right one. I'm implementing cargo-leptos command-line arguments and workspace config options for choosing which project to run.

Mostly because if cargo-leptos is not used, then I need it to work with wasm-pack without any env vars set. I'm not sure about workspaces, but the Cargo.toml file still exists in the crate in a Workspace, and I reference it relative to the crate.
The examples seem to work, but it'll need more testing

I'm not sure about workspaces, but the Cargo.toml file still exists in the crate in a Workspace, and I reference it relative to the crate.

I'm saying that this is not necessarily a valid assumption when running in a Workspace. The workspace support I'm working on adds the possibility to split the server project and the front-end project into two different Cargo packages. Besides, when running from the workspace root, I'm not sure if I will/can change the current working directory to the sub-project.

Fair point. I've added an option to specify the path to Cargo.toml in get_configuration(). But it's use isn't required, a user could still build a LeptosOptions with Default::default() and the Builder,  and skip the conf file reading entirely. This default approach is just to make it easier for the two build methods to coexist.

@akesson @gbj I've updates the examples and config once more to support the cargo-leptos beta. With this, it should be ready to merge again. Happy to have @akesson add features to it.


Bug - a worksheet can have duplicate headers

In this library code, you provid mechanism to forbid duplicate headers for non-empty strings. But this is too coercitive. A google spreadsheet can have duplicate header values

I put as attachment a screenshot which shows that it's possible without any problem.
Maybe you have a business case that need headers to be unique, but it's opinionated.
I tried to only setup data rows without setting header row, but your library doesn't allow it. Anyway to trick this ? Anyway to disable duplicate header control ?

Have found a workaround:
worksheet._headerValues = [];
await worksheet.addRows(rows);

quick&dirty but working

I have this same issue. I find the duplicate header error to be too restrictive, and causes issues with many users in real-world scenarios. Speadsheets from average users are messy, and the code in this library should account for that.
Instead of throwing an error when duplicate headers are found, just pick the first one and use that. So if there are two headers named "Date" or whatever, just use the first one you find and ignore the other. This will ensure that data always gets inserted, even if the actual spreadsheet is a bit messy.

Agree and disagree.
Ok that spreadsheet of average users are messy but it could be a use-case too, to have duplicate headers (aka "first row") when it's only for calc or storage (for a formula in another sheet).
So I think the best solution is to provide setHeaders method without control of duplicate, or with optional control. We shouldn't use the solution : "take care of first occurence, forget the others", which is opinionated too.

I tried to build a PR but wasn't able to build project locally just after clone. Any help @theoephraim ?

Of course you can have whatever data in whatever cells you want as it is just a spreadsheet. However the row-based API provided by this module is making an explicit trade-off of simplicity in exchange for some limitations and is designed for the use case of when you want to use your spreadsheet like a database. In a database you cannot have duplicate columns. This api also lets us convert rows into objects - using columns as keys - where you cannot have duplicate keys.
In my opinion, in the case of duplicate headers the most reasonable/intuitive thing to do is explode if we detect dupes... Taking the first one would also certainly work, but I think it would cause more confusion than the convenience is worth.
Any other solution would mean adding complexity to how you interact with rows and is in my opinion probably not worth it.
Especially since 99% of the time if you are using this module you will also have control over the spreadsheet, it seems fairly reasonable to me to just say - dont use duplicate headers. You can easily adjust one to make it more explicit or even just add a number to avoid the duplicate value.
You can always fall back to the cell-based methods if you want to write any data into any cells and are not using your sheet like a database.
That all said, if you want to propose some way to support duplicate headers that keeps things simple and won't lead to unexpected confusion, I'll certainly consider it... but I can't think of any easy way to do that.
@MathRobin - I'll need more details about the errors you are getting when trying to run/build the project locally... Feel free to open a new issue with that info.

@theoephraim i was trying to build with yarn and just realized that you used pnpm on this project. When trying with pnpm, everything is building. So it's ok now to suggest some changes :smile_cat:

Is the issue fixed? (for confirmation)
I am still getting
error while createHeader:  Error: Duplicate header detected: "apple". Please make sure all non-empty headers are unique

I had issue when getRows() doesn't return columns data if header of these columns are empty
I want to get all data from sheet

That’s just how the row-based methods work. Use the cell based methods if you want to get everything.

not linked to my original question. I've suggested a workaround for my problem. No this is closed.
And we don't use anymore this repo.
Bye


dprint is complaining about the order of the edition parameter on Cargo.toml

Version: 0.27.0
I think this error started to happening after the updates on packages with the latest version of Rust edition, not sure why but dprint now is complaining about the position of the edition parameter, if the parameter edition is moved to last position on the list the command dprint  going to work ok
target/release/wbuild/polkadot-runtime/Cargo.toml:
 9  9| name·=·'polkadot_runtime'
10 10|
11 11| [package]
   12|-edition·=·'2021'
12 13| name·=·'polkadot-runtime-wasm'
13 14| version·=·'1.0.0'
14   |+edition·=·'2021'
15 15| [profile.dev]
16 16| panic·=·'abort'

dprint-plugin-toml formats Cargo.toml files according to https://github.com/rust-lang/rfcs/blob/master/style-guide/cargo.md -- which will put name and version keys at the top.
You can disable it by specifying "cargo.applyConventions": false in your dprint.json file.
Sorry, the documentation is non-existent at the moment. I opened https://github.com/dprint/dprint-plugin-toml/issues/7 to improve this

That's ok, thanks @dsherret for the answer


Current source not work in 1.9.1

Originally reported by: apolun (Bitbucket: apolun, GitHub: apolun)

Hi
I Fork this commerce to test for future work and customization
but unfortunately my clone is not shown in admin menu
There are two message shown in log :
1-  Orchard.Environment.Extensions.ExtensionManager - No suitable loader found for extension "Nwazet.Commerce"
2- The type or namespace name 'UsedImplicitly' could not be found (are you missing a using directive or an assembly reference?) on ProductAttributesPartDriver line 97

Bitbucket: https://bitbucket.org/bleroy/nwazet.commerce/issue/78

I think you can close this, since I've removed JetBrains in the nuget fix.


[Rancher Webhook] pre-delete-hook-psp is created when preDelete.enabled is set to false

Since the check for the value of preDelete.enabled is missing in the template for the pre-delete-hook-psp, it will be created even preDelete.enabled is false.
But because the chart is managed by Rancher internally, and preDelete.enabled is true by default, this missing check has no effect on rancher-webhook's functionality.

Are there any other webhook changes going into 2.6.1 ? If not I actually think we should wait for 2.6.2.

Move this to 2.6.2 since there are no other webhook changes.

can be tested in rancher-webhook chart v0.2.1

Prerequisite:

add the dev-v2.6 branch as a helm repo

helm repo add rancher-dev-v2.6 https://raw.githubusercontent.com/rancher/charts/dev-v2.6/
helm repo update
helm search repo  rancher-webhook

To reproduce:
run
helm template  rancher-webhook --set preDelete.enabled=false rancher-dev-v2.6/rancher-webhook --version 1.0.0+up0.2.0 --dry-run

there should be a template for the PodSecurityPolicy in the output, such like
---
# Source: rancher-webhook/templates/pre-delete-hook-psp.yaml
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
  name: rancher-webhook-pre-delete
...

To validate the fix:
run the same command but pass the new version
helm template  rancher-webhook --set preDelete.enabled=false rancher-dev-v2.6/rancher-webhook --version 1.0.1+up0.2.1 --dry-run

The PodSecurityPolicy should NOT be in the output.

following the above steps, i was able to verify that the PodSecurityPolicy doesn't show in the new version


Mobile "docs" menu not accessible via iphone 6s

If using an iphone 6s or a device with a resolution of <= 320px the site-menu link overlaps with the docs link. This makes it impossible to interact with the sub docs link.

@alexwolfe
cc @naomiblack @ericjim

Closing as we are moving to the new design with proper mobile version.


Message sent before the first call  to hv_***_process_inline is received after loadbang

I would expect the opposite. Or at least I would expect a way to force the opposite.

Loadbangs always come first. They are queued during the initialisation of the patch. There is no way to change this at the moment, unless you want to manually manage all of your startup messages.


[cinder-csi-plugin] Detaching a volume  on controller has too much of a delay

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind feature

What happened:
Whenever we have maintenance in Openstack we do a graceful shutdown on a node. That triggers draining the pods. However detaching the cinder volume gets noticed by the controllerplugin too late in the stack.
I0917 15:21:34.010628       1 csi_handler.go:234] Error processing "csi-045061d9a5678eed8e0d57a59e01420bb5e13899386cc6581378d5558301b39e": failed to detach: rpc error: code = Internal desc = ControllerUnpublishVolume Detach Volume failed with error failed to detach volume cbb2daa9-6cf7-4bd9-aa0b-1902a1b30498 from compute e7eda096-1267-45a1-9164-f7a7d85c7f4e : Expected HTTP response code [202 204] when accessing [DELETE https://api.ouropenst.ack:8774/v2.1/servers/e7eda096-1267-45a1-9164-f7a7d85c7f4e/os-volume_attachments/cbb2daa9-6cf7-4bd9-aa0b-1902a1b30498], but got 409 instead: {"conflictingRequest": {"code": 409, "message": "Cannot 'detach_volume' instance e7eda096-1267-45a1-9164-f7a7d85c7f4e while it is in task_state reboot_started"}}

which means that while the server is in maintenance we cannot re-attach our volumes.
I0917 15:21:34.429151       1 csi_handler.go:251] Attaching "csi-ae19a426cd7dbc8de74de71d711bc63ae0e71e6c28a0238785e84338ad3beb6c"
I0917 15:21:34.599180       1 csi_handler.go:234] Error processing "csi-ae19a426cd7dbc8de74de71d711bc63ae0e71e6c28a0238785e84338ad3beb6c": failed to attach: rpc error: code = Internal desc = [ControllerPublishVolume] Attach Volume failed with error failed to attach cbb2daa9-6cf7-4bd9-aa0b-1902a1b30498 volume to b3d51121-6c84-4670-a4a7-e83729d2004a compute: Expected HTTP response code [200] when accessing [POST https://api.ouropenst.ack:8774/v2.1/servers/b3d51121-6c84-4670-a4a7-e83729d2004a/os-volume_attachments], but got 400 instead: {"badRequest": {"code": 400, "message": "Invalid volume: volume cbb2daa9-6cf7-4bd9-aa0b-1902a1b30498 is already attached to instances: e7eda096-1267-45a1-9164-f7a7d85c7f4e"}}

What you expected to happen:
Unmount the volume before node goes into reboot
How to reproduce it:
do a graceful shutdown in a cluster
Anything else we need to know?:
don't hink so
Environment:

openstack-cloud-controller-manager(or other related binary) version: 1.31.0 cinder-csi, 2.31.0 the whole package (helm chart)
OpenStack version: 20.3.1 (cinder module)
Others:

Actually it might be problem in the whole idea of ACPI shutdown - OpenStack seems to set the reboot_started flag rightaway as a user presses ctrl-alt-del / shutdown / whatever button in horizon (or API) so by the time the pods get drained off the node (and volumes unmounted) the OpenStack no longer accepts any volume detachments.


Font size is not changing and application is crashing when changing font size.

When user changed seekbar the library is calling onConfigChange method
` @Override
public void onConfigChange() {
    int position = mFolioPageViewPager.getCurrentItem();
    //reload previous, current and next fragment
    Fragment page;
    if (position != 0) {
        page = getFragment(position - 1);
        ((FolioPageFragment) page).reload();
    }
    page = getFragment(position);
    ((FolioPageFragment) page).reload();
    if (position < mSpineReferences.size()) {
        page = getFragment(position + 1);
        if(page!=null) {
            ((FolioPageFragment) page).reload();
        }

    }
}`

But the problem is for this statement "((FolioPageFragment) page).reload(); " because it is returning null fragment. How to fix this problem?

we can't able to reproduce this.. which version you are working on?

I downloaded the library from github and tried to integrate that. So it is showing same error in all devices. Event I have tested the sample project. It is also crashing when I am trying to change the font. May be I am missing something. If you do not face this kind of situation could you please send me a demo apk file to test in my device?

Are you using latest source from master branch?

As I have downloaded the source from Github, so I am assuming it was downloaded from master branch because Github shows master branch by default.

well, we have removed the code which you are pointing to.. So, i doubt if you using latest code from master branch..


Update Contribute, Resources sections of Handbook

special thanks to @phillipchan1 — i definitely would not have figured out that map/index issue on my own!

lol why are you still doing development work

b/c you and @protoEvangelion abandoned me 😿
/giphy forever alone


[New Snap] Assets Risk Detection

Checklist
All items in the list below needs to be satisfied.

[ ] Is the Snap repository publicly accessible and linked in this ticket? https://github.com/GoPlusSecurity/riskdetect-snap
[ ] Is the Snap distributed on npm and linked in this ticket? https://www.npmjs.com/package/@goplus/riskdetect-snap
[ ] Has an audit been performed and the audit report attached or linked in this issue? https://github.com/MetaMask/snaps-registry/issues/116#issuecomment-1710941933
[ ] Is a complete list of discovered vulnerabilities from the audit documented in this issue?
[ ] For vulnerabilities that have been deemed necessary to be addressed, are the links to the fixes attached to this issue?
[ ] For vulnerabilities that have been deemed not necessary to be addressed, is a reason for each of them documented in this issue?
[ ] The corresponding pull request in this repo has been merged. https://github.com/MetaMask/snaps-registry/pull/65

Discovered vulnerabilities:

[N1] [Suggestion] Redundant code

Fixed; The issue has been fixed in commit: 1e4b98327e4836aa9ae26f427c6b0c03ab9102c0.

[N2] [Suggestion] Lack of origin display

Fixed; The issue has been fixed in commit: 1e4b98327e4836aa9ae26f427c6b0c03ab9102c0.

[N3] [Low] Arbitrary data forgery

Fixed; The issue has been fixed in commit: dead3acab6905662515aa69fdc01e274239400ba.


Add "keyframes" to the CSS terms

https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes

Coverage increased (+1.3%) to 99.287% when pulling 1e224c2ab8526859e9ff34a80ebd82025b4c0ea4 on aimagic:patch-1 into fee4ef75e1bdf3a9fd9aefb37c5ec6aaeae91029 on Jason3S:master.

Coverage increased (+1.3%) to 99.287% when pulling 1e224c2ab8526859e9ff34a80ebd82025b4c0ea4 on aimagic:patch-1 into fee4ef75e1bdf3a9fd9aefb37c5ec6aaeae91029 on Jason3S:master.

Thank you.


Avoid saving distance values

Right now, the parquet file written out into the .hframe directory contains an index column that contains the Hilbert distance of each row.  To avoid adding this extra storage overhead, we try:

Dropping the index just before saving to parquet.
Have the query_range method load sub dataframes using the dask DataFrame's get_partition method.

If this works, then we could consider distributing sample datasets in this format with no additional storage overhead.

Done in dfb02daa6763ce1262cabdb74ee87a543ccbaf97


Saving avatar does not work with custom storage disk

When defining disk like so:
'public_dev' => [
            'driver' => 'local',
            'root' => public_path('storage'),
            'url' => env('APP_URL').'/storage',
            'visibility' => 'public',
        ],

and:
WINK_STORAGE_DISK=public_dev

leads to broken avatar image.  This is in part due to the way ImageUploadsController handles uploading image and returning path.
The following change:
$path =  request()->image->store('/public/wink/images', config('wink.storage_disk'));
return response()->json([
            'url' => \Storage::disk(config('wink.storage_disk'))->url($path)
        ]);

Unfortunately this will lead to saving absolute url for avatar in the database, which is not desirable.  One way of dealing with the issue is to make ImageUploadsController save the avatar path in the database.  While doing so, it can also delete currently saved avatar from the disk. (Currently it is not deleting old avatar file when new one is uploaded).
Vue component should get avatar's absolute path, but this path should be generated on the server side by using Storage::url() function.  It will be also a good idea to make Vue generate default gravatar url if the path for avatar is empty (null), rather than saving default url for gravatar in the database.

Hey,
Glad you figures it out, can you open a PR with a fix to the issue?

Sure. Will do that.

fixed


unknow json format files

hi, what's the correct json file format. I am trying this:

username, password
Username:username, Password:password

Try { "$USERNAME":  "$PASSWORD" }
Where $USERNAME and $PASSWORD are your account credentials.
Or you could try with the --save or -s options which will prompt you for credentials and automatically save them

It's worked, thanks a lot and nice work friend!! :)


"The 'repo_token' variable is empty." on PR Runs of Scorecard Action

I believe https://github.com/ossf/scorecard-action/pull/71 regressed PR runs of scorecard, where we don't actually need the repo_token because we aren't pushing the results, just checking them:
https://github.com/microsoft/msquic/runs/5259593124?check_suite_focus=true

Thanks for the report.
Fyi, we have not advertised support for pull request yet (it's not in the workflow example we provide). This should have been clearer from us.
The token is used for two reason:

to access GitHubAPIs - in this case you're right it's not needed. I think the checkout should not need the token. But I wonder if GitHub may still require one sometimes?
Uploading the results as SARIF is still performed, and that's how the GitHub UI manages to show fixed and/or additional results introduced by the given PR.

We will try to add PR support in the next release.

@laurentsimon any idea on when you might add PR support? I will be blocking dependabot updates (i.e. this PR) for this action until I can safely merge the latest without breaking our existing behavior.

Why is that necessary? As you mentioned in your (1) above no token should be necessary since you'd just be querying state, not publishing anything for PRs.

ebpf-for-windows project is now also blocked updating beyond 1.0.3 due to this issue.

@dthaler have you tested with v1.0.4?

@dthaler have you tested with v1.0.4?

Yes, we see intermittant failures, such as in https://github.com/microsoft/ebpf-for-windows/runs/5726574449?check_suite_focus=true (whereas https://github.com/microsoft/ebpf-for-windows/runs/5725496349?check_suite_focus=true passed referencing the same commit)

Great finding, intermittent problems, that's really interesting. Could you use this PR's branch (my personal repo) to add logs to the action? I think we may be able to point out the problems with this additional log - just this file https://github.com/ossf/scorecard-action/pull/155/files#diff-6f9d41d046756f0ddc2fcee0626bdb50100d12b88f293734eff742818e03efa2

FYI, in the ebpf-for-windows project, I used dependabot ignore this minor version to block upgrading the scorecard-action from 1.0.3 until this issue is fixed or 1.1 comes out, since the PR to upgrade to 1.0.3 was accidentally merged and everything started failing and had to be reverted.

I'l spend some time to reproduce the problem soon.

@laurentsimon

We will try to add PR support in the next release.

Now that v2.0 is out, is there any progress on fixing this PR?

Not officially supported yet, but I think it should work if you use
publish_results: ${{ github.event_name != 'pull_request' }}

I will create a PR to have the equivalent of ${{ github.event_name != 'pull_request' }} in the code.


Add theme to Linear site

Hey @jamieshiers, can you add the theme to https://linear.style?
Instructions: https://github.com/alii/linear-style/blob/main/README.md

Done! Just waiting for it to be merged.
https://github.com/alii/linear-style/pull/39

👍


Unify usage of request-scoped resource model caching

The result of the adaptation and mapping of a resource to a NEBA @ResourceModel can be cached, if the respective adaptation occurs within the scope of a request and if the request-scoped resource model cache is active.
Currently, the underlying cache is used in two different ways, depending on whether a model is adapted from within another model (in which case the target type is known) or whether the best-matching model is resolved within a view, e.g. using <neba:defineObjects />.
The latter uses the ResourceModelProvider service, which, for lookup efficiency, builds a cache key that does not contain the model target type, as the target type is unknown in the view.
Resulting, there is a potential reduction of the caching ratio, as a model may be adapted and mapped twice, e.g. once from within another model and once in the view. On the other hand, there is an increased lookup efficiency.
It is very likely that the special cache key usage by the ResourceModelProvider implementation represents a premature optimization that is more likely to have a negative than a positive effect on performance. This, however, strongly depends on application semantics, i.e. on the number of times the ResourceModelProvider provides a specific model that is also referenced by other resource models.
Consequently, it must be investigated whether a change to a unified cache usage with a common cache key performs better than the current solution:

Build a test scenario using the neba-sample project, with many components and internal adaptations.
Perform a load test on this scenario using the current implementation
Change the current implementation to use a common cache key
Perform the load tests to assess the effect of the change

The cache key calculation is no unified, resulting in the views (e.g., neba.js or the neba:defineObjects tag) using the same cache key that is used when directly adapting a model to a specific target type. Measurements showed that this increases the caching ratio in the neba sample app.
However, the caching ratio could be further improved. This will be tracked in a separate ticket.