[feature] Add predicate validation to generate-attestations

Is your feature request related to a problem? Please describe.
generate-attestations action currently creates a folder of predicates based on a JSON subject layout and a given predicate.
https://github.com/slsa-framework/slsa-github-generator/pull/1397#discussion_r1055750035
for robustness, add a function to validate that the incoming predicates satisfy some conditions.
we can start with checking that

the predicate JSON format matches the given input predicateType (requires adding slsa provenance definitions for predicate types)
the predicate contains a builder ID
the predicate contains source material
the predicate contains some github context and runner material

@laurentsimon

This would be a verification at runtime. Do you think this could also be part of a compliance tests (as an Action we provide or something else) the TRW authors run as pre-submit?

Do you think this could also be part of a compliance tests (as an Action we provide or something else) the TRW authors run as pre-submit?

The predicate is something we generate, so I don't think TRW authors need to deal with this.
The compliance test should test whether their SLSA subject build output was compliant though, commenting in that issue.

@asraa I'm under the impression this is resolved. The verify-token Action does the validation, so the input is mostly OK. The code of the generate-attestations also uses the safe file read / write routines.
I may need to add more tests once we support multiple predicate types, if we ever do that.
I'm triaging BYOB issues to see what's left to be done for a release.
Let me know what you think.


Login form hang after submit (endless spinning icon)

I enter the login details and hit Submit, but the screen continues to show an endless "thinking/spinning" icon. Then I used in local computer (AMPPS) everything was good. This problem occurred when I moved to the server. Signup form has this problem too.
Any advice? Thank You.

I think this is PHP version problem. In Server is 5.3 version. I can't change PHP version. Have you any advice what I can change in code to get started in 5.3 version. Thank You.

I solve this problem. I used this https://github.com/ircmaxell/password_compat


Hoe to build

Could you please tell me how to build the plugin
Thanks

You'll need Visual Studio at least version 12 and open the solution file with it (OctoCommander.sln).
Sadly this project isn't well maintained, we used it for some time in our local makerspace but moved away from remote controlling our printers with repetier host.
Not sure if it still works with current versions of repetier 4 years later.


Update README.md

fix markdown.

Thanks for the contribution! We employ pre-commit hooks and actions to ensure our code, markdown, etc. is properly formatting before it goes out. If you're looking to jump into the forge, please take a look at our issues.
Alternatively, please feel free to contribute TTPs to https://github.com/facebookincubator/ForgeArmory.
Closing - not a bug.


Button Phantom Pressses

I have a working sketch that connects to an api and pulls check-in information and displays it on the badge when I press the right toggle button. I'd like to also display the check-in barcode when I press left.
When I started testing this I found that the left button and down button are triggered all the time.
After I click right it immediately triggers left and down. I've increased the milliseconds on the debounce but it had no effect. It didn't change how fast it was triggered either.
Either my button is defective or something else is interfering?
Is anybody else having this issue?
Has anybody solved it?

I assume this is related to issue20 when running on battery (if it is reset and boots) the buttons get triggered randomly. If you run on USB, it should work fine. Running on battery (if you have it working on USB, then unplug) the button presses will appear..... correct?

I get the button presses when plugged into USB and when unplugged. I set a Serial.println to trigger when a button is presses and it triggers on USB. It also triggers the screen change I setup when It's off USB.

You have the white version PCB board? Looks like the USB2Serial chip is interfering.

The serial TX/RX pins GPIO1 & GPIO3 are shared with the direction buttons left & down (refer to the schematic). This is why you will receive "phantom" presses when using the serial terminal. The USB-Serial functionality is only meant for uploading sketches.
If your application requires a serial terminal, you can remove the down & left button (GPIO 1 & GPIO 3) from the polling loop. For data input/output applications, we recommend using WiFi (e.g. http/websockets/etc.)

Ahhh yes I recall now - the TX/RX pins. @pastorhudson  check your sketch for any "Print Serials" that may be going up/down the pins and falsely triggering a button press.... totally forgot about that @sqfmi , not the USB2Serial issue causing this!

Ok maybe I left some Serial code in the sketch and that caused it to trigger when it was running on battery. I'll double check my code, test and report back.

That was the problem! I had missed some Serial commands. Thank you!

I spoke too soon. I'm using the method of starting it on usb power and then unplugging it to run on battery. (I have the white version)
It was working fine plugged into a USB power source(Wall Wart not computer) and then when I unplugged the usb power it started doing the left down presses again.

@pastorhudson - on Battery the CH340C seems to be interfering with the ESP8266 and the button presses. To make the 5-way work they have had to share GPIO ports, and the TX/RX of the CH340C are also the UP and DOWN button press when pulled low. I would advise getting rid of your "case 0,1 and 4" in the button "switch case" in the loop, and remove all serial code lines (just looked at your githhub code).

@chunkysteveo Thanks for the ideas. This is the code I tested for the comment where I reopened the issue. I didn't push to github because it has some other dev stuff I'm not ready to push yet.
/*  PCOBadge is a fun project by Ron Hudson.
    PCOBadge pulls an individual's checkin info from the Planning Center Check-ins api and displays it on an e-paper display.
    It lives at https://github.com/pastorhudson/pcobadge
    It is Liscenced under the:

  MIT License

  Copyright (c) 2018 Ron Hudson

  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.

   IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.

*/

/* Libraries You Need */

/* e-paper display lib Version 3.x
   https://github.com/ZinggJM/GxEPD/releases */
#include <GxEPD.h>
#include <GxGDEH029A1/GxGDEH029A1.h>
#include <GxIO/GxIO_SPI/GxIO_SPI.h>
#include <GxIO/GxIO.h>

/* include any other fonts you want to use https://github.com/adafruit/Adafruit-GFX-Library */
#include <Fonts/FreeSansBold9pt7b.h>
#include <Fonts/FreeSansBold12pt7b.h>
#include <Fonts/FreeSansBold18pt7b.h>
#include <Fonts/FreeSansBold24pt7b.h>

/* lable.h is a byte encoded version of label.bmp Label Image */
#include "label_cbc.h"
#include "apiStatus.h"
#include "labelMenuBeta.h"

/* WiFi  libs*/
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClient.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <ESP8266HTTPUpdateServer.h>
#include <WiFiManager.h>

/* Misc Libs */
#include <ArduinoJson.h>
#include <Time.h>
#include <TimeLib.h>
#include <base64.h>

/* Always include the update server, or else you won't be able to do OTA updates! */
/**/const int port = 8888;
/**/ESP8266WebServer httpServer(port);
/**/ESP8266HTTPUpdateServer httpUpdater;
/*                                                                                */

/* Configure pins for display */
GxIO_Class io(SPI, SS, 0, 2);
GxEPD_Class display(io); // default selection of D4, D2

/* A single byte is used to store the button states for debouncing */
byte buttonState = 0;
byte lastButtonState = 0;   //the previous reading from the input pin
unsigned long lastDebounceTime = 0;  //the last time the output pin was toggled
unsigned long debounceDelay = 80;    //the debounce time

/* Font Styles */
const GFXfont* h1 = &FreeSansBold24pt7b;
const GFXfont* h2 = &FreeSansBold18pt7b;
const GFXfont* h3 = &FreeSansBold12pt7b;
const GFXfont* h4 = &FreeSansBold9pt7b;

/* EDIT THIS! API Keys And URL's */
String userID = "xxxxxxxx"; // Your User ID Number from check-ins. Use Just the Numerical Portion.

/* Generate your Application ID and Secret personal access token pair at https://api.planningcenteronline.com/personal_access_tokens/new
   Be sure to allow access to Check-ins Version 2018-08-01 */
String applicationID = "xxxxxxxxxx"; // Application ID
String secret = "xxxxxxxxxxx"; // Secret

/* Maybe edit this ¯\_(ツ)_/¯ SHA1 fingerprint of the certificate for api.planningcenteronline.com Expires Nov 24, 2019 */
String fingerPRINT = "95 54 E1 9C 51 F1 9E 0A 2E 2F 41 51 9D A4 E4 83 26 80 71 7C";

/* checkinAPIURL is the Check-ins api url using the userID from above.
   b64auth is the Base64 Encoded applicationID:secret
   You shouldn't need to edit these.*/
String apiStatusURL = "http://status.planningcenteronline.com/index.json";
                      String checkinAPIURL = "https://api.planningcenteronline.com/check_ins/v2/people/" + userID + "/check_ins?per_page=1/";
String b64auth = base64::encode(applicationID + ":" + secret, false); // Base64 Encoded auth string

bool OTA = false; //OTA mode disabled by default

void setup()
{
  display.init();

  pinMode(1, INPUT_PULLUP); //down
  pinMode(3, INPUT_PULLUP); //left
  pinMode(5, INPUT_PULLUP); //center
  pinMode(12, INPUT_PULLUP); //right
  pinMode(10, INPUT_PULLUP); //up
  /* WiFi Manager automatically connects using the saved credentials, if that fails it will go into AP mode */
  WiFiManager wifiManager;
  wifiManager.autoConnect("PCOBadge");

  /* If the center button is pressed on boot, enable OTA upload */
  if (digitalRead(5) == 0) {
    httpUpdater.setup(&httpServer);
    httpServer.begin();
    menu();
    /* Otherwsie, Display PCO Badge from Last Check-in */
  } else {
    menu();
  }
}

void loop()
{
  httpServer.handleClient();

  byte reading =  (digitalRead(1)  == 0 ? 0 : (1 << 0)) | //down
                  (digitalRead(3)  == 0 ? 0 : (1 << 1)) | //left
                  (digitalRead(5)  == 0 ? 0 : (1 << 2)) | //center
                  (digitalRead(12) == 0 ? 0 : (1 << 3)) | //right
                  (digitalRead(10) == 0 ? 0 : (1 << 4)); //up

  if (reading != lastButtonState) {
    lastDebounceTime = millis();
  }
  if ((millis() - lastDebounceTime) > debounceDelay) {
    if (reading != buttonState) {
      buttonState = reading;
      for (int i = 0; i < 5; i++) {
        if (bitRead(buttonState, i) == 0) {
          switch (i) {
            case 0:
              //do something when the user presses down
              showText("You pressed the down button!");
              break;
            case 1:
              //do something when the user presses left
              apiSTATUS();
              break;
            case 2:
              //do something when the user presses center
              menu();
              break;
            case 3:
              //do something when the user presses right
              pcoAPI();
              break;
            case 4:
              //do something when the user presses up
              myMSG();
              break;
            default:
              break;
          }
        }
      }
    }
  }
  lastButtonState = reading;
}

