Format ExprIfExp (ternary operator)

Summary
Format ExprIfExp, also known as the ternary operator or inline if. It can look like
a1 = 1 if True else 2

but also
b1 = (
    # We return "a" ...
    "a" # that's our True value
    # ... if this condition matches ...
    if True # that's our test
    # ... otherwise we return "b§
    else "b" # that's our False value
)

This also fixes a visitor order bug.
The jaccard index on django goes from 0.911 to 0.915.
Test Plan
I added fixtures without and with comments in strange places.

What was the value before?

0.911, added it to the description

I think it could make sense to give it a quick try to add the if and else tokens to the SimpleTokenizer.

I add it to my TODO list

I think it could make sense to give it a quick try to add the if and else tokens to the SimpleTokenizer.

I add it to my TODO list

ooh, maybe in and if could be useful for for  #5600
i hadn't looked in detail but didn't consider it since it only has "special" chars so far, no words

I think it could make sense to give it a quick try to add the if and else tokens to the SimpleTokenizer.

I add it to my TODO list

i took a stab at it: #5610


Replace fs-promise by fs-extra 3+

https://www.npmjs.com/package/fs-promise ->
fs-promise is now deprecated. Use mz/fs fs-extra^3.0.

Done by #93


[BUG]https://github.com/leoafarias/fvm/issues/638 report in fvm version:3.1.3

Before creating a bug report please make check the following

[ ] You have read our FAQ
[ ] If you have used flutter. Please install correctly, run pub cache repair. Close the terminal and try again.
[ ] If you are on Windows. Make sure you are running the terminal as administrator or with developer permissions.
[ ] Run fvm doctor if possible and add the output to the issue.

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to terminal..
Run fvm use stable...
Check...
See error

Expected behavior
A clear and concise description of what you expected to happen.
Logs
Please provide the verbose logs by running --verbose after the command.
Desktop (please complete the following information):

OS: [e.g. iOS]
FVM Version [e.g. 22]
If Windows: Which Powershell are you using?

Additional context
Add any other context about the problem here.

Can you tell me the version of fvm
also run the command with the --verbose flag as it will show which directories are looking at.

3.1.3

@dujj Can you run with the --verbose flag so we can see the directories that is lookin into for pubspec?

@dujj Based on those logs it seems there an fvm config in that /work directory. So its looking for the config file instead of the pubspec, because of nested directories. So it seems the message says there is no pubspec found in the same direcotry that the project config is found

flutter create test

see :

I clean work,result:
fvm use 3.19.6 --verbose
Argument information:
Top level options:

verbose: true

Command: use
Searching for project in /Users/k/Documents/work/123/test
Searching for project in /Users/k/Documents/work/123
Searching for project in /Users/k/Documents/work
Searching for project in /Users/k/Documents
Searching for project in /Users/k
Searching for project in /Users
Searching for project in /
No project found in /Users/k/Documents/work/123/test
Updating project config
Project name: test
Project path: /Users/k/Documents/work/123/test
Checking .gitignore
Update gitignore: true
[WARN] Project is not a git repository.
But will set .gitignore as IDEs may use it,to determine what to index and display on searches,
You should add the fvm version directory ".fvm/" to .gitignore.
✔ Would you like to do that now? · yes
✓ Added .fvm/ to .gitignore
✓ Project now uses Flutter SDK : SDK Version : 3.19.6
This operation was as expected
But I still don’t understand why the search is not in the current directory to determine whether there is a problem with the conditions of a project, and why it is searched recursively upwards.

@dujj I will close this issue since it seems to be working. The recursion supports workspaces and/or monorepos, so you have the same version configured for multiple projects.


tetststst

Pipelines as Code CI/news-demo has successfully validated your commit.

StatusDurationName

✅ Succeeded
26 seconds
fetch-repository

✅ Succeeded
24 seconds
golangci-lint

Pipelines as Code CIYYYY/news-demo has successfully validated your commit.

StatusDurationName

✅ Succeeded
19 seconds
fetch-repository

✅ Succeeded
12 seconds
golangci-lint


Removes an extra space

Removes a space that was inserted before the source code, causing the first line to always be offset.
Before:

After:

@esreli @nixta Could one of you please review this PR?


Not obvious how to use variable substitution to target anything other than appsettings of web.config

There's no indication of how to reference different parts of the web.config using the variable replacement process. Assuming I have variables in a release pipeline, it's not obvious how to replace anything other than appsettings values of web.config
Forinstance, if I have an applicationSettings property needing replaced, how would craft the variable to identify and perform the replacement proper replacement
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: b149977a-3e5e-4d49-b37a-ef1da1821184
Version Independent ID: 0c52a667-5b32-6b9b-fd70-5e47444f41c5
Content: File transforms and variable substitution - Azure Pipelines
Content Source: docs/pipelines/tasks/transforms-variable-substitution.md
Service: azure-devops-pipelines
Sub-service: azure-devops-pipelines-tasks
GitHub Login: @RoopeshNair
Microsoft Alias: ronai

@misterbee180 -- Mick, thank you for your feedback.  Please consider these resources:

Azure DevOps Services
Azure DevOps on Stack Overflow

@RoopeshNair -- Roopesh, please look into this issue.


add cleanup e2e tests and enable cleanup

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Feature # (details)
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. Is it a breaking change which will impact consuming tool(s)?

[ ] Test A
[ ] Test B

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

/ok-to-test sha=e4fb49a

/ok-to-test sha=0b16abb

/ok-to-test sha=be4f856

/ok-to-test sha=8f4cc06

/ok-to-test sha=ee79dc4


mismi-s3: Manage fds with ResourceT

Not able to prove that there was a file descriptor leak, but adding
this is a good idea anyway.
! @nhibberd

👍 Agree this looks like a better to me.

:+1:


248 Clearing gps while submitting request for others

Issue Reference
This PR addresses the Issue : Fixes #248
Summarize
Clearing the GPS coordinates if it is being requested for others.

Also, mention the key points if any to look into while code reviews

Tested it locally by ticking and unticking the "id_is_request_for_others" field, can confirm that the inputs are cleared

On desktop (Firefox), if we click "request for others" and then un-click, the gps location isn't recorded. Haven't tried mobile.


Fix daemon.Get() error handling with --link setup. Add test.

Fixes newly introduced error flow from daemon.Get() in the link setup
code.  Also added more detail to daemon.Get() comments for clarity.
Added test to test the bogus container link codepath.
Docker-DCO-1.1-Signed-off-by: Phil Estes<EMAIL_ADDRESS>(github: estesp)

LGTM
I like removed empty lines

LGTM


fix add order by in ngram bloom filter index test case for stable output

Proposed changes
Issue Number: close #21310
add order by in ngram bloom filter index test case for stable output
Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


"Remember Me" with a different ttl

I'm trying to utilise the new remember_me function. I would like my "refresh" token to last twice as long as my "access" token. In my config I've added a refresh_ttl key/value pair:
config :zoinks, Zoinks.Guardian,
  issuer: "Zoinks",
  ttl: { 30, :days },
  refresh_ttl: { 60, :days }

In my SessionController, I've created the following private function to create the refresh token using the setting (above):
defp remember_me( conn, user, remember_me ) do
  if ( remember_me ) do
    claims = Zoinks.Guardian.Plug.current_claims(conn)
    refresh_ttl = Zoinks.Guardian.config( :refresh_ttl )

    Zoinks.Guardian.Plug.remember_me( conn, user, claims, [ttl: refresh_ttl, token_type: "refresh"] )
  else
    conn
  end
end

Is the above code a reasonable approach?
The remember_me function is called right after the sign in:
conn
|> Zoinks.Guardian.Plug.sign_in(user)
|> remember_me( user, user_params["remember_me"] == "true" )

