High memory usage and keeps crashing with code 9

Type: Bug
It's impossible to reproduce, check the logs. It just starts eating memory then freezes my whole desktop then it crashes with code 9. Today it crashed four times.
VS Code version: Code 1.86.2 (903b1e9d8990623e3d7da1df3d33db3e42d80eda, 2024-02-13T19:41:37.860Z)
OS version: Linux x64 5.15.0-94-generic
Modes:

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (4 x 2700)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: disabled_softwarevulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: disabled_off

Load (avg)
3, 2, 3

Memory (System)
11.57GB (1.67GB free)

Process Argv
. --crash-reporter-id c58b6a49-a4ed-4475-9157-e3a90d8d2a9b

Screen Reader
no

VM
0%

DESKTOP_SESSION
xfce

XDG_CURRENT_DESKTOP
XFCE

XDG_SESSION_DESKTOP
xfce

XDG_SESSION_TYPE
x11

Extensions (16)

Extension
Author (truncated)
Version

vscode-intelephense-client
bme
1.10.2

scratchpads
bue
1.0.0

aql
DIP
0.9.1

xml
Dot
2.5.1

comment-anchors
Exo
1.10.4

vscode-diff
fab
1.4.2

code-groovy
mar
0.1.2

rainbow-csv
mec
3.11.0

vscode-docker
ms-
1.29.0

openehr-adl-lsp
Ned
0.6.1

edi-x12-support
Sil
1.1.0

doki-theme
unt
88.1.16

php-debug
xde
1.34.0

php-pack
xde
1.0.3

vscode-fhir-tools
Yan
1.5.1

php-intellisense
zob
1.3.3

