pull request for e2e test at 11/14/2016 20:15:09

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

optest/docs/updated_at.md
:white_check_mark:Succeeded

Details

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


⚠ Bofrost.lu has degraded performance

In 147c061, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 2815 ms

Resolved: Bofrost.lu performance has improved in e841cbc after 13 minutes.


Why it almost  do not speedup with distributed learning?

First, I tried 2 spark slaves, it take about 11 minutes to train my model.
submit info: spark-submit --master yarn --num-executors 2 --executor-memory 19G --executor-cores 16 --conf spark.dynamicAllocation.enabled=false --jars s3://EMR/jars/synapseml-vw_2.12-0.9.4.jar,s3://EMR/jars/synapseml_2.12-0.9.4.jar,s3://EMR/jars/client-sdk-1.14.0.jar ......

Second, I tried only one spark slave, it take about 12 minutes to train my model.
submit info: spark-submit --master yarn --num-executors 1 --executor-memory 19G --executor-cores 16 --conf spark.dynamicAllocation.enabled=false --jars s3://EMR/jars/synapseml-vw_2.12-0.9.4.jar,s3://EMR/jars/synapseml_2.12-0.9.4.jar,s3://EMR/jars/client-sdk-1.14.0.jar ......

My results show that LightGBM do not speedup with distributed learning. And my CPU Utilization could be more than 95% on each spark slave! Why it almost do not speedup with distributed learning?
My cluster/data/code Info：
spark slave: 16 vCore, 32 GiB * 2;
spark version: Spark 3.1.2, Hive 3.1.2, ZooKeeper 3.5.7;
dependency: synapseml_2.12-0.9.4.jar;
train data set: 5377937 rows;
code:
val classifier = new LightGBMClassifier()
  .setLabelCol("play")
  .setObjective("binary")
  .setCategoricalSlotNames(Array("countrycode_index","itemID_index","uid_index"))
  .setUseBarrierExecutionMode(true)
  .setFeaturesCol("gbdtFeature")
  .setPredictionCol("predictPlay")
  .setNumIterations(trees)
  .setNumLeaves(32)
  .setLearningRate(0.006)
  .setProbabilityCol("probabilitys")
  .setEarlyStoppingRound(200)
  .setBoostingType("gbdt")
  .setLambdaL2(0.002)
  .setMaxDepth(24)
val lgbmModel =classifier.fit(lgbmTrainDF.repartition(repartNum)) // repartNum='the number of spark slaves '

Thanks in advance!

hi @JWenBin can you please try:
useSingleDatasetMode = True
numThreads = num cores - 1
These two PRs should resolve this:
https://github.com/microsoft/SynapseML/pull/1222
https://github.com/microsoft/SynapseML/pull/1282
In performance testing we saw big speedup with new single dataset mode and numThreads set to num cores -1.
The two PRs above will be available in 0.9.5 or you can get them with the latest build right now.
For more information on the new single dataset mode please see the PR description:
https://github.com/microsoft/SynapseML/pull/1066
This new mode was created after extensive internal benchmarking.

hi @JWenBin can you please try: useSingleDatasetMode = True numThreads = num cores - 1 These two PRs should resolve this:
#1222 #1282
In performance testing we saw big speedup with new single dataset mode and numThreads set to num cores -1. The two PRs above will be available in 0.9.5 or you can get them with the latest build right now.
For more information on the new single dataset mode please see the PR description: #1066
This new mode was created after extensive internal benchmarking.

Thank you for your Reply!   In our benchmarking this didn't affect accuracy at all.  It only affected memory usage and execution time.  I wonder why this might be causing AUC and accuracy to get worse.  Essentially we are just reducing the number of datasets being run in parallel, and using more multithreading on each machine while trying to reduce inter-process communication.

hi @JWenBin "the speed improved a lot, but AUC and accuracy becomes too low (less than 0.6)" That is very interesting. In our benchmarking this didn't affect accuracy at all. It only affected memory usage and execution time. I wonder why this might be causing AUC and accuracy to get worse. Essentially we are just reducing the number of datasets being run in parallel, and using more multithreading within each machine while reducing inter-process communication.

I deleted 'setUseBarrierExecutionMode(true)' while using ‘setUseSingleDatasetMode(true)’ and retrain the model again. My AUC returned to normal level. But I still don't know how 'setUseBarrierExecutionMode(true)' affect ‘setUseSingleDatasetMode(true)’ while trainning.
Thank you very much!

Every input data is about 48MB±2MB in each task while trainning('setUseBarrierExecutionMode(true)'), But spark history server indicate only 575989/26320507 rows were trained enough time.


"ResolvePackageNotFound:" Trouble installing pyrpipe from environment.yaml into a virtual environment using conda

Hi, I'm trying to install the pyrpipe package using the conda env create -f pyripe_environment.yaml command (as suggested here: https://githubmemory.com/repo/urmi-21/pyrpipe) but I'm getting a couple error messages: one is saying Solving environment: failed and the other is saying ResolvePackageNotFound:  followed by about a hundred other packages. The first dozen or so are:
  - boost-cpp==1.74.0=hc6e9bd1_2
  - orfipy==0.0.3=py39h7cff6ad_1
  - coloredlogs==15.0=py39hf3d152e_0
  - stringtie==2.1.4=h7e0af3c_0
  - libtool==2.4.6=h58526e2_1007
  - perl-xml-libxml==2.0132=pl526h7ec2d77_1
  - sqlite==3.35.3=h74cdb3f_0
  - wrapt==1.12.1=py39h3811e60_3
  - setuptools==52.0.0=py39h06a4308_0
  - googleapis-common-protos==1.53.0=py39hf3d152e_0
  - openblas==0.3.12=pthreads_h43bd3aa_1
  - chardet==4.0.0=py39hf3d152e_1
  - rich==10.0.1=py39hf3d152e_0
  - libpng==1.6.37=hed695b0_2
  - libstdcxx-ng==9.3.0=h6de172a_18

I'm using a Mac computer and my operating system is OSX 11.5.2.
My conda configuration (obtained using the conda info command) is:
    active env location : /Users/myname/miniconda3
            shell level : 1
       user config file : /Users/myname/.condarc
 populated config files : /Users/myname/.condarc
          conda version : 4.10.3
    conda-build version : not installed
         python version : 3.9.5.final.0
       virtual packages : __osx=10.16=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /Users/myname/miniconda3  (writable)
      conda av data dir : /Users/myname/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://conda.anaconda.org/bioconda/osx-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/myname/miniconda3/pkgs
                          /Users/myname/.conda/pkgs
       envs directories : /Users/myname/miniconda3/envs
                          /Users/myname/.conda/envs
               platform : osx-64
             user-agent : conda/4.10.3 requests/2.25.1 CPython/3.9.5 Darwin/20.6.0 OSX/10.16
                UID:GID : 501:20
             netrc file : None
           offline mode : False

From what I've seen on this thread (https://github.com/Climate-Data-Science/Climate-Similarity-Metrics/issues/13) it seems like one issue might be that there are Operating System-specific dependencies in the .yaml package, and that this could be resolved by adding --no-builds to the conda env export -f environment.yml [here?] script. I am relatively new to programming but from what I've heard, I think this is something that would be run on the developer's end. I'm writing to ask if this would resolve the error I'm having, and if it wouldn't, if you could suggest some ways for me to resolve it (possibly using a command analogous to --no-builds but for conda env create instead of for conda env export)?

Following Matt Thompson's answer to the question here (https://stackoverflow.com/questions/65735532/i-constantly-get-resolvepackagenotfound), I deleted the information after the single equals-signs for all of the "ResolvePackageNotFound"-dependencies and that got the number of those dependencies down to about a dozen. I then deleted the version-specifications (the information after the double equals-signs) and that got the number down to four, though I'm not exactly sure of the consequences of deleting that sort of information in the way that I have done. But anyway, that got the number of ResolvePackageNotFound dependencies down to four, which are:
ResolvePackageNotFound:
  - libgcc-ng
  - libstdcxx-ng
  - _openmp_mutex
  - libgomp

I ran this and almost killed my computer - it said "Found conflicts! Looking for incompatible packages" and then churned out probably somewhere in the range of thousands of lines of what looked to me to be specifying various conflicts. @urmi-21 if you or anyone might be able to help me, I'd be very grateful.
If it's any help, some of the last lines are:
Package cutadapt conflicts for:
trim-galore==0.6.6=hdfd78af_1 -> cutadapt
cutadapt=3.3The following specifications were found to be incompatible with your system:

  - feature:/osx-64::__unix==0=0
  - feature:|@/osx-64::__unix==0=0
  - dropbox==11.4.1=pyhd8ed1ab_0 -> stone[version='>=2'] -> __unix
  - stone==3.2.1=pyhd8ed1ab_0 -> __unix

Your installed version is: 0

The "Package [package] conflicts for ..." part seems to be repeated much of the way through for different packages, but without looking too closely, I didn't see the osx/unix part with the dashes and indentation elsewhere I don't think.

Hi @Aaronpresser
Thanks for trying out pyrpipe and reporting the issue. I agree environment files are not compatible with macOS due to the build versions.
The environment was created using the command listed here. Can you instead create an environment using:
conda create -n pyrpipe_0.0.5_mac -c bioconda pyrpipe star=2.7.7a sra-tools=2.10.1 stringtie=2.1.4 trim-galore=0.6.6 orfipy=0.0.3 salmon=1.4.0

or to make it faster use mamba i.e.
mamba create -n pyrpipe_0.0.5_mac -c bioconda pyrpipe star=2.7.7a sra-tools=2.10.1 stringtie=2.1.4 trim-galore=0.6.6 orfipy=0.0.3 salmon=1.4.0

NOTE: the latest sra-tools gave me issues on macos
BTW depending on your requirements you can add remove these tools. I have tested this on a mac and it seems to work.
Please let me know if it works for you.

Hey @urmi-21 thank you so much for reply, that made things a lot clearer and the code you suggested helped resolve my problem - I really appreciate it! Now, I'm really looking forward to using your package, which I understand is wonderful!


ModelView generation fails for blob columns

A ModelView that contains a blob will fail to compile due to getPrimaryConditionClause(), while other field types compile without issue. Example ModelView:
@ModelView(database = TheDatabase.class)
public class TestView extends BaseModelView<DataTable> {
    @ModelViewQuery
    public static final Query QUERY = new Select(DataTable_Table.data).from(DataTable.class);

    @Column
    public Blob data;
}