/* Gets the last checkin info for userID.  */
void pcoAPI()
{
  display.setRotation(3); //even = portrait, odd = landscape
  display.fillScreen(GxEPD_WHITE); // Clear Screen
  display.drawBitmap(label, 0, 0, 296, 128, GxEPD_WHITE); // Draw the label.h background image
//  display.update();

  /* Parse JSON from HTTP GET request */
  HTTPClient http;
  http.begin(checkinAPIURL , fingerPRINT);
  http.addHeader("Authorization", "Basic " + b64auth);
  http.addHeader("Content-Type", "application/json");
  int httpCode = http.GET();
  if (httpCode = 200) { //Check for the returning code
    String payload = http.getString();
    DynamicJsonBuffer jsonBuffer; //buffer for PCO Check-in JSON
    JsonObject& root = jsonBuffer.parseObject(payload);
    String first_name = root["data"][0]["attributes"]["first_name"];
    String last_name = root["data"][0]["attributes"]["last_name"];
    String security_code = root["data"][0]["attributes"]["security_code"];
    const char* created_at = root["data"][0]["attributes"]["created_at"];
    /* Name */
    display.setTextColor(GxEPD_BLACK);
    display.setFont(h1);
    display.setCursor(20, 60);
    display.println(first_name);
    display.setFont(h2);
    display.setCursor(20, 90);
    display.println(last_name);
    /* date info */
    display.setFont(h4);
    display.setCursor(20, 120);
    display.println(formatTimeStamp(created_at));
    /* Security Code
      /* #TODO Compile suitable fixed width font to use here. */
    display.setFont(h3);
    display.setTextColor(GxEPD_WHITE);
    display.setCursor(263, 25);
    display.println(security_code[0]);
    display.setCursor(263, 47);
    display.println(security_code[1]);
    display.setCursor(263, 69);
    display.println(security_code[2]);
    display.setCursor(263, 91);
    display.println(security_code[3]);

    display.update();
  }
  else {
    display.println("Error on HTTPS request: \n" + String(httpCode));
    display.update();
  }

  http.end();
}

/* Simple demo of printing something on screen. */
void myMSG() {
  display.setRotation(3); //even = portrait, odd = landscape
  display.fillScreen(GxEPD_WHITE);
  display.setTextColor(GxEPD_BLACK);
  display.setFont(h4);
  display.setCursor(10, 20);
  display.println("IT WORKS WOOHOO!");
  display.update();

}

void menu() {
  display.setRotation(3); //even = portrait, odd = landscape
  display.fillScreen(GxEPD_WHITE); // Clear Screen
  display.drawBitmap(labelMenuBeta, 0, 0, 296, 128, GxEPD_WHITE); // Draw the statusLabel.h background image
  display.update();
}

void apiSTATUS()
{
  display.setRotation(3); //even = portrait, odd = landscape
  display.fillScreen(GxEPD_BLACK); // Clear Screen
  display.drawBitmap(apiStatus, 0, 0, 296, 128, GxEPD_WHITE); // Draw the statusLabel.h background image
  display.setFont(h3);
  display.setTextColor(GxEPD_WHITE);
  display.setCursor(20, 60);

  /* Parse JSON from HTTP GET request */
  HTTPClient http;
  http.begin(apiStatusURL);
  http.addHeader("Content-Type", "application/json");
  int httpCode = http.GET();
  if (httpCode = 200) { //Check for the returning code
    String payload = http.getString();
    DynamicJsonBuffer jsonBuffer; //buffer for PCO Check-in JSON
    JsonObject& root = jsonBuffer.parseObject(payload);
    String currentStatus = root["status"]["description"];
    display.println(currentStatus);
    display.update();
  }
  else {
    display.println("Couldn't Connect");
    display.update();
  }
}

void showIP() {
  display.setRotation(3); //even = portrait, odd = landscape
  display.fillScreen(GxEPD_WHITE);
  const GFXfont* f = &FreeSansBold9pt7b ;
  display.setTextColor(GxEPD_BLACK);
  display.setFont(f);
  display.setCursor(0, 10);

  String ip = WiFi.localIP().toString();
  String url = WiFi.localIP().toString() + ":" + String(port) + "/update";
  byte charArraySize = url.length() + 1;
  char urlCharArray[charArraySize];
  url.toCharArray(urlCharArray, charArraySize);

  display.println("You are now connected!");
  display.println("");
  display.println("Go to:");
  display.println(urlCharArray);
  display.println("to upload a new sketch.");
  display.update();
}

/* Formats the time_stamp from PCO API
   Expects format const char* buff = "2018-10-25T06:08:25Z"
   Returns a String*/
String formatTimeStamp(const char* buff)
{

  struct tm tm;
  time_t t;

  if (strptime(buff, "%y-%m-%dT%H:%M:%SZ", &tm) == NULL);
  else {
    time_t t = mktime(&tm);
    String(tm.tm_mday) + " " + String(tm.tm_mon);
    String time_stamp = String(dayShortStr(tm.tm_wday)) + " " + String(monthShortStr(tm.tm_mon + 1)) + " " + String(tm.tm_mday) + " " + String(tm.tm_year);
    return time_stamp;
  }
}

void showText(char *text)
{
  display.setRotation(3); //even = portrait, odd = landscape
  display.fillScreen(GxEPD_WHITE);
  display.setTextColor(GxEPD_BLACK);
  display.setFont(h4);
  display.setCursor(10,70);
  display.println(text);
  display.update();
}

Sorry for the big dump. I removed all Serial lines. And on battery Left and Down cases are still triggered. It seems from a comment in #20 that this is indeed related to the CH340C? This isn't a mission critical thing I'm building. So for now I can use Up and Right. But I'd love to get the adapter.
PS
@sqfmi We all know this stuff is really hard, and I am super thankful that you built Badgy. It's such a fun platform at a really good price. I can't wait to buy the next better version 👍

That's a lot of code! But all looks fine. My thought i didn't say, Which is what you have already said - was to use the other buttons as a work around. It's a cool script by the way, watched your video!

Closing this up unless anybody else is experiencing it


Lucene.Net Nugget (4.8.0-beta00013) does not compile under Visual 2017 - Lucene.Net.CodeAnalysis.Lucene1000_TokenStreamOrItsIncrementTokenMethodMustBeSealedCSAnalyzer

Hi,
I encountered issue integrating Lucene.Net Nugget (4.8.0-beta00013) in a .Net Standard 2.0 assembly.
My builder is VS2017.
I reproduced it in simple project.
Just creating a .Net Standard 2.0 Library; here is csProj content
LuceneClient.zip :
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Lucene.Net" Version="4.8.0-beta00013" />
    <PackageReference Include="Lucene.Net.Analysis.Common" Version="4.8.0-beta00013" />
    <PackageReference Include="Lucene.Net.QueryParser" Version="4.8.0-beta00013" />
  </ItemGroup>
  <PropertyGroup>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <WarningsAsErrors />
  </PropertyGroup>
</Project>

Error CS8032 An instance of analyzer Lucene.Net.CodeAnalysis.Lucene1000_TokenStreamOrItsIncrementTokenMethodMustBeSealedCSAnalyzer cannot be created from C:\Users\sebastien.nuget\packages\lucene.net\4.8.0-beta00013\analyzers\dotnet\cs\Lucene.Net.CodeAnalysis.CSharp.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..
The compilation error is related to TreatWarningsAsErrors == true.
Of course, I can Add <NoWarn>CS8032</NoWarn> to csproj items. But unfortunately, if another assemblie uses this simple project, it has also to add this NoWarn atribute; so difficult to maintain later.
I checked #286 but this fix seems to be integrated in version I use (beta00013)
Note that it does NOT occur VS2019 (business assembly and simple project above); but I cannot use 2019 for the moment.
Thanks for your help.

Thanks for the report.
I suspect that VS2017 requires .NET Framework < 4.6.1 or .NET Standard 1.x in order for the Analyzers to function. Unfortunately, there doesn't seem to be any documentation on how to create a multi-targeted VS analyzer package, so the simplest course of action is to use a single target. Currently, we are targeting .NET Standard 2.0 because that is the version the latest Microsoft.CodeAnalysis.CSharp.Workspaces package targets.
It is Microsoft's recommendation to target .NET Standard 2.0 where possible and discontinue using .NET Standard 1.x because of the number of extra dependencies in .NET Standard 1.x. However, I noticed that Xunit.Analyzers is targeting .NET Standard 1.3 and StyleCop is targeting .NET Standard 1.1 and .NET Framework 4.5.2, although the only assembly that is shipped via NuGet is .NET Standard 1.1. This would seem to confirm my suspicion that .NET Standard 1.x is required for multi-targeting VS2017 and VS2019.
So, basically I believe the fix for VS2017 support will be:

Change the TargetFramework of Lucene.Net.CodeAnalysis.CSharp and Lucene.Net.CodeAnalysis.VisualBasic to netstandard1.3.
Change the target version of Microsoft.CodeAnalysis.CSharp.Workspaces and Microsoft.CodeAnalysis.VisualBasic.Workspaces to < 3.0.0.

(unconfirmed)
We would be happy to accept a PR with these changes or to discuss alternatives if this isn't a fix.
Disabling Analyzers
According to the documentation, analyzers can be disabled for dependent projects. So, I suggest adding the following to your project to see if it stops the dependent projects from requiring the analyzers, also. Let us know whether this setting is helpful.
<PackageReference Include="Lucene.Net" Version="4.8.0-beta00013" PrivateAssets="all" />

Note that the Lucene.Net NuGet package is the only one with code analyzers in it.


Fix broken markdown in link.

@scovetta : Thanks for your contribution! The author, @KathrynEE, has been notified to review your proposed change.


[MetricsAdvisor] GetMetricSeriesDefinitions fails with filter

