Replace Jasmine

I apologize for the large PR. I spent 8 hours on the plane with no wifi :)
This PR replaces Jasmine with jest-framework
why
Jasmine always made it hard for us to move fast. Since we don't own the codebase, it is hard to introduce new features, fix existing bugs, make design changes and just debug the code. On top of that Jasmine's codebase is not flow typed, which make the integration harder.
The goal of this PR is to replace Jasmine with a framework that mirrors the functionality, but at the same time simplifies the things as much as possible.
Design
This new framework is built using FLUX architecture (pretty much Redux, but with mutable data).

The core data model of this framework is located in jest-framework/src/state.js where it defines the initial state.
The API is exposed in jest-framework/src/index.js
None of the API functions work with the state directly, but rather dispatch actions that describe "what happened in the framework"
everything that happens in the framework is handled in jest-framework/src/eventHandler.js
Every piece of data that flows through the framework is typed and all types located here jest-framework/types.js

Benefits of the approach

Preventing errors. We can be more strict in our test runners. For example here https://github.com/facebook/jest/blob/master/packages/jest-matchers/src/tests/toThrowMatchers-test.js#L114-L130 we define it inside another it. Jasmine won't even complain about it, and just skip this test, but in fact, after i fixed the definition of this test, i found that this test is actually broken. There is many other bad things that we'll be able to prevent during the runtime (examples are: nested before/after hooks, adding describe/test/beforeEach during the test run, etc...)

Debugging. Having a single event handler, we can add a single console.log statement to it and see everything what happens in our test run.
example:

Previously, every time we have a broken test that stalls i would spend hours trying to understand where exactly it happens.

Extensibility.  Because we don't have control over Jasmine, adding features to it is pain. Snapshot functionality is built on hacks and monkeypatches. And every new feature is harder and harder to add (we have a plan to introduce interactive snapshot updating). But with FLUX architecture all we need to do is to add another handler. e.g. snapshot logic looks like this right now:

const {addEventHandler} = require('jest-framework');

const eventHandler = event => {
  switch (event.name) {
    case 'test_start': {
      setExpectState({currentTestName: getTestID(event.test)});
      break;
    }
    case 'test_success':
    case 'test_failure': {
      addSnapshotErrorsToTestResult(event.test);
      break;
    }
  }
};

addEventHandler(eventHandler);

TODO:
All tests are currently passing.
To run the test suite with the new framework run:
./jest --testRunner '<rootDir>/packages/jest-framework/build/legacy_code_todo_rewrite/jest-adapter.js'

Although, there are a few cases that we don't have tests for that i still need to fix:

[ ] Write better integration with the rest of Jest (remove/refactor old code in legacy_code_todo_rewrite/ folder)
[ ] Throw if describe, test, beforeEach, ... is used when the tests are already running
[ ] Add configurable timeouts
[ ] add console, sourceMap values to TestResult
[ ] Make sure all requires within framework are internal and required once per worker only when needed?
[ ] test.concurrent
[ ] filter tests when run with  --testNamePattern
[ ] snapshot files in tests aren't being cleaned up properly
[ ] Assertion counts

Holy shit! This is really, really good. I think we'll probably need to roll this out incrementally. The testFramework option is already customizable but cannot be changed per-test. We could make it so that the framework can be configured within a test file (@jest-test-runner <name>) or using an array of globs in the config. What do you think?
More thorough review coming later this week.

Would it make sense for this to live in a separate repo outside of jest? Or will it get built and published outside of it anyway?

Yep, it'll get published separately.

@yangshun thanks for catching that!

I spent 8 hours on the plane with no wifi

Oh man, all I do on planes is watch episodes of TV shows that I've already seen, and unsuccessfully try to sleep. You seem much more productive 😛

Having a single event handler

Will this make it easier to attach custom reporters? For example, we're using an AppVeyor reporter to properly show test runs in AppVeyor: https://github.com/facebook/jest/blob/9b157c3a7c325c3971b2aabbe4c8ab4ce0b0c56d/testSetupFile.js#L15-L18. I guess removing Jasmine will mean we need to write our own reporters, but this could tie in nicely with #3536 if we could ship said reporters out-of-the-box.

@Daniel15 i haven't looked into how jasmine-reporters work yet, but i assume it reports (sends a POST request?) for each test file separately?
Because of the way we run tests in Jest (multiple files in parallel, which means multiple Jasmine instances in parallel) we have two layers that we can report from:

from a single test file. This will report info about how many tests passed/failed/skipped within a single *-test.js file.
from Jest process (aggregated results). This will report  the same data as # 1, but for each -test.js. So it'll report things like: how many tests failed/passed/skipped across all of *-test.js files, how many *.-test.js files sucessfully ran, how many -test.js files had failed test or execution failures.

I believe that 99% of the time we want to use the second type of reporting, and that was enabled by https://github.com/facebook/jest/pull/3349
I see reporting from Jasmine (or now jest-framework) to be useful mostly for debugging purposes. Like sticking a console.log into dispatcher and seeing what's going on in the run step-by-step

@dmitriiabramov - looks like jasmine-reporters' AppVeyor reporter caches the results internally and batches them 50 at a time when calling AppVeyor's API: https://github.com/larrymyers/jasmine-reporters/blob/master/src/appveyor_reporter.js#L223-L225. On the other hand, the XUnit implementation does no batching and sends them one by one: https://github.com/xunit/xunit/blob/560c77c3a48571fef3e4f129d93107f57b673261/src/xunit.runner.reporters/AppVeyorClient.cs#L103
I agree with you - It might be easier to take the second approach you mentioned (processing the aggregated results). I completely missed #3349 - Thanks for the information! Sounds like we can already build these custom reporters even before switching away from Jasmine.

@dmitriiabramov We (in wallaby.js integration with jest) are heavily using the following jasmine reporter interface functions to capture test execution results from jest:

jasmineStarted (not equivalent to the custom reporter's onRunStart because the former happens after loading the test file unlike the latter, which is an important difference for us)
suiteStarted,
suiteDone,
specStarted,
specDone (with the access to the matcherName, actual error object, actual and expected objects; all these are required to provide custom reporting, like custom coloured diffs, etc).

Just an aggregated result will not be sufficient for us (or any integration that relies on the existing jasmine reporter's interface). So it would be great if there was a way to subscribe/hook into the test execution pipeline and get the same level of data (for each test as they execute).

@ArtemGovorov yeah! you'll definitely be able to hook into the framework. and probably even create an adapter that'll keep the interface consistent with all your custom reporters that you're using right now.
the only thing you won't get is the actual, expected objects, but this part wasn't being populated since we rewrote jasmine matchers (back in august 2016), so most likely it won't be a problem

probably even create an adapter that'll keep the interface consistent with all your custom reporters that you're using right now

This is a really good idea - Maintain backwards compatibility with Jasmine reporters by including an adapter that exposes the old Jasmine API.

@dmitriiabramov Great, thanks for confirming it!
Regarding actual and expected objects, they are actually passed right now. Late 2016 I have submitted 2 PRs that were merged:

https://github.com/facebook/jest/pull/2198/files
https://github.com/facebook/jest/pull/2342/files
and now matcherResult (with expected and actual) is a part of the error object which gets passed from jasmine's specDone in the list of failedExpectations.
Here are the unit tests for this: https://github.com/facebook/jest/pull/2572/files

@dmitriiabramov So as long as the error object (that is important for us and I guess other reporters as well, because of the access to its stack) is passed in the new framework specDone equivalent, it's all great.

@ArtemGovorov oh wow! yeah, that totally makes sense. and yes, the test_failed event accepts a Test object that has errors: Array<Exception> property :) so it shouldn't cause you too much trouble!

The changes you made unrelated to the new test runner, can you send a separate PR for those cleanups/fixes?

all PRs with changes affecting the rest of Jest were merged and this one is ready to go.
Still not sure about the naming though :)

Codecov Report

Merging #3668 into master will decrease coverage by 2.62%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #3668      +/-   ##
==========================================
- Coverage   62.64%   60.02%   -2.63%
==========================================
  Files         183      191       +8
  Lines        6709     6997     +288
  Branches        6        6
==========================================
- Hits         4203     4200       -3
- Misses       2503     2794     +291
  Partials        3        3

Impacted Files
Coverage Δ

packages/jest-framework/src/index.js
0% <0%> (ø)

packages/jest-framework/src/utils.js
0% <0%> (ø)

...mework/src/legacy_code_todo_rewrite/jest-expect.js
0% <0%> (ø)

.../src/legacy_code_todo_rewrite/jest-adapter-init.js
0% <0%> (ø)

packages/jest-framework/src/eventHandler.js
0% <0%> (ø)

...ework/src/legacy_code_todo_rewrite/jest-adapter.js
0% <0%> (ø)

packages/jest-runtime/src/index.js
76.37% <0%> (ø)
:arrow_up:

packages/jest-framework/src/state.js
0% <0%> (ø)

packages/jest-framework/src/run.js
0% <0%> (ø)

packages/jest-matchers/src/spyMatchers.js
95.31% <0%> (-4.69%)
:arrow_down:

... and 8 more

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 b8602e1...657f967. Read the comment docs.

It's probably 95% compatible with Jasmine (there's a few very minor differences)
I want to make test context feature to be compatible with Jasmine for now, and once we get 99% feature parity propose a design to move to a new model
I want to keep both frameworks alive for a while and migrate first Jest's own test suite to use it, second update www to use it and see if there's any unexpected issues. Once we're there i think i'd add an experemental (--circus?) flag to run the new framework and probably make it a default in the next major release

alright. I addressed most of the issues and couldn't come up with a better name than circus :'(
i'll merge this PR and will be sending a lot of followups to fix things (improve compatibility with jasmine)
This is not used anywhere yet, so it should not affect Jest or any of the tests


extract thread worker classes

Almost no functional changes, but lots of moving code around.
New classes Worker, RequestRateWorker, and ConcurrencyWorker which implement the actual Infer thread loop.
New interfaces IRequestRateWorker and IConcurrencyWorker
Moved a lot of code from ConcurrencyManager, RequestRateManager, and LoadManager into those classes.
Actual changes

Some unique_ptr had to become shared_ptr (for example, the data_loader_ in LoadManager)
Some places referenced backend_->Kind(), which was the ONLY use of that backend variable in the code. Instead of passing in the backend, I'm just passing in backend_->Kind()

I see that some steps like UpdateInputs and ValidateOutputs are repeated in both concurrency_worker and request_rate_worker. Do you think it would be possible to refactor the common functionality into load_worker?

Where are you seeing that? Those functions are in LoadWorker in the latest commits in the tree. Are you looking at some partial changes or intermediate commits?

Where are you seeing that? Those functions are in LoadWorker in the latest commits in the tree. Are you looking at some partial changes or intermediate commits?

I meant the actual calls to these functions. Would it be possible to reuse parts of the Infer in the sub classes into the LoadWorker::Infer?


Not moving to any forts

Expected Behavior
Farming
Actual Behavior
Not moving to any forts as there aren't enough scace.
Steps to Reproduce
./run.sh
Other Information
OS: Raspbian
Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here)
Python Version: (run 'python -V' and paste it here)

