Toolkit reports can't be disabled

Name of Defective Feature

Toolkit reports

System Settings (Required)

ToolKit Version: 2.1.1
Operating System (Mac/Windows/Etc): Mac/Windows
Browser (Chrome/Firefox/Safari): Chrome/Firefox
Browser Version: Latest
Other Extensions: n/a

Export of Toolkit Settings (Bottom Left of Settings Page)

Settings Export
[{"key":"AccountsDisplayDensity","value":"0"},{"key":"AccountsEmphasizedOutflows","value":true},{"key":"AccountsStripedRows","value":true},{"key":"AdditionalColumns","value":true},{"key":"AdjustableColumnWidths","value":true},{"key":"AutoDistributeSplits","value":true},{"key":"BetterScrollbars","value":"0"},{"key":"BudgetProgressBars","value":"0"},{"key":"BudgetQuickSwitch","value":true},{"key":"CalendarFirstDay","value":"0"},{"key":"CategoryActivityCopy","value":true},{"key":"CategoryActivityPopupWidth","value":"0"},{"key":"ChangeEnterBehavior","value":true},{"key":"CheckCreditBalances","value":true},{"key":"CheckNumbers","value":false},{"key":"ClearSelection","value":true},{"key":"CollapseSideMenu","value":true},{"key":"ColourBlindMode","value":true},{"key":"CompactIncomeVsExpense","value":false},{"key":"CreditCardEmoji","value":false},{"key":"CurrentMonthIndicator","value":true},{"key":"CustomFlagNames","value":true},{"key":"DaysOfBuffering","value":true},{"key":"DaysOfBufferingHistoryLookup","value":"0"},{"key":"DisableToolkit","value":false},{"key":"DisplayTargetGoalAmount","value":"0"},{"key":"EasyTransactionApproval","value":false},{"key":"EditAccountButton","value":"0"},{"key":"EnableRetroCalculator","value":true},{"key":"EnlargeCategoriesDropdown","value":true},{"key":"EnterToMove","value":true},{"key":"GoalWarningColor","value":true},{"key":"GoogleFontsSelector","value":"0"},{"key":"HideAccountBalancesType","value":"0"},{"key":"HideAgeOfMoney","value":true},{"key":"HideHelp","value":true},{"key":"HideReferralBanner","value":true},{"key":"ImportNotification","value":"0"},{"key":"IncomeFromLastMonth","value":"0"},{"key":"LargerClickableIcons","value":true},{"key":"MonthlyNotesPopupWidth","value":"0"},{"key":"NavDisplayDensity","value":"0"},{"key":"PrintingImprovements","value":true},{"key":"PrivacyMode","value":"0"},{"key":"QuickBudgetWarning","value":true},{"key":"ReconciledTextColor","value":"0"},{"key":"RemovePositiveHighlight","value":true},{"key":"RemoveZeroCategories","value":false},{"key":"ResizeInspector","value":true},{"key":"RightClickToEdit","value":true},{"key":"RowHeight","value":"0"},{"key":"RowsHeight","value":"0"},{"key":"RunningBalance","value":"1"},{"key":"SeamlessBudgetHeader","value":true},{"key":"ShowCategoryBalance","value":true},{"key":"ShowIntercom","value":true},{"key":"SpareChange","value":false},{"key":"SplitKeyboardShortcut","value":true},{"key":"SplitTransactionAutoAdjust","value":false},{"key":"SquareNegativeMode","value":true},{"key":"StealingFromFuture","value":true},{"key":"SwapClearedFlagged","value":false},{"key":"TargetBalanceWarning","value":true},{"key":"ToBeBudgetedWarning","value":true},{"key":"ToggleMasterCategories","value":true},{"key":"ToggleSplits","value":true},{"key":"ToggleTransactionFilters","value":"1"},{"key":"TransactionGridFeatures","value":true},{"key":"goalIndicator","value":true},{"key":"highlightNegativesNegative","value":true},{"key":"l10n","value":"0"},{"key":"pacing","value":"0"},{"key":"popupCalculator","value":true},{"key":"reports","value":true}]

Steps to Reproduce the Behavior

Turn off Toolkit setting for reports
Refresh YNAB
Toolkit reports still appear in the left side of the screen

I first noticed this back when the settings bug for storing boolean values was introduced. I never used the Toolkit reports, but they appeared after that update. Since then I have never been able to get them to go away. I have tried toggling them on and off after each release of the Toolkit with no change in behavior.
Expected Behavior

The menu item would not be visible
Actual Behavior

The menu item is still visible

Based on the export of your Toolkit Settings the reports are still "on" {"key":"reports","value":true} The settings for reports is on the General tab not the Reports Screen.

That setting is for styling an existing YNAB report. Use this setting to turn off the Toolkit reports;

Oh, right. I guess it helps to read the words. I guess because I didn't turn it on myself I didn't know where to turn it off. Probably turned that setting on and off 10 times in the last month. Well, thanks for clearing it up. :)


refactor: quality metrics

Update metrics dataframe renaming.

@MilagrosMarin is this PR still valid/relevant?
Should we review/merge or close it?

@ttngu207 yes, this minor PR is valid and ready to review.


DocsArchive-<IP_ADDRESS>Auto archive content

Auto archive content from https://github.com/OPS-E2E-PPE/docs-archive-test

Docs Build status updates of commit 9d0d197:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error]

Cannot sync git repo to specified commit because branch Archive_master_2019-09-26-02-52-38 has been deleted or has been force pushed: fatal: Couldn't find remote ref Archive_master_2019-09-26-02-52-38

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


cannot make pdf