(6 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vstes627:30244334
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyonecf:30548226
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementsc:30887149
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
pydisww1:30959800
edj9j583:30958191
a89i1917:30961429
3ef8e399:30967273
e3gdj431:30958358
ccp2r3:30958157

Found the logs:
2024-02-20 03:57:15.792 [info] update#setState idle
2024-02-20 03:57:45.793 [info] update#setState checking for updates
2024-02-20 03:57:46.024 [info] update#setState idle
2024-02-20 04:57:45.808 [info] update#setState checking for updates
2024-02-20 04:57:46.877 [info] update#setState idle
2024-02-20 12:38:33.224 [info] update#setState checking for updates
2024-02-20 12:38:33.685 [info] update#setState idle
2024-02-20 13:38:33.227 [info] update#setState checking for updates
2024-02-20 13:38:33.587 [info] update#setState idle
2024-02-20 14:05:52.703 [info] Extension host with pid 51521 exited with code: 0, signal: unknown.
2024-02-20 14:24:20.014 [info] Extension host with pid 64997 exited with code: 0, signal: unknown.
2024-02-20 14:38:33.237 [info] update#setState checking for updates
2024-02-20 14:38:33.572 [info] update#setState idle
2024-02-20 15:38:33.243 [info] update#setState checking for updates
2024-02-20 15:38:33.575 [info] update#setState idle
**2024-02-20 16:32:56.845 [error] CodeWindow: renderer process gone (reason: killed, code: 9)**
2024-02-20 16:32:57.267 [info] Extension host with pid 49002 exited with code: 0, signal: unknown.
**2024-02-20 16:33:01.121 [error] [UtilityProcess id: 1, type: fileWatcher, pid: 49047]: crashed with code 139 and reason 'crashed'**
2024-02-20 16:38:33.246 [info] update#setState checking for updates
2024-02-20 16:38:33.549 [info] update#setState idle
2024-02-20 17:38:33.259 [info] update#setState checking for updates
2024-02-20 17:38:33.846 [info] update#setState idle
2024-02-20 20:27:08.585 [info] update#setState checking for updates
2024-02-20 20:27:08.961 [info] update#setState idle
2024-02-20 20:40:37.906 [warning] No ptyHost heartbeat after 6 seconds
2024-02-20 20:41:07.943 [warning] No ptyHost heartbeat after 6 seconds
**2024-02-20 20:41:10.733 [error] CodeWindow: renderer process gone (reason: killed, code: 9)**
2024-02-20 20:41:10.950 [info] Extension host with pid 72865 exited with code: 0, signal: unknown.
**2024-02-20 20:41:12.281 [error] [UtilityProcess id: 3, type: fileWatcher, pid: 72875]: crashed with code 139 and reason 'crashed'**
2024-02-20 21:12:48.113 [error] CodeWindow: renderer process gone (reason: killed, code: 9)
2024-02-20 21:12:48.972 [info] Extension host with pid 87606 exited with code: 0, signal: unknown.
2024-02-20 21:12:52.606 [error] [UtilityProcessWorker]: terminated unexpectedly with code 15, signal: unknown
2024-02-20 21:12:52.607 [error] [UtilityProcess id: 4, type: fileWatcher, pid: 87621]: crashed with code 15 and reason 'killed'
2024-02-20 21:14:01.036 [warning] No ptyHost heartbeat after 6 seconds
2024-02-20 21:28:25.160 [info] update#setState checking for updates
2024-02-20 21:28:25.261 [error] CodeWindow: detected unresponsive
2024-02-20 21:28:26.333 [info] update#setState idle
2024-02-20 21:28:44.060 [warning] No ptyHost heartbeat after 6 seconds
2024-02-20 21:28:57.193 [info] Extension host with pid 91040 exited with code: 0, signal: unknown.

Can you please follow the steps in https://github.com/Microsoft/vscode/wiki/Native-Crash-Issues to get at more details around the crash and attach the result here? Thanks!

Dealing with same issue on linux 6+.

same issue

i follow the steps in https://github.com/Microsoft/vscode/wiki/Native-Crash-Issues, and crashed again, but i cant find the *.dmp file.

 Thanks!

Could you please take a look at this? I'm happy to provide any debugging logs needed :)
I'm experiencing this with Linux.

Please share the memory profile from the workbench following the steps below

Should I start sampling as soon as I start VS Code, for hour(s) at a time? I don't know when it will crash in advance.
One workaround which helped me reduce the frequency of these crashes (haven't had one since two days) is configuring a swap partition in Linux.
It seems like in situations when ~90% RAM is utilized (out of my 16 GB). In such situation it is always VS Code which has at least one of its windows crashed with this message. Other applications (like Firefox) never do this.
Firefox especially tries to unload tabs unused for a long time in low memory situations.
VS Code never tries to release any memory this way.

@PetrLaskevic seems like the crashes you are experiencing is mostly from system forcing OOM for the VSCode process under memory pressure ? The virtual memory allocations happen from the runtime and we don't have control over it. Browsers do have optimization to unload memory from used tabs, it is not something we have available today in the runtime we use.
When you hit the crash, please the dump file from <user-data-dir>/Crashpad which would help confirm the cause of the crash. You can get path to  by running Developer: Open User Data Folder from within VSCode.


Issue - this feature looks so good, I kind of wanna lick it.

Please add lickability feature.
https://www.youtube.com/watch?v=u8953JvWuDw&t=2118s

I don't get it.

It’s just a bit of humour my friend 🙂


no error on missing defaut in non-final switches

as per title.
We currently don't error when there is no default statement in a switch.
this causes strange code to be generated.
We should throw an error if there is no default case in a non-final switch.

I think this can be handle at parsing of switch statements. I would like to look into this.

I would not be wise to put a semantic restriction into the parser.
The error should be detected in the semantic phase.
@vivekvpandya please go ahead.

@UplinkCoder yes, I realized that between switch and default there can be many case statements.
Which file contains semantic phase for switch ?? I can see lexer.d , parser.d etc.

so the AstSwitchStatement has a statement inside it.
this statement is a blockStatement
you need to iterate trough the CaseStatements inside of that blockStatement
and see if there is a default there

@vivekvpandya please feel free to ask for advice.

@vivekvpandya could you clean the above up ?

I have just started to change void visit(AstSwitchStatement s)  method in SDC/libd/src/d/semantic/statement.d

it would be nice if the check could be done in a separate method

ok I will do it. and instead of assertion shouldn't we throw CompileException ??

yes.
we should generate an error and insert it instead in the flattenedStatements
that was what I meant with cleanup.

hmm it seems we have no ErrorStatement.

		bool defaultCaseStatus = true;
		auto cases = (cast(AstBlockStatement*)&s.statement).statements;
        auto _default = context.getName("default");

        import std.algorithm;

        auto defaultCaseRange = cases
            .map!(s => cast(AstLabeledStatement) s)
            .filter!(s => s !is null)
            .filter!(s => s.label == _default);
        if(defaultCaseRange.empty)
        {
        	defaultCaseStatus = false;
        }
        return defaultCaseStatus;
	}

	void visit(AstSwitchStatement s) {
		import d.semantic.expression;
        if (!checkForDefaultCase(s)) {
        	throw new CompileException(s.location, "switch statement without a default; use 'final switch' or add 'default: assert(0);' or add 'default: break;'");
        }
		flattenedStmts ~= new SwitchStatement(
			s.location,
			ExpressionVisitor(pass).visit(s.expression),
			autoBlock(s.statement),
		);
	}

Is this look oky ?

so throwing a compile-Exception will be fine for now

Egyptian-braces.

on top of that we should check if there is more then one default case.

`bool hasDefaultCase(AstSwitchStatement s) {
bool defaultCaseStatus = true;
auto cases = (cast(AstBlockStatement*)&s.statement).statements;
auto _default = context.getName("default");
import std.algorithm;
auto defaultCaseRange = cases
.map!(s => cast(AstLabeledStatement) s)
.filter!(s => s !is null)
.filter!(s => s.label == _default);
if(defaultCaseRange.empty) {
defaultCaseStatus = false;
}
return defaultCaseStatus;
}
void visit(AstSwitchStatement s) {
	import d.semantic.expression;
    if (!hasDefaultCase(s)) {
    	throw new CompileException(s.location,
    		"switch statement without a default; use 'final switch' or add 'default: assert(0);' or add 'default: break;'");
    }
	flattenedStmts ~= new SwitchStatement(
		s.location,
		ExpressionVisitor(pass).visit(s.expression),
		autoBlock(s.statement),
	);
}`

it would be better to ask for hasNoDefaultCase... because then you don't need to init the variable explicitly.

when the range in non-empty you should do a popFront and check if it's empty now.
if it's not you need to throw a diffrent error.
so better throw the error in the check function.

void hasDefaultCase(AstSwitchStatement s) {
auto cases = (cast(AstBlockStatement*)&s.statement).statements;
auto _default = context.getName("default");
import std.algorithm;
auto defaultCaseRange = cases
.map!(s => cast(AstLabeledStatement) s)
.filter!(s => s !is null)
.filter!(s => s.label == _default);
if(defaultCaseRange.empty) {
throw new CompileException(s.location,
"switch statement without a default; use 'final switch' or add 'default: assert(0);' or add 'default: break;'");
}
else if {
defaultCaseRange.popFront();
if(!defaultCaseRange.empty) {
// multiple default: cases
throw new CompileException(s.location,
"switch statement already has a default");
}
}
}
void visit(AstSwitchStatement s) {
	import d.semantic.expression;
    hasDefaultCase(s);
	flattenedStmts ~= new SwitchStatement(
		s.location,
		ExpressionVisitor(pass).visit(s.expression),
		autoBlock(s.statement),
	);
}

change the error message to something more meaningful please.

then you can open a PR.

Actually error message is copied from dmd

function name only check or checkHasDefaultCase ??

we try to improve on dmd here.
only check

ok, why only check ??

because it should be the same name for all semantic checks.
we can the automatically dispatch. the the same as with the visitors.

throw new CompileException(s.location,
        			"switch statement with multiple defaults are not allowed ");

Is this ok ?

"switch statements with multiple defaults are not allowed"

LGTM please open a PR.

void check(AstSwitchStatement s) {
		auto cases = (cast(AstBlockStatement*)&s.statement).statements;
        auto _default = context.getName("default");
        import std.algorithm;
        auto defaultCaseRange = cases
            .map!(s => cast(AstLabeledStatement) s)
            .filter!(s => s !is null)
            .filter!(s => s.label == _default);
        if(defaultCaseRange.empty) {
        	throw new CompileException(s.location,
        		"switch statement without a default; use 'final switch' or add 'default: assert(0);' or add 'default: break;'");
        }
        else if {
        	defaultCaseRange.popFront();
        	if(!defaultCaseRange.empty) {
        		// multiple default: cases
        		throw new CompileException(s.location,
        			"switch statement with multiple defaults are not allowed ");
        	}
        }
	}

	void visit(AstSwitchStatement s) {
		import d.semantic.expression;
        check(s);
		flattenedStmts ~= new SwitchStatement(
			s.location,
			ExpressionVisitor(pass).visit(s.expression),
			autoBlock(s.statement),
		);
	}

finally it looks like this

I'll comment on the PR.

and please have a look at my code above and add newlines accordingly.

this is fixed by #193

No this isn't fixed by this PR and the whole suggested approach is wrong.
You can fix this by adding a flag in FlowAnalyzer for the presence of a default case. Save the state of the flag at switch entrance. Set the flag when encountering a default case. Check the flag on switch exit and restore the previous value.

Add flag here: https://github.com/SDC-Developers/SDC/blob/master/libd/src/d/semantic/flow.d#L37
Save/Restore here: https://github.com/SDC-Developers/SDC/blob/master/libd/src/d/semantic/flow.d#L193-L210
Check flag here: https://github.com/SDC-Developers/SDC/blob/master/libd/src/d/semantic/flow.d#L218
Set flag here: https://github.com/SDC-Developers/SDC/blob/master/libd/src/d/semantic/flow.d#L321
Don't forget to add a test case.

@vivekvpandya can you handle this ?
I'll give advice when asked.

@UplinkCoder yes let me give it a try.

I will take some more time than regular D developer because I also needs to understand various D specific features.

@UplinkCoder @deadalnix  this should be fixed by PR #199

Yes, closing.


Fix minor typo in issue_template.md #trivial

This PR fixes a minor typo in issue_template.md.

Thanks!


Validate 323 prefix in Colombia (CO +57)

HI Again,
Thank you for keeping this up to date and great!
We have a problem in Colombia validating numbers with the prefix 323 which is used by Claro, the largest mobile carrier.
http://libphonenumber.appspot.com/phonenumberparser?number=3233670090&country=CO
References:
https://www.facebook.com/help/community/question/?id=1173347736039631
https://productforums.google.com/forum/#!topic/gmail-es/6Qmz_gwhJiY )
I have submitted this information with the knowledge that you
may use, modify, reproduce, publicly display, and distribute the information in
accordance with your open source policies.

@ETrunhome ,
Thanks for reporting this issue.
libphonenumber library already considers number (+57<PHONE_NUMBER>) as valid mobile number. Please upgrade to the latest release if this is not the case in your product. http://libphonenumber.appspot.com/phonenumberparser?number=3233670090&country=CO
Regarding carrier name:
Yes we are not returning carrier name for mobile prefix 323. We will update it as Claro. We've accepted this issue and will fix this in an upcoming release.

Fixed in release 8.3.0.


Jenkins: Add ARM64, drop trusty, improve Jenkinsfile

Because JENKINS-46277 and JENKINS-47106 got fixed, the Jenkinsfile can
be made much simpler and more readable since we are able to use docker
agents directly now.
Other changes:

We now have an ARM64 build ready to go.

It's currently failing some couch_btree tests with timeouts.
I've seen these failures on x86_64, though.

If any one of the builds fails, Jenkins now kills all the rest.
This is useful because, in Jenkins, you can currently only
restart an entire pipeline stage, not just a single entry in the
pipeline. So there's no point in not killing the build fast, for
now. You can see which build actually failed by clicking through each
parallel stage and looking for a failed build step.

We're trying to save space on the drives:

We now only keep the last 10 builds and their artifacts around.
We also forcibly clean up our temp directories after any build.

Build's a bit faster since we're no longer multiply checking out
the source code for each parallel build.

Improved stage naming.

Formatting is all nice nice.

https://builds.apache.org/blue/organizations/jenkins/CouchDB/detail/jenkins-arm64-trusty/10/pipeline is the latest build attempt, which (just like master) is failing and there's nothing we can do about it for now.

Going to merge since no one ever seems to review my Jenkins changes anyway.


Feature/progressive image saving

PR Checklist
Please check if your PR fulfills the following requirements:

[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #87
What is the new behavior?
I am now saving 3 versions of the input image, three different sizes
Does this PR introduce a breaking change?
[x] Yes
[ ] No

Other information

Coverage decreased (-1.9%) to 80.724% when pulling b07246b9fc92abd175e71fc901f18773a4113047 on feature/progressive-image-saving into 7d39fe66689765862d7f56e51cd66b69f0dd8486 on master.


[No QA][HOOK REFACTOR] ReportDetailsPage

Details
Refactors ReportDetailsPage into a functional component
Fixed Issues
$ https://github.com/Expensify/App/issues/16249
Tests

Create a new Workspace + > New Workspace
In the LHN, find the #admins room and navigate to it
In the welcome message, tap the #admins bold text
Verify that the room details page opens and there are no errors

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

Offline tests
N/A
QA Steps
N/A regular regression

[ ] Verify that no errors appear in the JS console

PR Author Checklist

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Screenshots/Videos

Web

Mobile Web - Chrome

Mobile Web - Safari

Desktop

iOS

Android

Updated!

Gonna address @0xmiroslav's comment now

@0xmiroslav I see the same issue on main, not only for the subtitle, but for the title as well. Could you please check main again?

Updated!

@0xmiroslav any luck testing main again?

@0xmiroslav I was able to get it working on main as well. Thanks!
The issue is that useMemo only has report as a dependency for chatRoomSubtitle, but getChatRoomSubtitle calls getPolicyName which in turn gets its value from policy stored in Onyx. I pushed a fix.

@0xmiroslav please re-review & re-test when you get a chance

Merging since we have 2 approvals.

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

🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.22-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/Julesssss in version: 1.3.22-1 🚀

platform
result

🤖 android 🤖
cancelled 🔪

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
cancelled 🔪


feat(lua_ls): update recommended settings

See: https://github.com/neovim/neovim/pull/24592

Only override settings if there is no .luarc.json(c) file present.
Prefer setting workspace to VIMRUNTIME over 'runtimepath'

After applying changes from this patch, I get diagnostics warnings for "Undefined global vim" even though I have included that settings.
Previous setup:
lspconfig.lua_ls.setup({
	settings = {
		Lua = {
			runtime = {
				version = "LuaJIT",
			},
			diagnostics = {
				globals = { "vim" },
			},
			workspace = {
				library = vim.api.nvim_get_runtime_file("", true),
				checkThirdParty = false,
			},
		},
	},
})

Current setup
lspconfig.lua_ls.setup({
	on_attach = on_attach,
	capabilities = capabilities,
	on_init = function(client)
		local path = client.workspace_folders[1].name
		if not vim.loop.fs_stat(path .. "/.luarc.json") then
			client.config.settings = vim.tbl_deep_extend("force", client.config.settings.Lua, {
				runtime = {
					version = "LuaJIT",
				},
				diagnostics = {
					globals = { "vim" },
				},
				workspace = {
					library = { vim.env.VIMRUNTIME },
					checkThirdParty = false,
				},
			})
			client.notify("workspace/didChangeConfiguration", { settings = client.config.settings })
		end
	end,
})

NVIM v0.9.1


Auth consistency fixes

Changes:

implemented a second field within the UserContext that is the field which indicates whether we are logged in with a valid admin user
this additional field only gets recomputed when auth state changes
if tokens are still set, no issues (admin user maintains access)
if tokens are lost, this will fail and show a 403, which in a previous PR I added an okay button which will handle all state issues and move go /login route
kept "user" as we can use that to pull fields like displayName and other info that firebase stores

What to test:

logical analysis of code for any edge case where we have invalid state
try to duplicate this when running locally
try basic login / logout / clear cookies flows

Loom video:
https://www.loom.com/share/fb739486a1a14868a947048ccbdfd6f0

On the login page (and /signup page) itself, when I am not logged in, it makes a request to the backend to /api/admin/v1/scenarios, even though an admin is not logged in - this returns a 403 from BE, but this request shouldn't be made in the first place

Ideally this makes a call to something like /api/admin/v1/authenticate or something similar. It's the logic we use to see if the cookies are set and are valid. For now it's a /scenarios call. What do you recommend is done instead? No call doesn't make much sense to me because we want to route them to /admin if they are in a valid logged in state when on /login.

If an admin logs out, and goes to the /admin page (which they may have bookmarked), instead of being shown the login screen, it just shows a completely blank screen.
If an admin is logged in, and they go to the /login or /signup page, the login form shows up for a second and it just shows a completely blank screen, where you have no option other than to log out.

Fixed both.

Ideally this makes a call to something like /api/admin/v1/authenticate or something similar. It's the logic we use to see if the cookies are set and are valid. For now it's a /scenarios call. What do you recommend is done instead? No call doesn't make much sense to me because we want to route them to /admin if they are in a valid logged in state when on /login.

Ah that's what you are making it for. Cool, that's fine for now, we can update this to use a user_profile route once we add that to BE routes.

Ah that's what you are making it for. Cool, that's fine for now, we can update this to use a user_profile route once we add that to BE routes.

Yup! Left a todo in the code for this already

Backend PR up: https://github.com/uwblueprint/cdc-backend/pull/138, once that is merged, you can make a GET request to /api/admin/v1/user_profile


More robust testing for postgres

going to merge soon if no comment, this is a blocker for aws work


Fix orientdb-tools OSGi exports

Add 'com.orientechnologies.orient.server.config' to the packages exported from orientdb-tools.
(this package was moved from orientdb-server to orientdb-tools but the exports weren't updated)

Thanks!


Layout for playground concept graph

@cojacoo,
I quckly drafted the concept graph figure for learning about Knightian uncertainty. I basically rebuilts what I have seen on your presentation. It is meant to be the starting point into the actual application to explain the concept.
You can run that app by checking out the branch and locally install the ruins package
git checkout uncertaintry_draft
pip install -e .

And then run within the repo
streamlit run ruins/apps/uncertainty.py

Is the general layout and flow through this example what you had in mind?
Obviously, the labels and text need some replacements and a little bit of work is needed for the figure, but this draft should point into the right direction.

Very nice. I can easily hook into this, because the fun starts when the distributions are skewed and when there are some threshold processes changing your expected outcome. I will (so time permits) use your streamlit app to develop it further. However: I have an issue with git due to the LFS quota. If I clone the repo, it does not allow me to get all the branches... I would be happy to avoid any conflicting versions...

Skewed distributions are interesting. Then, I will make the used PDF function a changeable parameter for future developments. As of now, it is hard-coded to scipy.stats.norm.pdf. In the future, we can dynamically change it to any PDF supported by scipy. There are dozens of continuous distributions supporting the .pdf method: https://docs.scipy.org/doc/scipy/reference/stats.html#continuous-distributions
We can basically use any of them. We just need to keep in mind that they don't come with the same function signature, but I think we can limit ourselves to maybe 3 or 4 PDFs.


NoMethodError (undefined method `gsub' for nil:NilClass)

Hello!
I have created a small application, using the instructions from the readme file.
Here is the model code:
class User < ActiveRecord::Base
  attr_accessible :avatar
  has_attached_file :avatar,
    :styles => { :medium => "300x300>", :thumb => "100x100>" },
    :storage => :dropbox,
    :dropbox_credentials => "#{Rails.root}/config/dropbox.yml",
    :dropbox_options => {
      :path => proc { |style| "#{style}/#{id}_#{avatar.original_filename}" }
    }
end

Here is the controller code:
class UsersController < ApplicationController

  def new
    @user = User.new
  end

  def create
    @user = User.new( params[:user] )
    if @user.save
      redirect_to @user
    else
      render :action => "new"
    end
  end

  def show
    @user = User.find(params[:id])
  end

end

So when I try to create a new user, server throws an error:
[paperclip] Saving attachments.
   (0.8ms)  rollback transaction
Completed 500 Internal Server Error in 2072ms

NoMethodError (undefined method `gsub' for nil:NilClass):
  app/controllers/users_controller.rb:9:in `create'

Local storage works just fine. Could you please look at this?

Hi
I m getting "NoMethodError (undefined method `gsub' for nil:NilClass)" this error.
I used a rake task. This task gave me an access_token and access_token_secret but no user_id.
How to get user_id? and how to reslove this error?

That's likely due to changes in the Dropbox API. I'm not maintaining paperclip-dropbox anymore mainly due to those reasons.


Opengraph

This is related to #110.
I've added an initial R script that scrapes OG information from URLs provided.
One problem I see is that when running this, not all sites have OG information set. So we will need to deal with that somehow too.

a positive note to this approach, is that we will also get a confirmation on the URL being reachable (how I discovered Cara has moved her posts from blog/ to posts/ on her site).

Let me know if you want me to look into it and play around with it :) (I wasn't sure because it's still a draft and wanted to double-check :))

Yes please do @cosimameyer ! I'm busy for the next two weeks and won't have time to look more into it. But I came up with this pretty quick, and thought we could build on it.


[Storage] Kill ColumnFamilyOptions

The new rocksdb binding we are going to use has a bit different API for column family options. Given that we are not using anything other than default option, we can just avoid exposing the API for simplicity. Even if we are going to use it in the future, some changes will need to be made, so just remove for now.

@bors-libra r+

:pushpin: Commit e4199ec has been approved by msmouse

:hourglass: Testing commit e4199ec99d62726ec86d33d57e5ffe7c3932f1c9 with merge 447e10d4f06313fca7800e9852b51ff3f6108ce5...

:sunny: Test successful - checks-actions_land_blocking_test, checks-circle_commit_workflow
Approved by: msmouse
Pushing 447e10d4f06313fca7800e9852b51ff3f6108ce5 to master...


rest-client version has two open security vulnerabilities

Please update the version of rest-client in the gemspec to ~> 1.8.0. There are two open security vulnerabilities for that gem:

OSVDB-119878 - Session fixation vulnerability via Set-Cookie headers - https://github.com/rest-client/rest-client/issues/369
OSVDB-117461 - Log plaintext password local disclosure - https://github.com/rest-client/rest-client/issues/349

Thanks!

Updated on #18


Documenation and Website still on version 4

The project websites still links to a download file for version 4, which does not work with a current docker container for the database.
In addition the Documentationstill seams to be on version 4.3 The link to lastest, or other versions are brocken.

I guess you mean the website www.3dcitydb.org (or www.3dcitydb.net)? In this case, you are right, we need (and will) update the webpage ASAP. However, I recommend to refer to the github repository for the latest versions of the code and the documentation. (This will be added also as a recommendation to the website)
If you are referring to something else, please clarify.

I am refering to www.3dcitydb.org and readthedocs


Uncaught Error: Module version mismatch. Expected 44, got 14.

Uncaught Error: Module version mismatch. Expected 44, got 14. error have been thrown when requiring the spellchecker under MacOS. It throws Uncaught Error: under Windows.

Check out https://github.com/atom/highlights/issues/21, which is the same thing, but for a different module.


SB-951 maven-metadata.xml resolved from group repository if possible [blocked by SB-298]

Waits for #438

@fuss86 ,
I have now merged #438! :)

Thanks! :)