[Bug]: no citations return using azure ai search

Language
Javascript/Typescript
Version
latest
Description
chat return text with [doc1] [doc2], but no citations in content
CHAT PROMPT:
[
{
"role": "system",
"content": "The following is a conversation with an AI assistant, who is an expert on answering questions over the given context.\nResponses should be in a short journalistic style with no more than 80 words."
},
{
"role": "user",
"content": "tell me about PerksPlus"
}
]
CHAT RESPONSE:
duration: 4086ms
{
"role": "assistant",
"content": "Contoso Electronics' PerksPlus Program is a benefits initiative aimed at supporting employees' health and wellness. It allows employees to expense up to $1000 for various fitness-related activities [doc1]. Covered activities include gym memberships, personal training, yoga, Pilates, fitness equipment, sports team fees, health retreats, outdoor adventures, group fitness, and virtual fitness programs [doc1]. Additionally, the program supports lessons such as skiing, scuba diving, surfing, and horseback riding [doc1]. Non-fitness-related expenses, medical treatments, travel not related to fitness, and food supplements are not covered under the program [doc1]."
}
Reproduction Steps
1.config.json
{
    "schema": 1.1,
    "description": "Chat with Teams RAG",
    "type": "completion",
    "completion": {
        "model": "gpt-35-turbo",
        "completion_type": "chat",
        "include_history": true,
        "include_input": true,
        "max_input_tokens": 5000,
        "max_tokens": 1000,
        "temperature": 0.9,
        "top_p": 0.0,
        "presence_penalty": 0.6,
        "frequency_penalty": 0.0,
        "stop_sequences": []
    },
    "augmentation": {
        "augmentation_type": "none"
    }
}

2.app.js
const { ActivityTypes, MemoryStorage, MessageFactory } = require("botbuilder");
const path = require("path");
const config = require("../config");

// See https://aka.ms/teams-ai-library to learn more about the Teams AI library.
const { Application, ActionPlanner, OpenAIModel, PromptManager } = require("@microsoft/teams-ai");

// Create AI components
const model = new OpenAIModel({
  azureApiKey: config.azureOpenAIKey,
  azureDefaultDeployment: config.azureOpenAIDeploymentName,
  azureEndpoint: config.azureOpenAIEndpoint,
  azureApiVersion: '2024-05-01-preview',
  useSystemMessages: true,
  logRequests: true,
});
const prompts = new PromptManager({
  promptsFolder: path.join(__dirname, "../prompts"),
});
const planner = new ActionPlanner({
  model,
  prompts,
  defaultPrompt: async () => {
    const prompt = await prompts.getPrompt('chat2');

    prompt.config.completion.model = config.azureOpenAIDeploymentName;

    if (config.azureSearchKey && config.azureSearchEndpoint) {
        prompt.config.completion.data_sources = [
            {
                type: 'azure_search',
                parameters: {
                    endpoint: config.azureSearchEndpoint,
                    index_name: 'my-documents',
                    semantic_configuration: 'default',
                    query_type: 'vector_simple_hybrid',
                    embedding_dependency: {
                        type: 'deployment_name',
                        deployment_name: config.azureOpenAIEmbeddingDeploymentName,
                        dimensions: 3072
                    },
                    fields_mapping: {
                      content_fields: ['description'],
                      vector_fields: ['descriptionVector'],
                      title_field: 'docTitle',
                    },
                    in_scope: false,
                    strictness: 3,
                    top_n_documents: 5,
                    role_information: fs
                        .readFileSync(path.join(__dirname, '../prompts/chat2/skprompt.txt'))
                        .toString('utf-8'),
                    authentication: {
                        type: 'api_key',
                        key: config.azureSearchKey
                    },
                }
            }
        ];
    }

    return prompt;
  }
});

// Define storage and application
const storage = new MemoryStorage();
const app = new Application({
  storage,
  ai: {
    planner,
    enable_feedback_loop: true
  },
});

app.message('reset', async (context, state) => {
  state.deleteConversationState();
  await context.sendActivity("Ok I've deleted the current conversation state.");
});

module.exports = app;

...

app.ai.action(AI.SayCommandActionName, async (context, state, data) => {   console.log(data);   return ''; });
I got the log:
{   type: 'SAY',   response: {     role: 'assistant',     content: 'PerksPlus is a benefits program offered by Contoso Electronics, aimed at supporting the health and wellness of employees. It allows employees to expense up to $1000 for various fitness-related activities, ranging from gym memberships and personal training sessions to virtual fitness programs and outdoor adventure activities such as rock climbing and kayaking [doc1]. Additionally, the program covers a variety of lessons that promote health and wellness, including skiing, scuba diving, and horseback riding lessons [doc1]. However, non-fitness-related expenses, medical treatments, and travel expenses unrelated to fitness programs are not covered [doc1].'   } }
I can not see any citations?

POST {endpoint}/openai/deployments/{deployment-id}/chat/completions?api-version={api-version}
I test the api url directly with the same data_sources parameters, and got the return json with citations:
{
"id": "46876dd4-c21d-4fc6-bc4c-2128d1eb3529",
"model": "gpt-4o",
"created":<PHONE_NUMBER>,
"object": "extensions.chat.completion",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "The PerksPlus program at Contoso Electronics is a comprehensive benefits initiative designed to support the health and wellness of employees. It allows employees to expense up to $1000 for fitness-related programs, making it easier and more affordable to maintain a healthy lifestyle. The program covers a wide range of fitness activities, including:\n\n- Gym memberships\n- Personal training sessions\n- Yoga and Pilates classes\n- Fitness equipment purchases\n- Sports team fees\n- Health retreats and spas\n- Outdoor adventure activities (such as rock climbing, hiking, and kayaking)\n- Group fitness classes (such as dance, martial arts, and cycling)\n- Virtual fitness programs (such as online yoga and workout classes)\n\nAdditionally, PerksPlus covers various lessons and experiences that promote health and wellness, such as:\n\n- Skiing and snowboarding lessons\n- Scuba diving lessons\n- Surfing lessons\n- Horseback riding lessons\n\nThese activities provide employees with opportunities to try new things, challenge themselves, and improve their physical skills, while also helping to relieve stress and have fun [doc1].\n\nHowever, the program does not cover non-fitness related expenses, medical treatments and procedures, travel expenses (unless related to a fitness program), or food and supplements [doc1].",
"end_turn": true,
"context": {
"citations": [
{
"content": "# Contoso Electronics PerksPlus Program\n\nDisclaimer: This document contains information generated using a language model (Azure OpenAI). The information contained in this document is only for demonstration purposes and does not reflect the opinions or beliefs of Microsoft. Microsoft makes no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the information contained in this document. All rights reserved to Microsoft.\n\n## Overview\nIntroducing PerksPlus - the ultimate benefits program designed to support the health and wellness of employees. With PerksPlus, employees have the opportunity to expense up to $1000 for fitness-related programs, making it easier and more affordable to maintain a healthy lifestyle. PerksPlus is not only designed to support employees' physical health, but also their mental health. Regular exercise has been shown to reduce stress, improve mood, and enhance overall well-being. With PerksPlus, employees can invest in their health and wellness, while enjoying the peace of mind that comes with knowing they are getting the support they need to lead a healthy life.\nWhat is Covered?\n\nPerksPlus covers a wide range of fitness activities, including but not limited to:\n* Gym memberships\n* Personal training sessions\n* Yoga and Pilates classes\n* Fitness equipment purchases\n* Sports team fees\n* Health retreats and spas\n* Outdoor adventure activities (such as rock climbing, hiking, and kayaking)\n* Group fitness classes (such as dance, martial arts, and cycling)\n* Virtual fitness programs (such as online yoga and workout classes)\n\nIn addition to the wide range of fitness activities covered by PerksPlus, the program also covers a variety of lessons and experiences that promote health and wellness. Some of the lessons covered under PerksPlus include:\n* Skiing and snowboarding lessons\n* Scuba diving lessons\n* Surfing lessons\n* Horseback riding lessons\n\nThese lessons provide employees with the opportunity to try new things, challenge themselves, and improve their physical skills. They are also a great way to relieve stress and have fun while staying active.\n\nWith PerksPlus, employees can choose from a variety of fitness programs to suit their individual needs and preferences. Whether you're looking to improve your physical fitness, reduce stress, or just have some fun, PerksPlus has you covered.\n\n## What is Not Covered?\nIn addition to the wide range of activities covered by PerksPlus, there is also a list of things that are not \ncovered under the program. These include but are not limited to:\n* Non-fitness related expenses\n* Medical treatments and procedures\n* Travel expenses (unless related to a fitness program)\n* Food and supplements",
"title": "Contoso Electronics_PerkPlus_Program.md",
"url": null,
"filepath": null,
"chunk_id": "0"
},
{
"content": "# Contoso Electronics Plan and Benefit Packages\n\nDisclaimer: This document contains information generated using a language model (Azure OpenAI). The information contained in this document is only for demonstration purposes and does not reflect the opinions or beliefs of Microsoft. Microsoft makes no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the information contained in this document. All rights reserved to Microsoft.\n\n## Northwind Health Plus\n\nNorthwind Health Plus is a comprehensive plan that provides comprehensive coverage for medical, vision, and dental services. This plan also offers prescription drug coverage, mental health and substance abuse coverage, and coverage for preventive care services. With Northwind Health Plus, you can choose from a variety of in-network providers, including primary care physicians, specialists, hospitals, and pharmacies. \n\nThis plan also offers coverage for emergency services, both in-network and out-of-network.\n\n## Northwind Standard\n\nNorthwind Standard is a basic plan that provides coverage for medical, vision, and dental services. This plan also offers coverage for preventive care services, as well as prescription drug coverage. With Northwind Standard, you can choose from a variety of in-network providers, including primary care physicians, specialists, hospitals, and pharmacies. This plan does not offer coverage for emergency services, mental health and substance abuse coverage, or out-of-network services.\n\n## Comparison of Plans\n\nBoth plans offer coverage for routine physicals, well-child visits, immunizations, and other preventive care services. The plans also cover preventive care services such as mammograms, colonoscopies, and other cancer screenings. \n\nNorthwind Health Plus offers more comprehensive coverage than Northwind Standard. This plan offers coverage for emergency services, both in-network and out-of-network, as well as mental health and substance abuse coverage. Northwind Standard does not offer coverage for emergency services, mental health and substance abuse coverage, or out-of-network services. \n\nBoth plans offer coverage for prescription drugs. Northwind Health Plus offers a wider range of prescription drug coverage than Northwind Standard. Northwind Health Plus covers generic, brand-name, and specialty drugs, while Northwind Standard only covers generic and brand-name drugs. \n\nBoth plans offer coverage for vision and dental services. Northwind Health Plus offers coverage for vision exams, glasses, and contact lenses, as well as dental exams, cleanings, and fillings. Northwind Standard only offers coverage for vision exams and glasses. \n\nBoth plans offer coverage for medical services. Northwind Health Plus offers coverage for hospital stays, doctor visits, lab tests, and X-rays. Northwind Standard only offers coverage for doctor visits and lab tests. \n\nNorthwind Health Plus is a comprehensive plan that offers more coverage than Northwind Standard. Northwind Health Plus offers coverage for emergency services, mental health and substance abuse coverage, and out-of-network services, while Northwind Standard does not. Northwind Health Plus also offers a wider range of prescription drug coverage than Northwind Standard. Both plans offer coverage for vision and dental services, as well as medical services.\n\n## Cost Comparison\n\nContoso Electronics deducts the employee's portion of the healthcare cost from each paycheck. This means that the cost of the health insurance will be spread out over the course of the year, rather than being paid in one lump sum. The employee's portion of the cost will be calculated based on the selected health plan and the number of people covered by the insurance. The table below shows a cost comparison between the different health plans offered by Contoso Electronics\n\n|  | Northwind Standard | NorthWind Health Plus |\n|---------------|----------|---------------------|\n| Employee Only      | $45.00  | $55.00 |\n| Employee +1        | $65.00  | $71.00 |\n| Employee +2 or more     | $78.00  | $89.00 |",
"title": "Contoso_Electronics_Plan_Benefits.md",
"url": null,
"filepath": null,
"chunk_id": "0"
},
{
"content": "# Contoso Electronics Company Overview\n\nDisclaimer: This document contains information generated using a language model (Azure OpenAI). The information contained in this document is only for demonstration purposes and does not reflect the opinions or beliefs of Microsoft. Microsoft makes no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the information contained in this document. All rights reserved to Microsoft.\n\n## History\n\nContoso Electronics, a pioneering force in the tech industry, was founded in 1985 by visionary entrepreneurs with a passion for innovation. Over the years, the company has played a pivotal role in shaping the landscape of consumer electronics.\n\n| Year | Milestone |\n|------|-----------|\n| 1985 | Company founded with a focus on cutting-edge technology |\n| 1990 | Launched the first-ever handheld personal computer |\n| 2000 | Introduced groundbreaking advancements in AI and robotics |\n| 2015 | Expansion into sustainable and eco-friendly product lines |\n\n## Company Overview\n\nAt Contoso Electronics, we take pride in fostering a dynamic and inclusive workplace. Our dedicated team of experts collaborates to create innovative solutions that empower and connect people globally.\n\n### Core Values\n\n- Innovation: Constantly pushing the boundaries of technology.\n- Diversity: Embracing different perspectives for creative excellence.\n- Sustainability: Committed to eco-friendly practices in our products.\n\n## Vacation Perks\n\nWe believe in work-life balance and understand the importance of well-deserved breaks. Our vacation perks are designed to help our employees recharge and return with renewed enthusiasm.\n\n| Vacation Tier | Duration | Additional Benefits |\n|---------------|----------|---------------------|\n| Standard      | 2 weeks  | Health and wellness stipend |\n| Senior        | 4 weeks  | Travel vouchers for a dream destination |\n| Executive     | 6 weeks  | Luxury resort getaway with family |\n\n## Employee Recognition\n\nRecognizing the hard work and dedication of our employees is at the core of our culture. Here are some ways we celebrate achievements:\n\n- Monthly "Innovator of the Month" awards\n- Annual gala with awards for outstanding contributions\n- Team-building retreats for high-performing departments\n\n## Join Us!\n\nContoso Electronics is always on the lookout for talented individuals who share our passion for innovation. If you're ready to be part of a dynamic team shaping the future of technology, check out our careers page for exciting opportunities.\n\nLearn more about Contoso Electronics!\n",
"title": "Contoso_Electronics_Company_Overview.md",
"url": null,
"filepath": null,
"chunk_id": "0"
}
],
"intent": "["PerksPlus program", "PerksPlus benefits", "What is PerksPlus?"]"
}
}
}
],
"usage": {
"prompt_tokens": 4217,
"completion_tokens": 270,
"total_tokens": 4487
},
"system_fingerprint": "fp_67802d9a6d"
}

