How to proceed with multiple modules and reducers

Hey there - I'm currently evaluating ng-redux to bring it into our massive app.
The situation is as follows.
We ship several different modules providing different parts of the app. I'd like to connect all the data of these via the flux/redux structure.
According to the docs:
angular.module('app', [ngRedux])
.config(($ngReduxProvider) => {
    let reducer = combineReducers(reducers);
    $ngReduxProvider.createStoreWith(reducer, ['promiseMiddleware', loggingMiddleware]);
  });

I have to define all the reducers upfront in the configuration of the big big app module. What I'd like to do is to register several reducers and store parts on the config phases of the different dependency modules.
Main idea would be that the modules enrich the global state by itself.
This is currently not possible, as only the createStoreWith function is provided.
I'm kind of thinking of a extendStoreWith function or something similar.
Is this totally off track or am I missing something in here?
Thanks for any advice. :bowtie:

You might be able to maintain separate stores and craft a means by which they feed each other. I've been pondering an attempt at this using RxJs to connect them, and isolating them to individual components (ui-router states and directives) so as to "cut" the state tree into separately managed pieces. I have a vague sense that something like this would enable a slightly more angular2-ish model where components never see the parts of the tree that they shouldn't, and actions bubble upwards only as far as they need to. I know this sounds vague... it's still a bit vague in my head.

@stefanjudis I'm not sure how this applies to your environment, since we use browserify in combination with angular modules, but what I ended up doing was letting dependency modules include a reducer object (i.e. the sort of object you would pass to combineReducers), then merge all of them together at the top level.
So I may have a sub-module like
module.exports = angular.module('app.subModule', [])
    .service('ActionCreatorService', require('./some-actions.js'))

module.exports.reducer = require('./reducer');

And the top level app has a wrapper function:
appUtils.createReduxApp('app.mainApp', [
    require('./subModule')
], require('./appLevelReducerObject.js'))

That wrapper takes the list of dependencies, combines all the reducer objects, and does the normal angular.module set up:
exports.createReduxApp = function createApp(name, deps, appReducer) {
    var angularDeps = deps.map((dep) => dep.name || dep);
    var reducerMap = deps.reduce((current, dep) => Object.assign({}, current, dep.reducer), appReducer);
    return angular.module(name, angularDeps)
        .config(function reduxConfig($ngReduxProvider) {
            reducer = combineReducers(reducerMap);
            $ngReduxProvider.createStoreWith(reducer);
        });
};

This is simplified, but that's the idea. I wrote another wrapper that can be used to merge reducers, but not create a store, for when there's more than one level of module nesting.

@jbalboni Oh man - thanks. I was playing around with some abstractions today to fit our structure and this looks pretty good! Didn't come that far today and this saves me a lot of time!
Thanks. :hand:

@jbalboni
Heyo - quick question.
I'm now starting to test the different sub modules. Do you have also a solution for testing one module then in separation as it has to call $ngReduxProvider.createStoreWith(reducer); itself in this case...
Thanks for any advice and ideas. :)

@stefanjudis We've generally been testing reducers or components not connected to the store so far in our sub modules. I was planning on mocking the $ngRedux service (or the wrapper service we wrote for it) when testing any code that used it, though.


[DevOps] DevOps test automation strategy for a successful CI/CD adoption

Proposed title of the article
DevOps test automation strategy for a successful CI/CD adoption
Proposed article introduction
The foundation of DevOps culture is test automation. The outbreak of the COVID-19 pandemic has compelled several institutions to adopt automated testing throughout the SDLC for CI/CD, even if they had previously recognized its importance and necessity. Work from home (WFH) reality necessitates enhanced test automation, which makes implementation more difficult. Many hats are worn by IT developers, operations engineers, and testers, all of whom work in independent operating units as distinct organizations. Going forward, the key question is whether QA can improve and speed up product delivery by integrating the many clusters under the DevOps banner. And if such is the case, how might automated testing scenarios be implemented? We'll answer all of these issues and show you how to implement a solid testing automation plan in this article.
Key takeaways

Project’s scope of automation
Appropriate testing automation tool
Setting up a cloud-based test environment
Test case risk assessment
Run and manage test cases
Analyze continuously and remodel the strategy for improvement

Article quality
Automated testing is the first move in the right direction when you embark on your automation journey and due to that, this article will be one of a kind as it will explain the concept of automation testing and it will be straightforward for the novices to grip the content in it. In contrast with the almost similar content on the internet, this article will be in the context and the examples that will be offered in this article will be basic to attract both intermediates and beginners in automation testing
References
N/A

Hi, @Kama-144. How does your article differ from this similar one?

@louisefindlay23, I believe knowledge can never be exhausted and In contrast to the article you referred to me it is not in-depth as it addresses some critical issues like how to Conduct a test case risk assessment and it somehow tends to raise some flags on this argument Run and manage test cases as it is somewhat unclear of which in my article will gracefully address clarity and in-depth content will be provided accordingly to enhance community growth and development. Thanks

Topic approved, @Kama-144 but be sure to provide additional and unique value in your article.

closed #4722 via #5027


No tasks logs when using docker-compose celery

I have a dag that fails when I used celery but it runs fine when I use local executor. There is no task log available.

Realised it is due to celery task failure. But I have got no idea why celery task failed.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/airflow/executors/celery_executor.py", line 69, in execute_command
close_fds=True, env=env)
File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['airflow', 'run', 'default', 'task', '2020-03-18T04:42:39.712148+00:00', '--local', '--pool', 'default_pool', '-sd', '/usr/local/airflow/dags/default_dag.py']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/celery/app/trace.py", line 385, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/celery/app/trace.py", line 650, in protected_call
return self.run(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/airflow/executors/celery_executor.py", line 74, in execute_command
raise AirflowException('Celery command failed')
airflow.exceptions.AirflowException: Celery command failed


Error on Safari

I am seeing the following error in an app running in a WKWebView (an Office.js add-in to the Microsoft Excel for Mac, where the add-in is run in a webview IFrame in a side panel):
Webassembly.Module doesn't parse at byte 90: references are not enabled, in function at index 3.
Strangely, the host machine has Safari 16 installed, and if I open Excel Online in a browser tab, where the same add-in runs, again, in an IFrame in a side panel, - it executes xxhash-wasm without any hiccups.
Could you, judging by the error message, point me in the direction of what can be wrong here, and if the reason is clear already, any potential workarounds barring using a pure-JS implementation?
It almost feels like WKWebView uses a different WebKit engine version, or is more limited with regards to WASM. 🤔

The WebView version most likely uses an older or maybe restricted version of WASM. I'm not quite sure what that error is, because there are no references (such as externref) used within the whole WASM code, but I'm assuming that is related to bulk memory operations that have been integrated into<EMAIL_ADDRESS>As an alternative you could try to use<EMAIL_ADDRESS>which is a bit slower but still a lot faster than any pure-JS implementation. Just have a look at the breaking changes in the v1.0.0 release page. If you only calculate the hashes with the default seed (no seed specified) and use them for a comparison (equality check), none of the breaking changes should affect you.


Rhel/Centos 8 versionlock doesn't work

Seems like the format of the file has changed in Centos 8
I have to configure like so
yum::versionlock { '1:java-1.8.0-openjdk-headless-1:<IP_ADDRESS>.b09-0.el8_0.*':
ensure => present,
}
but the line should be
yum::versionlock { 'java-1.8.0-openjdk-headless-1:<IP_ADDRESS>.b09-0.el8_0.*':
ensure => present,
}
But the module balks at that !

I have noticed that the module is fairly cranky about the formatting, way more cranky than yum itself, even on EL7 :)

The current approach with editing the lock file directly looks not so robust and leads to incorrect behaviour in some cases (at least in my cases). Why doesn't it use a command-line interface of the yum version lock plugin? Like the install command and others. Maybe, it's worth to rewrite this component to use command-line interface as well?

I think it would be a great idea! A type and provider would allow the plugin to be agnostic to the actual contents of the configuration file.  In addition to the "ensure => present" -> add and "ensure => absent" -> delete (and possibly some sort of exclude capability), I would recommend supporting a generic "options" for the various command line flags.
~tommy
PS: I have honestly always thought that the package provider should automatically "versionlock" a package when someone sets a "version" for the ensure parameter, rather than "present" ... I wonder how hard it would be to add that capability?

I've checked the approaches with editing the lock file (the current one) and with invoking the yum version lock command directly (the supposed one) and for me, it looks impossible to use the second approach because the approaches lock packages in different ways:

yum can lock only available/installed packages
yum lock only packages that are available at the moment of locking. If we use a template for locking, yum matches all available packets with it and locks matched ones. If we will have a new package in a repository for the template, it won't be locked.
These differences may spoil people's Puppet configuration and lead to unexpected things. So it will be better to not change anything.

@AlexSamad
BTW the plugin does not support CentOS 8 at all. So it is expected that you have some problems with it on CentOS 8 and it would be better to name the issues like "Add CentOS 8 support".

According to the latest compatible versions on the Puppetforge site RHEL8 should be supported, but this issue is still present. We would like to use this feature so a solution would be much appreciated.

I have encountered it too, python3-dnf-plugin-versionlock changed the format
https://dnf-plugins-core.readthedocs.io/en/latest/versionlock.html
%{NAME}-%{EPOCH}:%{VERSION}-%{RELEASE}.%{ARCH}


