Add markAsCash button with wired up action for dismissing the rter violation

Details

Fixed Issues
$ https://github.com/Expensify/App/issues/39541

PROPOSAL:
Tests

Go to the open report  - a workspace for example
Submit an expense and retrieve its transactionId
Go to the report screen and in the console, update the onyx entries containing the mocked card that will be used for the transaction, the given transaction and the corresponding violation.

Onyx.merge('cardList', {
        1: {
            bank: 'Expensify Card',
            lastFourPAN: 3458,
        },
    });

Onyx.merge(`transactions_<transaction_id>`, {cardID: 1, merchant: 'violation test'});

Onyx.merge(`transactionViolations_<transaction_id>`, [{type: 'test', name: CONST.VIOLATIONS.RTER, data: {pendingPattern: true}}]);

The mark as cash button should appear
After pressing it the button and the violation message should disappear and there should be a response in the thread confirming that there was a conversion to cash

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

Offline tests
As the standard ones.
QA Steps

[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: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb 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 either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[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 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(theme.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 the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[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.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/45288762/d9c98017-860e-4574-903f-da6ccd5fefa3
https://github.com/Expensify/App/assets/45288762/bf66977f-62e9-4ecf-bd90-153b24b293f7

MacOS: Desktop
https://github.com/Expensify/App/assets/45288762/76f21bbe-9ed9-45ca-9ce2-d70f96a8bfbe

@BrtqKr Merge main to simplify the diff a bit!

@BrtqKr Quick bump on this! I believe all pre-requisite PRs have been merged

Oh wow.  Yep most definitely. Should look like this:

Yup, exactly!

ok, it should be fine now

I could have sworn on mobile, we show the green button above the status - does that sound correct?

For oneTransactionReports the header is MoneyReportHeader and there is no code in this header for Mark as Cash button. Is this as per design?

@dannymcclain oh boy... @puneetlath do you have a screenshot handy of what it's like to approve a report on NewDot in mobile, where you have a green button and next steps? I could have sworn the green button shows above the next steps... and if so, we should stay consistent here too.

For oneTransactionReports the header is MoneyReportHeader and there is no code in this header for Mark as Cash button. Is this as per design?

Good catch, we should totally add it here too I would think. @trjExpensify do you agree?

@puneetlath do you have a screenshot handy of what it's like to approve a report on NewDot in mobile, where you have a green button and next steps? I could have sworn the green button shows above the next steps... and if so, we should stay consistent here too.

Here ya go

@puneetlath thanks!
@shawnborton I agree we should keep the placement consistent.

@yuwenmemon  I've moved the button to the top, added it to the report header, and made it for draft only, since according to what we've discussed in here the action wouldn't go through without the isDraft flag. I believe that should be everything

Should this report action be here in the report with all transactions?

Hmm that seems weird to me. I would expect it to be in the transaction thread, not the report thread. (Like if you change the category of an expense, that system message shows up in the expense thread.) I would also expect it to have the avatar/name of the person who marked it as cash. @JmillsExpensify @shawnborton does that sound right to you?

Another question unrelated to the above, should an RBR be shown for this violation on report preview, LHN and in the transaction report (not sure which field that would be.)?

I think @JmillsExpensify would know better, but I feel like the preview should be showing an RBR/error message instead of "Unknown Merchant"... Unless of course someone set the merchant to Unknown Merchant deliberately. 😅

I agree it should be in the transaction thread. As for the avatar, I think it follows the same logic as when the same user sends multiple messages consecutively where we skip the avatar if you send a bunch of messages in a row.

Ah that makes sense. So since this is (wrongly) showing up in the report thread, it's piggy-backing off of the request message. Once we get it in the expense thread like it's supposed to be, that issue should go away. 🤞

Hmmm yeah @BrtqKr That seems to be stemming from some sort of optimistic action we're adding to the parent report because once you sign in and out, those messages disappear:
https://github.com/Expensify/App/assets/4741899/fa49db82-f579-4129-b030-404991ca6a3a

@yuwenmemon isn't it, because we're using a random id for the messaging optimistic update? Maybe Onyx isn't able to relate the success id and the random one generated in the action and we should be removing it in the successData
            // Dismiss action with a temporary id
            {
                onyxMethod: Onyx.METHOD.MERGE,
                key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${transactionThreadReportID}`,
                value: {
                    [optimisticReportAction.reportActionID]: null,
                },
            },

https://github.com/Expensify/App/assets/45288762/157ed4ae-68dd-45b7-8a2c-da1a801fcddb

@BrtqKr I don't think it's that, no. I commented on the PR on the line that I believe to be the culprit. Essentially we're passing the transaction's reportID to TransactionActions.markAsCash when we should be passing the Transaction Thread ReportID instead.

Quickly confirming that yes, this should appear in the transaction thread.

@c3024 Can you prioritize your review of this PR ASAP?

Reviewer Checklist

[ ] I have verified the author checklist is complete (all boxes are checked off).
[ ] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

[ ] I verified the steps for local testing are in the Tests section
[ ] I verified the steps for Staging and/or Production testing are in the QA steps section
[ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] 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)

[ ] I checked that screenshots or videos are included for tests on all platforms
[ ] I included screenshots or videos for tests on all platforms
[ ] I verified tests pass on all platforms & I tested again on:

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

[ ] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[ ] I verified proper code patterns were followed (see Reviewing the code)

[ ] 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).
[ ] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[ ] I verified that comments were added to code that is not self explanatory
[ ] 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.
[ ] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[ ] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[ ] 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 either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[ ] 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.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I verified that this PR follows the guidelines as stated in the Review Guidelines
[ ] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] 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
[ ] If a new component is created I verified that:

[ ] A similar component doesn't exist in the codebase
[ ] All props are defined accurately and each prop has a /** comment above it */
[ ] The file is named correctly
[ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[ ] The only data being stored in the state is data necessary for rendering and nothing else
[ ] 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)
[ ] 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)
[ ] All JSX used for rendering exists in the render method
[ ] 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

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

[ ] 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

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

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

[ ] 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.
[ ] 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)
[ ] 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.
[ ] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[ ] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[ ] I verified that all the inputs inside a form are aligned with each other.
[ ] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[ ] 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.
[ ] 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.
[ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

NAB: MoneyReportHeader props do not include transaction or transactionViolations so it does not appear to rerender immediately on Onyx.merge transaction and transactionViolations. But in actual use cases, I think backend sends more info than just transaction and transactionViolations so it should rerender immediately.
Also, MoneyReportHeader here is used only for oneTransactionReports, I think it is fine to not subscribe to these changes and avoid rerenders.

🚀 Deployed to staging by https://github.com/yuwenmemon in version: 1.4.76-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@BrtqKr Should the expense be a credit card expense? Should this be created in OldDot?


Aaron/login screen

This is a solid login screen with the most simple possible integration so far. Just want to get it merged and knock out additional features as new PRs.
This uses some stubbed login and sign up functions, and it's only displayed at the beginning of the onboard sequence (no handling of subsequently invalidated sessions yet).

don't have my head around this RN setup, but looks good to me. i don't think @andrewxhill will even open the diff, so i'll merge it


GYM WEBSITE

Hey pls assign this issue to me.
I want to add my cool gym website which have login - sign up functionality.
Gym website includes a fitness calculator where you can calculate your BMI. The calculator uses the metric system .

@heyhimansh BMI calculator project is already present in the repo. What else would you like to add in your website?


Optimizations for libff

While working on updating the staged ledger tests to use real commands and ledger I ran into some pretty serious performance issues.
Here's a profile. Decompress it and load it into https://www.speedscope.app. perf profiles are kind of weird, that's the best way of reading them I've found. Click on "sandwich" to see an ordered list of cost centers. Threads 2 and 3 are the relevant ones for our purposes.
It spends a lot of time in libffi and ctypes, we can probably avoid this by removing the indirection or using a better system for generating FFI bindings.
It also spends a lot of time in malloc_consolidate which is part of the malloc infrastructure. This is because libff::bigint::randomize is very inefficient. It opens an fd for /dev/urandom, reads the requisite number of bytes using fread and then closes the fd. Every time you call the function. fread does buffering and allocates the buffer with malloc. Speculating, that generates a lot of tiny heap objects when have to be consolidated later. It should be opening /dev/urandom once, then the buffering will be an optimization instead of pessimization.
Looking at the actual arithmetic, there might be more low hanging fruit there, though I'm less confident. Spending so much time in libff::mnt6_G1::is_zero is suspicious. Looking at the source code it's checking whether the value is zero byte-by-byte. We should be able to do it one 64 bit word at a time, at least, and maybe use vector instructions to go even wider. It also spends a bunch of time in mul_reduce but that looks like they micro-optimized it so I don't know how much we'll be able to squeeze it.

It spends a lot of time in libffi and ctypes, we can probably avoid this by removing the indirection or using a better system for generating FFI bindings.

I've been thinking of doing this for a while; will bump it up my priorities list and have a crack at it tomorrow.

It also spends a lot of time in malloc_consolidate

Also speculating, but I think a big part of that may be that all of the libsnark allocations in snarky go through C++'s new and delete. I can't see load the profile on my phone to make a judgement call, but if it seems worth it, I'm happy to rewrite the libsnark bindings to use the OCaml heap.

Spending so much time in libff::mnt6_G1::is_zero is suspicious.

I'm cautiously optimistic that compiling libsnark with the PERFORMANCE flag enabled will help with this. It's not turned on because it greatly increases compile times, but for the testnet release we definitely should have it on, and we should probably get some profiling info based on it before then.

We're no longer using libff, and the equivalent to the proposed changes has been done for the rust backend. Closing.

We're no longer using libff, and the equivalent to the proposed changes has been done for the rust backend. Closing.


You stumbled upon a bug in vite-plugin-ssr's source code :)

Description
Could reproduce only with Firefox 15.0.5, Macbook M1
Error Message + Error Stack
Uncaught (in promise) Error<EMAIL_ADDRESS>You stumbled upon a bug in vite-plugin-ssr's source code. Reach out at https://github.com/brillout/vite-plugin-ssr/issues/new or https://discord.com/invite/qTq92FQzKb and include this error stack (the error stack is usually enough to fix the problem). A maintainer will fix the bug (usually under 24 hours). Don't hesitate to reach out as it makes vite-plugin-ssr more robust.
    createErrorWithCleanStackTrace http://localhost:3000/node_modules/vite-plugin-ssr/dist/esm/utils/createErrorWithCleanStackTrace.js?v=dd4f39c2:7
    assert http://localhost:3000/node_modules/vite-plugin-ssr/dist/esm/utils/assert.js?v=dd4f39c2:27
    getPageContextSerializedInHtml http://localhost:3000/node_modules/vite-plugin-ssr/dist/esm/client/getPageContextSerializedInHtml.js?v=dd4f39c2:7
    getPageContext http://localhost:3000/node_modules/vite-plugin-ssr/dist/esm/client/getPageContext.js?v=dd4f39c2:9
    hydrate http://localhost:3000/@fs/Users/antonperaviortau/WebstormProjects/JobillaFormViewer/node_modules/vite-plugin-ssr/dist/esm/client/entry.js:11
    <anonymous> http://localhost:3000/@fs/Users/antonperaviortau/WebstormProjects/JobillaFormViewer/node_modules/vite-plugin-ssr/dist/esm/client/entry.js:8
createErrorWithCleanStackTrace.js:7:15
    hydrate http://localhost:3000/@fs/Users/antonperaviortau/WebstormProjects/JobillaFormViewer/node_modules/vite-plugin-ssr/dist/esm/client/entry.js:16
    AsyncFunctionThrow self-hosted:814
    (Async: async)
    <anonymous> http://localhost:3000/@fs/Users/antonperaviortau/WebstormProjects/JobillaFormViewer/node_modules/vite-plugin-ssr/dist/esm/client/entry.js:8

Update to the latest VPS version and try again. I'll re-open the ticket if the error persists.


lstm.py IndexError when encoder_layers is NOT EQUAL to decoder_layers

FILE: fairseq/models/lstm.py
IndexError occurs in each of the following lines 365 and 366 when  encoder_layers is NOT EQUAL to decoder_layers:
           prev_hiddens = [encoder_hiddens[i] for i in range(num_layers)]
           prev_cells = [encoder_cells[i] for i in range(num_layers)]
It seems to make sense that encoder_layers must be EQUAL to decoder_layers because the hidden and cell states of the encoder LSTM are written into the hidden and cell states of the decoder LSTM.
A solution is to combine encoder_layers and decoder_layers into encoder_decoder_layers. Then the LSTMs of encoder and decoder will always have the same number of layers.

Just going with an assert for now, since it's easier to remove if we later add support for non-matching numbers of layers.


Flag str.replace as possible sql injection

This extends the existing implementation for detecting possible cases of SQL injection to account for str.replace used in the string construction.
Use of str.replace can lead to SQL injection in much the same way as str.format can, and that is already considered in the pre-existing implementation, along with other common string constructions.
Resolves #878

While this can happen, I don't believe it's nearly as common as format or % formatting and can potentially lead to a higher rate of false positives. This check should have a lower confidence if we accept it

Switched to LOW confidence to compensate for possibly higher rate of false positives.


how to set guifont

set guifont=* not active

i find a bug.  if init.vim with source other vim file. VVset in the setting will not work currently

Yes, set guifont is not working now. You can use VVset fontfamily and VVset fontsize to set font. Will support guifont in upcoming updates.
Regarding sourced files, that's weird. It does work with sourced files. Does it work if you run VVset when VV was started? Please try :VVset fu when everything loaded. Will try with your dotfiles tomorrow.

Checked with your dotfiles and it works for me. Added ~/.aix/.vv.vim with
if exists('g:vv')
  VVset fontsize=24
endif

Can you provide a minimum example to reproduce?

Made set guifont work. Closing this for now, please reopen or make separate issue if you still have problems with sourcing config with VVset.


AsyncStream is closed with streaming mode active

Hi I noticed that the parser would stop parsing more json thinking it reached the end of the file.
My code is using the example
        let feeder = AsyncBufReaderJsonFeeder::new(BufReader::new(reader));
        let parser = JsonParser::new_with_options(
            feeder,
            JsonParserOptionsBuilder::default()
                .with_streaming(true) // this enables our weird json stream usecase
                .build(),
        );

My use case is listening on a UDS for json events to come in, but currently it seems to shutdown the parser after receiving a full message. I suspect because the BufReader is empty waiting for more data. I fixed the issue by adding the following && self.streaming == false in the parser.rs file.
I don't know if this is the correct approach to fixing this issue?
in parser.rs : 339
if self.feeder.is_done() -> if self.feeder.is_done() && self.streaming == false

I tried to write a test that reproduces this issue but did not succeed.
#[tokio::test]
async fn parse_from_stream() {
    let dir = tempfile::tempdir().unwrap();
    let path = dir.path().join("parse_from_stream");
    let (tx, mut rx) = mpsc::unbounded_channel();

    let t = tokio::spawn(async move {
        let listener = UnixListener::bind(&path).unwrap();
        tx.send(path.to_string_lossy().to_string()).unwrap();

        if let Ok((socket, _)) = listener.accept().await {
            let reader = BufReader::new(socket);
            let feeder = AsyncBufReaderJsonFeeder::new(reader);
            let mut parser = JsonParser::new_with_options(
                feeder,
                JsonParserOptionsBuilder::default()
                    .with_streaming(true)
                    .build(),
            );
            let mut prettyprinter = PrettyPrinter::new();

            while let Some(e) = parser.next_event().unwrap() {
                if e == JsonEvent::NeedMoreInput {
                    parser.feeder.fill_buf().await.unwrap();
                }
                prettyprinter.on_event(e, &parser).unwrap();
                if e == JsonEvent::EndObject {
                    tx.send(prettyprinter.get_result().to_string()).unwrap();
                    prettyprinter = PrettyPrinter::new();
                }
            }
        }
    });

    let path = rx.recv().await.unwrap();
    let mut client = UnixStream::connect(path).await.unwrap();

    tokio::time::sleep(tokio::time::Duration::from_secs(1)).await;

    client.write_all(br#"{"name"#).await.unwrap();

    tokio::time::sleep(tokio::time::Duration::from_secs(1)).await;

    client.write_all(br#"": "Elvis"}"#).await.unwrap();

    let pretty_obj = rx.recv().await.unwrap();
    println!("{}", pretty_obj);

    client.write_all(br#"{"name": "Max"}"#).await.unwrap();

    let pretty_obj2 = rx.recv().await.unwrap();
    println!("{}", pretty_obj2);

    drop(client);

    t.await.unwrap();
}

Can you elaborate on the difference between your code and this test? Maybe you can provide a reproducer that demonstrates your issue? This would help a lot. Thanks!

The problem is not the parser but the feeder. AsyncBufReaderJsonFeeder#isDone() returns true as soon as the underlying BufReader has reached the end of file, which is usually indicated by returning an empty buffer. I guess in your case, your stream can return an empty buffer even though more data will follow.
The easiest way to deal with this is to implement a custom JsonFeeder whose isDone() method never returns true. You could even write a small wrapper like so:
pub struct StreamingFeeder<T>
where
    T: AsyncRead + Unpin,
{
    delegate: AsyncBufReaderJsonFeeder<T>,
}

impl<T> StreamingFeeder<T>
where
    T: AsyncRead + Unpin,
{
    pub fn new(delegate: AsyncBufReaderJsonFeeder<T>) -> Self {
        StreamingFeeder { delegate }
    }

    pub async fn fill_buf(&mut self) -> Result<(), FillError> {
        self.delegate.fill_buf().await
    }
}

impl<T> JsonFeeder for StreamingFeeder<T>
where
    T: AsyncRead + Unpin,
{
    fn has_input(&self) -> bool {
        self.delegate.has_input()
    }

    fn is_done(&self) -> bool {
        // THIS FEEDER IS NEVER DONE!
        false
    }

    fn next_input(&mut self) -> Option<u8> {
        self.delegate.next_input()
    }
}

The problem is not the parser but the feeder. AsyncBufReaderJsonFeeder#isDone() returns true as soon as the underlying BufReader has reached the end of file, which is usually indicated by returning an empty buffer. I guess in your case, your stream can return an empty buffer even though more data will follow.
The easiest way to deal with this is to implement a custom JsonFeeder whose isDone() method never returns true. You could even write a small wrapper like so:
pub struct StreamingFeeder<T>
where
    T: AsyncRead + Unpin,
{
    delegate: AsyncBufReaderJsonFeeder<T>,
}

impl<T> StreamingFeeder<T>
where
    T: AsyncRead + Unpin,
{
    pub fn new(delegate: AsyncBufReaderJsonFeeder<T>) -> Self {
        StreamingFeeder { delegate }
    }

    pub async fn fill_buf(&mut self) -> Result<(), FillError> {
        self.delegate.fill_buf().await
    }
}

impl<T> JsonFeeder for StreamingFeeder<T>
where
    T: AsyncRead + Unpin,
{
    fn has_input(&self) -> bool {
        self.delegate.has_input()
    }

    fn is_done(&self) -> bool {
        // THIS FEEDER IS NEVER DONE!
        false
    }

    fn next_input(&mut self) -> Option<u8> {
        self.delegate.next_input()
    }
}

ill try this out thanks

I appreciate your offer, but I'm not sure if including such a feeder wouldn't confuse people more than it would help. The term streaming is ambiguous: Actson understands it as reading multiple JSON documents from a stream without keeping the whole data in memory. However, the stream is expected to end eventually. In your case, streaming means waiting for data to arrive, parsing it, and then waiting for more data. Your stream is infinite. This requires, in my opinion, a custom (i.e. specific to your use case) feeder implementation.
Having said that, if other people reading this in the future have similar requirements, don't hesitate to comment here!


Removes httpvar config for collector sample rate

This removes the POST http config for the adaptive sample rate, after
noticing ancient comments suggest this wasn't used.
This also refactors the AdaptiveSampler code until it has consistent
names and is testable.
See https://github.com/openzipkin/zipkin-java/issues/52#issuecomment-167402624
See https://github.com/openzipkin/zipkin/pull/327/files#r9215131

Does this approach only work in deployments with a single collector process, i.e. it's not scalable to multiple collectors?

Does this approach only work in deployments with a single collector
process, i.e. it's not scalable to multiple collectors?

I presume your question is about the adaptive sampler module in general,
since this change doesn't impact the topic.
The adaptive sampler works on multiple collectors as a leader is elected to
manage updates to the sampleRate based on the storeRate of each member. Ex.
There is code to review store rates under a zookeeper path and then
calculate what the sample rate should be.
Next step is to add a test that proves this actually works ;) that said,
this code is used at Twitter with a dozen collector instances (or was half
a year ago), so I suspect it does.

releasing as 1.28.0


Pass document by reference.

I think it makes more sense to pass a reference to the document when adding to the index as it is only a reference that is passed to the extraction function for each field.
Also I have a use case where I need to store the original documents and this prevents an unnecessary clone when adding to the index.
Thanks 🙏

Thanks for the PR!
This looks good. Not sure why I passed documents by value in the first place when creating this.
Before merging:

Could you make sure that the cargo fmt check works as expected? See the failing pipeline step.

Could you make sure cargo bench works? There is a compile error in test_benchmark.rs

Sure @marcus-pousette, those are fixed now 👍

Technically this is a breaking change, do you want to bump the major version, maybe 2.0.0-alpha-1?

A major version bump sounds good. Especially if we could have the improvements in the Filter and Tokenizer as you mentioned.
Additional things:

I realized the readme has to be changed with this PR  See the example where add_document_to_index is invoked. Should be reference now on the document in stead of values.

cargo clippy is complaining, see failiing pipeline

If you are motivated to make the Tokenizer, and Filter update, feel free to include those in this PR or in another PR

Thanks @marcus-pousette, lets see if we can get the Tokenizer and Filter changes into this PR while I am at it, should get to it in the next day or so 👍

@marcus-pousette, I think this is good now, please review 👍
The benchmarks show a little performance improvement 😁

Good catch @marcus-pousette , I have updated with those changes 👍

Well done! Thanks 👍


Add a Monokai colorscheme

This pull request adds a Monokai colorscheme to micro. It has a -tc suffix since it requires MICRO_TRUECOLOR=1.

This one may not even need a -tc suffix because the 256 color approximation looks almost perfect. But I think it's best to leave it for now.

I think it might actually be a good idea to ship with this colorscheme as the default one because it looks good on 256 color terminals as well. The current default colorscheme looks pretty bad if you have a simple black on white terminal palette.


Control commands in reply to status telemetry

In JB protocol, every telemetry message should result in a reply from the server telling the box what its status should be - containing the running current limit (amps, or 0 if it's a Time-of-Use "off" period or you otherwise want to stop charging), as well as the current day-of-week/time-of-day and a few other parameters. In a quick review of the code, I only saw it parsing and ingesting telemetry messages, but didn't see anything (I may have missed it) to trigger/formulate a response.
I think there may be some refactoring needed to fully implement both sides of the protocol - in particular, to implement scheduling. This may be as simple as an interface through which to tell juicepassproxy to "enable" or "disable" charging (and persist it for runtime), as well as an interface to control amperage - or simply make that one control command (as it truly is in the protocol - amps=0 to disable, or amps>=6 to enable). Then it can be scheduled using Home Assistant automations/schedules, for example.
Everything else, e.g. storing energy/charging history, debug messages, plug state, etc., ends up being "passively" handled by HA's existing database and interfaces, I think which puts this really close to being a reality. Would be curious to know how HA handles periodic debug messages as strings, though.
Note that commands are also allowed asynchronously - i.e. you can send a "CMD" string without having received a telemetry message to reply to - it's perfectly OK and the box will accept/respond with another telemetry string.

right now the proxy is a complete passthrough, man-in-the-middle style, but there's no reason that messages traveling in either direction couldn't be intercepted, augmented, stopped, or replied to using the current implementation, in remote_data_handler for incoming messages and local_data_handler for outgoing messages.
the missing piece is just using pyproxy to manifest messages directly to the device masquerading as the server (ala what remote_data_handler does by simply allowing the data to pass through without augmentation

Aye, the local server system is made a bit weirder by the usage of UDP instead of TCP. Since it's stateless, you can simply synthesize new packets and send it in reply to the src port, which is random for each "connection" or session. Have to remember the src port to send replies or asynchronous messages.
So, illustrated,
JuiceBox --[src=port 24341 (random), dst=8042]--> Server [src=port 24341, dst=8042]
Server [src=8042, dst=24341] -> JuiceBox [src=8042, dst=24341]
I think, just from memory. Might need some Wireshark love on that one.
Anyway, was hoping juicepassproxy could transform into being completely independent, allowing us to choose whether or not we even want to pass data along to Enel's app ;) Especially as it gets phased out over time, inevitably. Old boxes speaking an older protocol are already left in limbo, which could be supported by a local instance, so that's a thing worth fighting for :)

After the async rewrite wich made more "easy" to send data to the juicebox I had made first implementation in #69
Only send command to juicebox when a change is requested on the currents.
But now we can make more tests and see what is the best behaviour to be implemented.

Referenced from #77
Please post further comments there.


How will the Promise's onFulfilled handlers be implemented to be postponed until no script code is on the stack?

Hi,
I noticed you have started working on Promises, but did not yet implement handling the onFulfilled and onRejected handlers.
After reading through the Promises/A+ specification, I realized that these handlers are not invoked recursively, but instead postponed until no other script function is currently on the stack (which makes sense to avoid a StackOverflow when converting a loop to use promises).
For example. if you run:
console.log("1. Before resolve");
Promise.resolve(123).then(function() {
  console.log("2. Inside onResolved handler");
});
console.log("3. After resolve");

then the program prints:
1. Before resolve
3. After resolve
2. Inside onResolved handler

Do you have a thought of how to implement this so that the onFulfilled and onRejected handler's execution is postponed until no further script function is on the stack?
My thought was to have the ScriptEngine declaring a list of FunctionInstances that are to be invoked later, and a boolean that specifies if a function of this script engine is already on the stack:
internal bool ScriptIsExecuting { get; set; }

internal List<FunctionInstance> ExecutionContextFunctionBuffer { get; } =
    new List<FunctionInstance>();

Then, maybe the FunctionInstance's CallLateBound() method could be changed to be not abstract but instead call an abstract CallLateBoundCore() function (and subclasses override the latter one instead of CallLateBound()), and the CallLateBound() can check if it needs to call the buffered function instances:
public object CallLateBound(object thisObject, params object[] argumentValues)
{
    bool firstExecution = !Engine.ScriptIsExecuting;
    if (firstExecution)
        Engine.ScriptIsExecuting = true;

    try
    {
        var returnValue = CallLateBoundCore(thisObject, argumentValues);

        // Check if we are the first script function on the stack from this script engine
        // and we need to call buffered functions.
        if (firstExecution)
        {
            while (Engine.ExecutionContextFunctionBuffer.Count > 0)
            {
                List<FunctionInstance> copy =
                    new List<FunctionInstance>(Engine.ExecutionContextFunctionBuffer);
                Engine.ExecutionContextFunctionBuffer.Clear();

                foreach (var func in copy)
                    func.Call(Null.Value); // TODO

            }
        }

        return returnValue;
    }
    finally
    {
        if (firstExecution)
            Engine.ScriptIsExecuting = false;
    }
}

This way it would be ensured that if functions from multiple ScriptEngines are on the stack, the first function of each ScriptEngine on the stack will call the buffered FunctionInstances (this is currently how I do it in my code with a ES6-Promises Polyfill).
However, one issue is how to handle exceptions when FunctionInstances are buffered. For example, if you run this in Chrome:
Promise.resolve(123).then(function() {
  console.log("Inside onResolved handler");
});
throw new Error("My Error");

it will print on the console:
Inside onResolved handler
Uncaught Error: My Error(…)

So it will still call the onFulfilled handler and then throw the exception. This could be implemented by catching exceptions in the CallLateBound e.g. with ExceptionDispatchInfo.Capture(ex) to preserve the StackTrace when rethrowing it later, then running the buffered FunctionInstances and then rethrowing the exception. (I think the FunctionInstances shouldn't be run in a finally block as it marks a protected region of code and cannot be aborted with Thread.Abort()).
Thanks!

I was thinking that promise execution would happen at the ScriptEngine level, i.e. at the end of a Execute, Evaluate or ExecuteFile.  That avoids any problems with reentrancy and should be faster too (FunctionInstance.Call/CallLateBound is called a lot).

Hi,
In my case, I have used a Promise polyfill. It relies on javascript methods "setImmediate" (or "setTimeout" with value of 0). But the function are evaluated in an other sequence. With your sample, instead of having "1 3 2" you would have "1 2 3", and the "then" functions are executed on the next loop iteration.
So to use Promise (and other stuff), I have done my own execution loop. First script execution executes the full script, and "while I have pending functions in the stack, tries to execute it". By "try to execute", I mean that a pending promise not resolved is stacked, but not executable (so kept on stack).
In the same maner, I have "setTimeout" and "cancelTimeout" (no need for setInterval yet).
This way, I expose Promises to do threaded operations (WinForms long initialization with UI libs, file loading...) and then, the promise "resolve" is called from other thread, but the "then" functions are called in main loop.
It is not the best solution, but we can say it works like in browsers.

Hi @paulbartrum,
thanks for your reply!
Running the scheduled Promise handlers at the ScriptEngine level is also what I first thought. However, when I want to run callbacks on the script later (after Execute has finished), I use the FunctionInstance supplied by the script code and then simply use FunctionInstance.Call(...). But in this case, the promise handlers would still need to be called once this Call returns if this FunctionInstance resolves a promise.
(To clarify, before I run the Script code with ScriptEngine.Execute(...), I set a global object with .NET methods where the Script can register events by supplying a callback, and the .NET method takes a FunctionInstance as parameter, which I save and then later .Call() to call back the script's handler. Is this the correct way?)
@MaitreDede Thanks! In our application we also provide e.g. a setInterval method to call back a FunctionInstance in a regular interval, and also to register for some internal events that can occur on any time. We also plan to provide an API that uses a Promise for long-running operations (e.g. reading a file), where we store the PromiseInstance internal and later call its resolve method, which then should call back the onFulfilled handlers. (The Callbacks will be called from a different thread than the one which called ScriptEngine.Execute(), but we ensure through locking that only one thread at a time calls a script function.
Thank you!


[BUG] autoSize fails when the range is above Z

Prerequisites

[x] Able to reproduce the behaviour outside of your code, the problem is isolated to Laravel Excel.
[x] Checked that your issue isn't already filed.
[x] Checked if no PR was submitted that fixes this problem.

Versions

PHP version: 7.1.16
Laravel version: 5.5.40
Package version: 3.0.3

Description
When we use autoSize() method on a sheet that has more than 26 ('Z') columns, it fails and only resize the first column 'A'.
Steps to Reproduce
This is the actual method :
public function autoSize()
{
    foreach (range('A', $this->worksheet->getHighestDataColumn()) as $col) {
        $this->worksheet->getColumnDimension($col)->setAutoSize(true);
    }
}

When we have 52 columns, getHighestDataColumn() will return the column index as 'AZ'. The foreach will stops at 'A'
Expected behavior:
foreach(range('A', 'AD') as $col) { echo $col;}
'ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACAD'
Actual behavior:
foreach(range('A', 'AD') as $col) { echo $col;}
'A'
Additional Information
Here's a quick fix I did, inspired from https://stackoverflow.com/a/14278795/8068675
/**
 * @return void
 */
public function autoSize()
{

    $letters = [];
    $letter = 'A';
    while ($letter !== $this->worksheet->getHighestDataColumn()) {
        $letters[] = $letter++;
    }
    $letters[] = $letter++;

    foreach ($letters as $col) {
        $this->worksheet->getColumnDimension($col)->setAutoSize(true);
    }
}

Can you please submit a PR for this, thanks.

Fix in 3.04 (https://github.com/Maatwebsite/Laravel-Excel/releases/tag/3.0.4).
Please considering submitting a PR in the future if you have a fix. Makes things move faster!

Question :) In the latest version of Excel for macOS, I don't know for Windows but I have the same problem. Now is not a letters but a numbers. You can see in the picture :)


Register

@JuliaRegistrator register

Registration pull request created: JuliaRegistries/General/79690
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" 844e90896d170a7bf88693585f47f44e1e14cf41
git push origin v0.1.0


Create docker container

Could be handy https://learn.microsoft.com/en-us/dotnet/core/docker/build-container?tabs=windows.


Implement new directive for performance profiling

Summary
I think we need to add some hooks for the rule.
Basic example
Not yet.
Motivation
If we have some hooks of the rule, we can add some custom behaviors before and after rule execution. For example, collect the execution time of each rule(because our system performance requirements are high, it is necessary to do some observable work).

@fzipi was motivated with this last year, I think we should think about a profiling engine for Coraza capable of creating a detailed report of the performance of the rule. There might be a way to attach ourselves to the profiling API and hook some "tags" https://pkg.go.dev/runtime/pprof

Sounds awesome!
Maybe makes sense also to have a SecProfilingEngine <On|Off>?

It sounds consistent with other directives like SecAuditEngine and SecRuleEngine.

This is still happening.


Zingo sync transparent with get taddress txids

following PR will send the locators in the scan tasks to fetch and scan transparent bundles of relevant txs.
there is a TODO for implementing memo encoded address ids also

CI fail


Firefox vs. Chrome

When I use normalize.min.css v8.0.1 as my only css file for fairly ordinary HTML, I get different renderings for Firefox vs. Chrome.
Here are the differences:
font face (Arial vs. Times New Roman, I'm guessing), font size (possibly), and definitely overall zoom factor.
Also, both show an extra top margin, although no margin at left. I looked at elements with dev tools, and cannot find any correction by normalize for the initial top margin. When I experiment with dev tools, I find that the rule "margin-top:-1.4rem" works perfectly to remove the top margin in FF.
Normalize is a great idea, and I appreciate all your work, but I'm not seeing it working as expected on my Windows 10 Home 64 computer.

I just tried reset.min.css 2.3.0, which has the goal of removing all default styles. It did remove the top margin, but the type faces and sizes are still different. I'm not sure about whether it corrects the overall value of "zoom".
So I'm left with an important question: will all users have the same results, or is this due to some configuration of my development computer?

Here are my additional normalizing fixes, added after normalize.min.css:
/* Fix differences: FF/CH */
body {zoom: .7;font-family: Arial,Helvetica,sans-serif;margin-left: 4rem;margin-top: 3.2rem;}

The result is an error in just one or two pixels in visually comparing the page rendered in FF and CH. But I don't know what other users will see!

line-height should be unitless?  you don't want 1rem (16px possibly) for line-height if you end up with 24px font-size on a heading element with font-size:1.5rem, do you?  just something i noticed at the link you provided, they're using rem unit for line-height.
why the zoom:.7?  when i disabled that rule firefox and chrome on windows look the same:
https://codepen.io/sean1138/pen/BarQYwa

On my computer these two Pens are very different: the Chrome one is way larger!
How can this happen? Aren't browsers the same from computer to computer?

You might have a setting on Chrome (or an OS setting of the of the browsers are ignoring) that is changing things around on you.

Both settings (font size, page zoom) were set to default. When I change page zoom to 75%, Chrome is only slightly larger than Firefox. I have my Windows OS set to 125% zoom, but I did an experiment, setting it to 100%, and it made no difference in the size rendered by the two browsers. A puzzle. But I can leave the Chrome scaling at 75% and it almost works for me. Too bad Chrome doesn't support 70% scaling. I wonder if others have this same problem.


Update to the docs.brew.sh list with a link to basic commands as the first item

On http://docs.brew.sh/, the first list is:
Users

Troubleshooting
Installation
Frequently Asked Questions
Common Issues

It would be great for onboarding if the very first item was Commands that would like to a page that summarized each brew command, somewhat of a "cheat sheet" style.  The current list implies initial familiarity, w/o clear "getting started" direction.
Thx for considering!

yes I second that, I now got used to brew, mostly, not an expert but it took more than a month
something like a proper command summary would be good because there are also some less documented commands available that are helpful nevertheless like the usage of leaves.
or the confusion about brew cask upgrade prior to it's proper implementation
for day to day use something like a best-practice would be ideal as well
more info/ a nice article about the whole idea of symlinking vs keg only, about the structure of the cellar and just an overview about how homebrew operates, I miss(ed) that.
This would go along nicely with the release of brew cask upgrade as this will make the whole system much more user-friendly 🙉
I'd happily participate in reading through this and at least I can tell if this is something a "normal" user might be able ti understand 😆
overall this is an amazing tool that I think not only developers should use

Please make a pull-request.

What’s wrong with man brew? If you already have a working installation of Homebrew (which that other list does not assume you do), a Commands section will only repeat the manual, basically making extra overhead and more places to forget to update.

don't want to hijack @benjaminapetersen topic but my first/ biggest issue was that one does not one how homebrew operates

more info/ a nice article about the whole idea of symlinking vs keg only, about the structure of the cellar and just an overview about how homebrew operates, I miss(ed) that.

IMO one does not only need to know what the outcome of a command is, but also understand how the commands modify data/folders/programms especially in a program like homebrew which offers more options than a simple/ encapsulated MacAppStore

@vitorgalvao user experience, onboarding, etc.  Easier to maintain w/o nice docs I won't debate, but def great for community, new users, etc. to keep a nice set of online docs as friendly as possible.

@benjaminapetersen In that case, a link to the markdown manual page should suffice (or parsing that automatically to make the webpage you mention).

@benjaminapetersen Parsing the manual page automatically into said webpage might be the best solution.

Parsing the manual page automatically into said webpage might be the best solution.

This was done and is live on http://docs.brew.sh.

Great start!  This is def a move in the right direction.  I think there might be a couple bugs & small tweaks that could improve the page.

I noticed some leaked <var>formula</var> tags in the markup, i think parsing the man page didn't quite process everything:

vs

The style sheet might need some tweaks, or adjust the generated markup slightly.  For example, the explanation text is larger than the command itself:

That is difficult to parse, but even just tweaking the font-sizes could be clearer (big difference scrolling a long page of this pattern):

Even matching the same indentation hierarchy as the man brew output could improve the readability/usability:

The words Print, Pass and See line up vertically on the command line, giving hierarchy that is a bit broken on the web page.

Is it preferred to open this as a follow-on?
Thanks again.

@benjaminapetersen We'll accept pull requests to improve the formatting. I don't plan to work on it myself.

Awesome, I'm happy to help.  Let me see what I can do.

If there is anything important to running/building the docs, let me know, otherwise I'll checkout the contributing section in the README.md & see if I can get it running. thx

Is not 100% clear how to build & run the docs locally.  Any chance to get an extra stanza in the CONTRIBUTING doc?  Seems to be Jekyll.  Got a bit into it before pausing to check if anyone has some info handy.

@benjaminapetersen cd docs and then it's a typical pages site (bundle install && jekyll serve)

Great, thanks!


Fix bug on robbyrussell theme face

fix  robbyrussell theme PROMPT when in a git repo. When under a git repo, there were only one space left where other case two spaces.

While you're in there, it looks like there's an extra % in the prompt string.
PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'

That lone % before the final %{$reset_color%} might be a mistake. %s in prompts are for escape sequences, so it's probably being interpreted as a ``% '(%-space), which isn't a valid escape sequence, and is producing no output. If it's intended to show up as a literal%in the prompt, it needs to be escaped as%%`. Otherwise, it and the following space could probably be removed. Its presence may be making it harder to figure out what the right spacing in the theme should be.

Fixed on 20b8b6c and 3d522ff.


add watch and unwatch

https://developer.github.com/v3/activity/watching/#watch-a-repository-legacy
Watch a repository (LEGACY)
Stop watching a repository (LEGACY)

I signed it!

the git commit email is the other one of mine, What should I do？

Are there newer replacements available for those legacy endpoints?

does func  SetRepositorySubscription can replace it? But I think it is not intuitive.

I think so, yes.
From https://developer.github.com/v3/activity/watching/#set-a-repository-subscription:

If you would like to watch a repository, set subscribed to true. If you would like to ignore notifications made within a repository, set ignored to true. If you would like to stop watching a repository, delete the repository's subscription completely.

That seems very reasonable to me. What about it do you find unintuitive?
Or are you referring to the documentation of SetRepositorySubscription in go-github? If so, perhaps we should improve its documentation to be as clear as the GitHub API docs are.
I think we should avoid adding legacy/deprecated endpoints to go-github, if they're not neccessary (because a better replacement exists) and if they didn't already exist.

yeah, you are right. Before, I don't know how to set the subscription.  So I wrote watch and unwatch according to API.
thanks!

I think it'd be useful to include the text inside blue boxes in go-github documentation. Would you like to make a PR that adds these short paragraphs?

I'll close this PR because we've come to conclusion that these legacy GitHub API endpoints are not needed, but instead we should improve go-github documentation of SetRepositorySubscription to mention they can be used to watch/unwatch repos.
I've opened issue #477 to track that. Closing this. Thanks @qianlnk.


fix for dropped changesets elements

fixes https://github.com/developmentseed/planet-stream/issues/16
I tracked down what is happening here. The data elements are saved as an empty array. If opts.limits is set, the 1 changeset is "split" into 0 changesets because it maps using the elements.
Part of the confusion is probably that Ramda .has() returns true for an empty array  http://goo.gl/xqLZ0Z

resubmitting this PR because I accidentally sent it from master... don't want to forget and attach additional commits


Use firefly-signer library and allow numbers expressed as strings

This PR introduces firefly-signer's ABI parsing functions and uses them in FireFly's ABI -> FFI generation code. It also replaces any existing ABI data structures that were originally copied over from Ethconnect, with those of firefly-signer.
This PR also makes some enhancements to the ABI -> FFI generation code itself to allow numbers to be expressed in a JSON string or a JSON number. This is reflected in the generated OpenAPI Spec for custom contracts, including a description in the Swagger UI that describes this.

Codecov Report

Merging #837 (e7b99a9) into main (6ad84ee) will not change coverage.
The diff coverage is 100.00%.

:exclamation: Current head e7b99a9 differs from pull request most recent head 166272b. Consider uploading reports for the commit 166272b to get more accurate results

@@            Coverage Diff            @@
##              main      #837   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files          301       301
  Lines        19718     19797   +79
=========================================
+ Hits         19718     19797   +79

Impacted Files
Coverage Δ

pkg/core/ffi.go
100.00% <ø> (ø)

internal/blockchain/ethereum/ethereum.go
100.00% <100.00%> (ø)

internal/blockchain/ethereum/eventstream.go
100.00% <100.00%> (ø)

...nternal/blockchain/ethereum/ffi_param_validator.go
100.00% <100.00%> (ø)

pkg/core/ffi_param_validator.go
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

Just realized there are some major merge conflicts here, including some changes that actually need to go into firefly-common. I'll sort those before requesting a re-review.


Rename histogram buckets to bins

This PR shouldn't be merged and release until https://github.com/influxdata/flux/pull/282 is released. This should go out with the next release of InfluxDB (v1.7.1).

+1


Fix compatibility on JDK 15 and 16

relates to https://github.com/ronmamo/reflections/pull/308

fixed on 0.10.1
thanks @astubbs , I've merged one of your PRs and discarding the other two as they've already merged in 0.10.1


What's the use of the method checkAddWithMethodSignature in class SubscriberMethodFinder

I am confused about the method checkAddWithMethodSignature.I really think it useless.

Merging this with #299. Closing.


Setting base_path updates served spec

Fixes #692
This is very much a WIP, I just wanted to push it to show approximately what needs to be done (for the sake of discussion).
Sorry for the low quality PR.

note to self: add a unit test to prevent regressions

👍


chore: remove an unused congr lemma

This removes a congr lemma which is unused in Mathlib, and on Lean master can trigger exponential behaviour. (edit: in fact, the remaining congr lemma here still triggers exponential behaviour, just with a smaller exponent than with both) Seems safest to just get it out of the way, and I'll separately report the linear --> exponential change on master, as it may affect other congr lemmas which are harder to simply remove.

bors merge


Refactor MachineTypes handling

This got a bit larger than expected, broken down into small commits for easier review. The main changes:

Introduce a new MachineTypeList type
Break down the logic into smaller functions
Filter out machine types that are not available in the selected region

resolves https://issues.redhat.com/browse/SDA-4097

@pvasant PTAL

@tbrisker One thing I dont understand is why is it needed only in rosa cli?  If we need to display the machines based on the region then I would think we need to implement this logic in CS as inquiries endpoint that way we can access it in both rosa cli, OCM cli and UI. @vkareh  wdyt?

@pvasant that's a fair concern, and I agree long-term we should also have this or similar logic on the back-end.
Right now the MachineTypeList endpoint does not have any logic inside it regarding regions, only returns what is in the DB. I tried to minimize the changes needed to get a resolution of the issue first, as otherwise we would likely need to modify the backend, api, sdk and both clis to get the full fix (i.e. also listing only the available types, not just erroring out with a nicer message).

@tbrisker  Can you please create a new jira and attach it with this one. I m ok with code changes and we can merge this one. Thanks.

thanks @pvasant, created SDA-5560 for this

/lgtm


Find a way to override 'X-Powered-By' header

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

@danielroe
Maybe you will be able to help here :)

This is set here: https://github.com/nuxt/framework/blob/cfaa46201ac284ea4bd2d8f8ba35d48d82156276/packages/nuxt/src/core/runtime/nitro/renderer.ts#L248-L256
It can be overridden in the render:response nitro hook: https://github.com/unjs/nitropack/blob/859a9843a0258a02fe1fb6785dad5907d5c4d0c3/src/runtime/renderer.ts#L33.

And would you also point me to resources on how I can create a nitro plugin from inside of a nuxt module? I know how to access nuxt hooks but not nitro plugin. And nitro documentation does not help either :(

Sure. Here's a module that does it: https://github.com/nuxt-modules/html-validator/blob/main/src/module.ts#L29-L42

Thanks Daniel! It is now pretty clear to me how it is supposed to work. I will work on this in the upcoming days :)


Update queries.md

update queries to remove quotations

I will open a new single request with all changes


Intermittent webstream stuttering

Per our message on reddit, I am having the occasional stuttering issue.  It sounds like you have looked into it a bit and determined it is not related to the load on the pi's CPU.
My initial thought was that there was too much data for my wireless network so I was going to decrease the size/resolution of the video and see if that had an impact on this issue.

Agreed! If reducing the stream resolution causes the stuttering to go away, that's probably a good indication that some part of the system isn't keeping up.
Stream resolution is currently hard-coded in src/stream.rs (search for "-video_size"). To test, you'll need to change this value, then cross-compile a new lunacam binary (with tools/scripts/cross-compile.ps1), place it in /usr/bin, and restart the lunacam service.

Given that it is the weekend, I am having some additional time to look into this.
Right now my camera is in a state where there is only about 9 seconds of video in the buffer and it is not recording any new video.  I likely didn't notice this fact when this occurred a few days ago and I mentioned it as an issue on reddit. When I re-load the webpage with the camera stream on another computer I see the same 9 seconds of video and then the video freezes.
Hardware: Raspberry Pi Zero W, Raspberry Pi Camera V2.
Software: LuncaCam Image Version 1.01, used image file: lunacam-1.0.1.zip
Steps taken to duplicate the issue: :

Boot raspberry pi with the camera attached
Open browser on another computer and monitor video stream
Note that after a period of time the stream has frozen and I am seeing a spinning / loading indicator.
Click on refresh in my web browser and the page reloads showing that there is 9 seconds available in the video stream.
Click play and the 9 seconds of video plays and then the stream is frozen with the spining / loading indicator again.

SSH into the raspberry pi, TOP shows about 15% CPU utilization and about the same for memory utilization. Rebooting results in normal functionality restored.
I have rebooted and I will see how long it takes before becoming non-functional again. Is there a log file I could pull which may give some indication as to what may have occurred?

In this case we probably want the ffmpeg output, which is currently piped to /dev/null because it's ridiculously verbose. Quickest way to get those logs would be to comment out ffmpeg's stdout/stderr redirects and tail the lunacam service's logs (journalctl -u lunacam -f). You may also want to change ffmpeg's log level.

Also of interest would be the contents of /dev/shm/lunacam/hls. This directory contains the actual video buffer, stored as a sequence of video snippets and a "manifest" file (stream.m3u8). These files are constantly updated by ffmpeg as new video is recorded, but if there's some issue causing latency, then I would expect to see that latency reflected in the timestamps/contents of the files in this directory.

In this case we probably want the ffmpeg output, which is currently piped to /dev/null because it's ridiculously verbose. Quickest way to get those logs would be to comment out ffmpeg's stdout/stderr redirects and tail the lunacam service's logs (journalctl -u lunacam -f). You may also want to change ffmpeg's log level.

OK, that makes sense, I am not set up yet to compile this project.  I will have to get that working first.  May be some time though.


feat: Initial Snippet for AVM Integration

Contributing a Pull Request
If you haven't already, read the full contribution guide. The guide may have changed since the last time you read it, so please double-check.
Contributing to documentation

[ ] All documentation contributions should be made directly in the Bicep documentation on Microsoft Docs.

Contributing an example
We are integrating the Bicep examples into the Azure QuickStart Templates.  If you'd like to contribute new example .bicep files that showcase abilities of the language, please follow these instructions to add them directly there.  We can still take bug reports and fixes for the existing examples for the time being.

[ ] This is a bug fix for an existing example
[ ] I have resolved all warnings and errors shown by the Bicep VS Code extension
[ ] I have checked that all tests are passing by running dotnet test
[ ] I have consistent casing for all of my identifiers and am using camelCasing unless I have a justification to use another casing style

Contributing a feature

[ ] I have opened a new issue for the proposal, or commented on an existing one, and ensured that the Bicep maintainers are good with the design of the feature being implemented
[ ] I have included "Fixes #{issue_number}" in the PR description, so GitHub can link to the issue and close it when the PR is merged
[ ] I have appropriate test coverage of my new feature

Contributing a snippet

[x] I have a snippet that is either a single, generic resource or multi resource that uses parent-child syntax

[x] I have checked that there is not an equivalent snippet already submitted

[x] I have used camelCasing unless I have a justification to use another casing style

[x] I have placeholders values that correspond to their property names (e.g. dnsPrefix: 'dnsPrefix'), unless it's a property that MUST be changed or parameterized in order to deploy. In that case, I use 'REQUIRED' e.g. keyData

[x] I have my symbolic name as the first tab stop ($1) in the snippet. e.g. res-aks-cluster.bicep

[x] I have a resource name property equal to "name"

[x] If applicable, I have set the location property to location: /*${<id>:location}*/'location' (not resourceGroup().location) where <id> is a placeholder id, and added param location string to the test's main.bicep file so that the resulting main.combined.bicep file used in the tests compiles without errors

[x] I have verified that the snippet deploys correctly when used in the context of an actual bicep file
e.g.
resource aksCluster 'Microsoft.ContainerService/managedClusters@2021-03-01' = {
  name: 'name'

Microsoft Reviewers: Open in CodeFlow

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 7.71%. Comparing base (108d816) to head (2eedbd0).
Report is 576 commits behind head on main.

Additional details and impacted files

@@             Coverage Diff             @@
##             main   #14182       +/-   ##
===========================================
- Coverage   94.28%    7.71%   -86.57%
===========================================
  Files        1113        7     -1106
  Lines      100791      350   -100441
  Branches     8734      125     -8609
===========================================
- Hits        95028       27    -95001
+ Misses       4595      322     -4273
+ Partials     1168        1     -1167

Flag
Coverage Δ

dotnet
?

typescript
7.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1104 files with indirect coverage changes

Hey @sydkar, Did you manage to take a look at this? Can you advise around the failing test?

Hi @ChrisSidebotham, to fix the test, you may need to add an integration test for the new snippet with the following steps:

Add a new folder Files\SnippetTemplates\avm-res-network-privatednszone to the Bicep.LangServer.IntegrationTests project.
Within the new folder, create two empty files named main.bicep and main.combined.bicep.
Add comments in main.bicep to provide values for the snippet. Also, add a // Insert snippet here comment to indicate where the snippet should be inserted.
Run the script .\scripts\SetBaselines.ps1. This will update main.combined.bicep by applying the snippet values to the snippet template and inserting the result.

For reference, you can take a look at an example here: https://github.com/Azure/bicep/tree/main/src/Bicep.LangServer.IntegrationTests/Files/SnippetTemplates/res-app-gateway.

Hi @ChrisSidebotham, to fix the test, you may need to add an integration test for the new snippet with the following steps:

Add a new folder Files\SnippetTemplates\avm-res-network-privatednszone to the Bicep.LangServer.IntegrationTests project.
Within the new folder, create two empty files named main.bicep and main.combined.bicep.
Add comments in main.bicep to provide values for the snippet. Also, add a // Insert snippet here comment to indicate where the snippet should be inserted.
Run the script .\scripts\SetBaselines.ps1. This will update main.combined.bicep by applying the snippet values to the snippet template and inserting the result.

For reference, you can take a look at an example here: https://github.com/Azure/bicep/tree/main/src/Bicep.LangServer.IntegrationTests/Files/SnippetTemplates/res-app-gateway.

@shenglol would you mind adding this info to https://github.com/Azure/bicep/blob/main/CONTRIBUTING.md#snippets?

@shenglol - I have updated as necessary but seeing issues with module restoration.


Add 'Community' section to README.md

cc @utam0k

I think the community is important, so can you bring it up on Design and implementation of youki?

@utam0k Done, please take a look.


Tokenization: can't match subtraction and identifiers have new line ending

I have updated the token part of Frank's implementation. There are some small changes here and there. But, I had the following items that I couldn't resolve using regular expression.  So, I added a new exact match pattern with the space at the end to make sure that it doesn't catch also the minus sign.
subtraction = ['- ', Symbols.IDENTIFIER]

identifiers that have new line (\n) at the end keeps the new line character but only the first one. So,
I changed the code to strip the value before inserting to the token.

I couldn't see the same problem in node.js so they are happening because of different regular expression implementation of the languages and I couldn't change the expressions to work with Python. I tried a bit but I am not a "re ninja". :/
I tested against all the example lel source files and I didn't see any other disparity.
@francisrstokes: Your comments are appreciated.

Hi there @osaatcioglu ,
Strange that you can't match subtraction - it works well in javascript implementation:
Lel REPL - Francis Stokes 2017
> (- 5 2)
3

Also this seems to match using python regular expressions: https://regex101.com/r/ClUKpi/1
The exact matching you provided will work, since you will always need to separate with a space, but that does mean you'll always get a space in your token value - meaning you will indeed need to add string stripping. Doable, but you really should be able to match with a regex. I wonder if you need to pass the correct flags to the re.compile function? That will most likely fix both of these issues.

I checked again with some fresh eyes and I found the bugs.
Regarding the newlines, Python is using \Z indicator instead of $ to not to include the newline at the end of the matched string. I learned a new thing. :)
And, the subtraction, your code is checking if the "-" is a minus sign or a subtraction operation in the ambiguous algorithm. But, the only ambiguous pattern which is the NUMBER is not wrapped around an array. So, in the loop, it is treated as a string. I updated the Patterns data structure and it worked. I am surprised how it worked in node.js. There are a lot of different gimmicks in every language, I guess. :)
Thanks for the tips, especially the regex101. It is much better than the ones I was using.


Delegatecall doesn't work with Solidity libraries

Since the implementation of the Delegatecall in Solidity, libraries won't work in pyethereum anymore.
E.g. this contract using a library will cause a transaction error when t1 is called:
library BugLibrary {

    struct Data {
        uint test;
    }

    function t1 (Data storage self) returns (uint) {
        return 2;
    }
}

contract Bug {
    BugLibrary.Data data;

    function t1() returns (uint) {
        return BugLibrary.t1(data);
    }
}

My tests failed with pyethereum tester, because the block number was not set to 1150000 (homestead fork). Setting block.number = 1150000 solved the issue. Using latest solidity with libraries will always require setting the block number before a test can complete.


[Storage] Fixed BlobContainerClient constructor to set clientSideEncryptionOptions

Fixes this issue: https://github.com/Azure/azure-sdk-for-net/issues/44623
One of the BlobContainerClient constructors does not set the clientSideEncryptionOptions, this PR fixes this issue

@nickliu-msft please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
@microsoft-github-policy-service agree [company="{your company}"]

Options:

(default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.

@microsoft-github-policy-service agree

(when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.

@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="Microsoft"

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

Let's update the changelog for this change as well.


add project Cafe, It contains some ERC contracts

create project Cafe, It will be contains ERC20 ERC721 ERC1155

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


Bug: Maximum call stack size exceeded

While integrating fastfall into the benchmark for waterfallize I used the following example (the one from the readme):
fall([
  function a (cb) {
    cb(null, 'a')
  },
  function b (a, cb) {
    cb(null, 'a', 'b')
  },
  function c (a, b, cb) {
    cb(null, 'a', 'b', 'c')
  }
], function result (err, a, b, c) {
  done();
})

If you run this a lot of times (say 100.000 like in bench.js) you'll get this error:
 alessio: /home/alessio/www/fastfall git:master
→ node bench.js
/home/alessio/www/fastfall/fall.js:89
    var args = []
    ^
RangeError: Maximum call stack size exceeded
    at Holder.work (/home/alessio/www/fastfall/fall.js:89:5)
    at fall (/home/alessio/www/fastfall/fall.js:45:13)
    at benchFastFall (/home/alessio/www/fastfall/bench.js:61:3)
    at end (/home/alessio/www/fastfall/bench.js:19:7)
    at result (/home/alessio/www/fastfall/bench.js:71:5)
    at work (/home/alessio/www/fastfall/fall.js:102:21)
    at c (/home/alessio/www/fastfall/bench.js:69:5)
    at work (/home/alessio/www/fastfall/fall.js:97:31)
    at b (/home/alessio/www/fastfall/bench.js:66:5)
    at work (/home/alessio/www/fastfall/fall.js:97:31)

That's perfectly normal, as these calls are not async, and are used there for 'demo' purpose. fastfall is build to run async functions.

One thing that you can do to fix your bench, is to put the done callback in a setImmediatecall.

You are creating a new stack here: https://github.com/alessioalex/waterfallize/blob/master/index.js#L17-L24.
In async.waterfall it's here: https://github.com/caolan/async/blob/master/lib/async.js#L713.
Basically fastfall will not make your function run asynchronously if there is no need to.

@mcollina thanks, I should have put async functions in the benchmark, don't know how I've missed that.


Need to resolve the type like pothos.

`
const builder = new SchemaBuilder({});
builder.queryType({
fields: (t) => ({
hello: t.string({
args: {
name: t.arg.string(),
},
resolve: (parent, { name }) => hello, ${name || 'World'},
}),
}),
});
`

This issue already mention in #42  so i close this issue.


Organized Crime world logger, Location arrow

Is your feature request related to a problem? Please describe.
Current Client doent Log the Crime world or time
Describe the solution you'd like
A Widget and or side bar to keep logs of crime ex: | W330 | 20mins | Southwest Graveyard... ect
With the time counting down "till finished" and remove the entry on "times up"
Describe alternatives you've considered
Embed the note with the world (this keeping to rs fair play issues. doing this will make you need to read the note .
issues is multiple notes

Agreed! Would love to have this feature to save me post-it notes!

+1 for this feature request
By the way, some of the worlds are synced, and it appears to be partially based on IP address, but I haven't figured out the exact formula yet.
Here's a quick Python script to output the world IP addresses if somebody wants to test it further:
import socket
for world_number in range(1,230+1):
	print('World ' + str(world_number) + ' (' + str(world_number + 300) + '): ' + socket.gethostbyname("oldschool" + str(world_number) + ".runescape.com"))

Hub plugin Shayzien Organised Crime now provides this.


INTLY-8778-Extend folder support functionality

Description

extend folder support functionality
add ability to specify custom folder name
add deletion method for obsolete resources

JIRA
https://issues.redhat.com/browse/INTLY-8778
Verification

Run make cluster/prepare/local
Add the Makefile recipe from below, or create these dashboards manually

.PHONY: dashboards
dashboards:
	oc apply -f deploy/examples/dashboards/DashboardWithCustomFolder.yaml -n grafana
	oc apply -f deploy/examples/dashboards/SimpleDashboard.yaml -n grafana
	oc apply -f deploy/examples/dashboards/KeycloakDashboard.yaml -n grafana

Run the operator locally with operator-sdk run local --watch-namespace=grafana <- ensure your operator-sdk is at version 0.18.2
Open the Grafana UI and navigate to dashboards, ensure that the grafana folder has two dashboards, simple-dashboard and keycloak-metrics, and the customFolderName, has one dashboard dashboard-with-custom-folder
run oc delete grafanadashboard dashboard-with-custom-folder -n grafana
ensure that the dashboard was deleted but the folder has remained
run  oc delete grafanadashboard simple-dashboard -n grafana and ensure that the dashboard was deleted and that the keycloak-dashboard has remained in the grafana folder
run oc delete grafanadashboard keycloak-dashboard -n grafana and ensure that both the dashboard and folder are deleted in the Grafana UI.

Any user specified folder through the spec, customFolderName field should remain unchanged even if it is empty, any other "managed" folder, such as the ones that are created from the namespaces of the dashboard in which the dashboard is located should be deleted when empty

in the newer version of grafana (v7.0.4) namespaces are foldered. What's to keep a custom folder from clobbering a namespaced one?

@mrgleeco

in the newer version of grafana (v7.0.4) namespaces are foldered. What's to keep a custom folder from clobbering a namespaced one?

Hi, I'm not quite sure what you mean by "clobbering"? is your concern that a custom folder can overwrite a namespaced folder? as in that you can specify a customFolderName that will overwrite the namespaced Folder one, or that dashboards will only be located in one folder?

the former.  Should be easy to test with a dash in a namespace and then a 2nd dash in a custom folder -of the same name

@mrgleeco How does Grafana folder by namespace? I couldn't find anything here and as far as I know, Grafana is know aware of the environment (Kubernetes, Namespaces).

@HubertStefanski It works as expected. Only saw this error when I deleted all dashboards in one go (oc delete grafanadashboards --all -ngrafana):
{"level":"error","ts":1598514297.7024577,"logger":"controller_grafanadashboard","msg":"delete folder 0xc000dc2088 failed","error":"folder cannot be deleted as it's being used by other dashboards"

Is that expected? In the end the folder is still deleted, so it seems to work.

@HubertStefanski Interestingly, if you use --scan-all and create the dashboards in a different namespace, then the custom folder also gets deleted when you delete all dashboards. Is this intentional?

@HubertStefanski It works as expected. Only saw this error when I deleted all dashboards in one go (oc delete grafanadashboards --all -ngrafana):
{"level":"error","ts":1598514297.7024577,"logger":"controller_grafanadashboard","msg":"delete folder 0xc000dc2088 failed","error":"folder cannot be deleted as it's being used by other dashboards"

Is that expected? In the end the folder is still deleted, so it seems to work.

Did the folder get deleted eventually? I think this error might only show up because of the fact that the dashboard controller goes through a for loop where after each loop it removes that dashboard from r.config so it will show that error, until the folder is actually unoccupied, the folder should get deleted just fine after the next loop in this case, although I think we can lower that to a non-error log. level since it's actually not an error per se.

Interestingly, if you use --scan-all and create the dashboards in a different namespace, then the custom folder also gets deleted > when you delete all dashboards. Is this intentional?

Definitely not, But I see where I missed making that check, will add it in and re-test.

Made changes and merging as per @pb82 request


x/sys/unix: add Solaris/Illumos ACL and extended attribute support

Please answer these questions before submitting your issue. Thanks!
Would it be possible to get these calls added as part of Solaris/Illumos.  Must use cgo to interface with file attributes otherwise.  Some of these might exist, most don't.  Most implementations seem to handle these via a syscall which we don't have in Solaris.
fgetattr,fsetattr,getattrat,setattrat
acl_get,facl_get,acl_set,facl_set, acl_totext, acl_fromtext,unlinkat
openat,fchownat,fstatat,futimesat,renameat, attropen, fdopendir, readdir, read, write
What version of Go are you using (go version)?
1.10
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
amd64/solaris
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
Ability to change acls and extended attributes from syscall or os package.
What did you see instead?
Need to use cgo.

I noticed that in the syscall package everything links to libc.
Some stuff related to acls are in libsec.  Is that off limits or could it be included?
http://illumos.org/man/3lib/libsec
http://illumos.org/man/3lib/libc


Refactor Builtin Methods

Add implementation for following modules.

[x] annotations
[ ] array
[ ] decimal
[ ] error
[ ] float
[ ] future
[ ] int
[ ] map
[ ] object
[ ] stream
[ ] string
[ ] table
[ ] value
[ ] xml

This functionality is added to master with https://github.com/ballerina-platform/ballerina-lang/pull/16696


updating to vue 3.0.0

Changes
This updates the app-template-vue to 3.0.0
Testing
I ran tests and they passed but I would like to test this by creating a new app with this. However I wasn't sure how to get npx to use my local version.

I wasn't sure how to get npx to use my local version.

npx can’t use anything local, but you can run a command directly:
node /path/to/snowpack/create-snowpack-app/cli [my-new-dir] --template /path/to/snowpack/create-snowpack-app/app-template-vue --use-yarn

That’s essentially what our test runner does for the templates—we install all of them locally and ensure they build properly

And it looks like the automated tests caught that there was a diff 🙂. If you run yarn test locally, you should be able to see the snapshot diff.
I think it’s all insignificant changes from the Vue update, but ⚠ It’s still important to read through every diff! We want to make sure that nothing is missing, or has been added, or anything weird. However, that means reading library changes, too, sometimes.
Anyway, if everything looks good, run yarn test -u to update the snapshots, and run yarn test again. Commit the difference when you think that everything’s in a good place.

Oooo I thought the diff meant I'd messed something up 🤪

Thanks!
I wanted to test it but when I run
node /path/to/snowpack/create-snowpack-app/cli [my-new-dir] --template /path/to/snowpack/create-snowpack-app/app-template-vue --use-yarn
I get
[ERROR] Unable to find "/path/to/snowpack/create-snowpack-app/app-template-vue" in the npm registry.

Thanks!
I wanted to test it but when I run
node /path/to/snowpack/create-snowpack-app/cli [my-new-dir] --template /path/to/snowpack/create-snowpack-app/app-template-vue --use-yarn
I get
[ERROR] Unable to find "/path/to/snowpack/create-snowpack-app/app-template-vue" in the npm registry.

Does that work if you replace /path/to/snowpack with the path to Snowpack on your local machine? Either relative or absolute paths should work.

I tried both absolute and relative paths and couldn't get it to work

Ah, I think that we only support the actual package name of a template in the CLI!
Since we install the template as a package, that's not easy to also install the template as a local folder as well. But we should add support for this, if you'd like to spin up a new Issue to track that.

Ah, I think that we only support the actual package name of a template in the CLI!
Since we install the template as a package, that's not easy to also install the template as a local folder as well. But we should add support for this, if you'd like to spin up a new Issue to track that.

No we do support this currently! It’s how our test runner works in building local templates. But the trick is finding the correct local path to use.

Ah, ignore me then! That "Unable to find in the npm registry." error message led me to believe it wasn't supported.

Ah, ignore me then! That "Unable to find in the npm registry." error message led me to believe it wasn't supported.

Yeah using local templates isn’t a behavior we encourage, but it’s possible. The reason for that is if you typed app-template-vue… is that a local folder or a remote npm package? Currently we try and find that locally, but if it’s not there it checks npm, and that’s where the error message comes from.
But that said, we could open a ticket to make error message clearer if you’re clearly using a local path (e.g. starts with / or .).

I'll file an issue for that otherwise I think we can just merge this


Not able to login to module after using default module setup

When running the default configuration for this module i can login to the cli but not the gui.  When looking at the console in azure i get this image

Hi,
Thanks for reporting. Added to the backlog and internal tracking ID for this request is: INFRAANO-1283.

I was able to get in but had to follow this article https://my.f5.com/manage/s/article/K11140735

Hi @letmetechyou,
Thanks for the feedback.
Can we close the issue?

yes you can close this out.


Fixes bug preventing usage of feedRangeFilter with change feed

We had too aggressive validation in CosmosPartitionPlanner that was uncovered when using readStream in combination with a FeedRangeFilter that only filters on single logical partition. Relaxed the validation and added test coverage.
Fixes#28628

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


now listening to Unix Signals to exit gracefully

When running a mono application using docker the container and trying to stop the container it would take a while to exit and return with a non zero exit code.
LinuxConsoleRunHost is a copy of ConsoleRunHost from Topshelf with the UnixSignal support.
LinuxRunBuilder is copy of RunBuilder from Topshelf where the LinuxConsoleRunHost is used.

I will update the pull request.


lazy loading full page issues

depending on screensize, lazy loading my not load the right amount of claims/tiles

@tzarebczan I can take a look at this one, do you mind assigning to me?


chore: update version (localhost to ip number)

Fix https://github.com/decentraland/explorer-desktop/issues/122
Our Code Review Standards
https://github.com/decentraland/unity-renderer/blob/master/docs/code-review-standards.md

It was a miss-configuration from the OS


Re-design landing page

In addition to the current content, things to cover:

How to deploy for free: use Cloud Run: https://google.github.io/mesop/guides/deployment/
Web components
Auth guide
How is this different from other frameworks? https://google.github.io/mesop/blog/2024/05/13/why-mesop/
Address: not an official Google product - used by dozens of teams at Google to build demos and internal apps.

Feature YT videos like https://www.youtube.com/watch?v=Zi1DnGOrYho&t=1s
Feature tweets

Reference: https://react-spectrum.adobe.com/react-aria/


Unstable dependency selection and rebuilding

I've got a project with workspaces that looks roughly like
├── Cargo.lock
├── Cargo.toml
├── push
│   └── Cargo.toml
├── src
└── util
    └── Cargo.toml

util has a dependency on postgres with the uuid feature. I've recently upgraded postgres to support uuid 0.3. Since a new version hasn't been cut, I've added postgres to my .cargo/config. There's a package in my project that depends on uuid 0.2 internally; this may be important. Now, whenever I run cargo build from the push folder, there's a change that postgres decides to switch between 0.2 and 0.3 of uuid thereby triggering rebuilds of postgres, util, and my push crate.
Here's some fingerprint logs demonstrating the behavior:
One run
INFO:cargo::ops::cargo_rustc::fingerprint: fingerprint error for postgres v0.11.10 (file:///home/jwilm/code/rust-postgres): new (uuid v0.2.3) != old (uuid v0.3.1)

Some number of runs later (varies)
INFO:cargo::ops::cargo_rustc::fingerprint: fingerprint error for postgres v0.11.10 (file:///home/jwilm/code/rust-postgres): new (uuid v0.3.1) != old (uuid v0.2.3)

Other fingerprint logs are a result of postgres deciding to rebuild, and there's nothing to suggest why it chose a different uuid abrubtly. The Cargo.lock file does not appear to change.
I've tried setting a workspace in rust-postgres/Cargo.toml to no effect. The rust-postgres uuid dependency looks like this:
uuid = { version = ">= 0.1, < 0.4", optional = true }

which does allow for other versions. In my project Cargo.toml files, only uuid 0.3 is ever specified other than in third-party dependencies which use 0.2 internally.
rustc/cargo versions:
jwilm@jwilm-desk ➜  ~/code/onepush/push  rustc -V
rustc 1.13.0-nightly (3c5a0fa45 2016-08-22)
jwilm@jwilm-desk ➜  ~/code/onepush/push  cargo -V
cargo 0.13.0-nightly (41b2177 2016-08-22)

Hm, sounds fishy! Do you have any paths overrides in .cargo/config in play?

Only for rust-postgres, but there's nothing changing over there to warrant a rebuild.
paths = ["/home/jwilm/code/rust-postgres"]

Ah that'd do it, if you remove that is the build deterministic?
There's a couple of known bugs in Cargo where paths can cause nondeterministic compiles.

Well, it's a deterministic failure. I need the path override so that another dependency uses my version of rust-postgres. Should this just be closed with a reference to one of those issues?

I'd recommend using [replace] for overriding for now, otherwise I believe this is https://github.com/rust-lang/cargo/issues/2041

@alexcrichton Is there a nightly build available which supports combining workspaces and [replace]? Do I just have a bad build here?.

@nathanaeljones I'll comment more on that issue

I believe we've since implemented warnings for paths overrides that are likely to cause fishy compilations, so I'm going to close this.