I am having the exact same issue

My apologies for prematurely closing this issue. Thanks for your patience while I investigate. @yonggang-xiao or @fgodino-milu, would either of you be able to spin up a repo of 'minimum repro' of this scenario? There's quite a few paths to explore.
Also, does the OYD sample work for both of you? Or do you experience the same, citations not getting parsed?

I will spin up a repo this evening. The issue is happening with version 1.4.x, but working fine on 1.3.x. Thanks for looking it up

I change the version to 1.3.1, and update the SayCommand.js file with abstract: Utilities_1.Utilities.snippet(citation.content, 480), got the correct results:
CHAT PROMPT:
[
{
"role": "system",
"content": "The following is a conversation with an AI assistant, who is an expert on answering questions over the given context.\nResponses should be in a short journalistic style with no more than 80 words."
},
{
"role": "user",
"content": "tell me about PerksPlus"
}
]
CHAT RESPONSE:
status: 200
duration: 3946ms
{
"id": "09047ece-c27f-41a4-91c4-36b443255295",
"model": "gpt-4o",
"created":<PHONE_NUMBER>,
"object": "extensions.chat.completion",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "The PerksPlus program from Contoso Electronics is a benefits initiative aimed at supporting employees' health and wellness. It allows employees to expense up to $1000 for fitness-related activities like gym memberships, personal training, yoga classes, and even outdoor adventures such as rock climbing and kayaking [doc1]. Additionally, it covers lessons for activities like skiing, scuba diving, and horseback riding, providing opportunities for stress relief and physical fitness. Certain non-fitness-related expenses and medical treatments are excluded from coverage [doc1].",
"end_turn": true,
"context": {
"citations": [
{
"content": "# Contoso Electronics PerksPlus Program\n\nDisclaimer: This document contains information generated using a language model (Azure OpenAI). The information contained in this document is only for demonstration purposes and does not reflect the opinions or beliefs of Microsoft. Microsoft makes no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the information contained in this document. All rights reserved to Microsoft.\n\n## Overview\nIntroducing PerksPlus - the ultimate benefits program designed to support the health and wellness of employees. With PerksPlus, employees have the opportunity to expense up to $1000 for fitness-related programs, making it easier and more affordable to maintain a healthy lifestyle. PerksPlus is not only designed to support employees' physical health, but also their mental health. Regular exercise has been shown to reduce stress, improve mood, and enhance overall well-being. With PerksPlus, employees can invest in their health and wellness, while enjoying the peace of mind that comes with knowing they are getting the support they need to lead a healthy life.\nWhat is Covered?\n\nPerksPlus covers a wide range of fitness activities, including but not limited to:\n* Gym memberships\n* Personal training sessions\n* Yoga and Pilates classes\n* Fitness equipment purchases\n* Sports team fees\n* Health retreats and spas\n* Outdoor adventure activities (such as rock climbing, hiking, and kayaking)\n* Group fitness classes (such as dance, martial arts, and cycling)\n* Virtual fitness programs (such as online yoga and workout classes)\n\nIn addition to the wide range of fitness activities covered by PerksPlus, the program also covers a variety of lessons and experiences that promote health and wellness. Some of the lessons covered under PerksPlus include:\n* Skiing and snowboarding lessons\n* Scuba diving lessons\n* Surfing lessons\n* Horseback riding lessons\n\nThese lessons provide employees with the opportunity to try new things, challenge themselves, and improve their physical skills. They are also a great way to relieve stress and have fun while staying active.\n\nWith PerksPlus, employees can choose from a variety of fitness programs to suit their individual needs and preferences. Whether you're looking to improve your physical fitness, reduce stress, or just have some fun, PerksPlus has you covered.\n\n## What is Not Covered?\nIn addition to the wide range of activities covered by PerksPlus, there is also a list of things that are not \ncovered under the program. These include but are not limited to:\n* Non-fitness related expenses\n* Medical treatments and procedures\n* Travel expenses (unless related to a fitness program)\n* Food and supplements",
"title": "Contoso Electronics_PerkPlus_Program.md",
"url": null,
"filepath": null,
"chunk_id": "0"
},
{
"content": "# Contoso Electronics Company Overview\n\nDisclaimer: This document contains information generated using a language model (Azure OpenAI). The information contained in this document is only for demonstration purposes and does not reflect the opinions or beliefs of Microsoft. Microsoft makes no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the information contained in this document. All rights reserved to Microsoft.\n\n## History\n\nContoso Electronics, a pioneering force in the tech industry, was founded in 1985 by visionary entrepreneurs with a passion for innovation. Over the years, the company has played a pivotal role in shaping the landscape of consumer electronics.\n\n| Year | Milestone |\n|------|-----------|\n| 1985 | Company founded with a focus on cutting-edge technology |\n| 1990 | Launched the first-ever handheld personal computer |\n| 2000 | Introduced groundbreaking advancements in AI and robotics |\n| 2015 | Expansion into sustainable and eco-friendly product lines |\n\n## Company Overview\n\nAt Contoso Electronics, we take pride in fostering a dynamic and inclusive workplace. Our dedicated team of experts collaborates to create innovative solutions that empower and connect people globally.\n\n### Core Values\n\n- Innovation: Constantly pushing the boundaries of technology.\n- Diversity: Embracing different perspectives for creative excellence.\n- Sustainability: Committed to eco-friendly practices in our products.\n\n## Vacation Perks\n\nWe believe in work-life balance and understand the importance of well-deserved breaks. Our vacation perks are designed to help our employees recharge and return with renewed enthusiasm.\n\n| Vacation Tier | Duration | Additional Benefits |\n|---------------|----------|---------------------|\n| Standard      | 2 weeks  | Health and wellness stipend |\n| Senior        | 4 weeks  | Travel vouchers for a dream destination |\n| Executive     | 6 weeks  | Luxury resort getaway with family |\n\n## Employee Recognition\n\nRecognizing the hard work and dedication of our employees is at the core of our culture. Here are some ways we celebrate achievements:\n\n- Monthly "Innovator of the Month" awards\n- Annual gala with awards for outstanding contributions\n- Team-building retreats for high-performing departments\n\n## Join Us!\n\nContoso Electronics is always on the lookout for talented individuals who share our passion for innovation. If you're ready to be part of a dynamic team shaping the future of technology, check out our careers page for exciting opportunities.\n\nLearn more about Contoso Electronics!\n",
"title": "Contoso_Electronics_Company_Overview.md",
"url": null,
"filepath": null,
"chunk_id": "0"
},
{
"content": "# Contoso Electronics Plan and Benefit Packages\n\nDisclaimer: This document contains information generated using a language model (Azure OpenAI). The information contained in this document is only for demonstration purposes and does not reflect the opinions or beliefs of Microsoft. Microsoft makes no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the information contained in this document. All rights reserved to Microsoft.\n\n## Northwind Health Plus\n\nNorthwind Health Plus is a comprehensive plan that provides comprehensive coverage for medical, vision, and dental services. This plan also offers prescription drug coverage, mental health and substance abuse coverage, and coverage for preventive care services. With Northwind Health Plus, you can choose from a variety of in-network providers, including primary care physicians, specialists, hospitals, and pharmacies. \n\nThis plan also offers coverage for emergency services, both in-network and out-of-network.\n\n## Northwind Standard\n\nNorthwind Standard is a basic plan that provides coverage for medical, vision, and dental services. This plan also offers coverage for preventive care services, as well as prescription drug coverage. With Northwind Standard, you can choose from a variety of in-network providers, including primary care physicians, specialists, hospitals, and pharmacies. This plan does not offer coverage for emergency services, mental health and substance abuse coverage, or out-of-network services.\n\n## Comparison of Plans\n\nBoth plans offer coverage for routine physicals, well-child visits, immunizations, and other preventive care services. The plans also cover preventive care services such as mammograms, colonoscopies, and other cancer screenings. \n\nNorthwind Health Plus offers more comprehensive coverage than Northwind Standard. This plan offers coverage for emergency services, both in-network and out-of-network, as well as mental health and substance abuse coverage. Northwind Standard does not offer coverage for emergency services, mental health and substance abuse coverage, or out-of-network services. \n\nBoth plans offer coverage for prescription drugs. Northwind Health Plus offers a wider range of prescription drug coverage than Northwind Standard. Northwind Health Plus covers generic, brand-name, and specialty drugs, while Northwind Standard only covers generic and brand-name drugs. \n\nBoth plans offer coverage for vision and dental services. Northwind Health Plus offers coverage for vision exams, glasses, and contact lenses, as well as dental exams, cleanings, and fillings. Northwind Standard only offers coverage for vision exams and glasses. \n\nBoth plans offer coverage for medical services. Northwind Health Plus offers coverage for hospital stays, doctor visits, lab tests, and X-rays. Northwind Standard only offers coverage for doctor visits and lab tests. \n\nNorthwind Health Plus is a comprehensive plan that offers more coverage than Northwind Standard. Northwind Health Plus offers coverage for emergency services, mental health and substance abuse coverage, and out-of-network services, while Northwind Standard does not. Northwind Health Plus also offers a wider range of prescription drug coverage than Northwind Standard. Both plans offer coverage for vision and dental services, as well as medical services.\n\n## Cost Comparison\n\nContoso Electronics deducts the employee's portion of the healthcare cost from each paycheck. This means that the cost of the health insurance will be spread out over the course of the year, rather than being paid in one lump sum. The employee's portion of the cost will be calculated based on the selected health plan and the number of people covered by the insurance. The table below shows a cost comparison between the different health plans offered by Contoso Electronics\n\n|  | Northwind Standard | NorthWind Health Plus |\n|---------------|----------|---------------------|\n| Employee Only      | $45.00  | $55.00 |\n| Employee +1        | $65.00  | $71.00 |\n| Employee +2 or more     | $78.00  | $89.00 |",
"title": "Contoso_Electronics_Plan_Benefits.md",
"url": null,
"filepath": null,
"chunk_id": "0"
}
],
"intent": "["PerksPlus", "What is PerksPlus?", "PerksPlus benefits and features"]"
}
}
}
],
"usage": {
"prompt_tokens": 4632,
"completion_tokens": 123,
"total_tokens": 4755
},
"system_fingerprint": "fp_67802d9a6d"
}