Hi, my ruby version is 2.7.0 and when I use make to generate PDF, I got an error report:
/usr/lib/ruby/2.7.0/tempfile.rb:121:in `<top (required)>': superclass mismatch for class Tempfile (TypeError)
I am not familiar with Ruby, and I am at a loss for this.

hi,
The PDF files seem to have been stored in tag, and You can use it directly. :)
https://github.com/T-head-Semi/thead-extension-spec/releases/download/2.3.0/xthead-2023-11-10-2.3.0.pdf


Allow longer round times

Hi, it would be nice to be able to select a round time longer than 60 seconds. Ideally add an input field.
If you want to talk and have fun during the game a 60 second time frame is easy to miss.

Completely agree. Someone mentioned this the other day on the CAF Facebook page.
I'll get around to implementing it as soon as i have some time!


Title: improve the BMI Calculator visual appeal and alignment

Which pre-existing JavaScript project will you be working on?
Body Mass Index Calculator
Describe your enhancement/improvement
To improve the website's visual appeal and alignment, we will optimize the layout for consistent spacing and responsiveness across all devices. Enhancements include updating typography and color schemes for better readability. Content alignment will be refined for a clean, professional look.
Anything you need to say to the Reviewers
No response
Add any other context or relevant screenshots about the enhancement here.
Sir, I would like to work on this issue, please assign this to me under GSSOC 24.

@eiva078 Thank you for providing your insight but it is not required as of now


test on more recent node and npm

On the Rpi, my node and npm have fallen behind:
pi@leader:~ $ npm -v
6.14.5
pi@leader:~ $ node -v
v12.16.3

Should be fine. On my osx, I have more recent versions that work fine.


Update serializer of zsdk s_tabu_dis to native ABABGIT serializer

Problem:
Following the installation guide  fails with error:
Object type SUCU is not supported by this system
Import of object ZSDK S_TABU_DIS failed
Situation:
ABAPGIT already support a native serializer for Object Type SUCU.
You already updated the serializer for object: zres s_tabu_dis
but for object zsdk s_tabu_dis you still use the serialisier which require a plugin.
Solution:
Update serializer in zsdk s_tabu_dis
Tested:

ref #92

File src/zadf/zsdk s_tabu_dis.sucu.xml is updated in master branch. Fresh import will not create issue because of this file.


undefined: sync.Pool

really n00b at go but when I follow the getting started instructions I get :
koen@asus:~/src$ go get github.com/restic/restic/cmd/restic
# github.com/restic/restic/backend
../go/src/github.com/restic/restic/backend/id.go:17: undefined: sync.Pool

don't bother, figured out that my version of go is outdated.
http://stackoverflow.com/questions/26236734/go-error-undefined-sync-pool-when-installing-go-mtpfs


Flipped scene of chat

Hi,
I would like to ask you for hints how to flip scene of chat to have input container placed right below navigation bar with reversed chat history (the latest message to have on top).
Do I need more than apply these steps?

to fork repo
to adjust methods addCollectionView and addInputViews of class ChatViewController to set proper constraints to collectionView and inputContainer
to adjust method adjustCollectionViewInsets of class ChatViewController  to set proper collection view insets
override ChatCollectionViewLayoutModel with verticalOffset set to 0

Hi @michalraska
That's a good start. You will also need to invert the pagination logic and scroll to bottom after updates.
I've seen in other projects that they invert the UICollectionView and the cells with a 180° rotation, so you may give that idea a try also.

@diegosanchezr Thank you.


IndexError: index out of range

View details in Rollbar: https://rollbar.com/Zooniverse/Zooniverse_Aggregation/items/9/
Traceback (most recent call last):
  File "./aggregation_api.py", line 2366, in <module>
    project.__aggregate__()#workflows=[84],subject_set=[494900])#,subject_set=[495225])#subject_set=[460208, 460210, 460212, 460214, 460216])
  File "./aggregation_api.py", line 382, in __aggregate__
    clustering_aggregations = self.__cluster__(raw_markings,image_dimensions)
  File "./aggregation_api.py", line 556, in __cluster__
    shape_aggregation = self.cluster_algs[shape].__aggregate__(raw_markings,image_dimensions)
  File "/home/greg/github/reduction/engine/clustering.py", line 118, in __aggregate__
    cluster_results,time_to_cluster = self.__cluster__(markings,users,tools,reduced_markings,image_dimensions[subject_id])
  File "/home/greg/github/reduction/engine/blob_clustering.py", line 354, in __cluster__
    aggregate_polygons,aggregate_stats,total_incorrect_area = quad_root.__aggregate__(image_area)
  File "/home/greg/github/reduction/engine/blob_clustering.py", line 176, in __aggregate__
    total_polygons_user_density = cascaded_union(total_polygons_user_density[u])
  File "/usr/local/lib/python2.7/dist-packages/shapely/geometry/base.py", line 743, in __getitem__
    return self.geoms[index]
  File "/usr/local/lib/python2.7/dist-packages/shapely/geometry/base.py", line 829, in __getitem__
    raise IndexError("index out of range")
IndexError: index out of range

ignore - misuse of rollbar (Greg's fault)


Streaming from microhphone

Can you add the feature to use the microphone for transcribing?

Can you describe a bit what's your use case?

Version 0.17 includes experimental live transcription in case you have to test it. Thanks


BUG: Sets the datetime of TradingAlgorithm initially to the simulation period start

The datetime attribute of TradingAlgorithm was initially None, so calling get_datetime in initialize was causing an unhandled exception. This commit addresses that issue by calling on_dt_changed when initializing the TradingAlgorithm, to force all datetimes to be in line with the period_start.

:+1: Once Jenkins passes


Notify users after device transfer

Issue

Link: https://github.com/NebraLtd/maker-starter-app/issues/76
Summary:
Display user friendly error message or success message after executing the transfer hotspot.

How Transfer Hotspot" works:

Maker App compose a transfer transaction for the given hotpot and the new owner address.
Maker App delegate this transaction to Helium Hotspot App using the deep link.
Helium App presents the details of the transfer hotspot transaction.
User confirms the transaction.
Helium App submits the transaction to the chain.
Helium App return the hash value of the pending trasaction back to the Maker App using deep link.
Maker App displays the hash value of the pending transaction to the user.

How to notify users after device transfer:

For obvious errors before submitting the transaction, the Maker App displays the error message to the user immediately as a toast. These types of errors include "Hotspot has no recent activity", "Invalid owner address", etc.
After submitting the transaction, the user will be presented with the hash value of the pending transaction.

Screenshots

Example error message 1:

Example error message 2:

Confirm Transfer Hotspot on Helium Hotspot App

Hash value of the pending transaction after executing the transfer hotspot

References

https://docs.helium.com/api/blockchain/pending-transactions/

Checklist

[ ] Tests added
[ ] Cleaned up commit history (rebase!)
[ ] Documentation added
[ ] Thought about variable and method names

This pending transaction might fail or succeed. The problem is that the user would have no idea how to check the status of the pending transfer transaction from its hash value.
The helium explorer doesn't display about the pending transactions. There is only a helium API for getting pending transactions, but no UI in helium explorer.
https://docs.helium.com/api/blockchain/pending-transactions/
To improve the user experience, we can consider the following possibilities

Maker App may present an online URL about this pending transaction. Since helium explorer can't be used for this we can make the Dashboard to display pending transaction status.
Maker App check the pending transaction status in a timer handler and displays it to the user as a local notification.
We can develop a backend feature for checking the pending transactions status and it sends the transaction status to the app as a push notification.

An example failed pending transaction of transfer notification.
https://api.helium.io/v1/pending_transactions/jC2_QVJWiE4x7Crq0tGEAJSiRhGtJ4DoEzg609e9RWw
{
  "data": [
    {
      "updated_at": "2022-04-11T04:16:09.446226Z",
      "type": "transfer_hotspot_v2",
      "txn": {
        "type": "transfer_hotspot_v2",
        "owner": "13PPXmY9r6jRWM3idqTmPDhPRjEADZn36TQXCRHXE83tSq6fvGi",
        "nonce": 2,
        "new_owner": "13PPXmY9r6jRWM3idqTmPDhPRjEADZn36TQXCRHXE83tSq6fvGi",
        "hash": "jC2_QVJWiE4x7Crq0tGEAJSiRhGtJ4DoEzg609e9RWw",
        "gateway": "11Evbyw5ryRcGSXDPkireLdBVrV2JRUD4z3h1UbFVaRJPHctxGr",
        "fee": 40000
      },
      "status": "failed",
      "hash": "jC2_QVJWiE4x7Crq0tGEAJSiRhGtJ4DoEzg609e9RWw",
      "failed_reason": "{invalid,owner_is_buyer}",
      "created_at": "2022-04-11T04:15:01.515315Z"
    },
    {
      "updated_at": "2022-04-11T04:16:09.446919Z",
      "type": "transfer_hotspot_v2",
      "txn": {
        "type": "transfer_hotspot_v2",
        "owner": "13PPXmY9r6jRWM3idqTmPDhPRjEADZn36TQXCRHXE83tSq6fvGi",
        "nonce": 2,
        "new_owner": "13PPXmY9r6jRWM3idqTmPDhPRjEADZn36TQXCRHXE83tSq6fvGi",
        "hash": "jC2_QVJWiE4x7Crq0tGEAJSiRhGtJ4DoEzg609e9RWw",
        "gateway": "11Evbyw5ryRcGSXDPkireLdBVrV2JRUD4z3h1UbFVaRJPHctxGr",
        "fee": 40000
      },
      "status": "failed",
      "hash": "jC2_QVJWiE4x7Crq0tGEAJSiRhGtJ4DoEzg609e9RWw",
      "failed_reason": "{invalid,owner_is_buyer}",
      "created_at": "2022-04-11T04:15:00.206449Z"
    }
  ]
}


[Snyk] Security upgrade starlette from 0.27.0 to 0.40.0

Snyk has created this PR to fix 1 vulnerabilities in the pip dependencies of this project.
Snyk changed the following file(s):

requirements/generated/requirements-production.txt

⚠ Warning
sentry-sdk 2.11.0 requires urllib3, which is not installed.
argon2-cffi-bindings 21.2.0 requires cffi, which is not installed.

[!IMPORTANT]

Check the changes in this PR to ensure they won't cause issues with your project.
Max score is 1000. Note that the real score may have changed since the PR was raised.
This PR was automatically created by Snyk using the credentials of a real user.
Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the affected dependencies could be upgraded.

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
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Allocation of Resources Without Limits or Throttling

Done in https://github.com/ministryofjustice/laa-civil-case-api/pull/49


fixes #1106 - Return empty HealthCheck result instead on None, when no r...

...esults are present

Doesn't this change the semantics of the "alive" value of the health check result? When a task has not received any health result with this patch, the /apps endpoint will return a health check result with alive=true, won't it?

In other words, we either have the Option[Health] type or we have to change the type of alive from Boolean to Option[Boolean].

Related to #940 too.

@sttts You're right. Closing this until I find a better solution.

Hm... Actually if it doesn't have a lastFailure set, you can be sure that it has never been healthy, so setting healthy = false should be okay.

Only alive is misleading. In the json we can set alive=null, in the code alive: Option[Boolean].

alive = false is correct, because it has never been alive. I think firstFailure = null should be enough to determine that it just didn't fully start yet.

Got what you mean. alive=false is better than healthy=false.

What is the opinion here?
My feeling is that the new semantics of alive=false + lastFailure=null is a bit complicated, but makes sense on the second thought.

@ConnorDoyle Could you please review?


License

Hi, thanks for releasing SLAM LLM! Would you mind adding a license? Thanks!

Hi, this repo is under MIT License.

Thanks!


vndr github.com/docker/docker from components/engine

Found differences between the engine and the cli vendor of engine in the docker-ce 17.06 branch. This PR will vendor github.com/docker/docker from components/engine dir.

I linked the related PR's either upstream (moby/moby) and/or the cherry-picks in components/engine

I'm ok to have this PR in as a stop gap measure for now to get these guys in sync, but we have to think about a way to get the vendor dir updated on a more regular basis.

@tiborvass fyi

By now we probably should do the same again (various PR's were merged)?

@vieux @andrewhsu @thaJeztah wdyt of https://github.com/docker/docker-ce/compare/17.06...tiborvass:fix-vendor ?

I opened my version at https://github.com/docker/docker-ce/pull/148

I've scrubbed all of the comments put in by @thaJeztah (thanks for digging into it) and found that the discrepancies between components/engine and components/cli/vendor/github.com/docker/docker are caused by one of two reasons:

creating branch 17.06 when the upstream components docker/cli had not vendored moby/moby to keep in sync
creating PRs to 17.06 that modify code in components/engine but with no corresponding sync to vendor in components/cli/vendor/github.com/docker/docker

For the first item, I suggest we setup a regular vendor sync in docker/cli repo to vendor changes from moby/moby /cc @dnephin
For the second item, I suggest we setup automatic vendor check to make sure code changes to components/engine are vendored into components/cli/vendor/github.com/docker/docker on PRs to docker-ce /cc @seemethere and I'd say #148 (thanks @tiborvass) is a step towards that direction.
So, I'm gong to close this PR in favor of #148 since it synced up the vendor directory a little later in time than this PR and caught 2 more vendor mismatches.

Why is vendor mismatch a problem if the tests pass?


05_run_ocp: backup install config

openshift-install create would remove the config, so it should be
backed up as it might be useful

It doesn't seem to be used anywhere, so lets drop this for now


Add worker application

Trello card URL
https://trello.com/c/eAnYTJac
How to review:
cd teacher-services-cloud
aws-vault exec Deployments -- make review terraform-app-plan  pr_id=12345 VERBOSE=1 tag=main-5d4cafa607547d0c27aff64f5858babe2f1474e3 passcode=$PASSCODE

 TV: Create worker application


[BUG] 401 using DefaultAzureCredentials in the AzureOpenAIClient

Library name and version
Azure.AI.OpenAI  2.0.0-beta.2
Describe the bug
I have the following setup as a Singleton using dependency injection:
new AzureOpenAIClient(
    new Uri(endpoint),
    new DefaultAzureCredential(),
    new AzureOpenAIClientOptions(ServiceVersion.V2024_06_01)
);

I then inject this into my application and use this code to chat:
var chatClient = _openAIClient.GetChatClient(deploymentName);
var response = await chatClient.CompleteChatAsync(messages, options);

Intermittently, this call returns a 401. It seems to happen every 30 seconds or so and lasts for 30 seconds, then it goes away. Is there an issue with token management? FYI, this code worked fine before v2.0.
Expected behavior
These should all result in 200 responses.
Actual behavior
Intermittent 401 responses.
Reproduction Steps
Use dependency injection with a Singleton:
new AzureOpenAIClient(
    new Uri(endpoint),
    new DefaultAzureCredential(),
    new AzureOpenAIClientOptions(ServiceVersion.V2024_06_01)
);

In a controller, do this:
var chatClient = _openAIClient.GetChatClient(deploymentName);
var response = await chatClient.CompleteChatAsync(messages, options);

Environment
.Net 8.0.2 running on a Linux App Service in Azure. Locally running this on Mac OS.

FYI, the correct RBAC permissions are granted for our development team and for our App Service Managed Identity:

Cognitive Services OpenAI User
Cognitive Services Usages Reader

@cdwaddell I need a couple things to troubleshoot:

Which version of the Azure.Identity package are you using?
Can you please enable logging and provide the output here? This will tell us which authN mechanism DefaultAzureCredential is attempting to use.

We were running 4.11.3 of Azure.Identity. I do see that 4.12.0 is now out, so I am going to push an update to that one.
Unfortunately, I work for a locked down industry so can't post any logging here. I can't even create tickets unless I use my personal account on my personal device. That being said, I'll see if I can dig into the logs and see what authn is used when we get a 401. I can see that when we get a 200, it is using the App Service MI.

Also of Note, we use DefaultAzureCredentials for KeyVault, StorageAccount, Queue, and Azure AI Search. OpenAI is the only service with intermittent 401s which started when I updated to v2.0.

@cdwaddell You'll definitely want to update your Azure.Identity package, as version 1.11.3 contains a known vulnerability.
Tagging @christothes to help triage further.

@cdwaddell You'll definitely want to update your Azure.Identity package, as version 1.11.3 contains a known vulnerability.
Tagging @christothes to help triage further.

I saw that :) thanks for the heads up!

Independently of the Identity package: we do have a custom implementation for token management in the v2.0 AOAI library and it's highly probable it's not as robust (or perhaps even correct) as it needs to be -- this is due to the new client being built atop System.ClientModel rather than Azure.Core. We'll follow up. And thank you for the report!

That makes sense, the upgrade to v2.0 has been painful due to SCM as well. Thanks for the update.

@trrwilson I reviewed the custom token management code, and it looks good superficially. The only thing that stands out is potential concurrency problems, but I can rule that out as it is happening locally when a single thread is the only worker. When running locally, it appears to hit every 7th or 8th request instead of on a timer interval as I suggested in my initial report.
@scottaddie , here are the logs when I run it locally. This is the error:
System.ClientModel.ClientResultException: Service request failed.

Status: 401 (Unauthorized)
   at Azure.AI.OpenAI.ClientPipelineExtensions.ProcessMessageAsync(ClientPipeline pipeline, PipelineMessage message, RequestOptions options)
   at Azure.AI.OpenAI.Chat.AzureChatClient.CompleteChatAsync(BinaryContent content, RequestOptions options)
   at OpenAI.Chat.ChatClient.CompleteChatAsync(IEnumerable`1 messages, ChatCompletionOptions options, CancellationToken cancellationToken)
   at MetIQ.API.Services.Generation.OpenAILLMService.GenerateWithContext(String systemPrompt, IEnumerable`1 context, IList`1 conversationHistory, Prompt userPrompt) in /Users/********/Source/Repos/MetIQ/13882_MetIQ_API/src/api/Services/Generation/OpenAILLMService.cs:line 114
   at MetIQ.API.RagStrategies.GenericRetrievalRerankGenerateStrategy.PerformSearchAndGeneration(String systemPrompt, IList`1 conversationHistory, Prompt userPrompt, IRetrievalService retrievalService, IEnumerable`1 generationAugmentationServices, IGenerationService generationService, List`1 searchCriteria) in /Users/********/Source/Repos/MetIQ/13882_MetIQ_API/src/api/RagStrategies/GenericRetrievalRerankGenerateStrategy.cs:line 234
   at MetIQ.API.RagStrategies.GenericRetrievalRerankGenerateStrategy.Generate(String systemPrompt, IList`1 conversationHistory, Prompt userPrompt, List`1 filters) in /Users/********/Source/Repos/MetIQ/13882_MetIQ_API/src/api/RagStrategies/GenericRetrievalRerankGenerateStrategy.cs:line 73
   at [MetIQ.API.Controllers.ChatController.Post](http://metiq.api.controllers.chatcontroller.post/)(CompletionV1 v1Completion, Guid usecase) in /Users/********/Source/Repos/MetIQ/13882_MetIQ_API/src/api/Controllers/ChatController.cs:line 56
   at lambda_method20(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

Here are the logs for the token selection that occurred immediately before the error. You will notice that it landed on my local user account using the CLI credentials, on the server it is the MI of the App Service.
[Informational] Azure-Core: Request [53f6d504-82b8-45a2-9ea9-da1e16b698d9] exception System.Threading.Tasks.TaskCanceledException: The operation was cancelled because it exceeded the configured timeout of 0:00:01. Network timeout can be adjusted in ClientOptions.Retry.NetworkTimeout.

2

---> System.Threading.Tasks.TaskCanceledException: A task was canceled.

   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)

   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)

   at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)

   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)

   --- End of inner exception stack trace ---

   at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)

   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)

   at Azure.Core.Pipeline.HttpClientTransport.ProcessSyncOrAsync(HttpMessage message, Boolean async)

   at Azure.Core.Pipeline.HttpPipelineTransportPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline)

   at Azure.Core.Pipeline.ResponseBodyPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)

   --- End of inner exception stack trace ---

   at Azure.Core.Pipeline.ResponseBodyPolicy.ThrowIfCancellationRequestedOrTimeout(CancellationToken originalToken, CancellationToken timeoutToken, Exception inner, TimeSpan timeout)

   at Azure.Core.Pipeline.ResponseBodyPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)

   at Azure.Core.Pipeline.LoggingPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)

[Error] Azure-Identity: False MSAL <IP_ADDRESS> MSAL.NetCore .NET 8.0.2 MacOS [2024-07-09 23:36:55Z - 7c03621c-f8f1-4bbb-a6e3-e0548d5becc7] Exception type: Azure.Identity.CredentialUnavailableException

---> Inner Exception Details

Exception type: System.Threading.Tasks.TaskCanceledException

---> Inner Exception Details

Exception type: System.Threading.Tasks.TaskCanceledException

---> Inner Exception Details

Exception type: System.Threading.Tasks.TaskCanceledException

To see full exception details, enable PII Logging. See https://aka.ms/msal-net-logging

   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)

   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)

   at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)

   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)

=== End of inner exception stack trace ===

To see full exception details, enable PII Logging. See https://aka.ms/msal-net-logging

   at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)

   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)

   at Azure.Core.Pipeline.HttpClientTransport.ProcessSyncOrAsync(HttpMessage message, Boolean async)

   at Azure.Core.Pipeline.HttpPipelineTransportPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline)

   at Azure.Core.Pipeline.ResponseBodyPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)

   at Azure.Core.Pipeline.RedirectPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)

2

   at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)

   at Azure.Identity.ManagedIdentitySource.AuthenticateAsync(Boolean async, TokenRequestContext context, CancellationToken cancellationToken)

   at Azure.Identity.ImdsManagedIdentitySource.AuthenticateAsync(Boolean async, TokenRequestContext context, CancellationToken cancellationToken)

=== End of inner exception stack trace ===

To see full exception details, enable PII Logging. See https://aka.ms/msal-net-logging

   at Azure.Identity.ImdsManagedIdentitySource.AuthenticateAsync(Boolean async, TokenRequestContext context, CancellationToken cancellationToken)

   at Azure.Identity.ManagedIdentityClient.AuthenticateCoreAsync(Boolean async, TokenRequestContext context, CancellationToken cancellationToken)

   at Azure.Identity.ManagedIdentityClient.AppTokenProviderImpl(AppTokenProviderParameters parameters)

   at Microsoft.Identity.Client.Internal.Requests.ClientCredentialRequest.SendTokenRequestToAppTokenProviderAsync(ILoggerAdapter logger, CancellationToken cancellationToken)

   at Microsoft.Identity.Client.Internal.Requests.ClientCredentialRequest.GetAccessTokenAsync(CancellationToken cancellationToken, ILoggerAdapter logger)

   at Microsoft.Identity.Client.Internal.Requests.ClientCredentialRequest.ExecuteAsync(CancellationToken cancellationToken)

   at Microsoft.Identity.Client.Internal.Requests.RequestBase.<>c__DisplayClass11_1.<<RunAsync>b__1>d.MoveNext()

--- End of stack trace from previous location ---

   at Microsoft.Identity.Client.Utils.StopwatchService.MeasureCodeBlockAsync(Func`1 codeBlock)

   at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)

