Add missing User fields

Some fields which are only available for /users/@me. Mostly taken from documentation, the phone field found through messing around with Postman

Why add phone if it will always be nil? I don't think Discord plans on exposing phone via OAuth2 any time soon, if at all.

The screenshot demonstrates phone being present in the result of /users/@me


fix(client): touching the edges on learn welcome page

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] All the files I changed are in the same world language (for example: only English changes, or only Chinese changes, etc.)
[x] My changes do not use shortened URLs or affiliate links.

Closes #35288

@DzmitryUr Thank you for the fix. There are similar small fix issues, if you are interested I would appreciate it if you could tackle some more :)


[video_player] add updateInterval

This PR adds an optional updateDuration constructor parameter which allows the consumer to set how often the video info value notifier is updated.
Adding the updateDuration member to FakeVideoPlayer should constrain regressions (removing the member)
Resolves: https://github.com/flutter/flutter/issues/90080
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
[x] I signed the CLA.
[x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.
[x] I updated CHANGELOG.md to add a description of the change, following repository CHANGELOG style.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

A faster value update interval is necessary when you are trying to paint UI with frame-by-frame metadata over the existing video player. It works very well at 33 ms for a 30 fps video. This update is not a breaking change, and it allows developers to adjust it as they see fit.

A faster value update interval is necessary when you are trying to paint UI with frame-by-frame metadata over the existing video player.

Can you elaborate on the use case here? What metadata in VideoPlayerValue is changing per-frame?

It works very well at 33 ms for a 30 fps video.

On what hardware? If this is true as a general statement, it's not clear why this is a configuration option rather than an update to the value (per my second point above).

This update is not a breaking change

I didn't say it was. It is, however, new API, and new API requires justification.

and it allows developers to adjust it as they see fit.

Delegating all decisions to plugin clients is not always the right solution to a problem. This warrants more discussion about why it's the best way to address the underlying need, thus my questions above.

We are painting our own frame indexed metadata as UI, using VideoPlayerValue to get the current position duration to lookup the metadata. The current implementation limits this UI overlay to 2 FPS. This PR allows developers to tune the VideoPlayerValue update interval to suit their needs, and it's dont with a thin PR and no detrimental effects to existing consumers.

We are painting our own frame indexed metadata as UI, using VideoPlayerValue to get the current position duration to lookup the metadata.

It sounds like if the controller itself did interpolation of the current playback position, in Dart, that would address your use case then?

This PR allows developers to tune the VideoPlayerValue update interval to suit their needs.

I understand that; I responded to this same comment in my last reply.

It's achieved with an intentionally thin PR and no detrimental effects to existing consumers.

Approaching this discussion from the standpoint that I don't understand what the PR does is really not productive. We've already established that I understand (as is obvious from reading the PR) that it's not a breaking change. That's not my concern, and I've never said that it was.

If there were a separate stream for duration position that supported a frequency of 1000/fps ms and it was guaranteed to be accurate through all state transitions then there would be no need for updateInterval to the best of my knowledge.

Approaching this discussion from the standpoint that I don't understand what the PR does is really not productive.

Not sure where I insinuated that, but I apologize if that was communicated to you.

If there were a separate stream for duration position that supported a frequency of 1000/fps ms

Why do you expect a stream API at all? It's a strange API to use an event stream for changes to what is essentially a continuous value change. I would expect the event stream not to include position at all, and for position to just be a property that interested clients can request whenever they want, whereas this PR moves in the opposite direction.

That said, the nice thing about the updateInterval PR is that it covers a wide range of needs from "the default playhead behavior feels like it updates too slow" to "we'd like to paint frame metadata in realtime and are comfortable with the costs."

Neither of these requires a streamed position at all as far as I can tell, just a position parameter that is accurate. If you want position at an arbitrary frequency that you control, and you don't care about having it be a method channel call every time, is there some reason you aren't just calling the existing position getter with that frequency?

Approaching this discussion from the standpoint that I don't understand what the PR does is really not productive.

Not sure where I insinuated that, but I apologize if that was communicated to you.

You told me twice in a row, despite it being unrelated to any of my feedback, that a PR that adds an optional parameter whose default value is the same as the value that was previously hard coded is not a breaking change. If you believed I already understand that obvious fact, I'm not sure what you were trying to convey with those comments.


Add sample_clamped method to animation curves, returning Boxed values

Objective
Currently the evaluation of AnimationCurves is coupled to the Bevy animation system. This PR provides an integration point for plugins that would like to reuse the animation loading (e.g. from GLTF) and sampling code but implement a custom animation composition system (the use case I have in mind is bevy_animation_graph).
Solution
The AnimationCurve trait provides a sample_clamped method, which returns a boxed version of the result of sampling the underlying curve:
fn sample_clamped(&self, t: f32) -> Box<dyn Any>;

Each of the provided implementations of AnimationCurve return a custom sampled type, e.g.:
#[derive(Reflect)]
pub struct TranslationCurveSample(Vec3);

impl<C> AnimationCurve for TranslationCurve<C>
where
    C: AnimationCompatibleCurve<Vec3>,
{
    // ...

    fn sample_clamped(&self, t: f32) -> Box<dyn Any> {
        let value = self.0.sample_clamped(t);

        Box::new(TranslationCurveSample(value))
    }
}

This fits with the "open polymorphism" approach that the rest of the rest of the animation curves code is using. Users can then check the TypeId of the returned type to determine what to do with the sampled value.
Alternative solutions
Closed polymorphism
Provide an enum value as the result of AnimationCurve::sample_clamped:
pub enum CurveSample {
    Translation(Vec3),
    Rotation(Quat),
    Scale(Vec3),
    AnimatableCurve(AnimatableCurveSample),
}

However this would be at odds with the current implementation of AnimationCurve, where users can implement their own AnimationCurve types.
Testing

Added a new doctest, run all unit tests.
Ran animation examples to ensure no regressions.
No benchmarking done, since the existing animation flow is untouched.
Pending testing tasks:

[ ] AnimatableCurve sampling.
[ ] WeightsCurve sampling.
[ ] Test using this API in bevy_animation_graph.

Showcase

bevy_animation_graph example
bevy_animation_graph evaluates animation curves in "Clip" nodes, and stores the
sampled values for all targets in a Pose struct which is made available to
other nodes as an output.
Currently evaluating animation curves in bevy_animation_graph involves abusing
the Reflect API to access private fields in the curve evaluators:
fn sample_animation_curve(curve: &VariableCurve, time: f32) -> CurveValue {
    let mut evaluator = curve.0.create_evaluator();
    let evaluator_type_id = curve.0.evaluator_type();
    let evaluator_type_name = evaluator.reflect_type_info().type_path();
    let node_index = AnimationNodeIndex::default();

    curve
        .0
        .apply(evaluator.as_mut(), time, 1., node_index)
        .unwrap();

    if evaluator_type_id == TypeId::of::<TranslationCurveEvaluator>() {
        let t = evaluator
            .as_reflect()
            .reflect_ref()
            .as_struct()
            .unwrap()
            .field("evaluator")
            .unwrap()
            .reflect_ref()
            .as_struct()
            .unwrap()
            .field("stack")
            .unwrap()
            .reflect_ref()
            .as_list()
            .unwrap()
            .get(0)
            .unwrap()
            .reflect_ref()
            .as_struct()
            .unwrap()
            .field("value")
            .unwrap()
            .try_downcast_ref::<Vec3>()
            .unwrap();
        CurveValue::Translation(*t)
    } else if evaluator_type_id == TypeId::of::<RotationCurveEvaluator>() {
        let r = evaluator
            .as_reflect()
            .reflect_ref()
            .as_struct()
            .unwrap()
            .field("evaluator")
            .unwrap()
            .reflect_ref()
            .as_struct()
            .unwrap()
            .field("stack")
            .unwrap()
            .reflect_ref()
            .as_list()
            .unwrap()
            .get(0)
            .unwrap()
            .reflect_ref()
            .as_struct()
            .unwrap()
            .field("value")
            .unwrap()
            .try_downcast_ref::<Quat>()
            .unwrap();
        CurveValue::Rotation(*r)
    } else if evaluator_type_id == TypeId::of::<ScaleCurveEvaluator>() {
        let s = evaluator
            .as_reflect()
            .reflect_ref()
            .as_struct()
            .unwrap()
            .field("evaluator")
            .unwrap()
            .reflect_ref()
            .as_struct()
            .unwrap()
            .field("stack")
            .unwrap()
            .reflect_ref()
            .as_list()
            .unwrap()
            .get(0)
            .unwrap()
            .reflect_ref()
            .as_struct()
            .unwrap()
            .field("value")
            .unwrap()
            .try_downcast_ref::<Vec3>()
            .unwrap();
        CurveValue::Scale(*s)
    } else if evaluator_type_name
        // Need to resort to this because WeightsCurveEvaluator is private
        .starts_with("bevy_animation::animation_curves::WeightsCurveEvaluator")
    {
        let w = evaluator
            .as_reflect()
            .reflect_ref()
            .as_struct()
            .unwrap()
            .field("stack_morph_target_weights")
            .unwrap()
            .try_downcast_ref::<Vec<f32>>()
            .unwrap()
            .clone();
        CurveValue::BoneWeights(w)
    } else {
        panic!("Animatable curve type not yet supported!");
    }
}

With this PR, we can instead do the following:
fn sample_animation_curve(curve: &VariableCurve, time: f32) -> CurveValue {
    let curve_sample = curve.0.sample_clampled(time);
    let sample_type_id = curve_sample.as_ref().type_id();

    if TypeId::of::<TranslationCurveSample>() == sample_type_id {
        let cast_sample = curve_sample.downcast::<TranslationCurveSample>().unwrap();
        CurveValue::Translation(cast_sample.0)
    } else if TypeId::of::<RotationCurveSample>() == sample_type_id {
        let cast_sample = curve_sample.downcast::<RotationCurveSample>().unwrap();
        CurveValue::Rotation(cast_sample.0)
    } else if TypeId::of::<ScaleCurveSample>() == sample_type_id {
        let cast_sample = curve_sample.downcast::<ScaleCurveSample>().unwrap();
        CurveValue::Scale(cast_sample.0)
    } else if TypeId::of::<WeightsCurveSample>() == sample_type_id {
        let cast_sample = curve_sample.downcast::<WeightsCurveSample>().unwrap();
        CurveValue::Weights(cast_sample.0)
    } else {
        panic!("Animatable curve type not yet supported!");
    }
}

Furthermore, the API in this PR opens the door to adding support for
AnimatableCurves, whereas before this was not possible (or at least I could
not find a way).

This is fairly close to what I had imagined in this direction (see also #15664 ); another idea would be to yield a dyn Curve<T> in some way from a dyn AnimationCurve when you have extrinsic knowledge of the return type; e.g.
fn downcast_curve<T>(self) -> Option<Box<dyn Curve<T>>> {
    // yield a boxed version of the underlying curve if `T` matches the curve type, otherwise None
}

I think this is a bit more reusable, but the use-cases might be slightly different, since the dependency on the curve type is a bit different. The main upside with something like this would be that you can do other stuff with the curve API instead of only having the output value. (The main downside in my view is that implementing this requires unsafe code, since this is effectively a "custom Any".)

This is fairly close to what I had imagined in this direction (see also #15664 ); another idea would be to yield a dyn Curve<T> in some way from a dyn AnimationCurve when you have extrinsic knowledge of the return type; e.g.
fn downcast_curve<T>(self) -> Option<Box<dyn Curve<T>>> {
    // yield a boxed version of the underlying curve if `T` matches the curve type, otherwise None
}

I think this is a bit more reusable, but the use-cases might be slightly different, since the dependency on the curve type is a bit different. The main upside with something like this would be that you can do other stuff with the curve API instead of only having the output value. (The main downside in my view is that implementing this requires unsafe code, since this is effectively a "custom Any".)

I like that, but I think there's value in having both. I think only exposing a Box<dyn Curve<T>> wouldn't cover the use case I'm thinking of:

My main issue is that we may not have have extrinsic knowledge of the return type; e.g. you have an AnimationClip and want to evaluate all curves in it; all you know is that there's a bunch of VariableCurves, which could have as output type a Vec3, Quat, Vec<f32> or any other arbitrary property (AnimatableProperty::Property). The API I proposed returns a boxed value whose type you can check, so it works in this case. Also, you have a single boxed type for all AnimatableCurve types (regardless of AnimatableProperty), which currently are hard to deal with without knowing the type in advance as the AnimatableCurveEvaluator's type depends on the AnimatableCurve type parameter.
Even if return types are equal, we would want to differentiate between different kinds of AnimationCurve in order to apply the result correctly (e.g. translation and scale are both Vec3). This one we could workaround by checking the type of the evaluator, but that feels more hacky (maybe that's just me).
WeightsCurve uses an IterableCurve<f32> instead of a Curve<Vec<f32>>. I haven't looked through all of the new Curve code yet so maybe there's a way to adapt the former to the latter? Otherwise this seems like a problem for this API.

What do you think?

1. My main issue is that we may not have have extrinsic knowledge of the return type; e.g. you have an `AnimationClip` and want to evaluate all curves in it; all you know is that there's a bunch of `VariableCurve`s, which could have as output type a `Vec3`, `Quat`, `Vec<f32>` or any other arbitrary property (`AnimatableProperty::Property`). The API I proposed returns a boxed value whose type you can check, so it works in this case. Also, you have a single boxed type for all `AnimatableCurve` types (regardless of `AnimatableProperty`), which currently are hard to deal with without knowing the type in advance as the `AnimatableCurveEvaluator`'s type depends on the `AnimatableCurve` type parameter.

That makes sense. I have been kind of wondering if the right direction for the animation system long-term would be to tie every animation curve to a specific AnimatableProperty type (instead of making Transform parts behave specially, for example); that way, the relationship between an AnimationCurve and its curve output would at least be reified in a sort of natural way (as the Property type of the AnimatableProperty).
I don't think having both is unreasonable :)

2. Even if return types are equal, we would want to differentiate between different kinds of `AnimationCurve` in order to apply the result correctly (e.g. translation and scale are both `Vec3`). This one we could workaround by checking the type of the evaluator, but that feels more hacky (maybe that's just me).

Yeah, this is another reason to want to tie things to AnimatableProperty.

3. `WeightsCurve` uses an `IterableCurve<f32>` instead of a `Curve<Vec<f32>>`. I haven't looked through _all_ of the new `Curve` code yet so maybe there's a way to adapt the former to the latter? Otherwise this seems like a problem for this API.

Every IterableCurve<f32> can also be a Curve<Vec<f32>> just by calling collect, which is probably what I would do for this API, even if it involves special-casing. There isn't really a way around this: glTF morph weights curves don't even have a 'static return type (since the returned iterator has a lifetime dependence on the curve itself), so they are like Curve<T> where T: !Any.
(For some background, the only reason that IterableCurve exists is that it would be preferable for these curves to just be Curve<T> where T is an iterator, but the type of that iterator is made impossible to name by the Rust compiler. Hopefully that will change somewhat in the future.)

That makes sense. I have been kind of wondering if the right direction for the animation system long-term would be to tie every animation curve to a specific AnimatableProperty type (instead of making Transform parts behave specially, for example); that way, the relationship between an AnimationCurve and its curve output would at least be reified in a sort of natural way (as the Property type of the AnimatableProperty).

I don't know what the reasons were for keeping the Transform and weight curves separate tbh (performance maybe?), but I agree that having a more "natural" relationship between the AnimationCurve and its output type would be a good thing. Still worried about the dynamic use case though—unless I'm missing something, having a P: AnimatableProperty type parameter on all curves would make type id comparisons complicated when there's no extrinsic type information about the curve—, what would be the API you're thinking of?
(sorry for the long time between replies btw, hard to find time after day job with end of year deadlines approaching)


[BUG] Parameters of function call get into the next function calls.

Investigative information
Please provide the following:

Timestamp: 2022-09-25T12:43:18Z
Function App name: smartFME-API-Functions
Function name(s) (as appropriate): dFunc_manageDomPlattformen, dFunc_manageDomArtPersonen
Core Tools version: 4.0.4785
Extension Bundle: Microsoft.Azure.Functions.ExtensionBundle.Preview  4.*, 5.0.0

Repro steps
Provide the steps required to reproduce the problem:

Call function dFunc* (any) with any action (i.e "action": "update")
Call the same function again with different action (i.e "action": "delete")

In my Case:
{
    "action": "update",
    "data":
    {
        "DOM_Plattform_ID": "4",
        "Name": "Macintosh"
    }
}

{
    "action": "delete",
    "data":
    {
        "DOM_Plattform_ID": "12"
    }
}

Expected behavior
Provide a description of the expected behavior.
Second function call gets successfully executed.

Actual behavior
Provide a description of the actual behavior observed.
Function throws an error:
2022-09-25T12:43:18Z   [Information]   Sending event Create
2022-09-25T12:43:18Z   [Information]   Sending event AddAsync
2022-09-25T12:43:18Z   [Information]   Sending event FlushAsync
2022-09-25T12:43:18Z   [Information]   Sending event TableInfoCacheHit
2022-09-25T12:43:18Z   [Information]   Sending event UpsertStart
2022-09-25T12:43:18Z   [Information]   Sending exception event: Invalid column name 'Inaktiv'.
Invalid column name 'Inaktiv'.
2022-09-25T12:43:18Z   [Information]   Sending exception event: Invalid column name 'Inaktiv'.
Invalid column name 'Inaktiv'.
2022-09-25T12:43:18Z   [Error]   Executed 'Functions.dFunc_manageDomPlattformen' (Failed, Id=85862a6c-8791-47ba-b295-b65b05985079, Duration=62ms)

The problem with this is, that neither the second function call or the responsible code included the column 'Inaktiv'. The first function call however, did include the column (in my case delete simply adds 'Inaktiv = True' to the specified row).

Known workarounds
Provide a description of any known workarounds.
Restart Core Tools

Contents of the requirements.txt file:
Provide the requirements.txt file to help us find out module related issues.
azure-functions==1.11.3b1
argon2-cffi

Related information
Provide any related information

Source
dFunc_manageDomPlattformen

function.json
{
  "scriptFile": "__init__.py",
  "bindings": [
    {
      "authLevel": "function",
      "type": "httpTrigger",
      "direction": "in",
      "name": "REQ",
      "methods": [
        "get",
        "post"
      ]
    },
    {
      "type": "http",
      "direction": "out",
      "name": "$return"
    },
    {
      "name": "DOMPlattformenIN",
      "type": "sql",
      "direction": "in",
      "commandText": "SELECT * FROM DOM.DOM_Plattformen",
      "commandType": "Text",
      "connectionStringSetting": "SqlConnectionString"
    },
    {
      "name": "DOMPlattformenOUT",
      "type": "sql",
      "direction": "out",
      "commandText": "DOM.DOM_Plattformen",
      "connectionStringSetting": "SqlConnectionString"
    }
  ]
}

__init.py__
import logging
import json

from Tools.httpRequest import getParameter
from Tools.sql import mapData
from Tools.crud import crud

import azure.functions as func

def main(REQ: func.HttpRequest, DOMPlattformenIN: func.SqlRowList, DOMPlattformenOUT: func.Out[func.SqlRow]) -> func.HttpResponse:
    logging.info('Python HTTP trigger function processed a request.')

    ID_STRING = "DOM_Plattform_ID"

    ACTION = getParameter(REQ, "action")
    DATA = getParameter(REQ, "data")

    if ACTION is None:
        return func.HttpResponse("action must not be null", status_code=400)

    DOMPlattformen = mapData(DOMPlattformenIN)

    logging.info(json.dumps(DATA))

    return crud(ACTION, DATA, DOMPlattformen, DOMPlattformenOUT, ID_STRING)

crud.py partially
import json
import logging
import traceback
import azure.functions as func
import Tools.crudActions as crudActions

def crud(action, data, tableIn, tableOut, id_string):

    elif action == "update":
        try:
            crudActions.updateRow(data, tableIn, tableOut, id_string)
            return func.HttpResponse("Row wurde erfolgreich aktualisiert!")
        except Exception as ex:
            if hasattr(ex, "httpResponse"):
                return ex.httpResponse
            logging.info(traceback.print_exc())
            return func.HttpResponse("Something went wrong...", status_code=500)

    elif action == "delete":
        try:
            crudActions.deleteRow(data, tableIn, tableOut, id_string)
            return func.HttpResponse("Row erfolgreich gelöscht!")
        except Exception as ex:
            if hasattr(ex, "httpResponse"):
                return ex.httpResponse
            logging.info(traceback.print_exc())
            return func.HttpResponse("Something went wrong...", status_code=500)

    return func.HttpResponse("action =! 'create', 'read', 'update', 'delete'", status_code=400)

crudActions.py (partially)
import logging
import azure.functions as func
import Tools.exception as e

import Tools.sql as helper

def updateRow(data, tableIn, tableOut, pkName):
    logging.info("updateRow...")

    # Prüfung, ob Personen_ID in DB existiert
    if not pkName in data:
        logging.info("updateRow >> False | Keine ID angegeben")
        raise e.MissingDataError()
    if not helper.checkForId(tableIn, pkName, data[pkName]):
        logging.info("updateRow >> False | ID nicht gefunden!")
        raise e.IdNotFoundError()

    row = func.SqlRow.from_dict(data)
    try:
        tableOut.set(row)
        logging.info("updateRow >> True")
        return
    except:
        logging.info("updateRow >> False")
        raise e.SqlError()

def deleteRow(data, tableIn, tableOut: func.Out[func.SqlRow], pkName):
    logging.info("deleteRow...")

    # Prüfung, ob ID in DB existiert
    if not pkName in data:
        logging.info("deleteRow >> False | Keine ID angegeben")
        raise e.MissingDataError()
    elif len(data.keys()) > 1:
        logging.info(f"deleteRow >> False | deleteRow kann nur '{pkName}' akzeptieren")
        raise e.TooMuchDataError()
    if not helper.checkForId(tableIn, pkName, data[pkName]):
        logging.info("deleteRow >> False | ID nicht gefunden!")
        raise e.IdNotFoundError()

    # Delete User "löscht" keine Reihen, sondern markiert sie als Inaktiv, dadurch werden sie von den Anderen APIs ignoriert.
    data["Inaktiv"] = True
    # Delete User doesn't "delete" Rows, it just marks them as 'Inaktiv'

    row = func.SqlRow.from_dict(data)
    try:
        logging.info(f"Row: {row.data}")
        tableOut.set(row)
        logging.info(tableOut.get().data)
        logging.info("deleteRow >> True")
        return True
    except:
        logging.info("deleteRow >> False")
        raise e.SqlError()

Full Logs
2022-09-25T12:42:50Z   [Information]   Python HTTP trigger function processed a request.
2022-09-25T12:42:50Z   [Information]   Retrieved the following Parameter: "action": "delete"
2022-09-25T12:42:50Z   [Information]   Retrieved the following Parameter: "data": "{'DOM_Plattform_ID': '15'}"
2022-09-25T12:42:50Z   [Information]   {"DOM_Plattform_ID": "15"}
2022-09-25T12:42:50Z   [Information]   deleteRow...
2022-09-25T12:42:50Z   [Information]   checkForId...
2022-09-25T12:42:50Z   [Information]   checkForId >> True
2022-09-25T12:42:50Z   [Information]   deleteRow >> True
2022-09-25T12:42:51Z   [Information]   Sending event Create
2022-09-25T12:42:51Z   [Information]   Sending event AddAsync
2022-09-25T12:42:51Z   [Information]   Sending event FlushAsync
2022-09-25T12:42:51Z   [Information]   Sending event TableInfoCacheMiss
2022-09-25T12:42:51Z   [Information]   Sending event GetTableInfoStart
2022-09-25T12:42:51Z   [Information]   Sending event GetCaseSensitivity
2022-09-25T12:42:51Z   [Information]   Sending event GetColumnDefinitions
2022-09-25T12:42:51Z   [Information]   Sending event GetPrimaryKeys
2022-09-25T12:42:51Z   [Information]   Sending event GetTableInfoEnd
2022-09-25T12:42:51Z   [Information]   DB and Table: smartFME-SQL.DOM.DOM_Plattformen. Primary keys: []. SQL Column and Definitions:  [dom_plattform_id int,name varchar(255),inaktiv bit]
2022-09-25T12:42:51Z   [Information]   Sending event UpsertStart
2022-09-25T12:42:51Z   [Information]   Sending event UpsertEnd
2022-09-25T12:42:51Z   [Information]   Upserted 1 row(s) into database: smartFME-SQL and table: DOM.DOM_Plattformen.
2022-09-25T12:42:51Z   [Information]   Executed 'Functions.dFunc_manageDomPlattformen' (Succeeded, Id=8717f9c4-4145-41dd-9b8b-22012d6d0292, Duration=536ms)
2022-09-25T12:43:18Z   [Information]   Executing 'Functions.dFunc_manageDomPlattformen' (Reason='This function was programmatically called via the host APIs.', Id=85862a6c-8791-47ba-b295-b65b05985079)
2022-09-25T12:43:18Z   [Information]   Sending event Create
2022-09-25T12:43:18Z   [Information]   Sending event Convert
2022-09-25T12:43:18Z   [Information]   13 row(s) queried from database: smartFME-SQL using Command: SELECT * FROM DOM.DOM_Plattformen
2022-09-25T12:43:18Z   [Verbose]   Sending invocation id:85862a6c-8791-47ba-b295-b65b05985079
2022-09-25T12:43:18Z   [Verbose]   Posting invocation id:85862a6c-8791-47ba-b295-b65b05985079 on workerId:96b523d8-35a8-4b9e-a51c-8b1a2f56b034
2022-09-25T12:43:18Z   [Information]   Python HTTP trigger function processed a request.
2022-09-25T12:43:18Z   [Information]   Retrieved the following Parameter: "action": "update"
2022-09-25T12:43:18Z   [Information]   Retrieved the following Parameter: "data": "{'DOM_Plattform_ID': '4', 'Name': 'Macintosh'}"
2022-09-25T12:43:18Z   [Information]   {"DOM_Plattform_ID": "4", "Name": "Macintosh"}
2022-09-25T12:43:18Z   [Information]   updateRow...
2022-09-25T12:43:18Z   [Information]   checkForId...
2022-09-25T12:43:18Z   [Information]   checkForId >> True
2022-09-25T12:43:18Z   [Information]   updateRow >> True
2022-09-25T12:43:18Z   [Information]   Sending event Create
2022-09-25T12:43:18Z   [Information]   Sending event AddAsync
2022-09-25T12:43:18Z   [Information]   Sending event FlushAsync
2022-09-25T12:43:18Z   [Information]   Sending event TableInfoCacheHit
2022-09-25T12:43:18Z   [Information]   Sending event UpsertStart
2022-09-25T12:43:18Z   [Information]   Sending exception event: Invalid column name 'Inaktiv'.
Invalid column name 'Inaktiv'.
2022-09-25T12:43:18Z   [Information]   Sending exception event: Invalid column name 'Inaktiv'.
Invalid column name 'Inaktiv'.
2022-09-25T12:43:18Z   [Error]   Executed 'Functions.dFunc_manageDomPlattformen' (Failed, Id=85862a6c-8791-47ba-b295-b65b05985079, Duration=62ms)

Sure! (@Charles-Gagnon sorry for the delay, I was on vacation.)

Debug Logs

[2022-10-21T17:28:50.162Z] Executing HTTP request: {
[2022-10-21T17:28:50.162Z]   requestId: "90c48cad-944b-408c-81fd-a4f9d84756b9",
[2022-10-21T17:28:50.162Z]   method: "POST",
[2022-10-21T17:28:50.162Z]   userAgent: "ms-rest-js/2.6.0 Node/v16.14.2 OS/(x64-Linux-5.19.14-200.fc36.x86_64) vscode-azurefunctions/1.8.1",
[2022-10-21T17:28:50.162Z]   uri: "/api/dFunc_manageDomPlattformen"
[2022-10-21T17:28:50.162Z] }
[2022-10-21T17:28:50.173Z] Request successfully matched the route with name 'dFunc_manageDomPlattformen' and template 'api/dFunc_manageDomPlattformen'
[2022-10-21T17:28:50.280Z] Executing 'Functions.dFunc_manageDomPlattformen' (Reason='This function was programmatically called via the host APIs.', Id=f4f11487-2e54-4c66-bc59-c747592cdb48)
[2022-10-21T17:28:50.332Z] Sending event Create
[2022-10-21T17:28:50.343Z] TID:15 BEGIN ConvertAsync (Json)
[2022-10-21T17:28:50.882Z] Sending event Convert
[2022-10-21T17:28:50.960Z] 5 row(s) queried from database: smartFME-SQL using Command: SELECT * FROM DOM.DOM_Plattformen
[2022-10-21T17:28:50.979Z] TID:21 END ConvertAsync (Json) Duration=635ms
[2022-10-21T17:28:51.039Z] Received FunctionInvocationRequest, request ID: 6471ad3a-0f42-404c-ab51-847f32220f70, function ID: 8e4cd30c-91c5-4218-9207-049dd69d73f2, function name: dFunc_manageDomPlattformen, invocation ID: f4f11487-2e54-4c66-bc59-c747592cdb48, function type: sync, sync threadpool max workers: 1000
[2022-10-21T17:28:51.052Z] Python HTTP trigger function processed a request.
[2022-10-21T17:28:51.053Z] Retrieved the following Parameter: "action": "create"
[2022-10-21T17:28:51.054Z] Retrieved the following Parameter: "data": "{'Name': 'Something'}"
[2022-10-21T17:28:51.054Z] {"Name": "Something"}
[2022-10-21T17:28:51.054Z] createRow...
[2022-10-21T17:28:51.054Z] getFreeId...
[2022-10-21T17:28:51.054Z] getFreeId >> 5
[2022-10-21T17:28:51.054Z] createRow >> True
[2022-10-21T17:28:51.072Z] InvocationResponse received for invocation id: 'f4f11487-2e54-4c66-bc59-c747592cdb48'
[2022-10-21T17:28:51.137Z] Sending event Create
[2022-10-21T17:28:51.139Z] Sending event AddAsync
[2022-10-21T17:28:51.147Z] Sending event FlushAsync
[2022-10-21T17:28:51.159Z] TID:15 BEGIN UpsertRowsAsync
[2022-10-21T17:28:51.170Z] Sending event TableInfoCacheMiss
[2022-10-21T17:28:51.185Z] Sending event GetTableInfoStart
[2022-10-21T17:28:51.185Z] TID:15 BEGIN RetrieveTableInformationAsync
[2022-10-21T17:28:51.261Z] TID:15 BEGIN GetCaseSensitivity Query="
[2022-10-21T17:28:51.261Z]                     SELECT
[2022-10-21T17:28:51.261Z]                         DATABASEPROPERTYEX('smartFME-SQL', 'Collation') AS Collation;"
[2022-10-21T17:28:51.313Z] Sending event GetCaseSensitivity
[2022-10-21T17:28:51.313Z] TID:4 END GetCaseSensitivity Duration=50ms
[2022-10-21T17:28:51.313Z] TID:4 BEGIN GetColumnDefinitions Query="
[2022-10-21T17:28:51.313Z]                     select
[2022-10-21T17:28:51.313Z]                          COLUMN_NAME, DATA_TYPE +
[2022-10-21T17:28:51.313Z]                                  case
[2022-10-21T17:28:51.314Z]                                          when CHARACTER_MAXIMUM_LENGTH = -1 then '(max)'
[2022-10-21T17:28:51.314Z]                                          when CHARACTER_MAXIMUM_LENGTH <> -1 then '(' + cast(CHARACTER_MAXIMUM_LENGTH as varchar(4)) + ')'
[2022-10-21T17:28:51.314Z]                                 when DATETIME_PRECISION is not null and DATA_TYPE not in ('datetime', 'date', 'smalldatetime') then '(' + cast(DATETIME_PRECISION as varchar(1)) + ')'
[2022-10-21T17:28:51.314Z]                                          when DATA_TYPE in ('decimal', 'numeric') then '(' + cast(NUMERIC_PRECISION as varchar(9)) + ',' + + cast(NUMERIC_SCALE as varchar(9)) + ')'
[2022-10-21T17:28:51.314Z]                                          else ''
[2022-10-21T17:28:51.314Z]                                  end as COLUMN_DEFINITION
[2022-10-21T17:28:51.314Z]                     from
[2022-10-21T17:28:51.314Z]                          INFORMATION_SCHEMA.COLUMNS c
[2022-10-21T17:28:51.314Z]                     where
[2022-10-21T17:28:51.314Z]                          c.TABLE_NAME = 'DOM_Plattformen'
[2022-10-21T17:28:51.314Z]                     and
[2022-10-21T17:28:51.314Z]                         c.TABLE_SCHEMA = 'DOM'"
[2022-10-21T17:28:51.336Z] Sending event GetColumnDefinitions
[2022-10-21T17:28:51.336Z] TID:15 END GetColumnDefinitions Duration=22ms
[2022-10-21T17:28:51.337Z] TID:15 BEGIN GetPrimaryKeys Query="
[2022-10-21T17:28:51.337Z]                     SELECT
[2022-10-21T17:28:51.337Z]                         COLUMN_NAME, c.is_identity
[2022-10-21T17:28:51.337Z]                     FROM
[2022-10-21T17:28:51.337Z]                         INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc
[2022-10-21T17:28:51.337Z]                     INNER JOIN
[2022-10-21T17:28:51.337Z]                         INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE ccu ON ccu.CONSTRAINT_NAME = tc.CONSTRAINT_NAME AND ccu.TABLE_NAME = tc.TABLE_NAME
[2022-10-21T17:28:51.337Z]                     INNER JOIN
[2022-10-21T17:28:51.337Z]                         sys.columns c ON c.object_id = OBJECT_ID('[DOM].[DOM_Plattformen]') AND c.name = ccu.COLUMN_NAME
[2022-10-21T17:28:51.337Z]                     WHERE
[2022-10-21T17:28:51.337Z]                         tc.CONSTRAINT_TYPE = 'PRIMARY KEY'
[2022-10-21T17:28:51.337Z]                     and
[2022-10-21T17:28:51.337Z]                         tc.TABLE_NAME = 'DOM_Plattformen'
[2022-10-21T17:28:51.337Z]                     and
[2022-10-21T17:28:51.337Z]                         tc.TABLE_SCHEMA = 'DOM'"
[2022-10-21T17:28:51.360Z] Sending event GetPrimaryKeys
[2022-10-21T17:28:51.361Z] TID:4 END GetPrimaryKeys Duration=24ms
[2022-10-21T17:28:51.371Z] Sending event GetTableInfoEnd
[2022-10-21T17:28:51.377Z] TID:4 END RetrieveTableInformationAsync Duration=107ms DB and Table: smartFME-SQL.DOM.DOM_Plattformen. Primary keys: []. SQL Column and Definitions:  [[dom_plattform_id, int],[name, varchar(255)],[inaktiv, bit]]
[2022-10-21T17:28:51.390Z] Sending event UpsertStart
[2022-10-21T17:28:51.390Z] TID:4 BEGIN UpsertRowsTransaction
[2022-10-21T17:28:51.523Z] Sending event UpsertEnd
[2022-10-21T17:28:51.523Z] TID:32 END UpsertRowsTransaction Duration=133ms Upserted 1 row(s) into database: smartFME-SQL and table: DOM.DOM_Plattformen.
[2022-10-21T17:28:51.524Z] TID:32 END UpsertRowsAsync Duration=364ms
[2022-10-21T17:28:51.543Z] Executed 'Functions.dFunc_manageDomPlattformen' (Succeeded, Id=f4f11487-2e54-4c66-bc59-c747592cdb48, Duration=1299ms)
[2022-10-21T17:28:51.569Z] Executed HTTP request: {
[2022-10-21T17:28:51.569Z]   requestId: "90c48cad-944b-408c-81fd-a4f9d84756b9",
[2022-10-21T17:28:51.570Z]   identities: "(WebJobsAuthLevel:Admin)",
[2022-10-21T17:28:51.570Z]   status: "200",
[2022-10-21T17:28:51.570Z]   duration: "1407"
[2022-10-21T17:28:51.570Z] }
[2022-10-21T17:29:09.962Z] Executing HTTP request: {
[2022-10-21T17:29:09.962Z]   requestId: "942e31e8-b411-4111-b5de-cfde0c4f02c3",
[2022-10-21T17:29:09.962Z]   method: "GET",
[2022-10-21T17:29:09.962Z]   userAgent: "ms-rest-js/2.6.0 Node/v16.14.2 OS/(x64-Linux-5.19.14-200.fc36.x86_64) vscode-azurefunctions/1.8.1",
[2022-10-21T17:29:09.962Z]   uri: "/"
[2022-10-21T17:29:09.962Z] }
[2022-10-21T17:29:09.964Z] Executed HTTP request: {
[2022-10-21T17:29:09.965Z]   requestId: "942e31e8-b411-4111-b5de-cfde0c4f02c3",
[2022-10-21T17:29:09.965Z]   identities: "",
[2022-10-21T17:29:09.965Z]   status: "200",
[2022-10-21T17:29:09.965Z]   duration: "2"
[2022-10-21T17:29:09.965Z] }
[2022-10-21T17:29:09.994Z] Executing HTTP request: {
[2022-10-21T17:29:09.994Z]   requestId: "22ccac80-e035-427c-8525-955d84a996af",
[2022-10-21T17:29:09.994Z]   method: "POST",
[2022-10-21T17:29:09.994Z]   userAgent: "ms-rest-js/2.6.0 Node/v16.14.2 OS/(x64-Linux-5.19.14-200.fc36.x86_64) vscode-azurefunctions/1.8.1",
[2022-10-21T17:29:09.994Z]   uri: "/api/dFunc_manageDomPlattformen"
[2022-10-21T17:29:09.994Z] }
[2022-10-21T17:29:09.994Z] Request successfully matched the route with name 'dFunc_manageDomPlattformen' and template 'api/dFunc_manageDomPlattformen'
[2022-10-21T17:29:10.001Z] Executing 'Functions.dFunc_manageDomPlattformen' (Reason='This function was programmatically called via the host APIs.', Id=1c96e9f7-ad28-4b61-9006-1440a398c6b2)
[2022-10-21T17:29:10.004Z] Sending event Create
[2022-10-21T17:29:10.004Z] TID:4 BEGIN ConvertAsync (Json)
[2022-10-21T17:29:10.004Z] Sending event Convert
[2022-10-21T17:29:10.028Z] 6 row(s) queried from database: smartFME-SQL using Command: SELECT * FROM DOM.DOM_Plattformen
[2022-10-21T17:29:10.028Z] TID:4 END ConvertAsync (Json) Duration=23ms
[2022-10-21T17:29:10.036Z] Received FunctionInvocationRequest, request ID: 6471ad3a-0f42-404c-ab51-847f32220f70, function ID: 8e4cd30c-91c5-4218-9207-049dd69d73f2, function name: dFunc_manageDomPlattformen, invocation ID: 1c96e9f7-ad28-4b61-9006-1440a398c6b2, function type: sync, sync threadpool max workers: 1000
[2022-10-21T17:29:10.040Z] Python HTTP trigger function processed a request.
[2022-10-21T17:29:10.040Z] Retrieved the following Parameter: "action": "delete"
[2022-10-21T17:29:10.040Z] Retrieved the following Parameter: "data": "{'DOM_Plattform_ID': '5'}"
[2022-10-21T17:29:10.041Z] {"DOM_Plattform_ID": "5"}
[2022-10-21T17:29:10.041Z] deleteRow...
[2022-10-21T17:29:10.042Z] checkForId...
[2022-10-21T17:29:10.042Z] checkForId >> True
[2022-10-21T17:29:10.042Z] Row: {'DOM_Plattform_ID': '5', 'Inaktiv': True}
[2022-10-21T17:29:10.043Z] {'DOM_Plattform_ID': '5', 'Inaktiv': True}
[2022-10-21T17:29:10.043Z] deleteRow >> True
[2022-10-21T17:29:10.044Z] InvocationResponse received for invocation id: '1c96e9f7-ad28-4b61-9006-1440a398c6b2'
[2022-10-21T17:29:10.046Z] Sending event Create
[2022-10-21T17:29:10.046Z] Sending event AddAsync
[2022-10-21T17:29:10.047Z] Sending event FlushAsync
[2022-10-21T17:29:10.047Z] TID:10 BEGIN UpsertRowsAsync
[2022-10-21T17:29:10.053Z] Sending event TableInfoCacheHit
[2022-10-21T17:29:10.054Z] Sending event UpsertStart
[2022-10-21T17:29:10.054Z] TID:10 BEGIN UpsertRowsTransaction
[2022-10-21T17:29:10.104Z] Sending exception event: Invalid column name 'Name'.
[2022-10-21T17:29:10.104Z] Invalid column name 'Name'.
[2022-10-21T17:29:10.128Z] Sending exception event: Invalid column name 'Name'.
[2022-10-21T17:29:10.129Z] Invalid column name 'Name'.
[2022-10-21T17:29:10.143Z] Executed 'Functions.dFunc_manageDomPlattformen' (Failed, Id=1c96e9f7-ad28-4b61-9006-1440a398c6b2, Duration=140ms)
[2022-10-21T17:29:10.143Z] System.Private.CoreLib: Exception while executing function: Functions.dFunc_manageDomPlattformen. Microsoft.Azure.WebJobs.Host: Error while handling parameter _binder after function returned:. Core Microsoft SqlClient Data Provider: Invalid column name 'Name'.
[2022-10-21T17:29:10.143Z] Invalid column name 'Name'.
[2022-10-21T17:29:10.146Z] Executed HTTP request: {
[2022-10-21T17:29:10.146Z]   requestId: "22ccac80-e035-427c-8525-955d84a996af",
[2022-10-21T17:29:10.146Z]   identities: "(WebJobsAuthLevel:Admin)",
[2022-10-21T17:29:10.146Z]   status: "500",
[2022-10-21T17:29:10.146Z]   duration: "152"
[2022-10-21T17:29:10.146Z] }

@Danmyrer A new extension bundle version has been released (v4.6.0). Could you test your scenario again and let us know if you are still seeing this issue? Thank you!

Closing this since it should be fixed. @Danmyrer feel free to reopen if you are still seeing this issue.


macOS-10.15 agent uses Homebrew 3.0.10 which uses Bintray

Description
According to https://github.com/Homebrew/discussions/discussions/691, Homebrew switched from Bintray to GitHub Packages. Homebrew 3.1.0 uses the new CDN. The Microsoft Hosted Agents should imho be updated accordingly to avoid issues when downloading/installing packages using Homebrew.
Area for Triage:
Artifacts, Packages, Servers
Question, Bug, or Feature?:
Bug
Virtual environments affected

[ ] Ubuntu 16.04
[ ] Ubuntu 18.04
[ ] Ubuntu 20.04
[x] macOS 10.15
[ ] macOS 11.0
[ ] Windows Server 2016 R2
[ ] Windows Server 2019

Hello @thisisthekap , I think nothing is required from our side to switch CDN.
As I can see, 5 hours ago the new version of brew with support of new CDN was released: https://github.com/Homebrew/brew/releases/tag/3.1.0
We will update Homebrew to this version with new image rollout (approx middle of next week since this week rollout has been already started).

@maxim-lobanov Thank you for the quick response!
Updating Homebrew to 3.1.0 is indeed the solution I was hoping for :)
Once again: Thank you very much 😎

Right now bintray have started what they're calling a 'brown out' https://status.bintray.com/incidents/4mzph0y8l6hk
but actually means they're failing all requests to bintray for the next few hours, so any brew installs in macos runners are failing / will fail.
Did you have to update brew as part of your ci job?

I just execute brew update prior to the needed brew install call to make sure Homebrew is on the lastest version.

Hmm not ideal.
@maxim-lobanov  I guess there's no chance of brew being updated before bintray finished their thing in about 6 hours?

Some kind of guidance, or a notification of some kind on the actions status page, may be necessary. It took me, at least, a good portion of the morning chasing down links to find myself here. Such a notification, email, or whatever could save a lot of people a lot of time this morning - especially since the brownout doesn't end until 2pm pacific.

I'm seeing some "403 forbidden" when executing brew install today from GitHub Actions. Is this linked to this issue?

Yes. To recap the issue:

Bintray is issuing 403 Forbidden errors today as part of a scheduled "brownout" in preparation for their take down of the service.
A version of brew is available that uses github packages instead. This version is not installed by default on the mac actions runners.

While we wait for the runners to be updated, you can do brew update manually in your github actions workflow and sidestep the issue.

When can we expect the runners to be updated, just to know if we should use the suggested workaround?

@mathbagu we've decided to start the new rollout tomorrow to deliver the fix asap

Issue is related to planned brown-out session on Bintray side.
Bintray is going to recover in a few hours so issue should disappear: https://status.bintray.com/incidents/4mzph0y8l6hk
With next image rollout, homebrew should stop using bintray. Updating runners take about 3-4 days usually.

The deployment of new set of images has been already started and will be finished in a few days.

@thisisthekap We have deployed macOS images with brew 3.1.1 on board! All the packages are now retrieved from GitHub Packages.
I'm going to close the issue. Please feel free to contact us if you have any concerns.
Thank you!


replacing grid on event not working

Hi,
What I want to do is replacing gird on div when button is clicked, but code below is not working.
Am I doing wrong? Could you please let me know the right way ?
I am using jp 0.14.
thanks.
==========================
def btn_click(self, msg):
    self.div.delete_components()
    df = pd.DataFrame([(str(datetime.now()),str(datetime.now()))], columns=['a', 'b'])
    df.jp.ag_grid(a=self.div, style='height: 100px; width: 400px')
    print(self.div.components)

def main_page():
    wp = jp.WebPage()
    btn = jp.Button(text='button', a=wp, click=btn_click)
    div = jp.Div(a=wp)
    btn.div = div
    return wp

if __name__ == "__main__":
    jp.justpy(main_page)

The recommended way to replace data in a grid is the following:
import justpy as jp
import pandas as pd
from datetime import datetime

def btn_click(self, msg):
    df = pd.DataFrame([(str(datetime.now()), str(datetime.now()))], columns=['a', 'b'])
    temp_grid = df.jp.ag_grid(style='height: 100px; width: 400px')
    self.div.grid.options = temp_grid.options

def main_page():
    wp = jp.WebPage()
    btn = jp.Button(text='button', a=wp, click=btn_click)
    div = jp.Div(a=wp)
    df = pd.DataFrame([(str(datetime.now()), str(datetime.now()))], columns=['a', 'b'])
    div.grid = df.jp.ag_grid(a=div, style='height: 100px; width: 400px')
    btn.div = div
    return wp

jp.justpy(main_page)

Please let me know if something is not clear.

Thank you for recommendation.
But in my environment, components in Div should be dynamic.
Sometimes, there should be <P, A, "Grid", Table> and then <P, A> for other situation, So I was trying to delete all the previously added components and add new components.
If Grid should be handled differently, I am going to change some parts of the UI.
Thank you.


Only setting CI=1 prints the stdout

Describe the bug
Our vitest.config.ts looks like this:
export default {
  test: {
    globalSetup: './src/tests/vitest.setup.ts',
  },
}

and vitest.setup.ts looks like this:
export async function setup() {
  server = await main()
}

export async function teardown() {
  if (server) server.close()
}

All is well. The server is a simple Express server. The tests mostly do await fetch('http://localhost:3000/'  + somePathToTest).
The problem is that any console.log(...) is never seen on the command line.
For example, one of my Express middleware handlers looks like this:
export default async function manifestJson(req, res) {
  console.log('HI THERE!')
  ...

But when I run tests, all I see is:
❯ vitest src/frame/tests/manifest.js

 RUN  v1.5.0 ...

app running on http://localhost:4000
 ❯ src/frame/tests/manifest.js (1)
   ❯ manifest (1)
 ✓ src/frame/tests/manifest.js (1) 603ms
   ✓ manifest (1) 603ms
     ✓ download manifest from HTML and check content 603ms

 Test Files  1 passed (1)
      Tests  1 passed (1)
   Start at  10:00:11
   Duration  9.02s (transform 681ms, setup 0ms, collect 511ms, tests 603ms, environment 0ms, prepare 127ms)

No mention of HI THERE! anywhere.
I have two ways to "solve" this:
-  console.log('HI THERE!')
+  console.log('HI THERE!' .repeat(100))

and
-❯ vitest src/frame/tests/manifest.js
+❯ CI=1 vitest src/frame/tests/manifest.js

I was hoping that there could be something like --clearScreen=false or something like that but it's not helping.
Our reporter is whatever the default is.
Reproduction

git clone https://github.com/peterbe/vitest-ts-and-http.git
cd vitest-ts-and-http
git checkout show-consolelog-hidden
npm install
cat src/server.ts | grep console
vitest --run

System Info
  System:
    OS: macOS 14.4.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 346.04 MB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.1 - ~/Library/Caches/fnm_multishells/3693_1714399508057/bin/node
    Yarn: 1.22.21 - /usr/local/bin/yarn
    npm: 10.5.0 - ~/Library/Caches/fnm_multishells/3693_1714399508057/bin/npm
    pnpm: 8.6.9 - /usr/local/bin/pnpm
    bun: 1.1.3 - ~/.bun/bin/bun
    Watchman: 2<IP_ADDRESS> - /usr/local/bin/watchman
  Browsers:
    Safari: 17.4.1
  npmPackages:
    vitest: 1.5.0 => 1.5.0

Used Package Manager
npm
Validations

[x] Follow our Code of Conduct
[x] Read the Contributing Guidelines.
[x] Read the docs.
[x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[x] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[x] The provided reproduction is a minimal reproducible example of the bug.

Does it help if you await the main() call?
https://github.com/peterbe/vitest-ts-and-http/blob/0a29689c5282234d4cd31b09c4f2a3eabbb5075c/src/start.ts#L2

Right, that wasn't on the original reproduction case I think.
This logging happens on the main thread as it's coming from setup file. It also happens during the test run. If it was coming from the test files, Vitest would be able to intercept it and show it correctly in the logs. I'm not sure if we even can capture logs that are coming outside test files. 🤔
You could use --reporter basic here to force CI's reporter. That one doesn't clear screen during test run.

Hmm.. --reporter basic is pretty good. It's kinda like setting CI=1.
Without

With --reporter basic

(This demonstrates the console.log happening within the handlers of the server started by vitest)
I guess it's not so basic after all. It's got color. It has a neat table.
It makes me wonder, why did I not try --reporter basic? And why did --clearScreen=false not work?
Perhaps there's nothing to do here but be aware that --reporter=basic might be the right solution for others in the similar situation.


support specifying port in dm client

to talk to dotmesh on an alternate port
could be foo:1234
@justincormack would like this to help with testing dm-linuxkit by running two dotmeshes

Wondering whether this needs to be client only or on the server side? I'd have presumed it needs to be both in order for it to work.
If it needs to be server side, there's a hard coded port number in ./require_zfs.sh which will need to be customisable, presumably by passing it to dm cluster init - suppose I'd do that by having that command pass another env variable to the dotmesh-server container which is then read inside ./require_zfs.sh is ran.

It will need to touch the server side too, since the use case here is push/pull between two clusters on the same host.

actually - the comment above ignores require_zfs.sh - it might be better to add a port map into that script


Option to Ignore URLs

The markov bot should have an option not train with posts containing URLS

Added in 956e9abe597005c5ca2aa42d8587970fe2b42115
(Only works for new notes. So if you want it to get an effect on old notes, stop the bot, delete roboduck.db and start it new


Env variables substitution in yaml config supports does not support more than one variable

In:
some_endpoint:
   url: ${VAR1} ${VAR2}

Only ${VAR1} is substituted
In:
some_endpoint:
   url: "${VAR1} ${VAR2}" # with quotes

Nothing is substituted
https://github.com/RasaHQ/rasa_core/blob/8b5f9dd7c858b31d8d8e7fed1cd00df4fe37f74d/rasa_core/utils.py#L302

Thanks for raising this issue, @wochinge  will get back to you about it soon.

Having two or more environment variables is currently indeed not supported.
Would you maybe like to do a pull request for that?

@wochinge I was willing to try but my first impression was that was a py-yaml issue. That's why I opened the discussion. Are you saying that it can be dealt with in Rasa ?

The current variable replacement is done in these lines
def replace_environment_variables():
    """Enable yaml loader to process the environment variables in the yaml."""
    import ruamel.yaml as yaml
    import re
    import os

    # eg. ${USER_NAME}, ${PASSWORD}
    env_var_pattern = re.compile(r'^(.*)\$\{(.*)\}(.*)$')
    yaml.add_implicit_resolver('!env_var', env_var_pattern)

    def env_var_constructor(loader, node):
        """Process environment variables found in the YAML."""
        value = loader.construct_scalar(node)
        prefix, env_var, remaining_path = env_var_pattern.match(value).groups()
        return prefix + os.environ[env_var] + remaining_path

    yaml.SafeConstructor.add_constructor(u'!env_var', env_var_constructor)

Basically it is

replace return prefix + os.environ[env_var] + remaining_path with return os.path.expandvars(value)
clean up the code
write some additional tests


Fix Pikachu cosplay heights

Not sure why they weren't fixed when the height of megas were fixed

Thanks! (Ugh)


Add Clamp To Border option for textures

OpenGl allows for 4 different behaviours when you set UVs outside the range of 0 to 1.

The fourth one doesn't exist in Godot which can be troublesome with some shaders.
I added this option in the editor and made some changes in the visual server in order to use the GL_CLAMP_TO_BORDER texture parameter.

Sadly this clamp doesn't exist in OpenGl ES so this option will be equivalent to the Clamp To Edge (Repeat disabled flag in Godot) on mobile device.

https://github.com/godotengine/godot/blob/6697fd9a05859914fc320b4b4321fd9fb6170f71/doc/classes/VisualServer.xml#L3949-L3954
the difference on mobile should be mentioned between here if it's accepted to merge.

Wouldn't this better be called "Surround with black/empty" or something? Or just "Centered"?

It is not about centering a texture.
Here an example, I created a polygon2D with points and UVs like this:

Here the result with the four different flags:

With the repeat flag disabled, if my texture has colored texel on the edge, those pixel will "leak" for UVS outside the texture.
Here a more practical example. I use a shader to animate a grass texture. If a disable the flag repeat I get this issue:

This can't be merged for technical reasons explained below:

OpenGL ES does not support it (only 3.2 which is only on few devices), so this won't work on most mobile devices or WebGL.
Eventually when Godot is moved to Vulkan, support for the more exotic repeat modes will not be possible due to the usage of bindless textures (this will have to be emulated in shader).

Closing as per the above, @reduz has also expressed on other issues that he doesn't want to merge GLES3-specific features for 3.2 if they're going to be removed in 4.0.

Here a more practical example. I use a shader to animate a grass texture. If I disable the repeat flag I get this result:

For future readers here, note that you can avoid this by ensuring that the texture is surrounded by at least 1 pixel of fully transparent edges.


Test for issue 151 (Test terminates with FOTY0012 in test:report-sequence) on XSLT

This pull request derives from #384. So needs to be handled after that.

Closes #151
#151 is fixed for XSLT by #380.
This pull request adds a regression test for it.
The test requires a schema-aware XSLT processor (Saxon-EE). So it's skipped on Travis and AppVeyor for now. (See #340 for details.)
I manually verified that the test reproduced the problem on cbf9087ca449390754e1a82ac4ab018162976291 and didn't reproduce on this pull request.

@cirulls
Merged this set of regression test


Section 2 Test

test answer sheet link is incorrect.

Hey @pete-reis I am so sorry for the inconvenience, I dont have the tests for this one populated yet so everything in there is just placeholder now. I realized I didnt have the fact they arent ready yet marked clearly enough so I tried to put an extra statement clearly on each test to make sure people know.
That being said, I should have the tests ready within the hour so I will let you know. Sorry again for the inconvenience and thanks so much for your feedback!


fileExists() is called multiple times during module resolution on directories that do not exist

When trying to resolve external modules, each module extension/location ( mod.ts, mod.tsx, mod.d.ts, mod/package.json, mod/index.ts, mod/index.tsx, mod/index.d.ts ), is tried even when the the base directory does not exist.

This behaves as i would expect it to. what is the issue/question?

Candidate directories are generated during node module resolution which are passed to loadNodeModuleFormFile ( or Directory ). If the candidate directory does not exist then 7 calls to fileExists() will be made.
This results in a lot of needless calls. It's not a big issue, just thought you might like to know. With a host that caches fileExists() the number of lookups/searches would be much smaller.

tsc uses a caching host implementation. the language services caches resolution results if they did not change, so this should not happen often. your host implementation can add optimizations to check if part of the path does not exist.

@mhegazy Not sure why you wouldn't want to put a ts.sys.directoryExists() call on candidate directories to totally eliminate the chatter. Yes, I could optimize non-existing directories out of my caching host, but why not fix the root cause? It is all well and good that LS works well, but module resolution in program and compiler host should be efficient too.

To improve the efficiency of node module resolution, you should consider starting the search at the process.cwd ( not the containing directory of the source file ). In any event, It is unlikely that node_modules will be found anywhere in the source sub-tree.
In a general gulp based build pipeline node_modules and typings subdirectories are usually found at the root of the "project/Solution".

I think there are two items to discuss:

using process.cwd() instead of getDirectory(containingFile) - this optimization offers better performance by sacrificing correctness since the fact that node_modules mostly often appear at the root to the project does not mean that they cannot appear anywhere else, i.e. like in case below module2 should be searched relatively to the location of containing file, otherwise it cannot be resolved

root
  |---node_modules
       |---module1
            |---node_modules
                 |---module2.d.ts
            |---index.d.ts // contains `import {foo} from "module2"`

In these circumstances I don't think that it is safe to apply this optimization.

adding directoryExists into the CompilerHost so module resolution logic can omit checks for individual files if containing folder does not exist seems like a legit feature request. One note though: this method should be made optional otherwise it will be API breaking change.

Marking as Suggestion and Accepting PRs for a "add optional 'directoryExists' function into the CompilerHost" feature request

I'd be happy to make a few changes to this area. I've already added a directoryExists optimization to my base compilerHost class. It will most likely be the first week in Dec before I can do the work to issue the PR however. I'd also like to work on the overall algorithm for external module resolution in program (I'll address your concerns above ). Please let me know if this is something you want.

@vladima While setting up caching for module resolution in the host, I've run across module names that differ only in casing. What is the rule to use when module names only differ by case? Should host.useCaseSensitiveFileNames() apply?

@vladima Module resolution in program should cache resolved modules. From looking at the code in LSHost this is the case. I understand that LS needs to be more performant, but why not put the same logic in program?
It appears that LS also addresses module name casing.

the reason for this is current design of VS integration. In VS module resolution is done on the completely different instance of JS engine so it does not have access to the old instance of the program.

@vladima Your idea to use baseUrl for module resolution is a good one ( issue #5039 ). No need for me to make changes now to goodness coming in 1.8. directoryExists() and module name casing could still be addressed, but perhaps these will come in 1.8 anyway. Prob no need for me to issue a PR.

During a single compile run of a small app, we see one fstat per parent directory per file. I.e. if you compile an application that has 200 files with an average directory depth of 6 or so, you'll end up doing 200 * 6 = 1200 fstats. If an fstat takes 1 ms, that's 1.2 seconds just spend on fstats.
The total number of possible node_modules locations during one build (assuming the file system doesn't change under our feet, which would break things anyway) is of course only the number of folders in the project, plus their parent folders.
If TSC would cache the absence of a folder instead of fstating over and over again, this could easily shave off a second of a 200 file compile. Though of course it's tricky to invalidate that cache.
This problem is exacerbated in our particular setup as some folders are much more expensive to fstat than others (up to 100 ms).

Note: in 1.8 ModuleResolutionHost can optionally expose directoryExists method. If it is provided then compiler will try to check the presence of directory before trying to access individual files


Implement L1 Verification

[ ] #697
[ ] Determine whether a full Ethereum node can be used for L1 state retrieval instead of an archive node.
[ ] Incorporate ethclient

We may need to use something like eth_getStorageAt while syncing (we can binary search over a subset of the Ethereum chain to find state updates). Once synced with L1, we can use eth_subscribe.

I'll a second issue for "L1 verification while syncing". That way #699 can be merged as an MVP while we take more time to think about the problem mentioned above.


Use API to fetch data

In this work, applied the following features :100:

Getting data from API :+1:
Render API data into new component :+1:
Display all states on the screen : Success, Pending, Error :+1:
Setup React. :+1:
Setup Linters :+1:

Thanks for the review


Add functionality to make it easier to automatically generate traces from GPU benchmarks

Adds the following features:

trace-run.sh: Simplifies the tracing process by providing a single command that automatically sets up and runs all rendering benchmarks with trace-friendly settings.
Can be used by simply cloning this PR, downloading Godot, and running:
GODOT_BIN=/path/to/godot4/binary ./trace-run.sh
Note: Possible seizure warning due to how quickly the benchmarks flash by.

--run-while: An expression that controls benchmark runtime. Benchmarking will continue until this expression returns false. Contains two built-in variables:

time: Duration for consistent runtimes.
frame: Frame number for reproducibility. (This will be slightly off due to internal shader cache workarounds, but the number of frames used will be consistent across runs)

Examples:

--run-while="time < 1.0": Run each benchmark for 1 second
--run-while="frame < 10": Run each benchmark for 10 frames
--run-while="frame < 100 and time < 5.0": Run each benchmark for 100 frames, with a 5 second timeout
--run-while=false: Dry run. This can be useful for capturing stdout to get a list of benchmark names, which can later be passed to --include-benchmarks so that they can be run and traced into separate files.

Defaults to --run-while="time < 5.0".

Fixes godotengine/godot-proposals#2165

@anholt See the sample script below for basic usage, can you check to see if there's anything else you need?

@anholt Bump :slightly_smiling_face:

This sounds like a great way to be able to capture traces/fossils.  Note that I don't necessarily have time to do the captures for godot, I was just trying to offer something that would really help us make sure your software keeps working on open drivers.

Note that I don't necessarily have time to do the captures for godot, I was just trying to offer something that would really help us make sure your software keeps working on open drivers.

In that case, would anyone else on the Mesa team be interested in this?
While Godot does not currently utilize features such as ray tracing and mesh shaders, in the future it may end up being one of only very few real-world projects that can be used to validate driver implementations of advanced Vulkan functionality.


refactor: Refactor gitlab go routines

Closing this as we're redoing the go-routines right now in the github scraper and will supercede these changes anyway


Tailwind CSS is included twice in the project

Environment

Operating System: Darwin
Node Version:     v20.11.1
Nuxt Version:     3.12.2
CLI Version:      3.12.0
Nitro Version:    2.9.6
Package Manager<EMAIL_ADDRESS>Builder:          -
User Config:      -
Runtime Modules:  -
Build Modules:    -
nuxtjs/tailwindcss Version: 6.12.0

Reproduction
https://github.com/plentymarkets/plentyshop-pwa
Please refer to additional context section for what it looks like.
Describe the bug
I've noticed that the Tailwind CSS framework is being included twice in my project when using this package. This duplication can cause unexpected behavior and increase the load time of the project.
Additional context
https://plentyshop.plentymarkets.com/

Logs
No response

Hey! Thanks for opening an issue.
I see in your nuxt.config, you have provided a path to style.scss in css, and that file calls the @tailwind directives. The module isn't aware that you already have a CSS file plugged into Nuxt that is also using the tailwind directives, so it will add its own stylesheet too. You may want to either 1) remove tailwind directives from style.scss, 2) use assets/css/tailwind.css instead, or 3) set tailwindcss.cssPath to false in nuxt.config.
Let me know! 😄


Server Side Exception: Allowed Memory Exhausted

Original comment:
In some cases, the savon is returning an out of memory error, as noticed by @reckerswartz : https://github.com/Shopify/shopify_transporter/issues/8#issuecomment-394832687
Running ruby orders.rb is raising:
/gems/savon-2.12.0/lib/savon/response.rb:85:in `raise_soap_and_http_errors!': (SOAP-ENV:Server) Allowed memory size of<PHONE_NUMBER> bytes exhausted (tried to allocate 83 bytes) (Savon::SOAPFault)
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/response.rb:14:in `initialize'
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/operation.rb:72:in `new'
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/operation.rb:72:in `create_response'
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/operation.rb:58:in `call'
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/client.rb:36:in `call'
	from orders.rb:28:in `base_orders'
	from orders.rb:19:in `orders'
	from orders.rb:9:in `run'
	from orders.rb:48:in `<main>'

@reckerswartz this seems to be because the server ran out of memory while generating the data needed for the request: https://magento2.atlassian.net/wiki/spaces/m1wiki/pages/14024846/Allowed+memory+size+exhausted
This seems to happen on the request to generate the list of orders using the salesOrderList call.
We are already working on updating the scripts to retrieve a smaller set of orders at a time and be resumable. This will help tremendously with this issue.
Until then, you can make these changes to only retrieve orders for specific dates with code like this:
# update the `def soap_client` method in `sample_scripts/third_party_platform_exporting/magento/v1.9/soap_api/transporter_exporter.rb` to:
  def soap_client
    @soap_client ||= Savon.client(
      wsdl: "https://#{required_env_vars['MAGENTO_SOAP_API_HOSTNAME']}/api/v2_soap?wsdl",
      open_timeout: 500,
      read_timeout: 500,
      convert_request_keys_to: :none
    )
  end

# change the `base_orders` and `items_for` methods in `sample_scripts/third_party_platform_exporting/magento/v1.9/soap_api/orders.rb`  to:
  def base_orders
    soap_client.call(
      :sales_order_list,
      message: {
        sessionId: soap_session_id,
        filters: filters.merge(complex_filters),
      }
    ).body[:sales_order_list_response][:result][:item]
  end

  def items_for(order)
    soap_client.call(
      :sales_order_info,
      message: {
        sessionId: soap_session_id,
        orderIncrementId: order[:increment_id],
      }
    ).body[:sales_order_info_response]
  end

  def filters
    {
      filter: {
        item: {
          key: 'store_id',
          value: required_env_vars['MAGENTO_STORE_ID'],
        }
      }
    }
  end

  def complex_filters
    # Change the `from` and `to` values to the dates you want to get orders for
    {
      complex_filter: [
        item: [
          {
            key: 'created_at',
            value: {
                key: 'from',
                value: '2018-05-01 00:00:00',
            }
          },
          {
            key: 'created_at',
            value: {
                key: 'to',
                value: '2018-06-01 00:00:00',
            }
          },
        ]
      ]
    }
  end

You can store these files into seperate json outputs:
# Set a start and end date in the complex_filters method above to get a subset or orders and then run the script:
ruby orders.rb > magento_orders1.json

# Change the dates to get more orders and then run the script again:
ruby orders.rb > magento_orders2.json

# Change the dates to get more orders and then run the script again:
ruby orders.rb > magento_orders3.json

The gem accepts multiple files as input when converting:
shopify_transporter convert --config=config.yml --object=customer magento_orders1.json magento_orders2.json magento_orders3.json > shopify_customers.csv

@surajreddy  after making chaces as per above instruction it is rising another error
/home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/response.rb:85:in `raise_soap_and_http_errors!': (6) Required parameter is missing, for more details see "exception.log". (Savon::SOAPFault)
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/response.rb:14:in `initialize'
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/operation.rb:72:in `new'
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/operation.rb:72:in `create_response'
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/operation.rb:58:in `call'
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/client.rb:36:in `call'
	from /home/aventum/workspace/shopify_transporter/sample_scripts/third_party_platform_exporting/magento/v1.9/soap_api/transporter_exporter.rb:41:in `soap_session_id'
	from orders.rb:30:in `base_orders'
	from orders.rb:19:in `orders'
	from orders.rb:9:in `run'
	from orders.rb:83:in `<main>'

@reckerswartz this is likely because one of the parameters does not have the right casing.
Can you confirm that the casing of these request parameters is correct in the def soap_session_id method?
      message: {
        username: required_env_vars['MAGENTO_SOAP_API_USERNAME'],
        apiKey: required_env_vars['MAGENTO_SOAP_API_KEY'],
      }

The apiKey parameter used to be api_key: but now needs to be apiKey.

@surajreddy forget to make that change but another issue pop up
ruby orders.rb
getting
sesion_id: 7b2e2c510fbxxxxxxxf98xx1cb4e1758d49c
/home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/response.rb:85:in `raise_soap_and_http_errors!': (5) Session expired. Try to relogin. (Savon::SOAPFault)
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/response.rb:14:in `initialize'
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/operation.rb:72:in `new'
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/operation.rb:72:in `create_response'
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/operation.rb:58:in `call'
	from /home/aventum/.rvm/gems/ruby-2.4.0@transporter/gems/savon-2.12.0/lib/savon/client.rb:36:in `call'
	from orders.rb:28:in `base_orders'
	from orders.rb:19:in `orders'
	from orders.rb:9:in `run'
	from orders.rb:86:in `<main>'

@reckerswartz this is an error from the Magento instance. It usually means that the session id has expired by the time the code is making a second request. If you're using the script as is, it shouldn't happen as the script generates a new session every time it is run.
If it is still happening, then I suggest checking the session settings on the magento instance - maybe the session is set to expire very fast.

Closing this because of inactivity.
For memory issues I would suggest trying some of the code in the https://github.com/Shopify/shopify_transporter/tree/extraction-scripts-by-daterange branch. The code in this branch extracts data in batches and should reduce the memory constraints needed. There is a readme for using the code in the branch at https://github.com/Shopify/shopify_transporter/blob/extraction-scripts-by-daterange/sample_scripts/third_party_platform_exporting/magento/v1.9/soap_api/README.md
This will be merged with the primary tool soon, but it needs some more work before it can be fully integrated.


Update stm32h735 RNG.

A register and several bits in the control register were missing from the SVD file. These missing registers were very similar to those in the l4+, so I edited those patches to make it work.

@twantonie Would you be able to rebase this once more? It's conflicting with the base branch annoyingly
Then I will merge


Use AND instead of OR between matchers within a rule

This rule will match (files matching *.ts) OR (the user has bot in its name).
{
  "includes": ["*.ts"],
  "eventJSONPath": "$.sender.login.match(/*bot/)"
}

Note that you can gain the same OR functionality by using two rules - one with includes and the other with eventJSONPath. Currently, there is no way to AND multiple types of matchers.
We need to change the behavior between matchers so that they are AND'd and not OR'd.

closed by #88


Add missing require for StringIO

This raised NameError: uninitialized constant StringIO in parallel spec runs like here: https://ci.appveyor.com/project/larskanis/rubyinstaller2-hbuor/build/job/igy0qvplokejuy2b

Thanks for the fix!
cc @andrykonchin
Core specs should avoid depending on stdlib when possible, so I'll try just using String after merging this.

FWIW, the reason we see this now is that RubyGems in 2.7.0 no longer require 'stringio'


Use api to register unbreakable nodes

I have shortened the code.
Api
maptools.register_unbreakable_node(name)

name: the source block (e.g. default:stone)

Output

the unbreakable node name: (e.g. default:stone_u)
The function return:
-- true: The function run sucessful.
-- false: The command failed.

Superseded by https://github.com/minetest-mods/maptools/pull/23. Thanks for the contribution nonetheless!


Less Lines for Assignment of Constructor arguments

See old discussion under
Originally posted by @robintibor in https://github.com/braindecode/braindecode/pull/83/files

Old discussion:
agramfort:
using locals() is really brutal and it could pull some crap in the self.dict
one option is to inspect the init and set all parameters passed that we could detect with inspect module.
something like:
import inspect
init_signature = inspect.signature(self.__init__)

robintibor:
Yeah that maybe possible, then as a separate function. But maybe outside this PR then.
What is your view on data classes? https://docs.python.org/3/library/dataclasses.html
Btw some small discussion on this also here: https://stackoverflow.com/a/12191200/1469195

not relevant enough for now I would say


Improve error for AddEntityFrameworkStores

Fixes https://github.com/aspnet/Identity/issues/1001
@divega

We could just catch all exceptions and rethrow with our message and the original exception as an inner exception to be safe.

@HaoK I looked around, and I am almost sure the two cases I had seen in which we would throw the exception are:

Inherit from the IdentityUser that has more generic arguments
Change TKey to a different type from the default but forget to pass the new type as a generic argument in the call to AddEntityFrameworkStores.

For the latter I noticed you filed https://github.com/aspnet/Identity/issues/876.

BTW, a couple of simpe searches shows that this exception is one of the most common reasons customers file bugs on the Identity repo and ask question about Identity over in StackOverflow.
If we get it right this could help a lot!

I'll try to fix #876 in this PR as well

Updated with the error message tweaks, also added support for infering the TKey from any DbContext that dervies from IdentityDbContext<TUser,TRole,TKey>.  This makes the second overload unnecessary but we can keep it for breaking changes, and also supporting custom DbContext's that don't derive from our DbContext (which isn't a requirement today)

13ae7b21f3459e97cd5853b6e6ccb229dac1bafe


Feature: Light VSCode Integration

Hello,
I've been working with this template a good amount lately, and polished up some of the features I set up for some beginners for possible inclusion.
notes:

VSCode debugpy launch task created
added setup app with a command to get_or_set a provided/default superuser
black formatted
pytest.sh results below, I could add additional tests to get coverage back up if needed

platform linux -- Python 3.11.9, pytest-7.4.4, pluggy-1.5.0
django: version: 4.2.10, settings: website.settings (from ini)
rootdir: /usr/src/website
configfile: pytest.ini
plugins: django-4.7.0
collected 10 items

polls/tests.py ..........                                                [100%]

============================== 10 passed in 0.19s ==============================
Name                           Stmts   Miss  Cover   Missing
------------------------------------------------------------
polls/__init__.py                  0      0   100%
polls/admin.py                    12      0   100%
polls/apps.py                      4      0   100%
polls/models.py                   20      2    90%   15, 33
polls/tests.py                    57      0   100%
polls/urls.py                      4      0   100%
polls/views.py                    28      8    71%   39-58
setup/__init__.py                  0      0   100%
setup/admin.py                     1      0   100%
setup/apps.py                      4      0   100%
setup/management/__init__.py      18     11    39%   10-13, 17-25
setup/models.py                    1      0   100%
setup/tests.py                     1      0   100%
website/__init__.py                6      0   100%
website/settings.py               52      2    96%   95, 198
website/urls.py                    6      0   100%
------------------------------------------------------------

Hi @nbovee ! Thanks for the great work, it's awesome!
I'll merge the changes into master as soon as I can review everything. Unfortunately, I don't use VS Code often. Could you please confirm that all your changes related to VS Code work for you?

Thank you, I'd be happy to!
What do you prefer I add to the readme, if anything? I was hesitant to as I didn't want to get into too much extra detail.
Here is the log of running the vscode debug task through the Run and Debug tab (twice):
 *  Executing task: docker-build

> docker image build --pull --file "C:\CODE\django-docker-template/Dockerfile" --tag "django-docker-template:master" --label "com.microsoft.created-by=visual-studio-code" "C:\CODE\django-docker-template" <

#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 2.03kB done
#1 DONE 0.0s

...shortened log...

#16 DONE 0.0s

View build details: docker-desktop://dashboard/build/default/default/k6jqqt6vli6mtdrolelmjzqw3
 *  Terminal will be reused by tasks, press any key to close it.

 *  Executing task: docker run --rm -v sqlite:/sqlite django-docker-template:master python manage.py safecreatesuperuser --no-input

SQLite will be used.
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, polls, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK

...shortened log...

  Applying sessions.0001_initial... OK
Admin user created
 *  Terminal will be reused by tasks, press any key to close it.

 *  Executing task: docker-run: debug

> docker container run --detach --tty --rm --name "djangodockertemplate-dev" --publish "8000:8000" --mount "type=bind,source=c:\Users\USER\.vscode\extensions\ms-python.debugpy-2024.6.0-win32-x64\bundled\libs\debugpy,destination=/debugpy,readonly" --label "com.microsoft.created-by=visual-studio-code" --env "DJANGO_DEBUG=True" --env "POSTGRES_DB=" --env-file "C:\CODE\django-docker-template/.env" --entrypoint "python3" -v sqlite:/sqlite django-docker-template:master <

4827461a50009b8f0e6379f604db773f32f4c204479ceb48e148e04c15554616
 *  Terminal will be reused by tasks, press any key to close it.

At this point the terminal automatically tabs to the debug console, and automatically launches localhost:8000 in the browser.
The first warning seems due to the way vscode attaches debugpy, but causes no problems. We also get the 404 as the base index does not exist.
0.59s - Expected: /debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_linux_amd64.so to exist.

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
May 31, 2024 - 20:36:23
Django version 4.2.10, using settings 'website.settings'
Starting development server at http://<IP_ADDRESS>:8000/
Quit the server with CONTROL-C.

"GET / HTTP/1.1" 404 2292

Breakpoints marked on vscode are correctly caught and mapped.

When the task is run a second time, the only change in our log is the altered output of safecreatesuperuser:
 *  Executing task: docker run --rm -v sqlite:/sqlite django-docker-template:master python manage.py safecreatesuperuser --no-input

SQLite will be used.
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, polls, sessions
Running migrations:
  No migrations to apply.
Admin user already exists
 *  Terminal will be reused by tasks, press any key to close it.

Otherwise, the second and future runs function as above.
If the user directly invokes Tasks: Run Task > docker-run: debug, they do not get the debugger, but no adverse behavior is caused. At worst they would need docker stop djangodockertemplate-dev to stop the container.
 *  Executing task: docker-build

> docker image build --pull --file "C:\CODE\django-docker-template/Dockerfile" --tag "django-docker-template:master" --label "com.microsoft.created-by=visual-studio-code" "C:\CODE\django-docker-template" <

  ...shortened log...

#16 DONE 0.0s

View build details: docker-desktop://dashboard/build/default/default/i09lctw92nw1k9tnjg73cfxij
 *  Terminal will be reused by tasks, press any key to close it.

 *  Executing task: docker run --rm -v sqlite:/sqlite django-docker-template:master python manage.py safecreatesuperuser --no-input

  ...shortened log...

  Applying sessions.0001_initial... OK
Admin user created
 *  Terminal will be reused by tasks, press any key to close it.

 *  Executing task: docker-run: debug

> docker container run --detach --tty --name "djangodockertemplate-dev" --publish "8000:8000" --mount "type=bind,source=c:\Users\USER\.vscode\extensions\ms-python.debugpy-2024.6.0-win32-x64\bundled\libs\debugpy,destination=/debugpy,readonly" --label "com.microsoft.created-by=visual-studio-code" --env "DJANGO_DEBUG=True" --env "POSTGRES_DB=" --env-file "C:\CODE\django-docker-template/.env" --entrypoint "python3" -v sqlite:/sqlite django-docker-template:master <

311f04e52ff3bbfbf7423084473b5ef4e7ab9722c49a981ede82fb299acae9fe
 *  Terminal will be reused by tasks, press any key to close it.

Here is the updated output of pytest.sh, which can be run with Tasks: Run Task > shell: pytest.sh in addition to the provided readme command:
============================= test session starts ==============================
platform linux -- Python 3.11.9, pytest-7.4.4, pluggy-1.5.0
django: version: 4.2.10, settings: website.settings (from ini)
rootdir: /usr/src/website
configfile: pytest.ini
plugins: django-4.7.0
collected 10 items

polls/tests.py ..........                                                [100%]

============================== 10 passed in 0.20s ==============================
Name                           Stmts   Miss  Cover   Missing
------------------------------------------------------------
polls/__init__.py                  0      0   100%
polls/admin.py                    12      0   100%
polls/apps.py                      4      0   100%
polls/models.py                   20      2    90%   15, 33
polls/tests.py                    57      0   100%
polls/urls.py                      4      0   100%
polls/views.py                    28      8    71%   41-60
setup/__init__.py                  0      0   100%
setup/admin.py                     1      0   100%
setup/apps.py                      4      0   100%
setup/management/__init__.py       0      0   100%
setup/models.py                    1      0   100%
setup/tests.py                     1      0   100%
website/__init__.py                6      0   100%
website/settings.py               52      2    96%   99, 202
website/urls.py                    6      0   100%
------------------------------------------------------------
TOTAL                            196     12    94%

Hi @nbovee! Awesome, thank you! I'll merge this code into the master branch. If you get a chance, it would be great to add an extra section in the README about how to work with the project in VS Code. But only if you feel like it! 😊


add deprecation notice to README

Codecov Report

Merging #36 (8429044) into master (fa6cf37) will decrease coverage by 0.92%.
The diff coverage is 63.63%.

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
- Coverage   94.93%   94.01%   -0.93%
==========================================
  Files           9        9
  Lines         375      384       +9
==========================================
+ Hits          356      361       +5
- Misses         19       23       +4

Impacted Files
Coverage Δ

src/executor.js
87.62% <60.00%> (-3.29%)
:arrow_down:

src/profile.js
91.66% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ded32e...8429044. Read the comment docs.

Codecov Report

Merging #36 (8429044) into master (fa6cf37) will decrease coverage by 0.92%.
The diff coverage is 63.63%.

@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
- Coverage   94.93%   94.01%   -0.93%
==========================================
  Files           9        9
  Lines         375      384       +9
==========================================
+ Hits          356      361       +5
- Misses         19       23       +4

Impacted Files
Coverage Δ

src/executor.js
87.62% <60.00%> (-3.29%)
:arrow_down:

src/profile.js
91.66% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ded32e...8429044. Read the comment docs.


[ZEPPELIN-2896] Replacing addHeader with setHeader method in CorsFilter.java

What is this PR for?
HTTP Response Headers were being added multiple times. Replacing addHeader method with setHeader overrides the Response Header value with new/existing value instead of adding another duplicate response Header.
What type of PR is it?
[Bug Fix]
What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-2896

How should this be tested?
Open the Zeppelin URL in Chrome Browser. Select "More Tools" -> "Developer Tools" from the right-side menu. Under Network Section, select the request with name "localhost" and check for "Response Headers". You should see response headers appearing only once.

@1ambda, @Leemoonsoo, @felixcheung, @jongyoul, @prabhjyotsingh Please help review this.

LGTM

@felixcheung IMHO, it happens coz we first hit the root Context Path and Jetty redirecting it later to the landing/welcome page i.e. index.html. These headers are duplicated only for such requests and not every request.

Merging this to master and branch-0.7 if no more discussion.

@1ambda @Leemoonsoo Can you please help review this fix? As this is related to [ZEPPELIN-2775] which is getting shipped in 0.7.3, we may want to merge this now and get this as well into RC2.

Tested locally and works well. Thanks for the fix.

@prabhjyotsingh I think we can merge this PR into 0.7.3-RC1 as well. What do u think?