@corinagum using 1.5.1, somehow, there are no more citations in the answer (it shows [doc 1], [doc 2], etc. but no citations are displayed for those), and using 1.3.1, there is the #2080 bug. Any suggestions on a workaround?

@yonggang-xiao I just released version 1.5.3 which includes the citation fixes. Could you please bump that package (and openai to 4.68.2) to verify the fix applies to your case as well? Thank you!


phraze: init at 0.3.11

Description of changes
Adding phraze, a passphrase generation utility written in Rust:
https://github.com/sts10/phraze
Things done

Built on platform(s)

[x] x86_64-linux
[x] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
No, but false, relaxed, and true all work.
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Squash the commits and reword them according to contributing guidelines.

Feel free to ping me for merge once ofborg is done

Feel free to ping me for merge once ofborg is done

I will likely be asleep, will ping in the morning if it’s not merged. I’m not in any rush, so no pressure.

how come cargoHash changed ? between force pushes

how come cargoHash changed ? between force pushes

I don’t believe I properly changed them after the move to 0.3.11, and ofBorg had some failures on it that I didn’t notice. I believe the cargoHash and source hash should be correct now.

Phraze creator here. Very flattered by the idea that it's being packaged here! Apologies for the short amount of time between releases v0.3.10 and v0.3.11 -- I'll try to be more patient going forward.
Please let me know (a) if there's anything I can do to help this packaging process (though it looks to be close to done?) and/or (b) what installation instructions I might include in the Phraze README for Nix users (I'm not a Nix user myself).

Built and tested the tool on x86_64 nixos. I think the current cargoHash is correct

@sts10 I don't think you need to worry too much about release speed. We're sitting on entire ecosystems worth of packages, many of which takes a lot more effort to update due to complicated build instructions and a ton of dependencies. I'd say feel free to go at your own pace without worrying about nixpkgs, but I guess it would affect x123 more as the package maintainer and the users waiting for updates more than it affects me, so prefer their opinion over mine.
The installation instructions are a bit complicated. In contrast to lots of other package managers, nix doesn't really promote installing stuff in the global environment (with the command nix-env -iA <package-name>). It's usually recommended to use the packages through either a nixos/darwin/home-manager configuration, or through a nix-shell (or similar nix-based development environments). However, most nix users are already aware of this, so they will probably install it as they see fit and ignore the command. Maybe it would be best to link to the package through a repology badge or something similar?

@sts10 no worries about release speed, as this particular package is quite simple and will likely just need the version and hashes updated on each new release. I can also help in the coming days with a pull request to your README with very simple nix usage instructions.


Pause Match Driver feature

@jkbits1 See new USER STORY 016
I'll have the procedure ready soon.
And I need to update a few e-mail notifications to include the new link

New procedure is in carpool_v2.0_test and carpool_v2.0_live databases

@dmilet is this is supported now by the db? it is built into the node app and the self service page. if so, we can close this issue

carpoolvote.driver_pause_match(UUID, phone number or lastname ?, OUT out_error_code INTEGER, OUT out_error_text TEXT)
Closing issue


Add NeuroBind for NeuroPage.

Will have to add a NeuroPage event when a page index, size, or count changes.

Added commit to angular binding:
https://github.com/ClickerMonkey/neurosync-angular/commit/9dfc34f739e3b1d022a6ae03926f5169e178c620


Missing Web api

Original API abstract definition:
r.Get("/", hello)
r.Get("/logs", getLogs)
r.Get("/traffic", traffic)
r.Get("/memory", memory)
r.Get("/version", version)
r.Get("/configs", getConfigs)
r.Put("/configs", updateConfigs)
r.Post("/configs/geo", updateGeoDatabases)
r.Patch("/configs", patchConfigs)
r.Get("/proxies", getProxies)
r.Get("/proxies/{name}", getProxy)
r.Get("/proxies/{name}/delay", getProxyDelay)
r.Put("/proxies/{name}", updateProxy)
r.Get("/group", getGroups)
r.Get("/group/{name}", getGroup)
r.Get("/group/{name}/delay", getGroupDelay)
r.Get("/rules", getRules)
r.Get("/connections", getConnections)
r.Delete("/connections", closeAllConnections)
r.Delete("/connections/{id}", closeConnection)
r.Get("/providers/proxies", getProviders)
r.Get("/providers/proxies/{providerName}", getProvider)
r.Put("/providers/proxies/{providerName}", updateProvider)
r.Get("/providers/proxies/{providerName}/healthcheck", healthCheckProvider)
r.Get("/providers/proxies/{providerName}/{name}", getProxy)
r.Get("/providers/proxies/{providerName}/{name}/healthcheck", getProxyDelay)
r.Get("/providers/rules", getRuleProviders)
r.Put("/providers/rules/{name}", updateRuleProvider)
r.Post("/cache/fakeip/flush", flushFakeIPPool)
r.Get("/dns/query", queryDNS)
r.Post("/restart", restart)
r.Post("/upgrade", upgradeCore)
r.Post("/upgrade/ui", updateUI)

These api impl are missing:

Get /memory
POST /configs/geo
/group group
/cache group
/restart group
/providers/rules group
GET /dns/dns should be rename to /dns/query https://github.com/Watfaq/clash-rs/blob/6a8db701edefe091b1a41a7bf8c8791604ceb816/clash_lib/src/app/api/handlers/dns.rs#L17
/upgrade group

are some of these from the premium core? i don't remember seeing all of them from the open sourced clash snapshot

are some of these from the premium core? i don't remember seeing all of them from the open sourced clash snapshot
You reminded me that indeed Clash Core is missing these interfaces. they are premium and meta only.

are any of these critical to the clash-verge? i guess we can start adding those required ones and have it run in degraded until all get implemented

are any of these critical to the clash-verge? i guess we can start adding those required ones and have it run in degraded until all get implemented

I should confirm it later.
and /providers/rules breaks yacd webui, ref https://github.com/haishanh/yacd/blob/master/src/api/rule-provider.ts

Nyanpasu have supported to manage rules providers since https://github.com/keiko233/clash-nyanpasu/pull/155.
And as user's feedback, it seems that the PUT /config interface, which is incompatible with normal clash. https://github.com/keiko233/clash-nyanpasu/issues/107

thanks for the reporting.
that API wasn't implemented https://github.com/Watfaq/clash-rs/blob/4dd786dd85e6993352333086e1df4030e013011c/clash_lib/src/app/api/handlers/config.rs#L78
I can have a look after finishing the current wireguard part


Add PathInitializer to mc-sgx-dcap-ql

Add a PathInitializer struct to mc-sgx-dcap-ql to ensure that the
necessary DCAP quote library paths are set prior to making quote library
calls.  As well as ensuring that the paths are only initialized once.