This is the code that's generated in TestView_View.java.
  public final ConditionGroup getPrimaryConditionClause(TestView model) {
    ConditionGroup clause = ConditionGroup.clause();
    clause.and(TestView_ViewTable.data.eq(model.data.getBlob()));return clause;
  }

The error produced is:
Error:(37, 43) error: no suitable method found for eq(byte[])
method Property.eq(Blob) is not applicable
(actual argument byte[] cannot be converted to Blob by method invocation conversion)
method BaseProperty.eq(BaseModelQueriable) is not applicable
(actual argument byte[] cannot be converted to BaseModelQueriable by method invocation conversion)
method BaseProperty.eq(ITypeConditional) is not applicable
(actual argument byte[] cannot be converted to ITypeConditional by method invocation conversion)

fixed in develop.


Add Container Component for more complex layouts

This is to cover situations where we want:

overlapping components where there is a priority order to what gets displayed
components that are aligned to the right of the window

Here's what I'm thinking:
local config = {
  renderers = {
    {
      "container",
      width = "fit_content", --<-- default value for width
      content = {
        {
          "indent",
          zindex = 10,
          indent_size = 2,
          padding = 1, -- extra padding on left hand side,
        },
        { "indent_guide", enabled = true, zindex = 10, align = "right", ... }, -- `...` = the config itself
        { "collapser_icon", enabled = true, zindex = 20, align = "right", ... }, -- `...` = the config itself
      }
    }
  },
  {
    "container",
    width = 2,
    content = {
      { "icon", zindex = 10 },
      { "diagnostics", zindex = 20, show_errors_only = true },
    }
  },
  {
    "container",
    width = "100%", -- <-- means 100% of what's left from the current column to the window width
    content = {
      { "name", trailing_slash = false, zindex = 5 },
      { "git_status", enabled = true, zindex = 10, align = "right", symbols = { ... } },
    }
  }
}

Originally posted by @cseickel in https://github.com/nvim-neo-tree/neo-tree.nvim/discussions/191#discussioncomment-2419067

I had some performance issues today and I suspect it may be this feature. If anyone else experiences performance issues with this feature, please let me know.

No performance issues, but on the main branch I get this message when opening neo-tree:
container_width:  35 max_width:  nil
(without renderers key in the config table)

Thanks. I'll take out that debug statement. I think this is solid now and I'll be releasing it soon.


::class is not valid

Using class as a name of a constant is available in PHP 5.5 only.
Here is the example of the error message:
exception 'yii\base\ErrorException' with message 'syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'' in
/www/my/vendor/nexmo/client/src/Message/Client.php:154
So it's better to change ::class to get_class()

5.4 has been end of life for more than a year (in fact, 5.5 is ending security updates in a few days), so I probably should set the composer.json target to a higher version.
That said, if ::class is the only 5.5 features we're current using, that's easy enough to take out. I'll take a look.