Our test resource fails to find any metric series definitions when using the following filter:
var cityFilter = new List<string>() { "Belo Horizonte", "Los Angeles", "Osaka" };
var categoryFilter = new List<string>() { "__SUM__", "Shoes Handbags & Sunglasses" };

MetricsAdvisorClient client = GetMetricsAdvisorClient();

var options = new GetMetricSeriesDefinitionsOptions(SamplingStartTime);

options.DimensionCombinationsToFilter.Add("city", cityFilter);
options.DimensionCombinationsToFilter.Add("category", categoryFilter);

var definitionCount = 0;

await foreach (MetricSeriesDefinition definition in client.GetMetricSeriesDefinitionsAsync(MetricId, options))
{
   // No definitions returned.
}

Pipeline: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=712399&view=results
This was the first time this filter failed and, since then, it always fails when running locally. Changing the filter was enough to make the test work, but why the filter in the snippet above does not return any results if it's valid?

According to the service team, stored series data starts to get discarded as it gets old, so it's natural that this data will stop being returned after some time. There's nothing to fix here.


Adding Discount UI

Pre-Flight checklist

[X] Screenshots and design review for any changes that affect layout or styling

[X] Desktop screenshots
[X] Mobile width screenshots

[X] Migrations

[X] Migration is backwards-compatible with current production code

[X] Testing

[X] Code is tested
[X] Changes have been manually tested

[x] Settings

[ ] New settings are documented and present in app.json
[X] New settings have reasonable development defaults, if applicable
[ ] Opened issue for DevOps regarding necessary configuration changes to deployed environments

What are the relevant tickets?
Fixes #431
What's this PR do?
Adds support for discount redemption:

Adds UI to apply and clear discount codes
Updates backend APIs to handle discount code redemption following the established rules
Updates the Django Admin to include screens for discount redemptions, and to display discounts applied on each order.

How should this be manually tested?
Ensure your setup has a valid product and course combination set up.
Add a discount code in via djadmin and note the code you create.
Add a product to your cart, and then apply the discount code using the form in Order Summary.
The discount should be applied successfully and the price should reflect the discounted amount.
To test adding multiple codes to an order: follow the same instructions as above but add more than one discount. Then, apply a discount code after applying a discount code. The new code should take precedence over the old one.
To test user discounts: follow the first two steps under the standard test, then also add a User Discount record. Log in as the user you added the discount for and add a product to the cart. You should see that the discount has been applied to the cart automatically. Applying another discount over the user discount should override the user discount, but clearing the discount should re-apply the user discount. Other accounts in the system should not have the discount applied to their carts automatically.
Any background context you want to provide?
Rules as follows:

Only a single discount can be applied to a given cart - any additional discounts added after the first override the last added discount.
User discounts are always applied, unless overridden by another discount.
Discounts that have hit the maximum number of redemptions (either by hitting the value in max_redemptions, or by virtue of being a "one-time" or "one-time-per-user" discount type) will return a "not found" and won't be applied.
Discounts are applied to the total amount in the cart (there's only one allowed item in the cart right now, though)

Also of note:

Error and success states right now pop a standard banner notification. This wasn't in the InVision mockup - seemed reasonable so included it.
The "Adding another discount" text disappears if there's not already a discount applied.
Clear Discount only appears if there's a discount to clear. The front-end has no idea (right now) if a discount is a user discount or not so you can clear a user discount; it just won't apparently do anything as the discount will just get reapplied.
Fixed Price discounts probably need some styling help - I added Fixed Price text in there to differentiate them from the dollar off or percent off discounts. Input appreciated for this.

Screenshots (if appropriate)
Desktop:

Mobile:

https://github.com/mitodl/mitxonline/pull/444/commits/68b5c4546671ef03019856f0c41bd18ac710feb4 should handle all the comments from Friday (3/4).


SDKS-1925 Extra debug log

Provide more debug log for developer to debug the SDK State.
JIRA Ticket
Please link jira ticket here
Description
Briefly describe the change and any information that would help speedup the review and testing.
Definition of Done Checklist:

[ ] Acceptance criteria is met.
[ ] All tasks listed in the user story have been completed.
[ ] Coded to standards.
[ ] Ensure backward compatibility.
[ ] API reference docs is updated.
[ ] Unit tests are written.
[ ] Integration tests are written.
[ ] e2e tests are written.
[ ] Functional spec is written/updated.
[ ] contains example code snippets.
[ ] Change log updated.
[ ] Documentation story is created and tracked.
[ ] Tech debts and remaining tasks are tracked in separated ticket(s).

Looks good to me,


Look into utilizing window.onbeforeunload for better "Exit Intent" experience

https://javascript.info/onload-ondomcontentloaded
window.onbeforeunload = function() {
    return "Your donation is not yet complete";
};

We can do this, but I'm not sure if we should and if you'll get in trouble with the SEO gods for doing so.

We have our own exit intent handling now


Annual automation to update license headers in registry-operator

Which area/kind this issue is related to?

/area ci
/area releng
Issue Description

A process would run an update on the year entry under the registry-operator license header file annually at the start of the new year to remove the need to do this manually on a yearly basis.
Acceptance Criteria

[ ] Create script to update the year within the registry-operator license header file
[ ] Setup a GitHub workflow to run this script annually

/area ci
/area releng


Binance - instant trading

Hey folks,
Currently searching the code to find my own way of doing this, in the meantime I thought I'd ask how to make Gekko instantly trade using the taker fee.
I'm on Binance, maker and taker fee are the same so it seems counterproductive not to instantly trade (I've seen trades going in at a slight difference to market price and get constantly adjusted up or down as the price moves, never really being filled on time..).
I understand we'd also need to look at the markup / markdown bid compared to the current price.
Has anyone done this yet?

OK, what about the location of where gekko sets its markup / markdown for the buy/sell orders?
I'm editing the ping-pong strategy just because it has these allowances within the script.
Not getting trades placed yet, i'll check in the morning.. :)

check out plugins/trader if you cant wait for the next version.

yea thats exactly where I am, didn't see a numerical value/calculation for markup/markdown so took the lines from pingpong and edited.
It reaches it's history in about 25mins, we'll see if there's a trade.
Thanks for your input, was looking for a specific file/line but appreciate you chiming in anyway 👍

dup of #2241


Poor detections with SwinB backbone

Hi everyone,
I was testing Grounding Dino with SwinB backbone and I found that, unexpectedly, it detects less objects than Grounding Dino SwinT. For example, when asking for "light bulb", G-DINO SwinT finds almost all bulbs but G-DINO SwinB founds no one. Any explanation?
IMAGE_PATH = "weights/dog-3.jpeg"
TEXT_PROMPT = "light bulb"
BOX_TRESHOLD = 0.35
TEXT_TRESHOLD = 0.25

G-DINO SwinT (backbone = "swin_T_224_1k"):

G-DINO SwinB (backbone = "swin_B_384_22k")

I also tried tunning thresholds but it randomly detects other objects. Any idea? Am I missing any configuration detail?
Thanks in advance!

Hello, do you use the same box_threshold for both Swin-T and Swin-B, you can set a lower threshold for Swin-B model

Hi! Yes, I also tried lowering the threshold and a lot of false positive are triggered. Some examples:
BOX_TRESHOLD = 0.10:

BOX_TRESHOLD = 0.15

Hi @dankresio
I tried the swin_B model on your image and the default threshold values and I'm getting the same results as you. It is not able to detect light bulb. I even tried changing the prompt to just "bulb", that also did not work. However it is able to detect other classes like dog, sunglasses.
TEXT_PROMPT = "dog . bulb . sunglasses ."

Same here.
I tested the two models on thousands of images and swin_T works better than swin_B

Hi @rohit901. The problem is that:

Even if it can detect some other classes like "dog" or "sunglasses" correctly, they are detected with lower confidence when using SwinB than when using SwinT (however, confidence changes could be caused due to backbone architecture changes) and some others are missing.
SwinB model is supposed to be more powerful thant SwinT

Just to give some context:

SwinT (tiny) backbone has 86M parameters and has been trained with 1k classes and input image size 224, while
SwinB (base) backbone has 145M parameters and has been trained with 22k classes and input image size 384

When increasing architecture size and the number of classes used for pre-training the backbone, you let the backbone learn richer features, which leads to better performance
When increasing input image size, you let the model to improve spatial resolution and so, detect smaller objects
So, to sum up, rationally it does not make sense that "G-DINO SwinB" flavour works worse than "G-DINO SwinT".
Btw, @psykokwak-com thanks for corroborating the issue!
@rentainhe @HaoLiuHust , is there any idea of releasing SwinL backbone for G-DINO? or an improved version of SwinB backbone.
Thanks in advance, and great work with this repo! I'm enjoying a lot testing it

I also have found this problem after testing some pictures