Current dependencies on/for this PR:

main

PR #158

PR #159

PR #163

PR #164

PR #165

PR #166   👈

This comment was auto-generated by Graphite.

Codecov Report

Merging #166 (b613e9b) into feature/sealing_parameter_validation (b001476) will increase coverage by 0.45%.
The diff coverage is 94.77%.

@@                           Coverage Diff                            @@
##           feature/sealing_parameter_validation     #166      +/-   ##
========================================================================
+ Coverage                                 86.94%   87.39%   +0.45%
========================================================================
  Files                                        41       41
  Lines                                      2244     2364     +120
========================================================================
+ Hits                                       1951     2066     +115
- Misses                                      293      298       +5

Impacted Files
Coverage Δ

dcap/ql/src/quote3.rs
0.00% <0.00%> (ø)

dcap/ql/src/quote_enclave.rs
94.56% <95.34%> (+1.91%)
:arrow_up:

dcap/ql/src/lib.rs
100.00% <100.00%> (ø)

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


User guide - old reffs

It's any chance to talk to ellislab to make an redirect from https://ellislab.com/codeigniter/user-guide/ to the updated codeigniter user guide?
It's always appear in google as 1 result. This can be tricky sometimes for new users.

Raise this on the forums please, this isn't the right place.


Fists of Fury proc behaviour

Fists of Fury seems broken in the simulation.
Here's how Fists of Fury works:

When you hit an enemy, you apply a DoT that ticks every 12 frames for a total of 179 frames on the target. Every DoT tick ticks with the same proc coefficient as the hit you applied the DoT with.
Hitting a target again refreshes the DoT, but does not change the DoT proc coefficient. It also adds a stack to the DoT, but does not make the DoT tick more often for damage.
The damage of the FoF DoT is 4% holy damage * FoF-stacks, but this damage  is limited to 9 * Sheet APS * 4% holy damage (this can be a fractional value). This damage cap is snapshotted when the DoT is first applied.

Oh thanks for the info I'll try to fix that, does the second hit add 7 stacks then?

Yes, it does.

Fixed with commit 3fa9ee196db0b26fe5034daf03dcf2d7cc0fc169

It seems to already have worked very similarly, except it only added one stack with the second hit, and had a cap on stacks instead of capping damage (which means the cap was always rounded).


ManyToOne in composite primary key does not work if referenced entity also uses a composite key

Describe the bug
An entity that includes a @ManyToOne property in its primary key cannot be hydrated if the many-to-one reference points to another entity that uses a composite key.
Stack trace
TypeError: Cannot read property 'id' of undefined
    at <project>\node_modules\@mikro-orm\core\utils\Utils.js:387:63
    at Array.map (<anonymous>)
    at Function.getOrderedPrimaryKeys (<project>\node_modules\@mikro-orm\core\utils\Utils.js:384:33)
    at <project>\node_modules\@mikro-orm\core\utils\Utils.js:389:37
    at Array.map (<anonymous>)
    at Function.getOrderedPrimaryKeys (<project>\node_modules\@mikro-orm\core\utils\Utils.js:384:33)
    at <project>\node_modules\@mikro-orm\core\utils\Utils.js:389:37
    at Array.map (<anonymous>)
    at Function.getOrderedPrimaryKeys (<project>\node_modules\@mikro-orm\core\utils\Utils.js:384:33)
    at EntityFactory.createReference (<project>\node_modules\@mikro-orm\core\entity\EntityFactory.js:53:35)
    at eval (eval at createFunction (<project>\node_modules\@mikro-orm\core\utils\Utils.js:612:20), <anonymous>:102:37)
    at Function.callCompiledFunction (<project>\node_modules\@mikro-orm\core\utils\Utils.js:623:20)
    at ObjectHydrator.hydrate (<project>\node_modules\@mikro-orm\core\hydration\ObjectHydrator.js:24:23)
    at EntityFactory.hydrate (<project>\node_modules\@mikro-orm\core\entity\EntityFactory.js:82:27)
    at EntityFactory.create (<project>\node_modules\@mikro-orm\core\entity\EntityFactory.js:36:14)
    at SqlEntityManager.find (<project>\node_modules\@mikro-orm\core\EntityManager.js:100:52)

To Reproduce
Steps to reproduce the behavior:

Define an entity relationship as follows:@Entity()
export class A extends BaseEntity {
  @PrimaryKey()
  id: string;
}

@Entity()
export class B extends BaseEntity {
  @PrimaryKey()
  id: string;
}

@Entity()
export class C extends BaseEntity {
  @PrimaryKey()
  id: string;
}

@Entity()
export class AB extends BaseEntity {
  @ManyToOne(() => A, { eager: true, primary: true })
  a: A;

  @ManyToOne(() => B, { eager: true, primary: true })
  b: B;
}

@Entity()
export class CAB extends BaseEntity {
  @ManyToOne(() => C, { eager: true, primary: true })
  c: C;

  @ManyToOne(() => AB, { eager: true, primary: true })
  ab: AB;
}

Create and persist one of each entity.
Execute await em.find(CAB, {})

Expected behavior
Currently, metadata discovery will determine the primary keys of CAB are ["c", "ab"]. When EntityFactory..createReference is called during hydration, it receives a composite key of something like ["<c.id>", "<a.id>", "<b.id>"], which isn't properly handled by Utils.getPrimaryKeyCondFromArray or Utils.getOrderedPrimaryKeys.
I would expect createReference to be more thorough about expanding composite keys in the same way that filters, joins, and inserts do, without resulting in an exception.
Versions

Dependency
Version

node
v16.6.2

typescript
^4.5.4

mikro-orm
^4.5.9

your-driver
<EMAIL_ADDRESS>

Please provide reproduction as code, ideally as a test case. Entity definition looks good, but I can easily imagine you oversimplified it. Also have you tried it without eager: true?
What does ^4.5.9 mean? are you on 4.5.9 or 4.5.10? You should put actual versions you use in there. If you are not using 4.5.10, then upgrade, there were tons of bug fixes. Ideally go for v5, as there are even more fixes (and v5 is pretty much ready to be used, just need to polish the docs and do few minor changes).

Currently, metadata discovery will determine the primary keys of CAB are ["c", "ab"]

The PKs are c and ab - those are property names, not database columns. This works correctly.

When EntityFactory.createReference is called during hydration, it receives a composite key of something like ["<c.id>", "<a.id>", "<b.id>"],

That sounds a bit wrong, maybe that's where the bug is, createReference should be again getting property names, not column names.

Also have you tried it without eager: true?

I will check, but I don't think changing it has any effect.

What does ^4.5.9 mean? are you on 4.5.9 or 4.5.10? You should put actual versions you use in there. If you are not using 4.5.10, then upgrade, there were tons of bug fixes. Ideally go for v5, as there are even more fixes (and v5 is pretty much ready to be used, just need to polish the docs and do few minor changes).

I'm sorry, I should have written 4.5.9.

When EntityFactory.createReference is called during hydration, it receives a composite key of something like ["<c.id>", "<a.id>", "<b.id>"],

That sounds a bit wrong, maybe that's where the bug is, createReference should be again getting property names, not column names.

I apologize for the confusion. by <c.id> I meant "whatever value you used for the id of c", so the composite key might be something like ["3", "1", "2"] if a.id === "1", b.id === "2", and c.id === "3".
I'll amend my issue with an example test case shortly.

I'm running into the same issue in 5.0.0, and I'm working on a more comprehensive test case to illustrate the issue.
As part of my investigation, I'm also finding that there's an issue in CriteriaNode when there is a nested composite key. In the constructor it calls Utils.splitPrimaryKeys(key).forEach and then sets this.prop = meta.props.find(...). This results in a criteria node whose prop is only one of the multiple properties associated with a composite key. This results in an invalid SQL query:
DriverException: select `s0`.* from `cab` as `s0` where (`s0`.`ab_a_id`, `s0`.`ab_b_id`) in
( values ('933569619573211136', '874812707751215184', '846302692724047893')) order by `s0`.`ab_a_id` asc,
`s0`.`ab_b_id` asc - SQLITE_ERROR: sub-select returns 3 columns - expected 2

Here, the composite key contains three values:
[
  '933569619573211136', // the value of `cab.c.id` in entity (`c_id` in table)
  '874812707751215184', // the value of `cab.ab.a.id` in entity (`ab_a_id` in table)
  '846302692724047893'  // the value of `cab.ab.b.id` in entity (`ab_b_id` in table)
]

In constructor, key is c~~~ab, so Utils.splitPrimaryKeys(key).forEach invokes the callback twice:

Sets this.prop to the property metadata for c
Overwrites this.prop to the property metadata for ab

When the query is constructed, there doesn't seem to be any reference to c so its not added to the resulting SQL.

Closing as not reproducible, will reopen if you provide failing repro.

I was able to repro this with this test:
import { Entity, ManyToOne, MikroORM, PrimaryKey } from '@mikro-orm/core';

@Entity()
export class A {
    @PrimaryKey()
    id: number;

    constructor(id: number) {
        this.id = id;
    }
}

@Entity()
export class B {
    @PrimaryKey()
    id: number;

    constructor(id: number) {
        this.id = id;
    }
}

@Entity()
export class C {
    @PrimaryKey()
    id: number;

    constructor(id: number) {
        this.id = id;
    }
}

@Entity()
export class D {
    @PrimaryKey()
    id: number;

    constructor(id: number) {
        this.id = id;
    }
}

@Entity()
export class AB {
    @ManyToOne(() => A, { eager: true, primary: true })
    a: A;

    @ManyToOne(() => B, { eager: true, primary: true })
    b: B;

    constructor(a: A, b: B) {
        this.a = a;
        this.b = b;
    }
}

@Entity()
export class CAB {
    @ManyToOne(() => C, { eager: true, primary: true })
    c: C;

    @ManyToOne(() => AB, { eager: true, primary: true })
    ab: AB;

    constructor(c: C, ab: AB) {
        this.c = c;
        this.ab = ab;
    }
}

@Entity()
export class DCAB {
    @ManyToOne(() => D, { eager: true, primary: true })
    d: D;

    @ManyToOne(() => CAB, { eager: true, primary: true })
    cab: CAB;

    constructor(d: D, cab: CAB) {
        this.d = d;
        this.cab = cab;
    }
}