[Informational] Azure-Identity: ManagedIdentityCredential.GetToken was unable to retrieve an access token. Scopes: [ https://cognitiveservices.azure.com/.default ] ParentRequestId:  Exception: Azure.Identity.CredentialUnavailableException (0x80131500): ManagedIdentityCredential authentication unavailable. No response received from the managed identity endpoint.

---> System.Threading.Tasks.TaskCanceledException (0x8013153b): The operation was cancelled because it exceeded the configured timeout of 0:00:01. Network timeout can be adjusted in ClientOptions.Retry.NetworkTimeout.

2

---> System.Threading.Tasks.TaskCanceledException (0x8013153b): A task was canceled.

[Informational] Azure-Identity: VisualStudioCredential.GetToken invoked. Scopes: [ https://cognitiveservices.azure.com/.default ] ParentRequestId:

[Informational] Azure-Identity: VisualStudioCredential.GetToken was unable to retrieve an access token. Scopes: [ https://cognitiveservices.azure.com/.default ] ParentRequestId:  Exception: Azure.Identity.CredentialUnavailableException (0x80131500): Visual Studio Token provider can't be accessed at /Users/********/.IdentityService/AzureServiceAuth/tokenprovider.json

---> System.IO.DirectoryNotFoundException (0x80070003): Could not find a part of the path '/Users/********/.IdentityService/AzureServiceAuth/tokenprovider.json'.

[Informational] Azure-Identity: AzureCliCredential.GetToken invoked. Scopes: [ https://cognitiveservices.azure.com/.default ] ParentRequestId:

[Informational] Azure-Identity: Client ID: ********. Tenant ID: ********. User Principal Name: [********](mailto:********) Object ID: ********

[Informational] Azure-Identity: AzureCliCredential.GetToken succeeded. Scopes: [ https://cognitiveservices.azure.com/.default ] ParentRequestId:  ExpiresOn: 2024-07-10T00:15:28.0000000+00:00

[Informational] Azure-Identity: DefaultAzureCredential credential selected: Azure.Identity.AzureCliCredential

[Informational] Azure-Identity: DefaultAzureCredential.GetToken succeeded. Scopes: [ https://cognitiveservices.azure.com/.default ] ParentRequestId:  ExpiresOn: 2024-07-10T00:15:28.0000000+00:00

From the Azure.Identity perspective, you are getting a token, so everything is ok from that perspective. The 401 seems to indicate that the token is not authorized for the resource, which is strange to see intermittently.

That makes sense, the upgrade to v2.0 has been painful due to SCM as well. Thanks for the update.

@cdwaddell, I am curious to learn more about your experience here.  What kind of difficulties are you having that are related to SCM?  Many thanks in advance for sharing your perspective!

I forked the repo, and removed this check:

And I no longer get a 401 error.

That makes sense, the upgrade to v2.0 has been painful due to SCM as well. Thanks for the update.

@cdwaddell, I am curious to learn more about your experience here. What kind of difficulties are you having that are related to SCM? Many thanks in advance for sharing your perspective!

@annelo-msft, glad to give our feedback:

We use the Azure SDK and follow the guidelines around responses and response objects. All of which change in SCM (ie. RequestFailedExceptions becomse ClientResultExceptions). So we have to redo our middleware to make changes that no longer align to the azure-sdk-fo-net standard documentation.
We have written numerous HttpPipelinePolicies, and leverage Microsoft.Extensions.Http.Resilience (formerly Polly). All of which needed to be reimplemented in SCM as PipelinePolicies. Some features were unable to be reimplemented because the corollary SCM classes are marked as Internal, or do not exist.
We also had extensive Unit Testing around our classes where we Mocked the response objects. Those same Mocks are not possible or they became very difficult. Again, this is usually because of Internal classes, and the removal of Factory classes that made the v1.0 Azure OAI library easy to Mock.

@annelo-msft, glad to give our feedback

Thanks so much for this information!  If you're willing to also share information around which types being internal have been problematic for you, that would be helpful for us moving forward.  SCM is still in beta, so we have the ability to make some adjustments there if needed.  We are also actively adding features related to the ones in Azure.Core, so your input on features you would like to see the most could help us prioritize our work on this.
@KrzysztofCwalina, @joseharriaga, @trrwilson FYI - there may be opportunities here to make migrations from Azure.Core-based libraries to Azure libraries built around the SCM pipeline easier for end-users based on this feedback.
@cdwaddell, many thanks, and if more pain points occur to you as you go along, we would love to have them for our tracking.

From the Azure.Identity perspective, you are getting a token, so everything is ok from that perspective. The 401 seems to indicate that the token is not authorized for the resource, which is strange to see intermittently.

I forked the repo, and removed this check:  And I no longer get any 401 errors.

@cdwaddell, removing that check will forcibly refresh the token on every call (calling the full, multi-second acquisition each time) -- it's great that removing it unblocks token use, but it'd be great to understand why it is that the forcibly refreshed token suddenly works. Do you see the same debug token spew with the pre-fallback acquisition succeeding on the second try (with the caching removed)?
Holistically, it seems like the right fix here is to ensure that a token is invalided if the request isn't successful.

From the Azure.Identity perspective, you are getting a token, so everything is ok from that perspective. The 401 seems to indicate that the token is not authorized for the resource, which is strange to see intermittently.

I forked the repo, and removed this check:  And I no longer get any 401 errors.

@cdwaddell, removing that check will forcibly refresh the token on every call (calling the full, multi-second acquisition each time) -- it's great that removing it unblocks token use, but it'd be great to understand why it is that the forcibly refreshed token suddenly works. Do you see the same debug token spew with the pre-fallback acquisition succeeding on the second try (with the caching removed)?
Holistically, it seems like the right fix here is to ensure that a token is invalided if the request isn't successful.

I do not think the token will be forcibly refreshed with every call since the DefaultAzureCredentials and class handles token lifetime and refreshing for us. Unless I am missing something:
https://learn.microsoft.com/en-us/dotnet/api/azure.identity.defaultazurecredential?view=azure-dotnet#methods

Holistically, it seems like the right fix here is to ensure that a token is invalided if the request isn't successful.

I do not think the token will be forcibly refreshed with every call since the DefaultAzureCredentials class handles token lifetime and refreshing for us. Unless I am missing something:
https://learn.microsoft.com/en-us/dotnet/api/azure.identity.defaultazurecredential?view=azure-dotnet#methods

It's true that most of Azure.Identity's TokenCredential implementations will cache the token and refresh as appropriate. The scenario where you'd see the most latency, however, is for local dev/test if you are using any of the dev tool credentials.

Holistically, it seems like the right fix here is to ensure that a token is invalided if the request isn't successful.

I do not think the token will be forcibly refreshed with every call since the DefaultAzureCredentials class handles token lifetime and refreshing for us. Unless I am missing something:
https://learn.microsoft.com/en-us/dotnet/api/azure.identity.defaultazurecredential?view=azure-dotnet#methods

It's true that most of Azure.Identity's TokenCredential implementations will cache the token and refresh as appropriate. The scenario where you'd see the most latency, however, is for local dev/test if you are using any of the dev tool credentials.

I am using DefaultAzureCredentials which is either Managed Instance or AZ CLI when running locally, so I do not need the extra expiration check which seems to cause the use of tokens that are no longer valid resulting in a 401.


Running TestStep to Delete an Object Default Behavior Deletes More than Intended Resource

What happened: Went attempting to test the deletion of a Namespace, if the test author incorrectly identified the object (namespace in this case) to be deleted, KuTTL seems to interpret this as a 'file glob' for lack of a better way to put it.  Shown by the error when attempting to delete the default namespace - audit logs will show a 403 occurs - ceasing the TestStep Execution.
What you expected to happen:
For Namespaces or Cluster Scoped resources, the binary would default to validating for specific instances of the k8s API rather than assuming you meant all.
How to reproduce it (as minimally and precisely as possible):
➜ tree
.
├── kuttl-test.yaml
├── setup
└── wrong
    └── 00-test
        └── 00-test-step.yaml

setup
#!/usr/bin/env bash

namespaces=( a-project a-project2 b-project b-project2 c-project c-project2 )

echo "Setting up test namespaces..."
for i in "${namespaces[@]}"
do
  kubectl create namespace ${i}
done

echo "Running Kuttl...."
kubectl kuttl test wrong/ -v 5

kuttl-test.yaml
apiVersion: kuttl.dev/v1beta1
kind: TestSuite
testDirs:
- wrong/
timeout: 120

wrong/00-test/00-test-step.yaml
apiVersion: kuttl.dev/v1beta1
kind: TestStep
delete:
# commenting out namespace: ... produces same result
- apiVersion: v1
  kind: Namespace
  metadata:
    name: a-project
    namespace: a-project

Now for the run and output...
kuttl-error …
➜ setup

Current Namespaces...
NAME              STATUS   AGE
default           Active   21d
kube-node-lease   Active   21d
kube-public       Active   21d
kube-system       Active   21d

Setting up test namespaces...
namespace/a-project created
namespace/a-project2 created
namespace/b-project created
namespace/b-project2 created
namespace/c-project created
namespace/c-project2 created

Running KuTTL...
2022/12/22 16:53:22 kutt-test config testdirs is overridden with args: [ wrong/ ]
=== RUN   kuttl
    harness.go:459: starting setup
    harness.go:250: running tests using configured kubeconfig.
    harness.go:287: Successful connection to cluster at: https://<IP_ADDRESS>:8443
    harness.go:355: running tests
    harness.go:73: going to run test suite with timeout of 120 seconds for each step
    harness.go:367: testsuite: wrong/ has 1 tests
=== RUN   kuttl/harness
=== RUN   kuttl/harness/00-test
=== PAUSE kuttl/harness/00-test
=== CONT  kuttl/harness/00-test
    logger.go:42: 16:53:23 | 00-test | Creating namespace: kuttl-test-endless-jawfish
    logger.go:42: 16:53:23 | 00-test/0-test-step | starting test step 0-test-step
    case.go:362: failed in step 0-test-step
    case.go:364: namespaces "default" is forbidden: this namespace may not be deleted
I1222 16:53:24.146376   36209 request.go:601] Waited for 1.047013661s due to client-side throttling, not priority and fairness, request: GET:https://<IP_ADDRESS>:8443/apis/scheduling.k8s.io/v1?timeout=32s
    logger.go:42: 16:53:24 | 00-test | Failed to collect events for 00-test in ns kuttl-test-endless-jawfish: no matches for kind "Event" in version "events.k8s.io/v1beta1"
    logger.go:42: 16:53:24 | 00-test | Trying with events eventsv1 API...
    logger.go:42: 16:53:24 | 00-test | 00-test events from ns kuttl-test-endless-jawfish:
    logger.go:42: 16:53:24 | 00-test | Deleting namespace: kuttl-test-endless-jawfish
=== CONT  kuttl
    harness.go:401: run tests finished
    harness.go:510: cleaning up
    harness.go:567: removing temp folder: ""
--- FAIL: kuttl (1.27s)
    --- FAIL: kuttl/harness (0.00s)
        --- FAIL: kuttl/harness/00-test (1.22s)
FAIL

kuttl-error took 14.2s …
➜ kubectl get namespaces
NAME              STATUS   AGE
default           Active   21d
kube-node-lease   Active   21d
kube-public       Active   21d
kube-system       Active   21d

Anything else we need to know?:
I can fix the test and get this to run as intended. I just think that as a tool the default behavior shouldn't be as shown for Namespaces.
The reason for testing Namespace deletion is for Cluster Scoped  CRDs in development.
Environment:

Kubernetes version (use kubectl version): 1.25.2
KUTTL version (use kubectl kuttl version): 0.13.1 && 0.14.0
Cloud provider or hardware configuration: Running on VM
OS (e.g. from /etc/os-release): Fedora release 36, RHEL 8.6
Kernel (e.g. uname -a): Linux fedora 6.0.14-200.fc36.x86_64 | RHEL 4.18.0-372.9.1
Install tools: krew and manual
Others: N/A

I just hit this as well. The reason is that the syntax for resources to be deleted is not:
apiVersion: kuttl.dev/v1beta1
kind: TestStep
delete:
- apiVersion: v1
  kind: Namespace
  metadata:
    name: a-project

It's:
apiVersion: kuttl.dev/v1beta1
kind: TestStep
delete:
- apiVersion: v1
  kind: Namespace
  name: a-project

It's a deviation from the k8s standard way, and furthermore kuttl does not fail on an unexpected metadata field.
It just ignores it, meaning all it sees is:
- apiVersion: v1
  kind: Namespace

and joyfully deletes ALL namespaces.
There are a few ways to fix this, I guess the least intrusive would be to just support metadata.name as well...


azure/token.go: Add RefreshExchange for Azure

This is needed to acquire access tokens to different resources without re-initializing the auth flow each time. (Not so important for clientsecret/cert auth, but very important for device flow).

I'm already using this (using glide's aliasing) and it's working as expected.

lgtm

@colemickens golint is failing. If you fix that, then I'll be Ok. :)

After yet another go around with AAD, I validated this for all of my scenarios. I'm starting to learn how to handle various AAD error states, so if you're ever hitting your head at an error that doesn't make any sense, or something works in one tenant and not another, I might be able to help.
In this case, device auth was "not working", because the application was not configured correctly. Reconfiguring it lead down one incorrect path with the obnoxious "Sorry, but we’re having trouble signing you in. We received a bad request." message. Finally got it configured correctly (it needed to ask for user consent to "Access Directory as Signed in User".


Negative scaling factor predicted

Hi,
I've been trying out your code and found that the method predicts negative scales quite often. This causes, for example, the mugs bottom to end up at the top. On the other hand, it seems like the bowl requires that negative scaling factor to be correct with the predicted quaternion.
Also, using the models you provided, the handle of the mug seems to be missing pretty much always.
Here are some examples:

Thank you for trying my code.
Due to the output of the estimation results that you pointed out, the pose estimation performance of the mug is lower than that of other objects. This is one of the weak points of our method.
In our method, outlier removal filter is applied as a post-processing step to remove noise from the reconstructed point cloud. This may be the reason why the handle of the mug is missing.


Cannot extract single- and multicolumn text on the same page

Multicolumn text is extracted as if it has a single column if there is a header that spans over both columns.
I.e. the first line of the first column is assigned to cluster X subcluster 0, the first line of the second column to cluster X subcluster 1; the second lines are assigned to cluster X+1 and so on.
Here is an Example

Thanks @pokotylo for reporting this. I'm aware of this issue and thanks for the sample document, that would help the testing.
I've started to rewrite the entire sorting piece so I can address this more easily afterwards (branch v1.0). I'll be pushing the rewrite piece over the week end then start working on your use case.


Provide a CONTRIBUTING file

WIP; please don't review at this point.

I find it hard to start a review process on such a file. For now, I have been hacking something based on Mozilla Science Lab's guidelines to write a CONTRIBUTING file that in particular refers to Atom's CONTRIBUTING.md. In a first round of reviews, I would like to ask the following questions to a reviewer:

Is this the kind of content you expected from a CONTRIBUTING.md file?
Does the scope seem right to you?
Are there important things that are missing?
Are there things currently in the file that shouldn't be there? (If yes: should they just disappear or go to another file?)

Gabriel mentioned the idea of having a look at Nickel's HACKING.md file and I will be doing that now.


Introduce black, white background option into menu.

@volnes, check it out!

There is bug when u choose wallpaper.

 Will add hidden status bar.
white - yes. Will not fix this yet.

@volnes, can you retest?

Background wallpaper bug fixed, waiting for new color for white:-D
Thx for your work!
11 октября 2015 г. 15:25:33 Московское стандартное время, Vaclav Kosar<EMAIL_ADDRESS>пишет:

@volnes, can you retest?

Reply to this email directly or view it on GitHub:
https://github.com/vackosar/search-based-launcher/issues/17#issuecomment-147187140

--

@volnes Added black color for white background.


Update synect crate to 4.5.0.

So after the issue (and small discussion) in https://github.com/jmacdonald/amp/issues/205 I decided to work on updating scribe (and amp) to the current version of the syntect crate, since 3.0.0 introduced some breaking changes.
Although probably not immediately beneficial, having it merged would make updating the syntect crate to future versions much easier.
There's one nice thing though - this crate update brings in all new (and updated) syntax definitions bundled as part of the syntect crate.
I post this now to maybe discuss e.g. if we could make this update / the outward facing API of scribe cleaner regarding syntax handling, if we are already introducing breaking changes.
There seems to be no regressions, having used this branch as part of amp daily for more than a week now + all tests are passing.

Apologies for not having merged this; I've bumped to syntect v5 in #23!


initial CI configuration

Checks that the flake can be evaluated, and checks that the dev shell and package can be built.
Runs on PRs and pushes to main.
Also updates the devShell output, which was defined in the old format.

ACK, looks good to me as simple start :)


Added Remove All Whitespace in Every Language Article

Thanks for helping us build up our knowledge base!
What kind of pull request hav you brought us today?
Pull Request Type

[ ] Sample Program Documentation
[ ] Language Documentation
[x] Project Documentation
[ ] Other (explain below)

Notes
Feel free to share any details you feel are relevant.
This PR fixes this issue #2289 in the main repo.

So far so good! I made some minor suggestions based on what I expect this program to do. We'll need to talk out details like what types of whitespace? Just spaces? Or newlines and tabs as well?

Alright, I made a bunch of changes. Can you remove the C article for now and make a separate pull request for it? Otherwise, I think the project documentation is good to go!

Alright, I made a bunch of changes. Can you remove the C article for now and make a separate pull request for it? Otherwise, I think the project documentation is good to go!

Do you mean this article 2020-10-21-c.md in _posts folder?
Also, please add the hacktoberfest label to this PR #2291


Unhandled exception on calculate_streak endpoint

While testing the calculate_streak endpoint, i faced the following exception:
  File "Flashcard-App\backend\routes\api\statistics.py", line 203, in calculate_streak
    last_streak = stats["lastStreak"]
                  ^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Testing with valid data, it returns a proper  {'success': True} message, i had no problems with valid data.
But when it comes to testing with non-existent data, userID in this case, shouldn't the endpoint return something like "User not found" or {'success': False}?

Thanks, I'll look at this when I next have time


Dart 2.3: Disable the constant-experiment flag.

We're aiming to roll into Flutter / google3 with the ui-as-code flags on (https://github.com/dart-lang/sdk/issues/36531) and constants off.
To do this, we need:

[ ] An analyzer CL to report errors if spread/control-flow is used in const collections if the constant update is disabled.
[ ] A CFE CL to report errors if spread/control-flow is used in const collections if the constant update is disabled.

CFE CL https://dart-review.googlesource.com/c/sdk/+/99540 sent for review

Looks like @stereotype441 's CL has landed already:
https://dart-review.googlesource.com/c/sdk/+/99443

fyi - @nshahan

CFE CL now landed.

We have to undo a couple in dart2js, but we are ok with the temporary failure until things settle.

revert CL is now landed


unable to locate gradle (gradle-3.2 clearly installed)

Steps to Reproduce
Logs
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Exception from flutter run: Exception: Unable to locate gradle. Please install Android Studio.
package:flutter_tools/src/base/common.dart 29                          throwToolExit
package:flutter_tools/src/android/gradle.dart 97                       ensureGradle
package:flutter_tools/src/android/gradle.dart 122                      buildGradleProject
package:flutter_tools/src/commands/build_apk.dart 598                  buildAndroidWithGradle
package:flutter_tools/src/commands/build_apk.dart 609                  buildApk
package:flutter_tools/src/android/android_device.dart 281              AndroidDevice.startApp
package:flutter_tools/src/run_hot.dart 167                             HotRunner._run
package:flutter_tools/src/run_hot.dart 79                              HotRunner.run.<fn>
package:stack_trace/src/chain.dart 93                                  Chain.capture.<fn>
dart:async/zone.dart 1150                                              _rootRun
dart:async/zone.dart 1026                                              _CustomZone.run
dart:async/zone.dart 1503                                              runZoned
package:stack_trace/src/chain.dart 91                                  Chain.capture
package:flutter_tools/src/run_hot.dart 78                              HotRunner.run
package:flutter_tools/src/commands/daemon.dart 406                     AppDomain.startApp.<fn>
package:flutter_tools/src/base/context.dart 76                         AppContext._run
package:flutter_tools/src/base/context.dart 66                         AppContext.runInZone.<fn>
dart:async/zone.dart 1150                                              _rootRun
dart:async/zone.dart 1026                                              _CustomZone.run
dart:async/zone.dart 1503                                              runZoned
package:flutter_tools/src/base/context.dart 65                         AppContext.runInZone
package:flutter_tools/src/commands/daemon.dart 732                     AppInstance._runInZone
package:flutter_tools/src/commands/daemon.dart 404                     AppDomain.startApp
package:flutter_tools/src/commands/run.dart 216                        RunCommand.runCommand
package:flutter_tools/src/runner/flutter_command.dart 148              FlutterCommand.verifyThenRunCommand
package:flutter_tools/src/commands/run.dart 199                        RunCommand.verifyThenRunCommand
package:flutter_tools/src/runner/flutter_command.dart 119              FlutterCommand.run
package:args/command_runner.dart 194                                   CommandRunner.runCommand
package:flutter_tools/src/runner/flutter_command_runner.dart 221       FlutterCommandRunner.runCommand
package:args/command_runner.dart 109                                   CommandRunner.run.<fn>
dart:async/future.dart 208                                             Future.Future.sync
package:args/command_runner.dart 109                                   CommandRunner.run
package:flutter_tools/src/runner/flutter_command_runner.dart 150       FlutterCommandRunner.run
package:flutter_tools/executable.dart 128                              main.<fn>.<fn>
package:stack_trace/src/chain.dart 93                                  Chain.capture.<fn>
dart:async/zone.dart 1150                                              _rootRun
dart:async/zone.dart 1026                                              _CustomZone.run
dart:async/zone.dart 1503                                              runZoned
package:stack_trace/src/chain.dart 91                                  Chain.capture
package:flutter_tools/executable.dart 127                              main.<fn>
package:flutter_tools/src/base/context.dart 76                         AppContext._run
package:flutter_tools/src/base/context.dart 66                         AppContext.runInZone.<fn>
dart:async/zone.dart 1150                                              _rootRun
dart:async/zone.dart 1026                                              _CustomZone.run
dart:async/zone.dart 1503                                              runZoned
package:flutter_tools/src/base/context.dart 65                         AppContext.runInZone
package:flutter_tools/executable.dart 98                               main
/home/darrell/flutter/packages/flutter_tools/bin/flutter_tools.dart 8  main
dart:isolate-patch/isolate_patch.dart 259                              _startIsolate.<fn>
dart:isolate-patch/isolate_patch.dart 148                              _RawReceivePortImpl._handleMessage
===== asynchronous gap ===========================
dart:async/future_impl.dart 22                                         _Completer.completeError
package:flutter_tools/src/android/gradle.dart 104                      ensureGradle
===== asynchronous gap ===========================
dart:async/zone.dart 1061                                              _CustomZone.registerCallback
dart:async/zone.dart 949                                               _CustomZone.bindCallback
dart:async/schedule_microtask.dart 148                                 scheduleMicrotask
dart:async/future.dart 182                                             Future.Future.microtask
package:flutter_tools/src/android/gradle.dart                          ensureGradle
package:flutter_tools/src/android/gradle.dart 122                      buildGradleProject
===== asynchronous gap ===========================
dart:async/zone.dart 1061                                              _CustomZone.registerCallback
dart:async/zone.dart 949                                               _CustomZone.bindCallback
dart:async/schedule_microtask.dart 148                                 scheduleMicrotask
dart:async/future.dart 182                                             Future.Future.microtask
package:flutter_tools/src/android/gradle.dart                          buildGradleProject
package:flutter_tools/src/commands/build_apk.dart 598                  buildAndroidWithGradle
===== asynchronous gap ===========================
dart:async/zone.dart 1061                                              _CustomZone.registerCallback
dart:async/zone.dart 949                                               _CustomZone.bindCallback
dart:async/schedule_microtask.dart 148                                 scheduleMicrotask
dart:async/future.dart 182                                             Future.Future.microtask
package:flutter_tools/src/commands/build_apk.dart                      buildAndroidWithGradle
package:flutter_tools/src/commands/build_apk.dart 609                  buildApk
===== asynchronous gap ===========================
dart:async/zone.dart 1061                                              _CustomZone.registerCallback
dart:async/zone.dart 949                                               _CustomZone.bindCallback
dart:async/schedule_microtask.dart 148                                 scheduleMicrotask
dart:async/future.dart 182                                             Future.Future.microtask
package:flutter_tools/src/commands/build_apk.dart                      buildApk
package:flutter_tools/src/android/android_device.dart 281              AndroidDevice.startApp
===== asynchronous gap ===========================
dart:async/zone.dart 1073                                              _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 27                                   _asyncThenWrapperHelper
package:flutter_tools/src/android/android_device.dart                  AndroidDevice.startApp
package:flutter_tools/src/run_hot.dart 167                             HotRunner._run
===== asynchronous gap ===========================
dart:async/zone.dart 1073                                              _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 27                                   _asyncThenWrapperHelper
package:flutter_tools/src/run_hot.dart                                 HotRunner._run
package:flutter_tools/src/run_hot.dart 79                              HotRunner.run.<fn>
package:stack_trace/src/chain.dart 93                                  Chain.capture.<fn>
dart:async/zone.dart 1150                                              _rootRun
dart:async/zone.dart 1026                                              _CustomZone.run
dart:async/zone.dart 1503                                              runZoned
package:stack_trace/src/chain.dart 91                                  Chain.capture
package:flutter_tools/src/run_hot.dart 78                              HotRunner.run
package:flutter_tools/src/commands/daemon.dart 406                     AppDomain.startApp.<fn>

Flutter Doctor
/home/darrell/flutter/bin/flutter --no-color doctor
[✓] Flutter (on Linux, channel master)
    • Flutter at /home/darrell/flutter
    • Framework revision 1e1f7703cc (2 hours ago), 2017-02-21 12:22:26
    • Engine revision ab09530927
    • Tools Dart version 1.23.0-dev.0.0

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.0)
    • Android SDK at /home/darrell/Android/Sdk
    • Platform android-25, build-tools 25.0.0
    • Java(TM) SE Runtime Environment (build 1.8.0_121-b13)

[-] Android Studio (version 2.3)
    • Android Studio at /home/darrell/android-studio
    ✗ Gradle not found.
    • Try updating or re-installing Android Studio.

[✓] IntelliJ IDEA Community Edition (version 2016.3)
    • Dart plugin version 163.13137
    • Flutter plugin version 0.1.10

[-] IntelliJ IDEA Community Edition (version 2017.1)
    • Dart plugin version 171.3019.10
    • Flutter plugin not installed; this adds Flutter specific functionality.
    • For information about managing plugins, see
      https://www.jetbrains.com/help/idea/managing-plugins.html

[✓] Connected devices
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.1 (API 25) (emulator)
Process finished with exit code 0

Using IDEA 2016.3 since the plugin isn't available for the 2017 version yet.
Up until yesterday flutter_gallery worked but hello_services failed to find gradle.
I've flutter upgraded most days and gallery worked at least last week.
ls -al android-studio/gradle
total 16
drwxrwxr-x. 4 darrell darrell 4096 Dec 15 21:10 .
drwxrwxr-x. 8 darrell darrell 4096 Feb 21 05:00 ..
drwxrwxr-x. 6 darrell darrell 4096 Dec 15 21:10 gradle-3.2
drwxrwxr-x. 8 darrell darrell 4096 Nov 28 17:52 m2repository
[darrell@localhost ~]$ ls -al /home/darrell/android-studio/gradle

@jakobr-google would know.
This also looks like another example of where we should probably stop execution in the flutter tool earlier when we know that one of the critical flutter doctor checks for that activity has failed (in this case missing gradle.  (FYI @cbracken who ran into something similar last week on the iOS side.)

It's because I use pub_semver to compare the gradle version to our minimum required, and pub_semver just cannot deal with versions that don't have 3 components.
Temporary workaround while I fix this is to do a flutter config --gradle-dir=/home/darrell/android-studio/gradle/gradle-3.2.

Thanks for the workaround.
Part of the reason for the bug report is that I couldn't find a way to do the config from the IDE

Thanks for the bug report!
There isn't an easy way to set this config because you're not supposed to have to set it.


nc4nix: add patch to fix unstable package updates

Description of changes
nc4nix is used to update our nextcloudPackages set to new app updates. Currently it also fetches beta releases which is not the correct behaviour. This patch fixes nc4nix to only consider stable releases.
Things done

Built on platform(s)

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

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

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

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

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

[x] Fits CONTRIBUTING.md.

@dasJ @ajs124 What do you think of it :)

Thank you @wegank for looking over it :)


[DRAFT]: How to update source code after args update

https://storybook.js.org/docs/7.0/vue/api/doc-block-source#transform 👈 This Is The Way

Before that, we should determine how to make DRY code blocks in docs. Now we write different code for Storybook and SFC components for code blocks in docs.


Window resize is weird with the form

Robin found this:

https://acteng.github.io/atip/areas.html?authority=West of England Combined Authority#12.1/51.45411/-2.5243
Resize your browser window
Open a form
Hide the sidebar

It happens even if the window is full width, but not full height. As soon as I maximize, it's fixed

Still happens, I haven't looked into this yet

Ah OK, apols. I thought that because the forms are so much smaller it was no longer and issue. Thanks for reopening it!

In think this is done now with the new design.

It's still not :( Even though we don't have a bottom bar, if you resize the window and expand/collapse the sidebar, some combinations cause the content of the sidebar to be visible on top of the bar when it shouldn't be

No resize bugs right now that I can spot, after we got rid of Carbon


$prismic object not recognised in nuxt.config.(js|ts)

Versions

"@nuxtjs/prismic": "^1.3.1"
"nuxt": "^2.15.7"
"typescript": "^4.3.5"
node: v14.17.3

Reproduction

Create a simple Nuxt.js project with Single Page App & Static. This bug happens when using JS or TS.
Create a Prismic repository and create a repeatable type (let's call it "blog-article" for now). Be sure to include the uid field.
Make a few example blog article pages in Prismic (can fill in with lorem ipsum text, doesn't really matter).
You don't need to actually create the pages/blog/_slug.vue pages to replicate this bug, but it's a nice-to-have. In Nuxt, we have to generate any dynamic routes in the nuxt.config.(js|ts) in order for them to be generated in the generate command.
Follow the Nuxt docs on generating dynamic routes by calling your Prismic repo API through the $prismic object. Code could look something like this:

// nuxt.config.js
const { $prismic } = require('@nuxtjs/prismic')

export default {
  ...
  generate: {
    async routes () {
      let generatedRoutes = []

      // Blog pages
      const articles = await $prismic.api.query(
        $prismic.predicates.at('document.type','blog-article')
      )
      articles.results.forEach(article => {
        generatedRoutes.push(
          {
            route: `/blog/${article.uid}`,
            payload: article
          }
        )
      })

      return generatedRoutes
    }
  }
}

Run npm run generate.

What is Expected?
npm run generate command to run smoothly and should see the routes you've just dynamically generated be logged in the generate script.
What is actually happening?
generate script fails because of TypeError: Cannot read property 'api' of undefined. It seems as though it's not liking the .api on $prismic.api.

I don't think I have missed anything, but if I have, please let me know, and sorry for if I raised a bug that's not a bug. I can't find anything else online about this. Any help is appreciated.
Thanks!

I have found a workaround for now using @prismicio/client package, but obviously would be good to get @nuxtjs/prismic working instead.
// nuxt.config.js
const Prismic = require('@prismicio/client')

export default {
  ...
  generate: {
    async routes () {
      let generatedRoutes = []

      // Blog pages
      const client = Prismic.client(process.env.PRISMIC_ENDPOINT, {
        accessToken: process.env.PRISMIC_ACCESS_TOKEN
      })
      const articles = await client.query(Prismic.Predicates.at('document.type', 'blog-article'))
      articles.results.forEach(article => {
        generatedRoutes.push(
          {
            route: `/blog/${article.uid}`,
            payload: article
          }
        )
      })

      return generatedRoutes
    }
  }
}

Hey @jackdomleo7, thanks for asking!
It's actually not a bug: it's not a feature:
@nuxtjs/prismic doesn't export anything else apart from the module, therefore you cannot import $prismic from it (and even if there was such an export I'm not sure how it could get configured properly since its configuration is part of the Nuxt config file but I digress here)
One way of getting access to $prismic inside the generate.routes function could have been through Nuxt context but it's not made available by Nuxt here (for reasons, I guess? cc @pi0)
Anyway, here are your options to achieve your desired result:

Using Nuxt.js built-in crawler, this one will figure out on its own all pages that need to be generated. It's reliable in most cases (the only case where it can miss pages is if you have dynamic pages with no other pages linking to them, but that's quite rare)
Using @prismicio/client like you did above to fetch the needed content.

Thank you for the response, makes total sense. I think I'll stick with using @prismicio/client approach. I may switch to the crawler when I can confirm I have no dynamic pages with other pages linking to them.


feat(GRO-214): sets up HomeApp

Sets up the above the fold content. I figure the remainder will be all loaded client-side.

Warnings

:warning:

Routes added to routes.tsx should have a corresponding cypress.js smoke test. See the cypress/integration folder for examples.

  Generated by :no_entry_sign: dangerJS against 113d74e7be365d10fc6d4e0d852f976437e82893

Odd; type-check is passing locally. Unsure what's going on here.

(Confirmed good over here too)


check for 'bsd' in sys.platform, using sh as a default shell

On BSD platforms, the sys.platform test for a default shell in confpage.py may fall through to the Darwin case. This may result in an error as follows, also preventing the display of the Spyder Preferences window.
Traceback (most recent call last):
  File "/usr/home/gimbal/wk/python_wk/spyder_sandbox/env/lib/python3.11/site-packages/spyder/plugins/preferences/plugin.py", line 276, in <lambda>
    lambda: self.open_dialog(main.prefs_dialog_size))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/home/gimbal/wk/python_wk/spyder_sandbox/env/lib/python3.11/site-packages/spyder/plugins/preferences/plugin.py", line 256, in open_dialog
    container.create_dialog(
  File "/usr/home/gimbal/wk/python_wk/spyder_sandbox/env/lib/python3.11/site-packages/spyder/plugins/preferences/widgets/container.py", line 58, in create_dialog
    page.initialize()
  File "/usr/home/gimbal/wk/python_wk/spyder_sandbox/env/lib/python3.11/site-packages/spyder/plugins/preferences/api.py", line 86, in initialize
    self.setup_page()
  File "/usr/home/gimbal/wk/python_wk/spyder_sandbox/env/lib/python3.11/site-packages/spyder_terminal/confpage.py", line 55, in setup_page
    if mac_ver >= LooseVersion('10.15.0'):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/home/gimbal/wk/python_wk/spyder_sandbox/env/lib/python3.11/site-packages/setuptools/_distutils/version.py", line 90, in __ge__
    c = self._cmp(other)
        ^^^^^^^^^^^^^^^^
  File "/usr/home/gimbal/wk/python_wk/spyder_sandbox/env/lib/python3.11/site-packages/setuptools/_distutils/version.py", line 350, in _cmp
    if self.version == other.version:
       ^^^^^^^^^^^^
AttributeError: 'LooseVersion' object has no attribute 'version'

This patch adds a test for 'bsd' in sys.platform, here using 'sh' as a default shell for confpage.py
When the Spyder Issue reporter popped up with this issue, I'd originally reported it to the spyder project. Noticing the source references in the backtrace available in the Issue reporter window, I'll try to retract or close the issue there.

tested on FreeBSD 13.2


Implement OOM score adjustment

This PR adds a new -O, --oom-score-adj option to start-stop-daemon and supervise-daemon to complement the existing --nicelevel and --ionice options. Often it is advantageous to depress the OOM score of critical system services so that the kernel's OOM killer will prefer to kill more "disposable" processes in OOM scenarios. SSD and SD previously lacked a clean way to adjust the OOM scores of the daemons they start. With this patchset, now the oom_score_adj of launched daemons can be specified either by the new command-line option or by a new SSD_OOMSCOREADJ environment variable, which is akin to SSD_NICELEVEL and SSD_IONICELEVEL.
Note: While crafting this enhancement, I noticed that supervise-daemon was missing support for the SSD_IONICELEVEL environment variable, as though it had been overlooked when such support was added to start-stop-daemon, so I took the opportunity to fill in the missing implementation (in a separate commit, which precedes the commit that holds the real meat of this PR).

should send the ionice change as a sep PR so we can get that in independently (i know it's a sep commit, but GH doesn't make it easy to merge PR's partially)
imo we should avoid short options unless there's a commonish meaning behind it.  for example, -h is very often short for --help, so that's OK.  but i don't know that anyone uses -O for --oom-score-adj.  do you have references to any prior art here ?  a ton of short inscrutable short options makes for command lines & init scripts that need a decoder ring to understand.  saving ~10 bytes now wastes everyone's time later.  i can guarantee no one will ever remember the meanings of every single ssd short option.

Fine by me. I hate short options, especially in scripts where their meaning is never clear when I go back to look at the script I wrote even a week later. I only defined a short option because every other option had a short form. If you're happy to break that pattern, I'm happy to remove -O.
As for splitting into two PRs, how should I do that? The PR to add the --oom-score-adj option will be dependent on the PR to fill in the SSD_IONICELEVEL environment variable support. Should the second PR target the branch of the first PR rather than targeting master?
Regarding merging, you're aware that you can merge PRs using the command line, right? GitHub will pick up the merge and reflect it properly on the web. I think if you merge only the first commit of this PR (which you could/should do as a FF, in my opinion), then GitHub will leave this PR open.

I do know that you can merge on the command line, but you get the full pr still when you do that.

@williamh: I'm confused. You don't have to merge from the tip of the PR branch.
$ git fetch origin
$ git checkout origin/master
$ git fetch origin pull/435/head
$ git merge --no-ff FETCH_HEAD^{/SSD_IONICELEVEL}
$ git push origin -- @:master

What are you saying GitHub does in that case? Admittedly I've never done it, but my expectation is that the PR would be left open and would remain mergeable with no conflicts.

I think that is going to take rewriting the command line parser a bit since we use getopt_long() which seems to require both long and short options unless I'm missing something.

No, that's not necessary. You just leave the short option out of the optstring and choose some other value for the long option's val. The usage printer in _usage.c omits printing a short option if val is not a printable character.

Oh, I forgot to take -O out of the manpages. Stand by.

i'm not anti all short options, just using short options that are not common and/or obvious.
getopt_long() does not require short options.  the val is simply what getopt_long returns so you can switch on it.  the only short options are what is passed in optstring.  for long-only options, we can simply use values greater than 127 to avoid conflict with the ASCII space.  personally i've started using 0x1000 as the long-only base so it's less confusing to readers.

@vapier: I used val=1 for the long-only --oom-score-adj option. Would you prefer 0x1000?

def do not use values <127.  it's confusing to read, will be even more confusing once we exhaust the limited non-printable ASCII space, and can be easy to introduce collisions if you're not careful (since they're all ints, 32 and ' ' will be the same, etc...).
i would actually look at codegen in -O2/-Os levels before deciding between 0x1000 & 0x80 base.  i suspect it won't be that big of a deal, but i don't care enough at that point to bikeshed :p.

def do not use values <127.

Okay. I'll change it.

0x80 base

Are you certain that isprint(0x80) actually returns false? For that matter, are you certain that isprint(0x1000) actually returns false in all locales?

i would actually look at codegen in -O2/-Os levels

With any long-only opts ≥0x1000, the compiler generates an initial range check for the switch to divide the option value space into a low range and a high range. The low range is handled by a jump table.
With four or fewer long-only opts starting at 0x1000, the high range is handled by a series of comparisons and conditional branches.
With five or more long-only opts starting at 0x1000, the compiler generates a second jump table to handle the high range.
With long-only opts starting at 0x1, the compiler generates a single jump table to handle all of the option values.
With long-only opts starting at 0x81, the compiler also generates a single jump table to handle all of the option values.

I also don't care to bikeshed. I'm just supporting my argument that making a sparse switch is less code-efficient. I'll implement whatever you say.

Are you certain that isprint......

i think you're missing some aspects of how locales work in POSIX runtimes.  nowhere in openrc do we call setlocale().  that means all our C code only executes in the POSIX locale (i.e. the C locale).  hence the only codeset we care about here is ASCII.  hence isprint(0x80) and every other value >=0x7f will return false.
that said, when i added the isprint() to the usage code, it was copying a pattern i used in other Gentoo projects when i was using the random non-printable ranges (e.g. 0x01 - 0x1f) due to a misunderstanding of how getopt_long actually worked.  i've learned since through experience that it's a bad pattern, and i haven't circled back to updating the openrc code accordingly.
so only use <0x80 values in getopts_long when it's actual printable characters.  if we're opting the short option, use >=0x80.

nowhere in openrc do we call setlocale().

That may be true now. I'd argue it's better to avoid the fragility of assuming anything about running in any particular locale, even the POSIX one. You don't want to tie your hands for the future in case you ever want to implement something where you'd want to depend on the user's preferred locale.

so only use <0x80 values in getopts_long when it's actual printable characters. if we're opting the short option, use >=0x80.

Okay, I'll base the long-only option value at 0x80.

making assumptions about POSIX locale behavior is the entire point of the POSIX locale.  it's an exact minimal definition, and anything that deviates from it is horribly broken and deserves to blow up and is not our problem.  it'd be like saying you can't make assumptions about ASCII codepoints.
i'm not tied to the use of isprint in the usage code as i alluded earlier.  switching to a hardcoded 0x80 test would be fine.  which would really be replacing one set of assumptions with another (in this case, encoding ASCII codepoint assumptions at compile time about C compiler behavior).
but i'll also note that writing locale portable code is a fun challenge by itself, and this particular aspect would hardly be the biggest issue.  i'll wager that we'll never need to support locale in our tools directly, and even if we wanted to, doing anything other than UTF-8 would be a waste of time, and supporting non-ASCII CLI flags would be a terrible idea.

@whitslack Please rebase this on current master and I'll take a look.

@williamh: Rebased (and squashed) as requested.

@whitslack All of the code style adjustments in this pr make it hard to review. Are you willing to fix the pr to only contain the code for the oom score adjustment implementation?

All of the code style adjustments in this pr make it hard to review. Are you willing to fix the pr to only contain the code for the oom score adjustment implementation?

@williamh: 😅 That's how it was to start, but then @vapier asked for a code style adjustment. I put all the code style changes in their own commit with no other changes, so if you're looking to review only the OOM score changes, they're all in d779c5ed833ab332aa65017681be74d4ab34d1e6.

i peeled the style change out and merged it by itself.  can you rebase please ?

I just did the same with the error message fix; it is merged into master.
I have an issue that no one else would have caught, and I agree it is specific to me, but thoughts would be appreciated.
While reviewing the code, I first thought the name of the environment variable you added was SSD_OOMSTORAGE, but it turns out that my screen reader pronounces SSD_OOMSCOREADJ in a way that sounds extremely similar to SSD_OOMSTORAGE.
So we need a new name for that environment variable.
I'm thinking either SSD_OOM_SCORE_ADJ or SSD_OOM_ADJ. Does anyone have any suggestions or preferences?

SSD_OOM_SCORE_ADJ is preferable since it matches the /proc/self/oom_score_adj name

@vapier Ok, that's what I thought, I'm working on that locally.

SSD_OOM_SCORE_ADJ is preferable since it matches the /proc/self/oom_score_adj name

If you make that change, then you should also change SSD_NICELEVEL→SSD_NICE_LEVEL and SSD_IONICELEVEL→SSD_IO_NICE_LEVEL for consistency. (You'd probably want to preserve as fallbacks the previous names of the existing variables for backward compatibility.)

to be clear, the nice settings don't have corresponding files whose names would be matched to.  but i don't disagree with using _ to break up the words.


Consider migrating to fast-deep-equal

deep-equal is not only 2 orders of magnitude slower than fast-deep-equal, but it's by far the biggest dependency tree limbs in the project containing polyfills that haven't been needed for browsers or Node since 2015 (and your package.json denotes "node": ">= 14"). At 38M weekly downloads, it is not a small project either. Swapping dependencies to fast-deep-equal could save consumers kilobytes and reap a performance benefit. Transitive dependencies would go from 53 to 4.

Thank you very much for the suggestion!
migrated in v4.0.3


Add a notifier setting to make notifications "urgent"

I run Ubuntu 16.04 and sometimes notifications aren't coming through. I believe the problem would be solved if the notification command had the flag --urgency=critical. A setting for that would be helpful. I don't know if there are any equivalents on Windows or Mac, but if there are, then that might solve some problems with those, too.

Can you reproduce this with a background task running notify-send test-title test-body without -u critical and getting the same inconsistent results? Notifier.java already has logic for setting urgency, but not all sent notifications are set to critical urgency.

Seems like restarting Unity actually fixed the problem. That said, running notify-send test-title test-body did nothing, while a notification did appear with -u critical.

Isnt Unity unmaintained now? Or well, latest Ubuntu dropped it for Gnome


Fix GC-safety issue with writev pointers in File.

Prior to this commit, there was a garbage-collection safety issue
with the way that the _pending_writev array worked in the File
class. The pending writev data was being stored in a flat array
with element type of USize, with the byte pointers being converted
to type USize in order to be stored alongside the buffer length
numbers in the same array.
Storing these pointers as numbers meant that they are no longer
traced by the garbage as being pointers, meaning that the garbage
collector would try to free the underlying memory due to no longer
being pointed to by any valid pointer.
This PR fixes the issue by using an Array[(Pointer[U8], USize)]
instead of an Array[USize]. This also eliminates some complexity
in the code that was related to accessing the array data in blocks
of 2 elements per logical element.
This resolves part of https://github.com/ponylang/ponyc/issues/2526.
We could resolve the issue entirely by doing the same fix for
TCPConnection, though that may have some addiitonal complexity from
needing to be compatible with IOCP on windows.

Nice @jemc

@jemc i left a question for you before merging. Mostly, I want to make sure I understand the change fully before hitting merge.
Re: TCPConnection comment, that was fixed a while back. Are you suggesting for "fully resolve" to switch to the tuple pattern here as a clean up to what is in TCPConnection? Or something else?

Re: TCPConnection comment, that was fixed a while back. Are you suggesting for "fully resolve" to switch to the tuple pattern here as a clean up to what is in TCPConnection? Or something else?

Yes, the idea is to remove the _pending hack that adds unnecessary extra overhead to TCPConnection, by switching it to use this tuple pattern here. It will be a more clean solution than the current hack if we can make it work, and should theoretically improve performance as well, even if only slightly.

@jemc I'm closing #2526 as both bugs are closed. We can open an issue to clean up TCPConnection if you want.

Opened https://github.com/ponylang/ponyc/issues/2779.


terminus vs upterm (formerly black screen)

Could you please add a note (maybe in the readme) about what are the advantages over the other typescript/javascript and electron based terminal emulator project?

At the very least, this one is officially supporting Windows. 💟

Upterm is a combined terminal/shell project, and they are trying to redesign the shell experience to be more IDE-like, while Terminus focuses on the "classic way" of having a shell of your choice running in a terminal. The projects have different goals and you can't really compare them.


Font style

How do you change the font style of the title and description?

You can change all of Toastr's appearance by modifying the CSS.


fix Lip FOC

No need to merge to lipschitz. I just created this PR, to have so

Should this be closed due to being superseded by #561?  Anything that needs to salvaged before closing without merging and deleting branch?


Add Jest tests and publish automation with changesets

This PR addresses issues:

https://github.com/single-spa/import-map-injector/issues/4
https://github.com/single-spa/import-map-injector/issues/8

In particular:

I added Jest tests covering 100% of the code
I included automation for running Jest tests
I included a command for type checking with Typescript and fixed a minor type problem with the window object
I included changesets
I included automation of deployments through changesets and the changesets release action for GitHub

For this to work it is necessary that:

The GITHUB_TOKEN is granted permissions to create and approve pull requests. This can be done in Settings -> Actions -> General -> Workflow permissions -> Allow GitHub Actions to create and approve pull requests
The maintainers create an NPM_TOKEN secret with an NPM token with write permissions to the organization (or at least the corresponding package, for publishing).

See https://github.com/single-spa/single-spa-react/pull/178 for a description of how this works.
The automated pipeline includes:

running the tests
checking the format
checking the types
running the linter

Current coverage:

Is it possible to make changesets automatically publish without creating another PR? I don't want changeset-bot to spam my Github notifications.

I don’t know if it is possible to publish automatically when merging, I can investigate, but I would recommend against it.
Having the new PR being opened allows us to have some time to really check that the changes are OK and also allows to avoid republishing every minor change that we merge to main, making our releases more meaningful.
It is just one PR, not that many, and the only thing one has to do is to merge that PR when ready to publish. I wouldn’t consider that too much of a hassle, considering the advantage it gives in controlling your publishing strategy.

I don’t know if it is possible to publish automatically when merging, I can investigate, but I would recommend against it.

I have significantly more Github notifications than I can manage already. Creating a new PR after every merged pull request will result in an extra notification every time I approve and merge anything

I don’t know if it is possible to publish automatically when merging, I can investigate, but I would recommend against it.

I have significantly more Github notifications than I can manage already. Creating a new PR after every merged pull request will result in an extra notification every time I approve and merge anything. We should look into whether it can be done without an extra pull request. I never asked for autopublishes to be added to all the repos, and it has caused problems in other repos already. If I get more time later, I'll look into the changeset documentation to see if we can avoid adding busy work merging another PR to my Github queue.

It was not a PR for every merged pull request. It's just one PR for release, that is updated every time a new merge to main happens.
In any case, closing this PR.


Timeline GUI does not draw passes

Description
The timeline does not show the passes anymore. The UI looks incomplete now.

Steps to reproduce
I encountered this issue when I updated from v1.14 to v1.15. So I assume there have been some changes on the GUI which now prevent the separate passes from being drawn. The accesses of buffers, images and others will still get visualized and changing the debug position inside of the timeline still works as well. So it should only be a visual bug.
Edit: The scenes to encounter this issue contain a lot of drawcalls inside of a renderpass. I could not encounter this issue in a project which only rendered a single triangle (all passes were visualized correctly there). But when I used projects which rendered the Sponza scene, the issue occured.

Environment

RenderDoc version: v1.15
Operating System: Archlinux
Graphics API: Vulkan

Under the section "Steps to reproduce" you need to actually provide steps to reproduce the problem as requested, ideally sharing for example a capture or the program in question so I can reproduce it directly or if that's not possible giving as much information as possible about your program so that I can build a reproducible test case. Providing a second part of the problem description without providing reproduction steps makes it significantly harder to investigate the problem.

Well, I can't upload the .rdc file because Github does not allow the extension and when I try to upload it as .zip archive, I get following error:

^^'

But otherwise I could figure out that it actually depends on the project. Other smaller projects seem to work fine.

You can upload the .rdc to a free file sharing service like google drive or dropbox etc, and either paste the link here or send it in an email to me if you want to keep it private. Github attachments are generally only for images, videos, text documens, etc.
It being project specific is what I suspected as the timeline bar works fine for me, that's why reproduction steps are important to ensure I can actually look into the bug :smile:.

I have linked two captures now which cause the issue for me. Hope this helps. ^^

This only happened for the auto-generated fake marker regions, which is why I couldn't reproduce it. That commit should fix the problem.
I strongly recommend you provide your own marker regions and don't rely on the automatic ones, as you will be able to provide much better context and organisation for your program.


Specifying a custom main function with --embed= causes a TypeError

There's currently a typo in the Cython.Compiler.CmdLine module that causes the cython script to error out with a TypeError. I think you guys are actively working on a new command-line interface, but I figured I'd commit this this anyways.
To replicate:
cython.py --embed=my_main cython.py
Traceback (most recent call last):
  File "C:\Development\scripting.py\interop\cython\cython2\cython.py", line 17, in <module>
	main(command_line = 1)
  File "C:\Development\scripting.py\interop\cython\cython2\Cython\Compiler\Main.py", line 642, in main
	options, sources = parse_command_line(args)
  File "C:\Development\scripting.py\interop\cython\cython2\Cython\Compiler\CmdLine.py", line 92, in parse_command_line
	Options.embed = options[8:]
TypeError: 'CompilationOptions' object is not subscriptable

Oops. Clearly this wasn't being tested. Thanks.


gosec | files/process.go:581:14: G304: Potential file inclusion via variable (gosec)

Surfaced by GH-144:
files/process.go:581:14: G304: Potential file inclusion via variable (gosec)
	f, opErr := os.OpenFile(filepath.Clean(filename), os.O_APPEND|os.O_CREATE|os.O_WRONLY, perms)
	            ^

See also GH-116.


Add generator

It might be useful to include a figaro:install Rails generator to add config/application.yml to .gitignore and to add an example application.yml file at config/application.example.yml. The example configuration file could include commented instructions for building the YAML and suggestions for what sort of information to include.

Testing, testing.