That means your inventory is full, you have to configure RecycleItems in your config.json in order to limit quantities for each item.
For example:
{
            "type": "RecycleItems",
            "config": {
                "item_filter": {
                    "Pokeball": {
                        "keep": 50
                    },
                    "Greatball": {
                        "keep": 100
                    },
                    "Potion": {
                        "keep": 10
                    },
                    "Super Potion": {
                        "keep": 20
                    },
                    "Hyper Potion": {
                        "keep": 30
                    },
                    "Revive": {
                        "keep": 30
                    },
                    "Razz Berry": {
                        "keep": 25
                    }
                }
            }
        }

I did it woth low amounts but not working :/

what is your config? what does your log look like?

@savoyepolo Be sure you put RecycleItems before MovingToFort

[00:42:27]  Server seems to be busy or offline - try again - 1/5
[00:42:28]  Starting PokemonGo Bot....
[00:42:29]  [x] Current egg hatches in 2.22 km
[00:42:29] Walking from (40.768281143499706, -73.97640533811747) to [40.768281143499706, -73.97640533811747] 0.00km
[00:42:30] Walking from (40.768281143499706, -73.97640533811747) to [40.76891139016751, -73.97640533811747] 0.07km
how can i fix this i am just new here don't know how to start a new topic i did update the bot via git pull. second i change the  "health_record":  to false and now i am confuse what to do next
every kind of help is welcome

My config file is config.json.pokemon.example and @BriseSD RecycleItems is before MovingToFort

@savoyepolo So you're new and blindly following one config example. Can't blame you for this, by try to delete this snippet until you understand everything in your config file :
      {
        "type": "FollowSpiral",
        "config": {
          "diameter": 4,
          "step_size": 70
        }
      }

Ok thank's i try that @BriceSD !

@BriceSD error :
File "pokecli.py" line 501 in  main()
File "pokecli.py" line 132 in  main()
ValueError: No JSON object could be decoded

@savoyepolo Hmm weird, I think you deleted too many parenthesis or forgot a "," or something

@BriceSD Ok now it's working but same inventory_full error :/
In my config i said : 50 Pokeballs, 5 Potions, 10 SuperPotion
Only low amounts of items :/

@savoyepolo I insist it's a configuration problem. If you are using the configuration from config.json.pokemon.example it doesn't take into consideration Greatball and Ultraball, so those will be stacking without any limit.
Whenever you start the bot, it should tell you how many units you have for each item, you could easily identify there which is the one not being regulated.

+1 what kdemoya mentioned.
I have the same issue by copying config from example. What happened was that I have too many Greatballs but I didn't config Greatball in my config.json

edit your config and add the following under "Pokeball":       { "keep" : 50 },
"Greatball":       { "keep" : 50 },
"Ultraball":       { "keep" : 50 },
This will drop the excess Great Balls and Ultra Balls


Front Door Origin Host Header Not Set Correctly

Accessing container app via Front Door resulted in HTTP 403.  Found the issue, the Origin host header was not being set correctly, and looking at the TF Module documentation setting cdn_frontdoor_origin_host_header_override to null should default it to the host_name, but this does not appear to be the case:

Manually specify the host header that the CDN sends to the target. Defaults to the recieved host header. Set to null to set it to the host_name (cdn_frontdoor_origin_fqdn_override)

Might be related to the following:

Ref: https://learn.microsoft.com/en-us/azure/frontdoor/origin?pivots=front-door-standard-premium#origin-host-header

If you set it to an empty string, or leave the variable unset, does it then work as expected?
I wonder if it's just the documentation that needs ammending


Import resolver should be capable of resolving also methods and constructors

ImportResolver is incapable of resolving symbols within from ... import symbol_1, symbol_2, ... statements. We should provide another compiler step to resolve these symbols, along with symbols from all import statements like from Module.Type import all (which should collect all the constructors), etc. The step should update BindingMap with the additional information.
There is an abandoned PR that adds this functionality - #6457. Before this PR will be integrated, we should think over the architecture of current BindingMap - it is currently modified in-place from many places, which is potentially dangerous, especially because BindingMap is serializable, and it is cached.
Related:

https://github.com/enso-org/enso/issues/5936
https://github.com/enso-org/enso/pull/3931
https://github.com/enso-org/enso/issues/6553
https://github.com/enso-org/enso/issues/6669

### Tasks
- [ ] Enable/add all the tests from https://github.com/enso-org/enso/pull/6457/files#diff-de25bd229c75933a6fb950d1d00d8dfcca100058614c230de09c32aac7479816
- [ ] Revert https://github.com/enso-org/enso/pull/6726/commits/5595728f39fd50b4aca845d7778415dd3ed09beb

This issue blocks https://github.com/enso-org/enso/pull/9692#discussion_r1574540915 - private check cannot throw a compiler error when accessing private constructors or private methods.


how to mysql

how to import data excel to mysql database?

Hey @mgagah ! What have you tried? What are you currently seeing? What does your code look like? Closing until more information to your question is provided.


Document Uploads 📝- Large Document Processing

Large Document Processing - Document Uploads 📝
Project Overview
For optimization, there is need to boost the file processing experience by setting a limit on the size of documents uploaded. To avoid delays in response, we need to enforce a page limit on uploaded documents.
What is Needed
Contributors are required to implement a check that ensures documents uploaded have a page limit of 50. This will help mitigate delays when processing large files.
How to Contribute

Get familiar with the scripts and documentations already provided in the repository.
Implement the Page Limit: Modify the file upload logic to ensure documents with more than 50 pages are rejected or flagged.
Test your code: Ensure your solution works smoothly before submitting.
Create a Pull Request: Submit a pull request to the repository with your code in the appropriate script and include any necessary documentation.

Getting Started
Before you begin, ensure you have read the Contribution Guidelines in the repository
Looking forward to your solutions! Happy Hacking! 🎉

hello, please could I get assigned to this?

hello, please could I get assigned to this?

Yes @KeneNwogu, you can go ahead and work on this.


content: .iso file's release date added to iso-card

This PR solves the following issue
What is added

In every iso-card the release date is extracted from the link and showed as a tag just right to the name
Assuming the link format will be always like this https://download.manjaro.org/kde/24.0.5/manjaro-kde-24.0.5-240730-linux69.iso

Points to be consider

In arm view there is no date showed as the file .xz and the format is also different
If the .iso file does not carry any date information It does not show anything

Thank you for the patch. Can you rework the commits such that the pipeline succeeds?
The approach is good though. I was discussing with other Manjaro team members if we could set the "date" fields in the json, we get the info about ISOs from in the future. That would be more robust than decoding it from the file name. But as long as that's not done, doing it this way is the right thing to do.

Can we show the date only when clicking on the "More" button, i.e. in the details view? Maybe somewhere in the top-right corner.

Can we show the date only when clicking on the "More" button, i.e. in the details view? Maybe somewhere in the top-right corner.

Yeah Sure. On it

Sorry for the wait. I merged the commits together and changed title. Thanks for the contribution! :)


[Feature request] Powertoys Run - Improved web search

Description of the new feature / enhancement
First of, suggestions in the web search would be awesome :)
And second, being able to search on different sites would be a very welcome feature. Not sure if Chrome have this, but Vivaldi at least have this feature where you can set it up so if I in the address field write "yt Rickroll" (without the "") you'd search for Rickroll on Youtube, "map Paris" you'd search for Paris on google maps or "wiki super mario" you'd search for super mario on Wikipedia.
This would just be a list where you can add you're own site URL for searching with a suggestion URL and whatever abbreviation you'd want with it.
Below is a screenshot on how I've set it up in Vivaldi.

Scenario when this would be used?
Whenever I'd want to search for anything at all on my favorite sites :)
Supporting information
No response

This would be a good community plugin but currently we have no current plans.  /dup #3200

Hey, I wrote a plugin that can do what you want: web search shortcut


Allow  multiple key_types in make_credential

CTAP2 allows us to specify a list of acceptable key types during credential creation. This is helpful when supporting devices like Yubikey < 5.2. Normally we'd prefer ED25519, but these older devices don't support it so we want to specify ED25519 then ECDSA256 as a fallback.
This change allows MakeCredentialArgsBuilder::key_type to be repeatedly invoked to specify multiple key types.
Not sure what the best practice is for testing.

@djrenren
Thanks for the PR!
Please give me a few moments to confirm.

@djrenren
Thank you for the pull request.
It would be better to have the remote branch be developed for pull requests.

Not sure what the best practice is for testing.
All patterns can be tested for impact by running the EXAMPLES application.

This PR could not pass non_discoverable_credentials() in the test-with-non-rk app.
Make a code modification in the develop branch to use Ecdsa256 by default when key_type is not set.
Testing of the various cases will be done in the develop branch and then released in the master branch.


[SPARK-26138][SQL] Cross join requires push LocalLimit in LimitPushDown rule

What changes were proposed in this pull request?
In LimitPushDown batch, cross join can push down the limit.
How was this patch tested?
manual tests
Please review http://spark.apache.org/contributing.html before opening a pull request.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

OK,  I will add some UTs.

Cartesian product refers to the Cartesian product of two sets X and Y in mathematics , also known as direct product , expressed as X × Y , the first object is a member of X and the second object is One of all possible ordered pairs of Y.So cross join mustpush it on the left side.
For example, A={a,b}, B={0,1,2}, then
A × B = {(a, 0), (a, 1), (a, 2), (b, 0), (b, 1), (b, 2)}
B×A={(0, a), (0, b), (1, a), (1, b), (2, a), (2, b)}

@guoxiaolongzte still that doesn't explain why we can push to the right side too. I do believe that it is possible. If the right side contains more than N items, where N is the limit size, the output will contains the combinations of the first item from the left side and the first N items from the right side. If the right side contains less than N items, pushing the limit on its side has no effect on the result.

Yes I tested and understood, you are right. @mgaido91

@cloud-fan @dongjoon-hyun @gatorsmile
Help review the code.

The title has a typo.

The title has a typo.

Sorry, it has been fixed.

@guoxiaolongzte  good job

Can I give you some advice on this issue?@gatorsmile @cloud-fan

ok to test.

Test build #100164 has started for PR 23104 at commit 588c151.

Hi, @guoxiaolongzte . Could you run dev/scalastyle and fix the issue?

Test build #100273 has started for PR 23104 at commit e173962.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/6243/
Test PASSed.

@dongjoon-hyun
Thank you very much for your review.

Test build #100273 has finished for PR 23104 at commit e173962.