describe('GH #2647', () => {
    let orm: MikroORM;

    beforeAll(async () => {
        orm = await MikroORM.init({
            entities: [A, B, C, D, AB, CAB, DCAB],
            dbName: `:memory:`,
            type: 'sqlite'
        });
        await orm.getSchemaGenerator().createSchema();
    });

    afterAll(async () => {
        await orm.close(true);
    });

    it('should be able to find entity with nested composite key', async () => {
        await orm.em.nativeDelete(DCAB, {});
        await orm.em.nativeDelete(CAB, {});
        await orm.em.nativeDelete(AB, {});
        await orm.em.nativeDelete(D, {});
        await orm.em.nativeDelete(C, {});
        await orm.em.nativeDelete(B, {});
        await orm.em.nativeDelete(A, {});

        const a = new A(1);
        const b = new B(2);
        const c = new C(3);
        const d = new D(4);
        const ab = new AB(a, b);
        const cab = new CAB(c, ab);
        const dcab = new DCAB(d, cab);

        await orm.em.persistAndFlush([a, b, c, d, ab, cab, dcab]);
        orm.em.clear();

        const res = await orm.em.find(DCAB, { d, cab });
        expect(res).toHaveLength(1);
    });
});

Thanks, will look into!

Oh damn, this is very complex, every issue I fix leads to something else.

I'm not quite sure this is fully resolved, as I'm getting the following error in 5.0.1-dev.23:
DriverException: Expected 3 bindings, saw 2
     at SqliteExceptionConverter.convertException (C:\dev\project\node_modules\@mikro-orm\core\dist\platforms\ExceptionConverter.js:8:16)
     at SqliteExceptionConverter.convertException (C:\dev\project\node_modules\@mikro-orm\sqlite\dist\SqliteExceptionConverter.js:46:22)
     at SqliteDriver.convertException (C:\dev\project\node_modules\@mikro-orm\core\dist\drivers\DatabaseDriver.js:180:54)
     at C:\dev\project\node_modules\@mikro-orm\core\dist\drivers\DatabaseDriver.js:184:24
     at async SqliteDriver.find (C:\dev\project\node_modules\@mikro-orm\sqlite\node_modules\@mikro-orm\knex\dist\AbstractSqlDriver.js:46:24)
     at async SqliteDriver.findOne (C:\dev\project\node_modules\@mikro-orm\sqlite\node_modules\@mikro-orm\knex\dist\AbstractSqlDriver.js:60:21)
     at async SqlEntityManager.findOne (C:\dev\project\node_modules\@mikro-orm\core\dist\EntityManager.js:282:22)
     at async WrappedEntity.init (C:\dev\project\node_modules\@mikro-orm\core\dist\entity\WrappedEntity.js:55:9)
     at async Reference.load (C:\dev\project\node_modules\@mikro-orm\core\dist\entity\Reference.js:66:13)
     at SessionLogic._SessionLogic_updateDeviceControlMessage (C:\dev\project\src\logic\sessionLogic.ts:536:84)

 previous Error: Expected 3 bindings, saw 2
     at replaceRawArrBindings (C:\dev\project\node_modules\@mikro-orm\sqlite\node_modules\knex\lib\formatter\rawFormatter.js:27:11)
     at Raw.toSQL (C:\dev\project\node_modules\@mikro-orm\sqlite\node_modules\knex\lib\raw.js:77:13)
     at unwrapRaw (C:\dev\project\node_modules\@mikro-orm\sqlite\node_modules\knex\lib\formatter\wrappingFormatter.js:116:19)
     at Client_SQLite3.parameter (C:\dev\project\node_modules\@mikro-orm\sqlite\node_modules\knex\lib\client.js:384:12)
     at Client_SQLite3.values (C:\dev\project\node_modules\@mikro-orm\sqlite\node_modules\knex\lib\dialects\sqlite3\index.js:219:23)
     at QueryCompiler_SQLite3.whereIn (C:\dev\project\node_modules\@mikro-orm\sqlite\node_modules\knex\lib\query\querycompiler.js:950:32)
     at QueryCompiler_SQLite3.where (C:\dev\project\node_modules\@mikro-orm\sqlite\node_modules\knex\lib\query\querycompiler.js:521:34)
     at C:\dev\project\node_modules\@mikro-orm\sqlite\node_modules\knex\lib\query\querycompiler.js:127:69
     at Array.map (<anonymous>)
     at QueryCompiler_SQLite3.select (C:\dev\project\node_modules\@mikro-orm\sqlite\node_modules\knex\lib\query\querycompiler.js:127:35)

If I set a breakpoint on rawFormatter.js:27 I see the following:

Variable sql has the string values (?, ?) (i.e., expecting two bindings)
Variable values (from raw.bindings) has the value: ['933569619573211136', '874812707751215184', '846302692724047893'] (three bindings)

If this isn't showing up in the test for this, I'll see if I can put together a test that triggers this behavior.

Thanks for debugging, but I really need to see reproductions first.

Repro (tested locally in the mikro-orm codebase):
import { Entity, ManyToOne, MikroORM, PrimaryKey } from '@mikro-orm/core';

@Entity()
export class Provider {

  @PrimaryKey()
  id: number;

  constructor(id: number) {
    this.id = id;
  }
}

@Entity()
export class User {

  @PrimaryKey()
  id: number;

  constructor(id: number) {
    this.id = id;
  }

}

@Entity()
export class Member {

  @ManyToOne(() => Provider, { eager: true, primary: true })
  provider: Provider;

  @ManyToOne(() => User, { eager: true, primary: true })
  user: User;

  constructor(a: Provider, b: User) {
    this.provider = a;
    this.user = b;
  }

}

@Entity()
export class Session {

  @PrimaryKey()
  id: number;

  @ManyToOne(() => Member, { eager: true })
  owner: Member;

  @ManyToOne(() => Participant, { nullable: true, default: null, eager: true })
  lastActionBy: Participant | null = null;

  constructor(id: number, owner: Member) {
    this.id = id;
    this.owner = owner;
  }

}

@Entity()
export class Participant {

  @ManyToOne(() => Session, { eager: true, primary: true })
  session: Session;

  @ManyToOne(() => Member, { eager: true, primary: true })
  member: Member;

  constructor(session: Session, member: Member) {
    this.session = session;
    this.member = member;
  }

}

describe('GH #2647-2', () => {

  let orm: MikroORM;

  beforeAll(async () => {
    orm = await MikroORM.init({
      entities: [Provider, User, Member, Session, Participant],
      dbName: `:memory:`,
      type: 'sqlite',
      // NOTE: this just shows the query is executed repeatedly
      debug: true
    });
    await orm.getSchemaGenerator().createSchema();
  });

  afterAll(async () => {
    await orm.close(true);
  });

  beforeEach(async () => {
    await orm.em.nativeDelete(Participant, {});
    await orm.em.nativeDelete(Member, {});
    await orm.em.nativeDelete(Session, {});
    await orm.em.nativeDelete(User, {});
    await orm.em.nativeDelete(Provider, {});
  });

  function createEntities(pks: [providerId: number, userId: number, sessionId: number]) {
    const provider = new Provider(pks[0]);
    const user = new User(pks[1]);
    const member = new Member(provider, user);
    const session = new Session(pks[2], member);
    const participant = new Participant(session, member);
    session.lastActionBy = participant;
    orm.em.persist([provider, user, member, session, participant]);

    return { provider, user, member, session, participant };
  }

  it('should be able to populate circularity', async () => {
    const { session, member } = createEntities([1, 2, 3]);
    await orm.em.flush();
    orm.em.clear();

    // this results in infinite recursion until memory is exhausted
    const res = await orm.em.find(Participant, { session, member });
    expect(res).toHaveLength(1);
  });
});


[BUG]: CSI-Powerstore: Update the upgrade procedure

Bug Description
In the Powerstore driver helm upgrade procedure under steps, the 5th and 6th points are not working as expected.
unable to find the values file.
Logs
N/A
Screenshots
No response
Additional Environment Information
No response
Steps to Reproduce

Expected Behavior
We have to add the full path of the values file form the current directory.
CSM Driver(s)
CSI Driver for Powerstore
Installation Type
Helm Upgrade
Container Storage Modules Enabled
No response
Container Orchestrator
Kubernetes 1.24
Operating System
RHEL 8.5

Changes merged to Csm-docs.


showPromotionDialog prop not working as expected

The promotion dialog pops up even after setting it to false.  showPromotionDialog={false}

https://github.com/Clariity/react-chessboard/issues/79#issuecomment-1600479570


XML parser accepts invalid entities

According to the XML specs entities need to be registered, e.g. this is not valid XML:
<?xml version="1.0" encoding="UTF-8"?>
<SomeData>
	<Data>©</Data>
</SomeData>

You have to register these entities:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE SomeData[
	<!ENTITY copy "©;">
]>
<SomeData>
	<Data>©</Data>
</SomeData>

U8XmlParser is designed to read all correct xml, but it is not designed to always output an error for wrong xml. This design is for speed of execution and will not be changed in the future.
If you need proper handling of wrong xml, we recommend you to use other parsers.


Can't build crates that need to download C/C++ dependencies from github

Crate name
molar_powersasa, molar_gromacs
Build failure link
https://docs.rs/crate/molar_powersasa/0.1.2/builds/1156669
Additional details
These crates are wrappers over C/C++ code that is built with CMake. CMake fetches C++ libraries (such as Eigen) from github on the configuration stage. Since docs.rs docker containers have no access to the network the build fails.

Hello,
we won't allow network access in the build for security reasons, so you'll have to find another solution.
Typically folks do:

vendor the needed header or library files
use conditional compilation to detect docs.rs, and run a build that doesn't need this dependency. Often the docs don't actually need it.


fix: typo in README.md and its template file.

I found a missing link for CONTRIBUTING.md in the README and its template.

Thanks@


[Bug]

Summary
A clear and concise description of what the bug is, and what you expected to happen.
How to reproduce

Go to '...'
Click on '...'
Scroll down to '...'
See error

Please include screenshots.
Additional context
Add any other context about the problem here.