@rohit901 I think that the point is that Swin-T weights are fine tuned in COCO while Swin-B weights not (just my conclusion, doesn't have to be the correct one)

@danigarciaoca, I wanted to replicate the results mentioned in Table 3 of the paper on LVIS, where I think even Swin-T is getting AP of 25.6 / 27.4.. from my experiments I was not able to replicate that AP..
I will be checking their latest code on zero-shot COCO eval and try to report back.

I'll stay tuned! thanks @rohit901

I'm discussing the mAP result replication in this separate thread https://github.com/IDEA-Research/GroundingDINO/issues/147 if you're interested to follow on @danigarciaoca..
It seems we aren't supposed to be filtering out low confidence/noisy box prediction with thresholds when calculating mAP metric, it is only for visualization purposes I guess?

@rohit901 I think the main point is that Swin-T weights are fine tuned in COCO while Swin-B weights are not (just my conclusion, doesn't have to be the correct one)

I think  Swin-B weights are finetuned in COCO, so its open-set detection ability is heavily inferenced, for COCO only have 80 class. That is why you can detect dog and glasses well with Swin-B weights rather than light bulb~~

@rohit901 I think the main point is that Swin-T weights are fine tuned in COCO while Swin-B weights are not (just my conclusion, doesn't have to be the correct one)

I think Swin-B weights are finetuned in COCO, so its open-set detection ability is heavily inferenced, for COCO only have 80 class. That is why you can detect dog and glasses well with Swin-B weights rather than light bulb~~

the authors @rentainhe @SlongLiu can confirm

May I ask where you guys downloaded the SwinB weight? The instruction in README only provided this link:
mkdir weights
cd weights
wget -q https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha/groundingdino_swint_ogc.pth
cd ..

May I ask where you guys downloaded the SwinB weight? The instruction in README only provided this link:
mkdir weights
cd weights
wget -q https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha/groundingdino_swint_ogc.pth
cd ..

It's in the latest release (i.e. v0.1.0-alpha2). The direct link being: https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha2/groundingdino_swinb_cogcoor.pth.
Also, you would need to use this config file instead of the one used in most tutorials with SwinT.


Evaluate Projects in this list and on-board them to Bacalhau (datasets and sample computation)

https://www.reddit.com/r/MachineLearning/comments/wwdqp8/d_ml_for_good/?utm_source=share&utm_medium=ios_app&utm_name=iossmf

could be some interesting stuff in here to investigate @js-ts


get_large_files.py can not connect to hypocenter.usc.edu

Retrieving files from: http://hypocenter.usc.edu/research/ucvmc/V19_4 Installing files in: /root/software/UCVMC/largefiles Retrieving:  proj-5.0.0.tar.gz Exception retrieving and saving largefile: <class 'urllib2.URLError'> Error downloading (http://hypocenter.usc.edu/research/ucvmc/V19_4/lib/proj-5.0.0.tar.gz), or writing file (./proj-5.0.0.tar.gz) Retrieving:  cvms5.tar.gz Exception retrieving and saving largefile: <class 'urllib2.URLError'> Error downloading (http://hypocenter.usc.edu/research/ucvmc/V19_4/model/cvms5.tar.gz), or writing file (./cvms5.tar.gz) Retrieving:  ucvm.e Exception retrieving and saving largefile: <class 'urllib2.URLError'> Error downloading (http://hypocenter.usc.edu/research/ucvmc/V19_4/etree/ucvm.e), or writing file (./ucvm.e) Retrieving:  test-grid-lib-1d.ref Exception retrieving and saving largefile: <class 'urllib2.URLError'> Error downloading (http://hypocenter.usc.edu/research/ucvmc/V19_4/ref/test-grid-lib-1d.ref), or writing file (./test-grid-lib-1d.ref) Completed all required downloads to build the UCVMC programs.
I can't resolve hypocenter.usc.edu from any of the DNS servers I've tried.

Hi,
It looks like hypocenter is not reachable at this moment. we will try to resolve as soon as possible.
thanks
Mei

From: mfsteve<EMAIL_ADDRESS>Sent: Monday, October 28, 2019 6:50 AM
To: SCECcode/UCVMC<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Subject: [SCECcode/UCVMC] get_large_files.py can not connect to hypocenter.usc.edu (#112)
Retrieving files from: http://hypocenter.usc.edu/research/ucvmc/V19_4 Installing files in: /root/software/UCVMC/largefiles Retrieving: proj-5.0.0.tar.gz Exception retrieving and saving largefile: <class 'urllib2.URLError'> Error downloading (http://hypocenter.usc.edu/research/ucvmc/V19_4/lib/proj-5.0.0.tar.gz), or writing file (./proj-5.0.0.tar.gz) Retrieving: cvms5.tar.gz Exception retrieving and saving largefile: <class 'urllib2.URLError'> Error downloading (http://hypocenter.usc.edu/research/ucvmc/V19_4/model/cvms5.tar.gz), or writing file (./cvms5.tar.gz) Retrieving: ucvm.e Exception retrieving and saving largefile: <class 'urllib2.URLError'> Error downloading (http://hypocenter.usc.edu/research/ucvmc/V19_4/etree/ucvm.e), or writing file (./ucvm.e) Retrieving: test-grid-lib-1d.ref Exception retrieving and saving largefile: <class 'urllib2.URLError'> Error downloading (http://hypocenter.usc.edu/research/ucvmc/V19_4/ref/test-grid-lib-1d.ref), or writing file (./test-grid-lib-1d.ref) Completed all required downloads to build the UCVMC programs.
I can't resolve hypocenter.usc.edu from any of the DNS servers I've tried.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_SCECcode_UCVMC_issues_112-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DACE7UF7QUWH6QDPIMECRQ6LQQ3U2LA5CNFSM4JF2N4Z2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HUYS3QQ&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=hCwk_stuE2kiGsjuxw7tlQ&m=Hoe7gRXJgD6W7scFCP0y4w-Iz42O6q1Dw80OtxiHuLw&s=eSNxZ08NVuzd2Jk_nOtd1gL6yVaOHdqM5YBJ4st7AFc&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ACE7UFZL77UZXNP6NBMZTLTQQ3U2LANCNFSM4JF2N4ZQ&d=DwMFaQ&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=hCwk_stuE2kiGsjuxw7tlQ&m=Hoe7gRXJgD6W7scFCP0y4w-Iz42O6q1Dw80OtxiHuLw&s=0tWKBG452czO0Ebd73CHGJNUCqXKhHz6PLUZzympI2w&e=.

Working now.


⚠ Bofrost.ch has degraded performance

In 0bbb6fd, Bofrost.ch (https://www.bofrost.ch) experienced degraded performance:

HTTP code: 200
Response time: 5554 ms

Resolved: Bofrost.ch performance has improved in d2fb306 after 7 minutes.


Update to 1.19.4 (closes #5)

after 2 days and approx. 10 hours, i was able to update the mod. (thanks java)
tested it, works flawlessly (somehow)
i still cant believe the commit is just 3 files tho

Thanks!
For the better explanation in the README, I'm gonna remove it from this PR to keep things simple. I like the general theme of it, as thinking about it now, the current README really doesn't do the mod justice.


scikit-learn style fit and predict

added fit and predict methods for all classes

Codecov Report

Merging #3 (1c9dbc9) into main (62d7bb1) will decrease coverage by 0.10%.
The diff coverage is 88.23%.


⚠ Bofrost.de has degraded performance

In 96a42fc, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1657 ms

Resolved: Bofrost.de performance has improved in f808651 after 27 minutes.


feat(lift): leveraged lift to simplify the initial scaffolding logic

a mostly complete (eslint configs still need a little special handling) start to leveraging at least the js piece of the lift process to reduce the duplication and take a big step toward the "simple creation first; update later" philosophy

just to capture the detail, there is no integration coverage of the dependency installation that makes sure that the correct dependencies get installed. since execa is stubbed, that means that npm installation doesnt actually happen and therefore we cannot inspect the resulting state of the package.json. instead, the only place to inspect is the call to execa. i did attempt to add a td.verify that would pin the behavior before making this change, but for some reason td isnt recording this particular call. my best guess is that it has something to do with the package boundary that exists because of the installation happening in @form8ion/javascript-core


Add a extension gulp-reporter

gulp-reporter used in team project, it fails only when error belongs to the current author of git.

Coverage remained the same at 100.0% when pulling 48a41da59fa0760fc0ae4626563e6e82b7879cf9 on gucong3000:gulp-reporter into 132d5cc8276a58d0339c421663c72f04ea88b3e8 on adametry:master.

Your plugin violates the gulp plugin guideline:

Your plugin should only do one thing, and do it well.

Introducing eslint in an obsolete team project is a frustrating thing.
That would create massive errors that belong to different developers of different periods.
The most important thing about gulp-reporter is to clear away this barrier to introducing eslint in an obsolete team project.
It will assign each errors to its author, not just throw to current developer.

Again, gulp-reporter should only do one thing. We cannot recommend using invalid plugins in our README.
filterByAuthor must not be included in your plugin. Instead, create a single function module detect-error-author and users can use it with the existing Vinyl filtering plugin, for example gulp-if and gulp-filter.

@shinnn Thank you very much for your advice.

Again, gulp-reporter should only do one thing.
A new version has been published.
Can I add a link now?

Still unclear for me what the plugin does. What do you mean by "error report localization"? At first glance  "localization for error reports" sounds "language localization for error reports" but it doesn't seem to have any L10N features.

Still unclear for me what the plugin does.
Analyzing blame of the error, only fail for new error and error written by the current GIT user.

@shinnn Whould you please help me perfect document, my English is very poor.
https://github.com/gucong3000/gulp-reporter/tree/doc#readme


chore: bdd-gh-1586516509 to 0.0.1

chore: Promote bdd-gh-1586516509 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Feature Request: a way to opt out of "hermetic python"

Hi! We're encountering issues concerning https://github.com/google/jax/pull/20469 with the jax{,lib} packages in Nixpkgs. It is crucial to our project to bootstrap the python interpreter from scratch and outside bazel, rather download a prebuilt one from the internet. We've been relying on bazel selecting the system python (setting PYTHON_BIN_PATH) for this. Right now we're looking into reverting the respective diff ad hoc, but we'd prefer a tighter integration
Thanks
Please:

[x] Check for duplicate requests.
[x] Describe your goal, and if possible provide a code snippet with a motivating example.

Hello @SomeoneSerge,
For the projects which want to provide their own Python interpreter (a Linux distribution would be a good example of that) there is a way to doe exactly that. For the other concerns, please check my response in the corresponding nixpkgs thread.
Specifying your own Python interpreter
For a basic example of specifying your own interpreter please check Building with pre-release Python version.
Note, you do not have to follow those instructions directly if you don't want. The only thing that you actually need is to be able to specify a path to your desired (hopefully working) python interpreter in the end. The instructions just serve the purpose of obtaining such working custom interpreter, if you already have one, you can skip directly to the last step:
To use newly built Python interpreter add the following code snippet RIGHT AFTER python_init_toolchains() in your WORKSPACE file.
load("@rules_python//python:repositories.bzl", "python_register_toolchains")
python_register_toolchains(
    name = "python",
    # By default assume the interpreter is on the local file system, replace
    # with proper URL if it is not the case.
    base_url = "file://",
    ignore_root_user_error = True,
    python_version = "3.13.0a6",
    tool_versions = {
        "3.13.0a6": {
            # Path to .tar.gz with Python binary.
            "url": "/full/path/to/your/python_dev-3.13.0a6.tgz",
            "sha256": {
                # By default we assume Linux x86_64 architecture, eplace with
                # proper architecture if you were building on a different platform.
                "x86_64-unknown-linux-gnu": "cd99233ccd2df426208be3d394e1b89bbb2511caf389cfa9df7bab624a6cdc24",
            },
            "strip_prefix": "python_dev-3.13.0a6",
        },
    },
)

Mimic old non-hermetic behavior (very very not recommended)
We do not support and do not recommend this use case, but it is still possible with a little bit of work on your side.
The instructions above assume you have python packaged as a standalone .tgz archive. If you still want to just depend on whatever is installed locally on your system, you can go further but there is an important thing to know before doing so (which may affect your decision):
Even in previous non-hermetic python setup, it was wrapping system python inside bazel rules and copying parts of your system python package inside bazel's cache to be abele to use it for the rest of the build. I.e.  non-hermetic python acted almost as it was still downloading a python from somewhere, it was just that "somewhere" happened to be your local environment.
With that being said, you can mimic old non-hermetic python setup by having a custom repository rule which would search your local system, package it in a form of a standalone archive to match structure of the ones we currently depend on (the structure there matches default layout you would get when build vanill Python from official sources) and then provides the packaged archive to the value for url field in the code snipped above.
Note, we do not provide such custom local-file-system-search rule ourseves and do not plan to, as it basically would re-introduce the non-hermetic python with all its issues, such as being very fragile and non-reproducible setup, but it is not very difficult to implement such on your side, especially if you do not need to make it generic (if it matches only NixOS structure, than it would be much easier to implement and maintain than something which should work on any linux system).

Hi! Thank you @vam-google, for a prompt and comprehensive reply. I hope my comment about "random executables" in the other issue wasn't too rude, otherwise I'm prepared to apologize:)
We'll look into implementing a solution along the lines of the snippet you provided. I expect it won't be a "smooth ride".
I think it's best I avoid "explaining Nix" in this thread (maybe we reserve the Nixpkgs issue for that) and focus on our integration with Bazel. Suffice it to say that Nix and Bazel overlap in scope, which is why (1) we're not concerned about reproducibility and correctness of "system packages", and (2) why having Bazel set up its own sandbox and copy these packages into new locations has been problematic.
For now, there are two implementation details about the python we build I'm worried about:

Currently, we only consider our outputs "correct" if they're deployed at certain pre-defined locations: e.g. /nix/store/<hash>-python-<version>/bin/python will have a PT_INTERPTER pointing at a specific /nix/store/<hash>-glibc-<version>/lib/ld-linux<...>.so, etc. Things would likely still work: since Bazel implements hermetic builds, I presume it would patchelf the executables it "downloads"?
We only consider our outputs "correct" when referential integrity is maintained: if <...>/bin/python references <...>/libz.so, this python can only be deployed together with it. We have ways to inspect and export the full "closure" of such a package, but we've never explicitly provided Bazel's "old non-hermetic python" with this information. Does this mean that Bazel has been copying "our python" and relinking it to different versions of dependencies for the duration of the build?

Perhaps these notions of "correctness" (=conditions under which we're ready to "guarantee" our software will work) also clarify why I believed it would be easiest for us if we could relax Bazel's sandbox and let it see the pre-deployed toolchain


algorithm nullable properties

feat: delete algorithm nullable properties

Once we set algorithm properties, there is no way to delete these props:
{
    "name": "algorithmName",
    "algorithmImage": "algorithmImage",
    "baseImage": "hkube/image",
    "algorithmEnv": {
        "MY_ENV": "value"
    },
    "workerEnv": {
        "MY_ENV": "value"
    },
    "quotaGuarantee": 5,
    "labels": {
        "hkube.io/key": "label"
    },
    "downloadFileExt": "jpg",
    "annotations": {
        "hkube.io/key": "annotation"
    },
    "nodeSelector": {
        "hkube.io/key": "selector"
    }
}

tested on 2.1


Implement a way to generate an Ordering[A] given a Schema[A]

Add the following method to Schema[A]:
def ordering: Ordering[A]

This will be easier after #36

This can now be completed with DynamicValue.

I'd like to give this a try

Sorry for blocking this for so long. I didn't get to it before I went on vacation. Here's a WIP:
https://github.com/zio/zio-schema/pull/117


[Fix #3308] Make Lint/NextWithoutAccumulator aware of nested enumeration

This cop would register an offense if a nested block contained a next without an accumulator.
[(1..3), (4..6)].reduce(0) do |acc, elems|
  elems.each_with_index do |elem, i|
    next if i == 1
    acc << elem
  end
  acc
end

This fix addresses that, by checking if the direct block parent of any offending next is indeed the block that we were inspecting.

@bbatsov: Rebased.


feature: RadioButton V3

The type of this PR is: Feature

This PR resolves CX-1700
Description
This PR adds the new V3 Radio buttons and uses them depending on the current theme.

PR Checklist (tick all before merging)

[x] I have included screenshots or videos to illustrate my changes, or I have not changed anything that impacts the UI.
[x] I have tested my changes on iOS and Android.
[x] I have added tests for my changes, or my changes don't require testing, or I have included a link to a separate Jira ticket covering the tests.
[x] I have added a feature flag, or my changes don't require a feature flag. (How do I add one?)
[x] I have documented any follow-up work that this PR will require, or it does not require any.
[x] I have added an app state migration, or my changes do not require one. (What are migrations?)
[x] I have added a changelog entry below or my changes do not require one.

Changelog updates
Changelog updates

Cross-platform user-facing changes

Add V3 Radio button component (behind feature flag) - rajsam003

iOS user-facing changes

Android user-facing changes

Dev changes

#squashongreen


Remove brew-boneyard

There is a more complete boneyard-formula-pr command in the main repo.

:+1:


Attribute error: nonetype object has no group

Hi, I'm new to this Program Python / Instagram Bot
I'm getting this message .
Is there anyhelp i can use?

Hi @JustianJK, visdom is not an instagram bot. Are you sure you're posting in the right place? instabot doesn't exist anywhere in our codebase.


SFU has no action after received the answer.

Your environment.

Version: v1.8.1
Client: 1.5.6
Environement: VM
Are you using a TURN server? coturn

What did you do?
Connected two clients
What did you expect?
Reconnect the client
What happened?
The SFU service got no action after received an answer. This has happened when SFU service got a send nack message.
[2021-01-25 07:51:36.151] [TRACE] [93][downtrack.go][func1] => sender got nack: TransportLayerNack from 1
	Media Ssrc 40de8ea1
	ID	LostPackets
	1567	0

[2021-01-25 07:51:47.236] [INFO] [245][peer.go][Close] => RemovePeer ckkc9u4nc000ge830nxq2zvze from session
[2021-01-25 07:51:47.236] [DEBUG] [66][once.go][doSlow] => Closing sender ckkc9tz8w000fe830idljaisc
[2021-01-25 07:51:47.236] [DEBUG] [66][once.go][doSlow] => Closing sender ckkc9tz8w000fe830idljaisc
[2021-01-25 07:51:47.236] [DEBUG] [63][publisher.go][func3] => ice connection state: closed
[2021-01-25 07:51:47.236] [DEBUG] [68][publisher.go][func3] => webrtc ice closed for peer: ckkc9u4nc000ge830nxq2zvze
[2021-01-25 07:51:47.236] [DEBUG] [58][subscriber.go][func1] => ice connection state: closed
[2021-01-25 07:51:47.237] [DEBUG] [66][once.go][doSlow] => webrtc ice closed for peer: ckkc9u4nc000ge830nxq2zvze
[2021-01-25 07:51:47.486] [DEBUG] [99][peer.go][func1] => peer ckkc9tz8w000fe830idljaisc negotiation needed
[2021-01-25 07:51:47.487] [INFO] [108][peer.go][func1] => peer ckkc9tz8w000fe830idljaisc send offer
[2021-01-25 07:51:47.514] [INFO] [201][peer.go][SetRemoteDescription] => peer ckkc9tz8w000fe830idljaisc got answer

It seems that the peer con disconnected this may happen by many reasons, are you using json-rpc? if so make sure that if you are using a reverse proxy the connection is note getting timed out

It seems that the peer con disconnected this may happen by many reasons, are you using json-rpc? if so make sure that if you are using a reverse proxy the connection is note getting timed out

It seems that the peer con disconnected this may happen by many reasons, are you using json-rpc? if so make sure that if you are using a reverse proxy the connection is note getting timed out

I'm using the json-rpc. The socket didn't get disconnected. Seem that the peer con was removed because the ice connection state is closed. The SFC server was sending the offer a second time and the client had sent back the answer, but the SFU got no action after received the answer (Last 2 lines).

It seems that the peer con disconnected this may happen by many reasons, are you using json-rpc? if so make sure that if you are using a reverse proxy the connection is note getting timed out

I'm using the json-rpc. The socket didn't get disconnected. Seem that the peer con was removed because the ice connection state is closed. The SFC server was sending the offer a second time and the client had sent back the answer, but the SFU got no action after received the answer (Last 2 lines).

I don't know if this can help. The client got this message after setting the local description by triggered by the second time offer from the SFU server.

I don't know if this can help. The client got this message after setting the local description by triggered by the second time offer from the SFU server.

I got a lot of invalid total lost count error messages on SFU server. Any idea?
[2021-01-27 00:30:12.875] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:13.905] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:14.912] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:15.944] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:16.970] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:17.977] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:19.005] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:20.036] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:21.036] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:22.068] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:23.093] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:24.157] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:25.211] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:26.274] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:27.275] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:28.303] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:29.331] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:30.369] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:31.397] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:32.403] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:33.438] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:34.464] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:35.466] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:36.492] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count