This patch fails due to an unknown error code, -9.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/100273/
Test FAILed.

I looked at it. This error is not caused by my pr.

@guoxiaolongzte can you address @cloud-fan 's comment? We need the same for InnerLike joins without conditions...

Can one of the admins verify this patch?


[MAINTAIN] Review of Mava vs JaxMARL SMAX Results

Please describe what needs to be maintained?
Hey folks, hope all is well! would you mind taking another look at the JaxMARL vs Mava SMAX results outlined in your readme here as they are out of date if you look at the current arxiv version of JaxMARL.
Describe the outcome you'd like
Graphs updated to reflect the correct final win rates achieved by JaxMARL
How do we know when maintenance is complete?
Checklist:

[ ] Graphs updated

Hey @amacrutherford, thanks for bringing to our attention! We are actually in the process of doing a full readme update and will not have the JaxMARL comparison anymore. Please have a look here to see what the new readme will look like.


Improve discoverability of "keyword" search in Symbols search

For as long as it has existed the Symbols search has been keyword based i.e. you can search for "foo bar" to do sub searches.  We've noticed most people don't eve know about this great feature.
Suggest changing the default text to "Search symbols (keyword)" and adding a tool tip explaining how the search works.
In the future we'll add regex search and we can change the default text dynamically to "Search symbols (regex)"

Resolved just by adding a tooltip, the keyword default text felt a bit too cramped. Resolved in builds > 4979


Image fullscreen on click

What about including functionality that when clicking the image, it shows it fullscreen, click again and return to normal state?

Its possible add video to slider and pause while autoplay video?

Hey @JairAviles. You can use the fillParent prop to achieve a fullScreen functionality. The slider will expand to the limits of the parent container. Just make sure that the parent is filling the whole screen.


[#40] Updated use of C++ client connection libraries

The primary commit is required so that this project compiles against the main and 4-3-stable branches of irods/irods.

Ignoring clang-tidy and clang-format for this PR.
Will handle them in a separate/later PR.
Adding pounds.

Added #'s

@alanking Ping.
Not sure if you receive notifications for this repo.


Alert list: Specify translationText's language

What does this pull request (PR) do?
Pages that use needsTranslation: true show an alert that contains the translationText string - which is written in the opposite of the page language.
This change programmatically-defines that string's language.
Additional information
General checklist

[x] Build and test PR's code
[x] Validate changes against WCAG for accessibility

Example of what this fixes:

https://a11y.canada.ca/8947/en/
Check the language of the second list item in the "Important notices" alert. It currently isn't specified, so it's being treated as English (despite being written in French).

Other:

gc-da11yn/wcag-issues has the same issue this PR is fixing. But none of that repo's pages currently use needsTranslation: true.

Thank you very much for catching this @EricDunsworth, what to join in on our development meetings?

@shawnthompson Not sure how much capacity I have atm to regularly participate in those meetings. But if you want to pass an invite my way, I could tentatively accept and tune in where possible :).


Consider to use cookiecutter

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

First at all, I'd like to you congratz with this template, I'm feeling too much productive start with developing a new plugin. But, the only worst part that a saw is when you'll started to refactor and changes places for you context name plugin or propose. It's not so complicated, but can cause a little bit lazy rs
💡 Describe the solution you'd like

I'd been discovered the cookiecutter a few months ago and I think that it can help to structure these things a few better. It's a template example for a kotlin android project and you ca find out more here.
🤚 Do you want to develop this feature yourself?

[ ] Yes
[ ] No

Thanks for the suggestion. I know about cookiecutter. Sadly, this is a "GitHub template" as the two are not easily compatible. cookiecutter allows to promt the user for things like the Java package name, that it won't be possible to setup with GitHub templates.


(canonicalized as any) - can we avoid any here?

In test/unit/fulfillment-inbound-shipment.test.ts -- getting lint warnings. If we can refactor to get rid of any - that'd be great, but if we accept is as inevitable, then we should eslint-ignore it.

Yeah this can be fixed. This was my bad for assuming that since it's an internal type I didn't need to explicitly define its output. It's one of those long and complicated request objects. I'll get on it :+1:


Updated Example to fix bugs, refactor to split core functions for clarity, and insert objects to create a example van

Fixed errors causing example to fail to compile.
Refactored core functionality to split into logical function blocks

You've added too many unnecessary files and primitive (cube) rendering in imguizmo is only for example purpose. It doesn't need that many different primitives. Goal is to show how it works, only.


Adds command for adding rows

Addresses issue #1855
Changes proposed in this pull request:

Adds a command for adding rows by prepending rows to an existing project.
Adds a command for adding rows by prepending rows to an existing project.
Adds a new model change for inserting new rows into an existing project.

Exciting! Congratulations on your first PR to OpenRefine :) Since that's part of a conversation with @tfmorris I'll let him review first. I am withdrawing the corresponding GSoC project proposal since you are quite close to having completed it already. It was probably a bit too light for GSoC anyway.

I don't have UI code written yet, but I'm happy to work on it since I've already started thinking about some edge cases to handle w.r.t the UI. I don't mind keeping the UI work in this PR, and not creating a separate issue since it goes hand-in-hand.

Hi @steve-kasica ,I have the UI finished if you want I can push it to this pr. Also, after the UI it seems that whatever number of rows I give to the server it only add one row and it adds it to the beginning of the data not at the end.Is this behavior intended?

You can address the linter failures with the command ./refine lint.
For the UI, let's keep things simple to start and just do "Add N rows at the beginning" (which was the original use case) and perhaps "Add N rows at the end." More complicated scenarios (other insertion points, non-blank lines, etc) we can leave for future enhancements.

Sorry I must have my GitHub notification settings not setup correctly because I wasn't aware of the activity on this PR from the last couple weeks. I was held up on trying to support multiple cell types in the UI, but @wetneb convinced me to ship what I have at the Meetup today.  Anyway, I've pushed those UI changes and will tackle the remaining unresolved changes from @tfmorris tomorrow.

Hi @steve-kasica ,I have the UI finished if you want I can push it to this pr. Also, after I added the UI it seems that whatever number of rows I give to the server it only add one row and it adds it to the beginning of the data not at the end.Is this behavior intended?

@Ahmed-Elgamel Sorry I didn't see this until now. Is there somewhere I can see the UI you've built? I didn't run into those issues with the UI I just pushed, but I bet they stem from serializing new row data from the client and server.

Here's an example for adding blank rows, with the updated input suggested by @magdmartin during the meetup today.
https://github.com/OpenRefine/OpenRefine/assets/2933702/1ba79e5d-043d-47ec-b5c3-5885ce5f3b9d

Hi @steve-kasica, I wonder if your "thumbs up" reaction on the post above means a preference for:

sticking to the current scope of the PR (including editing), in which case you would like us to continue reviewing it in this state

OR

scaling down to only adding blank rows?

👍  to rolling back to only adding blank rows.

I've added a UI for adding blank rows and finished increasing test coverage. I found a bug when reverting changes when row are appended to the project.
Here's a short demo: https://youtu.be/j4iEtsR0JdM

The dialog button changes look good. I've only done cursory testing so far, but my first attempt generated something weird which I wanted to report. I did: 1) prepend, 2) append, 3) append and got the following change history:
[
  {
    "op": "core/row-addition",
    "rows": [
      {
        "starred": false,
        "flagged": false,
        "cells": []
      }
    ],
    "index": 0,
    "description": "Add rows"
  },
  {
    "op": "core/row-addition",
    "rows": [
      {
        "starred": false,
        "flagged": false,
        "cells": []
      }
    ],
    "index": 1623,
    "description": "Add rows"
  },
  {
    "op": "core/row-addition",
    "rows": [
      {
        "starred": false,
        "flagged": false,
        "cells": []
      }
    ],
    "index": 1629,
    "description": "Add rows"
  }
]

I suspect that this was because I was initially in record mode and switched to row mode between steps 2 & 3, since the project ended up with 1625 records and 1630 rows. Obviously append should use the row count, not the record count.
I'll do some more testing and code review shortly...

Thanks for catching this bug @tfmorris. I can reproduce it. I assumed theProject.rowModel.total would always provide the total rows in a project, even in records mode. The food dataset I was testing on before isn't a good example records-mode data.
I also found another related issue. If I append a row in records mode, it inserts it in the middle of project because it's using record count instead of row count.

If I just replace theProject.rowModel.total with theProject.metadata.rowCount, would that fix that issue?

My understanding of the status of this PR is that @steve-kasica has responded to reviews. @tfmorris do you still feel responsible for reviewing this or should someone take over?

@steve-kasica @wetneb Sorry for the delay! Reviewing now...

@steve-kasica Are you still working on this? Are you able to address the test comments above? I don't think they'll be a ton of work, so I can probably add them to my todo list if necessary to get this pushed over the line.

Hi @tfmorris,
Sorry for the delayed response. My expectations for how much time I can devote to this kind of work shifted in May, and I'm unfortunately not able to devote as much time over the summer to this kind of work. But, I'll try to find some time this week to implement these easy changes. If they're still unresolved next week, then please feel free to take the reins. Thanks!

Awesome. Thank you for sticking with it!

@tfmorris Ok I've implemented those changes and rebased.


After uninstall, theming persists. After removal of themes, errors are printed to console.

After removal of ~/.cache/wal and ~/.themes/wal, theming is lost but opening a new terminal results in cat: /home/paul/.cache/wal/sequences: No such file or directory

You need to remove the cat command from your .shellrc.


Fix typo

Molly Monroy's company is spelt Constantia, not Constantio - see https://constantia.io/about/

@cla-bot check

Thank you for catching this!


on mouseup - complete on Return insert some strange text

When pressing return after on mouseonp  not only end mouseup is added, but also this text
-- replace this with your own code
throw param(0) && "has not yet been implemented"
can this be changed somewhere or is coded in the script?

There's a preference for Test-driven Development on the preferences panel. I thought I had the default set to false, but apparently that's not so. Check the checkbox, then uncheck it again and it should be turned off. I'll put changing the default on my todo list.

Closed by accident.

Again. Sheesh.

That is not working. Did as you suggested. Checked, unchecked that "test-driven.." option. Still getting that text after pressing Return when "complete on Return" is enabled.

Well, that's disturbing - it does work here, but I don't suppose that helps you much. Is there an entry near the bottom of your "GLX2 Code Prefs.txt" file for "uEncourageTDD", and is the value false?

I just looked through the code, and the default is indeed "false", so you shouldn't have that happen unless the value explicitly gets set.

This is the entry
false, so it seems to be correct.
But it still shows the behavior.
I am on Mac OS

Mark,
by any chance, is it possible that for mouseup there  is something left here
group "GLX2 Default Handler" of Cd "defaults main cd" of stack "revGLX2Defaults"
and here
button "my default handler" of cd "glx2Behaviors" of stack "revGLX2 default handlers master"
At least in both scripts there is a preconfigured mouseup handler like this
on mouseUp pMouseBtnNum
   -- replace this with your own code
   throw param(0) && "has not yet been