I'm sorry, not sure what issue you're referring to. I've just reset all devices after the google wksp malware. ALL of my accounts and passwords were breached and I've lost all gmail accts as well as having my duckmail address changed with a new email name and log in. In other words, I'm being spoofed by a group on all unsecured sites. Duckmail was one. My entire acct was used to send fake emails with links from my contacts. I'm on ios only, user is on Windows and an OS.
pleasr refer to incident (bug) that was asked. I have been unable to secure Duck after numerous attempts. I am not that 'I' sent a bug report. Thanks.
On Tue, Apr 23, 2024 at 10:11 PM, หัวดิส @.***(mailto:On Tue, Apr 23, 2024 at 10:11 PM, หัวดิส < wrote:

Summary
A clear and concise description of what the bug is, and what you expected to happen.
How to reproduce

Go to '...'
Click on '...'
Scroll down to '...'
See error

Please include screenshots.
Additional context
Add any other context about the problem here.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: @.***>


A Tufte Inspired Manuscript extension

Link to suggestion
https://github.com/fredguth/tufte-inspired
Targeted section
Extensions
Describe your suggestion
A Tufte inspired manuscript extension with Typst and Html formats
Checklist

[X] checked if your suggestion is not already listed in Awesome Quarto list.
[X] checked if it can fit in an existed section or suggest a new section and explain why your item does not fit into one and what would be the interest of your new section.
[X] checked when it's a repository if it's maintained (archived repository will be rejected).

Thanks.
The list no longer takes extensions, but you can submit to https://github.com/mcanouil/quarto-extensions which is referenced in the list.


[TE] Set up ThirdEye swagger UI and add API documentations

Set up swagger UI to allow user to easily visualize and interact with ThirdEye API's resources

Add swagger documentations for some endpoints

This is awesome!. Do we have a documentation on API's?

Thank you. I've written documentation to some of theAPIs. With swagger, we can write more later.


Success percentage shown for tests are not correct.

Description:
Currently we are calculating success percentage as;
this.successPercentage = (double) totalSuccess / ((double) totalSuccess + (double) totalFail) * 100d;
AFAIU We should consider total tests run for the denominator.

Suggested Labels:
Bug

Suggested Assignees:

Affected Product Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:

@pasindujw yes, true. I guess we did it this way because there skipped tests as well. We need to capture skipped tests across the board in testgrid. So, let's keep this in mind, and address this when we get to introducing support for skipped tests.


calculate EER using pretrained model-verification

Hi Team ,
How to calculate eer using pretrained model (ecapa-tdnn) on my own audio dataset(eg diff dataset like librispeech)?
How to use scripts and Please provide me the steps taken to achieve this and evaluate EER  using your pretrained model.?
What are changes required and which script i have to use?

@utkarsh-tyagi you can use this script to calculate the EER for the ecapa-tdnn model model:
recipes/VoxCeleb/SpeakerRec/speaker_verification_cosine.py


coupled_kl_divergence_norm off by orders of 2 to 3 magnitudes

When I use tf.math to calculate kl divergence:
        logpz = self.log_normal_pdf(z_sample, 0., 1.)
        logqz_x = self.log_normal_pdf(z_sample, mean, logvar)
        kl_div = logqz_x - logpz

I get the following numbers, averaging to 0.26684278.
ipdb> kl_div
<tf.Tensor: shape=(128,), dtype=float32, numpy=
array([ 0.86921954,  0.45371056,  0.88609505, -0.01174855,  0.46242428,
        0.88558793,  0.9410727 , -0.3700683 ,  0.84306717, -0.06638861,
        0.37066197,  0.45233607,  0.8508425 ,  0.52803755,  0.9505639 ,
       -0.3642335 ,  0.38080645,  0.9970349 , -0.27189922,  0.97796655,
        0.95682573, -0.32304716, -0.813817  , -0.30250955,  0.6030083 ,
        0.75281763, -1.2111926 , -0.7194972 ,  0.2248416 , -0.5922799 ,
       -0.16742158,  0.05214858, -0.53073287,  0.548347  ,  0.6337991 ,
       -0.40753698,  0.864239  , -1.0780277 ,  0.7774732 ,  0.6771748 ,
        0.80476236, -0.46709728, -1.0554905 ,  0.37865567,  0.7497237 ,
        0.33856797,  0.81753445,  0.8892932 ,  0.3270316 , -1.6759243 ,
        0.4765191 ,  0.64577174,  0.25702858,  0.26793242,  0.8592057 ,
        0.7047727 ,  0.9932246 , -1.3861675 ,  0.10657287,  0.52103424,
        0.56670666,  0.63626647,  0.5903802 , -1.5752082 ,  0.23447895,
       -2.8028917 ,  0.61361504,  0.32030725,  0.77301764, -0.25954676,
       -0.19354391,  0.91773224,  0.4544549 ,  0.6440444 ,  0.9674704 ,
       -0.13501692, -0.4141333 , -0.14588952,  0.07112408,  0.96379423,
        0.96018887, -0.28566027,  0.45304155,  0.64666224,  0.5147927 ,
        0.460351  , -0.42211604,  0.88477373,  0.41102314,  0.663666  ,
        0.86534095,  0.9025917 ,  0.46783733,  0.47456598,  0.71588826,
        0.99136996,  0.08168316,  0.95838964,  0.9762056 , -0.6931119 ,
        0.39269042,  0.7297759 ,  0.70975566,  0.9976181 ,  0.1633246 ,
        0.8174796 ,  0.9928291 ,  0.6770606 ,  0.64429426, -0.60490847,
        0.63297606, -0.11669183,  0.78825736,  0.90766   , -0.7307825 ,
        0.9038205 ,  0.05003333,  0.89798975,  0.58409166, -0.593915  ,
        0.1855967 , -0.3870778 ,  0.96894336,  0.33893538, -0.7414057 ,
        0.6335244 , -2.4104114 ,  0.20711422], dtype=float32)>
ipdb> tf.math.reduce_mean(kl_div)
<tf.Tensor: shape=(), dtype=float32, numpy=0.26684278>

However, when I use coupled_kl_divergence_norm in the following manner:
        x_recons_logits, z_sample, mean, logvar = self.model(x_true)

        q_zx = MultivariateCoupledNormal(loc=mean.numpy(), scale=tf.exp(logvar/2).numpy())
        p_z = MultivariateCoupledNormal(loc=np.zeros(mean.shape), scale=np.ones(logvar.shape))

        kl_div = coupled_kl_divergence_norm(q_zx, p_z, root=False)
        kl_div = tf.convert_to_tensor(kl_div, dtype=tf.float32)

I get the following numbers, averaging to just 0.0007430053.
...
...
       [[ 1.5007547e-03]],

       [[ 1.4787790e-04]],

       [[ 4.7172891e-04]],

       [[ 1.7600998e-03]],

       [[-3.5504821e-05]],

       [[ 2.9015096e-04]],

       [[ 1.0139990e-03]],

       [[ 2.1769719e-03]],

       [[ 3.9246224e-04]],

       [[ 3.0478922e-04]],

       [[ 2.3205217e-03]],

       [[ 1.1474675e-03]],

       [[ 2.5465735e-04]],

       [[ 1.3815672e-03]],

       [[ 1.0416418e-03]]], dtype=float32)>
ipdb> tf.math.reduce_mean(kl_div)
<tf.Tensor: shape=(), dtype=float32, numpy=0.0007430053>

Plz advise.

Also, in the end of the coupled_kl_divergence_norm, can you also add kl_div.squeeze()? That way, it will give the output of shape (batch_size, ) rather than (batch_size, 1, 1), which is what I'm getting now.

The output of coupled_kl_divergence_norm suggests you are calculating 15 KL divergences, so your batch size is 15, correct? If not, make sure your inputs to the parameters of the MultivariateCoupledNormal are what you expect them to be. Why is the tensorflow output 1-D? Shouldn't it be (15, 128) under the assumption that there are 15 distributions in the branch and you used 128 samples?
Validate your inputs, and then use the analytic expression to find the KL divergences for each of your distributions in your batch. Compare the analytic results with your outputs.

The output size I am getting for coupled_kl_divergence_norm is (128, 1, 1). Batch_size is 128. The output you see above is a cutoff. What I'm looking for is (128, ), so it is supposed to be 1D.

So, you are using 1 random sample to estimate the KL divergence for each distribution?

Thanks for adding squeeze(). You can push this to master if u haven't already.
KL Divergence (as currently written in the code) is the difference between the log PDF of posterior q(z|x) and log PDF of prior p(z). Therefore, the output is a scalar per batch, regardless of dim of latent layer z.
        logpz = self.log_normal_pdf(z_sample, 0., 1.)
        logqz_x = self.log_normal_pdf(z_sample, mean, logvar)
        kl_div = logqz_x - logpz

In this bivariate example, z_sample's shape is TensorShape([128, 2]). I'm using the terms sample and batch_size here interchangeably in the loss function context. This is not necessarily the case for visualization/display where we sample the number below the batch size but not above. Output of logpz and logqz_x are both TensorShape([128]). So kl_div is also TensorShape([128]), a vector.

It is pushed to master, but I think you need to push it to PyPI before it will be added to the VAE code.
Yes, entropies, cross-entropies, and divergences are a single value regardless of the dimensionality of the underlying input.
What I am trying to say is this: You are estimating the KL divergence of the two distributions with a single sample per distribution. You are doing Monte Carlo approximation of the KL divergence with a single sample. This is done a fair amount, so it is ok to do, but you cannot compare the Monte Carlo approximation with 1 sample to the coupled_kl_divergence output.
log_normal_pdf's output shape will be (batch_size, number_of_samples). Therefore so will kl_div's.  log_normal_pdf gives the log probability density values evaluated at sampled random variables, given distribution parameters. It does not calculate the entropy/cross-entropy. To calculate the entropy of a distribution, or the cross-entropy of two distributions, you need to do summation (discrete) or integration (continuous) over the entire support of the distribution.
If you were to use 100 samples per distribution and then average across the batch distributions so kl_div is (128, 100) and tf.reduce_mean(kl_div) is (128, ), you would have a better Monte Carlo estimate of the KL divergences to compare to coupled_kl_divergence_norm.

Ok, might have gotten mixed up when you said distribution. I thought u meant the latent layer distribution (which is 2) of the VAE while u r actually referring to the output batch distribution.
When u r proposing here is what @kenricnelson has been alluding to generating (or sampling) multiple output images per input image (from a batch). This is a new frontier of VAE construction as I've only seen at most 1 output value per 1 input value, or 1 sample output from its specified batch in the latent vectors. However, your approach is probably doable and is good for coupled_kl_divergence_norm to have the flexibility to specify n samples. This is what param n will be also for right?
Say that you have dist_p and dist_q, both have inputted loc of shape (128, 4). So batch_size is 128 and z_dim is 4. Then if you pass these distributions into coupled_kl_divergence_norm with n=1, then the output will be (128, ) right, assuming squeezed? So it will still be a vector. However, if u pass in n=100, will the output be (128, 100)? If so, then in the VAE, we can add another tf.reduce_mean(kl_div) to average out these samples and make it (128, ) again no problem, as u said.
So with more samples of the coupled_kl_divergence and then averaging them, would this approach be more comparable to the MC approx?