[BUG]: Installation pcpp module

What happened?
Can't use this exquisite program please help
Version
Yes
What OS are you seeing the problem on?
Fedora based
Relevant output
File "/usr/local/bin/abricot", line 5, in <module>
    from program.profile import rules
  File "/usr/local/lib/abricot/program/profile.py", line 2, in <module>
    import rules
  File "/usr/local/lib/abricot/rules/__init__.py", line 1, in <module>
    import rules.C_A3 as C_A3
  File "/usr/local/lib/abricot/rules/C_A3.py", line 1, in <module>
    import abricot
  File "/usr/local/lib/abricot/abricot/__init__.py", line 6, in <module>
    from abricot.AbricoTokenizer import getTokens, TokenizerObject
  File "/usr/local/lib/abricot/abricot/AbricoTokenizer/__init__.py", line 1, in <module>
    from abricot.AbricoTokenizer.tokenizer import TokenizerObject, getTokens
  File "/usr/local/lib/abricot/abricot/AbricoTokenizer/tokenizer.py", line 9, in <module>
    from pcpp import Preprocessor
ModuleNotFoundError: No module named 'pcpp'

still having this issue on mac os thought (3 different computers)

Hi,
You should be able to use the workaround in #57 to make it work on MacOS.
We are still working on making a fix about this specific issue. Stay updated !


pass import path instead of callable in 'screenshot_apps'

fixes #29

I am not sure why the CI fails, since it succeeds locally :thinking:

This is all green now. I had to force a minimum HTML style and fix the content-type.

This is awesome! Thank you for the completion.


Parse unix address from sockaddr without length

What does this PR do
I noticed that feeding *const sockaddr_un into SockaddrStorage without length returns None. I had impression that it should actually work.
However extracting sa_len manually and feeding it into SockaddrStrorage works as expected and I am able to cast it to UnixAddr later on by calling SockaddrStorage::as_unix_addr().
 SockaddrStorage::from_raw(sa_ptr, Some((*sa_ptr).sa_len.into()))

Checklist:

[x] I have read CONTRIBUTING.md
[x] I have written necessary tests and rustdoc comments
[x] A change log has been added if this PR modifies nix's API

What new behavior is enabled, exactly?  A test would be helpful to understand your aim.  Also, you need a changelog entry.

What new behavior is enabled, exactly? A test would be helpful to understand your aim. Also, you need a changelog entry.

That SocketaddrStorage can actually parse a pointer to sockaddr_un of unknown length. Hint: the length is actually held inside of the pointer.
I can add a test and change entry.

There's a reason that it doesn't work.  It's deliberate.  The purpose of the length argument is to tell Nix how much of the struct is actually initialized.  In C, pointers to sockaddrs are often not fully initialized, or even allocated.  But reading uninitialized memory in Rust is UB.  So that argument is important.

The length argument is Option<socklen_t> so it's ok to pass None if I don't know the length when a syscall returns a non-null *sockaddr that has the AF_UNIX family set and a length inside of it.
The else branch is happily converting the whole range of types, i.e:
https://github.com/nix-rust/nix/blob/master/src/sys/socket/addr.rs#L1184-L1222
UnixAddr::from_raw() also happily accepts None as len:
https://github.com/nix-rust/nix/blob/master/src/sys/socket/addr.rs#L535-L569
So all this functionality is already there and it feels that SockaddrStorage just forgot to handle AF_UNIX in the else branch.

So it seems that the following is not true for all platforms:
assert!(
  UnixAddr::size() <= mem::size_of::<libc::sockaddr_storage>() as libc::socklen_t
);

I think this could be useful on apple platforms where sockaddr_un should fit into sockaddr_storage but I don't have time to pursue the completion of this PR.


can't use MockBroker without setting MetadataRequest handler

I'm trying to use MockBroker for testing my code that uses Sarama. My broker handler seems to require the MetadataRequest handler to be set in order to work. However, there doesn't seem to be a way to create a MockMetadataResponse.
Without setting the MetadataRequest handler I get
2016/02/19 20:58:04 broker: &{brokerID:0 port:37830 closing:0xc8200185a0 stopper:0xc820018600 expectations:0xc820018660 listener:0xc820026070 t:0xc82007e090 latency:0 handler:0x52c150 history:[] lock:{state:0 sema:0}}
2016/02/19 20:58:04 config: &{Net:{MaxOpenRequests:5 DialTimeout:1s ReadTimeout:1s WriteTimeout:1s TLS:{Enable:false Config:<nil>} KeepAlive:0} Metadata:{Retry:{Max:3 Backoff:250ms} RefreshFrequency:10m0s} Producer:{MaxMessageBytes:1000000 RequiredAcks:1 Timeout:10s Compression:0 Partitioner:0x522190 Return:{Successes:false Errors:true} Flush:{Bytes:0 Messages:0 Frequency:0 MaxMessages:0} Retry:{Max:3 Backoff:100ms}} Consumer:{Retry:{Backoff:100ms} Fetch:{Min:1 Default:32768 Max:0} MaxWaitTime:250ms MaxProcessingTime:100ms Return:{Errors:true} Offsets:{CommitInterval:1s Initial:-1 Retention:0}} ClientID: ChannelBufferSize:1}
2016/02/19 20:58:09 <nil> kafka: client has run out of available brokers to talk to (Is your cluster reachable?)

I added my own NewMockMetadataResponse to the package and it works.
Is there a reason newMockMetadataResponse isn't exported?

newMockConsumerMetadata is also unexported. @horkhe I assume this was just an oversight?


benchmarking spike 2: QA Spec for evaluation processors

Concept for benchmarking / data for the workflow tab
Data
In a discussion we identified the following properties of a workspace as crucial: publication date, font, layout, pages.

Publication date: The idea is to provide data sets from all VD periods as well as modern texts to cover most of our known use cases
fonts: Antiqua and black letter are the most common for the VD periods. It would be beneficial to have some Greek and maybe even Hebrew examples, though, as Greek and Hebrew are "holy languages" and might therefore be quoted in some texts.
layout: Layout consideration should encompass title pages (that have a lot of decoration, capitals, etc.), multi columned pages, tables, binding pages, vacant pages, maps and sheet music
pages: the number of pages should range from 1 (leaflet) to 150 or even 300 page(s) (full monograph) to get an impression about a workflow's performance

Metadata for data sets

In the JSON representation of a workflow the data should be tagged to enable easy sorting/filtering
each data set needs a thorough description so that users can compare their own data to the sample data sets used for a workflow

Next steps for data