Should I see a third cookie in the browser after the sign in is successful (I currently have 2 - default and _zoinks_key?
The other thing is that when Guardian.Plug.VerifyCookie calls Guardian.exchange - will this keep the ttl of the refresh token, instead of using the default ttl?

Hey @mitkins For the TTL question, you can specify the TTL of different token types in your config or as options to use Guardian.

token_ttl a map of token_type to ttl. Set specific ttls for specific types of tokens

The option for this would be:
  token_ttl: %{
    "refresh" => {14, :days},
    "access" => {7, :days},
  }

Or you can set a default with the ttl option and just overwrite it.
  ttl: {7, :days},
  token_ttl: %{
    "refresh" => {14, :days}
  }

For the remember me cookie... Pretty sure that's a bug. They're all getting the same key which is not the intention :(
Thankyou for raising that!

After doing some digging, I found out the following additional information:

With the default configuration Guardian.Plug.VerifyCookie expects to find the refresh token in a cookie called "guardian_default_token". So it doesn't end up finding it in the cookie it was put in ("default")
In the case that the refresh token is no longer valid, the error handler is executed and halt() is called. This prevents the pipeline from continuing and the Guardian.Plug.EnsureAuthenticated plug is never called

In the auth_error call, I redirect to my login page - but only for :unauthenticated. Redirecting for another type/reason (in addition to :unauthenticated) ends up causing a circular redirect loop. So I think it would be nice (in the case of Guardian.Plug.VerifyCookie) if it didn't consider :token_expired to be an error.
I made a copy of Guardian.Plug.VerifyCookie and tested this theory by added the following match in the else part of the with clause:
else
  :no_token_found ->
    conn

  {:error, :token_expired} ->
    conn

  {:error, reason} ->
    conn
    |> Pipeline.fetch_error_handler!(opts)
    |> apply(:auth_error, [conn, {:invalid_token, reason}, opts])
    |> halt()

  _ ->
    conn
end

When the refresh token expires, my redirect now works as expected

The other thing that I just noticed, is that the cookie does not have a lifespan and is not persistent over browser sessions

I'm wondering if we should pull this for now. This seems to be a little buggy atm and I don't really want to hold up 1.0 anymore.
@mitkins @doomspork @scrogson thoughts?

I sat pull it out, release 1.0, then give it the treatment it deserves. I'm happy to workaround for now.

Hi, I started working on this, any suggesting to the lifespan of the cookie?

I've been giving it the same lifespan as the ttl for the refresh token

#fixed by #419


Question: Consumer to listen to new messages and notify

Versions
Sarama Version: master
Kafka Version: <IP_ADDRESS>
Go Version: 1.6.3
Problem Description
I'd like to implement a pattern where the consumer would listen to new messages in a topic and if there's one, call an external REST endpoint to notify (with the message payload). I tried with Kafka REST proxy but the long polling (by setting timeout to max) doesn't work properly. Would appreciate if some guidance or example code on implementing such a notification pattern could be provided?

There is an example of consuming in the documentation: https://godoc.org/github.com/Shopify/sarama#Consumer. I'n afraid I can't help you with the REST/polling portion as that is well outside my area of expertise.


Update of opam-repository commit to retrieve solo5 0.7.5

This fixes #166

Is there a way to exclude solo5 before 0.7.5 ? Solo5 is currently not restricted in config.ml.

Since solo5 is a dependency of ocaml-solo5, and not of the unikernel (and thus installed in the opam switch), we can't easily specify this. What we can do:

mark old solo5 as available: false in opam-repository
add a lower bound to the mirage tool in respect to solo5

Neither is optimal. On the flipside, our build process uses the latest opam repository commit, and there the opam solver will pick solo5 0.7.5. I reproduced this built on builds.robur.coop (sorry, there may be DNS issues), and will cut a release with this change.


Thousands of S3 bucket requests with S3 integration

WONDERFUL package, thanks so much! I've successfully setup the S3 integration. I enabled S3 service logs and it appears thousands of access requests are being made multiple times every minute to the bucket I connected to the files collection. However, I've only run my app a few times, so there are thousands of access requests that I am not making - and there are no other users in the app.
Here's a screenshot showing the timestamps of the service logs:

Is this expected behavior?
I'm using package v1.10.2 with Meteor 1.8.

Hello @cmoses8626 ,
This is definitely not expected, but as S3 integration isn't part of the core, – you should look into integration implementation and aws-sdk package itself.
Maybe it's normal behavior, are you able to see payload of those requests?

Closed due to silence at issue owner end.
Feel free to reopen it in case if the issue still persists on your end.


Get access to instructors' resource

Hi there. Thank you for contribute such a valuable textbook in this field. I have bought both the ebook and paper print version but found that I cannot get access to instructors' resource through https://study.sagepub.com/mclevey. I have wrote an email to SAGE but they did not reply. Is there anyway I can get access to such resource from you?

Hi @clark874! Sorry, I am just seeing this now. Yes, I can provide those resources. Can you send me an email at<EMAIL_ADDRESS>with a link to the course you are offering? Thanks!

Thank you for getting back to me. I'm a tutor designing for a new course in China so I may not have a link right now( since in our university there is no web link for a course like it is in Canada). Still, I can provide you with a tutor's email that I'm using which ends with edu.cn to show my identity.


Fix init cache position

When you use postcss with browserify + cssmodules, every file compilation run SVGCache.init and it take much time (70 svg - 200ms every file).

Thank you 👍


Add the menu icon with "menu" as text next to it on the overview screen in the top right corner and make it clickable.

Please refer to https://github.com/sopra-fs23-group-40/Server/issues/34


Remove Sentry Deps

looks like our code formatter decided to re-format some things so this looks like a chunkier pr than it actually is


(mindreader-node) WARN [11-18|20:48:51.723] Failed to load old bad blocks  error="leveldb: not found" (log_plugin/to_zap_log_plugin.go:131)

geth with mindreader crashed
$ sfeth --version
sfeth version -dev

syslog-firehose-crash-2021-11-18.log

Matt | StreamingFast — Today at 9:07 AM
This is a message from Geth directly, not clear why it seems that some low level LevelDB files are not found anymore.
Had you done in operational stuff (backup?) recently? Had you issue any Mindreader management command? Anything else prior that that could indicate some form of maintenance operation?

Was just running fine and then wasn't anymore.  It is not clear why.  I

Ok I read the whole log.
It seems the levedb: not found is more a real warning than anything else. After that there is an error without any message:
Nov 18 20:48:57 eth-sfdm25 sfeth[72]: 2021-11-18T20:48:57.424Z (mindreader-node) ERROR[11-18|20:48:57.423]  (log_plugin/to_zap_log_plugin.go:131)

And finally the real culprit is this:
Nov 18 20:48:57 eth-sfdm25 sfeth[72]: 2021-11-18T20:48:57.420Z (mindreader-node) failed storing block in archiver, shutting down. You will need to reprocess over this range to get this block (mindreader/mindreader.go:275){"error": "blocks non contiguous, expectedBlock: 13107519, got block: 13107518", "block": "#13107518 (3236a68532faf89e844eb555e323047c0fe0adc147c27d3738f061f007ac1b05)"}

It appears the non-contiguous check is a bit broken for Ethereum since it seems bad block can be re-processed breaking the assumption that we will always go forward monotonically:
Nov 18 20:48:57 eth-sfdm25 sfeth[72]: 2021-11-18T20:48:57.418Z (mindreader-node) INFO [11-18|20:48:57.418] Skip duplicated bad block                number=13,107,518 hash=3236a6..ac1b05 (log_plugin/to_zap_log_plugin.go:131)

This is a message from Geth saying it's skipping duplicated block. This probably explains the leveldb: not found warning. It tried to fetch bad block but did not find it.
Tomorrow I'll change the logic to accept re-processing the same block as the one expected. We might need to disable the check completely depending on the behavior.

I was about to fix that but the code was refactored recently and the check is gone.
However, I feel it still a good thing to ensure we do not miss any block at all when auto-merging files in mindreader. I'm checking the status of this and will report back later.

Since the issue is solved (by removing the continuity checker), I'm closing this issue.
The improvements that you "feel would be a good thing" are now here: https://github.com/streamingfast/node-manager/issues/16


[Feature] Added Twitch OAuth provider

Hi again!
I've noticed that PRs for adding OAuth providers have been merging again and since the completion of #376, I thought I'd toss this one in again. I've updated it from my previous PR #555 to satisfy the overhaul.

Thank you, I'll review it and test in more details this weekend. At first glance, the only thing I'm not sure about is the custom Twitch.FetchAuthUser method. I'm not sure how relevant this is, but based on the comment in https://discuss.dev.twitch.tv/t/client-id-requirement-faqs/6108, it looks like it may not be required if the request has a token with it:

If I’m including an OAuth token, do I need to include a Client-ID?
If you are passing in an OAuth token, we will figure out the Client-ID for you.

If the above is not true, then we could eventually allow passing optional custom headers to the request object in the base FetchAuthUser method.

I've merged the PR locally in https://github.com/pocketbase/pocketbase/commit/4c096fd745ae1943dc3075c43a47e148e49cd69c.
To avoid breaking the Provider interface and to allow more flexibility on the request, I've decided to split the FetchRawUserData execution to allow passing a http.Request instance.
The provider will be available with the final v0.8.0 release (most likely at the end of the next week).


Guide on setting up eslint / prettier

On this page, we should have a section on how to set up VScode with the proper prettier / eslint plugins.
We get a lot of external contributors who get tripped up on this step when contributing PRs

@mattwiller Might also be worth mentioning "Install recommended plugins for this repo" feature on VSCode. That should solve this in 99% of cases I think


Added path for 'HeliumDIY/helium_ansible'

Hi, I added the path for the HeliumDIY to your code #13

Hi. Thanks for your contribution. Have you tested the code? I believe a comma might be missing. Please confirm.

Thanks, after I opened the pull request I decided that it's not important, becuase if somebody wants to use your analyzer with the HeliumDIY img, then they could just use the '-p' flag and enter the log path, but I am happy to see that you reopened it and added it to the code in the end.
good luck!


No shortcut key to show Notebooks viewlet

Feature request: shortcut key for opening Notebooks viewlet

FYI - those parts are called "Views". "Viewlet" is the larger containers in the left sidebar (so there is a Notebook Viewlet that contains 3 views - "Search Results", "Notebooks" and "Provided Books")

There is already a shortcut key for notebooks viewlet (ctrl/cmd + shift + B).


Input method of Peripheral compartments and transit compartments

Perhaps the numeric input field could always be visible and have 0 as default. Then we don't need the toggle and hide functionality.

Good idea! Will add it and if it feels to cluttered we can always revert back.

Its updated now!


exporting got reverse (minecraft story mode season 2)

ORIGINAL

EXPORTED

so yeah i was trying to edit .prop files minecraft story mode season 2 to do model swap easily (or maybe season 1 can happened too welp i didnt try it but pretty sure)
the .prop properties got reverse from skeleton face to symbol and when i try the games is like not working :(((

your question isnt very helpful.
Skeleton Face in the second prop does not exist or you have not scrolled down, they look like two completely different props

i opened the prop. you havent scrolled down in the properties list. they are all there

thats not a problem with the tool, your modding is not telling the game the correct thing

yea its not the tool its the game.
did u read the info at the beginning of the tool? it said not to use it with different games

question is not related to the tool but due to a lack of modding experience


Writing functional tests using the mock.

Having the mock in place, testing higher
levels of the API becomes much easier. Also,
the old tests where brittle and slowed down
refactorings. The new tests aim to test
functionality instead of concrete implementation.
While rewriting tests, some useful changes became
obvious and where done:

parsing of the node info options string should be done at a single place
some helper functions where obsolete
the use_enum_parser option is obsolete, it should be active per se (not fixed yet)

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

Comparison is base (563a3fb) 100.00% compared to head (9fa7c05) 99.94%.

Additional details and impacted files
@@             Coverage Diff             @@
##              main      #38      +/-   ##
===========================================
- Coverage   100.00%   99.94%   -0.06%
===========================================
  Files           30       30
  Lines         1870     1798      -72
  Branches       312      296      -16
===========================================
- Hits          1870     1797      -73
- Partials         0        1       +1

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

The coverage is not exactly 100%, because the removal of the use_enum_parser option will be done in a seperate step


refactor: Update examples wrt 242

Move examples from example-data repo to the pyfluent core repo. Update the example scripts with settings-api usage.

Move examples from example-data repo to the pyfluent core repo. Update the example scripts with settings-api usage.

@prmukherj We are moving examples from pyfluent-examples repo not example-data.


Pin ESLint dependency to 2.2.0

There's a current issue with ESLint @2.3.0 that seems to be causing a lot of problems in consuming libraries using it alongside babel-eslint.
I mentioned it on an eslint-config-ember issue a few weeks ago, but I didn't quite realize the extent of what it would affect. In short -- even after trying to hack together custom dependencies locally -- ember-cli-eslint currently seems to be unusable due to deeper dependencies such as broccoli-lint-eslint using eslint-2.3.0.
After digging in to ember-cli-eslint, eslint-config-ember, eslint-config-nightmare-mode and broccoli-lint-eslint, I'd like to propose a path forward that includes pinning everything using eslint to<EMAIL_ADDRESS>until there's a resolution to the issue above -- or until we can jump ahead to ESLint 2.4.0 (which seems to be where a lot of the chatter is babel-eslint is leaning).
If this sounds reasonable, I'd certainly be willing to help out with pulling some of the strings that that might require.

Sounds like a good plan, I've followed that issue and we can unpin when it is fixed.
Would you mind submitting a PR to lock us to<EMAIL_ADDRESS>as suggested in the issue?

I think the latest babel-eslint@6 beta will solve this issue, and prevent having to pin the dep.  Can you test it?

@rwjblue, I've tested locally and confirmed, and included that in https://github.com/jonathanKingston/ember-cli-eslint/pull/39. That's still blocked by https://github.com/jonathanKingston/eslint-config-ember/pull/7, however.

@chriskrycho So, if I'm understanding the current status of everything, there's a PR to upgrade eslint-config-ember to eslint@ 2.4.0, and then have ember-cli-eslint play off of that -- in conjunction with ember-cli-eslint itself using babel-eslint @ 6.0.0-beta.6.
Your above comment suggests that this gets us past the  babel-eslint and estraverse-fb issue from eslint @ 2.3.0 / babel-eslint 5, but your comment in jonathanKingston/ember-cli-eslint#39 mentions that this isn't the case.
Maybe I'm misreading one or the other -- in either case, it looks like our first priority is getting eslint-config-ember to the version that our ember-cli-eslint PRs are expecting.

@BrianSipple great points of needed clarification.

Good catch on the status of babel-eslint in https://github.com/jonathanKingston/ember-cli-eslint/pull/39 – I forgot to update the PR description after adding that change. It's correct now, and the estraverse-fb problem should be resolved.
I think your summary is correct; we want to merge eslint-config-ember, then our PRs 39 and 40 on ember-cli-eslint update this to reference the new version of that dependency.
To resolve this issue, I think we should be able to jump ahead to babel-eslint 2.4.0 and proceed. I'm happy to help wrangle all of that tomorrow afternoon or Wednesday.


[9.x] Add a default user agent to the HTTP client

This PR adds a default user agent to the HTTP client (PendingRequest class).
Reasoning
It is generally a considered a good idea to add a custom user agent when sending HTTP requests to external sites. This allows the maintainers of these sites to identify requests coming from your application and provides them the means to get in touch with you should there be any issues e.g. a need to use rate limiting, caching etc.
Status Quo
Out of the box, Laravel doesn't use a user agent. This means, that the HTTP client defers to Guzzle's default user agent, which is simply 'Guzzle' followed by a version number.
Solution
The PR adds a withDefaultUserAgent method, which is called from the PendingRequest constructor. This method generates and sets a user agent derived from the application's name, url and version e.g.
Example/1.0 - https://example.com

The developer is of course free to override this by using the already present withUserAgent method.
Breaking Changes
In all likelihood, the chance of this causing a breaking change in actual applications is low. However, since the PR does alter the constructor of PendingRequest, and I had to update some validation tests that used the HTTP client, I've decided to submit it to the master branch.

Not sure how I feel about sending out my application name and url every time I make an HTTP request. Especially since this is a default, I probably won't even realise I'm sending out this information. I think I'd be more comfortable with the current anonymous "Guzzle" default.

I think I'd be more comfortable with the current anonymous "Guzzle" default.

I'm not sure why you would need your HTTP user agent to be anonymous? You could change it to something generic if you wanted to. However, doing so doesn't alter the fact that your IP address (and perhaps other details) are still being sent. So, you haven't really given yourself true anonymity.
Regardless, per RFC 7231, you should really include one:
The "User-Agent" header field contains information about the user agent originating the request, which is often used by servers to help identify the scope of reported interoperability problems, to work around or tailor responses to avoid particular user agent limitations, and for analytics regarding browser or operating system use. A user agent SHOULD send a User-Agent field in each request unless specifically configured not to do so.
While the RFC doesn't explicitly mention sending something unique, generic user agents such as Guzzle/7 do run the risk of being flagged. They might be interpreted as bots and be banned, or they may become subject to less harsh, but still problematic restrictions.

Bit torn, I can definitely see this being useful. But at the same time also feel for @SjorsO' plea. Another thing is that I don't think using Laravel's version number makes sense as it's the version of Laravel, not the app performing the HTTP request.
Therefor, I believe this should always be better set in user land because it'll always be different/custom for each app.
Regardless of the above opinions, we can't just use the app and config helpers inside the PendingRequest class.

It's definitely a valid point. My reasoning behind this was that many developers probably wouldn't think to set one, which isn't a good practice. What would you say to adding a config value to app.php e.g.
'user_agent' => env('APP_NAME') . '/' . env('APP_VERSION', '1.0') . ' - ' . env('APP_URL'),

@mattkingshott I'll let @taylorotwell review this PR further 👍

Big 👎 for making this default. This is a borderline security issue. NB Guzzle now shares even less information by default, since 6, and again since 7.

May I ask why you consider it a security issue?

Seems like this is gonna be controversial, so I’m going to close this.


webapp: remove GWT permutations for IE10 and older

only IE11+ is supported

Tested & Working. Merged on master.


Don't force authoring on parachain nodes

Before this PR, polkadot launch will add the --force-authoring flag to every collator node, and there is no way to tell it otherwise in the config file.
This PR removes that flag from the mandatory list of flags. It is still possible for anyone who actually wants to force authoring to add that flag in their config.
If the maintainers think that forcing authoring is a sensible default, I could add it to the provided example config.

I'm with you. However people that will use aura and only start one collator will not produce any blocks. For now we should keep the flag.

We can't move this flag to the example config? We have to force it for everyone?
This makes the tool unusable for nodes like Moonbeam where this flag does more than just bypass the peer count check. For us it also causes the node to author in every slot regardless of whether it thinks it will be eligible in that slot.

Ahh okay.
Yeah, then please readd it to the examples.

Thank you. I appreciate this.


docker-compose mongo volume

Hello, fellows!
I'm trying to use docker-compose to run a composition with node server and a mongodb which must use a docker volume to store its data. However, after I execute the docker-compose down command, I lost all data that I've saved once before. When I docker volume list, I'm able to list the volume created by my docker-compose.
I don't want to set a place in the host to have my mongo data, if I use the ./data path as volume, data is persistent. However I want to easily manipulate it with docker volume and such..
Here's a sample
version: '3.4'
services:
  nodeserver:
    build: .
    container_name: "c-name"
    ports:
      - 3001:3001
      - 80:80
    links:
      - mongodb
    depends_on:
      - mongodb
  mongodb:
    image: mvertes/alpine-mongo
    volumes:
      - mongo-data:/var/data
    container_name: "mongodb-service"
    ports:
     - 27017:27017
volumes:
  mongo-data:

Thanks in advance

image: mvertes/alpine-mongo :wink:
This repository is for https://hub.docker.com/_/mongo/, which you don't appear to be using. :+1:


[5.8] Handle database urls for database connections.

Following https://github.com/laravel/framework/pull/28096
I've directly integrated it in the connection process, so it's fully transparent for the user, and without any breaking change (see the tests about it).
Usages
[
	'default' => env('DB_CONNECTION', 'mysql'),
	'connections' => [
		'mysql' => [
			'url' => env('DATABASE_URL'), // will override other parameters
            'driver' => 'mysql',
            'host' => env('DB_HOST', '<IP_ADDRESS>'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'unix_socket' => env('DB_SOCKET', ''),
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
			// ...
		],

		// Or directly:
		'url' => env('DATABASE_URL')
// ...

I've covered many cases and examples in tests, so I let you dig into them, and give me back your thoughts about it.
I'm also using it in a real project, and for now it works like a charm.
Thanks.
Matt'

I really don't understand why you want to replace all the typehints by phpdoc.

@mathieutu because it's the current convention of the framework and its libraries. When a convention is in place it's best to stick to it.
On a personal note I'm also in favor of introducing types but it would need to be introduced in a new major release somewhere in the future: http://laravel/ideas

StyleCI isn't supposed to handle that? 🤔

StyleCI can't check this atm.

Please also make UrlParser::$driverAliases protected and replace self:: with static::. This allows users to override any functionality.

@driesvints ok, understood the point, thanks (event if there is already a lot of typehints in framework, like all the array you left). Is that convention written somewhere?
Another thing: You have converted all private methods and properties to protected, so the class can be extended easily.
I agree with that.
But as you also replaced UrlParser instantiation from container to direct new UrlParser in code, devs finally can't replace it by the class they newly created.
If it stays instanced by the container, it will be easy for devs to overwrite it in a service provider. 😉

@driesvints ok, understood the point, thanks (event if there is already a lot of typehints in framework, like all the array you left). Is that convention written somewhere?

No it's not. It's currently just general know-how from looking at the code already in place. PRs to the docs to improve this are appreciated.

If it stays instanced by the container, it will be easy for devs to overwrite it in a service provider. 😉

I don't consider this to be a reason to resolve it through the container. There are other ways to overwrite this. What you could do is pass it as a constructor argument and then use the container outside the actual object to resolve it.

What you could do is pass it as a constructor argument and then use the container outside the actual object to resolve it.

Can totally do that if you prefer, but for me it just moves the problem to higher levels (actually two:  DatabaseManager is instancied in src/Illuminate/Database/Capsule/Manager.php:63 and src/Illuminate/Database/DatabaseServiceProvider.php:62).
The container was already passed and used directly in the class, it's why I did that way.

The container was already passed and used directly in the class, it's why I did that way.

Yeah, you're right. That's a bit unfortunate but I believe that we should refrain from adding new implementations of which use that dependency. That's why I think another constructor dependency is the way to go. At both places where the manager is instantiated you can use the container to resolve the dependency. This would have to go to 5.9 then though because it's a breaking change for anyone using the manager separately.

@driesvints Made the changes, and added all the docblock.
I let the container part to someone else, for the day there will be a need.
 Good improvements are coming quite quickly to PHP, and it would be too bad that an accumulation of debt let us years back.)
Thanks anyway for the work you spent helping me with this PR!

I let the container part to someone else, for the day there will be a need.

No problem.

 I do think that's a real exception though.

Thanks for the great work @mathieutu! Does this only apply to database connections? It would be great to have this for Redis connections as well (Heroku Redis uses this URL format).

❤
I can get rid of my hack-y overrides at the top of my config/database.php files in applications I deploy to Heroku now 😄
<?php

if (getenv('DATABASE_URL')) {
    // Parse URL and set individual config keys
}

@djtarazona Hi, actually everything is made to be used with redis too.
It may still needs a call to do in the proper place, I have to check how Redis is handled in Laravel (I'm a bit rusted about that).
If needed and if you want to open a PR, I can help you with that.
We also need to document that, and with my poor english some help will be much needed!

@mathielo What version of Laravel is this available in?

@martinbean v5.8.15 at least

@driesvints Cool. Thanks!

@mathielo Do you have an example of how this is supposed to be used?
I’ve just updated an application to Laravel 5.8.15 (confirmed by running php artisan --version) and removed the DB_* variables from my .env and replaced them with this line:
DATABASE_URL=postgres://homestead:secret@<IP_ADDRESS>:5432/tickets

However, my application seems to try and connect to the default connection (mysql) using the default values in the environment variables (i.e. forge for the username, etc).

You'll need to update your database.php and replace all the separated keys with a single url key:
'pgsql' => [
    'url' => env('DATABASE_URL'),
    'charset' => 'utf8',
    'prefix' => '',
    'prefix_indexes' => true,
    'schema' => 'public',
    'sslmode' => 'prefer',
],

Note that you can also remove the driver key as it's inferred from the URL.

Never mind, worked it out for myself! I needed to add a url key with the environment variable to the configuration, i.e.
return [
    'connections' => [
        'pgsql' => [
+           'url' => env('DATABASE_URL', null),
            'driver' => 'pgsql',
            'host' => env('DB_HOST', '<IP_ADDRESS>'),
            'port' => env('DB_PORT', '5432'),
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'charset' => 'utf8',
            'prefix' => '',
            'prefix_indexes' => true,
            'schema' => 'public',
            'sslmode' => 'prefer',
        ],
    ],
];

@martinbean no, I do not. :joy: You probably want to ping @mathieutu. Cheers!

@mathielo Sorry, picked wrong person from the mention auto-complete 😂

It's exactly that!
(And I definitely need to add it to Laravel core and document it.)
return [
    'connections' => [
        'pgsql' => [
+           'url' => env('DATABASE_URL', null),
            'driver' => 'pgsql',
            'host' => env('DB_HOST', '<IP_ADDRESS>'),
            'port' => env('DB_PORT', '5432'),
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'charset' => 'utf8',
            'prefix' => '',
            'prefix_indexes' => true,
            'schema' => 'public',
            'sslmode' => 'prefer',
        ],
    ],
];

@mathieutu Cool. Is this working for Redis configuration, too?

@martinbean I let you try and let me know? Will doing the corresponding PR, depending of your answer. 😉

@mathieutu As far as I can see the url is not implemented for redis.
I see no usage of the ConfigurationUrlParser in the RedisManager and when I'm just testing to pass a url property instead of host, port and pass to redis it is not used.

Ok thanks. I'll try to do a PR for that in the week-end.
On Tue, May 14, 2019 at 12:27 PM Kristoffer Högberg <
<EMAIL_ADDRESS>wrote:

@mathieutu https://github.com/mathieutu As far as I can see the url is
not implemented for redis.
I see no usage of the ConfigurationUrlParser in the RedisManager and when
I'm just testing to pass a url property instead of host, port and pass to
redis it is not used.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/laravel/framework/pull/28308?email_source=notifications&email_token=ACWTKGSFPCJE6ZSJWLG7MPTPVKHW7A5CNFSM4HHXLKPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVLBKRY#issuecomment-492180807,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACWTKGWIUXQLMRQ7RPXVCBTPVKHW7ANCNFSM4HHXLKPA
.

@mathieutu Thanks!

@mathieutu: Does this work with Redis now?

@tillkruss

Ok thanks. I'll try to do a PR for that in the week-end.

I sware I'll take a look this week-end 😉

Hey guys!
I'm not personally a redis user, so I've taken a look at the Predis documentation and... I can confirm that the url is already handled by the lib for a while!
https://github.com/nrk/predis/wiki/Connection-Parameters
However, an array is typed for the $config variable in \Illuminate\Redis\Connectors\PredisConnector::connect.
Passing it as an array like that works well:
'redis' => [
    'client' => 'predis',
    'default' => [
        'redis://h:password@host:12499',
    ],
],

BUT:

By default, when no specific client options are set and an array of connection parameters is passed to the client's constructor, Predis configures itself to work in clustering mode
https://github.com/nrk/predis/#user-content-cluster

So in conclusion, in my opinion, we don't even need any preprocessing on our side (we totally could, but don't need), we just have to remove the type hint of the connector (and I'd be glad to do the PR 😉).
I let you give me your feedback about that, as you will have much more experience with this topic than me!
Thoughts?

I can confirm that this is a working config for the redis database when using the predis client.
    'redis' => [
        'client' => 'predis',
        'default' => [
            env('REDIS_URL', 'redis://<IP_ADDRESS>:6379') . '?database=0',
        ],
        'session' => [
            env('REDIS_URL', 'redis://<IP_ADDRESS>:6379') . '?database=1',
        ],
    ],

BUT, it does not seem to work when using phpredis instead of predis.

It doesn't work with PhpRedis:
Undefined index: host

[
    'redis' => [

        'client' => env('REDIS_CLIENT', 'phpredis'),

        'options' => [
            'cluster' => env('REDIS_CLUSTER', 'predis'),
            'prefix' => env('REDIS_PREFIX'),
        ],

        'default' => [
            env('REDIS_URL', 'redis://<IP_ADDRESS>:6379') . '?database=' . env('REDIS_DB', 0),
        ],

        'queues' => [
            env('REDIS_URL', 'redis://<IP_ADDRESS>:6379') . '?database=' . env('REDIS_QUEUES_DB', 1),
        ],

        'sessions' => [
            env('REDIS_URL', 'redis://<IP_ADDRESS>:6379') . '?database=' . env('REDIS_SESSIONS_DB', 2),
        ],

        'cache' => [
            env('REDIS_URL', 'redis://<IP_ADDRESS>:6379') . '?database=' . env('REDIS_CACHE_DB', 3),
        ],

    ],
]

Ok, so let's go, I'll do exactly the same than for databases, to be able to configure easily with an url key (and so add database in its dedicated key aside).
I'll try to do that tomorrow (could even be released during the day if my students work a bit autonomously! 😇)

Here we go!
Later than expected, but this one is for Redis:
https://github.com/laravel/framework/pull/28612

Great job @mathieutu . Any hint on how you would use DATABASE_URL with read and write nodes ?

Hi @tainmar, actually not specially, but all the parameters passed in query string are merged to the options, so you should be able to write anything you want like that.
I let you see examples in tests:
https://github.com/laravel/framework/pull/28308/files#diff-605cb0824715db5828d78328437863837ebdcbc61aaa4a2e6e2614cf8d31f067R247

Thanks indeed, the examples make sense.
I was hoping to keep urls separated like this but it does not work :+1:
            'read' => [
                'url' => [
                    env('DATABASE_URL_READ'),
                ],
            ],
            'write' => [
                'url' => [
                    env('DATABASE_URL_WRITE'),
                ],
            ],


Capitalisation error

Line 55 of 'common.R' in the stan-statespace/R/ directory reads:
fatalities <- read.table('../data/Norwayfinland.txt', skip = 1)
It should be:
fatalities <- read.table('../data/NorwayFinland.txt', skip = 1)

@weedgoku Thx!


Discussion - Schema usage

The spirit of this ticket is to hash out a direction on having a heavier namespacing at the schema level.
Some points discussed:

Pro-higher granularity schemas:

Less verbose namespacing inside of a study
easier to archive at the study level

Pro-lower granuality schemas:

Less infrastructure overhead (though we can automate this with the right permissions)
easier to archive everything at once

Making a change to schema handling would be a large breaking change, so if we do it, we should allot appropriate time for it.

Per #252, we have a mechanism to selectively specify in a manifest that a study can be in its own schema, and the use case is limited. More information about the rationale for this is in the MAINTAINERS.md file.


Adjusting scale

@DEBSUBHRO What does this do exactly? Looks fine, just would love a before/after shot to understand.

@DEBSUBHRO What does this do exactly? Looks fine, just would love a before/after shot to understand.

I did not do anything.
Just completed the meta tag, as I had learnt earlier. I think initiating the "initial_scale" at 1.0 makes it bug-free for some unpopular browsers.

@DEBSUBHRO Is there a specific browser you can share knowledge of here or screenshot of something gone wrong? I'm hesitant to approve unless seeing the issue. It has been a while since I looked into it but my understanding is forcing initial-scale shouldn't be necessary and may disable user zooming (which is bad).

Closing as stale


New: Adding in options to change colours for various elements.

Adding a new pull request to take over from #102 to provide cleaner commits.

Old Pull


haxelib submit is case-sensitive

I have registered on haxelib as Aurel300 (uppercase A). Thinking usernames are not case-sensitive, I put
  "contributors": ["aurel300"]

In my haxelib.json. When submitting with haxelib submit zipped.zip, I got the error message:

Error: User 'aurel300' is not a developer of project 'docopt'

Changing the contributors field to ["Aurel300"] solved this issue. As far as I can tell, the issue is in haxelib/src/haxelib/server/Repo.hx on line 132:
if( d.userObj.name == user )

Is this considered a problem?

Isn't it a bug? AFAIK most of Haxelib should be case-insensitive. This could confuse people, it certainly confused me.

I am asking because i am inclined to fix it and i think it is simple, but if this behavior is intended the code won't be merged. No harm in asking.

This is not intended behavior, user and project names are supposed to be case insensitive.

This extends to another problem with machines that have case-sensitive file systems, Those machines require that you correctly capitalize the library being used for nearly all commands including when listing as dependencies in build.hxml.
This is definitely not intended behavior as it is different on case-insensitive machines, This is a side-effect of not checking case in any function related to libraries, and is a major inconvenience/bug.

i would expect user and project names to case-sensitive (like Haxe itself, and most (?) filesystems), but at the same time that haxelib would warn and suggest corrections when/if you accidentally get case wrong.
@ibilon Why would it be intended behavior? That would seem to be a policy that would invite problems on case-sensitive filesystems. Does case-insensitivity it significantly improve user experience in some way I'm not seeing?

Of course, you would not want to allow someone to upload a "CoolProj" library when "Coolproj" already exists (or create a "ThisUser" when "thisuser" already exists), but that would be something I'd expect haxelib to check for anyway.

@uvtc Case-sensitivity in haxelib would cause problems on case-insensitive filesystems, not the other way around. ALibrary should be the same as alibrary, same for users, for ease of use with URL and case-insensitive filesystems. I think Haxelib should convert any project name to lowercase and just make that the canonical name. Requests, installs, updates, etc of projects should accept any case version, as long as the lowercased version matches.

Case-sensitivity in haxelib would cause problems on case-insensitive filesystems, not the other way around.

I understand the desire to make it easier for users to install "ALibrary" by typing haxe install alibrary if they want, but I don't see how having haxelib be case-sensitive would cause a problem on a case-insensitive filesystem. Could you give an example?

I think Haxelib should convert any project name to lowercase and just make that the canonical name.

I would not want to upload a file NamedLike-This and have it later displayed on the lib.haxe.org as namedlike-this.

Requests, installs, updates, etc of projects should accept any case version, as long as the lowercased version matches.

That sounds ok, though I think it's also reasonable to require the user to type the name with the correct case.

… how having haxelib be case-sensitive would cause a problem on a case-insensitive filesystem. Could you give an example?

That was the example. If there were two libraries, ALibrary and alibrary, and somebody on a case-insensitive system tried to install them both:
$ haxelib install ALibrary

So far so good, haxelib creates a new directory ALibrary (in your haxelib path) and installs the library into it.
$ haxelib install alibrary

And now haxelib tries to create the directory alibrary – which to the case-insensitive filesystem is the same as the directory ALibrary. At this point something bad will happen - maye files of one library get overridden, maybe haxelib complains that the library is already installed.

I would not want to upload a library NamedLike-This and have it later displayed on the lib.haxe.org as namedlike-this.

I don't think there is a single library that has uppercase letters. Perhaps there already is some lowercasing going on, I haven't checked. The name of the library is its identifier when installing and in URLs. You can stylise it however you want in the readme or the github repo.

That was the example.

Ok. I didn't understand. I'd thought that upon lib creation/upload that haxelib would naturally do a lowercase compare of this lib name with all other existing lib names, making sure there were no duplicates, before allowing one to proceed.


[release-1.22] CNI shouldn't pass trustdomain down

Manual cherrypick required.
#51204 failed to apply on top of branch "release-1.22":
Applying: CNI shouldn't pass trustdomain down
Using index info to reconstruct a base tree...
M	cni/pkg/nodeagent/ztunnelserver.go
Falling back to patching base and 3-way merge...
Auto-merging cni/pkg/nodeagent/ztunnelserver.go
CONFLICT (content): Merge conflict in cni/pkg/nodeagent/ztunnelserver.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 CNI shouldn't pass trustdomain down
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

Closing this as it's not strictly required.


Example using Gradle Tools 1.1.0?

The Tools team finaly have started to support http://tools.android.com/tech-docs/unit-testing-support.
I haven't checked the source changes to see if Manifest is piped through to properties etc.
But it would be interesting to see how to modify the RobolectricTestRunner to work with the built in support.

I tried the new feature and it looks like we need no plugins anymore. With the new experimental unit test feature we can easy use robolectric. See the example https://github.com/nenick/AndroidStudioAndRobolectric or read a step by step guide http://nenick-android.blogspot.de/2015/02/android-studio-110-beta-4-and.html

It's a great step forward, I guess we just need the default test runner to
run out of the box.
Although by the looks of it it's more that the way idea executes tests is
different to gradle, thus the difficulties.
Still one step closer!
On Mon, 9 Feb 2015 08:29 Nico Küchler<EMAIL_ADDRESS>wrote:

I tried the new feature and it looks like we need no plugins anymore. With
the new experimental unit test feature we can easy use robolectric. See the
example https://github.com/nenick/AndroidStudioAndRobolectric or read a
step by step guide
http://nenick-android.blogspot.de/2015/02/android-studio-110-beta-4-and.html
—
Reply to this email directly or view it on GitHub
https://github.com/robolectric/deckard-gradle/issues/52#issuecomment-73472694
.

This is being worked on in #62.


There are some inconsistent fonts.

Repro step:

Navigate to https://makecode.microbit.org/beta
Click "?" and select "Statements"
Scroll down to the "Labelling statements"

Expected result:
"Labelled statement" should be written as "Labelled statement"

Actual result:
"Labelled statement" doesn't be written as "Labelled statement"

Compare with other statements, "Labelled" isn't keyword. It represent a kind of labeled although it is not used directly in code. So I thought that the "Labelled statement " should be written as "Labelled statement".

'Labelled' is not the actual literal so that's why it wasn't styled the same as the others. I agree, it looks odd and presents a consistency problem. Fixed in #2827.


Add redux-zero library

@chimon2000 thank you for the contribution!
This is an interesting library.


Validate a project doesn't exist in Synapse before creating a new one

We need to add better error handling/responses when a project with the same name already exists. Synapse requires project names to be unique throughout the whole system.

PR https://github.com/pcstout/sls_ki_synapse/pull/19


Automatically update OpenAPI specs and client

Motivation
#13
Description

Add workflow to automatically commit the OpenAPI specs and client if it changes
Include JavaDoc in OpenAPI specs
Add some docstrings for testing

Issues

Workflows don't trigger again (https://github.com/orgs/community/discussions/25702) solutions:

Use PAT
Dispatch workflows after this one finished
Dispatch other workflows again if it committed something

Will remove the automatic commit stuff, the check will just fail if the api client has not been updated.


Fix CachePadded test

This test fails on architectures that use 32-byte alignment as assuming the alignment of CachePadded is 64+.
https://github.com/crossbeam-rs/crossbeam/blob/a66fe72b224e0864f66360778d611a06c7234771/crossbeam-utils/tests/cache_padded.rs#L25-L31

bors r+

bors r+


Login url fix

When we reload the URL https://loco-musica.vercel.app/login, it displays a 404 page not found error.

i assigned it to you

make sure you star repo ⭐  and follow on github , giving hacktoberfest tag after this step


Reports broken on related_fields via API v2

in dev / 1.10.4 an exception occurs when trying to generate a report for an engagement via API_v2:
curl -X POST "http://defectdojo-dev:8000/api/v2/engagements/1165/generate_report/" -H  "accept: application/json" -H  "Content-Type: application/json" -H  "X-CSRFToken: 1234" -d "{  \"include_finding_notes\": false,  \"include_finding_images\": false,  \"include_executive_summary\": false,  \"include_table_of_contents\": false}"

traceback
Internal Server Error: /api/v2/engagements/1165/generate_report/
Traceback (most recent call last):
  File "/home/valentijn/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/home/valentijn/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/valentijn/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/valentijn/venv/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/home/valentijn/venv/lib/python3.8/site-packages/rest_framework/viewsets.py", line 125, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/valentijn/venv/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/home/valentijn/venv/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/home/valentijn/venv/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/home/valentijn/venv/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/home/valentijn/dd/dojo/api_v2/views.py", line 167, in generate_report
    return Response(report.data)
  File "/home/valentijn/venv/lib/python3.8/site-packages/rest_framework/serializers.py", line 548, in data
    ret = super().data
  File "/home/valentijn/venv/lib/python3.8/site-packages/rest_framework/serializers.py", line 246, in data
    self._data = self.to_representation(self.instance)
  File "/home/valentijn/venv/lib/python3.8/site-packages/rest_framework/serializers.py", line 515, in to_representation
    ret[field.field_name] = field.to_representation(attribute)
  File "/home/valentijn/venv/lib/python3.8/site-packages/rest_framework/serializers.py", line 663, in to_representation
    return [
  File "/home/valentijn/venv/lib/python3.8/site-packages/rest_framework/serializers.py", line 664, in <listcomp>
    self.child.to_representation(item) for item in iterable
  File "/home/valentijn/venv/lib/python3.8/site-packages/rest_framework/serializers.py", line 515, in to_representation
    ret[field.field_name] = field.to_representation(attribute)
  File "/home/valentijn/venv/lib/python3.8/site-packages/rest_framework/fields.py", line 1870, in to_representation
    return method(value)
  File "/home/valentijn/dd/dojo/api_v2/serializers.py", line 716, in get_related_fields
    query_params = self.context['request'].query_params
KeyError: 'request'

Same for product report, etc.

should be fixed then?


[UX/Compile] Support quantization features

Parent issue: #300
Let's support quantization features.

Visualize circle file and show quantization info
Enable to edit quantization data manually
Support mixed quantization gui

/cc @Samsung/one-vscode

Todo list (DRAFT)
Visualization for Quantization information

List which information should be displayed

min/max of each operation?
channel-wise/layer-wise?
etc

Design UI

Check dependency with compile step(+previous/next steps)
Display layout (in compile step or separate step or both?)

Implement UI
Implement events

Support mixed quantization GUI

Design UI

Display layout (how to harmony with current quantization steps)
How to select operations, how to set quantization mode to each operation
Additional information would be displayed?

Implement UI
Implement events

Editing quantization data manually
Progress when this feature is really needed.


feature request: Add parameter to control maximum group size for Lambdarank

Description

I have around 12 groups for a dataset of over a ~1 Million  rows. And several groups have easily over 10,000 rows.
It would be really helpful if the quota for each query is increased , or maybe we can additionally set it the number of rows we wish.
Im tried to seach if there is a way to increase the upper limit, but havent really come across any. If there exists please do let me know,
Thanks :)
References

    model(
  File "/mnt/batch/tasks/shared/LS_root/jobs/mlw-kundenscore/azureml/db031a99-93b4-4d83-9280-24da972050e8/wd/azureml/db031a99-93b4-4d83-9280-24da972050e8/kundenscore/train/model_classes/base_model.py", line 366, in train_register_and_evaluate_model
    model = self._fit_model(pipeline, hyperparameters)
  File "/mnt/batch/tasks/shared/LS_root/jobs/mlw-kundenscore/azureml/db031a99-93b4-4d83-9280-24da972050e8/wd/azureml/db031a99-93b4-4d83-9280-24da972050e8/kundenscore/train/model_classes/lgbmranker.py", line 106, in _fit_model
    ranker = pipeline.fit(x_train, y_train, **fit_params)
  File "/usr/local/lib/python3.8/site-packages/sklearn/pipeline.py", line 346, in fit
    self._final_estimator.fit(Xt, y, **fit_params_last_step)
  File "/usr/local/lib/python3.8/site-packages/lightgbm/sklearn.py", line 1067, in fit
    super().fit(X, y, sample_weight=sample_weight, init_score=init_score, group=group,
  File "/usr/local/lib/python3.8/site-packages/lightgbm/sklearn.py", line 748, in fit
    self._Booster = train(
  File "/usr/local/lib/python3.8/site-packages/lightgbm/engine.py", line 271, in train
    booster = Booster(params=params, train_set=train_set)
  File "/usr/local/lib/python3.8/site-packages/lightgbm/basic.py", line 2610, in __init__
    _safe_call(_LIB.LGBM_BoosterCreate(
  File "/usr/local/lib/python3.8/site-packages/lightgbm/basic.py", line 125, in _safe_call
    raise LightGBMError(_LIB.LGBM_GetLastError().decode('utf-8'))
lightgbm.basic.LightGBMError: Number of rows 632751 exceeds upper limit of 10000 for a query

Thanks for using LightGBM and for this report.
This error message comes from the following place in the code:
https://github.com/microsoft/LightGBM/blob/9a4e70687d5c0732ca895959f418c3f923f2e85a/src/metric/dcg_calculator.cpp#L134-L144
I found that by running
git grep 'exceeds upper limit'

Note that the threshold is hard-coded, here.
https://github.com/microsoft/LightGBM/blob/9a4e70687d5c0732ca895959f418c3f923f2e85a/src/metric/dcg_calculator.cpp#L17
Using the git blame, I can see that that limit has been set to 10,000 since the very first commit of LightGBM 6 years ago.
https://github.com/microsoft/LightGBM/blame/9a4e70687d5c0732ca895959f418c3f923f2e85a/src/metric/dcg_calculator.cpp#L17
I think this might be hard-coded instead of being determined by label_gain or the maximum group size in the input Dataset because Objective objects in this project's C++ library are initialized without any knowledge of the input data.
https://github.com/microsoft/LightGBM/blob/9a4e70687d5c0732ca895959f418c3f923f2e85a/src/objective/objective_function.cpp#L31
@shiyu1994 @guolinke do you think LightGBM should allow increasing this limit via a new parameter? I'm not that familiar with Lambarank, so not sure if (for example), the use of such large query groups in LightGBM should be discouraged.

@jameslamb , yes it is hardcoded.
I am curious if there was a specific reason for setting a limit for query.
The example data that i wish to train on has many queries and some queries has even around 100,000.

@antaradas94 Thanks for using LightGBM. The limitation if hard coded here
https://github.com/microsoft/LightGBM/blob/8e721c564d4534820a7b7febf81382ccf247b5c9/src/metric/dcg_calculator.cpp#L17
So you may try to enlarge the number in the source code to meet your need. And then recompile the python package from the source code.
Guidelines for compiling python package:

First compile the source code according to https://lightgbm.readthedocs.io/en/latest/Installation-Guide.html#linux (you may also find platforms other than Linux).
Install the python package by cd into LightGBM/python-package and run python setup.py install --precompile

A maximum number of documents per query is limited mainly because the complexity of computation of gradients per query in Lambdarank is  O(n^2) where n is the number of documents. Datasets with too large documents per query simply does not fit with Lambdarank.
Sorry for the late response, if you have any further question. Please feel free to post here.

@jameslamb I think we can change kMaxPosition into a parameter. WDYT @guolinke @StrikerRUS

I think we can turn that constant into parameter to not force users re-compile LightGBM. Although, I guess it's quite rare cases when users need to increase the default value.

Ok, thanks @StrikerRUS and @shiyu1994 .
I've changed the title of this issue and added it to #2302.
Per this repo's policy on feature requests, I'm going to close this issue for now. @antaradas94 if you are interested in contributing this feature, please comment here and we can answer any questions you have. If not, anyone else reading this is encouraged to comment here if you're interested in contributing this feature.
Otherwise, you can change the source code and recompile LightGBM yourself.

@jameslamb, hi.
I encountered this exception, because one of the queries size exceeded 10000 docs.
But I'm wondering, if I'm using NDCG as a metric, but I'm not implicitly limiting query size via parameter lambdarank_truncation_level, and default is 30, does it mean that all queries is truncated on 30th document?
Because in documentation is says that lambdarank_truncation_level "controls the number of top-results to focus on during training", but also exception "lightgbm.basic.LightGBMError" appears before training (on stage of initialising Booster object) and queries are not truncated yet?

I'm not sure about the relationship between those two configuration values, sorry. @guolinke can you answer this question?
I think it is like

If lambdarank_truncation_level already is limiting the number of documents per query considered, then why does LightGBM raise an error during Lambdarank training when it encounters queries with many more than lambdarank_truncation_level documents? Why doesn't it just ignore all the documents after lambdarank_truncation_level?

I'll re-open this since it's being discussed.

@octatour not, all documents are used, truncation_level is for the loss calculation. It is used to ensure at least one document in pair (in the pair-wise loss accumulation) is above the truncation_level.
For example, if there are 100 documents for a query, and truncation_level is set to 30. Then, there will be 30 * 100 = 3000 pairs that are used for the loss calculation.

@guolinke okay, got it. Thank you for explanation. It wasn't clear for me from documentation and paper, that truncation_level controls number of pairs for loss.

Sorry, this was locked accidentally. Just unlocked it. We'd still love help with this feature!

Hi!
I am trying to increase kMaxPosition = 10000 for my project, but I am not able to compile the source code. I am running in loops. I am getting Cmake error and even after fixing it nothing is working. Is there any other way to fix this issue?

@NigamSomya thanks for using LightGBM.
Your question seems to be generally "how do I build the Python package from source" and not specific to Lambdarank, so I've created #6437 and hidden your comment here. Let's please discuss over there.

Hi!
I am trying to increase kMaxPosition = 10000 for my project, but I am not able to compile the source code.
I am stuck here.
Install the python package by cd into LightGBM/python-package and python setup.py install --precompile
Since, setup.py has been deprecated, I tried using flit to install the package. But I am getting this. Please help.
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [24 lines of output]
Traceback (most recent call last):
File "C:\Users\snigam\AppData\AppData2\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\snigam\AppData\AppData2\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\snigam\AppData\AppData2\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 149, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\snigam\AppData\Local\Temp\pip-build-env-vyyms50h\overlay\Lib\site-packages\scikit_build_core\build_init_.py", line 72, in prepare_metadata_for_build_wheel
return _build_wheel_impl(
^^^^^^^^^^^^^^^^^^
File "C:\Users\snigam\AppData\Local\Temp\pip-build-env-vyyms50h\overlay\Lib\site-packages\scikit_build_core\build\wheel.py", line 142, in build_wheel_impl
metadata = get_standard_metadata(pyproject, settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\snigam\AppData\Local\Temp\pip-build-env-vyyms50h\overlay\Lib\site-packages\scikit_build_core\build\metadata.py", line 39, in get_standard_metadata
metadata = StandardMetadata.from_pyproject(new_pyproject_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\snigam\AppData\Local\Temp\pip-build-env-vyyms50h\overlay\Lib\site-packages\scikit_build_core_vendor\pyproject_metadata_init.py", line 257, in from_pyproject
cls.get_license(fetcher, project_dir),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\snigam\AppData\Local\Temp\pip-build-env-vyyms50h\overlay\Lib\site-packages\scikit_build_core_vendor\pyproject_metadata_init.py", line 395, in _get_license
raise ConfigurationError(msg, key='project.license.file')
scikit_build_core._vendor.pyproject_metadata.ConfigurationError: License file not found ("LICENSE")
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\snigam\AppData\AppData2\Scripts\flit.exe_main.py", line 7, in
File "C:\Users\snigam\AppData\AppData2\Lib\site-packages\flit_init.py", line 219, in main
installer.install()
File "C:\Users\snigam\AppData\AppData2\Lib\site-packages\flit\install.py", line 432, in install
self.install_with_pip()
File "C:\Users\snigam\AppData\AppData2\Lib\site-packages\flit\install.py", line 370, in install_with_pip
check_call(cmd, shell=shell)
File "C:\Users\snigam\AppData\AppData2\Lib\subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['C:\Users\snigam\AppData\AppData2\python.exe', '-m', 'pip', 'install', '.[scikit-learn,pandas,arrow,dask]']' returned non-zero exit status 1.
I tried this as well python -m pip install --upgrade pip setuptools, but it didn't work.

If there's any other way to increase 'kMaxPosition', please share.

There is not. At the moment, you'll have to change it in the code and recompile LightGBM.

Sorry, this was locked accidentally. Just unlocked it. We'd still love help with this feature!

Hi, would love to contribute if this is still open!

sure! We'd welcome the contribution.
You can ask any questions here, and tag @shiyu1994 and @metpavel


required updates

number of drawn nails is now updated after every submission
drawLine fucntion has been implemented where connections is to be edited using backend api


Question: mock_instance cannot detect float operations (non-deterministic opertions)

When I change https://github.com/CosmWasm/cosmwasm-examples/tree/main/erc20 with
--- a/erc20/src/contract.rs
+++ b/erc20/src/contract.rs
@@ -108,7 +108,8 @@ fn try_transfer(
 ) -> Result<HandleResponse, ContractError> {
     let sender_address_raw = deps.api.canonical_address(&info.sender)?;
     let recipient_address_raw = deps.api.canonical_address(recipient)?;
-    let amount_raw = amount.u128();
+    let amount_raw_f = amount.u128() as f64;
+    let amount_raw = (amount_raw_f / 1.000042).ceil() as u128;

     perform_transfer(
         deps.storage,

all tests included https://github.com/CosmWasm/cosmwasm-examples/blob/main/erc20/tests/integration.rs with cargo test in erc20 directory succeed. However, WASM compiled from this code causes a non-deterministic error when storing into a chain. This is because mock_storage in vm/testing package does not check some tests with storing.
Is this result as expected? If it is as expected, are there some ways to test it without test-net/local-net?

Which version of CosmWasm are you using? In < 0.13 only the singlepass backend enabled the check (used on chain but not in development by default). From 0.13 on, the check is done in both Wasm backends. See also https://github.com/CosmWasm/cosmwasm/issues/311

As far as I know, to detect this you need to compile the wasm code.
A way to flag that would be to write an integration test, which executes the wasm against the vm. See by example https://github.com/CosmWasm/cosmwasm/blob/main/contracts/crypto-verify/tests/integration.rs
Another (indirect) way to do it, is by using the module_size utility, that compiles and serializes a wasm in order to determine its (approximate) size.
See module_size. Compile it with cargo build --release --examples. When running it, it will detect and report non-deterministic operators while compiling.
Not sure if there other, more direct ways.

As far as I know, to detect this you need to compile the wasm code.
[...]
Edit: Maybe we can add a compile_wasm util / example, that could be used for this.

The two commands to run the linked integration tests are
cargo wasm
cargo integration-test

which alre aliases configured in https://github.com/CosmWasm/cosmwasm-examples/blob/main/erc20/.cargo/config. The same aliases are used for all contracts for consistency.

I agree, writing a small integ test is a "good enough" way to detect / flag this.

I use cosmwasm-vm v0.12.0 and I can detect this error with cargo integration-test --no-default-features --features=singlepass.
Thank you, @webmaster128 and @maurolacy!

I assume this can be closed. Feel free to re-open when there is something missing.


WOA 1 Degree monthly

Adding WOA18 1degree monthly data recipe.
Data should contain T, S, density, O2, AOU from surface to 1500m.
Specifics of data in: https://www.ncei.noaa.gov/sites/default/files/2020-04/woa18documentation.pdf

Ok Mr. Bot !
Would also be good to update the tutorial: https://pangeo-forge.readthedocs.io/en/latest/introduction_tutorial/intro_tutorial_part3.html#create-a-meta-yml-file

Thanks for this contribution Dhruv! And thanks for pointing out the required intro tutorial update.
I'll initiate a test of your recipe on Pangeo Forge Cloud now and we'll see what happens 😄

/run recipe-test recipe_run_id=7

/run recipe-test recipe_run_id=7

/run recipe-test recipe_run_id=7

/run recipe-test recipe_run_id=7

Thanks for committing the suggestion, Dhruv! To explain why your /run command didn't do anything:

/run is an admin function (for now, at least); but also
When I pushed the change to get the traceback shown in https://github.com/pangeo-forge/staged-recipes/pull/122#issuecomment-1061136440, I accidentally broke something else, which prevented a new recipe_run from being created. In general, every time we commit to any PR, a new recipe_run is added to the Pangeo Forge Cloud database. This recipe_run contains the metadata for running a recipe test at a particular commit. I just fixed that broken piece, so we've now gotten a new recipe_run for your commit 45a71fe. I will now /run the test for that.

/run recipe-test recipe_run_id=10

To see what error caused the failure, please review the logs at https://pangeo-forge.org/dashboard/recipe-run/10

As of writing this comment, this link appears to not present the complete logging (even though we know the recipe run has completed). @jhamman I'm guessing this is related to https://github.com/pangeo-forge/pangeo-forge.org/issues/26?
I will go digging in the backend for the full logs and report back!

Here's what I found in the backend (once we get everything wired up, this type of traceback would be available at the public logs link)...
  File "/tmp/tmpxziwplxo/cached_recipe.py", line 47, in fix_encoding_and_attrs
NameError: name 'xr' is not defined

Ok, just did it.
I am sorry for some of these silly errors with importing and putting in wrong function names. Definitely my mistakes in copying code from notebook to script, which is still something I don't work in very often.

All good! This is good practice for @pangeo-forge-bot 😀 . I'll trigger the next test now.

/run recipe-test recipe_run_id=11

Thank you Mr. P-Bot and Charles! You make the dream tag team :)
I will work through the to-do soon.

[ ] Are the dimension lengths correct?
[ ] Are all of the expected variables present?
[ ] Does plotting the data produce a plot that looks like your dataset?
[ ] Can you run a simple computation/reduction on the data and produce a plausible result?

We were just testing this out with @cisaacstern and @stb2145 and we noticed the chunks are quite small.
We should probably increase the number of chunks in time.

The reason I picked that chunk size was because in the catolog : https://www.ncei.noaa.gov/thredds-ocean/catalog/ncei/woa/temperature/decav/1.00/catalog.html it shows that each file with a month of data is about 100+mb.
However, because each file has many variables the actual chunk size ends up being about 15mb. Probably having no chunking in time should work just fine. How does one set that?
There also seems to be another bug, where when I load in the data based on the comment with code above that the bot posted, there are only 2 months (2 time steps). It should be 12.

I am trying to reduce the number of variables that will be read in, to see if that fixes things. This case worked perfectly on local machine.
I am not sure how to set the chunk size yet, but can address this in another step.

There also seems to be another bug, where when I load in the data based on the comment with code above that the bot posted, there are only 2 months (2 time steps). It should be 12. Also the actual time values are kind of weird.

@dhruvbalwada, this is deliberate, as noted in https://github.com/pangeo-forge/staged-recipes/pull/122#issuecomment-1061375154:

Note: This test execution is limited to two increments in the concatenation dimension, so you should expect the length of that dimension (e.g, "time" or equivalent) to be 2.

The idea is that at the test phase we don't want to build too much data.

Oops, sorry... I forgot to notice that. Everything in the todo list seems ok in that case.
I still don't know how to resolve the chunks issue that Julius raised.
It is still a bit weird that for the 2 time snap shots it took a year value of 1986 for the first one and 1958 for the second one. When reading the data in a variable at a time, it seems like 1986 is the time for the temp, salinity, while Oxygen related variables are 1958. However, the year should not matter since it is only the month that is important (the data set is a climatology).

Great! Do we want to make just one chunk in the time dimension, as shown in https://github.com/pangeo-forge/staged-recipes/pull/122#discussion_r830088687?

Yes. I did try to add that.
I wasn't sure... if  <TOTAL TIME LENGTH> meant that I just put that into the code, or put in the number of months (12).  I took the second approach. Should I fix that?

On sorry! Didn't see that. Yes number of months is correct. I will run a test of the updated recipe now.

/run recipe-test recipe_run_id=13

I'm a bit confused as to why this recipe test failed, as I don't see any backend logs for it. I'm going to re-run it now.

/run recipe-test recipe_run_id=13

In the logs at https://pangeo-forge.org/dashboard/recipe-run/13, we see errors like

AttributeError: 'NoneType' object has no attribute 'lock_release'
Task 'store_chunk[2]': Exception encountered during task execution!
Traceback (most recent call last):
  File "/srv/conda/envs/notebook/lib/python3.9/site-packages/prefect/engine/task_runner.py", line 861, in get_task_run_state
    value = prefect.utilities.executors.run_task_with_timeout(
  File "/srv/conda/envs/notebook/lib/python3.9/site-packages/prefect/utilities/executors.py", line 323, in run_task_with_timeout
    return task.run(*args, **kwargs)  # type: ignore
  File "/usr/local/lib/python3.9/site-packages/registrar/flow.py", line 113, in wrapper
  File "/srv/conda/envs/notebook/lib/python3.9/site-packages/pangeo_forge_recipes/recipes/xarray_zarr.py", line 573, in store_chunk
    zarr_array[zarr_region] = data
  File "/srv/conda/envs/notebook/lib/python3.9/contextlib.py", line 126, in __exit__
    next(self.gen)
  File "/srv/conda/envs/notebook/lib/python3.9/site-packages/pangeo_forge_recipes/utils.py", line 118, in lock_for_conflicts
    lock.release()
  File "/srv/conda/envs/notebook/lib/python3.9/site-packages/distributed/lock.py", line 151, in release
    self.client.scheduler.lock_release, name=self.name, id=self.id
AttributeError: 'NoneType' object has no attribute 'lock_release'

@rabernat recently diagnosed a similar problem in https://github.com/pangeo-forge/noaa-coastwatch-geopolar-sst-feedstock/issues/2#issuecomment-1104167875, which was caused by target_chunks in the contact dim specified as an integer value greater than the number of increments in that dimension contained within a given source file. This is also true of this recipe: target_chunks={"time": 12}, but each source file contains only 1 time step.
In the linked example, this was resolved by specifying inputs_per_chunk. I will try that now and see what happens.

/run recipe-test recipe_run_id=37

When executed locally, this recipe does work for me in its current form. Prefect's schematic view is telling me that one of the caching tasks failed, but I can't find evidence of that failure in the logs.

If this did indeed fail, its the type of failure that might be alleviated with retries. I'm going to update this recipe's meta.yaml to use an experimental retry branch, and then re-run with that.

/run recipe-test recipe_run_id=42

This seems frustrating. This is a very straightforward recipe. I'm confused why it is not working... Does it work locally?

Yes, this works locally. On Prefect we are seeing errors like
Task 'store_chunk[4]': Exception encountered during task execution!
Traceback (most recent call last):
  File "/srv/conda/envs/notebook/lib/python3.9/site-packages/prefect/engine/task_runner.py", line 861, in get_task_run_state
    value = prefect.utilities.executors.run_task_with_timeout(
  File "/srv/conda/envs/notebook/lib/python3.9/site-packages/prefect/utilities/executors.py", line 323, in run_task_with_timeout
    return task.run(*args, **kwargs)  # type: ignore
  File "/usr/local/lib/python3.9/site-packages/registrar/flow.py", line 113, in wrapper
  File "/srv/conda/envs/notebook/lib/python3.9/site-packages/pangeo_forge_recipes/recipes/xarray_zarr.py", line 595, in store_chunk
    zarr_array = zgroup[vname]
  File "/srv/conda/envs/notebook/lib/python3.9/site-packages/zarr/hierarchy.py", line 349, in __getitem__
    raise KeyError(item)
KeyError: 'time'

which seems like a problem with prepare_target? But I'm not sure why we'd be having that problem.
One possibility is that there is an existing cache that is somehow corrupted but is being re-used anyway. I might try clearing the cache for this recipe and then re-running.

Retries didn't help, as we're seeing the same error as before we used retries
I just deleted the cache, in the (unlikely?) event that starting from a blank cache helps us here
I need an arbitrary commit to trigger creation of a new recipe run, so will do that now by reverting to a released pangeo_forge_version in meta.yaml

/run recipe-test recipe_run_id=44

Clearing the cache solved the issue. I guess one of the existing cached files was corrupted somehow 🤷 .
This entire expedition to re-run the test was in service of increasing chunk sizes. Upon inspection of the dataset reported above, we arguably overshot the mark a bit: some of the data variables currently have ~50 MB chunk sizes with len(ds["time"]) = 2. IIUC, this means that with the full time dimension and target {"time": 12} chunks, some data variables will be (50 MB / 2) * 12 = 300 MB each. Maybe this is too big, or maybe it's an okay compromise, so that the smaller data variables don't end up being too small.
In service of moving forward, I'm going to merge this PR now. If necessary, we can tweak chunking via PRs to this recipe's forthcoming feedstock repo.

The first production deployment of this recipe is now being tracked here:

https://github.com/pangeo-forge/WOA_1degree_monthly-feedstock/deployments

All future discussion of this recipe can be in Issues/PRs to ☝ this feedstock repo. Thanks all for your patience and input.


Updated Locaiton Adding UI

Update the UI of the location creation popup according to the new UI

 Buttons

 Header Colour

@jfangrad should this also include: https://trello.com/c/gb3tGeO0

Updated UI:

In Seperate PR we will have to find a way to make the counter look like the new UI

Did the designs have a border radius at the top?

@smaclell yes it does


marker size in print view fail

Hello, I am incorporating the option to print in my report, at the moment of generating the impression view the points change drastically. I'm using R, leaflet 0.7+ for R, easyprint 0.4. The code to include the plugin is:
m <- leaflet ()%>%
   onRender ("function (el, x)
            {L.control.browserPrint (
            {title: 'Print Map',
             documentTitle: 'DIGESA - VECTORS',
             printModes: ['Portrait', 'Landscape', 'Auto', 'Custom'],
             manualMode: false,
             printModesNames: {Portrait: 'Vertical', Landscape: 'Horizontal', Auto: 'Auto', Custom: 'Select'}
            }
            ) .addTo (this);} ")%>%
All printing modes have the same behavior.
Some clue as to how to solve it myself would be of great help, thanks in advance, apologies for using google translator.

Print View

hello again, I was researching and this is because leaflet does not have a method to return the radius in circle markers, therefore the plugin is interpreting it as a circle translating the radius that I assign in pixels to the unit that accepts circle marker that is, meters, which results in a very small size.
my circle marker uses 5px radio and leaflet translates that into meters for the circle.
the only drawback is that the circle is not resized by increasing the zoom of the map.
New print view with addcircle function in leaflet for R and set raidus to2Km, much better!


Display rockets Pull request

In this part of activity I :

Used useSelector() Redux Hook to select the state slices and render lists of rockets in corresponding routes.
used React Bootstrap, a UI library that speed up the process. This is a popular library and working with its components is a good practice.
Rendered a list of rockets. For the image of a rocket I used the first image in the array of flickr_images.

Thank you for approving my project work! 😊


Handle divide-by-zero case for computing entries

Currently validators are initialized to have no voting power (i.e. 0) when computing the first entry, a divide-by-zero happens. Add a special case to just set this base case entry to zero.

Fixed by #125


The big dash with the header of the LNs in the IED editor is too big

A user gave the feedback that the dash we use mdash is too heavy and if it can be replaced with something more lightweight.
Another possibility could be mdot instead.

I think we need a separator, especially if we want to make use of written names for the lnClass, but it can be one that does not take up so much space. What do you think?


Not able to display Edge name characters in other languages

Describe the bug
When I set labelFontUrl, only the nodes change the font, the edges remain the same.
Steps to Reproduce the Bug or Issue

Name any edge "牡"
It will show up as boxes

Expected behavior
It should display the real characters, puts boxes instead.
Screenshots or Videos

Platform

Reagraph Version: [e.g. 1.0.0]
OS: [e.g. macOS, Windows, Linux]
Browser: [e.g. Chrome, Safari, Firefox]
NodeJS version: ...

Your Example Website or App
No response
Additional context
No response

Its odd it works for Nodes but not edges :S

Fixed in 4.9.1


Add Spanish translate

Added es.json to translations folder

@glaseca Thank you!
P.S. Would be great if you could give a star to the repo :) Thanks

Of course, starred


Question - Publish only Blog to a custom url

Hi Jack @JiaKunUp
I have a question . No hurry for answer .. and I am not expecting any work on this  .. its just a curious question in my mind ..
I have a custom domain (shutri.com) where I publish my blogger posts. I want to publish this blog there . Is there a way that I could publish https://ashutoshmjain.github.io/homepage/blog to http://shutri.com ...
I don't want to publish the landing page (About me , skills etc.) to my custom domain. Visitor can click on "AmJ" and get transferred to my homepage here on github if they want to know more about me ..
Thanks
Ashutosh

Hi @ashutoshmjain ,
I have seen your custom website, it's published at google, I think what you want to realize is to make https://ashutoshmjain.github.io/homepage/blog as your index page of website (http://shutri.com), and let current index page (landing page) be your profile page, maybe the url is http://shutri.com/profile/.
If so, the following way will work:

Edit index.html's filename to profile.html and change permalink to /profile/ in this file.
Move blog/blog.html to index.html and change permalink to / in this file.
Edit _includes/header.html line 24, change it to {{ site.title }}, so you can click "AmJ" to transfer to your profile page.
Since blog page's url has been changed, profile page's blog link should be changed to href="{{ "/" | prepend: site.baseurl }}" from href="{{ "/blog/" | prepend: site.baseurl }}" in file _includes/sections/blog.html.

I think this will meet your needs. Thanks!

Thanks a ton  .. This is my weekend project . I will test it out on my local machine first .

OK 👍

@JiaKunUp
I figured out an easier workaround  ..
I just forwarded my other  subdomain (http://ashutosh.86reckers.com/)   to ashutoshmjain.github.io/homepage/blog  for testing ..  It worked. I will now invest time to migrate all my write-ups from blogger , Medium , Wordpress and Linkedin to JalPC.  And once I have good enough content , I will forward Shutri.com to /homepage/blog . I guess , it will take me a while as I want to go thru 10 years worth of writing one by one and check if it make sense in migrate .. And thats the fun part :-)
The approach of forwarding domains (or subdomains) to either '/homepage' or '/homepage/blog' allows me flexibility as to what I want to the landing page to be ... .. eg I am forwarding to /homepage at http://ashutosh.thinkingInSAP.com/
Also , while forwarding the subdomain, I noticed that GoDaddy allows me to mask the url. Which means, the visitor never jumps to my repository url .. I still need to check if it will impact my Google Analytics but thats not a big issue for me as I hardly care for click numbers :-)
The other advantage of this approach is my website continues to live on GH pages , this allows me continuously improving the code thru issue management and allowing experts like yourself to see what is in my repo .. no need to migrate the code to other host
Thanks a ton for giving me pointers
Cheers

@ashutoshmjain
Awesome!👍
Just now I used this function at GoDaddy and it looks perfect, with this function you can redirect any  subdomain to gh-pages. I think it's meaningful to merge blogs to GitHub repository, and I wonder if there is a way to export blogs to markdown format files from other websites, if so merging will be easier.
And then I tried share buttons, it will use original website URL as link: when I visit http://test.jack003.com, it redirects to http://www.jack003.com, but I share article at this website, it shows http://www.jack003.com/xxxx. In your website at http://ashutosh.thinkinginsap.com/ your blog URL is https://ashutoshmjain.github.io/homepage/blog and this is still original URL, I think this will be good :)
About Google Analytics, I think GA can figure out redirect URL and use 301 redirect is better than 302, here is an article about 301 and 302 redirect affect in Google Analytics https://seo-hacker.com/301-302-redirect-affect-seo/.
Finally, this is a flexible method to accomplish your question.
Thanks and best regards


Configurable build environment and install command

Allow user to specify the build environment with --dockerfile

hmm something is wrong with another test, taking a look


Upstream updates

Craig Lowen reported having changed the DistroLauncher code to improve the WSL experience, redirecting the user to the docs web page in case of virtualization being disabled. Also, noticed the README file was updated recently. This PR captures both changes and preserves the original authors, as it should be.

This looks good, thanks for cherry-picking this! Merging.


Partial downloaded image not getting stored in cache

I am trying to fetch p-jpegs using this library .
But if an image is partially downloaded it is not stored in cache and neither library is resuming download from the point it left.

@kalrashubham49 that's correct, we don't store progressive renders in the cache (because they are bitmaps, they would be quite large).
Why would you want the progressive renders stored in the cache?

If an image is partially downloaded, need a way to

use (right now) the best image an incomplete progressive render can provide (lest have to re-fetch & wait for what has already been fetched)
resume the partial download
and/or [why I'm actually posting this]
mitigate multiple requests for the same image, none of which have completed yet (and some/all of which are under way, dividing effective bandwidth significantly).

@carl-donath-tinroof
If you try and download an image multiple times, only one download will ensue and if each download operation has a progressive block, each block will be called when there are progressive results. You are correct though, if you kick off one download option which begins rendering progressive results, starting another download operation will not immediately vend the last progressive result (it will get updated the next time a progressive render happens though).

So to clarify a nuance I'm tangled in: if you request a single image (same URL) several times practically at the same time (no chance for any request to finish downloading any meaningful amount of data), perhaps interleaved with several other similarly multiple requests, it will - or won't - start only one download stream (recognizing there are several requests) per same URL? or might we get multiple download streams per same URL, sorting out the duplicated results when caching?
(Stopping multiple identical simultaneous requests from happening is my problem; I'm just wondering  how PINRemoteImage is reacting to it if/when it does happen. My case may or may not include progressive images.)

Correct, only one download for many download requests of the same URL. If an existing download is running (task) any additional calls with the same URL will get attached to that task. If any of the download requests requested progressive callbacks, those will occur when enough data has been downloaded to generate one, regardless of when a request was attached to a task.

@carl-donath-tinroof there is now support for canceling and resuming image download requests. Can I close this issue out?

Going to close this out since I haven't gotten a reply.


RK-16159 - [Snyk] Security upgrade java-language-server

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to fix one or more vulnerable packages in the `maven` dependencies of this project.
Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

pom.xml

Vulnerabilities that will be fixed
With an upgrade:

Severity
Priority Score (*)
Issue
Upgrade
Breaking Change
Exploit Maturity
Reachability

575/1000  Why? Recently disclosed, Has a fix available, CVSS 7.5
Denial of Service (DoS) SNYK-JAVA-COMGOOGLEPROTOBUF-3167774
com.google.protobuf:protobuf-java:  3.16.1 -> 3.16.3
No
No Known Exploit
No Path Found

(*) Note that the real score may have changed since the PR was raised.
Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Denial of Service (DoS)

/jira open task

RK-16159

@dan505512 Are we even going to update/test this?

If you don't know of anything that will immediately break when we update it, let's just go with it. We haven't yet decided the fate of the lang servers, so no need to invest time in it. @Urook

If you don't know of anything that will immediately break when we update it, let's just go with it. We haven't yet decided the fate of the lang servers, so no need to invest time in it. @Urook

Ok. Just be aware that it is probably not going to be auto updated in our bucket (i.e., this and the file we actually serve are probably out of sync)