I got a lot of invalid total lost count error messages on SFU server. Any idea?
[2021-01-27 00:30:12.875] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:13.905] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:14.912] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:15.944] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:16.970] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:17.977] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:19.005] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:20.036] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:21.036] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:22.068] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:23.093] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:24.157] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:25.211] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:26.274] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:27.275] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:28.303] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:29.331] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:30.369] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:31.397] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:32.403] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:33.438] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:34.464] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:35.466] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count
[2021-01-27 00:30:36.492] [ERROR] [259][router.go][sendRTCP] => Write rtcp to peer ckkeoyw9c00042o30ulf5y34q err :rtcp: invalid total lost count

Does this happens on join?
If so does the SFU is in remote server? if so, make sure the udp ports are open, and if it does not have a public IP, configure a STUN server.
The error is due to a big packet lost rate, it should not be possible in normal scenario, it's hard to tell what the issue is

Does this happens on join?
If so does the SFU is in remote server? if so, make sure the udp ports are open, and if it does not have a public IP, configure a STUN server.
The error is due to a big packet lost rate, it should not be possible in normal scenario, it's hard to tell what the issue is

This is not happen on join.
The SFU server is a remote server.
All UDP ports are opened.
It has a public IP and also configured with a STUN/TURN server.
Ok, maybe I should find the network guy to check it for me. Many Thanks!!