I'm not sure if it is a new frontier. If you have means and variances, then there is nothing stopping you from generating normal random variables to use in your MC estimation of the KL divergence.
The n parameter of coupled_kl_divergence_norm sets the number of samples to use in the MC estimate of the KL divergence (technically 1/2 of the samples because there are 2 calls to the coupled_cross_entropy_norm function). This is lowered for speed and increased for accuracy/precision.
The only valid inputs into coupled_kl_divergence_norm are MultivariateCoupledNormal objects, whose number of dimensions can be any positive integer. An array cannot be a distribution, but may be samples from a distribution. coupled_kl_divergence_norm cannot take samples. coupled_kl_divergence_norm outputs will always have shape (n_batches, ).

@Kevin-Chen0 Do you have some example code of how to use ipdb?

So I've done a little bit of digging and here's what I've found.

The calculation of logpz looks to be incorrect. If you want a standard normal distribution for the latent space, then the input for logvar should be tf.math.log(1.) not  simply 1. i.e. logpz should be calculated as logpz = self.log_normal_pdf(z_sample, 0., tf.math.log(1.)).

When kl_div is estimated this way, the mean value (after applying tf.math.reduce_mean) I got from one iteration was around -0.0003, which in orders of magnitude seems to be consistent with the calculation using coupled_kl_divergence_norm. However the sign is wrong.

As John pointed out, the KL divergence calculated in the first way is a Monte Carlo estimator since we are only using one realization per distribution (we have 128 2-dimensional distributions we are sampling from). Since the sample size per distribution is so low, this inevitably adds noise to our estimate. This isn't inherently bad, but I do think the variability does actually bias the estimator somewhat.

I think I see where is the issue. You have put the posterior as:
q_zx = MultivariateCoupledNormal(loc=mean.numpy(), scale=tf.exp(logvar/2).numpy())
Where you put in the exp of logvar/2 as scale. However,  in my original VAE code, I still have it as the following:
logqz_x = self.log_normal_pdf(z_sample, mean, logvar)
However, the following doesn't work atm:
q_zx = MultivariateCoupledNormal(loc=mean.numpy(), scale=logvar.numpy())
That is because of the AssertionError that we didn't take out yet:
AssertionError: All scale values must be greater than 0..
mean and logvar and outputs of the encoder. Since I didn't put any activation function as final layer of encoder, the outputs are raw and may contains negatives function. However, this poses an issue when feeding into MCN scale as Sigma cannot contain negative values. This is an issue that we haven't come up with a resolution yet.

This is resolved, thanks @hxyue1!


Error saving viewable of type torch_tensor: RuntimeError: result type Float cant be cast to the desired output type Byte

error when view a pytorch tensor

Error saving viewable of type torch_tensor: RuntimeError: result type Float cant be cast to the desired output type Byte
what does this mean?

I think it must be cast to float before saving: images[:5].float().
It's possible for me to cast it automatically, but I don't know if it's the best solution.
I'm not using torch that much. What do you think? does casting should be the default behavior?

Thanks! The image is successfully displayed after adding .float()
But I don't understand why we have to do type conversion here. As far as I know, torchvision.utils.save_image accept image tensor of type uint8.

I don't know. This is the code I'm using to save the given tensor:
def save(path, obj, normalize=True, pad=10, *args, **kwargs):
             import torchvision

             pad_value = 255
             torchvision.utils.save_image(
                 obj,
                 path,
                 normalize=normalize,
                 pad_value=pad_value,
                 padding=pad,
             )

Does this work for you without converting to float?

Oh, after testing, torchvision.utils.save_image cant handle uint8 input, cause it will normalize tensor to range [0,1], so it requires a float type input.
I think it‘s good to convert the type to float by default. like:

torchvision.utils.save_image(
    obj.float(),
    path,
    normalize=normalize,
    pad_value=pad_value,
    padding=pad,
)


Evaluation Plan - Qualitative metrics

Qualitative measures like user satisfaction, user feedback, or other forms of evaluation.

Our Qualitative metrics:

User Feedback: Collect feedback from support team members on the relevance and helpfulness of the model’s classifications.
User Satisfaction: Conduct surveys or interviews with support staff to measure their satisfaction with the system, focusing on ease of ticket management and accuracy.
Ticket Resolution Time: Measure any changes in the time required to resolve tickets after using the model, indicating operational efficiency.


Fixed small typo in python Readme

The pip command to install dependencies was missing the 'install' part.

Thanks JelmerT! Merged.


GO slim page and summary final

Proteins with a biological process annotation not covered by the slim (gene count: 214)
Proteins with no GO slim or biological process annotation (gene count: 795)

[ ] should be linked lists

The numbers will be quite a bit different when generated because of the ontology change.
(I think the list of genes with a BP which is not int he slim is only around 110-115 now)

[ ] Add counts

should be linked lists

That's going to take a while to implement as it needs bit more processing.  In the meantime I've temporarily removed the two non-links.

Is this tricky?
It isn't critical but it would be useful. I (finally) drafted a paper about the "unknowns" on the plane and I need this to complete. Not urgently....

.....I still have lots of other stuff to do for the paper...

From the current code, genes that don't have annotation covered by the slim:
https://www.dropbox.com/s/s0p4ahy94c26hdi/non_bp_go_slim_genes.txt?dl=0

I had a look, all look fine except
https://github.com/pombase/website/issues/364

The counts and links are there now (if you reload).  Let me know if the wording is OK:
Genes not covered by the slim (1002 in total):
Genes with a process annotation, but not in any of the categories above: 128
Genes with no biological process annotation: 874

Could you let me know what title and/or description you'd like at the top of the two linked pages:
http://preview.pombase.org/gene_subset/non_go_slim_with_bp_annotation
http://preview.pombase.org/gene_subset/non_go_slim_without_bp_annotation

[ ] Links  work but lists are empty

[ ]  refine text for links to "Genes products with"

[ ]  Titles
Genes products with a biological process annotation, not covered any of the PomBase<<http://preview.pombase.org/browse-curation/fission-yeast-go-slim-terms link GOslim>> categories: 128

Genes products with no biological process annotation:

Links work but lists are empty

Sorry about that.  It was a last minute screw up before going to bed.  Fixed now.

fab!

I've added those titles.  Could you check them?

Gene products with a biological process annotation, not covered any of the PomBase GOslim categories
hmm, i made a type anyway but perhaps:
Gene products with biological process annotation, not covered the PomBase GOslim categories
Also both lists have the same title. The other list should be simply:
Gene products with no biological process annotation: 874

Also both lists have the same title. The other list should be simply:
Gene products with no biological process annotation: 874

Do you mean the text by the link?  That is what it is already.

from here
http://preview.pombase.org/browse-curation/fission-yeast-go-slim-terms
the list
Gene products with no biological process annotation: 874
lists to a page with the title:
Gene products without biological process annotation, not covered by the PomBase GOslim categories: 874


Migrate Bamboo to using SES adapter

Configuration is done thorugh ex_aws library, so will use credentials from env vars:

AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY

@slow-1oris can you confirm following env vars are set for the containers ?
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY


Disabling Dates

Hi
I am disabling dates by doing:
{
disable: [
{
"from": "2019-09-02 10:30:00",
"to": "2019-09-02 16:30:00",
},
{
"from": "2019-09-03 10:30:00",
"to": "2019-09-03 14:30:00",
}
]
This works great. However, I also need to be able to disable other dates, such has say weekends when the business is closed. Is it possible to combine the disabling of weekends PLUS disabling dates using the above?
Any hints or tips would be much appreciated!

Here's a JSFiddle with a similar set up that should help you get what you need done. JSFiddle
See the following documentation too: https://flatpickr.js.org/examples/#disabling-dates

Thanks @TidyLuke :)


Add more fixes for WebAssembly/WASI build

force use timegm - WASI does not have timezone tables
use basic implementation for OPENSSL_issetugid() - WASI doesn't support forking processes

CLA: trivial

Checklist

[ ] documentation is added or updated
[ ] tests are added or updated

okay with trivial.

Merged, thanks for the contribution.


Adapt model to also fit to NSSP Flu data

maybe make this a subissue of #23

though perhaps it isn't if there needs to be choices about Flu first

Will rephrase the issue title. This is more about "creating another instance of the existing model that fits NSSP flu data". It is the same as the existing model, but with different priors.
https://github.com/CDCgov/pyrenew-covid-wastewater/issues/23 is an actual change to the model structure. There could be two instances of that model: one for Flu and one for COVID.


Add PlatformView for all supported platforms

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Use case
Currently we can only embed native views in Android and iOS, but this is very helpful for other platforms, specially the web.
Webviews are not supported for flutter web, neither PlatformViews, so if we have a mobile app with a webview, this makes it impossible to port this app to flutter web.
Proposal
Flutter should add PlatformView support for web, windows, macos and linux.

@stuartmorgan do you know if there are any docs about this? I tried to find but couldn't, so we might need an issue to add docs on how to use HtmlElementView.
PS: Updating the reference to linux.

Doc proposal here: https://github.com/flutter/website/issues/5063


Update to Swift 4.1, fix inheritance issue with equality

Addresses https://github.com/pinterest/plank/issues/132

          1 Warning

:warning:
Any source code changes should have an entry in CHANGELOG.md or have #trivial in their title.

  Generated by :no_entry_sign: Danger

🚫 CI failed with log


Investigate Refactor of Panic in the Group() Method

In models/alertKey.go we through a couple of panics:
// Group returns the tagset of this alert key. Will panic if a is not a valid
// AlertKey. OpenTSDB tag validation errors are ignored.
func (a AlertKey) Group() opentsdb.TagSet {
	sp := strings.SplitN(string(a), "{", 2)
	if len(sp) < 2 {
		panic(fmt.Errorf("invalid alert key %s", a))
	}
	s := sp[1]
	s = s[:len(s)-1]
	if s == "" {
		return nil
	}
	g, err := opentsdb.ParseTags(s)
	if g == nil && err != nil {
		panic(err)
	}
	return g
}

This gets called in a lot of places:

We probably should not have so many paths to a panic call.

Hmm... maybe it should still panic, but an AlertKey shouldn't be able to be generated that is not parsable....


Typography Margins Fixed

added a means for the margins to be returned to the typography components and cleaned up docs examples

@devongovett let me know if this works for you.

This definitely gets the job done, but I can't help but feel we've introduced overly complex API to put margins on headings. It's not obvious, there are two ways to do it (with both mechanisms not entirely true to SUIT), the number of selectors is huge, and the duplication of properties between selectors results in a lot of bloat.
We need to re-approach this. Perhaps a simpler fix is to:

Drop .spectrum-Typography completely
Introduce u-noMargin { margin: 0; }
Restore margins to .spectrum-Heading*