Ideally, we'd like to only support versions of PHP that are being actively maintained. However, we understand that not everyone can upgrade their version of PHP easily.
We've come to a compromise which allows us to use modern tools (::class syntax, modern versions of PHPUnit) without dropping support for PHP 5. Going forward, we'll only be supporting PHP 5.6+ (see https://github.com/Nexmo/nexmo-php/commit/880a3672c42660730aa74059e911140f1968a8f6)
Thanks for raising this issue, and let us know if there's anything we can do to help in the future


Installation guide for pipenv environment

Please add installation guide for pipenv   environment. I am not using conda environment.

Regardless of the package management software you use, just install Python 3.8 and the following dependencies with the latest version:
pickle
pytorch
torchvision
matplotlib
tqdm
scipy

Afterwards, make sure to add the root directory of the library (pocket/) to your PYTHONPATH. You should be good to go.
Fred.

Thanks. It works.


waitFor custom event feature request

There is no API at the moment to wait for a custom event in the node context, right?
Example:
await page.goto('gridwithimages.com', {waitUntil: 'grid-load'});
await page.screenshot();

I only found custom-event.js, which is quite verbose and doesn't await until the event is fired anyway.

@doplumi there's no such API for now because there seem to be too many similarly-useful scenarios that are too different. For example, one might want to wait on console.timeStamp events, someone might want to wait on a specific [CustomEvent] dispatched to a certain node.
I'd recommend using helpers for now that satisfy your particular user scenario. If at some point we converge on a certain best practice (e.g. using console.timeStamp to notify page lifecycle is appealing to me), we'll add the API.
Thanks.

hi . i am writting a test in which i have to wait for user click on submit button.
first user have to fill form then click on submit button.
kindly help me for waiting until the user click on submit button

This would be idle for wait for some of the browser apis, such as the Font Loading API to trigger events

I created a method to simplify this await waitForEvent('app-ready', 10)
/**
 * Wait for the browser to fire an event (including custom events)
 * @param {string} eventName - Event name
 * @param {integer} seconds - number of seconds to wait.
 * @returns {Promise} resolves when event fires or timeout is reached
 */
async function waitForEvent(eventName, seconds) {

    seconds = seconds || 30;

    // use race to implement a timeout
    return Promise.race([

        // add event listener and wait for event to fire before returning
        page.evaluate(function(eventName) {
            return new Promise(function(resolve, reject) {
                document.addEventListener(eventName, function(e) {
                    resolve(); // resolves when the event fires
                });
            });
        }, eventName),

        // if the event does not fire within n seconds, exit
        page.waitFor(seconds * 1000)
    ]);
}

I created a method to simplify this await waitForEvent('app-ready', 10)
/**
 * Wait for the browser to fire an event (including custom events)
 * @param {string} eventName - Event name
 * @param {integer} seconds - number of seconds to wait.
 * @returns {Promise} resolves when event fires or timeout is reached
 */
async function waitForEvent(eventName, seconds) {

    seconds = seconds || 30;

    // use race to implement a timeout
    return Promise.race([

        // add event listener and wait for event to fire before returning
        page.evaluate(function(eventName) {
            return new Promise(function(resolve, reject) {
                document.addEventListener(eventName, function(e) {
                    resolve(); // resolves when the event fires
                });
            });
        }, eventName),

        // if the event does not fire within n seconds, exit
        page.waitFor(seconds * 1000)
    ]);
}

@john-doherty Maybe once option is worth adding to reduce memory:
                document.addEventListener(eventName, function(e) {
                    resolve(); // resolves when the event fires
                }, { once: true });

And maybe it can be simplified a bit more as no resolved result is needed:
                document.addEventListener(eventName, resolve, { once: true });

@john-doherty Maybe once option is worth adding to reduce memory:
                document.addEventListener(eventName, function(e) {
                    resolve(); // resolves when the event fires
                }, { once: true });

And maybe it can be simplified a bit more as no resolved result is needed:
                document.addEventListener(eventName, resolve, { once: true });

I created a method to simplify this await waitForEvent('app-ready', 10)
/**
 * Wait for the browser to fire an event (including custom events)
 * @param {string} eventName - Event name
 * @param {integer} seconds - number of seconds to wait.
 * @returns {Promise} resolves when event fires or timeout is reached
 */
async function waitForEvent(eventName, seconds) {

    seconds = seconds || 30;

    // use race to implement a timeout
    return Promise.race([

        // add event listener and wait for event to fire before returning
        page.evaluate(function(eventName) {
            return new Promise(function(resolve, reject) {
                document.addEventListener(eventName, function(e) {
                    resolve(); // resolves when the event fires
                });
            });
        }, eventName),

        // if the event does not fire within n seconds, exit
        page.waitFor(seconds * 1000)
    ]);
}

This is very useful, could this be made part of the Puppeteer API?

the proposed solutions here won't work in cases that you have to add an event listener, then take an action to trigger the event, then wait on the event.
e.g. let's say there are a few tabs with an indicator that is transitioned between the labels, such as the blue underline that is moved to the selected tab in MUI tabs

assuming waitForEvent is updated to add the listener on a specific element, then neither of the cases below will work:
await waitForEvent(page, selectorForTabIndicator, 'transitionend'); // gets stuck here until times out
await page.click(tabLabelSelector);

await page.click(tabLabelSelector);
await waitForEvent(page, selectorForTabIndicator, 'transitionend'); // event listener might get added after the event is emitted

await Promise.all([
  page.click(tabLabelSelector),
  waitForEvent(page, selectorForTabIndicator, 'transitionend'); // better chances than previous case, but still event listener might get added after the event is emitted
]);

based on the response on the linked issue (https://github.com/prasanaworld/puppeteer-screen-recorder/issues/44), I've created this method, but I wonder if there's a better way. Issues I faced with other solutions that led me to this one:

based on docs: "If the function passed to page.evaluateHandle returns a Promise, the function will wait for the promise to resolve and return its value." so trying to return a Promise from page.evaluate that calls resolve inside addEventListener's listen function will result in the same issue as the first example above
cannot pass a function from node context to browser context via page.evaluate, so it's not possible to create a Promise in node and pass its resolve function to page.evaluate to be called inside addEventListener's listen function

one problem that I can see with this implementation is that page.exposeFunction might not have finished running before the event is triggered, but given that setupPromise and an action (such as click) has to finish before the event is triggered, I think the chances are slim to none.
/**
 * returns two `Promise`s, one of which will resolve the first time the requested `event` is dispatched on the `selector`
 * based on https://github.com/puppeteer/puppeteer/issues/2455
 * @example
 * wait for a tab transition to end
 * ```ts
 * const { setupPromise, eventPromise: waitForTabTransition } = setupWaitForEvent(page, '.MuiTabs-indicator', 'transitionend');
 * await setup;
 * await page.click('button.MuiTab-root#tab1');
 * await waitForTabTransition;
 * ```
 * @example
 * wait for a dialog to open, because the node matching the selector is added to the DOM milliseconds
 * before the event is dispatched, setting `config.onDocument` gives better results
 * ```ts
 * const { setupPromise, eventPromise: waitForBackdropTransition } = await setupWaitForEvent(
 *   page,
 *   '.MuiModal-backdrop',
 *   'transitionend',
 *   {
 *     onDocument: true
 *   });
 * await setupPromise;
 * await page.click(selectorForButtonThatOpensDialog);
 * await waitForBackdropTransition;
 * ```
 * @param page
 * @param selector decides where in the doc to listen for the event (does not support puppeteers P-selectors, e.g. ::-p-text(Some text))
 * @param event name of the event to listen for
 * @param config setting `config.onDocument` to true will add the listener on the document and look for selector on and under `event.target`
 * @returns an object with two `Promise`s, `setupPromise` must be resolved before completing an action that can trigger `event`, `eventPromise` will resolve the first time `event` is triggered or after `config.timeout` milliseconds
 */
export function setupWaitForEvent(page: Page, selector: string, event: string, config: { onDocument?: boolean, timeout?: number } = {}) {
  const fname = randomUUID();
  const { timeout = 5000 } = config;

  const eventPromise = new Promise((resolve) => {
    page.exposeFunction(fname,  (e) => {
      resolve(e);
    });
  });

  const setupPromise = page.evaluate(
    (selector, event, config, fname) => {
      const { onDocument = false } = config;
      if (onDocument) {
        const handleEvent = (e: Event) => {
          const target = e?.target as Element;
          if (window[fname] && (target?.matches(selector) || target?.querySelector(selector))) {
            window[fname]();
            delete window[fname];
            document.removeEventListener(event, handleEvent);
          }
        };
        document.addEventListener(event, handleEvent);
      }
      else {
        document.querySelector(selector)?.addEventListener(event,
          (e) => {
            if (window[fname]) {
              window[fname]();
              delete window[fname];
            }
          },
          { once: true }
        );
      }
    },
    selector, event, config, fname
  );

  return {
    setupPromise,
    eventPromise: Promise.race([new Promise(r => setTimeout(r, timeout)), eventPromise])
  };
}

I refactored to this:
async function waitForEvent(page, event, timeout = 5000) {
     return Promise.race([
         page.evaluate(
             event => new Promise(resolve => document.addEventListener(event, resolve, { once: true })),
             event
         ),
         page.waitForTimeout(timeout)
     ]);
}

With page.waitForFunction() couldn't this be written as
async function waitForEvent(page: Page, event: string, timeout = 5000) {
    return page.waitForFunction(
        async event => {
            return new Promise(resolve => {
                document.addEventListener(event, resolve, { once: true })
            });
        },
        { timeout },
        event
    );
}


WIP: SDK dependency

Dependency works with local dir npm installation. That can be finished when tasit-sdk npm package been published.

@marcelomorgado So you're thinking once the npm package has been published we'll add tasit-sdk as a dependency in package.json?

Yes. With the latest change at features/rn-compatibily, tasit-sdk is importing ethers.js shims correctly.

@marcelomorgado The tasit-sdk can be added as a dep now that it's published https://github.com/tasitlabs/TasitSDK/issues/30

Demo app has now a sample of using TasitSDK.Account.


fix: support the character sequence 'sku' in product SKUs

PR Type
[x] Bugfix
What Is the Current Behavior?
The current product.route matcher results in an error page if the products SKU contains the character sequence sku e.g. glaskugel_1.
Example product detail URL:  http://localhost:4200/Acer/Glaskugel-skuglaskugel_1-catComputers.897.897_Acer
Results in a wrong REST API call for the product details: https://pwa-ish-demo.test.intershop.com/INTERSHOP/rest/WFS/inSPIRED-inTRONICS_Business-Site/rest;loc=en_US;cur=USD/products/gel_1?allImages=true
skuglaskugel_1
What Is the New Behavior?
Routes with product SKUs containing the character sequence sku work as expected.
Does this PR Introduce a Breaking Change?

[x] No
Other Information
AB#72230

Fixed and put in a workaround so slugs don't contain the term -cat. I think it would be more robust if the category ID was awlays separated at the end like http://localhost:4200/Acer/Glaskugel-skuglaskugel_1/catComputers.897.897_Acer


vnumber not found, findTop (check_syntax) - issue resurfaced

Issue:
./src/xbp/#redwood#xbptempvar.prog.abap[65, 3]                    - vnumber not found, findTop (check_syntax)
./src/xbp/#redwood#xbptempvar.prog.abap[72, 7]                    - vnumber not found, findTop (check_syntax)

it was never really fixed, just got out while doing some refactoring

try again, 2.39.10

Issue Resolved. Thanks


Http request middleware function

Why
In order to propagate trace context & headers for distributed tracing, we need some way of "injecting" middleware to our requests
How?

an parameter was added to the the function that creates a new webrpc client

Tests

re-generated _examples/golang-basic/generate.gen.go

webrpc-gen -schema ./_examples/golang-basics/example.ridl -target go -out ./_examples/golang-basics/example.gen.go -client -server -pkg main

re-generated in internal repos

Communication

post on slack that if anybody needs makes modifications to internal private repo's ridl, they should git pull, re-build, and reinstalling webrpc

Example Generated Client - _examples/golang-basics

All Generated Client Helpers function will look like this

Type of Function Pointer to Pass as a parameter into Create New Client

Hi @OrenLeung @miguelvr @kipply,
I'm walking through this fork's Pull Requests and wondering what we could backport to upstream webrpc repo.
Can you please share how this feature is used in a real world example?
Are you setting some request headers based on the context values?
Example from https://rakyll.medium.com/context-propagation-over-http-in-go-d4540996e9b0:
const requestIDHeader = "request-id"

// Transport serializes the request context into request headers.
type Transport struct {
 // Base is the actual round tripper that makes the request.
 // http.DefaultTransport is used if none is set.
 Base http.RoundTripper
}

// RoundTrip converts request context into headers
// and makes the request.
func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) {
 r = cloneReq(r) // per RoundTrip interface enforces

 rid := request.IDFromContext(r.Context())
 if rid != "" {
  r.Header.Add(requestIDHeader, rid)
 }

 base := t.Base
 if base == nil {
  base = http.DefaultTransport
 }

 return base.RoundTrip(r)
}

Have you considered using custom http.Transport instead? Would it be sufficient?
Thanks!
Best,
Vojtech


NIFI-13945 Exclude FindBugs Annotations and Hibernate Annotations

Summary
NIFI-13945 Excludes FindBugs Annotations and Hibernate Annotations dependencies due to LGPL 2 licensing conflicts. Annotation libraries are not required at runtime and cannot be included in distributed components.
Additional changes include adding these dependencies to the list of banned dependencies to avoid future inclusion.
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking

[ ] Apache NiFi Jira issue created

Pull Request Tracking

[ ] Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
[ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

[ ] Pull Request based on current revision of the main branch
[ ] Pull Request refers to a feature branch with one commit containing changes

Verification
Please indicate the verification steps performed prior to pull request creation.
Build

[ ] Build completed using mvn clean install -P contrib-check

[ ] JDK 21

Licensing

[ ] New dependencies are compatible with the Apache License 2.0 according to the License Policy
[ ] New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

[ ] Documentation formatting appears as expected in rendered files

The integration test failures are unrelated to these changes and highlight a separate issue with the SNMP4J dependency. Planning to evaluate that in a separate Jira issue.

PR #9469 resolves the integration test failures.


rkt: rkt status can have 2 fields instead of 3

We expect the output of rkt status to have 3 fields (id, image, and status) whereas during prepare the images often have only 2 fields (id and status)
/cc @yifan-gu @jonboulle @dchen1107

Do you mean rkt list actually? You are right, and I found for prepare aborted it can have 4 fields.
The reason for using rkt list is because we don't have rkt status by that time, so now I think we can change to use rkt status so we only need the uuid field from rkt list.

In my work-arounds that's what I did :)


n8n: add WEBHOOK_URL environment variable

Description of changes
The WEBHOOK_URL options is only able to be set through environment variables. Was considering adding a more generic "environment" parameter but wasn't sure the best way to approach this.
Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

Most other things can be configured with the configuration JSON so I'm okay with keeping this as is honestly.

Pinging freezboy for review since they made the init for this module

I will merge this If they don't respond in one or two weeks.

@ofborg build n8n.passthru.tests

Hm ci tests fail for some reason :( did you test the module changes locally? If not do you need instructions on how to do so? Btw feel free to ask questions, I'm usually happy to help :D

Huh, interesting. It seems like because of the unfree license it's being skipped?

Oh yeah you are right, I should have taken a closer look :see_no_evil:

Tests build fine locally, I will give this a few more days and if no one complains merge it.

@Janik-Haag Just wanted to follow up on this :eyes: Doesn't seem like anyone objects


warn on unset variable

Warn user that compose.yaml includes variable which were not resolved, and an empty string will be used.
close https://github.com/docker/compose-cli/issues/1872

@ndeloof Unfortunately this also warns for variables that are explicitly used with a default value, e.g. ${UID:-1000}


UUIDs

Is there any reason that UUIDs are used for each id needed? UUIDs are very 'heavy' objects, they require a lot of memory for storage and also have very expensive creation. Simple integers can be used instead (I think box2d has ints as well).

This one is interesting - here are some thoughts of mine:

We use UUIDs on the following classes: Shape, Fixture=>BodyFixture, Collidable=>Body, Joint, and World.  I wouldn't expect the creation of them to be an issue since these objects are all long lived.  I would also expect that their use elsewhere in the library is minimal and reasonably efficient.  So I think the question is really about memory footprint right?
One easy optimization (if we didn't want to bite off an overhaul) might be to have the Fixture=>BodyFixture id reference the shape's id instead of creating it's own id.  There's a 1-to-1 relationship between a Shape and a Fixture=>BodyFixture.  The Fixture class already checks for type equality before comparing the ids.
If we wanted to remove the UUIDs completely it would be a breaking change since they are public.  I thought that I marked the id field as something that could change in the future, but I can't find that now.
I'd like to avoid a global id generator.  Something at the class level would be fine in my mind.  So all the different classes that use ids would start from 0 and just count up.  We'd need to make sure that this doesn't cause key collisions in the library internals.  Something defined at the World level would be best, but then a Shape or the other objects wouldn't have an id until they were added to a World.
I don't think we need to worry about overflow since it's unlikely to have 2 (or 4 for unsigned) billion shapes in a given world at one time.  You'd run into performance issues well before that.
I think UUIDs are convenient for networked applications.  If we just use ints the developer would probably need to introduce another identifier.
I wonder if the savings are worth it.  Take JDK8 UUID, which is 24 bytes.  At a 1000 shapes + 1000 fixtures + 1000 bodies + 500 joints = 3500 UUIDs we have 84KB for UUID vs 14KB for int.  For Android UUID is 56 bytes so we'd have 196KB vs 14KB which is a much larger difference.  But I'd expect that you'd hit performance problems we'll before the memory becomes an issue.
On the other hand it would make the core library faster and leaner and the userData fields are available to store whatever a developer needs to uniquely identify them if needed.

I go back and forth as to whether this would be a good change.  It would be nice if the user base would offer their opinion, but they're probably just as busy as I am.

Thanks for sharing your thoughts, here are some more from me as well:
This is indeed mostly a memory issue, although there's some performance gain exists as well. Namely the equality operator == for two int will be faster compared to UUID's equals method. But this doesn't make a change indeed. But about the memory cost I think there is bigger penalty than what you describe. Here are some additional thoughts and notes:

Apart from the content of UUID, each created object has a header of around 8 - 16 bytes
In some cases the reference in classes with UUID can cost some bytes more due to alignment (this is somewhat trivial)
UUIDs are objects so add extra work for the GC to do apart from taking up more space
Extra memory dereference for accessing (memory cost can be high here)
1K bodies is sort of a underestimation. Currently simulations with 10K bodies are possible in desktop
It was actually a surprise Android uses such a schema, this surely makes it even more important for mobile
Surely HotSpot can do better optimizations and inline with more ease a single int than method calls on objects
Per class id generators are good yeah, better not expose any part of the generator publicly. I don't think there's problem with different things (eg Shape and Joint) having the same id
I'm not sure, but I think UUIDs are not unique in the absolute sense. They're generated from a PRNG and have a (really small) collision probability. So in a sense the incremental id generator is free from those collisions (before overflowing anyway)

Maybe this is getting a bit technical, but what I'm saying is that there are various gains from the change, more than simple byte count; The only problem is that this is indeed a 'breaking change' at the library level.
More discussion is welcome

@wnbittle
Hey William, I'm bringing this back for discussion.
The reason is that I (accidentaly) found that UUID takes up a huge portion of body creation time. On very modern hardware (my desktop) a single Body with a Single shape can take up to 2000 ns, and roughly 1600 of those are for creating UUIDs. This is quite bad (aside from memory consumption).
One will say that body creation is an upfront cost that is not significant, but I imagined some situation where (example in a game) after an event a big object is broken into small fragments in a realtime simulation.
With worse hardware than mine, or on a mobile device, this could easily cause a lag spike which is unpleasant.
Replacing UUIDs with ints will be easy and clean in the codebase, I think it has to happen at some point. I shouldn't be very annoying for users to port their code, since the logic is the same. I think the name can remain identical as well (i.e. getUUID).

There's a usecase where ints could be problematic.  Imagine a simulation that's run server side where users can join and exit at will.  In that simulation, imagine that the users can generate and destroy objects that have unique ids: shapes, bodies, etc.  It's within reason, that you could run out of ints after a short amount of time (maybe hours or days).
A contrived example - sure, but a valid one in my opinion.  Let's meet somewhere in the middle.  You are concerned about CPU cost at creation time and memory footprint during operation.  I'm concerned about uniqueness.  I think we can support both by allowing the user of the library choose the id generation scheme, with a small amount of overhead:
package org.dyn4j;
public interface Identifiable {
   public Object getId();
}

package org.dyn4j;
public interface IdentifierGenerator {
   // pass in the calling type just in case an implementer wants to make a decision based on the type
   public Object generate(Class<?> clazz);
}

package org.dyn4j;
public final class UUIDGenerator implements IdentifierGenerator {
   public Object generate(Class<?> clazz) {
       return UUID.random();
   }
}

package org.dyn4j;
public final class IntGenerator implements IdentifierGenerator {
   private int sequenceNumber = 0;
   public Object generate(Class<?> clazz) {
       return this.sequenceNumber++;
   }
}

package org.dyn4j;
// global and not thread-safe on purpose
public final class IdentifierFactory {
   // the `IntGenerator` could be the default since your usecase is more common
   private static IdentifierGenerator generator = new UUIDGenerator();
   public static final Identifier generate(Class<?> clazz) {
      return this.generator.generate(clazz);
   }
   public static final void setGenerator(IdentifierGenerator generator) {
      this.generator = generator;
   }
}

// then have Shape, Fixture, Body, etc. implement the Identifiable interface
// each would call the global factory method IdentifierFactory.generate(this.getClass()); in the constructor (like they do today)

The only thing this doesn't do is force uniqueness.  There's internal machinery that requires uniqueness (at a world level).  I think we can solve this with proper Javadoc documentation, highlighting the necessity of uniqueness for the library to function properly.  It's probably very rare anyone would need something outside of the Int or UUID designs anyway.

This is actually a pretty interesting. Your concern is actually right, under rare but existent situations their value space could be exhausted. I was thinking that it probably won’t be a problem because when the ints are exhausted they’ll just wrap around, hence start creating ‘new Ids’. But again for extreme uses this can cause problem (or from some bad actor? ).
The identifiable interface won’t do in my opinion. It essentially adds some JVM level jump overhead for getId (because of multiple implementations possible) and the int will bet boxed anyway.
After this discussion I think that there’s actually a solution that satisfies both needs.
We’ll just use long instead of int. And actually a good thing is that long will be even more unique than UUID. UUIDs are essentially 128 bit numbers but randomly generated. So by the time we reach as many UUIDs as longs can be there’s a 50% chance that UUIDs will have collisions and hence are problematic as well (by the birthday paradox, as sqrt(2^128) = 2^64).
So in my opinion long are fast enough, have zero cost allocation, are not boxed/objects, guaranty uniqueness up to their limit and are not random, and provide ‘the same bits of collision-free in a sense’ (that last one is a bit ad hoc but you get the point). Should be sufficient for all use cases.

We can drop the Identifiable interface - it's not required.  I think the impact of this is negligible though - the optimizer can detect that nothing overrides the method at runtime.
Regarding boxing - I don't think boxing is the issue here - it would only happen once.  The only issue I see with Integer and Long is the increased memory footprint.  24 bytes for both Long and Integer vs their 8 and 4 byte primitive cousins.
Regarding uniqueness, a long has 1.8 x 10^19 unique values while a UUID has 5.3×10^36.  Collisions are possible, sure, but the uniqueness range is larger.  Would we ever reach either limit?  Probably not.
However, uniqueness isn't just a function of how many unique values there are.  Consider the scenario where we need to share objects between JVMs at runtime.  A classic example would be a simulation running server side and client side where the client can create objects locally.  In this case, a universally unique ID is required.  Whether that's a UUID or a user provided class that generates unique ids across JVMs doesn't matter.
I'm still in favor of my solution for these reasons:

It gives the user of the library the option for much faster execution and less memory
It leaves open the possibility for using more complex identifiers (like UUID) if needed
It may not be as efficient as an int or long, but it's clearly better than the current state in every way

When I mentioned boxing as an issue I actually meant the exact same thing; There is a memory overhead and an extra indirection to access the value.
Also uniqueness seems like an issue to me. They way UUIDs are used to implement equals methods a collision can make the simulation misbehave or glitch, and there is no feasible way to detect a UUID collision at runtime (I understand this needs a lot of bad lack to happen, but on the other side you can instantly know if you run out of longs).
Can you help me understand the server-client scenario please? I did not understand why unique ids are needed in this case.

I've answered your comments/questions below more specifically, but I wanted to make sure that my thought process is being understood.
I'm not debating whether UUID, Long, long, or any other type is better, more suited, or more unique than another.  Instead, I'm debating that allowing the user of the library to choose what they want is worth the trade-off in performance.  In fact, as it stands right now, my design is still a net gain in performance.
Now, let's take it a step further and ask the question, would the extra memory and indirection of using a boxed type vs a primitive even show up on a profiler?  I doubt it - especially in this type of library where we're doing thousands upon thousands of floating point operations per iteration of the engine.
So, in my view, it's a no-brainer.  We improve performance by swapping out UUID with Integer as the default and at the same time allow the user of the library to choose whatever unique identifier they want at design time.

Also uniqueness seems like an issue to me. They way UUIDs are used to implement equals methods a collision can make the simulation misbehave or glitch, and there is no feasible way to detect a UUID collision at runtime (I understand this needs a lot of bad lack to happen, but on the other side you can instantly know if you run out of longs).

This is unbelievably unlikely.  According to Wikipedia:  Thus, the probability to find a duplicate within 103 trillion version-4 UUIDs is one in a billion.  Wikipedia only references 3 cases where collisions were reported and they've been in use for decades.

Can you help me understand the server-client scenario please? I did not understand why unique ids are needed in this case.

The scenario is a multi-client + server simulation.  Imagine a simulation running server-side and client-side - a networked game for example.  The bodies for all simulations need to be synchronized so that when you create an object, I see that object and vise-versa.  Each client and the server are running in their own VMs with their own sequence of ids.  So you may add an object with id 100, and I might add an object with id 100.  Unless the clients and server communicate or we force the server to do all creation, we cannot guarantee that objects created in any of the networked simulations have unique ids.  UUIDs, on the other hand, would allow every client and the server to freely create objects without communication with statistical certainty of uniqueness.

Alright, I've been thinking about this one (in light of #71 as well) and I believe your approach is a good compromise of performance and customizability. The only downside will probably be that getUUID will return untyped Objects, but this will be hard to solve without polluting a lot of classes with generics.
@wnbittle I can go ahead and implement this change roughly as you described here https://github.com/dyn4j/dyn4j/issues/47#issuecomment-533757024 , with some minor changes.

Update: After starting to implement this, as described above, I made some more realizations that would like to further discuss.
It occurred to me that UUIDs/IDs are actually not needed anywhere in the library (correct me if I'm wrong). The only -limited- uses inside the dyn4j codebase are essentially of the form
obj1.getId().equals(obj2.getId()) and obj.getId().hashCode()
But since those unique IDs are tied to a single object those are equivalent with
obj1 == obj2 and obj.hashCode(), and should be replaced anyway for simplicity and performance reasons.
Observation 1: Dyn4j has not to rely internally on IDs at all and hence the only possible use for IDs is in user code. This means that if the user does not need them it wouldn't be a problem if they did not exist at all. So if we had used the Identifiable scheme it would make sense to have an option to not create IDs (i.e. generateId() { return null; }). But now this is somewhat ugly because this cannot fit any Identifiable class contract and can be prone to bugs (lack of good interpretation for a method generateId to return null or a constant).
'Since IDs are only used by the user shouldn't they reside in userData?' (This question is just to make a point)
Observation 2: In theory they could but it would be quite awkward for existing code. I believe the usefulness here is that IDs currently are automatically created and attached to objects. At the moment it's also useful that IDs are typed so the getId() method returns UUID and can be used without a cast, but that would be lost if the Identifiable scheme is implemented.
From those observations I can see a possible scenario:

Use the name Tag instead of Id. A tag in this scenario will be an optional, automatically generated Object attached to some dyn4j objects with a possibly user defined tag function.
Replace getId everywhere with getTag, but provide built-in UUID Tag generator for better migration (So if you used getId previously you can just replace it with getTag) The change in name intends to make the users aware as well.
Make the default to be no tags -> maximum memory/speed efficiency. If not needed internally integer tags do not make much sense for the user to use. UUID tags by default can be deemed expensive and this is part of the effort to replace them.

Of course there exists the alternative 'Do nothing of the above and keep current implementation' or similar.
So for now I stopped implementing the Identifiable scheme and seek for more discussion/ideas in order to find the best course of action.

Great observations - i would need to confirm your assertion, but I think you are right - we shouldn’t need an id at all internally and just use reference equals and the default Object.hashcode implementation.
I agree with you that if the user needs an id, they should put it in the user data.  If the need more than that, they need to create a complex type to hold what they need.
My only concern is that the current built-in id is convenient.  I like your idea of replacing it with a getTag method, but I’m thinking we scrap it all and force the use of userData.
What’s your opinion?

In my opinion the correct approach is to remove IDs. Since there is explicitly space for user defined values, keeping IDs will only be a matter of legacy support.
In general it shouldn't be a major pain to change this in user code. There are least two decent alternatives: 1) storing IDs in userData (either directly or in a complex type as you mentioned or 2) even better if you have extended the Body class (as a lot of examples from dyn4j do) it's completely painless to add an extra ID field of whatever form (with the added bonus of being typed). Depending on the scenario there may be more options as well (for example if the only use of IDs is storing the objects in a file there is no need for the IDs to be constant from body creation).
Because there have been some useful commits from 3.3.0 and it would be nice to allow drop in upgrade to 3.3.1, what I would suggest is:
Remove the use of IDs for comparisons but keep the public API while marking it with @Deprecated(forRemoval = true). Then after the 3.3.1 release make a follow up 3.3.x release with all IDs and public API removed. So users can update with ease while also getting the warning for API removal.

That sounds like a good plan to me.  Just to confirm we're on the same page:

Mark the getId methods as Deprecated (both javadoc and annotation)
Update internal code to use reference equals and default Object.hashcode
Ensure that classes that have getId do not override equals
In the next release we'll remove them.

Yeah, that's the plan. I implemented points 1, 2 and 3 alongside other minor changes and housekeeping in #77. I have plans to implement the removal PR in time.

Can we go ahead and update the toString methods to use object.hashcode?

Yeah, done in #85

@mtsamis Should we close this and use #71 as the issue to come back to remove them?


[HALON-269] Use dictionary of correct type for internal messages

Created by: Fuuzetsu
Minor note: seems github is slow so a final update to this will probably show up shortly, it's just removing ScopedTypeVariables.

Closing as an obsolete


CRI: Add unit tests in probe/cri

Reopened since #3364 was "partially fixes..."

It might be good to add a couple more details about what we want tested here. Ideally high coverage, but maybe some bigger chunks which would help new contributors find their way around?

I'll be taking a stab at this. As @dholbach mentioned, would be good to have some high-level guidance on what kind of tests should we be aiming for.


MitmProxy crashes

Steps to reproduce the problem:
I'm not sure what is causing this error, I was running mitmdump to mitm chrome like so:
mitmdump --stream 10k -q -s "myscript.py"
I don't get this error without both --stream and -q
What went wrong?
I got this stack trace:
<IP_ADDRESS>:50357: Traceback (most recent call last):
File "c:\users\alex\anaconda2\lib\site-packages\mitmproxy\proxy\server.py", line 121, in handle
root_layer()
File "c:\users\alex\anaconda2\lib\site-packages\mitmproxy\proxy\modes\http_proxy.py", line 11, in call
layer()
File "c:\users\alex\anaconda2\lib\site-packages\mitmproxy\protocol\tls.py", line 358, in call
layer()
File "c:\users\alex\anaconda2\lib\site-packages\mitmproxy\protocol\http1.py", line 67, in call
layer()
File "c:\users\alex\anaconda2\lib\site-packages\mitmproxy\protocol\http.py", line 171, in call
self.handle_regular_mode_connect(request)
File "c:\users\alex\anaconda2\lib\site-packages\mitmproxy\protocol\http.py", line 263, in handle_regular_mode_connect
layer()
File "c:\users\alex\anaconda2\lib\site-packages\mitmproxy\protocol\tls.py", line 358, in call
layer()
File "c:\users\alex\anaconda2\lib\site-packages\mitmproxy\protocol\http2.py", line 234, in call
events = source_conn.h2.receive_data(raw_frame)
File "c:\users\alex\anaconda2\lib\site-packages\h2\connection.py", line 1143, in receive_data
events.extend(self._receive_frame(frame))
File "c:\users\alex\anaconda2\lib\site-packages\h2\connection.py", line 1166, in _receive_frame
frames, events = self._frame_dispatch_tableframe.class
File "c:\users\alex\anaconda2\lib\site-packages\h2\connection.py", line 1234, in _receive_headers_frame
headers = validate_headers(headers)
File "c:\users\alex\anaconda2\lib\site-packages\h2\utilities.py", line 167, in validate_headers
return list(headers)
File "c:\users\alex\anaconda2\lib\site-packages\h2\utilities.py", line 221, in _reject_pseudo_header_fields
for header in headers:
File "c:\users\alex\anaconda2\lib\site-packages\h2\utilities.py", line 206, in _reject_connection_header
"Connection-specific header field present: %s." % header[0]
ProtocolError: Connection-specific header field present: connection.
mitmproxy has crashed!

Which mitmproxy version is that?

mitmdump 0.17

This should already be fixed with 05de3b759fe75e2f6839d8e855c304239f97eec1.
@kuza55 could you try installing from git-master and check again? Thanks.


See all workers

Hi,
Is there a way to get info for all the workers that are waiting for jobs?
Thanks

they are inside Queue#workers

Yeah but it seems like it's only showing workers from the same process. I have workers runnung on different machines and as different processes and I want to see all of them. Is there a way to do that?
Thanks


Feature: Prevent upscaling of images

I notice we have a Image::$force_resample config option now which is cool.
In a similar vein, I think that in this age of responsive design and bandwidth concerns we should be making a concerted effort to avoid upscaling images whenever possible, when using built in Image functions like SetWidth(), CroppedImage() etc.
I don't think this should be a config option as whether or not to upscale will be context sensitive, but I propose adding an $upscale = true argument on these functions, which if set to false will provide an image of the expected appearance (aspect ratio / framing / cropping) but with a reduced width and height if necessary to prevent upsampling. Here is an example of this functionality.
As part of this change we should probably also disallow upscaling of images within HTMLEditorField - and that perhaps would need a config option.

@jonom did this get resolved as part of https://github.com/silverstripe/silverstripe-framework/pull/4229 or nah?

Closing as this is a feature request.

Sorry for the slow reply. This guy... what's he doing opening an issue for a feature proposal? Doesn't he know you need an RFC label to get away with that?? :) In 3.2 you can use methods like $FillMax instead of $Fill to prevent upscaling, which you should probably always do. I don't think HTMLEditorField protects against upscaling but that's something for another day.


Remove .zip file from the error message

while uploading an invalid file, the prompt says to upload .py, .json and .zip file. but when i try to upload a .zip file, protocol is not uploaded


Client table

Detailed Description
it would be nice to have a client table, which is joined to the sites table
Context

nice to know which sites belong to which client
we could make a n by n join with users too, but perhaps this could be in a later issue

Possible Implementation

add client table with, client_name
join with sites table
make migration

Hello, I'd like to work on this issue. Can it be assigned to me ?
Do you want other fields than client_name ?
I assume that we'll need to create crud operations to this table, and maybe an edit_site_client function ?

yea your are right @Bvr4, we used to have it, and then switched to user and sites.
We would like it back, and yes, making it nullable would be great, and then much easier to role out

It would be great to have a few functions

create_client
read_client from client_name, i like the option to create the client if it doesnt exist
edit_client
assign_site_to_client, this will make it easy to assign sites to certain client names

Feel free to split these up into different issues/ PRs if you want too, no pressure

OK, I was working on create_client and edit_client function today. I put them in write/user_and_site.py. But I wonder if it would be better in another file, like write/client.py ?

Thanks so much for this @Bvr4 . Yea I would go for a different file

Thanks for you work on this @Bvr4 .
Would you like to do the extention on this, this would be to add an optional 0-n join with users aswell?
Also a assign_user_to_client too?

Yes, with pleasure

Yes, with pleasure

Thank you. Its probably worth doing user_site_groups too as an optional 0-n join with client, as well as an assign function. I think this would then cover all cases

Just to be sure, a client can be related with multiple users. Can a user be related with more than one client ?

Just to be sure, a client can be related with multiple users. Can a user be related with more than one client ?

Possibly, like OCF users, but perhaps could we could start with a user can only be part of one client, and then we can add to it, if we need it

Thanks @Bvr4 for making an issue, perhaps Ill code this one, if thats ok with you?

Yes if you prefer


[google_maps_flutter]Google maps polygon

This is great! What will it take to get it merged?

Great ! Same question again, when/what about merging this one ?


🐛 [Bug]: Can't close websocket connection

Bug Description
I want to close a websocket connection but nothing happens (no error etc.).
The client remains connected and can also send messages.
How to Reproduce
Steps to reproduce the behavior:

Run the code below
Connect to the server with a websocket client

Expected Behavior
The server should close the connection after 5 seconds
Contrib package Version
websocket/v1.1.0
Code Snippet (optional)
package main

import (
	"log"
	"time"

	"github.com/gofiber/contrib/websocket"
	"github.com/gofiber/fiber/v2"
)

func main() {
	app := fiber.New()
	app.Use("/ws", middleware)
	app.Get("/ws", websocket.New(handler))
	log.Fatal(app.Listen(":8080"))
}

func middleware(c *fiber.Ctx) error {
	if websocket.IsWebSocketUpgrade(c) {
		return c.Next()
	}
	return fiber.ErrUpgradeRequired
}

func handler(conn *websocket.Conn) {
	go func() {
		time.Sleep(5 * time.Second)
		if err := conn.Close(); err != nil {
			log.Fatal(err)
		}
	}()

	for {
		_, msg, err := conn.ReadMessage()
		if err != nil {
			log.Println(err)
			return
		}
		log.Printf("msg: %s", msg)
	}
}

Checklist:

[X] I agree to follow Fiber's Code of Conduct.
[X] I have checked for existing issues that describe my problem prior to opening this one.
[X] I understand that improperly formatted bug reports may be closed without explanation.

@mstrYoda Any idea what may be causing this?

Hi, you can not close a hijacked connection in this way. It is basically do nothings.
You can just return from the websocket handler function and it closes underlying connection after exiting handler.

Returning directly from the websocket handler worked.
But for what purpose is the (*websocket.Conn).Close() func if it can't close the connection?


Possible multi cadl dependency issue with file references

I'm prototyping a new emitter and found a weird behavior when debugging, where getAllRoutes would return 0. The same code (Http sample) would generate expected output in the playground.
Talked to @bterlson and the hypothesis is that this may be caused because of multiple copies of CADL being loaded due to my project structure. This is my structure

Where cadl-rlc is the emitter I'm prototyping and cadl-test is a sample CADL spec I'm using to debug.
This is how I reference the emitter from cadl-test
packag.json
{
  "name": "cadl-test",
  "dependencies": {
    "@azure-tools/cadl-ts-rlc": "file:../cadl-rlc",
    "@cadl-lang/compiler": "latest",
    "@cadl-lang/rest": "^0.15.0"
  },
  "private": true
}

cadl-project.yaml
emitters:
  '@azure-tools/cadl-ts-rlc': true

And I'm compiling with
npx cadl compile .

Emitter - cadl-rlc/scr/indext.ts
import { Program } from "@cadl-lang/compiler";
import { getAllRoutes } from "@cadl-lang/rest/http";

export async function $onEmit(program: Program) {
  const [routes, _diagnostics] = getAllRoutes(program);
  console.log(routes.length);
  // 0
}

warning if library is loaded twice


fix for duplication widget creation, widget cleanup api

fix for duplication widget creation, widget cleanup api

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Murugan, Aravindhan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Request for better quality diagrams

Is it possible to update this article with higher-quality diagrams (authorize-guest-image1.png and teams_dependencies_image1.png). Very useful diagrams that simplify confusion at customers getting a handle on external sharing, but really not for documentation because of the low quality.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 2b05e642-c4e5-f1b5-5315-d3ef1690a0cd
Version Independent ID: 01b7e0b5-3e50-3de0-e3e9-aeeeda43da12
Content: Authorize guest access in Microsoft Teams
Content Source: Teams/Teams-dependencies.md
Service: msteams
GitHub Login: @somakbhattacharyya
Microsoft Alias: sbhatta

@jambirk Hi James, any updates on this issue? Thanks!

We can't really make the diagrams on the web page higher-res than they are, from what I recall. @scanum, I think the fix here is to get the diagrams redone in visio, and make them available as downloads from the page. Please contact me off GH.


BUG: Accidental Page Refresh Due to Hover Action on Hanging Book Icon

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
When the profile page is opened, if the mouse accidentally hovers over the hanging book icon (which is currently functioning as a page refresher), the website refreshes automatically without any user action. This can disrupt the user experience, especially if it happens unintentionally.
suggest fix:
The book icon should be repositioned to avoid accidental hovering, or it should only trigger a page refresh when clicked, not on hover.

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

Can you assign this to me? It would be great to contribute to your project!! I'm in GSSoC24

Thanks for creating the issue in SwapReads! The issue has been assigned to you.
Before you start working on your PR, please make sure to:

⭐ Star the repository if you haven't already.
Pull the latest changes to avoid any merge conflicts.
Attach before & after screenshots in your PR for clarity.
Include the issue number in your PR description for better tracking.

I'm excited to see your contribution as part of GSSOC EXT. 2024! 🎉
Don't forget to follow @anuragverma108  - Project Admin & @sailaja-adapa  - Project Mentor on GitHub for more updates.
Happy open-source contributing! 🚀

Thankyou for assigning . i will start working on this

I submitted a pull request. Could you please review it and let me know if I did it correctly?


chore: make ftl init create self contained kotlin modules

removes parent POM + logic to update parent POM when new child POMs are added; each module has its own self-contained POM now
removes now unusedftlEndpoint and ftlModuleName maven properties
removes the ftl-module- prefix from kotlin module scaffolding

fixes #933

Nice thanks Lizzy


Unable to start kong(0.8.3) : says can't find nginx

Summary
Unable to start kong , it says can't find nginx
Steps To Reproduce
I am running kong on mac os and i dont have ruxit installed in my machine
output of  sudo find / -type f -name "nginx"
/usr/local/Cellar/nginx-full/1.10.1/bin/nginx
/usr/local/Cellar/ngx_openresty/<IP_ADDRESS>/bin/nginx
Can someone please help in resolving the problem
when I try to start nginx alone using sudo nginx   in mac i get below error
nginx: [error] [lua] kong.lua:161: init(): Startup error: /usr/local/share/lua/5.1/kong/tools/io.lua:66: bad argument #1 to 'open' (string expected, got nil)
Additional Details & Logs

Kong version (0.8.3)
Kong configuration (using default configuration) for db using postgres
mac os

@Ansar1628 I would highly reccomend to use 0.9 RC3 (the stable 0.9 will be released this week anyways).

@thefosk : Thanks for the quick response
I will switch to 0.9RC3

@Ansar1628 let us know if it works with 0.9 - closing this for now.


Unable to compile.

Hi I have a web app (yew based) which uses wasm-bindgen. cargo wasi check returns no errors and the build itself seems to work. However the wasm-bindgen-cli thingy fails with this error:
error: failed to generate a standard interface types section

Caused by:
    0: in adapter function
    1: import of wasm-bindgen specific intrinsic `__wbindgen_string_new` requires JS glue
error: failed to process wasm at `C:\Users\mtrnord\IdeaProjects\Daydream\target\wasm32-wasi\release\daydream_app.rustc.wasm`

Caused by:
    failed to execute "C:\\Users\\mtrnord\\AppData\\Local\\cargo-wasi\\0.1.22\\wasm-bindgen\\0.2.67\\wasm-bindgen.exe" "C:\\Users\\mtrnord\\IdeaProjects\\Daydream\\target\\wasm32-wasi\\release\\daydream_app.rustc.wasm" "--out-dir" "C:\\Users\\mtrnord\\IdeaProjects\\Daydream\\target\\wasm32-wasi\\release\\.tmpc3QP8R" "--out-name" "foo"
        status: exit code: 1
[cargo-make] ERROR - Error while executing command, exit code: 1

Any hint on why this happens or how I can fix this issue? I ran cargo wasi build --release --bin daydream_app to get to this issue

Thanks for the report! The purpose of cargo wasi build right now is for a preview of the interface types proposa, which doesn't support all of JsValue right now unfortunately. This is an expected error for now, but if you're building for the web you may want to use wasm-pack instead.

Thanks yeah I figured it would work with web as https://github.com/dunnock/wasi-worker exists but it seems wasi only works in the service-worker scope. Not in the UI scope :)


Adding geode in iPhone solution

Geode Version
1.4.2
Related Problem
No response
Your Solution
Could you release an iPhone version of geode?? Not in the app store but in the form of ida (equivalent to apk on iphone)
Additional Information
No response

duplicate of #898


How do I animate view transitions

What will this enable for the user?
As a user of the application, I want to see the view transitions animated so that it's easier to understand relations between views.
Example: https://miro.medium.com/max/320/1*YHgeqAVAyoAbKu9-kGOwQA.gif
Recipe tags (optional):
animation
Related tags (optional):

I suggest to take a look at my Add-On "AnimateCSS".


Add iOS Support

The library only works for Android, it would be nice to have it work for iOS as well. Here is a guy with the SocketIO for IOS but he uses his own namespacing, https://github.com/Quobject/SocketIoClientDotNet/, i would keep using the same namespacing as the official one

This repository is just for the binding of the official Android packages. Unless they create an Objective-C library, I can't really do much.


BUG: Buffer with this name already exists

Did you check docs and existing issues?

[X] I have read all the docs.
[X] I have searched the existing issues.
[X] I have searched the existing discussions.

Neovim Version (nvim -v)
NVIM v0.9.5
Operating System / Version
macOS - 14.2.1
Describe the Bug
When loading into a previous session that had neo-tree enabled I simply get the a blank window, whenever I toggle the neo-tree I get another blank window followed by a error:
[Neo-tree ERROR] debounce  filesystem_navigate  error:  ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:1045: Vim:E95: Buffer with this name already exists
I believe the issue has something to do with auto-sessions as disabling it makes the problem go away.
Screenshots, Traceback
The first image is loading into a session and the blank window on the right is what I think should be the neo-tree

At the bottom of the screen the error can be seen - it was triggered by the hotkey that I used to enable the neo-tree window, there is also an additional window, I believe this is where neo-tree tries to load into but its buffer already exists?

Steps to Reproduce

neo-tree and auto-session plugin installed
open any project, have some files open as well as neo-tree enabled
close session with some file and neo-tree enabled
open up the session

Expected Behavior
No errors?
Your Configuration
My neo-tree
{
    "nvim-neo-tree/neo-tree.nvim",
    branch = "v3.x",
    dependencies = {
        "nvim-lua/plenary.nvim",
        "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
        "MunifTanjim/nui.nvim",
        -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
        -- {
        "s1n7ax/nvim-window-picker",
        version = "2.*",
        config = function()
            require("window-picker").setup({
                filter_rules = {
                    include_current_win = false,
                    autoselect_one = true,
                    -- filter using buffer options
                    bo = {
                        -- if the file type is one of following, the window will be ignored
                        filetype = { "neo-tree", "neo-tree-popup", "notify" },
                        -- if the buffer type is one of following, the window will be ignored
                        buftype = { "terminal", "quickfix" },
                    },
                },
            })
        end,
    },
    config = function()
        local config = require("neo-tree")
        config.setup({
            event_handlers = {
                {
                    event = "neo_tree_buffer_enter",
                    handler = function(arg)
                        vim.cmd([[setlocal relativenumber]])
                    end,
                },
            },
            window = {
                position = "right",
            },
            filesystem = {
                follow_current_file = {
                    enabled = false, -- This will find and focus the file in the active buffer every time
                },
                filtered_items = {
                    hide_dotfiles = false,
                },
            },
        })

        vim.keymap.set("n", "<C-B>", ":Neotree source=filesystem toggle position=right<CR>")
        vim.keymap.set("n", "<C-G>", ":Neotree float git_status<CR>")
    end,
}

auto-session
{
        'rmagatti/auto-session',
        config = function()
            require("auto-session").setup {
                log_level = "error",
                auto_session_suppress_dirs = { "~/", "~/Projects", "~/Downloads", "/"},
            }
        end
    }

Please revise your config. I think you pasted neo-tree config twice.
Also please update the issue title like other issues.

Thanks @pysan3, that was fast! Hopefully all is clear now.

I am also seeing this issue

Could you test this option and see if it works?
https://github.com/nvim-neo-tree/neo-tree.nvim/pull/779

Could you test this option and see if it works?
#779

Thanks @pysan3, adding auto_clean_after_session_restore = true kinda improved the problem, basically what happens now is - if neo-tree was open in previous sessions, after reopening nvim its pane gets simply closed (this can be seen in action for a split second).

I'm ok with this solution for now, I guess next step would be to explore auto-session readme as mentioned by @josephcrawfordSRH

@SparrowMike Thanks for testing!
Unfortunately no, there is no way to auto-restore neo-tree state since we can adjust the position (left, right etc) and source (filesystem, buffers etc) dynamically, we cannot tell which and where neo-tree was with only the buffer name (and this is the only clue autosession will restore for us).
Spoiler alert, I will make it possible with the new re-write.

Nah just do it now lol.
https://github.com/nvim-neo-tree/neo-tree.nvim/pull/1366
Could you test it out? @SparrowMike
return {
  "pysan3/neo-tree.nvim",
  branch = "restore-session-experimental",
  version = false,
  opts = {
    auto_restore_session_experimental = true,
    -- ...

Caution:
You need to have blank set to sessionoptions like it is said here.
https://github.com/rmagatti/auto-session?tab=readme-ov-file#recommended-sessionoptions-config
For the case of vimscript, set sessionoptions+=blank. Idk much about lua.

Thanks @pysan3 for going extra mile, I followed all the steps as described however the results are the same.
I will give it another go on my other machine at home, will let you know if results are different.
cheers!

I am still seeing quite a few issues here, I am attaching a screen recording.  Notice that sometimes neo-tree opens full screen, other times it opens but the cwd is from the previous project.  Also notice there are tabs open for the session directory and sometimes [No Name].
This is my config for neo-tree, outside of using the default implementation from LazyVim
return {
  "nvim-neo-tree/neo-tree.nvim",
  opts = {
    auto_clean_after_session_restore = false,
  },
}

This is my auto-session configuration
return {
  "rmagatti/auto-session",
  config = function()
    require("auto-session").setup({
      auto_session_last_session_dir = vim.fn.stdpath("data") .. "/sessions/",
      auto_session_root_dir = vim.fn.stdpath("data") .. "/sessions/",
      auto_session_enabled = true,
      log_level = vim.log.levels.ERROR,
      auto_session_suppress_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
      auto_save_enabled = true,
      auto_session_create_enabled = true,
      session_lens = {
        buftypes_to_ignore = {},
        load_on_setup = true,
        theme_conf = { border = true },
        previewer = false,
      },
    })

    vim.keymap.set("n", "<leader>ls", require("auto-session.session-lens").search_session, {
      noremap = true,
    })
  end,
}

@josephcrawfordSRH
Thanks for testing but you should switch the repo to my fork and change the branch name.
You are testing nothing as this has not yet landed to neo-tree's main branch...
return {
  "pysan3/neo-tree.nvim",
  branch = "restore-session-experimental",
  version = false,
  opts = {
    auto_restore_session_experimental = true,
    -- ...

@josephcrawfordSRH
May I ask you to give me your feedbacks in this thread next time?
https://github.com/nvim-neo-tree/neo-tree.nvim/pull/1366

@pysan3 apologies, I will use that thread from now on.  I will also make a new screen recording slowing things down so that you can see what i am doing.  I will also test using your fork and branch


Gyeongbuk Education

@kdm1jkm Please provide us with:

the school official website URL, if different from the domain you are submitting
an URL of a page on the official website where an IT-related long-term (>1 year) course is offered by the school
an URL of a page or another proof (.pdf or a screenshot are OK) showing that the school recognizes the domain which you are submitting as an official email domain for the students.

This is my school homepage URL: http://school.gyo6.net/poongsanhs
There isn't IT-related course for every student. But there's a clue "DATA" which is computer engineering club.(We learn coding.) I apply this so that our club student use JetBrain Software.(I'm head of this club.) You can see that "DATA" is official school in this URL(http://school.gyo6.net/poongsanhs/0402/sub).
Actually there's no school email for highschool students(At least in my region) But there's region office of education(I don't know how I can call this in English). And Gyo6.net is domain for student whose school is in KyeongSangBuk-Do(In korea, we call it KyeongBuk. KyeongSangBukDo is too long.)

I captured this image in my account setting page. As you can see, I need to write my school information.
I'm not from a country whose language is English, and I'm not so good at it. So there could be something you can't understand or you can misunderstand. If you have any awkward thing or want to ask to me, please re-comment. I'll hope these information is enough.

@kdm1jkm Thank you for the clarification. Pull request merged.


Mutant Mayhem: Hint of step15 needs update

Describe the bug
Mutant Mayhem: Hint of step15 needs update
Steps to reproduce the behavior

Navigate to https://arcade.makecode.com/beta#
Go to homepage banner
Click dot of "Create your own multiplayer game!" and click "Code now"
Go to step15 and observe the hint

Actual behavior
This step doesn't tell user to add block is sprite player A button pressed. But the hint has added this block.
Expect behavior
Mutant Mayhem: Hint of step15 needs update. Should remove block is sprite player A button pressed in the hint.
Screenshot

Additional context
1.OS: Windows11
2.arcade version: 1.13.27
3.Microsoft MakeCode version: 9.1.3

Duplicated with bug 6245, track the bug with new repro steps in bug 6245https://github.com/microsoft/pxt-arcade/issues/6245


[Music] ...

Extension – Music
Author: @Rawnly

Description
"Search & Play Library Album" for albums with the same title groups the albums together.
Steps To Reproduce

Add albums with the same name, case insensitive.
Example:
STAY - Single by The Kid LAROI & Justin Bieber
Stay - Single by Zedd and Alessia Cara
"Search & Play Library Album" for "stay"

The current behavior
Trying to play Stay by Zedd, but plays STAY by The Kid LAROI instead.
Stay by Zedd doesn't appear in the list. Instead, the album lists as having 🎧2 songs

The expected behavior
Show Stay by Zedd as well as STAY by the Kid LAROI
Raycast version
Version: 1.31.0

same as #1294

Unfortunately this can't be fixed. There's no specific API from Apple Music to retrieve the Album ID and play it. Right now the extension uses a workaround which duplicates the songs filtered by album name and adds them to a temporary playlist.


Transparent Background on PieChart

Hey, I'm using PieChart with Transparent Background. In this case the slice padding/border will not work. I've encountered that the reason lies on the transparent painting of the slice border which will be then invissible. It is possible to separate Background and slice border color in a future release? Maybe this requires an enhanced implementation of painting padding/border.

Hello, thanks for reporting, I am working on pie charts today and will concider this

You were right this was wrong, now Pie Background is transparent by default and PieSlice stroke is taken from Series.Stroke, default is White


"rerun" of pipelineRun in OpenShift, doesn't clear annotations

Hi, I'm still doing some further testing, with which I'll update this ticket, but wondered @lcarva if you've seen anything around the annotatations of a pipelineRun where attestation is marked as Failed - if I rerun this pipelineRun (using the "rerun" button in OpenShift), then before the pipelineRun has completed, I can see the annotation chains.tekton.dev/signed: false is not cleared and attestation is not uploaded to repo.
I think I have all secrets etc in the right place.
Thanks in advance.

This is probably not something that should be handled at the Chains level.
See https://github.com/tektoncd/pipeline/pull/6127.

OK, thanks. Do you think it's something maybe the documentation needs to call out? e.g., rerun of pipelineRun that has been marked with these annotations will not work correctly/give ambiguous results? Or is this something that is known, but I've missed?


Clickable carts on home page

Is your feature request related to a problem? Please describe.
It would be better if the cards shown below are made clickable.

Additional context
Please assign this task to me.

I think we don't have any content to show on click but I guess we can at least add a hover effect on these cards for a better user experience

/assign


fix: literal str and join str inner completion

Remove the special judgment for literal strings during completion, and change the search for the nearest symbol during completion to the symbol one or two characters before the trigger.

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

[ ] N
[x] Y

fix #1083

2. What is the scope of this PR (e.g. component or file name):
kclvm/tools/src/LSP/src/completion.rs

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[x] Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

[x] N
[ ] Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

[x] Unit test
[ ] Integration test
[ ] Benchmark (add benchmark stats below)
[ ] Manual test (add detailed scripts or steps below)
[ ] Other

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 12 (100.0%)  changed or added relevant lines in 1 file are covered.
17 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.03%) to 71.903%

Files with Coverage Reduction
New Missed Lines
%

kclvm/tools/src/LSP/src/util.rs
17
68.97%

Totals

Change from base Build<PHONE_NUMBER>:
-0.03%

Covered Lines:
44379

Relevant Lines:
61721

💛  - Coveralls


Fix NameError when using validate_call with PEP 695 on a class

Change Summary
This PR fixes the NameError when from __future__ import annotations and we call validate_call inside a class definition with PEP 695:
from __future__ import annotations

class A[T]:
    @validate_call(validate_return=True)
    def f(self, a: T) -> T:
        return str(a)

However, calling validate_call in nested scopes will still throw NameError. This is probably due to parent_frame_namespace. Example:
from __future__ import annotations
from pydantic import validate_call

class A[T]:
    def g(self):
        @validate_call(validate_return=True)
        def inner(a: T) -> T: ...
A().g() # throws because we can only get the ns of `g`, not `A` when calling `@validate_call`

Related issue number
fix #10150

Checklist

[x] The pull request title is a good summary of the changes - it will be used in the changelog
[x] Unit tests for the changes exist
[x] Tests pass on CI
[x] Documentation reflects the changes where applicable
[x] My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Gotcha.
My suggestion was that we could add a _parent_depth argument to validate_call to control how deep we look in the parent_frame_namespace, which might resolve the original issue you mentioned. Maybe not though, I haven't tried locally.

import inspect
import sys

from pydantic._internal import _typing_extra

# we want to access `a` in this function
def api():
    # ! `f` is NOT in stack
    # print([f.function for f in inspect.stack()])  # ['api', 'g', '<module>']

    # print(sys._getframe(1).f_code.co_name)  # 'g'
    # print(sys._getframe(2).f_code.co_name)  # '<module>'

    # parent_depth should add 1 because `parent_frame_namespace` is pushed to call stack
    print('ns of g:', _typing_extra.parent_frame_namespace(parent_depth=2))

def f():
    a = 1

    def g1():
        api()

    def g2():
        a
        api()

    return g1, g2

g1, g2 = f()
g1()  # ns of g: {}
g2()  # ns of g: {'a': 1}

Here is a simple demo. My point is that by the time api is called, f is not in the stack anymore. So we can not find a in the namespace no matter how deep we look in parent frames, unless it is catched by closure, as the case of g2.


Fix * imports

This PR fixes all the from x import * imports. Avoiding * imports is generally considered a good practice. I used ruff to help with the formatting, partly addressing #131 as well.
To find import issues, you can use:
ruff check start_proteus.py  # single file
ruff check src/proteus       # directory
ruff check .                 # everything

Prepend --fix to sort imports and remove unused imports:
ruff check . --fix

I also set up a small pre-commit config so you can automatically have it sort imports on every commit, e.g.:
pre-commit install

Closes #136
Addresses #131
Todo

[x] Setup github action
[x] Add documentation

Hi @nichollsh @timlichtenberg This PR is ready, could you have a look and let me know what you think?
Could you test it with some of your workflows to make sure no imports were missed?

Hi @lsoucasse thanks for pointing those out, I fixed the issues.


Setting up a new mobile device with QR code is a bit vague

I figured out pretty quick that I needed to go to the Settings part of the Keybase app on my other device, but this wasn't very clear. If I was a novice, I'd probably just open the app and figure it would work all on its own?

I haven't found how to scan the QR code from the Keybase app

@cdokolas what version of the app are you running? the older ones didn't support it

@maxtaco I installed it this morning following the HackerNews headline: 1.0.22-20170510190320+2a0be5e72

I can not figure out how to do this with the CLI client.


Create an individual namespace for user to operate

What steps did you take and what happened:
User need provide config such as kubeconfig/pullsecret/product settings etc , and store it by either secret or configmap in a namespace . It's not suitable to just use crossplane install namespace crossplane-system for following reasons:

The crossplane installed namespace is different from OCP and k8s , gitops experience is un-consistent
All these config are user data , it should be protected by user themselves( it may be deleted when uninstalling gitops tools)

What did you expect to happen:
Create an individual namespace to user to operate , it may not have to customize by user itself .
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:

Minikube/KIND version:
Kubernetes version: (use kubectl version):
OS (e.g. from /etc/os-release):
Instana version:
Crossplane version:

@jianh619 +1 for this, can you propose a PR for this?


Permission to write to the git

Could I get permission to commit stuff to the repo? Unless you want me to do pull requests, then that's fine. Up to you.

I'd rather you do pull requests. Right now, the code you write is a mess and you're not particularly familiar with Python (you basically write PHP(4) with Python syntax) or Linux, so I'd rather you send me your contrubutions so I can help you improve.


Fix Clippy + comments from previous PR

Hey there! Reviewed and changed some stuff we talked about in #18 . Also fixed clippy and ran a workflow locally and it's looking good now!
Haven't tested these new changes, but I have not modified any functionality whatsoever. The e2e testing pipeline we were talking about is going to be really useful.

closes #21


DataInputStream.readUTF() cannot deal with strings of length > Short.MaxValue

It should be able to handle strings of (encoded) length <= 0xffff, but it behaves completely wrong for lengths >= 0x8000. That's because it uses readShort() instead of readUnsignedShort() to read the encoded string length.
Strings of length greater than 0xffff cannot be encoded. DataOutputStream should throw for those, but it doesn't either.

Fixed in #2869.


Autodetect Snippet Language

Currently if a user wants to include a source language identifier in a code block e.g.
```rust
```

Users need to add a lang attribute in the source snippet e.g.
snippet::start main { "lang": "rust" }

We should autodetect source based on source file the snippet is in. Users can override the autodetected source by providing the lang attribute. We could also make autodetect configurable and allow users to disable it if they need to.

Did some initial research and found hyperpolygot a rust port of the ruby gem linguist. Going to take a crack at using hyperpolyglot to do the language detection.


[Add] Support for other Install strategies

Follow up of #772
This PR removes the requirement that AllNamespace mode should be supported always in a registry+v1 format.
It does so by:

Adding a field to specify watch namespaces in BundleDeployment Spec.
While converting from registryV1 to plain bundle, we now generate roles for all specified targetNamespaces which are being watched.

do we currently have a way to communicate the set of namespaces to watch via the deployment?

Which deployment are you referring to? This PR introduces a spec field where watchnamespaces can specified while creating a BD (ref). It would then be propagated to cluster extension.


gamma_p needs better derivatives

Summary:
For reasonable values of it's arguments, gamma_p(a,z) can have very poor errors (>>1e-5, compared to values calculated using mathematica).  For parts of its range the current algorithm for d(gamma_p)/da in stan/math/rev/scal/fun/gamma_p.hpp can also appear to converge, but instead provide values orders of magnitude off from true values.
Description:
Summary plots:

first plot is absolute error with current function (log 10)
second plot shows regions where different methods do best as well as the failure region (described as absolute error > 1e-5)
third plot is the minimum error with the best method for the region.

Here's some data:
set.seed(4201)

library(magrittr)
library(rstan)
library(dplyr)

J <- 5

N <- 20
shape <- 2
scale <- 1
rgamma_t <- function(n, shape, scale, max) {
  M <- rep(Inf, n)
  for (i in 1:n) {
    while(M[i] > max)
      M[i] <- rgamma(1, shape=shape, scale=scale)
  }
  return (M)
}
x_max <- 1
x_matrix <- replicate(J, rgamma_t(n=N, shape=shape, scale=scale, max=x_max))

Here's an inappropriate model that runs fine for this:
data {
  int N;
  vector<lower=0>[N] x;
}

parameters {
  real<lower=0> alpha;
  real<lower=0> beta;
}

model {
  target += gamma_lpdf(x | alpha, beta);
}

Here's the model that matches the data generation but (often) throws divergences:
data {
  int N;
  vector<lower=0>[N] x;
  vector<lower=0>[N] x_max;
}

parameters {
  real<lower=0> alpha;
  real<lower=0> beta;
}

model {
  target += gamma_lpdf(x | alpha, beta)
    - gamma_lcdf(x_max | alpha, beta);
}

Run script:

mg <- list()
for ( j in 1:1) {
  mg[[j]] <- rstan::stan(file='gamma.stan', data=list(N=N, x=x_matrix[,j]))
}

mgt <- list()
for ( j in 1:1) {
  mgt[[j]] <- rstan::stan(file='gamma-truncated.stan',
    data=list(N=N, x=x_matrix[,j], x_max=rep(x_max,N)))
}

After running the models look at trace plots and divergences (and autocorrelation).  Adding the truncation breaks things, divergences for larger a and z values which is where the current derivative series calculation diverges.
Reproducible Steps:

Clone: https://github.com/sakrejda/math/tree/bugfix/issue-XXX-lower-incomplete-regularized-gamma-gradient

Run ./runTests.py test/unit/math/rev/scal/fun/gamma_p_accuracy_test.cpp

Examine the file test-2.txt in whatever directory you ran the test from.

Current Output:
See the plots linked above.
Current state:

I implemented some alternative calculations (also on the branch), they do better in different regions, I think this will cover most of the fix.
there's still a region with small a and small to moderate z where I need to implement an alternative calculation
Still need to characterize exact cutoffs for branching to each implementation, although it's becoming obvious with the plots
I have some code at the Mathematica OpenCloud thing that I used to calculate test values but it's slow

Plots:
d_gamma_p_da.pdf
Expected Output:
Errors on par with other math library functions.
Additional Information:
Provide any additional information here.
Current Version:
v2.15.0

This is also relevant for d(gamma_q)/da but I don't know if the problem is as bad there.

Victory!
d_gamma_p_da.pdf

+1

Done.


latest pull

I don't think this was intended to be a PR. Closing, but let me know if I'm wrong and I'm missing something.


helm: add storage class to instance and backup

Signed-off-by: Robert Marklund<EMAIL_ADDRESS>

Add storage class for instance and volume backups in helm charts.


fix(Makefile): add a glideup build target

Fixes #58

isn't make bootstrap the equivalent? From glide --help:
update, up, install	         Update or install a project's dependencies

@bacongobbler don't believe so.
According to the update documentation: Download or update all of the libraries listed in the glide.yaml file ... A glide.lock file will be created or updated with the dependencies pinned to specific versions.
And, according to the install documentation: This will read the glide.lock file, making sure it's tied to the glide.yaml file, and install the commit id specific versions there ... When the glide.lock file doesn't tie to the glide.yaml file, such as there being a change, it will provide an error. Running glide up will recreate the glide.lock file when updating the dependency tree.
Also, based on my experience so far, glide up has two major differences from install:

If you've changed your glide.yaml file, you can run it to regenerate your glide.lock file
If you've specified a dependency, but no specific version, in your glide.yaml, you can run glide update to update its version in the glide.lock

gotcha.

thanks @bacongobbler


Research strategy (editing) Q2

$100 each to

Peegee
Colleen

on delivery of an edited draft, on or before 2nd August 2024

Just for reference, you'll find the draft strategy from your writing team in the relevant issue https://github.com/SingularityNet-Ambassador-Program/AI-Ethics-Workgroup/issues/14
Here's a direct link to it https://docs.google.com/document/d/1jLm9wgGY0-MjzAza9u7eXI5BP13XKTMy6fwoCdsgk2U/edit?usp=drive_link

Here you go...
FINAL DRAFT edit- RESEARCH STRATEGY FOR SINGULARITYNET AI ETHICS WG.docx.docx
Appendix - Research Strategy.docx

Please disregard the links above.
https://docs.google.com/document/d/1ZrVeMg5Nw6kcHs2tu3oBPSQHFxQeL_a6HUInL5SJ2eY/edit
https://docs.google.com/document/d/1V3-kwD4ECeFpE5IBEznuNlhYEkoq6L8l2_E33xUn6Uk/edit?pli=1#heading=h.m28nqb706wia

If you didn't receive payments for this today, please know that payments will be made next Tuesday. The reason is because an error was made when sending the tasks for payment on Dework. The sign $ was used instead of USD to place the fund request. Apologies for this.

No worries, thank you for letting me know.


Remove the webview-wrapper, fixes #250

Signed-off-by: Victor Porof<EMAIL_ADDRESS>Fixes https://github.com/mozilla/tofino/issues/250

Coverage increased (+0.5%) to 40.15% when pulling 7143dd8427896498169c2d27892c3b3be0414205 on victorporof:remove-webview-wrapper into c98fa2ffcc7b7b931585bbf59420a73e2c12e025 on mozilla:master.

Cleans things up nicely, LGTM 👍

Landing this to start checking out how to unit test with a webview