This is not happen on join.
The SFU server is a remote server.
All UDP ports are opened.
It has a public IP and also configured with a STUN/TURN server.
Ok, maybe I should find the network guy to check it for me. Many Thanks!!

@niko-chiu please try with latest master, and see if the error is fixed

@niko-chiu please try with latest master, and see if the error is fixed


Found an issue when building the cluster locally

I needed to create a multipass instance with a larger disk space so decided to start from scratch found an error when running this command:
$ kustomize build \     https://github.com/c0c0n3/kitt4sme.live/deployment/mesh-infra/argocd | \     kubectl apply -f -
And found that the static page was missing the code from argocd directory.

I have just deployed this locally to speed up the process i will merge this PR as most are on holiday and it will cause issues if it is not merged.


Update makefile and test extractions and validation vs schema v8.0.0

For Stegen Study
nmdc:sty-11-aygzgv51
Formerly: gold:Gs0114663

Won't Do

Closing as Won't Do


Web - Bank account - Label of checkbox should not be highlighted as it doesn't let get the checkbox be checked in one clicking

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Open website
Click on Settings > Workspaces > any workspace > Bank account > Connect manually
Reach 2nd or 3rd step and click on checkbox's label at least 4 5 times. You can see here that Label of checkbox is highlighted and it doesn't let get the checkbox be checked in one clicking

Expected Result:
Label of checkbox should not be highlighted as it doesn't let get the checkbox be checked in one clicking
Actual Result:
Label of checkbox is highlighted and it doesn't let get the checkbox be checked in one clicking
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: v1.3.52-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/115492554/bd59f076-214a-434f-aa08-7230d4150c67
https://github.com/Expensify/App/assets/115492554/4b9a8acc-c672-4810-8a34-ae64aedc9194
Expensify/Expensify Issue URL:
Issue reported by: @mahmudjontoraqulov
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691125251472969
View all open jobs on GitHub

potentially related to https://github.com/Expensify/App/issues/22526

@mvtglobally I think https://github.com/Expensify/App/issues/22526 is completely different. There the issue was about flickering text. In here the issue is about beeing highlighted.

I'm not able to reproduce and I don't really see a bug here. When I click on the text it checks the box as expected. When I click the text again it unchecks the box. I tested on both the second and third step in the process.


Baritone right click options are broken when Prefer overworld waypoints is on

When the setting "Prefer overworld waypoints" is turned on and you try to use the baritone right click goal thingy in the nether you end up at 8x the coordss that you wanted to go to
Video showcasing the issue -> https://www.youtube.com/watch?v=6ZhgYIO6J6w

As a workaround you can right click next to the waypoint and create a baritone goal, and then it should path you to the nether coords.

Resolved in https://github.com/rfresh2/XaeroPlus/releases/tag/Forge-1.12.2-142
will port to 1.20 versions later

I love you <3

Forge 1.20: https://github.com/rfresh2/XaeroPlus/releases/tag/Forge-1.20.1-21
Fabric 1.20: https://github.com/rfresh2/XaeroPlus/releases/tag/Fabric-1.20.1-34


SampleMail: a small issue with the Refresh...

 I don't have this issue on Mosby 1.2 but on the newest version. i also get this only on real devices (Nexus 5) not on Genymotion ...

I think that is a SwipeRefreshLayout issue (support library). Please report this issue in support library issue tracker.


Update iot-suite-what-are-preconfigured-solutions.md

fixed typo

Hi @soeren-lubitz, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

@soeren-lubitz : Thanks for your contribution to the Azure documentation! The author, @dominicbetts, has been notified to review your proposed change.

@soeren-lubitz : Thanks for spotting this and taking the time to make the correction.

#sign-off


Avoid pre_buffer=True when an fsspec precache method is specified