[ ] create data sets we want to use for workflows (re-using the ones I got from @kba)
[ ] create tags for them
[ ] (write a first description) (this step is important for the application's usability, but not pressing at this point)

Ground Truths
:question:  At this point I'm not sure if we simple use an existing GT or if we create ones ourselves.
Workflows
The main idea of the workflow tab is to enable OCR-D users to identify suitable workflows for their data (where suitability means CER/WER and/or performance of the workflow). Since we have a lot of processors, it's not feasible to perform a simple permutation of all processors for all data sets. A good starting point might be to use the findings and recommendations the KIT had in the second project phase combined with examples obtained from people using OCR-D on a daily basis (Maria?).
The first evaluation of the workflow results could be done with dinglehopper, which is suitable for simple text evaluation.
Next steps for workflows

[ ] ~re-do the evaluation done by the KIT with newer processor versions and check if CER/WER and/or performance changed~ (this doesn't seem feasible)
[ ] also consider newer processors in the evaluation
[ ] get in contact with Maria to talk about the workflows used on a day to day basis

Getting the data relevant for the front end
JSON Output
The dashboard should be fed with JSON containing all relevant information. A first draft of the data looks like this:
[
    {
        "workflow-id": "1",
        "ocrd-workspace": "https://some-url-pointing-to.a/mets.xml",
        "properties":
            {
                "font": "antiqua",
                "date-of-creation": "19. century",
                "no-of-pages": "100",
                "layout": "simple"
            },
        "workflow-metrics": "https://link-to-nextflow-results.com",
        "cer_total": "5.7",
        "cer_per_page": "0.92",
        "time_per_page_in_seconds": "15"
    }
]

… and how to get it (maybe not in this spike)
In order to get a better understanding of how this is done, I will probably have to have a look at Nextflow and Mehmed's findings first.
Entscheidung für Metriken von Text und Layout treffen und kommunizieren
Ziel: Messbarkeit (OCR besser oder schlechter)

[ ] agree on metrics for text and layout
[ ] agree on the calculations that should be used
[ ] communicate the metrics and the calculations

AC for this sprint (30.08.2022)

[ ] we have a concept for doing the actual benchmark and well defined formats to express results
[ ] concept is accepted by community

@kba @paulpestov
Could you please give me some feedback regarding the JSON output suggested above?

Thank you for your example on the workflow JSON. I have questions about the comibnation of different aspects that we discussed on the basis of the Workflow Tab Mockup. So there we have a matrix view on the workflows that were grouped by benchmark types (in our case now "metrics"?) and models. As far as I understand it here you would return an array of workflow objects like above, right? How would we achieve that matrix view then? By which attributes should group the workflows? How do the crucial properties that you describe above play together with the matrix view?
Additional to that is it possible to intergrate the Nextflow results into that JSON in order to have a more standardized response?

As far as I understand it here you would return an array of workflow objects like above, right? How would we achieve that matrix view then? By which attributes should group the workflows? How do the crucial properties that you describe above play together with the matrix view?

As far as I understood the draft users should be able to select different benchmark metrics according to their needs. Therefore I chose a rather flat nesting for the metrics that are relevant. My understanding was that the front end takes care of this sorting and displaying the workflows. Does that shift too much work to the web app?

Additional to that is it possible to intergrate the Nextflow results into that JSON in order to have a more standardized response?

I can add the relevant findings of Nextflow to the JSON output we produce instead of an URL if that is what you mean. If not, could you elaborate?

Is this what you mean? Or do you want several JSON files for each representation?

It might be an idea to have individual arrays for different things, like:

{
   "models": [
      {
           "id": 1,
           "name": "Model A"
      }
   ],
   "works": [
      {
           "id": 1,
           "name": "Work A"
      }
   ],
   "workflows": [
      {
           "id": 1,
           // ...
      }
   ],
}

Everything would be referenced by id then. So we can easily create filters out of it. Maybe also bookmark a certain filter by appending it to the URL &work=1. What do you think?
The workflow steps is some additional topic I think but yea we also need this. For me they are not that critical to create the main functionalities of the front-end. They just add some additional info about the workflow.
More important I would consider (if our plans haven't changed) basic rendering of the list and matrix views. So properties would be our work (like work A, maybe rename properties to work?), here we could also use some title for the display. And yes we would need some model attribute with an object as value similar to properties. What info do we have from the model?

After a discussion we came to the conclusion that we stick with the originally proposed format, but

add information about the model
integrate @kba's proposed format (see https://github.com/OCR-D/spec/compare/master...qa-spec)

[
    {
        "workflow-id": "1",
        "label": "Workflow 1 on Data 345",
        "metadata":
            {
                "workflow": "https://example.org/workflow/1",
                "workflow_steps":
                {
                    "0": "Processor A",
                    "1": "Processor B"
                },
                "workflow_model": "Fraktur_GT4HistOCR",
                "eval_workflow": "https://example.org/workflow/eval1",
                "eval_data": "https://example.org/workspace/345",
                "eval_tool": "dinglehopper",
                "gt_data": "https://gt.ocr-d.de/workspace/789",
                "document":
                {
                    "fonts": ["antiqua", "fraktur"],
                    "publication_year": "19. century",
                    "number_of_pages": "100",
                    "layout": "simple"
                }
            },
        "evaluations":
        {
            "document_wide":
            {
                "wall_time": 1234,
                "cer": 0.57,
                "cer_min_max": [0.2, 0.57]
            },
            "by_page":
            [
                {
                    "page_id": "PHYS_0001",
                    "cer": 0.8,
                    "processing_time": 2.1
                }
            ]
        }
    }
]

@kba @paulpestov I tried to integrate Konstantin's proposal and also added some key that might come in handy for the frond end app (e.g. workflow_model or eval_tool which could be used to display more information in the workflow tab).

What is the difference between workflow_id in the top level and workflow in metadata?
I assume the former is the ID of the evaluation workflow and the later of the data generation workflow? Since both are to be Nextflow scripts, they should both be addressable as a URL via the Web API. Maybe we can rename them eval_workflow and ocr_workflow?

What is the difference between workflow_id in the top level and workflow in metadata?
I assume the former is the ID of the evaluation workflow and the later of the data generation workflow? Since both are to be Nextflow scripts, they should both be addressable as a URL via the Web API. Maybe we can rename them eval_workflow and ocr_workflow?

I assumed that what you proposed in https://github.com/OCR-D/spec/compare/master...qa-spec#diff-3ca00602cf767fb4a01ea3267035a87437cc087ccf4aecb252942431e9e1411bR1 should be an ID of a discrete evaluation workflow and just adopted the rest. :D So yeah, maybe we should be a bit verbose with our keys.

@kba What about this:
[
  {
    "eval_workflow_id": "wf1-data345-eval1",
    "label": "Workflow 1 on Data 345", // for UI display
    "metadata": {
      "data_creation_workflow": "https://example.org/workflow/1",
      "workflow_steps": {
        "0": "Processor A",
        "1": "Processor B"
      },
      "workflow_model": "Fraktur_GT4HistOCR", // for UI display
      "eval_workflow_url": "https://example.org/workflow/eval1",
      "eval_data": "https://example.org/workspace/345",
      "eval_tool": "dinglehopper",
      "gt_data": "https://gt.ocr-d.de/workspace/789",
      "data_properties": {
        "fonts": ["antiqua", "fraktur"],
        "publication_year": "19. century",
        "number_of_pages": "100",
        "layout": "simple"
      }
    },
    "evaluation_results": {
      "document_wide": {
        "wall_time": 1234,
        "cer": 0.57,
        "cer_min_max": [0.2, 0.57]
      },
      "by_page": [
        {
          "page_id": "PHYS_0001",
          "cer": 0.8,
          "processing_time": 2.1
        }
      ]
    }
  },
  {
    "eval_workflow_id": "wf2-data345-eval1",
    "label": "Workflow 2 on Data 345",
    "metadata": {
      "data_creation_workflow": "https://example.org/workflow/2",
      "workflow_steps": {
        "0": "Processor A",
        "1": "Processor B"
      },
      "workflow_model": "Fraktur_GT4HistOCR",
      "eval_workflow_url": "https://example.org/workflow/eval1",
      "eval_data": "https://example.org/workspace/345",
      "eval_tool": "dinglehopper",
      "gt_data": "https://gt.ocr-d.de/workspace/789",
      "data_properties": {
        "fonts": ["antiqua", "fraktur"],
        "publication_year": "19. century",
        "number_of_pages": "100",
        "layout": "simple"
      }
    },
    "evaluation_results": {
      "document_wide": {
        "wall_time": 1234,
        "cer": 0.88,
        "cer_min_max": [0.2, 0.57]
      },
      "by_page": [
        {
          "page_id": "PHYS_0001",
          "cer": 0.9,
          "processing_time": 2.0
        }
      ]
    }
  }
]

Changes:

workflow_id --> eval_workflow_id
workflow --> data_creation_workflow
document --> data_properties
evaluations --> evaluation_results


Contestful tests 4

What's this PR do?
More refactoring of lib/contentful. Added more tests weeeee!.
How should this be reviewed?

clone Gambit
Run:

npm install
npm run all-tests

Checklist

[x] Documentation added for new features/changed endpoints.

Codecov Report

Merging #903 into develop will increase coverage by 3.59%.
The diff coverage is 94.73%.

@@             Coverage Diff             @@
##           develop     #903      +/-   ##
===========================================
+ Coverage    17.87%   21.46%   +3.59%
===========================================
  Files           24       24
  Lines         1147     1146       -1
===========================================
+ Hits           205      246      +41
+ Misses         942      900      -42

Impacted Files
Coverage Δ

lib/contentful.js
92.53% <94.73%> (+29.57%)
:arrow_up:

app/exceptions/UnprocessibleEntityError.js
100% <0%> (+66.66%)
:arrow_up:

Continue to review full report at Codecov.

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

@aaronschachter
"have you tried posting some requests to /chatbot locally as sanity test?"

reported back through my local gambit.


Record Keystrokes and Record Mouse have very different UI

They seem to be very similar features, but the settings are in completely different places...
I guess there are technical reasons for that, but
should/could this not be made similar?
To have mouse in settings seems more comfortable, as it does not need to be applied after the recording. That saves a lot of time.
Same would go for the progressbar, but obviously this can not be done before the recording is ended.

I want to add more options for customization for the Cursor recorder too, to be a pair for the KeyStrokes feature. So my plan is to move the options to add cursor and mouse clicks feature to the editor.

My vote would be to be able to add mouse clicks as a post-recording editing feature like keystrokes, so I can just record my screencast and then later decide whether to add visible mouse clicks or not. This means I don't have to think too much in advance or potentially have to come back and re-record the screencast if I get a setting wrong.

@nzbart Done.


implement NumPy-like pairwise reduction for stability

This fixes #7038.

[x] Pairwise reduction implementation and manual test
[x] Test codes to ensure correctness of reduction (if required)
[x] Test codes to ensure stability of reduction
[x] Performance measure

import chainerx as chx
import cupy as cp
import numpy as np

def _unstable_sum(xp, **kwargs):
    # Sum larger numbers first, then small numbers.
    a = xp.zeros((2, 512*512), **kwargs)
    a[0, :] = 1.0
    a[1, :] = 0.1
    return a.sum()

print(_unstable_sum(np, dtype=np.float32))                      # 288358.0
print(_unstable_sum(cp, dtype=cp.float32))                      # 288352.0
print(_unstable_sum(chx, dtype=chx.float32, device='cuda:0'))    # 288352.0
print(_unstable_sum(chx, dtype=chx.float32, device='native:0'))  # old 286720.0 new<PHONE_NUMBER>5

I confirmed the correctness of the routine up to 1023.
import chainerx as chx
for i in range(1024):
    a = chx.arange(i, device='native:0') + 1
    print(i, i * (i + 1) // 2, a.sum())

I'll remove WIP sign after test codes are added.

I added tests. I also conducted a benchmark.
import chainerx as chx
import time
a = chx.zeros((2, 512*512), dtype=chx.float32, device='native:0')
a[0, :] = 1.0
a[1, :] = 0.1
t1 = time.perf_counter()
v = a.sum()
t2 = time.perf_counter()
print(f"{v.item()}, {(t2-t1)*1000}ms")

Before the PR:
286720.0, 0.4187959711998701ms

After the PR:
288358.40625, 0.26734196580946445ms

It turned out decreasing the number of unrolling (ExpandLen) from 8 to 4 is critical for speed. (About 4 times improvement.) I guess the reason is register pressure. I noticed indexing by an iterator is not inlined. So a lot of values have to be escaped to stack.

@asi1024 Thank you for your comments.
I changed to use C-style array. I thought std::array is OK but felt a bit nervous about including additional header. Some comments are also added.
I didin't the loop structure (like Haskell's fold1) due to performance.
Now the loop is:
    while (i_reduce < reduce_len / ExpandLen * ExpandLen) {
        // Invoke dynamic pairwise reduction if `i_reduce` is multiple of `SerialLen * ExpandLen`.
        if (i_reduce != 0 && i_reduce % (SerialLen * ExpandLen) == 0) {
            int i = 0;
            for (int64_t k = i_reduce >> 1; k % (SerialLen * ExpandLen) == 0; k >>= 1, ++i) {
                impl.Reduce(tree_accum[i], accum);
            }
            tree_accum[i] = accum;
            accum = impl.Identity();
        }
        // This increments `i_reduce` by `ExpandLen`.
        impl.Reduce(ExpandedPairwiseReduction<In, ReductionImpl, InNdim, T, ExpandLen>::run(in, it_in, impl, i_reduce), accum);
    }

When I tried to change it like following,
    while (i_reduce < reduce_len / ExpandLen * ExpandLen) {
        // This increments `i_reduce` by `ExpandLen`.
        impl.Reduce(ExpandedPairwiseReduction<In, ReductionImpl, InNdim, T, ExpandLen>::run(in, it_in, impl, i_reduce), accum);
        // Invoke dynamic pairwise reduction if `i_reduce` is multiple of `SerialLen * ExpandLen`.
        if (i_reduce % (SerialLen * ExpandLen) == 0) {
            int i = 0;
            for (int64_t k = i_reduce >> 1; k % (SerialLen * ExpandLen) == 0; k >>= 1, ++i) {
                impl.Reduce(tree_accum[i], accum);
            }
            tree_accum[i] = accum;
            accum = impl.Identity();
        }
    }

    // post accumulation need to be appropriately modified

the benchmark result slowed down. Probably this loop is more hard for compiler and produces more register spills.

Jenkins, test this please.

Jenkins CI test (for commit 9b7280445fe3e46c206a9aedda1a49c4d4488fa0, target branch master) failed with status FAILURE.

Could you fix for clang-tidy?
https://jenkins.preferred.jp/job/chainer/job/chainer_pr/661/TEST=CHAINERX_misc,label=mn1-p100/console

@asi1024 Sorry, now clang-tidy, cpplint and clang-format are passing.

Jenkins, test this please.

Jenkins CI test (for commit 6a9c67ed0b3208240e6208c8040cdf3fa1fb53e1, target branch master) failed with status FAILURE.

Jenkins failure seems unrelated to this PR. LGTM. Thank you for the PR!

Jenkins CI test (for commit 6a9c67ed0b3208240e6208c8040cdf3fa1fb53e1, target branch master) failed with status FAILURE.


Support for embeddedRTPS in micro_ros_arduino

Hey,
I am curious if embeddedrtps can be enabled somehow using this mico_ros_arduino library?
I am interested in running our ESP32 powered Robots without the need for an Agent on the Host PC if possible.
I read about the support of eprosima for embeddedRTPS and want to see how i can enable it and test it.
My feeling was that the colcon.meta file would have a middleware param, but that doesn;t seem like the case.
If still not supported i would be more then happy to work on such a feature and provide a PR for it and enable it in this repository.
Whoever is responsible, let me know your thoughts :)

Hello @kalaajiahmad, we are not planning to support embeddedRTPS in micro-ROS for Arduino libraries.
If you need professional support, we provide other (non-OSS) middlewares that are agent-less and can be integrated into this kind of platform. If you need professional support please contact<EMAIL_ADDRESS>


Hide Other Configuration Profiles When Searching for Specific Profile Name

:bulb: Hide Other Configuration Profiles When Searching for Specific Profile Name
Would be nice to hide other configuration profiles to limit noise & distraction when searching for a specific profile name.
For example, I search for a specific configuration profile named "All OS - Deferred Sonoma update" but LowProfile doesn't highlight or hide other configuration profile to show details.
:white_check_mark: Proposed solution
Hide and highlight and displays details for specific configuration profile name searched.
:adhesive_bandage: Alternatives Solutions + Workarounds
Not that I have found.
:information_source: Additional context
For example, I search for a specific configuration profile named "All OS - Deferred Sonoma update" but LowProfile doesn't highlight or hide other configuration profile to show details.

I will investigate expected macOS search behaviour in other apps and report back 🫡


Error: DefaultRenderer.getChildContext(): childContextTypes must be defined

I am getting this error when running react-native run-ios on OSX with RN 0.23.1.
Running in Xcode seems to work.

Can you post a sample project to reproduce this issue?

@bnns See https://github.com/aksonov/react-native-router-flux/pull/518

This fixed it! Thanks!

@facebook-github-bot close

@charpeni tells me to close this issue. If you think it should still be opened let us know why.


Create 2021-09-03-seminar-minutes-2021-05.md

create a file for event on sep 03

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

ping

Seem duplicate with #234  So I close this PR.


Add workflow to deploy Java client to Nexus Sonatype (Maven Central)

This gist describes
how we import GPG signing secrets and OSSRH logins (not to worry, it's a single stanza in java-api-client.yaml, not some random GitHub action that can change each time...).  OSSRH_GPG_SECRET_KEY comes from the "Treeverse signing" environment -- a dev team member needs to approve each run.

Thanks!


[Bug] Heard neighbours lists empty

The "heard us" list as well as the "we heard" is empty for any node.
Browser: latest Chrome and Chrome Beta on kubuntu Linux 22.04 LTS.

Can confirm. Same issue with any browser on android.


V1.2.3 my

1

cancel

Just as a word of warning for whoever's refresh token is present in that, never ever push your token. I can't seem to invalidate it which means that your account can just be logged into by anyone who wants to. (Try using session.renewRefreshToken() to do it yourself)


Consider Removing byname-implicit from 2.13

Remove -Xlint:byname-implicit in 2.13
Its noisy and conflicts with everything, and makes upgrading in combination with sbt-tpolecat require manual annotations on every single derivation.
https://github.com/scala/bug/issues/12072
Pureconfig response -
https://github.com/pureconfig/pureconfig/pull/783/files

The scalac flag  to address is -Xlint:-byname-implicit


Feat/meshes

Added a new mesh.path:update(params), which is used as follows:
mesh.path:update{
   vertices = params.vertices,
   uvs      = params.uvs,
   indices = params.indices
}

I tested it with many Spine animations and everything is working as expected and with a performance gain of 30-70% depending of the animation, these are some samples:

I also updated the Spine version 3.7, 3.8 and 4.0 to work with this, not approved yet of course, but I can probably share those files thought here or Discord.

This is awesome. Shall merge ASAP


Brain JS not installing via NPM on mac

[ ]

Did you get it installed?

no, I closed the issue because the CDN worked fine but I would much rather be able to use the package directly. (I will reopen the issue. And i'm  sorry, I am fairly new to GitHub)

i have the same problem

Just tested the latest release, https://www.npmjs.com/package/brain.js/v/2.0.0-beta.11, and it works fine on windows and mac.  I haven't tested ubuntu yet, but since this thread was about installing on mac, I'm going to go ahead and close.


Jfrog cli can work only with local user's

Our Artifactory instance connected to Atlassian Crowd and we don't have any local Artifactory user.
When i'm trying to  perform npmi with external user
jfrog rt npmi --build-name=my_project --build-number=1.0.0

i see this error
[Error] Artifactory response: 400 Bad Request
{
  "errors": [
    {
      "status": 400,
      "message": "User 60061914 couldn't be found"
    }
  ]
}

but when i perform same operation with local admin, there is no problems.

https://www.jfrog.com/jira/browse/RTFACT-21308 maybe problem not in cli it self

@mfominov,
You are correct. Since the above JIRA already tracks this issue. I suggest we close this one.

maybe fix in cli is easy to implement, rather than in artifactory instance

I'm not sure it is possible @mfominov, but please share any suggestions or ideas you may have.

@mfominov,
Since RTFACT-21308 already tracks this issue, I'm closing this one.


Gerrit Forge

Clear and concise description of the problem
As a user of Gerrit Code Review, I would like to use Woodpecker for CI. Opening this issue to see if there would be any interest in having this in core Woodpecker as a supported forge or if it would be a better approach to add it as an addon forge.
Guidelines for adding new forges
As documented (https://woodpecker-ci.org/docs/development/core-ideas#guidelines), a to add a new forge to Woodpecker, it must support webhooks and oauth2:
Webhooks
Gerrit supports webooks via the builtin core plugin webhooks: https://gerrit-review.googlesource.com/Documentation/config-plugins.html#webhooks.
OAuth2
Gerrit is not an OAuth2 provider itself, does that disqualify it from being added as a core?There is a popular Gerrit plugin to make Gerrit use OAuth: https://gerrit.googlesource.com/plugins/oauth/  In our setup, we use Google SSO OAuth to authenticate with Gerrit. So we would use Google SSO with Woodpecker too.
Would it be possible to reconsider the OAuth2 requirement? Or make it possible to have another OAuth2 provider while still having Gerrit support in core Woodpecker?
Suggested solution
Add Gerrit as a builtin forge.
Alternative
Build a Gerrit integration as an addon forge.
Additional context
My company would potentially be happy to open source/contribute code and/or money towards getting Woodpecker/Gerrit working somehow. Of course we could start building it as an addon forge.
Gerrit is a great tool for git+code review and a lot of people like that flow as an alternative to the typical PR workflow Github/Gitlab/Gitea etc. Gerrit is open source and has been around for a long time and is actively developed. Using Gerrit and Woodpecker together seems like it would be an amazing combination for a lot of people! 🔥
Both Gerrit and Woodpecker uses birds as their logos/mascots! 🐦⬛
Validations

[X] Checked that the feature isn't part of the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Even though I do not need Gerrit support, you are rising interested questions, one of them I also thought.

it must support webhooks and OAuth2

OAuth matters (#2161, #3591), but not webhooks.

Or make it possible to have another OAuth2 provider while still having Gerrit support in core Woodpecker?

That is the most interesting part to me. Let me rephrase: can we use arbitrary OAuth provider for authentication and different supported forge for repositories stuff?
For example, I use Gitea as SCM. I set it up to use external OAuth provider, for example Keycloak. And currently it looks a bit weird: WP login -> redirect to Gitea -> redirect to Keycloak -> and then in reverse direction (I guess). It would be nice if Woodpecker could use Keycloak directly for authentication and Gitea for repositories stuff.

being added as a core?

Interesting discussions are #2651 and #2355.

Of course we could start building it as an addon forge

You might be interested in #3266 then.

Thanks for you reply!
Splitting the Forge interface to be able to use any OAuth2 plugin/provider with any Forge seems like it would be reasonable.  Would mapping a user from any OAuth2 backend to a user in a forge be a problem? Or is it always mapped via the email address?
The use case you describe with Gitea/Keycloak would be improved if Woodpecker could go directly to Keycloak.
For Gerrit users, it would also be very helpful. Gerrit is a central git server and hosts the equivalent of PRs. I think many Gerrit setups is used with another forge/gitweb such as github/gitlab/forgejo to get code browsing and issue tracking. In those cases, being able to reuse the existing OAuth2 backends already present in Woodpecker seems like a big win. Gerrit/Forgejo/Woodpecker with Forgejo being the OAuth2 provider could be a lovely setup. Splitting the interface into OAuth2/Forge parts would make that possible.
(I just found out Woodpecker a couple of days ago, am not familiar with the code and do not know Go so I may be missing a lot of context here! 😬 )

am not familiar with the code

Me almost too :) except Agent's Kubernetes backend.

Gerrit/Forgejo/Woodpecker
Splitting the interface into OAuth2/Forge parts would make that possible.

I used to use it at one of previous job. Though, I forget it's just review system. Thank you for reminding me.
So, Forge interface should be split into 3 pieces then: authentication, repository and pull requests (for example, Keycloak, Forgejo, Gerrit respectively).

That being said, I'm sceptical about chances to get it in the "core" ;)

In case you use gerrit with forgejo/github etc, why don't you use woodpecker and connect it to this forge?

Yeah, it was messed me too :) but initial request was Google SSO + Gerrit. So OAuth (Google, Amazon, Azure, Keycloak, etc) + Forge (Gerrit, Gitea, etc).

I don't think this is easily doable with a direct authentication via an external oauth backend

I'll check that using WOODPECKER_EXPERT_FORGE_OAUTH_HOST .

I think we should not split this ... I'd rather go with an add-on forge

Addon doesn't solve the problem. If pelme implemented current Forge interface as Addon, then he would end up with binaries implementing combinations of authentication and repo like Google+Gerrit, Keycloak+Gerrit and so on.

I'll check that using WOODPECKER_EXPERT_FORGE_OAUTH_HOST

Each forge have own AuthURL and TokenURL. It likely will be different for Keycloak/Google/etc. While we can override AuthURL by WOODPECKER_EXPERT_FORGE_OAUTH_HOST, we cannot do the same with AuthURL.
So, it doesn't make sense to test it in practice, until we can override TokenURL.

To clarify responsibilities when I said you could use Gerrit/Forgejo/Woodpecker together:

Gerrit: Code review (Pull requests). The main source git repository.
Forgejo: Repository browsing. Commit lists, blame views, file/directory lists. PRs would not be used. Some kind of replication on Gerrit would be setup to sync changes to Forgejo. All changes in Forgejo would happen via replication from Gerrit. Forgejo could be the OAuth2 provider for both Gerrit and Woodpecker.
Woodpecker - gets webhooks from Gerrit. Clones/gets source code from Gerrit.

If we talk about splitting the Forge interface in three (or more) it would be GitRepo, ChangeRequests, GitWeb, OAuth2Provider. I do not know if it makes sense. But it would not be a problem for the existing forges since they would all implement the parts anyways?
I do think that a addon forge would be a good start before considering it for core. A addon forge implements exactly the same interface and can do provide exactly the same functionality as the builtin ones, right?

https://developer.okta.com/blog/2019/10/21/illustrated-guide-to-oauth-and-oidc
https://www.keycloak.org/securing-apps/oidc-layers
https://openid.net/specs/openid-connect-core-1_0.html
The user ID token will be the same and valid for all systems. For example:
{
  login: john,
  email<EMAIL_ADDRESS>}

The user access token... well, it depends... each system requires own claims, but in theory we can issue universal access token like:
{
  gitea_roles: admin,
  woodpecker_roles: user,
  consto_roles: developer
}

and use this token in any system.
https://stackoverflow.com/questions/53687156/managing-application-access-with-openid-connect-and-oauth

So you mean that the user manually has to set a token?
Do you mean you manually set a forge token for a bot user in you wp config?

No. I imagined schema like Gitea -> Keycloak <- Woodpecker. Woodpecker do not call Gitea for tokens at all. Keycloak gives universal token for both WP and Gitea (see example above).

However, I've just checked interactions with Gitea and didn't see Authorization header in requests, but cookie i_like_gitea. Seems, Gitea uses OIDC provider only for authentication.
Even though it can distinguish admins and restricted users Screenshot 2024-10-18 1, but I have to supply this claim in ID token.
Besides, I've found the scopes used in Gitea. Seems, Woodpecker requests Gitea-specific token with all scopes.
Even if it is possible to issue an access token in Keycloak with Gitea's claims/scopes, it doesn't make sense.
@qwerty287, thank you for answers and leading questions. I revoke my this is a feature request from me then :)

Then the question is how Gerrit works? Does it issue custom token to access API or entirely rely on scopes from OIDC?
That are the questions for you, @pelme. Wish you luck and looking forward to implementation.

Not yet, still looking at alternatives. I agree it seems not feasible to support gerrit natively at this point. Addon forges is nice, when/if myself/someone else figures out more details and actually build a gerrit forge addon I guess it can be discussed again. 🙂

I personally think, if wp would be able to intergrate to gerrit would be a huge win for the project ...
... but I dont want to add it to the core of the base requrements of a forge (to us) are not met.
So I would say I personally would help with looking at an addon and somethimes do stuff there ... but starting such addon is currently not in my time budget
so - I'm also for closing this issue but we still are happy to stay in contact to anyone who wana move that front forward ;)
cc @pelme
PS: note to me: a generic addon that pulls git and emulates an forge migt be a good generic way like a bridge to onbord all strange types of forges ...

just reread the issue and found out about https://gerrit.googlesource.com/plugins/oauth/
well I would argue it's valid to add it to the core, and requre an addon on the gerrit side ...
... still we currently have no maintainer who use gerrit so I dont know how would implement&maintain it

We figured out already that this won't work

We figured out, that my wish won't work. It might seem I hijacked the issue, but there is info in the discussion, that would be helpful in implementing the integration, I think.


I dont know if it is working or not

When I run the GenshinImpact_PaimonShutUp and open the game it closes and i keep hearing her. Am i doing it wrong or its not working? I dont know anything about programming so...

Thank you, it started working the day after without doing nothing, but if it doesn't work again i will try this, also thank you for creating it now my game got totally better!


[FLINK-30281] Add operator error log whitelist entry for JmDeploymentStatus.ERROR.Count

What is the purpose of the change
The operator log error parser identified the metric as error which is definitely false positive:
Found error in log files.

flink-kubernetes-operator-7456697448-mgw42.k8soperator.flink.flink-kubernetes-operator.namespace.default.FlinkDeployment.JmDeploymentStatus.ERROR.Count: 0

In this PR I've added this metric to the whitelist.
Brief change log
Added this metric to the whitelist.
Verifying this change
Existing e2e tests.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): no
The public API, i.e., is any changes to the CustomResourceDescriptors: no
Core observer or reconciler logic that is regularly executed: no

Documentation

Does this pull request introduce a new feature? no
If yes, how is the feature documented? not applicable

cc @morhidi

There can be all sort of ERROR.Count like metrics in the log, not just JmDeploymentStatus.ERROR.Count. I simple don't understand why don't we check only the ERROR level entries in the logs and check any string containing the error word?

Makes sense, changing the approach...


Errors yarn installing on an M2 Macbook Pro

Posting from https://github.com/microsoft/TypeScript-Website/pull/2676#issuecomment-1385721931 as requested by @andrewbranch - thanks for looking into these errors! 😄
Copying the last few lines of running yarn locally:
➤ YN0009: │ canvas@npm:2.6.1 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/1_/pn8_jg_93cqdnkyswmmr5sxm0000gn/T/xfs-2898ede3/build.log)
➤ YN0009: │ fsevents@patch:fsevents@npm%3A1.2.11#~builtin<compat/fsevents>::version=1.2.11&hash=18f3a7 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/1_/pn8_jg_93cqdnkyswmmr5sxm0000gn/T/xfs-f284f23b/build.log)
➤ YN0009: │ sharp@npm:0.28.1 couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/1_/pn8_jg_93cqdnkyswmmr5sxm0000gn/T/xfs-5a1931c9/build.log)
➤ YN0008: │ gatsby-cli@npm:3.8.0 must be rebuilt because its dependency tree changed
➤ YN0008: │ gatsby@npm:3.8.1 [5df2e] must be rebuilt because its dependency tree changed
➤ YN0000: └ Completed in 6s 451ms