end mouseUp

while the other mouse.. handlers in those scripts are empty.

Thanks, yes. Fixed now. That was leftover test code, and very specific to just new mouseUp handlers.

The new version 4.12 build 2020.05.24 still adds the testcode  to new mouseup handlers.

 ok - I'll go look at that again. I probably overwrote something.

Yep - I did indeed overwrite something. Will be fixed soon.

As far as I can tell, this is fixed now with version 4.1.7.


[FEATURE] Support for Snowflake masking policies and custom classifiers

Snowflake has a custom classifier feature to create classes containing regex that can be used by Snowflake's classification stored procedure to scan for sensitive data in the data warehouse. Combining the results of the classifier with column tagging will then allow us to apply tag-based masking policies to auto detect and mask PII data.
Looking for support for the following:

custom classifier: https://docs.snowflake.com/en/user-guide/classify-custom-using
masking policies: https://docs.snowflake.com/en/sql-reference/sql/create-masking-policy
grants between tags and masking policies (using alter tag): https://docs.snowflake.com/en/sql-reference/sql/alter-tag

Added a preview implementation of masking policies in v0.11.0


Incremental / circular position control mode.

Allow the motor to be incrementally advanced forever in a incremental / circular control mode.
This should allow continuous spinning in step/dir input mode.

Note that instead of a fixed circular space, we could do a "reference shift on demand", as I described here

I believe this is ALMOST working, except shadow count will eventually roll over?

This is actually implemented since firmware v0.4.7.
A rollover of shadow_count shouldn't pose any issue since it's only used to calculate the delta between two encoder updates.


Post IDs to more seamlessly work with other groups.

Right now, post IDs look like:
http://<IP_ADDRESS>:8000/authors/43ec69f6-8adc-47cc-af3b-6339f3031985/posts/b8acce60-2222-4b27-9d16-051eedd8b929
This poses a problem with connecting with other groups. Ideally, all a group should have to do to connect is: assign the baseURL, and then make calls straight from the object field.

After configuring baseURL
For example, axios.get(post.comments) should get return all the post's comments from said endpoint.
As it stands though, the other groups (we already do this) need to apply additional parsing to work with our backend. Very yucky and not scalable.

This means that IDs of all sorts (particularly authors on the backend, since many other generated IDs are contingent on this path) need to be modified such that they're more accessible.

Donezo


Registering defaults while setting DefaultsKey

Can we consider registering default value to every static key while initialising
For eg:
let colorKey = DefaultsKey<String, UIColor>(["color": UIColor.grayColor()])

Where key named "color" would be set and default value would be set to gray using register user defaults

Having statically-defined default values would be very nice indeed. I need to consider more closely if there's a nice way to achieve that given current Swift limitations (no generic subscripts, no extending generic types, etc...)
Could you explain this bit?
DefaultsKey<String, UIColor>(["color": UIColor.grayColor()])

Why does it have two type params and a dictionary — I don't get it?

It does not have any syntactical significance. I coined it without giving much thought.
Yes, the dictionary does not makes sense. Tuple could have been better I guess, but might have limitations.

this feature would be great.

:+1:

Check out my pull request (#81) and see if that works for everyone (including @MaxHasADHD too). It adds an extended version of registerDefaults. I updated the readme docs and added a ton of unit tests for it. You'd use it like this:
let Defaults = NSUserDefaults.registerDefaults("Settings.plist")
let Defaults2 = NSUserDefaults.registerDefaults("Settings.plist", suiteName: "io.radex.SwiftyUserDefaults")
let Defaults3 = NSUserDefaults.registerDefaults(bundleName: "Settings")

let key1 = DefaultsKey<String>("MyString1")
Defaults[key1] == "My string value 1." // true

And the plist would look something like this:

This looks cool. Any issues so far, or would this be merge-able?


No ores as last update?

At work now, but as of yeaterdays update that seems to broke multiple mods, seems to of broke orrs dpawning in the shafts. I had a world save on sunday all worked flawless, but yesterday i made a new world, mined for 45min and not a single ore in any biome using same config as day before. Will double check the configs after work but putting this out case others get it t00

you were either unlucky or had a broken config in which case latest update shouldve fixed that


Leptos v0.6 (NOT the rewrite)

In the spirit of releasing incremental wins rather than waiting for one huge release, we've decided to release a 0.6.
This is not the larger rendering rewrite I've mentioned in the roadmap and elsewhere.
It contains two features:

Axum 0.7 support
a rewritten server function system that is backwards-compatible, but reduces binary size and increases flexibility, specifically by allowing

automatic setup of server fn handlers with .leptos_routes() from the integrations
a variety of additional built-in encodings (rkyv, multipart forms/file uploads) in addition to the current set (GET URL, POST URL, CBOR, Rkyv) (#1868, #1989)
support for streaming responses from server functions (#1284)
ability to create custom user encodings for input and output by deriving IntoReq, FromReq, IntoRes, and/or FromRes traits
ability to mix and match encodings easily: This server function should be a JSON POST request and a ByteStream response, this one should be GET URL request and an rkyv response, etc.; any combination of the encodings above is supported
custom error types (#1657)
a #[middleware] macro to add per-server-function middleware from the Tower or Actix ecosystems (#1461)

TODO

[x] serde-lite encoding (#1501)
[x] redirect handling on both client and server — i.e., if you call redirect(), both return the value and redirect when called from server fn client, and redirect when called as plain HTTP endpoint (#2069, #1358, #1513, #1600, #1604)

[x] Axum
[x] Actix

[x] update MultiActionForm in the same way ActionForm has been updated
[ ] set_server_url equivalent for Tauri/desktop settings
[ ] error handling in server actions (#1891, #2110)
[ ] Actix middleware setup
[ ] get docs into shape
[x] Actix integration migration
[x] Migrate remaining examples
[ ] iron out the API for the streaming types
[ ] Testing

Tested the server fn with serde-lite and got this error. Not sure why the view macro is expecting serde instead of serde-lite.

/var/folders/z9/1_txvfkx67g0v8ltmzb0ll_c0000gn/T/fsio_uG9oOEzOBS.sh: line 3: pidof: command not found
   Compiling todo_app_sqlite_axum v0.1.0 (/leptos/examples/todo_app_sqlite_axum)
error[E0277]: the trait bound `Todo: server_fn::serde::Serialize` is not satisfied
   --> src/todo.rs:115:17
    |
115 |     let todos = create_resource(
    |                 ^^^^^^^^^^^^^^^ the trait `server_fn::serde::Serialize` is not implemented for `Todo`
    |
    = help: the following other types implement trait `server_fn::serde::Serialize`:
              bool
              char
              isize
              i8
              i16
              i32
              i64
              i128
            and 164 others
    = note: required for `Vec<Todo>` to implement `server_fn::serde::Serialize`
    = note: 1 redundant requirement hidden
    = note: required for `Result<Vec<Todo>, leptos::ServerFnError>` to implement `server_fn::serde::Serialize`
    = note: required for `Result<Vec<Todo>, leptos::ServerFnError>` to implement `Serializable`
note: required by a bound in `leptos::create_resource`
   --> /leptos/leptos_reactive/src/resource.rs:103:8
    |
97  | pub fn create_resource<S, T, Fu>(
    |        --------------- required by a bound in this function
...
103 |     T: Serializable + 'static,
    |        ^^^^^^^^^^^^ required by this bound in `create_resource`

error[E0277]: the trait bound `Todo: server_fn::serde::Deserialize<'_>` is not satisfied
   --> src/todo.rs:115:17
    |
115 |     let todos = create_resource(
    |                 ^^^^^^^^^^^^^^^ the trait `server_fn::serde::Deserialize<'_>` is not implemented for `Todo`
    |
    = help: the following other types implement trait `server_fn::serde::Deserialize<'de>`:
              <bool as server_fn::serde::Deserialize<'de>>
              <char as server_fn::serde::Deserialize<'de>>
              <isize as server_fn::serde::Deserialize<'de>>
              <i8 as server_fn::serde::Deserialize<'de>>
              <i16 as server_fn::serde::Deserialize<'de>>
              <i32 as server_fn::serde::Deserialize<'de>>
              <i64 as server_fn::serde::Deserialize<'de>>
              <i128 as server_fn::serde::Deserialize<'de>>
            and 164 others
    = note: required for `Vec<Todo>` to implement `server_fn::serde::Deserialize<'_>`
    = note: 1 redundant requirement hidden
    = note: required for `Result<Vec<Todo>, leptos::ServerFnError>` to implement `for<'de> server_fn::serde::Deserialize<'de>`
    = note: required for `Result<Vec<Todo>, leptos::ServerFnError>` to implement `DeserializeOwned`
    = note: required for `Result<Vec<Todo>, leptos::ServerFnError>` to implement `Serializable`
note: required by a bound in `leptos::create_resource`
   --> /leptos/leptos_reactive/src/resource.rs:103:8
    |
97  | pub fn create_resource<S, T, Fu>(
    |        --------------- required by a bound in this function
...
103 |     T: Serializable + 'static,
    |        ^^^^^^^^^^^^ required by this bound in `create_resource`

error[E0277]: the trait bound `for<'de> AddTodo: server_fn::serde::Deserialize<'de>` is not satisfied
   --> src/todo.rs:122:30
    |
122 |             <MultiActionForm action=add_todo>
    |                              ^^^^^^ the trait `for<'de> server_fn::serde::Deserialize<'de>` is not implemented for `AddTodo`
    |
    = help: the following other types implement trait `server_fn::serde::Deserialize<'de>`:
              <bool as server_fn::serde::Deserialize<'de>>
              <char as server_fn::serde::Deserialize<'de>>
              <isize as server_fn::serde::Deserialize<'de>>
              <i8 as server_fn::serde::Deserialize<'de>>
              <i16 as server_fn::serde::Deserialize<'de>>
              <i32 as server_fn::serde::Deserialize<'de>>
              <i64 as server_fn::serde::Deserialize<'de>>
              <i128 as server_fn::serde::Deserialize<'de>>
            and 164 others
    = note: required for `AddTodo` to implement `DeserializeOwned`
note: required by a bound in `MultiActionFormPropsBuilder::<ServFn, ((), __class, __error, __node_ref, __attributes, __children)>::action`
   --> /leptos/router/src/components/form.rs:537:17
    |
519 |     action: MultiAction<ServFn, Result<ServFn::Output, ServerFnError>>,
    |     ------ required by a bound in this associated function
...
537 |         Clone + DeserializeOwned + ServerFn<InputEncoding = PostUrl> + 'static,
    |                 ^^^^^^^^^^^^^^^^ required by this bound in `MultiActionFormPropsBuilder::<ServFn, ((), __class, __error, __node_ref, __attributes, __children)>::action`

error[E0277]: the trait bound `for<'de> AddTodo: server_fn::serde::Deserialize<'de>` is not satisfied
   --> src/todo.rs:122:14
    |
122 |             <MultiActionForm action=add_todo>
    |              ^^^^^^^^^^^^^^^ the trait `for<'de> server_fn::serde::Deserialize<'de>` is not implemented for `AddTodo`
    |
    = help: the following other types implement trait `server_fn::serde::Deserialize<'de>`:
              <bool as server_fn::serde::Deserialize<'de>>
              <char as server_fn::serde::Deserialize<'de>>
              <isize as server_fn::serde::Deserialize<'de>>
              <i8 as server_fn::serde::Deserialize<'de>>
              <i16 as server_fn::serde::Deserialize<'de>>
              <i32 as server_fn::serde::Deserialize<'de>>
              <i64 as server_fn::serde::Deserialize<'de>>
              <i128 as server_fn::serde::Deserialize<'de>>
            and 164 others
    = note: required for `AddTodo` to implement `DeserializeOwned`
note: required by a bound in `leptos_router::MultiActionForm`
   --> /leptos/router/src/components/form.rs:537:17
    |
515 | pub fn MultiActionForm<ServFn>(
    |        --------------- required by a bound in this function
...
537 |         Clone + DeserializeOwned + ServerFn<InputEncoding = PostUrl> + 'static,
    |                 ^^^^^^^^^^^^^^^^ required by this bound in `MultiActionForm`

error[E0271]: type mismatch resolving `<AddTodo as ServerFn>::InputEncoding == PostUrl`
   --> src/todo.rs:120:5
    |
120 | /     view! {
121 | |

122 | |             <MultiActionForm action=add_todo>
123 | |
...   |
190 | |

191 | |     }
    | |_____^ expected `PostUrl`, found `SerdeLite`
    |
    = note: required for `MultiActionFormProps<AddTodo>` to implement `leptos::Props`
    = note: required for `fn(MultiActionFormProps<AddTodo>) -> impl leptos::IntoView {leptos_router::MultiActionForm::<AddTodo>}` to implement `leptos::Component<MultiActionFormProps<AddTodo>>`
note: required by a bound in `component_props_builder`
   --> /leptos/leptos/src/lib.rs:319:15
    |
318 | pub fn component_props_builder
(
    |        ----------------------- required by a bound in this function
319 |     _f: &impl Component
,
    |               ^^^^^^^^^^^^ required by this bound in `component_props_builder`
    = note: this error originates in the macro `view` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: the method `children` exists for struct `MultiActionFormPropsBuilder<AddTodo, ((MultiAction<AddTodo, Result<(), ServerFnError>>,), (), (), (), (), ())>`, but its trait bounds were not satisfied
   --> src/todo.rs:120:5
    |
58  |   #[server(output = SerdeLite, input = SerdeLite)]
    |   ------------------------------------------------
    |   |
    |   doesn't satisfy `<AddTodo as ServerFn>::InputEncoding = PostUrl`
    |   doesn't satisfy `AddTodo: DeserializeOwned`
    |   doesn't satisfy `AddTodo: server_fn::serde::Deserialize<'de>`
...
120 |       view! {
    |  _____^
121 | |

122 | |             <MultiActionForm action=add_todo>
123 | |
...   |
190 | |

191 | |     }
    | |_____^ method cannot be called due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `<AddTodo as ServerFn>::InputEncoding = PostUrl`
            `AddTodo: DeserializeOwned`
            `AddTodo: server_fn::serde::Deserialize<'de>`
            which is required by `AddTodo: DeserializeOwned`
note: the trait `DeserializeOwned` must be implemented
   --> /.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.195/src/de/mod.rs:607:1
    |
607 | pub trait DeserializeOwned: for<'de> Deserialize<'de> {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this error originates in the macro `view` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `for<'de> DeleteTodo: server_fn::serde::Deserialize<'de>` is not satisfied
   --> src/todo.rs:150:77
    |
150 | ...                   <ActionForm action=delete_todo>
    |                                   ^^^^^^ the trait `for<'de> server_fn::serde::Deserialize<'de>` is not implemented for `DeleteTodo`
    |
    = help: the following other types implement trait `server_fn::serde::Deserialize<'de>`:
              <bool as server_fn::serde::Deserialize<'de>>
              <char as server_fn::serde::Deserialize<'de>>
              <isize as server_fn::serde::Deserialize<'de>>
              <i8 as server_fn::serde::Deserialize<'de>>
              <i16 as server_fn::serde::Deserialize<'de>>
              <i32 as server_fn::serde::Deserialize<'de>>
              <i64 as server_fn::serde::Deserialize<'de>>
              <i128 as server_fn::serde::Deserialize<'de>>
            and 164 others
    = note: required for `DeleteTodo` to implement `DeserializeOwned`
note: required by a bound in `ActionFormPropsBuilder::<ServFn, ((), __class, __node_ref, __attributes, __children)>::action`
   --> /leptos/router/src/components/form.rs:443:13
    |
426 |     action: Action<
    |     ------ required by a bound in this associated function
...
443 |     ServFn: DeserializeOwned + ServerFn<InputEncoding = PostUrl> + 'static,
    |             ^^^^^^^^^^^^^^^^ required by this bound in `ActionFormPropsBuilder::<ServFn, ((), __class, __node_ref, __attributes, __children)>::action`

error[E0277]: the trait bound `for<'de> DeleteTodo: server_fn::serde::Deserialize<'de>` is not satisfied
   --> src/todo.rs:150:66
    |
150 | ...                   <ActionForm action=delete_todo>
    |                        ^^^^^^^^^^ the trait `for<'de> server_fn::serde::Deserialize<'de>` is not implemented for `DeleteTodo`
    |
    = help: the following other types implement trait `server_fn::serde::Deserialize<'de>`:
              <bool as server_fn::serde::Deserialize<'de>>
              <char as server_fn::serde::Deserialize<'de>>
              <isize as server_fn::serde::Deserialize<'de>>
              <i8 as server_fn::serde::Deserialize<'de>>
              <i16 as server_fn::serde::Deserialize<'de>>
              <i32 as server_fn::serde::Deserialize<'de>>
              <i64 as server_fn::serde::Deserialize<'de>>
              <i128 as server_fn::serde::Deserialize<'de>>
            and 164 others
    = note: required for `DeleteTodo` to implement `DeserializeOwned`
note: required by a bound in `leptos_router::ActionForm`
   --> /leptos/router/src/components/form.rs:443:13
    |
422 | pub fn ActionForm<ServFn>(
    |        ---------- required by a bound in this function
...
443 |     ServFn: DeserializeOwned + ServerFn<InputEncoding = PostUrl> + 'static,
    |             ^^^^^^^^^^^^^^^^ required by this bound in `ActionForm`

error[E0271]: type mismatch resolving `<DeleteTodo as ServerFn>::InputEncoding == PostUrl`
   --> src/todo.rs:146:57
    |
146 | / ...                   view! {
147 | | ...
148 | | ...

149 | | ...                           {todo.title}
...   |
154 | | ...

155 | | ...                   }
    | |_______________________^ expected `PostUrl`, found `SerdeLite`
    |
    = note: required for `ActionFormProps<DeleteTodo>` to implement `leptos::Props`
    = note: required for `fn(ActionFormProps<DeleteTodo>) -> impl leptos::IntoView {leptos_router::ActionForm::<DeleteTodo>}` to implement `leptos::Component<ActionFormProps<DeleteTodo>>`
note: required by a bound in `component_props_builder`
   --> /leptos/leptos/src/lib.rs:319:15
    |
318 | pub fn component_props_builder
(
    |        ----------------------- required by a bound in this function
319 |     _f: &impl Component
,
    |               ^^^^^^^^^^^^ required by this bound in `component_props_builder`
    = note: this error originates in the macro `view` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: the method `children` exists for struct `ActionFormPropsBuilder<DeleteTodo, ((Action<DeleteTodo, Result<(), ServerFnError>>,), (), (), (), ())>`, but its trait bounds were not satisfied
   --> src/todo.rs:146:57
    |
76  |   #[server(output = SerdeLite, input = SerdeLite)]
    |   ------------------------------------------------
    |   |
    |   doesn't satisfy `<DeleteTodo as ServerFn>::InputEncoding = PostUrl`
    |   doesn't satisfy `DeleteTodo: DeserializeOwned`
    |   doesn't satisfy `DeleteTodo: server_fn::serde::Deserialize<'de>`
...
146 |                                                           view! {
    |  _________________________________________________________^
147 | |
148 | |

149 | |                                                                 {todo.title}
...   |
154 | |

155 | |                                                         }
    | |_________________________________________________________^ method cannot be called due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `<DeleteTodo as ServerFn>::InputEncoding = PostUrl`
            `DeleteTodo: DeserializeOwned`
            `DeleteTodo: server_fn::serde::Deserialize<'de>`
            which is required by `DeleteTodo: DeserializeOwned`
note: the trait `DeserializeOwned` must be implemented
   --> /.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.195/src/de/mod.rs:607:1
    |
607 | pub trait DeserializeOwned: for<'de> Deserialize<'de> {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this error originates in the macro `view` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `for<'de> AddTodo: server_fn::serde::Deserialize<'de>` is not satisfied
   --> src/todo.rs:120:5
    |
120 | /     view! {
121 | |

122 | |             <MultiActionForm action=add_todo>
123 | |
...   |
190 | |

191 | |     }
    | |_____^ the trait `for<'de> server_fn::serde::Deserialize<'de>` is not implemented for `AddTodo`
    |
    = help: the following other types implement trait `server_fn::serde::Deserialize<'de>`:
              <bool as server_fn::serde::Deserialize<'de>>
              <char as server_fn::serde::Deserialize<'de>>
              <isize as server_fn::serde::Deserialize<'de>>
              <i8 as server_fn::serde::Deserialize<'de>>
              <i16 as server_fn::serde::Deserialize<'de>>
              <i32 as server_fn::serde::Deserialize<'de>>
              <i64 as server_fn::serde::Deserialize<'de>>
              <i128 as server_fn::serde::Deserialize<'de>>
            and 164 others
    = note: required for `AddTodo` to implement `DeserializeOwned`
    = note: required for `MultiActionFormProps<AddTodo>` to implement `leptos::Props`
    = note: this error originates in the macro `view` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `for<'de> DeleteTodo: server_fn::serde::Deserialize<'de>` is not satisfied
   --> src/todo.rs:146:57
    |
146 | / ...                   view! {
147 | | ...
148 | | ...

149 | | ...                           {todo.title}
...   |
154 | | ...

155 | | ...                   }
    | |_______________________^ the trait `for<'de> server_fn::serde::Deserialize<'de>` is not implemented for `DeleteTodo`
    |
    = help: the following other types implement trait `server_fn::serde::Deserialize<'de>`:
              <bool as server_fn::serde::Deserialize<'de>>
              <char as server_fn::serde::Deserialize<'de>>
              <isize as server_fn::serde::Deserialize<'de>>
              <i8 as server_fn::serde::Deserialize<'de>>
              <i16 as server_fn::serde::Deserialize<'de>>
              <i32 as server_fn::serde::Deserialize<'de>>
              <i64 as server_fn::serde::Deserialize<'de>>
              <i128 as server_fn::serde::Deserialize<'de>>
            and 164 others
    = note: required for `DeleteTodo` to implement `DeserializeOwned`
    = note: required for `ActionFormProps<DeleteTodo>` to implement `leptos::Props`
    = note: this error originates in the macro `view` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0271, E0277, E0599.
For more information about an error, try `rustc --explain E0271`.
error: could not compile `todo_app_sqlite_axum` (lib) due to 12 previous errors

@rakshith-ravi I'm seeing two different categories of error

I think your PR to add serde-lite enables it with the serde-lite feature on leptos. These features were/are poorly designed by me — serde-lite actually switches all resources to use serde-lite rather than serde by default. (Planning to change this in an upcoming version). So it's probably best to enable serde-lite server fns by enabling the serde-lite feature on server_fn directly as a depedency. Or I guess we could add additional features to leptos like server-fn-serde-lite but that seems like a lot of duplication to keep them in sync.
ActionForm is set up only to accept server fns that use PostUrl as the input encoding. This is so that, if there's no JS/WASM, it can directly post the form data and succeed. It looks like you tried to use SerdeLite as the input encoding for a server function that's then used in an ActionForm and the compiler (correctly) rejects it.

I think SerdeLite should work as the output encoding in that case, or for other server functions not used with ActionForm.

I just wanted to test the new 0.6 beta release and I am not able to compile server_fn with this release.
I probably just messed something up, but I get a few errors with the ServerFnError and the try_into_ fn's not being Send.
The compile erros are coming up when cargo-leptos compiles the wasm binary.

All my leptos dependencies are using 0.6.0-beta.
Backend is axum
server_fn with the following features:
server_fn = { workspace = true, features = ["axum", "reqwest", "rustls", "ssr"] }

I checked the example diff's and I guess I am just missing something, maybe you can give me a hint.
I guess all of these errors come up for the same reason, here is a small example of these errors:
error: future cannot be sent between threads safely
  --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.0-beta/src/response/reqwest.rs:8:5
   |
8  |     async fn try_into_string(self) -> Result<String, ServerFnError<CustErr>> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `try_into_string` is not `Send`
   |
   = help: within `impl futures::Future<Output = std::result::Result<std::string::String, ServerFnError<CustErr>>>`, the trait `std::marker::Send` is not implemented for `*mut u8`
note: captured value is not `Send`
  --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.0-beta/src/response/reqwest.rs:8:30
   |
8  |     async fn try_into_string(self) -> Result<String, ServerFnError<CustErr>> {
   |                              ^^^^ has type `reqwest::Response` which is not `Send`
note: required by a bound in `ClientRes::{opaque#0}`
  --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.0-beta/src/response/mod.rs:56:73
   |
56 |     ) -> impl Future<Output = Result<String, ServerFnError<CustErr>>> + Send;
   |                                                                         ^^^^ required by this bound in `ClientRes::{opaque#0}`

error[E0277]: `Rc<RefCell<wasm_bindgen_futures::Inner>>` cannot be sent between threads safely
   --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.0-beta/src/response/reqwest.rs:8:5
    |
8   |     async fn try_into_string(self) -> Result<String, ServerFnError<CustErr>> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |     |
    |     `Rc<RefCell<wasm_bindgen_futures::Inner>>` cannot be sent between threads safely
    |     within this `impl futures::Future<Output = std::result::Result<std::string::String, ServerFnError<CustErr>>>`
    |
    = help: within `impl futures::Future<Output = std::result::Result<std::string::String, ServerFnError<CustErr>>>`, the trait `std::marker::Send` is not implemented for `Rc<RefCell<wasm_bindgen_futures::Inner>>`
note: required because it appears within the type `JsFuture`
   --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-futures-0.4.40/src/lib.rs:101:12
    |
101 | pub struct JsFuture {
    |            ^^^^^^^^
    = note: required because it captures the following types: `wasm_bindgen_futures::JsFuture`
note: required because it's used within this `async` fn body
   --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.11.23/src/wasm/mod.rs:20:1
    |
20  | / {
21  | |     use wasm_bindgen_futures::JsFuture;
22  | |
23  | |     let js_val = JsFuture::from(promise).await.map_err(crate::error::wasm)?;
...   |
27  | |         .map_err(|_js_val| "promise resolved to unexpected type".into())
28  | | }
    | |_^
    = note: required because it captures the following types: `reqwest::Response`, `impl futures::Future<Output = std::result::Result<JsValue, Box<(dyn StdError + std::marker::Send + Sync + 'static)>>>`
note: required because it's used within this `async` fn body
   --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.11.23/src/wasm/response.rs:99:54
    |
99  |       pub async fn text(self) -> crate::Result<String> {
    |  ______________________________________________________^
100 | |         let p = self
101 | |             .http
102 | |             .body()
...   |
113 | |         }
114 | |     }
    | |_____^
    = note: required because it captures the following types: `impl futures::Future<Output = std::result::Result<std::string::String, reqwest::Error>>`
note: required because it's used within this `async` fn body
   --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.0-beta/src/response/reqwest.rs:8:78
    |
8   |       async fn try_into_string(self) -> Result<String, ServerFnError<CustErr>> {
    |  ______________________________________________________________________________^
9   | |         self.text()
10  | |             .await
11  | |             .map_err(|e| ServerFnError::Deserialization(e.to_string()))
12  | |     }
    | |_____^
note: required by a bound in `ClientRes::{opaque#0}`
   --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.0-beta/src/response/mod.rs:56:73
    |
56  |     ) -> impl Future<Output = Result<String, ServerFnError<CustErr>>> + Send;
    |                                                                         ^^^^ required by this bound in `ClientRes::{opaque#0}`

error: future cannot be sent between threads safely
  --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.0-beta/src/response/reqwest.rs:14:5
   |
14 |     async fn try_into_bytes(self) -> Result<Bytes, ServerFnError<CustErr>> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `try_into_bytes` is not `Send`
   |
   = help: within `impl futures::Future<Output = std::result::Result<bytes::Bytes, ServerFnError<CustErr>>>`, the trait `std::marker::Send` is not implemented for `*mut u8`
note: captured value is not `Send`
  --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.0-beta/src/response/reqwest.rs:14:29
   |
14 |     async fn try_into_bytes(self) -> Result<Bytes, ServerFnError<CustErr>> {
   |                             ^^^^ has type `reqwest::Response` which is not `Send`
note: required by a bound in `ClientRes::{opaque#1}`
  --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.0-beta/src/response/mod.rs:61:72
   |
61 |     ) -> impl Future<Output = Result<Bytes, ServerFnError<CustErr>>> + Send;
   |                                                                        ^^^^ required by this bound in `ClientRes::{opaque#1}`

error[E0277]: `Rc<RefCell<wasm_bindgen_futures::Inner>>` cannot be sent between threads safely
   --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.0-beta/src/response/reqwest.rs:14:5
    |
14  |     async fn try_into_bytes(self) -> Result<Bytes, ServerFnError<CustErr>> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |     |
    |     `Rc<RefCell<wasm_bindgen_futures::Inner>>` cannot be sent between threads safely
    |     within this `impl futures::Future<Output = std::result::Result<bytes::Bytes, ServerFnError<CustErr>>>`
    |
    = help: within `impl futures::Future<Output = std::result::Result<bytes::Bytes, ServerFnError<CustErr>>>`, the trait `std::marker::Send` is not implemented for `Rc<RefCell<wasm_bindgen_futures::Inner>>`
note: required because it appears within the type `JsFuture`
   --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasm-bindgen-futures-0.4.40/src/lib.rs:101:12
    |
101 | pub struct JsFuture {
    |            ^^^^^^^^
    = note: required because it captures the following types: `wasm_bindgen_futures::JsFuture`
note: required because it's used within this `async` fn body
   --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.11.23/src/wasm/mod.rs:20:1
    |
20  | / {
21  | |     use wasm_bindgen_futures::JsFuture;
22  | |
23  | |     let js_val = JsFuture::from(promise).await.map_err(crate::error::wasm)?;
...   |
27  | |         .map_err(|_js_val| "promise resolved to unexpected type".into())
28  | | }
    | |_^
    = note: required because it captures the following types: `reqwest::Response`, `impl futures::Future<Output = std::result::Result<JsValue, Box<(dyn StdError + std::marker::Send + Sync + 'static)>>>`
note: required because it's used within this `async` fn body
   --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/reqwest-0.11.23/src/wasm/response.rs:117:54
    |
117 |       pub async fn bytes(self) -> crate::Result<Bytes> {
    |  ______________________________________________________^
118 | |         let p = self
119 | |             .http
120 | |             .body()
...   |
132 | |         Ok(bytes.into())
133 | |     }
    | |_____^
    = note: required because it captures the following types: `impl futures::Future<Output = std::result::Result<bytes::Bytes, reqwest::Error>>`
note: required because it's used within this `async` fn body
   --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.0-beta/src/response/reqwest.rs:14:76
    |
14  |       async fn try_into_bytes(self) -> Result<Bytes, ServerFnError<CustErr>> {
    |  ____________________________________________________________________________^
15  | |         self.bytes()
16  | |             .await
17  | |             .map_err(|e| ServerFnError::Deserialization(e.to_string()))
18  | |     }
    | |_____^
note: required by a bound in `ClientRes::{opaque#1}`
   --> /home/sd/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.0-beta/src/response/mod.rs:61:72
    |
61  |     ) -> impl Future<Output = Result<Bytes, ServerFnError<CustErr>>> + Send;
    |                                                                        ^^^^ required by this bound in `ClientRes::{opaque#1}`

@sebadob Are you trying to use reqwest as a browser/WASM client here? Reqwest is supported as a client for desktop use but the default one for browser use should be the browser client.
reqwest::Response is Send but the errors show it's in a WASM environment here. Remove the reqwest feature and we should find a way to document the above.

@gbj I digged a bit deeper and found the problem:
I had rustls as a feature for leptos in the workspace root. This was not a problem before.
Now, when rustls is added globally for leptos, during wasm compilation we would get as dependencies:
leptos -> leptos_dom -> server_fn -> reqwest
...which caused the errors.
The solution is dead simple. I just removed rustls globally and only added it in the server crate as a feature.
I don't now if this error would be expected in that case, its just a difference from v0.5.
Now I can go on adopting my extractors in my server functions.

Just to give you some feedback on the binary size.
I tested this on a real application.
v0.5
The WASM uncompressed was 2.6MB, with brotli 612kB.
v0.6
Just with the migration to v0.6 and without using any of the more efficient encodings, the WASM size uncompressed went down to 2.2MB and with brotli to 537kB.
This is a really nice improvement. Great work!

Just with the migration to v0.6 and without using any of the more efficient encodings, the WASM size uncompressed went down to 2.2MB and with brotli to 537kB.

That's really good news and exactly the sort of thing we were hoping to unlock with this change from an enum-based to a trait-based approach.
It's the same conceptual shift I'm planning to bring to reactivity and rendering in upcoming versions so it's good to see it works out well with server functions in a real app.
Thanks for sharing those results.

@gbj I digged a bit deeper and found the problem:
...
btw I only added reqwest as a feature for server_fn because I saw this error and wanted to check, if adding it would fix the issue. server_fn adds reqwest as soon as rustls is present.

Thanks as always @sebadob. TIL about "weak dependency features" in cargo: rather than rustls = ["reqwest/rustls"] we want rustls = ["reqwest?/rustls"] so it activates the feature on reqwest if reqwest has been enabled, but doesn't enable rustls by itself. Should be fixed now.

I didn't know that something like weak dependencies exist
This is really good to know, thanks!

Based on conversations I've had with people, just want to add a side note for any end user following this PR - Leptos 0.6, while we strive to release as soon as possible, will be ready when it's ready. Pushing for a sooner release will only result in missteps. We shall spend a lot of time testing this in RCs before we publish the final version, just like how we did with 0.5. While I do understand that Axum 0.7 support is something we are all looking forward to, having a more stable release a week or two later is better than a botched release that requires us to break our heads over fixes. Axum 0.6 is not so bad after all 😅
That being said, when we do release 0.6, it's definitely gonna be a fun one. It's one to look forward to 😄

I have merged this branch into main for my sanity. Feel free to continue opening issues or PRs to the main branch for any changes that need to happen before release. I'll release an rc1 in the next few days.


A possible implementation of fetching the Kicksecure configs from upstream

Relevant: #7
Have not tested yet

Looks good so far. I'm not an expert nix dev, by any stretch of the imagination. I'll try to do some manual testing later.

Looks good so far. I'm not an expert nix dev, by any stretch of the imagination. I'll try to do some manual testing later.

if you have any questions or want me to refine the implementation, feel free to ping me :)

fyi, i also inadvertently updated the configs to the latest commit of today, which was easier than looking which commit the configs were from. They probably haven't changed anyway, but just thought you might want to know.

An alternative implementation is pulling the entire kicksecure repository into the file with fetchGithub function(? may be named differently) and referencing from that, but i decided against it since it unnecessarily increases your closure size by the size of the repository, when we are picking out 3 files. That also would not let you pick out the files from different commits of the repository.

(just merged the formatting changes i made from before)

An alternative implementation is pulling the entire kicksecure repository into the file with fetchGithub function(? may be named differently) and referencing from that, but i decided against it since it unnecessarily increases your closure size by the size of the repository, when we are picking out 3 files. That also would not let you pick out the files from different commits of the repository.

We don't want to do that (for now) when a good chunk of the repository doesn't apply to NixOS. Debian/apt specific hardening, miscellaneous configuration files to unbreak xfce, scripts that don't have anywhere to go, etc.

We don't want to do that (for now) when a good chunk of the repository doesn't apply to NixOS. Debian/apt specific hardening, miscellaneous configuration files to unbreak xfce, scripts that don't have anywhere to go, etc.

I did not explicitly mean to apply all files. But the method pulls the repository into the nix store (imagine git cloning the repository into the store) (thus making nix-mineral depend on the kicksecure repository being in the store) then you can reference the store path in nix-mineral.nix. That is the same way the flake method works for using nix-mineral, it pulls this repository into the store, and you reference the path to nix-mineral.nix with "${inputs.nix-mineral}/nix-mineral.nix" which evaluates to a nix store path with this repository in it.

I did not explicitly mean to apply all files. But the method pulls the repository into the nix store (imagine git cloning the repository into the store) (thus making nix-mineral depend on the kicksecure repository being in the store) then you can reference the store path in nix-mineral.nix. That is the same way the flake method works for using nix-mineral (apart from this would not be dependent on flakes. it could be if you wanted it to, though), it pulls this repository into the store, and you reference the path to nix-mineral.nix with "${inputs.nix-mineral}/nix-mineral.nix" which evaluates to the nix store path of this repository that was pulled in by the flake.

That makes more sense to me now.
On further observation, I don't think closure size would be a big problem for 99% of people, since the whole repository takes only 5.2mb and NixOS is already way too chunky by design to be penny pinching at that those sizes.
Then it becomes the question of weighing against how much we trust Kicksecure to submit reasonably stable commits vs. not trusting them and picking the individual commits manually.
Given the current implementation of nix-mineral (manually defining sysctl, boot parameters, etc) I think using fetchGhFile makes the most sense at the moment. There's no point to completely anchoring to another repository on a few things when manual maintenance would still be needed on our end anyways.

The only downside of this method is the upl dating commits and hashes, but its kinda a non-issue because i don't think its too hard to update the commits once in a while - i could probably make a github action to automate it too by checking if the file changes (probably manual trigger so you can audit the new code)

The only downside of this method is the updating commits and hashes, but its kinda a non-issue because i don't think its too hard to update the commits once in a while - i could probably make a github action to automate it too by checking if the file changes (probably manual trigger so you can audit the new code)

Great idea! I'm all for it if it makes maintenance easier.


CI hasn't passed in months

A few failures I can see:
https://circleci.com/gh/GoogleCloudPlatform/ruby-docs-samples/1182

Google Analytics on Google App Engine
  can track visit event (PENDING: End-to-end tests skipped)

Pending: (Failures listed here are expected and do not affect your suite's status)

  1) Google Analytics on Google App Engine can track visit event
     # End-to-end tests skipped
     # ./spec/google_analytics_spec.rb:29

Finished in 0.0007 seconds (files took 0.44262 seconds to load)
1 example, 0 failures, 1 pending

> gcloud app versions delete -analytics-1182 -q
ERROR: (gcloud.app.versions.delete) unrecognized arguments: -analytics-1182
Usage: gcloud app versions delete VERSIONS [VERSIONS ...] [optional flags]
  optional flags may be  --help | --service

For detailed information on this command and its flags, run:
  gcloud app versions delete --help

Failed to delete e2e version

Failures:

  1) Cat Friends should display a list of cats
     Failure/Error: raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}"

     ActionController::RoutingError:
       No route matches [GET] "/assets/application-63d002b4806ba81b3fd0ee343c8d37f5160ede65d821329ab2ce721f09280c3a.css"
     # /opt/circleci/.rvm/gems/ruby-2.3.4/gems/railties-5.1.3/lib/rails/rack/logger.rb:36:in `call_app'
     # /opt/circleci/.rvm/gems/ruby-2.3.4/gems/railties-5.1.3/lib/rails/rack/logger.rb:24:in `block in call'
     # /opt/circleci/.rvm/gems/ruby-2.3.4/gems/railties-5.1.3/lib/rails/rack/logger.rb:24:in `call'
     # /opt/circleci/.rvm/gems/ruby-2.3.4/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call'
     # /opt/circleci/.rvm/gems/ruby-2.3.4/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call'
     # /opt/circleci/.rvm/gems/ruby-2.3.4/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call'
     # /opt/circleci/.rvm/gems/ruby-2.3.4/gems/railties-5.1.3/lib/rails/engine.rb:522:in `call'
     # /opt/circleci/.rvm/gems/ruby-2.3.4/gems/rack-2.0.3/lib/rack/urlmap.rb:68:in `block in call'
     # /opt/circleci/.rvm/gems/ruby-2.3.4/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `each'
     # /opt/circleci/.rvm/gems/ruby-2.3.4/gems/rack-2.0.3/lib/rack/urlmap.rb:53:in `call'
     # /opt/circleci/.rvm/gems/ruby-2.3.4/gems/capybara-2.15.1/lib/capybara/server.rb:44:in `call'
     # /opt/circleci/.rvm/gems/ruby-2.3.4/gems/rack-2.0.3/lib/rack/handler/webrick.rb:86:in `service'
     # ------------------
     # --- Caused by: ---
     # Capybara::CapybaraError:
     #   Your application server raised an error - It has been raised in your test code because Capybara.raise_server_errors == true
     #   /opt/circleci/.rvm/gems/ruby-2.3.4/gems/capybara-2.15.1/lib/capybara/session.rb:145:in `raise_server_error!'

Failures:

  1) Google Cloud Spanner API samples create_database
     Failure/Error:
       create_database project_id:  @project_id,
                       instance_id: @instance.instance_id,
                       database_id: @database_id

     Google::Cloud::ResourceExhaustedError:
       8:Unable to create database 'test_database_1512163400' because the instance 'projects/cloud-samples-tests-ruby/instances/cloud-samples-tests-instance' has already reached the maximum database limit (100). Please delete a database in the instance and try again, or choose a different instance.

Failures:

  1) Detect Faces detect faces from local image file
     Failure/Error:
       expect {
         detect_faces project_id: @project_id,
                      image_path: image_path("face_no_surprise.jpg")
       }.to output(
         /Surprise: false/
       ).to_stdout

       expected block to output /Surprise: false/ to stdout, but output "Joy:      true\nAnger:    true\nSorrow:   false\nSurprise: true\n"
       Diff:
       @@ -1,2 +1,5 @@
       -/Surprise: false/
       +Joy:      true
       +Anger:    true
       +Sorrow:   false
       +Surprise: true

     # ./spec/detect_faces_spec.rb:34:in `block (2 levels) in <top (required)>'

  2) Detect Faces detect faces from image file in Google Cloud Storage
     Failure/Error:
       expect {
         detect_faces_gcs project_id: @project_id,
                          image_path: storage_file.to_gs_url
       }.to output(
         /Surprise: false/
       ).to_stdout

       expected block to output /Surprise: false/ to stdout, but output "Joy:      true\nAnger:    true\nSorrow:   false\nSurprise: true\n"
       Diff:
       @@ -1,2 +1,5 @@
       -/Surprise: false/
       +Joy:      true
       +Anger:    true
       +Sorrow:   false
       +Surprise: true

     # ./spec/detect_faces_spec.rb:46:in `block (2 levels) in <top (required)>'

Finished in 30.42 seconds (files took 0.56411 seconds to load)
22 examples, 2 failures

Failures:

  1) Datastore sample supports inequality_range
     Failure/Error: expect(tasks.size).to eq(1)

       expected: 1
            got: 2

       (compared using ==)
     # ./spec/sample_spec.rb:345:in `block (2 levels) in <top (required)>'

  2) Datastore sample supports equal_and_inequality_range
     Failure/Error: expect(tasks.size).to eq(1)

       expected: 1
            got: 2

       (compared using ==)
     # ./spec/sample_spec.rb:360:in `block (2 levels) in <top (required)>'

Finished in 13.13 seconds (files took 0.23901 seconds to load)
60 examples, 2 failures

Failed examples:

rspec ./spec/sample_spec.rb:340 # Datastore sample supports inequality_range
rspec ./spec/sample_spec.rb:355 # Datastore sample supports equal_and_inequality_range

/cc @frankyn @bshaffer

I'll review errors after my next meeting. If you have time @bshaffer, I'd appreciate your help!

@broady I started trying to address the issues in PR#211, and haven't completed this task. I'll see if I can green the tests. I'd like to introduce kokoro into the repo, but I haven't prioritized that. I'll see how far I get with fixing tests before I venture down that path.
If you have tips on how to best deal with this state I'd appreciate your input. Thank you!

sounds good. i have a lot of things learned from deflaking the Go tests that I should share. a few things:

retries within the tests
using a project pool for proper resource segregation
aggressive cleanup, aided by the project pool
deterministic resource names, aided by the project pool

but it looks like there's a bunch of low hanging fruit for these ones. for example, it looks like the spanner db's aren't being cleaned up.

Thanks Chris,

Updated Spanner tests to be deterministic
Added waiting before asserting an expectation on a logging.
Updated Gemfile.lock files (need to do this automatically in the future as this is done locally and using a PR).
Added additional Ruby versions to test on.
Fixed a few small errors in a few other samples that made it into the repo.

I'm waiting for tests to finish to get an idea of where CircleCI is now. If you could help with proper resource segregation that would be awesome!

Added retries to the following sample tests:
Storage
Pubsub
Datastore
Next item will be to add kokoro support unless we should introduce project resource pools first? @broady

Status update: Master passed. Pubsub passed after retries kicked in when testing Ruby 2.4.2. Flaky test is pulls a message.

Nice! Let's leave it at that for now.

Sg!

@broady, I recalled that AppEngine e2e tests are not being tested at the moment. The tests currently timeout CircleCI before completing. Reviewing in a follow-up PR.

Ran e2e tests: https://circleci.com/gh/GoogleCloudPlatform/ruby-docs-samples/1225
I think this is a good reason to move over to kokoro as the e2e tests timeout CircleCI. An alternative is to split tests into multiple nodes.

Do the e2e tests run in parallel?

No, they are not set up that way.
On Dec 12, 2017 9:14 AM, "Chris Broadfoot"<EMAIL_ADDRESS>wrote:

Do the e2e tests run in parallel?
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/ruby-docs-samples/issues/218#issuecomment-351119892,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB0bwNX6l_8ClopAJKkPRjPlbASHIqFtks5s_rR_gaJpZM4Q4dSC
.

@tbpg, could you provide an update here, or close if this is resolved? thanks!

@broady progress is being tracked here: https://github.com/GoogleCloudPlatform/ruby-docs-samples/issues/251


Error downloading third party data

javier@my_computer:~/repo$ python scripts/download_third_party_data.py
Downloading third party software...
Downloading punkt tokenizer
[nltk_data] Downloading package 'punkt' to /home/javier/nltk_data...
[nltk_data]   Unzipping tokenizers/punkt.zip.
Downloading wordnet
[nltk_data] Downloading package 'wordnet' to /home/javier/nltk_data...
[nltk_data]   Unzipping corpora/wordnet.zip.
Traceback (most recent call last):
File "scripts/download_third_party_data.py", line 17, in
download_third_party_data()
File "scripts/download_third_party_data.py", line 11, in download_third_party_data
download_tagger()
File "/home/javier/repo/iepy/tagger.py", line 67, in download
os.mkdir(DIRS.user_data_dir)
OSError: [Errno 2] No such file or directory: '/home/javier/.config/iepy'

@jmansilla
root@f5dbe915d605:/# iepy --download-third-party-data
/usr/local/lib/python3.5/dist-packages/sklearn/utils/fixes.py:55: DeprecationWarning: inspect.getargspec() is         deprecated, use inspect.signature() instead
  if 'order' in inspect.getargspec(np.copy)[0]:
Traceback (most recent call last):
  File "/usr/local/bin/iepy", line 7, in <module>
    from iepy.instantiation.command_line import execute_from_command_line
  File "/usr/local/lib/python3.5/dist-packages/iepy/instantiation/command_line.py", line 25, in <module>
    from iepy.instantiation.instance_admin import InstanceManager
  File "/usr/local/lib/python3.5/dist-packages/iepy/instantiation/instance_admin.py", line 11, in <module>
    from iepy import defaults
  File "/usr/local/lib/python3.5/dist-packages/iepy/defaults.py", line 3, in <module>
    from iepy.utils import make_feature_list
  File "/usr/local/lib/python3.5/dist-packages/iepy/utils.py", line 19, in <module>
    os.mkdir(DIRS.user_data_dir)
FileNotFoundError: [Errno 2] No such file or directory: '/root/.config/iepy'

Have to mkdir /root/.config first

Yes, it does indeed looks like a bug.
Non related, but probably using iepy with a regular user instead of root (the recommended) this bug wont bite you.


appcenter codepush release-react does not handle monorepo

Our monorepo uses yarn workspaces, and has a fairly standard layout:
/projectRoot
    /node_modules (most get installed here)
    /packages
        /app
        /shared
        /web

When running release-react in a monorepo the command fails with a none-too-helpful error message (see below). This command works as expected for releasing to iOS, but does not work for Android.
$ appcenter codepush release-react -a "$ANDROID_APP" -d Beta -t "0.1.1" --description="Just testing" --entry-file=packages/app/index.js
Running "react-native bundle" command:

node node_modules/react-native/local-cli/cli.js bundle --assets-dest /var/folders/jq/4ys69bn17876bf9sxgc6xvz40000gn/T/code-push2019112-44087-7vedqb.yw2wv/CodePush --bundle-output /var/folders/jq/4ys69bn17876bf9sxgc6xvz40000gn/T/code-push2019112-44087-7vedqb.yw2wv/CodePush/index.android.bundle --dev false --entry-file packages/app/index.js --platform android
Loading dependency graph, done.

info Writing bundle output to:, /var/folders/jq/4ys69bn17876bf9sxgc6xvz40000gn/T/code-push2019112-44087-7vedqb.yw2wv/CodePush/index.android.bundle
info Done writing bundle output
info Copying 49 asset files
info Done copying assets
Error: Failed to release a CodePush update.

Adding the --debug flag does not add any additional info.
I've been able to work around this by running appcenter codepush release on the intermediate bundled output of the release-react command, but this seems hacky and I'm not even sure its correct.
OUTPUT_DIR="/tmp"
$ appcenter codepush release-react -a "$APP" -d Production -t "$1" --description="$2" --entry-file=packages/app/index.js --output-dir="$OUTPUT_DIR"
$ appcenter codepush release -a "$APP" -d Production -t "$1" --description="$2" -c "$OUTPUT_DIR"

Thanks for the note. We are looking into it. I will share more info once I have an update.

I'm also having issue with getting cli (v2.4.0) release command working in a monoreporo setup (same folder structure as OP). When running appcenter codepush release-react --app AppName/android cli tool is not able to locate node_modules (which in monorepo case is usually located in the root of monorepo and not root of the react-native application.
The output I get when running:
Running "react-native bundle" command:

node node_modules\react-native\local-cli\cli.js bundle --assets-dest C:\Users\Tadej\AppData\Local\Temp\code-push2020313-12184-85hs3u.ebk8\CodePush --bundle-output C:\Users\Tadej\AppData\Local\Temp\code-push2020313
-12184-85hs3u.ebk8\CodePush\index.android.bundle --dev false --entry-file index.js --platform android
internal/modules/cjs/loader.
js:638
    throw err;
    ^

Error: Cannot find module 'C:\Users\Tadej\WebstormProjects\my_project\packages\mobile\node_modules\react-native\local-cli\cli.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
Error: Failed to release a CodePush update.

Btw, for react-native-code-push I was able to work around same issue by setting nodeModulesPath inside gradle.properties.

@tad3j I'm doing the following:

Bundle the JavaScript from the package directory in the monorepo:

rm -rf codepush
mkdir codepush
cd {ROOT OF MONOREPO}
node node_modules/react-native/local-cli/cli.js bundle --platform ios --dev false --entry-file {PACKAGE_PATH}/index.js --bundle-output {PACKAGE_PATH}/codepush/main.jsbundle --assets-dest {PACKAGE_PATH}/codepush

Then releasing it with the release command instead of release-react:

appcenter codepush release -d Staging -a {APP_NAME} -c ./codepush

Hope this helps.

@wmcbain , thank's, will try it out. Bellow is my solution, which let's met run a batch file from repository root:
REM workaround
cd packages\mobile
mv node_modules node_modules_tmp
mklink /D node_modules ..\..\node_modules
REM CODE-PUSH for staging
call yarn code-push:android-staging
REM CLEANUP
rm node_modules
mv node_modules_tmp node_modules
cd ..\..

@tad3j I'm doing the following:

Bundle the JavaScript from the package directory in the monorepo:

rm -rf codepush
mkdir codepush
cd {ROOT OF MONOREPO}
node node_modules/react-native/local-cli/cli.js bundle --platform ios --dev false --entry-file {PACKAGE_PATH}/index.js --bundle-output {PACKAGE_PATH}/codepush/main.jsbundle --assets-dest {PACKAGE_PATH}/codepush

Then releasing it with the release command instead of release-react:

appcenter codepush release -d Staging -a {APP_NAME} -c ./codepush

Hope this helps.

Thanks - this worked for my monorepo approach!

in my case, mobile directory is inside packages directory.
cd into mobile directory then provide only -e flag to appcenter codepush CLI. e.g. appcenter codepush release-react -a OWNER_NAME/APP_NAME -d Production -m -e $PWD/index.js
This worked well.

appcenter codepush release -d Staging -a {APP_NAME} -c ./codepush
This requires -t or --target-binary-version. How do i find the current version of the app programmatically
from the root of the workspace?

Hi @disko998, have you tried this?
appcenter analytics app-versions --app {APP_NAME}

Or please check this endpoint in AppCenter API (which is used by the CLI command above): https://openapi.appcenter.ms/#/analytics/Analytics_Versions
Please let us know if this helps.

run inside  /app directory
rm -rf CodePush
mkdir CodePush

# create js source bundle
npx react-native bundle \
--entry-file=./index.js \
--bundle-output=./CodePush/index.android.bundle \
--assets-dest=./CodePush/ \
--dev=false \
--platform=android

# send codepush
appcenter codepush release \
-a XYZ/APPNAME \
-c ./CodePush \
-d Production \
-t 0.0.x
``