Then, if people want a properly styled heading, they simply use the class:

Lorem Ipsum Dolor

If they want a heading without margin, they add the utility class:

Lorem Ipsum Dolor

Seems very similar, add a class to add margins or add a class to get rid of margins.

The majority uses should need the margins unless you’re using the margins in a whole block of typography, which is why we have the wrapper class and no margins by default.

Another drive-by comment: For those projects that have already implemented the typography, having margins is going to cause a lot of unnecessary regressions (this happened to me when I updated spectrum-css and the Spectrum website basically exploded). In my opinion, our components should be as modular as possible, which means they come out of the box with no extra styling. We should give our customers an option to use their own custom margins or the margins we suggest based on what they need.

Drive by comment: whenever I start a new project, 99% of the time I forget to add the spectrum-Typography class to a parent element. So I am in favour of 🔪 that class 😄

So does that mean you want the margins, or do you have any trouble with them being on by default?

If I may be honest, I don't have an opinion on margins. I'd rather be told what my opinion on margins should be. I was making more of a comment on what trips me up w/ spectrum setup than whether or not stylistic specifics clash with my own opinions.

@filmaj the way it’s designed in this pr is that mother has margins by default so if you want to use a heading or some body text you can have those styles without it impacting layout with things around it. Where you likely do want margins is when you have headings and body together which is why there’s a wrapper provided to give them all margins.


SSL connection adapter fails with Interop+AppleCrypto+SslException error on macOS

Runtime Environment:
OS Name:     Mac OS X
OS Version:  10.12
OS Platform: Darwin
RID:         osx.10.12-x64
Base Path:   /usr/local/share/dotnet/sdk/2.0.0-preview1-005977/
We're using Kestrel in development with Https and on the Mac I periodically (after some idle time?) get the request to enter some password originating from Keychain.

Not knowing the password and after cancelling, I see the following exception:
fail: Microsoft.AspNetCore.Server.Kestrel[0]
      Uncaught exception from the OnConnectionAsync method of an IConnectionAdapter.
System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> Interop+AppleCrypto+SslException: Cipher Suite negotiation failure
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, ExceptionDispatchInfo exception)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.PartialFrameCallback(AsyncProtocolRequest asyncRequest)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
   at System.Net.Security.SslStream.EndAuthenticateAsServer(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionAdapter.<OnConnectionAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.FrameConnection.<ApplyConnectionAdaptersAsync>d__32.MoveNext()

Not sure if this is really a Kestrel issue or some issue in the new Mac native AppleCrypto.
Workaround is to kill and restart with dotnet run.

cc @bartonjs

@tverboon Any idea what sort of timescale we're talking here? 30 seconds? 5 minutes? An hour?

About 10 minutes. Reproduced it now a couple of times. Just wait ten minutes and then do a page request.

@tverboon Looks like it's about 5.  Filed https://github.com/dotnet/corefx/issues/20509 to get this fixed.
If you call cert.GetRSAPrivateKey() every 4 minutes or so and call SignData with that key, that should reset the idle timeout as a workaround.

Thanks! Workaround works and you already fixed this. Good work 👍

Fixed (External)


OCPBUGS-43500: Change lbMethod check in dualstack LB tests

When the lbMethod configured in the cloud controller manager is SOURCE_IP but the service is not configured with ETP:Local, the algorithm that is finally applied to LB queries is round robin, as kubeproxy is applying it's own round robin algorithm in all the OCP nodes.
This change applies then the same replacement of the expected LB method as it's done in loadbalancer tests (in loadbalancers.go).
The tests

sig-installerSuite_openshift/openstacklbSerialThe_Openstack_platform_should_create_a_TCP_Amphora_LoadBalancer_when_a_TCP_svc_with_type_LoadBalancer_and_IP_family_policy_PreferDualStack_and_IP_familiesIPv4_IPv6_is_created_on_Openshift
sig-installerSuite_openshift/ openstacklbSerialThe_Openstack_platform_should_create_a_TCP_Amphora_LoadBalancer_when_a_TCP_svc_with_type_LoadBalancer_and_IP_family_policy_PreferDualStack_and_IP_familiesIPv6_IPv4_is_created_on_Openshift

were failing with SOURCE_IP LB method as it was expecting to receive answers from one service endpoint and it receives responses from two endpoints because the service is not configured with ETP:Local and kubeproxy is performing a round robin balancing (breaking the SOURCE_IP balancing).
More info about cloud controller manager options in https://docs.openshift.com/container-platform/4.17/installing/installing_openstack/installing-openstack-cloud-config-reference.html#ccm-config-lb-options

/jira refresh

/retest-required

/lgtm
/approve

We have e2e-openstack-dualstack and e2e-openstack-dualstack-v6primary jobs, why weren't they triggered here?
We should use these jobs to run these tests if it's not the case already and also trigger them to confirm this patch did the work. Not just manual testing.
Thanks

We have e2e-openstack-dualstack and e2e-openstack-dualstack-v6primary jobs, why weren't they triggered here? We should use these jobs to run these tests if it's not the case already and also trigger them to confirm this patch did the work. Not just manual testing.
Thanks

Thanks for the heads-up, noted for the next time. We need to consider adding the pull-ci-* openstack jobs to test the PRs automatically, which I think is not done yet.


Support setting up custom headers in APIRule

Description
Changes proposed in this pull request:
Following https://github.com/kyma-project/api-gateway/issues/894 specification, this PR aims to add this functionality in a similar fashion as the one proposed in the same ADR.
** Results **
Sample v1beta1 apirule:
{
  "apiVersion": "gateway.kyma-project.io/v1beta1",
  "kind": "APIRule",
  "spec": {
    "gateway": "kyma-gateway.local.kyma.dev",
    "headers": {
      "request": {
        "set": {
          "X-CLIENT-SSL-CN": "%DOWNSTREAM_PEER_SUBJECT%",
          "X-CLIENT-SSL-ISSUER": "%DOWNSTREAM_PEER_ISSUER%",
          "X-CLIENT-SSL-SAN": "%DOWNSTREAM_PEER_URI_SAN%"
        }
      }
    },

Resulting virtualservice:
{
  "apiVersion": "networking.istio.io/v1",
  "kind": "VirtualService",
  "spec": {
    "gateways": [
      "kyma-gateway.local.kyma.dev"
    ],
    "hosts": [
      "httpbin.local.kyma.dev"
    ],
    "http": [
        "headers": {
          "request": {
            "set": {
              "X-CLIENT-SSL-CN": "%DOWNSTREAM_PEER_SUBJECT%",
              "X-CLIENT-SSL-ISSUER": "%DOWNSTREAM_PEER_ISSUER%",
              "X-CLIENT-SSL-SAN": "%DOWNSTREAM_PEER_URI_SAN%",
              "x-forwarded-host": "httpbin.local.kyma.dev"
            }
          },
          "response": {}
        },

Sample APIRule v2alpha1
{
    "apiVersion": "gateway.kyma-project.io/v1beta1",
    "kind": "APIRule",
    "spec": {
        "headers": {
            "request": {
                "set": {
                    "another-header": "header-value-too"
                }
            },
            "response": {
                "set": {
                    "X-CLIENT-SSL-ISSUER": "%DOWNSTREAM_PEER_ISSUER%",
                    "X-CLIENT-SSL-SAN": "%DOWNSTREAM_PEER_URI_SAN%",
                    "test-header": "test-value"
                }
            }
        },

Result virtualservice
{
    "apiVersion": "networking.istio.io/v1",
    "kind": "VirtualService",
        "http": [
                "headers": {
                    "request": {
                        "set": {
                            "another-header": "header-value-too",
                            "x-forwarded-host": "httpbinalpha.local.kyma.dev"
                        }
                    },
                    "response": {
                        "set": {
                            "X-CLIENT-SSL-ISSUER": "%DOWNSTREAM_PEER_ISSUER%",
                            "X-CLIENT-SSL-SAN": "%DOWNSTREAM_PEER_URI_SAN%",
                            "test-header": "test-value"
                        }
                    }
                },

[X] make test is passing.
[ ]  check if downstream service is indeed receiving the headers
[ ] enhance unit tests
[ ] update docs

Pre-Merge Checklist

[ ] As a PR reviewer, verify code coverage and evaluate if it is acceptable.

Related issues
#Resolves #894

 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.I859511 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

 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.I859511 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

this PR is work in progress atm. we need to align what will be best way to support this case

this should be already possible with APIRule v1*, based on ORY Oathkeeper mutators. For APIRule v2* we plan to support it in very similar way as it is proposed in this PR. Checkout https://github.com/kyma-project/api-gateway/issues/1194 implementation.

Closing as the team will work on that.


Allow non-translated special character strings & numbers

In my templates, I have a few things like this:
({{t 'Optional'}})

Because I do not want to have both 'Optional' and '(Optional)' in my translation files. However, ( and ) are counted as untranslated strings. The same happens if I use numbers. I think it would make sense to only throw this error for strings containing letters, and ignore it if a string contains only numbers and/or special characters.

Seems like https://github.com/rwjblue/ember-cli-template-lint/issues/53, and I recently added the ability to add a whitelist to the bare-strings rule. I think allowing all numbers and symbols automatically would not be great, because of a few things:

I think $ and their ilk are something to be avoided (you should generally be using the locale specific symbol)
numbers have the same issue as above, locale dependent number formatting

That being said, I think we could come up with a fairly good list of the symbols that don't pose these sort of problems, but still address your concern...

Ah, I didn't see that. The whitelist looks good. I guess it would be nice to set the default to something like (),.&+=*/#%!?: ?

@mydea - Ya, I think that sounds good.  Mind submitting a PR to update?
Would need to tweak these sections:

https://github.com/rwjblue/ember-cli-template-lint/blob/master/blueprints/ember-cli-template-lint/files/.template-lintrc.js#L5
https://github.com/rwjblue/ember-cli-template-lint/blob/master/lib/get-config.js#L13
https://github.com/rwjblue/ember-cli-template-lint/blob/master/README.md#bare-strings
https://github.com/rwjblue/ember-cli-template-lint/blob/master/node-tests/unit/plugins/lint-bare-strings-test.js#L8

And add a few more "good" tests that don't use custom config.

Added a better default whitelist in #62, and released in v0.2.13...


bug(undeploy): should be logger.warning, not warn

Coverage increased (+0.3%) to 74.749% when pulling 180bbf500d1a10503201b77b0aad9de5411da146 on lholmquist:undeploy-goal-bug into 8695b05812263730a7f6c5891b9129f72bf7b7c3 on bucharest-gold:master.