This is a small follow-up to #8952, where the pre_buffer=True option was added to the "pyarrow" parquet engine.
After that PR was merged, I was experimenting with fsspec pre-caching (by adding open_file_options={"precache_options": {"method": "parquet"}} to the dd.read_parquet call to the benchmark code in #8946), and I ran into an Error:
2022-04-20 10:23:45,599 - distributed.worker - WARNING - Compute Failed
Key:       ('read-parquet-1cf5073fb5ff1c76f997f0383e69073f', 0)
Function:  subgraph_callable-7500d0e9-22a1-4851-b868-712f9b34
args:      ({'piece': ('ursa-labs-taxi-data/2009/01/data.parquet', None, None)})
kwargs:    {}
Exception: 'OSError("Couldn\'t deserialize thrift: TProtocolException: Invalid data\\nDeserializing page header failed.\\n")'

It seems that pyarrow's pre_buffer optimization does not play well with fsspec's open_paruqet_file code path. Therefore, this PR adds a small change to check the precache_options dict before setting pre_buffer to True.
Note that I am not sure if there is a reasonable to add test coverage for this change. The existing open_file_options test in test_s3.py did not catch the bug, so it may be difficult to reproduce the motivating bug with small/toy data.

It is also worth noting that the performance of using open_file_options={"precache_options": {"method": "parquet"}} is pretty similar to using pre_buffer=True in the benchmark in https://github.com/dask/dask/issues/8946

Thanks @rjzamora


Use a UI framework to make things look nicer with minimal effort.

Personally, I like and have some experience with: https://react.semantic-ui.com/introduction. Any other suggestions?

I would say @osdiab managed this w/o a framework. Good enough for now!


chore: update go dependencies [SSPROD-17688]

superseded by changes landed in https://github.com/draios/skopeo/tree/sysdig-patches branch


Searching words with ending wildcards returns inconsistent results

For example, on https://olivernn.github.io/moonwalkers/, both pilot and pilot* will return the results I expect. However, module* returns nothing (while module works as I expect).

This looks like a problem caused by stemming.
When a search is made without a wildcard the search terms are passed through the search pipeline, which by default includes a stemmer. When a wildcard is part of the search term lunr does not pass the term through the pipeline. This is because the term with wildcard might not be a full word and therefore stemming would give incorrect results.
The reason why "module" shows this problem is that because it is stemmed to "modul" while "pilot" is stemmed to "pilot", you can try this on the demo site console:
idx.pipeline.runString("pilot") //= ["pilot"]
idx.pipeline.runString("module") //-["modul"]

So, when searching for "module*" lunr is looking in the index for anything beginning with "module", but there is nothing found, since all the "module" terms in the documents have actually been indexed as "modul". Again, you can inspect the index to see this:
idx.invertedIndex["modul"]

And trying to find the token in the set of known tokens:
idx.tokenSet.intersect(lunr.TokenSet.fromString("module*")).toArray() //= []
idx.tokenSet.intersect(lunr.TokenSet.fromString("modul*")).toArray() //= ["modul"]

I'm not sure the best way to handle this at the moment, I'll have to think about how wildcards and stemming interact before proposing a solution.

@olivernn - thanks for looking into this.  (and thanks for lunr!)
I noticed this when we were trying to update https://developers.arcgis.com/javascript/latest/sample-code/ from lunr v.0.7.2 to v2.0.0.  At 0.7.2 there wasn't a need for a wildcard - and we like that behavior.
I don't fully understand the stemming/index logic, but is there a way to get "back" the behavior from 0.7.2 where user didn't need to add wildcards in order to get "starts with" functionality?

What I noticed from peoples use case of lunr is that, for typeahead style search, the automatic wildcard could give nice results, as shown on your site. However it would frequently cause unexpected results, just take a look through some of the closed issues.
I was thinking about what the best way to express a query for typeahead search might be, there obviously needs to be a component searching for the beginning of a string, but it should also look for exact matches. Perhaps also allow for some fuzzy matching too?
All of the above are possible with lunr. I would advise looking into the lunr.Index#query method, it is intended to be used for building queries programatically (it is used internally by lunr.Index#search).
Below is an example of what I was thinking for typeahead search:
idx.query(function (q) {
  // look for an exact match and apply a large positive boost
  q.term(queryTerm, { usePipeline: true, boost: 100 })

  // look for terms that match the beginning of this queryTerm and apply a medium boost
  q.term(queryTerm + "*", { usePipeline: false, boost: 10 })

  // look for terms that match with an edit distance of 2 and apply a small boost
  q.term(queryTerm, { usePipeline: false, editDistance: 2, boost: 1 })
})

The only slight wrinkle is having to manually append a wildcard to the query term, perhaps this should be an option, e.g. wildcard with the values trailing | leading | wrapped | none, I'll have a think about it.
You could express this within a query string and the search method like this if you want to try things out:
idx.search("${queryTerm}^100 ${queryTerm}*^10 ${queryTerm}~2")

idx.search("${queryTerm}^100 ${queryTerm}*^10 ${queryTerm}~2")
Running this gives me duplicate index error in console
Not sure If I'm using it correctly, but I get duplicate index every time I try to search with multiple terms and fuzzy matches at the same time. Example: id:${queryString}^10 (${queryString}~1)

I'm also trying to search with wildcards. For example, I have a text that contains the word "notifications" and I would like the search to yield about the same number of results while the user is writing the term in the input field. At the moment, notific gives about 13 results, while if the user adds a letter and writes notifica no results are return.
I tried the idx.search("${queryTerm}^100 ${queryTerm}*^10 ${queryTerm}~2") suggestion and it also gives me duplicate index error.
I also tried to add a wildcard before and after the value *notifica* thinking it would solved the problem, but it didn't change anything.
Am I missing something ?

There is definitely a bug that is causing the duplicate index error. It seems to be when a search query term is expanded into a term that is already being considered as part of the index. That said I still don't fully understand it as doing a search for foo foo foo does not trigger the bug.
I need to spend a bit of time trying to debug this and figure out what is going on.

I've pushed a change that should fix the "duplicate index" error, please try version 2.0.3 and let me know if there are any issues.

That fix it, thanks a lot.

@IYCI  glad that its working for you now, thanks for taking the time to report the problem and testing the fix.
@bsvensson does that search query I suggested work as expected for you?

Thanks, it fixes the error.
It still doesn't return what I would expect though.
Here are the different queries followed by the number of results they return.
noti^100noti*^10noti~2 : [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
notif^100notif*^10notif~2 : [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
notifi^100notifi*^10notifi~2 : [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
notific^100notific*^10notific~2 : [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
notifica^100notifica*^10notifica~2 []
notificat^100notificat*^10notificat~2 : []
notificati^100notificati*^10notificati~2 : []
notificatio^100notificatio*^10notificatio~2 : []
notification^100notification*^10notification~2 : [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
notifications^100notifications*^10notifications~2 : [Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
It's an odd behaviour that in the middle of the word notification it returns no results ?

@et1421 its difficult to say without access to the dataset you are searching, can you share the index?
You can see which tokens lunr is finding for those search terms manually:
idx.tokenSet.intersect(new lunr.TokenSet.fromString("notification")) // for the exact match
idx.tokenSet.intersect(new lunr.TokenSet.fromString("notification*")) // for the prefix search
idx.tokenSet.intersect(new lunr.TokenSet.fromFuzzyString("notification", 2)) // for the fuzzy search

It might give you some clues as to why some of those are not matching, while others are. If I had to guess, I'd say that the fuzzy search is finding something that the prefix search is not, but only after a certain length. You could try reducing the amount of fuzz, perhaps 1 is a better value, or by removing it entirely.
It might be easier to understand by actually looking at what the fuzzy string is expanded too, and also give you an idea the impact it has on search performance:
new lunr.TokenSet.fromFuzzyString("notification", 2).toArray()

I see that get expanded into 1204 different strings, with an edit distance of 1 this is only 52:
new lunr.TokenSet.fromFuzzyString("notification", 1).toArray()
[
  "*otifications",
  "*notifications",
  "otifications",
  "ontifications",
  "n*tifications",
  "n*otifications",
  "ntifications",
  "ntoifications",
  "no*ifications",
  "no*tifications",
  "noifications",
  "noitfications",
  "not*fications",
  "not*ifications",
  "notfications",
  "notfiications",
  "noti*ications",
  "noti*fications",
  "notiications",
  "notiifcations",
  "notif*cations",
  "notif*ications",
  "notifcations",
  "notifciations",
  "notifi*ations",
  "notifi*cations",
  "notifiations",
  "notifiactions",
  "notific*tions",
  "notific*ations",
  "notifictions",
  "notifictaions",
  "notifica*ions",
  "notifica*tions",
  "notificaions",
  "notificaitons",
  "notificat*ons",
  "notificat*ions",
  "notificatons",
  "notificatoins",
  "notificati*ns",
  "notificati*ons",
  "notificatins",
  "notificatinos",
  "notificatio*s",
  "notificatio*ns",
  "notificatios",
  "notificatiosn",
  "notification",
  "notification*",
  "notification*s",
  "notifications"
]

@olivernn - thank you for your quick replies.  Your suggested query is working pretty good for us.  So the original issue here is no longer an issue for us :)
We also see that the duplicate index is removed in 2.0.3.
We're still working on some finetuning for it, similar to @et1421's comments above.

You might find that the fuzzy search isn't required to get good typeahead search, it looks like it might cause some unexpected results. When you do settle on something that gives good results please do report back so others can benefit from your investigation.
If there is a good general approach it is something that lunr could support more directly, i.e. a specific method on lunr.Index for performing these typeahead queries.

@et1421 I'm going to close this issue now, if you can provide more details on the results you were seeing (specifically being able to provide the index) then please re-open this issue and I'll take a further look.

@bsvensson I've created a pull request with a proposal for easier support for adding wildcards to programatic queries. Would be interested to hear if this would make the implementation of your use case any cleaner.

I've been having a problem with wildcard searches on version 2.1.3, which seems to be related to this issue. Wildcard searches will return results up to a point, and then stop returning them. For example, I'm building an index using the following documents...
var documents = [
  {id: 1, text: 'critical stuff'},
  {id: 2, text: 'test'}
];

If I run a search for critic*, I'll get back results. But a search for critica* or critical* will return nothing. Is this a bug in the library? Or is there some way of configuring it to get this working as expected?

@larskendall without seeing how you set up your index its difficult to say for sure, but that looks like the result of stemming. "critical" stems to "critic" you can test this out with the following snippet:
idx.pipeline.runString("critical")

Further up in this thread there are a couple of suggestions for ways to express searches that will lead to the kind of results it seems you are expecting. An alternative is to disable the stemmer at build time and search time:
var idx = lunr(function() {
  //...snip...
  this.pipeline.remove(lunr.stemmer)
  this.searchPipeline.remove(lunr.stemmer)
  //...snip...
  // add documents here
})

@olivernn Looks like that did the trick! Thanks so much for the quick response!

idx.search("${queryTerm}^100 ${queryTerm}*^10 ${queryTerm}~2")

Thanks! This worked well for me.
However it should be ` instead of ", like this:
 idx.search(`${queryTerm}^100 ${queryTerm}*^10 ${queryTerm}~2`)

idx.search(${queryTerm}^100 ${queryTerm}*^10 ${queryTerm}~2)

Note I believe ^ may cause issues if queryTerm is multiple words as only the last word will get increased priority, does that sound right?


Header color and font size!

I looked through a lot of configs and could not figure out how to control the font size, color, family for the Header part of the dashboard alpha. I will be very grateful for any help and/or advice.
My config

vim runs in the terminal, are you expecting to be able to change the font size + family of just the header?
you can change the color though, https://github.com/goolord/alpha-nvim/blob/main/doc/alpha.txt#L111
opts = { hl = "MyHeaderHighlightGroup" }

vim runs in the terminal, are you expecting to be able to change the font size + family of just the header?

Hope is the last to die. But thank you for your answer.

with https://github.com/goolord/alpha-nvim/pull/63 you might be able to approximate something like that by displaying an image or something, if your terminal supports that


Change home panel img border radius to 16px

Now homepage images dont go out of the box, they match the edges nicely

before
after

should be setting overflow: hidden; on .home__panel instead

hmm the borders look a bit weird tho :thinking:

hm... okay, your original implementation is fine for me for now, i'm working on a redesign regardless

oops


add additional user struggle bullet to select component research guidance

Joe found an additional issue that users struggle with about the select component.

not sure if I'm allowed to GitHub review approve, but just to say this looks good to me thanks!


Working Survey and updated README

Survey now works! All relations are correct.
The questions and answers have correctly named IDs.
The foreign keys are added.
Survey has one question with answers.
Survey redirects to a safety check, but it doesn't have appropriate information.

README updated.
Added wishlist for future releases
Reviewed instructions
Updated "In Progress"

I see organizationID under the organizations table. The primary key was changed, and email creates conflicts with the current application. Could it be changed back to a serial ID as before?
Also, I see on other tables some types and names are changed, and this will break everyone else's applications, can they still be the same
A few bugs were fixed in the application, and the schema changes are reverting those. @GOKU900, what do you think?


Upgrade org.pitest:pitest-maven 1.11.0 -> 1.11.1

This PR contains the following updates:

Package
Type
Update
Change

org.pitest:pitest-maven (source)
build
patch
1.11.0 -> 1.11.1

Release Notes

hcoles/pitest
v1.11.1
Compare Source
#1156 Prevent synthetic lines being counted in coverage
Synthetic methods were being included in the line coverage calculations resulting in an over calculation of coverage. For some kotlin classes this could result in more code lines having coverage than actually existed in a file. #1156 fixes this, but still intstruments the synthetic methods used to implement lambdas in java classes.

[ ] If you want to rebase/retry this PR, check this box

Suggested commit message:
Upgrade pitest-maven-plugin 1.11.0 -> 1.11.1

See:
- https://github.com/hcoles/pitest/releases/tag/1.11.1
- https://github.com/hcoles/pitest/compare/1.11.0...1.11.1


customization image

I'm trying to get the image upload to work
I permitted the  :customization_image attribute
Spree::PermittedAttributes.line_item_attributes << {
  product_customizations: [:customization_id, :option_id, :option_value, :customization_image ]
}

Modified the form
<%= field_set_tag product_customization_type.presentation do %>
  <% option = product_customization_type.customizable_product_options.first %>
  <div>
  	 <%= label(cust_dom_id.to_sym, option.presentation.to_sym) %>

    <% # create a slightly shorter dom_id field below.  I wish I could make use of dom_id for all strings that had [ && ] %>
    <%= hidden_field_tag "#{param_prefix}[customization_id]", product_customization_type.id %>
    <%= hidden_field_tag "#{param_prefix}[option_id]", product_customization_type.customizable_product_options.first.id %>
    <%= hidden_field_tag "#{param_prefix}[option_value]", product_customization_type.customizable_product_options.first.id %>
    <%= file_field_tag( "#{param_prefix}[customization_image]", class: "customization ", id: cust_dom_id ) %>

    <% # the price is stored here on change, and later collected by the product-wide updatePrice() %>
    <%= hidden_field_tag "customization_price", "0", :class => "customization_price" %>
    <%= link_to t("reset"),"" %>
  </div>
<% end # field_set_tag %>

Made it check for customization_image and set that to the option if it exists.
module Spree
  module ProductCustomizationsBuilder
    def build_product_customizations(options)
      return unless options

      customizations = {}

      options.each do |cust_opt_val|
        customization = customizations[cust_opt_val[:customization_id]] ||= {}
        #Allowing attribut option_value: :cusomization_image overrides option_value as a string so we assign it here.
        if cust_opt_val.has_key? :customization_image
          customization[cust_opt_val[:option_id]] = {customization_image: cust_opt_val[:customization_image]}
        else
          customization[cust_opt_val[:option_id]] = cust_opt_val[:option_value]
        end
      end

      customizations.each do |ct_id, cv_pair|
        # [customization_type_id =>
        #   { customized_product_option_id => <user input>, ... }]
        next if cv_pair.empty? || cv_pair.values.all?(&:empty?)

        # create a product_customization based on ct_id
        pc = product_customizations.build(product_customization_type_id: ct_id)
        puts cv_pair
        cv_pair.each_pair do |cust_opt_id, user_input|

        # create a customized_product_option based on cust_opt_id
          # and attach to its customization
          cpo = pc.customized_product_options.build(
            customizable_product_option_id: cust_opt_id
          )
          if user_input.is_a? String
            cpo.value = user_input
          else
            cpo.value = ""
            cpo.customization_image = user_input[:customization_image]
          end
        end
      end
    end
  end
end

when it hits
cpo.customization_image = user_input[:customization_image]
the uploader loads but cpo.customization_image remains nil and the attribute is not added to the line item.
Any Ideas?

Firstly, this extension never worked, I tried to get the old version running but couldn't, so I have no idea how much of it was ever working. I've got most of it working now, but not the images.
This new extension uses new hooks in Spree to work rather than lots of monkeypatches, but they seem to be in an odd place. They're in Variant not LineItem and it's LineItems that get saved to an order not variants, so this extension can't actually save anything to the order! I don't know what the plan was to make saving work but it was never done. The way I made it work is by adding the built customization back into the options hash which Spree then saves on the LineItem. I opened an issue on Spree asking if there's a better way, it's all a bit confusing.
Back to this issue. I'm not really sure. Where are images supposed to be saved? The field is on the CustomizableProductOptions table but the actual uploader appears to be in CustomizedProductOption. So I don't know how it's meant to work, I guess you'll have to keep digging. It looks like you've made a good start though.

Oh good I'm not the only one that found this confusing. I did add the customized_image column to CustomizedProductOption since carrier wave was expecting it there and was throwing an error. I will keep digging and be more liberal about rewriting things.
Thanks!

Ah. Alright, look at the old extension then as I assume it was working in that. It has so many monkeypatches, plus all the ad-hoc options stuff it might be hard to get your head around but hopefully will shed some light on what's meant to happen.
I was tempted to remove images as it seemed complicated, but if you need it I guess we'll keep it :)

It looks like I got it working now, I submitted a pull request. I know you said I'm added as a contributor but I still can't merge pull requests or push to master.

Nevermind :p I figured it out!


Shell0002/doc snippet draw status

New and updated DocRef comments for Guide topic code snippets. Snippets that are Android-specific will be named ending in -android.
@doneill - can you review this small change?

@shellygill Looks good to me, good to merge.

Thanks @doneill - merging.


Show Authorization Header in UI

I have protected all my APIs with oAuth and need to be able to pass Access Token to the API through Authorization header in the try out UI. How can I do that? as of now I just have the Controller methods showing up which wont actually work without the header being passed.
Any help appreciated.

i also want to know how to implement this issue, i did not use OAuth, i just need pass a customized key in header, currently my workround is run below method in console
swaggerUi.api.clientAuthorizations.add("key", new SwaggerClient.ApiKeyAuthorization("x-accesskey", "eeee", "header"));
but is there any trick i can let me input header in swagger UI

I also need this. https://github.com/swagger-api/swagger-ui#header-parameters shows how to add it in swagger but I'm not seeing a way to do it from the config in Swashbuckle.

Use an operation filter.
public class AddAuthorizationHeaderParameter: IOperationFilter
    {
        public void Apply(Operation operation, SchemaRegistry schemaRegistry, ApiDescription apiDescription)
        {
            var scopes = apiDescription.ActionDescriptor.GetFilterPipeline()
                                       .Select(filterInfo => filterInfo.Instance)
                                       .OfType<AuthorizeAttribute>()
                                       .SelectMany(attr => attr.Roles.Split(','))
                                       .Distinct();

            if (scopes.Any())
            {
                operation.parameters.Add(new Parameter {
                    name = "Authorization",
                    @in = "header",
                    description = "access token",
                    required = true,
                    type = "string"
                });
            }
        }
    }

I want to add the: "AddAuthorizationHeaderParameterOperationFilter" to specific service methods.
for ex: api/students  ---> uses the that certain header key-value.
and i want to add the basic authentication in a certain service method;
for ex: api/authenticate --> this uses basic http authentication.
any suggestions? thanks in advance.

okay, i've figured it out. I'm just writing the solution in case if anyone faced it.
In the class "AddAuthorizationHeaderParameterOperationFilter", "Apply" method i did:
var myTokenAttribute = apiDescription.GetControllerAndActionAttributes().Any();
//note: i wrote the attribute above a controller and sometimes above an actionmethod.
Then:
if (myTokenAttribute)
{
if (operation.parameters == null)
{
operation.parameters = new List();
}
operation.parameters.Add(new Parameter()
{
name = "Authorization Token",
@in = "header",
description = "my token description",
required = true,
type = "string"
});
}

Nice - this is similar to what I would have recommended.
I'm not familiar with your implementation of MyToken, but I'm guessing it's just a "marker" attribute that has no effect on the actual implementation.
Although it's not always possible, I try to implement operation filters that are bound to actual implementation so you get "living" documentation. For example, I use the WebApi "Authorize" attribute to enforce authorization and then have an operation filter that includes the relevant header parameter if operation's are decorated with that attribute. This way, the documentation always reflects the actual behavior.

@domaindrivendev: Yes, MyToken is an attribute which checks if the api's user is logged in & has a sessionId. Waiting for your documentation example; this is going to be very helpful. Would you please includeo http basic authentication with an actual example as well? Thank you.

Wow thank you but I am still having an issue with it returning any data once I add the filter.
I'm waiting on issue #329 to be resolved so I can debug with Fiddler. How does it layout the header exactly? I am expecting it to output this:
Authorization: Bearer sdjfniwebwdfmsdkf.sdfnuwehefunwienfwef.wefuweiufwenfwenf

I am integrating with the JwtForWebApi library and I would like the Authentication token field to appear any time I decorate [Authorize] on a controller or action method. This is what I have so far.
public void Apply(Operation operation, SchemaRegistry schemaRegistry, ApiDescription apiDescription)
{
	var filterPipeline = apiDescription.ActionDescriptor.GetFilterPipeline();
	var isAuthorized = filterPipeline.Select(filterInfo => filterInfo.Instance).Any(filter => filter is IAuthorizationFilter);
	var authorizationRequired = apiDescription.GetControllerAndActionAttributes<AuthorizeAttribute>().Any();

	if (isAuthorized && authorizationRequired)
	{
		operation.parameters.Add(new Parameter
		{
			name = "Authorization Token",
			@in = "header",
			description = "JWT security token obtained from the service method Login.",
			required = true,
			type = "string"
		});
	}
}

@adamfisher
Did you register the filter?, like so
httpConfig
.EnableSwagger("docs/{apiVersion}", config => {
config.SingleApiVersion("v1", "api");
config.OperationFilter();
})

If you did, when you step through the Apply method, are you seeing expected values for isAuthorized and authorizationRequired?  You're determining this differently compared to the solution I shared above.

Also, the 'name' of the parameter should be just 'Authorization' rather than 'Authorization Token'.

Yes, correction: 'Authorization Basic' and 'Authorization: Basic' are not valid HTTP header fields names.
This work out if:
 name = "Authorization"

but in the swagger UI, the api's user could pass: basic or whatever the used token name.
here's mine:

That worked for me. Thanks guys!

Great post. Saved me a lot of time, thanks!!

@domaindrivendev  How's this going to work when we're using owin middleware to define how authorization works for our APIs? The [Authorize] attribute only says that it's in need of auth, not how it's done.

@johnkors - Did you figure out a way to do that?
When I try the above solutions authorizationRequired is null in
var authorizationRequired = apiDescription.ActionDescriptor.GetCustomAttributes().Any();

In Vb.NET
Public Class AddAuthTokenHeaderParameter
Implements IOperationFilter
Public Sub Apply(operation As Operation, schemaRegistry As SchemaRegistry, apiDescription As ApiDescription) Implements IOperationFilter.Apply

    Dim filterPipeline = apiDescription.ActionDescriptor.GetFilterPipeline()
    Dim isAuthorized = filterPipeline.Select(Function(s) s.Instance).Any(Function(sc) sc.GetType().Equals(GetType(UnisyncAuthorizeAttribute)))

    Dim allowAnonymous = apiDescription.ActionDescriptor.GetCustomAttributes(Of AllowAnonymousAttribute)().Any()

    If isAuthorized And (Not allowAnonymous) Then
        If operation.parameters Is Nothing Then
            operation.parameters = New List(Of Parameter)
        End If
        operation.parameters.Add(New Parameter With {
                .name = "Authorization",
                .in = "header",
                .description = "access token",
                .required = True,
                .type = "string"
            })
    End If

End Sub

End Class


Add Mig 25 Foxbat from Kerbal Stuff

This pull request was automatically generated by Kerbal Stuff on behalf of LuizChacon, to add Mig 25 Foxbat to CKAN.
Please direct questions about this pull request to LuizChacon.

part of #1860


[AzureMonitorDistro] use IConfiguration to set ConnectionString

Follow up to https://github.com/Azure/azure-sdk-for-net/pull/37913#discussion_r1278166832.
Changes

DefaultAzureMonitorOptions will use IConfiguration to set the ConnectionString
Add Tests for several configuration scenarios

via json
via Env Var
via IConfiguration

Please review - #34660 (comment)

You beat me to it :)
We documented that EnvVar should take precedence.
https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-configuration?tabs=aspnetcore#connection-string
I just added more tests for this scenario

Please review - #34660 (comment)

You beat me to it :)
We documented that EnvVar should take precedence. https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-configuration?tabs=aspnetcore#connection-string
I just added more tests for this scenario

There is no guarantee that Environment Variables are part of IConfiguration, please review the feedback in previous feedback.

API change check
API changes are not detected in this pull request.