/private/var/folders/1_/pn8_jg_93cqdnkyswmmr5sxm0000gn/T/xfs-2898ede3/build.log (canvas@npm:2.6.1)
# This file contains the result of Yarn building a package (canvas@npm:2.6.1)
# Script name: install

node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using<EMAIL_ADDRESS>node-pre-gyp info using<EMAIL_ADDRESS>| darwin | arm64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for "/Users/josh/repos/TypeScript-Website/node_modules/canvas/build/Release/canvas.node" (not found)
node-pre-gyp http GET https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v108-darwin-unknown-arm64.tar.gz
node-pre-gyp http 404 https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v108-darwin-unknown-arm64.tar.gz
node-pre-gyp WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v108-darwin-unknown-arm64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for<EMAIL_ADDRESS>and<EMAIL_ADDRESS>(node-v108 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v108-darwin-unknown-arm64.tar.gz
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| darwin | arm64
gyp info ok
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| darwin | arm64
gyp info find Python using Python version 3.10.6 found at<EMAIL_ADDRESS>(node:12125) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn<EMAIL_ADDRESS>gyp info spawn args [
gyp info spawn args   '/Users/josh/repos/TypeScript-Website/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/josh/repos/TypeScript-Website/node_modules/canvas/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/josh/repos/TypeScript-Website/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/josh/Library/Caches/node-gyp/18.7.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/josh/Library/Caches/node-gyp/18.7.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/josh/repos/TypeScript-Website/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/josh/Library/Caches/node-gyp/18.7.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/josh/repos/TypeScript-Website/node_modules/canvas',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| darwin | arm64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  SOLINK_MODULE(target) Release/canvas-postbuild.node
  CXX(target) Release/obj.target/canvas/src/backend/Backend.o
In file included from ../src/backend/Backend.cc:1:
In file included from ../src/backend/Backend.h:6:
../../nan/nan.h:2536:8: warning: 'SetAccessor' is deprecated: Do signature check in accessor [-Wdeprecated-declarations]
  tpl->SetAccessor(
       ^
/Users/josh/Library/Caches/node-gyp/18.7.0/include/node/v8-template.h:837:3: note: 'SetAccessor' has been explicitly marked deprecated here
  V8_DEPRECATED("Do signature check in accessor")
  ^
/Users/josh/Library/Caches/node-gyp/18.7.0/include/node/v8config.h:460:35: note: expanded from macro 'V8_DEPRECATED'
# define V8_DEPRECATED(message) [[deprecated(message)]]
                                  ^
In file included from ../src/backend/Backend.cc:1:
In file included from ../src/backend/Backend.h:6:
In file included from ../../nan/nan.h:2884:
../../nan/nan_typedarray_contents.h:34:43: error: no member named 'GetContents' in 'v8::ArrayBuffer'
      data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
                                  ~~~~~~~~^
../src/backend/Backend.cc:111:10: warning: address of stack memory associated with local variable 'msg' returned [-Wreturn-stack-address]
  return msg.c_str();
         ^~~
2 warnings and 1 error generated.
make: *** [Release/obj.target/canvas/src/backend/Backend.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/josh/repos/TypeScript-Website/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command "/Users/josh/.nvm/versions/node/v18.7.0/bin/node" "/Users/josh/repos/TypeScript-Website/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/josh/repos/TypeScript-Website/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/josh/repos/TypeScript-Website/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
gyp ERR! cwd /Users/josh/repos/TypeScript-Website/node_modules/canvas
gyp ERR! node -v v18.7.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/Users/josh/.nvm/versions/node/v18.7.0/bin/node /Users/josh/repos/TypeScript-Website/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/josh/repos/TypeScript-Website/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/josh/repos/TypeScript-Website/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/josh/repos/TypeScript-Website/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1091:16)
node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:302:5)
node-pre-gyp ERR! System Darwin 21.6.0
node-pre-gyp ERR! command "/Users/josh/.nvm/versions/node/v18.7.0/bin/node" "/Users/josh/repos/TypeScript-Website/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/josh/repos/TypeScript-Website/node_modules/canvas
node-pre-gyp ERR! node -v v18.7.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute '/Users/josh/.nvm/versions/node/v18.7.0/bin/node /Users/josh/repos/TypeScript-Website/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/josh/repos/TypeScript-Website/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/josh/repos/TypeScript-Website/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)

/private/var/folders/1_/pn8_jg_93cqdnkyswmmr5sxm0000gn/T/xfs-5a1931c9/build.log (sharp@npm:0.28.1)
# This file contains the result of Yarn building a package (sharp@npm:0.28.1)
# Script name: install

sharp: Using existing vendored libvips v8.10.6
prebuild-install WARN install No prebuilt binaries found (target=3 runtime=napi arch=arm64 libc= platform=darwin)
gyp info it worked if it ends with ok
gyp info using<EMAIL_ADDRESS>gyp info using<EMAIL_ADDRESS>| darwin | arm64
gyp info find Python using Python version 3.10.6 found at<EMAIL_ADDRESS>(node:12359) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
 System Darwin 21.6.0
gyp ERR! command "/Users/josh/.nvm/versions/node/v18.7.0/bin/node" "/Users/josh/repos/TypeScript-Website/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/josh/repos/TypeScript-Website/node_modules/sharp
gyp ERR! node -v v18.7.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

macOS Monterey
MacBook Air (M2, 2022)

I tested this on my M1 with Monterey and got similar results.
The python thing seems to be because macOS dropped python from the OS and so it's not in PATH anymore. I have a brew installed Python 3, but it only comes onto path as python3, so I was able to fix the second error with:
export PATH="/opt/homebrew/opt/python/libexec/bin:$PATH

The other errors I've been able to fix by installing the libraries that the logs tell me are missing, which required brew install pixman cairo pango (but I think I had some others already installed).
I'm also running Node 16 versus 18; your logs seem to imply that there's a compiler error related to v8 headers which are Node specific. Maybe try downgrading to Node 16?

The website currently requires Node 14 (we have a Volta entry in the package.json) until we do something about #2473

That worked, thanks!
export PATH="/opt/homebrew/opt/python/libexec/bin:$PATH"
nvm use 14


BUG: Fix unstable standard deviation calculation in histogram

Closes  #10126
2 commits: first commit adds unit test that is broken by existing logic (unstable variance/standard deviation calculation)
second commit adds a fix by calculation of np.std() inside each cell of the d-dimensional histogram.

The scipy.scipy build looks like a flaky test, doesn't appear to me to touch any of the code this PR modifies.

@tylerjereddy I rebased off master today, looks like that fixed things-thanks. Hopefully no flaky tests on the remaining CI builds (that all successfully built on last push_.

@rlucas7 I think today is not your lucky day--seems that a new pytest 5.0 release has hit the workflow in Travis CI and is causing unrelated issues. I'll see what I can do about that, probably in another PR.

@tylerjereddy Thanks for looking into the issue, did the commit: ecdd4896befe16103523ad37adb08ef7024fb5a9
resolve the issue? I can close and re-open the PR to rerun the CI, but don't want to waste the resources if you haven't yet resolved.

Rebasing on latest master & force-pushing seems in order now, yeah. Pauli fixed up a few issues on master.

@tylerjereddy all checks pass on CI tools w/rebase but locally I'm getting errors related to pybind11?
I guess there was an addition to the dependency closure somewhere during rebase. Are there install instructions for pybind11 somewhere so that the scipy build finds all the necessary *.h files?

@tylerjereddy all checks pass on CI tools w/rebase but locally I'm getting errors related to pybind11?
I guess there was an addition to the dependency closure somewhere during rebase. Are there install instructions for pybind11 somewhere so that the scipy build finds all the necessary *.h files?

Nevermind, looks like the dependency closure was updated since I last fetched from master (maybe 1-2 months ago and pybind11 was added). I ran this in my conda virtual-env
pip install pybind11
which seems to have resolved the error(s).

This looks correct, and min/max/median are also handled by just calling the numpy function. So let's go with that rather than reinventing the std() wheel.

Merged, thanks @rlucas7


Modal consistency fix for button colour and cancel text

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/20130
PROPOSAL: https://github.com/Expensify/App/issues/20130#issuecomment-1575174440
Tests

Test - 1

Open your profile.
Click on " Contact methods".
Click on " New contact method".
Click on " Delete" to remove the existing contact.
Notice the modal should contain text as Yes, continue and the button should be in red and there should be a cancel button.

Test - 2

Go to settings -> click on "Security".
Click on " Close account".
Enter the default contact method
Click on the " Close account" button.
Notice the modal should contain text as Yes, continue and the button should be in red and there should be a cancel button.

[x] Verify that no errors appear in the JS console

Offline tests

Test 1 - Same as above
Test 2 - Cannot Perform (we don't support close account when user is in offline state)
QA Steps

Test - 1

Open your profile.
Click on " Contact methods".
Click on " New contact method".
Click on " Delete" to remove the existing contact.
Notice the modal should contain text as Yes, continue and the button should be in red and there should be a cancel button.

Test - 2

Go to settings -> click on "Security".
Click on " Close account".
Enter the default contact method
Click on the " Close account" button.
Notice the modal should contain text as Yes, continue and the button should be in red and there should be a cancel button.

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

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

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

Mobile Web - Chrome

Mobile Web - Safari

Desktop

iOS

Android

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/Julesssss in version: 1.3.27-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to staging by https://github.com/Julesssss in version: 1.3.27-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.27-7 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅


[Question] Upsample in generator net

Hi, thanks for your code. I found in the generator net, the implement used a reflection padding before  calling conv1d when processing upsample, which is not mentioned in the paper.

Then in addition to using transpose convolution, we also repeat the output of the first step by the up-sample factor directly and following a convolutional layer.

My question is why this reflection padding is necessary? Thanks in advance.

@OnceJune perform better than normal padding before Conv1d


Fixed issue #750

Pull request for -
Prevent browser autocompletion from other sites bleeding into search field #750

Thanks a ton!

@deltakosh - Sorry, I missed updating it at 'search.js'; I see you have already done it. Thanks :)

No worry it is a team work ;)


Character count is off by one

The logic for tweets including URLs is such:
      // Add 23 characters for URL starting with https://
      // Otherwise add 22 characters

But the docs suggest otherwise:
{
...

  "short_url_length": 23,
  "short_url_length_https": 23,
...
}

Would it be possible to simplify this logic to always add 23 characters?

Twitter changed its policy several months ago to convert all http links to
https, so there code is correct and the comment is outdated.
You could simplify the logic, yes. Anyone pulling in the new version might
have to make sure they weren't referencing old names.
On Dec 15, 2015 8:42 AM, "Rebecca Sliter"<EMAIL_ADDRESS>wrote:

The logic for tweets including URLs is such:
  // Add 23 characters for URL starting with https://
  // Otherwise add 22 characters

But the docs
https://dev.twitter.com/rest/reference/get/help/configuration suggest
otherwise:
{...
"short_url_length": 23,
"short_url_length_https": 23,...
}
Would it be possible to simplify this logic to always add 23 characters?
—
Reply to this email directly or view it on GitHub
https://github.com/twitter/twitter-text/issues/94.

gotcha. so maybe the regexp the code is using is incorrect, then. for example:
> twttr.txt.getTweetLength('http://bit.ly/1ckcXew');
< 22

whereas on twitter.com, pasting that same link evaluates to a length of 23 chars (117 remaining).

twitter.com's internal version of getTweetlength already changed
short_url_length to 23, I wonder why that never made it back to the open
source repo?
twttr.txt.getTweetLength = function(text, options) {
if (!options) {
options = {
// These come from
https://api.twitter.com/1/help/configuration.json
// described by
https://dev.twitter.com/docs/api/1/get/help/configuration
short_url_length: 23,
short_url_length_https: 23
};
}
You could do a pull request to change that one character from a 2 to a 3,
or you could yank some logic like this:
// Returns the length of Tweet text with consideration to t.co URL
replacement
// and chars outside the basic multilingual plane that use 2 UTF16 code
points
twttr.txt.getTweetLength = function(text, options) {
if (!options) {
options = {
// These come from
https://api.twitter.com/1/help/configuration.json
// described by
https://dev.twitter.com/docs/api/1/get/help/configuration
// All short urls are https now
short_url_length: 23
};
}
var textLength = twttr.txt.getUnicodeTextLength(text),
urlsWithIndices = twttr.txt.extractUrlsWithIndices(text);
twttr.txt.modifyIndicesFromUTF16ToUnicode(text, urlsWithIndices);
for (var i = 0; i < urlsWithIndices.length; i++) {
  // Subtract the length of the original URL
  textLength += urlsWithIndices[i].indices[0] -

urlsWithIndices[i].indices[1];
  // Add 23 characters for short URLs
  textLength += options.short_url_length;
}

return textLength;

};
And you may need to fix a unit test.
On Tue, Dec 15, 2015 at 9:06 AM, Rebecca Sliter<EMAIL_ADDRESS>wrote:

gotcha. so maybe the regexp the code is using is incorrect, then. for
example:

twttr.txt.getTweetLength('http://bit.ly/1ckcXew');< 22

whereas on twitter.com, pasting that same link evaluates to a length of
23 chars (117 remaining).
—
Reply to this email directly or view it on GitHub
https://github.com/twitter/twitter-text/issues/94#issuecomment-164828816
.

Any idea how can we can be kept in the loop to be notified when the URL length changes again?

You could use the API Changelog Twitter page to subscribe to receive documentation changes, or follow the Announcements on the Twitter Community developer forums.


Migrate from moor_flutter to moor_ffi

Hi, I've made some adoptions to use moor_ffi instead of moor_flutter on Android and iOS. As this switches moor to the develop branch which already contains breaking changes for the next major release, this PR is a bit bigger than it could have been. The relevant changes are all in mobile.dart to open the database.
I tested this on Android and Linux, the database was working fine on both platforms. I did have some rendering issues on Linux, but I don't think that moor has anything to do with that. It should work on iOS and macOS as well, but I can't verify that until Monday.
Rather unrelated question: Do you intend to keep this repository open? I would like to link it from the examples section in moor's documentation, if that's ok.

Yes i plan on always keeping this open and public! I share this with lots of people to help them get started.

Thanks for the PR. I will test on MacOS and iOS now.

Please feel free to link it!

MacOS works.

Can't get ios to work, on the latest flutter. It keeps failing on the migration even after a fresh install. I tested with the FlutterQueryExecutor and it still works.

iOS works if i comment out the top part and only run Database(VmDatabase.memory(logStatements: logStatements));

Hm weird. I ran into a similar issue earlier, but I thought that I had fixed it. Can you try flutter clean followed by flutter packages upgrade? If that doesn't work I'll look into it on Monday

Sure can, and sounds good.

Ok i had to downgrade to flutter version v1.10.3 and worked great!


v1.7 get method bug error

in Medoo.php
public function get
1579: $this->dataMap($data[ 0 ], $columns, $column_map, $result, true);
Required parameter missing

Thank, this fixed on b2d8327f5fe800b9646f683dfc7a1d6b496a370f in emergency.

Thank you for your quick response.
However, is this bug different from #851?

@webgoto Sorry for the inconvenience, this is another problem. Will fix it soon. This is really embarrassing for the new release.

Not at all. Thank you for developing and updating this very useful library.


Crash when using \?\ style path on Windows

Problem
Running a command, e.g. cargo metadata or cargo check with the --manifest-path set to equal an absolute Windows long-style path causes an error:

The filename, directory name, or volume label syntax is incorrect. (os error 123)

Steps

Create a project anywhere and note its path. Let's pretend it's C:\Path
Run a cargo command with mainfest-path set to that path as a long absolute path: cargo metadata --manifest-path \\?\C:\Path\Cargo.toml
Note the failure.

Notes
Output of cargo version: cargo 1.47.0-nightly (ab32ee88d 2020-08-10)
May be related to #7986, #7420, #7643

For some related discussion see #6198. As I understand is that the operations on \\?\ as supposed to be pretty limited. Some apis are strict to only to the "allowed" things, some try to do something useful even if it is not technically "allowed". This leads to massively inconsistent apis everywhere including in STD. Bugs can be filed for each inconsistency, but each will be a long discussion from the competing goals. So fixing all the oddities even just in Cargo is going to be a herculean task. If you are volunteering, more power to you!
This case may only have a handful of places where Cargo interacts with that path. So getting --manifest-path to work may be doable.


Properties set before constructor is called when using bindToController

Note: for support questions, please use one of these channels: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question. This repository's issues are reserved for feature requests and bug reports.

Do you want to request a feature or report a bug?

BUG

What is the current behavior?

When using bindToController properties are being set before the constructor is invoked.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:yBpEi4).

bindToController: {
    min: '@',
}

class MyController {
  private _min : number;
  constructor() {
     this._min = 0;
  }

  get min() {
    return this._min;
  }

  set min(value : number) {
     this._min = value;
  }
}

What is the expected behavior?

Constructor should be called before properties are set.

What is the motivation / use case for changing the behavior?

Behaviour in properties setters that rely on values initialized in the constructor fail.

Which version of Angular, and which browser and OS does this issue affect? Did this work in previous
versions of Angular? Please also test with the latest stable and snapshot versions.

Windows 7, TypeScript 1.8.2, chrome 49.0.2623.87, Angular 1.5.0

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix)

The constructor is called in the following lines  after the properties have been set in nodeLinkFn.
var controllerResult = controller();
if (controllerResult !== controller.instance) {
The properties setters created using Object.defineProperty are invoked even though the constructor has not yet been invoked. This is problematic if the property setters rely on values initialized in the constructor (in my case throwing exceptions).

This actually a feature not a bug :)
We are binding the properties, so you can work right away from the constructor with them.
(Note: This only works with regular functions not classes (but your TypeScript Class obviously gets transpiled to a plain old ES5 constructor function).)
Maybe you could check if _min is undefined before assigning a default value in the constructor.

With respect, I would suggest breaking the semantics of classes is a BUG and not a feature. As ECMA 6 becomes standard with property getters and setters this type of issue will become more common. It is called a "constructor" after all and controllers in all other areas of angular would have their constructors called before any other interaction (AFAIK).
I understand that it is difficult to understand how many people may be relying on this "feature" and that changing the behavior would probably have to be supported through an option for backward compatibility.
My issue was not with the constructor throwing an error, it was with the property setter assuming the state of the object was initialized and valid (the specific code is not shown in the example).

Maybe you could check if _min is undefined before assigning a default value in the constructor.

I think that would fail if you had something like this:
class MyController {
  private _min : number = 0;

  constructor() { }
}

The resulting JS automatically sets _min in the constructor function:
var MyController = (function () {
    function MyController() {
        this._min = 0;
    }
    return MyController;
}());

I appreciate people are taking time out to provide workarounds; however, I'm not really looking for a work around; to be frank, its a trivial issue to resolve and I probably shouldn't be writing Javascript if I can't workaround it:).
I'm simply here to report the bug, which I still class as a bug. An APIs success is measured on its consistency. Every special case goes against this; an effects productivity, controllers in angular everywhere else are dealt with as types (with constructors), they are not functions.

As docs says in: https://docs.angularjs.org/api/ng/service/$compile :

Deprecation warning: although bindings for non-ES6 class controllers are currently bound to this before the controller constructor is called, this use is now deprecated. Please place initialization code that relies upon bindings inside a $onInit method on the controller, instead

@drpicox Thanks for finding that; it sounds like the API is going to change in to be consistent, as you say; the only question is when?

While I agree with this idea in principle, you do also have to keep in mind that while the change is trivial, it's also potentially massively breaking for any historical code that uses assignments within the constructor; $onInit didn't exist until extremely recently.
That deprecation was introduced in 1.5, so I would expect that a breaking change of this magnitude would not be made until 1.6 or even 1.7 (Should really be in a major version, but Angular2 kinda killed that possibility it seems like without causing massive confusion).
I haven't though about this for more than 15 seconds (quite literally), but another interesting idea would be that if a controller lacks on $onInit method, then the constructor is invoked when $onInit would have been.  Both occur at roughly the same time prior to prelinking, and I'm not sure whether or not there would even be any observable side effects from that.  That could possibly allow this to be introduced in a non-breaking way.

if a controller lacks on $onInit method, then the constructor is invoked when $onInit would have been

I haven't thought about for more than 15 seconds either (quite lterally), but I think this would break the expectation that all controllers are initialized when $onInit is called.

I get a thought to this "issue", and I think that may be there is a mid-way between break compatibility or do interfere in the use some ES5 features (like getters and setters).
There are some examples in angular, that because some reason a breaking change is introduced, but there is a possible configuration that enables old/new behaviour. For example:

https://docs.angularjs.org/guide/production : $compileProvider.debugInfoEnabled(false); and {strictDi: true}
... (I cannot recall right now other examples)

So, it might be something like this would be an option:
$compileProvider.bindToControllerBeforeConstructor(false);

and change the default in later versions.

As @dpogue  points out, this behavior breaks a common pattern (default true and binding to false).
This "feature" irrevocably breaks the understanding of how constructors work.
I continue to fail to see how binding properties to an instance is a sensible operation when, by definition, the instance is in an undefined state before a constructor finishes executing. A reasonable flow would be [constructor(), bindings, $onInit].

Thanks for your feedback everyone. Here is a little more context (which will hopefully give better perspective of the situation):

A reasonable flow would be [constructor(), bindings, $onInit].

$onInit has only recently been introduced.
--

I continue to fail to see how binding properties to an instance is a sensible operation

I will make more sense if you stop thinking were we are and focus on how we got there and how get out of there :smiley:
How did we get here?

First, there were linking functions and bindings were bound on the scope when these functions were called (so developers were used to taking them for granted).
Then, we got controllers on directives and developers started using them, mostly injecting the scope and again assuming that bindings were already bound to it.
Then, came the controller as/ditch-the-scope paradigm and people started switching to it.
Short after, it became necessary to be able to bind the properties on the controller itself, instead of the scope. At that point, where no lifecycle hooks existed and people assumed they had access to the bindings (previously on scope) from inside the controller constructor, the "feature" of pre-assigning them on the controller instance before calling the contructor was an actual feature.

How do we get out of here?
There was no doubt that this "feature" came at a cost (which is highlighted more by the rise of classes, since it is not compatible with them). Nobody wanted to be there, but we didn't have anywhere to go.
(Note that the feature has been marked as deprecated for quite some time.)
Things have changed and we do now have the means to get out (thanks to controller lifecycle hooks). Still we should get out of there without breaking all these apps that are currently (reluctantly or not) relying on this "feature".
So, here is the general plan (there are still some details to figure out):

We will provide a way to opt-out of this behavior in 1.5.
We will disable the "feature" by default in 1.6, but still provide a way to opt-in.
We will remove the "feature" in 1.7.

--

this behavior breaks a common pattern

tl;dr
One supported pattern is no compensation for a ton of unhappy users. But we have a plan... :wink:

In defense of the "feature", I believe it has served as very well and we would have been in a worse situation without it - but it's time to go now :smiley:

@gkalpak Thank you so much for that write up! Having been with Angular since 0.9, I kind of decided to forget about a lot of that pain; and point #4 especially was a trap I personally never fell in to. Being reminded of it is humbling :)

This is not strictly related to ES6, but I also use ES5 Object property getter/setters that expose "private" values have a similar issue.
For this use case, it would be good if the $onInit function was called with the bindings as a parameter, rather than having them set directly on the controller after they are parsed.
Here's an excerpt:
function ThingController() {
    var _name;

    function $onInit(bindings) {
        _name = bindings.name;
    }

    controllerProperties.name = {
        get: function get() {
           return _name;
        }
    };

    controllerProperties.otherThing = {
        get: function get() {
           return "Example of something else " + _name;
        }
    };
}

With #15095 merged, our plan has been materialized. It will be possible to opt-out of bindings pre-assignment from v1.5.9 on (not yet released) and "no pre-assignment" will be the default behavior in v1.6.0 (with the ability to opt-in).

Was the option to opt-out included? There is no preAssignBindingsEnabled-function in $compileProvider in v.1.5.9?

@emillunde, we had to cut an interim 1.5.9 release that contains mostly security fixes. This feature will be included in 1.5.10 (which should be released pretty soon).

@gkalpak - Just to confirm, does this change introduced in 1.6 just delay the assignment of bindings to the controller instance, until just before $onInit is called?
Please let me know if you need me to clarify the question.

@ashclarke, exactly.

In 1.5.10+, the default behavior will be to assign before calling the constructor, but you can change it to delay until before $onInit.

In 1.6.0+ the default behavior will be to delay until before $onInit, but you can change it to assign before calling the constructor.

In 1.7.0+ it will delay until before $onInit (and you won't be able to change that).


fix: remove upper limit for required terraform version

:tada: This PR is included in version 1.11.1 :tada:
The release is available on:

GitHub release
v1.11.1

Your semantic-release bot :package::rocket:


NTP query behavior

If I specify multiple NTP hosts, when I do an NTP sync, are all of them queried or the process stops as soon as one query to one of the hosts is successful?

The update will stops as soon as one query is successful.


 It had some errors but got merged in while I was sleeping. This fixes some of the issues that were still on the PR. See #2045
It also turns out the regex can be made much nicer using unicode codepoints in the Regex, see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Unicode_Property_Escapes and https://unicode.org/reports/tr51/#Emoji_Properties

I'd fixed this with the somewhat hacky per-character validation, but this is definitely better. I was briefly worried that unicode property escapes might not be supported across all engines/runtimes (we've had issues with lookbehind assertions) but it seems to be. 👍 Thanks!

Seems that the following line now makes zod incompatible with React Native as it uses the Unicode property escape syntax, which is currently not supported by Hermes (the default React Native JS engine)
const emojiRegex = /^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u;


build: build for Apple Silicon

Use Go v1.16 which has support for Darwin/arm64.
Add arm64 arch for release.
Use goreleaser/goreleaser-action@v2
Reasoning:
When running on an M1 Mac (arm64) without Rosetta 2 installed, the following error is thrown:
__fast_alias_tips_preexec:6: bad CPU type in executable: def-matcher

@sei40kr Would it be possible to merge this?

@shaneog Hi! As a long-time user of this plugin, I've decided to create a fork which I have an intention to maintain. I've upgraded all the components and also added arm64 support. Maybe you can find this useful. https://github.com/decayofmind/zsh-fast-alias-tips