PDFBox runs on more than PDF Bitstreams

Describe the bug
Copied from https://jira.lyrasis.org/browse/DS-3873 , originally reported by @KingKrimmson. I've rediscovered this issue during Testathon.
PDFBoxThumbnail media filter is currently configured to run on more than just PDFs. This consistently results in an error in the logs:
ERROR filtering, skipping bitstream #7f142dd0-fca6-4533-b966-19b1354e9a9d java.io.IOException: Error: Header doesn't contain versioninfo
java.io.IOException: Error: Header doesn't contain versioninfo
        at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:244)
        at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:966)
        at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:868)
        at org.dspace.app.mediafilter.PDFBoxThumbnail.getDestinationStream(PDFBoxThumbnail.java:80)
        at org.dspace.app.mediafilter.MediaFilterServiceImpl.processBitstream(MediaFilterServiceImpl.java:358)
        at org.dspace.app.mediafilter.MediaFilterServiceImpl.filterBitstream(MediaFilterServiceImpl.java:286)
        at org.dspace.app.mediafilter.MediaFilterServiceImpl.filterItem(MediaFilterServiceImpl.java:180)
        at org.dspace.app.mediafilter.MediaFilterServiceImpl.applyFiltersItem(MediaFilterServiceImpl.java:158)
        at org.dspace.app.mediafilter.MediaFilterCLITool.main(MediaFilterCLITool.java:315)

This can be fixed by modifying .getInputMIMETypes() to only return "Adobe PDF" instead of all ImageIO Reader Mimetypes.
To Reproduce
Steps to reproduce the behavior:

Upload an image to an Item (either preexisting or new), while paying attention to the Item's handle
From commandline run `./dspace filter-media -f -i [item-handle-prefix]/[item-handle-suffix]
You'll see the image is filtered, but you'll also see the above error from PDFBox (as PDFBox also attempts to filter the image).

Related work
An old PR exists at #2123 but it needs to be updated so that it can be merged.

@benbosman : Assigning this to your team for review/work.  Please note that @KingKrimmson created a PR a few years back that should fix this, but it just needs updating.  #2123

I'd expect this to require 2 hours to upgrade the code, and test the functionality still works while no longer spawning the errors
This is under the assumption no tests have to be implemented (only manual tests)

@benbosman : That sounds fine to me.  As MediaFilters currently don't have ITs, and this is a very tiny bug fix, it can just be manually tested.  I'll add the estimate & assign back to you for your team to update/recreate the PR.

Backported to 6.x in #2124


How to access configuration?

I'm trying to access the configuration as seen here:

But for the life of me I cannot find how I can access that, in order to configure my loxone settings...
I have clicked every possible button, 5 times over I think... how do I get there?
I installed pyloxone via hacs, and it is visible in my hacs integrations. I tried the latest 3.xx and the 4.0 version

Have you added the pyloxone in your integrations? First you must install it via hacs as you did it. Then you must add the integration on the integration tab ( settings -> devices&services -> integration tab). Did you do this?

Hello! Yes I have added it there https://i.imgur.com/ZM9sCCu.png

Habe you access to your installation via samba? If yes you can check if a installation folder exists under custom_components.

I have found the settings, but have no luch setting up my Miniserver Gen2.
I am running version 0.4.0 of your the integration
I have tried ports 80, 8080, and 443
with & without the checkboxes for scenes and lightcontroller
I have triple verified my address and password
https://i.imgur.com/7tJepKU.png
Error setting up entry PyLoxone for loxone Traceback (most recent call last):   File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup     result = await component.async_setup_entry(hass, self)   File "/config/custom_components/loxone/__init__.py", line 195, in async_setup_entry     if not await miniserver.async_setup():   File "/config/custom_components/loxone/miniserver.py", line 140, in async_setup     request_code = await self.lox_config.getJson()   File "/config/custom_components/loxone/api.py", line 122, in getJson     api_resp = await client.get("/jdev/cfg/apiKey")   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1751, in get     return await self.request(   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1527, in request     return await self.send(request, auth=auth, follow_redirects=follow_redirects)   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1614, in send     response = await self._send_handling_auth(   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1642, in _send_handling_auth     response = await self._send_handling_redirects(   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1700, in _send_handling_redirects     raise exc   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects     await hook(response)   File "/config/custom_components/loxone/api.py", line 84, in raise_if_not_200     raise LoxoneHTTPStatusError( custom_components.loxone.api.LoxoneHTTPStatusError: Miniserver response code 500

Ok the problem is only local access is possible. Please search in the closed issues for similar problems. Local acces can be set in the loxone config.

The problem is that local acces is already allowed on my miniserver but your manual/screenshot is wrong. you don't add your loxone cloud dns address, but the "local" dns cloud address - for me that is IP.MAC.dnyndns.loxonecloud.com, this address is generated in the browser window automatically when you access the local IP of the miniserver
10-0-0-24.xxxxxxxxxx.dyndns.loxonecloud.com

Does this mean now it is working?

yes with this address it connected successfully - however I cannot control anything yet. It pulled all my devices and shows them on the dashboard, but for example pussing the "blinds up" button does nothing.

Any logs?

And please paste the screenshots direct into git  comment.

deleted the integration, and re-added it with both checkboxes checked (scenes and lightcontroller) now some things work.
I can get the blinds to go up or stop moving, but going down is greyed out. all other switches do nothing, and presence is not shown.

The usecase I need this for is to get other sensors - e.g. philips hue motion sensors - to trigger things in loxone, like presence in a room. Can that actually be done with this yet?

Greyed out means that there are already down. Of course these devices work https://github.com/JoDehli/PyLoxone#supported-loxone-entites

they are not fully down, the blinds are not closed, they are on shade (hence 99%) - and to test that I moved them up fully using the button in HA, the "down" stayed greyed out even when the blinds were fully up
plus they stopped reacting again now, nothing happens on any button.
I deleted the integration again, and re-added it, now the blinds work again.
Where can I find the logs you referred to earlier? maybe something is visible there

and they stopped working again - settings - system - logs gives me this:
`Logger: homeassistant
Source: custom_components/loxone/api.py:386
Integration: PyLoxone (documentation, issues)
First occurred: 1:33:32 PM (6 occurrences)
Last logged: 1:33:33 PM
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 979, in transfer_data
await asyncio.shield(self._put_message_waiter)
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/loxone/miniserver.py", line 189, in listen_loxone_send
await self.api.send_websocket_command(device_uuid, value)
File "/config/custom_components/loxone/api.py", line 386, in send_websocket_command
await self._ws.send(command)
File "/usr/local/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 635, in send
await self.ensure_open()
File "/usr/local/lib/python3.10/site-packages/websockets/legacy/protocol.py", line 944, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: sent 1011 (unexpected error) keepalive ping timeout; no close frame received`

I think you configuration of the url is not supported by pyloxone. I have only an gen1 and can improve it for the gen2. Sorry.

ok, wird as it works half-way for a minute or two. I just sold my Gen1 for about the same price on ebay as a new gen2 costs, I switched because Gen1 web interface does not support intercom live streaming. I'll try my luck with loxberry (having problems there as well) and check back here every so often, maybe at some point you manage to interface with the Gen2. Seeing as gen1 is a discontinued product, maybe someone forks it and modifies it ;)

I already implemented in the newer version of pyloxone but there I have a other problem. I know users which are using the gen2 successfully. It is only the local access url which is wrong.
But good luck with the loxberry.

I don't have any other "local access" url?
I tried it now again with my direct IP address (<IP_ADDRESS>) and instead of giving me an error it also works for approx 1 minute to send the commands for the blinds. It does not receive any data from loxone though, the presence is perma-off and also the position of the blinds is fixed at "closed", even though they are moving after pressing the "up" button. So it seems pyloxone can send data to my gen2 for a mintute, but does not receive any stats from anything (presence, blind position, humidity, etc)

If you use the local ip do not use port 80.
I am sure it is a thing of a few minutes to get it to work. But I have no access to a loxone gen2. I know that there is a test server from loxone but it is a gen1. Have you tried to get nodered to work.
It is only a small change. The problem is that the gen2 (and of course gen1) are to weak for a real ssl encryption. And that makes more complicated than it should be.
If you want you can join the discord server there is a guy how already uses a gen2 with pyloxone.

https://discord.gg/vXJ2MZka here is the invitation.

Hi!
Can you send another invite link? I wasn't at home and it expired by now.
Thanks!

also: sometimes the integration already works, I had it running for half an hour, with a hue motion sensor switching a switch in loxone (that in turn is connected to a buzzer)... it worked for half an hour, then it stopped again. I need to restart hass completely or uninstall/reinstall the plugin to get it working again. I strongly disaggree that it has generally to do with the gen2 server or such, otherwise it wouldn't work for [insert random amount] minutes before it stops working. if the url was bad it wouldn't work at all

hey come check out Discord with me https://discord.gg/Pd8Cqsx6

Do you use any custom entities in your setup? I had problems with custom entries togehter with  pyloxone. Does pyloxone stop working when you switch something? I mean can you force the error.

Sorry I don't know what a "custom entry" is, I am a HASS noob, I only have one set up right now for PyLoxone.
-I have the "Mosquitto broker" (for possibly avoiding PyLoxone and try and go via Loxberry, also thus far unsuccessfull
-Studio Code Server, to edit files, this I only added 2 days ago, I have not edited any files yet
-SSH and HACS
I can actually not force the error anymore. The only thing I did from the times where I could only operate the blinds and lights from the dashboard for ~1minute to now is:

install Visual Studio Code Server
Add 2 Automations

I do not know why, I do not know how, but somewhere in those 2 actions the issue resolved itself. Where before - see messages above - I could not operate the "blinds down" button - because PyLoxone "thought" they were all the way down even though they werent, now there is actual correct feedback on their position and I can operate them up and down as appropriate. So I guess my issue is solved for now, even though very unsatisfyingly. Anyone else who might have that issue can only try to repeat my steps.

I have recreated the problematic state. I deleted the integration in an effort to to refresh my loxone names (I had multiple entities named the same name, in different rooms, but e.g. when building a dashboard it does not show the room, so I renamed everything uniquely in Loxone.
After re-adding the integration I again had errors, tried with different addresses, fixed IP, the Loxone DNS Address, nothing worked until suddenly it did with the loxone dns. All entities are now again discovered, but I have the same problematic state that - e.g. for the blinds, they show as down
I can push the "up" button -> they go up
I can push the stop button -> they stop
The "down" button stays greyed out, and everything stops working after a minute.

And again after a complete reboot of the raspi, the problem is there, this time I fixed it by putting back the DNS address and doing a
settings > system > restart

Maybe it is better you try other alternatives which can handle your installation.


add create_assembly_grid method to TensorFemSpace

right now we are calculating the quadrature grid in the constructor of TensorFemSpace with nderiv=1 as a default value, we need to move that to a separate method called create_assembly_grid which takes the nderiv as an argument.

If we do not need to store the quadrature grid in the TensorFemSpace object, then it is not even necessary to add the method create_assembly_grid to the TensorFemSpace class.
In fact, all the necessary information is passed to the constructor of FemAssemblyGrid, which could be further simplified by removing the arguments start and end:
W = TensorFemSpace(V1, V2, V3)
...
quad_grids = tuple(FemAssemblyGrid(V) for V in W.spaces)


rpc: check VM state in (*Client).CreateTXFromScript

We should also pay attention to the VM state before adding system fee to
the transaction. We shouldn't allow adding system fee in case if
the transaction script is bad.

Technically we might want to send some failing transaction, but practically it's not likely the expected behavior, so yeah, this check makes sense.

I faced with the problem when I'm trying to send transaction and it is sent successfully, but at the end, I've got an error about failed invocation. It's kind of confusing.
The other option is just to print a warning instead of returning an error. Anyway, I'd better let the user know about failed script invocation.


[CLI::Gem] Store the VERSION in a separate file

What was the end-user problem that led to this PR?
The problem was the bundle gem template generates a gemspec file that manipulates $LOAD_PATH, which can lead to unexpected behavior.
What was your diagnosis of the problem?
My diagnosis was we should continue storing the version in a single place, but one that is not a ruby file.
What is your fix for the problem, implemented in this PR?
My fix puts the version in a VERSION file in the top level of the generated repo. That file is then read by both the gemspec and version.rb.
Why did you choose this fix out of the possible options?
I chose this fix because the alternatives seemed like string parsing version.rb, and string parsing is best avoided.
This will also make tooling around version management easier, as it's easier to manipulate a plain text file that contains only the version than an entire ruby file.

Do you have any examples of this unexpected behavior?

@colby-swandale in my experience, it has been any code that evaluates gemspecs (especially from path gems) and then does not actually activate that gem after examining the gemspec. At that point, it's too late, and the gem's lib is already on the load path because of having evaluated the gemspec.

What's advantage to use require_relative instead of this?

I was beaten by LOAD_PATH causing unexpected behaviour in https://github.com/bundler/bundler/issues/6058 (although my surprise was not the LOAD_PATH being modified, but the gemspec being read at all), so I'm happy to try these solutions!

@indirect r?

No more load path seems great, but won't require_relative give us the same advantage? Is the separate file to make it easier to programatically increment, or something?

Is the separate file to make it easier to programatically increment, or something?

Exactly that. No having to write regular expressions to update the gem version

Any feedback on this?

I would personally fix the problem by using require_relative and separately discuss the best way for new gems to specify their version going forward.
Maybe a separate file aligns us with the standard ".ruby-version" file version managers use, so we could call it .gem-version or something like that. But I feel this is part of a separate discussion from the "avoid $LOAD_PATH manipulation in gemspecs" issue.


Fixed spellings

closes #...
TODO

[x] docs
[x] tests

@kashifnazar thx for PR, can you update the snapshot as well, please?

Could you please guide me how I can do that?

@kashifnazar
yarn test:unit --updateSnapshot

and commit updated snapshots
more info here https://jestjs.io/docs/snapshot-testing

Thanks @rostislav-simonik. I have updated the snapshot.

:tada: This PR is included in version 1.0.0 :tada:
The release is available on:

npm package (@next-major dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


⚠ Samsung has degraded performance

In 749b630, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2440 ms

Resolved: Samsung performance has improved in 4921bca.


metamask + iron = website confused

After applying https://github.com/iron-wallet/iron/pull/352, I installed the Iron extension on my main browser profile (predicting something would go wrong, but testing for that was the point)
with both extensions installed, the first website I used happened to be https://app.charmverse.io/
took me a while to connect the dots with this, but the "Connect Wallet" (metamask) button is now redirecting to the chrome app store. disabling the Iron extension makes it connect to Metamask normally
Is there a way around this?
I'm assuming the long-term answer is that both a) metamask needs to support 6963, and b) whatever sdk is used by charmverse needs to be updated as well, but wondering if some viable solution is possible for legacy pages?
the EIP does mention that backwards compatiblity is supposed to happen (by still supporting window.ethereum) so maybe this is a bug / wrong assumption on whatever SDK the website uses?

Come to think of it, maybe this is the double window.ethereum injection?

You should add backward compatibility for window.ethereum for websites that don't support 6963 :)
https://eips.ethereum.org/EIPS/eip-6963


update nyc config

generate lcov for codecov

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@f752a64). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff            @@
##             main       #99   +/-   ##
========================================
  Coverage        ?   100.00%
========================================
  Files           ?        40
  Lines           ?      1239
  Branches        ?       260
========================================
  Hits            ?      1239
  Misses          ?         0
  Partials        ?         0

Continue to review full report at Codecov.

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


Improve choice of the best preferred identifier for conflated chemicals

We should come up with strategies for improving choosing the best preferred identifier for conflated chemicals (something better than the smallest identifier).
Some ideas:

Shorted preferred name or shortest synonym if it’s a direct subset of something else
If cliques have SMILES — choosing the clique with the smallest number of components or the smallest molecular weight would help with
Information content? Degree — number of linkouts?
RxNorm active ingredient information

Duplicate with https://github.com/TranslatorSRI/Babel/issues/341, but I'm not sure which one to close.


Upgrade to Storm 1.0

Storm 1.0 was finally released.

The package-names of storm-constructs need to be changed perhaps (STORM-1202)

I have sent a pr #769

Available in master.


Clarify which version of llamacpp is being used

Hey, would be nice to know if the version of llamacpp being used is locked to the python package, and if it is, which version it is. Or at least clarify it. I saw that it said it builds llamacpp from source when installing, but which version? I'm a bit confused about that part 😅
It is not possible to config this package to use the latest build from llamacpp itself? So that the bindings and the library version could be decoupled? Only on a specific override of course, otherwise it would cause way too much headache. Things like supporting a new type of LLM would not really mean any outward API changes, and since llamacpp moves so fast, it could be nice to at least have the option to do so.

Hey @fiery-transition late reply but I publish this in the CHANGELOG whitch each release. It's not included in the package itself (open to a PR if anyone wants to do this) but you should be able to use llama_cpp.__version__ to get that info.


Adopt is no more, long live Zulu!

Coverage remained the same at 94.977% when pulling e7e42315a9110a66686d4a193d3293f8bb4287d6 on geertjanw:master into fe60dcfd42ed90f26acaeb09a4818b7b966fbe7b on apache:master.

We are using Eclipse Temurin.

Do you still consider building on both distros Temurin and Zulu? ;-)


Lighting

Addition of Lighting to LastTry.
Lighting from sources, such as torches and Sun.

http://www.java-gaming.org/index.php?topic=28685.0

WIP
Isn't super great, but its a start.

Implemented by @Col-E.


Error: Wrong SmartThings token.

Hi. I tried your plugin.
But i get this error (Wrong SmartThings token.)
I have generated several tokens but no one is working.

Hi,
did you follow the guide step by step?
Does the component works without the SmartThings token?
What is your TV model?
Also should help if you have some error from the log and you can post it here.

Hi.
Yes, I followed the guide.
I have used the Samsung-tizen Plugin previously and that worked.
I have not tested without the token.
My model is a QE55Q7CGM.

I suppose that the problem is in the process to identify the name and than the ID of the device. I tested it with my TV and it work, but I need to performe additional test with other model, your help is appreciated. Please as first step let me know if you can configure the component leaving the token key blank and if you can see the device info in the device page.

It is working, if i leave the token key blank.

That's fine!
Can you now login to this page with your samsung account, select your TV from the devices and attach a screenshot like this:

I need to know what you have in the field "label" that I use to identify the TV. I suspect that is empty because you don't set it, anyway I can check "name" if label is empty.
Thanks.

Thanks.
I suppose that you change the label from SmartThings app, correct?
I make some test, asap I will release a new version fixing SmartThings detection.

I can set a tv name in the smartthings App. I have done this.

Yes, I understand the issue in my assumption. I will fix this in a different way.
Pls wait for new version

Thank you.

Hi,
I published a new release that should fix the problem, until you have only 1 TV registered in SmartThings. I still have to manage the case of multiple TV registered, but now is too late.
Await your feedback.

The integration with the smartthings token is working now.
But I get the following in the log:
Logger: custom_components.samsungtv_smart.media_player
Source: custom_components/samsungtv_smart/media_player.py:586
First occurred: 5:29:01 (1 occurrences)
Last logged: 5:29:01

Retrieving applications list from TV. It is suggested to define a manual app_list (see component documentation)!!!

This is just a log warning at startup that is suggesting to create a manual app_list as explained in readme. It is not an issue and you can ignore it, or you can create the app_list as suggested,
Does everythings work fine?

All is working now.
Thank you very much.


PAA root certs update

Ran fetch_paa_certs_from_dcl.py on main-net. Looks like there are a few more since the last time we ran this.

Fast-tracking script-generated changes.


[Feature][Idea] about migrations problem

Description of problem
refs: https://github.com/the-control-group/voyager/issues/204 , https://github.com/the-control-group/voyager/issues/3668 , https://github.com/the-control-group/voyager/issues/3510 , https://github.com/the-control-group/voyager/issues/2713 , and many others
Proposed solution
When we make any change on our database by voyager , I think that the MAIN PROBLEM IS that we cannot detect our changes on the git repo so we cannot share the changes with the team developers.
What about save the metadata of our voyager tables in file format instead of save them at the database.
I suggest to serve the metadata over json files for example:
data-types.json
[
    {
        "id": "1",
        "name": "users",
        "slug": "users",
        "display_name_singular": "User",
        "display_name_plural": "Users",
        "icon": "voyager-person",
        "model_name": "TCG\\Voyager\\Models\\User",
        "policy_name": "TCG\\Voyager\\Policies\\UserPolicy",
        "controller": "",
        "description": "",
        "generate_permissions": "1",
        "server_side": "0",
        "details": null,
        "created_at": "2018-10-24 11:52:47",
        "updated_at": "2018-10-24 11:52:47"
    },
    {
        "id": "2",
        "name": "menus",
        "slug": "menus",
        "display_name_singular": "Menu",
        "display_name_plural": "Menus",
        "icon": "voyager-list",
        "model_name": "TCG\\Voyager\\Models\\Menu",
        "policy_name": null,
        "controller": "",
        "description": "",
        "generate_permissions": "1",
        "server_side": "0",
        "details": null,
        "created_at": "2018-10-24 11:52:47",
        "updated_at": "2018-10-24 11:52:47"
    },
    ...
]

Yes, but that requires a complete rewrite of a majority of voyager's core functionality.
We're already planning exactly that for Voyager 2.0, but that's a long way off.


ARM64 support

First, let me say thank you so much for making this repo public and sharing it with me!
I immediately did a live stream and took it for a spin!
I ran into an issue, and I think its because I'm on Apple silicon (M1).
@pacphi joined me on the stream, and had X86 ready to try it with me.  And it worked for him.
I'm very impressed!
I will definitely keep you posted if I take this concept any further!

Hi
Thanks for using the project, I'm happy you might find it useful.
Concerning the ARM64 support, it seems like arm64  images for KIND are
available (e.g.
https://hub.docker.com/layers/kindest/node/v1.26.6/images/sha256-26ae311549359a62de298e6a99daff1b5cb4806161ade7816b82f23ab0489622?context=explore&tab=vulnerabilities),
so the command line tool as well:
https://github.com/kubernetes-sigs/kind/releases/tag/v0.20.0
Unfortunately I don't own an Apple Silicon myself and can't reproduce the
issue, but could you please share any output logs for the problem you are
facing?
Many thanks

Very interesting!

describe.txt

Thanks for sharing, it seems like a kind of limitation / requirement of Cilium and it might have to do with the MacOS Kernel.
Here I've found an opened issue about it: https://github.com/cilium/cilium/issues/30278

I am closing this issue as it's a Docker Desktop/Cilium bug, not a real issue with this terraform project.


Added note about HTTPlug

This will make us independent from Guzzle

Ref: #4

Merged! Thanks for your contribution! ✨🍾

Thank you for merging


[ BUG ]: Fix Search Functionality

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
Proper search functionality NOT UI just UI update
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

@PatilHarshh Sir I'm willing to work around this, could you please assign me this issue?

What Changes You want to make ? it is little Unclear to me ! @chaitanyarora

@PatilHarshh on it sir!


Add growable write buffer

Description
Added growable write buffer
Related issue(s)

Resolves #66

:white_check_mark: Checklist for your Pull Request
Related changes (conditional)

Tests

[x] If I added new functionality, I added tests covering it.
[x] If I fixed a bug, I added a regression test to prevent the bug from
silently reappearing again.

Documentation

[x] I checked whether I should update the docs and did so if necessary:

README

Public contracts

[x] My changes doesn't break project license.

Stylistic guide (mandatory)

[x] My code complies with the styles guide.

[x] My commit history is clean (only contains changes relating to my
issue/pull request and no reverted-my-earlier-commit changes) and commit
messages start with identifiers of related issues in square brackets.
Example: [#42] Short commit description
If necessary both of these can be achieved even after the commits have been
made/pushed using rebase and squash.

Before merging (mandatory)

[x] Check target  branch of PR is set correctly

Codecov Report
Attention: Patch coverage is 94.02985% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 95.57%. Comparing base (f2b403b) to head (ed89a3c).

Files
Patch %
Lines

internal/queue/growable.go
94.82%
1 Missing and 2 partials :warning:

internal/core/cache.go
88.88%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #67      +/-   ##
==========================================
- Coverage   96.10%   95.57%   -0.54%
==========================================
  Files          23       23
  Lines        1309     1310       +1
==========================================
- Hits         1258     1252       -6
- Misses         32       36       +4
- Partials       19       22       +3

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


Code installation appears to be corrupt. Please reinstall.

Hello, recently I installed your theme, which is beautiful.
I installed the theme, set it to LTLE and then installed both extensions: Activitus Bar and Vibrancy.
I set the Settings parameters as you told in your README.MD
But after the first Restart a message appears saying "Your Code installation appears to be corrupt. Please reinstall".
In the window title also appears the tag [Unsupported].
I really wanted to use your theme and in the first instance it appears to work correctly, but after maximizing the window the sidebar became dark. It appears only when maximized.
I'm gonna use it for some days and will update if I find anything else.
PS: it would be amazing if you can add dynamic theme support.
Versions
OS: macOS Big Sur (11.2.2) [Darwin x64 20.3.0]
vsCode: 1.54.1
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3

Also if I double-click on the window bar to expand and fill all the space available in the screen, the window corners get flat instead of rounded so I have to restart the app to get the rounded corners again.

Do these issues persist when disabling the other extensions? I think Vibrancy in particular has had some issues with the most recent updates, so it could be one of those.

Also not sure what you mean by dynamic theme support.


Note important difference between r.args and apply

The JavaScript version of the r.args documentation currently says http://rethinkdb.com/api/javascript/args/ :

This is analogous to using apply in JavaScript.

The other language versions have similar statements.
However it turns out that r.args has one subtle but sometimes important difference to those native commands.
Using r.args with a command that evaluates its arguments lazily can yield different results. Since r.args takes an array, all of the arguments will be eagerly evaluated before being passed into the parent term.
For example
r.and(a, b) is not equivalent to r.and(r.args([a, b])) if b has any side effects.
A simple example is r.and(false, r.error("test")) vs. r.and(r.args([false, r.error("test")])). The former evaluates to false, while the latter throws an error.
We should clearly describe this difference in the r.args documentation.
(background: A user ran into this https://github.com/rethinkdb/rethinkdb/issues/5821)

@danielmewes -- I don't think any language preserves laziness through splicing, does it?  What's the equivalent JS and that behaves differently?

Well, in many languages function arguments are never lazy, so there's nothing to preserve.
The important point though is that using apply in your ReQL query in JavaScript is not equivalent to using r.args in your ReQL query in JavaScript. The former operates on AST objects, and thereby maintains lazyness within the resulting ReQL query, while the latter operates on ReQL values and discards lazyness.
You're right that it's "analogous", but it's not equivalent.

@danielmewes -- Ah!  I misunderstood, you're right that it's confusing.  (I thought you were comparing r.args in ReQL to apply in pure JS, not to using apply in JS to build ReQL terms.)


Problem with bringing items in to view in the Items Repeater.

There seems to be a problem with bring in to view calls for repeater items. This issue is related to repeater virtualization where item needs to be created and scrollbar position needs to be calculated before item can be brought in to view.
For this to work GetOrCreateElement was made public but usage of it is not relay user friendly and can cause some issues.
After call to GetOrCreateElement is made user will get new item but calling BringInToView will result in empty repeater viewport if user does not wait for layout pass to be finished.
This not only mean user is not quite sure when can BringInToView be called but also additional items can be added to repeaters source collection before layout pass is over and this can also lead to empty viewport.
So only option user has is to force layout update after GetOrCreateElement to make sure all is ready for BringInToView call.
I wonder if we can make BringInToView safer feature to use as I imagine bringing things in to view in the repeater is one of things users will need.
To demonstrate this I created small repository: https://github.com/igorstefus/AvaloniaRepeaterProblem/tree/master/RepeaterProblem

This seems to be the way ItemsRepeater was designed to work. From the MS docs:
https://docs.microsoft.com/en-us/windows/uwp/design/controls-and-patterns/items-repeater#bringing-an-element-into-view

Bringing a virtualized element into view involves the following:

Realize a UIElement for an item
Run the layout to ensure the element has a valid position
Initiate a request to bring the realized element into view

WPF has the UpdateLayout method which makes it a bit less ugly, maybe we should just add UpdateLayout to ItemsRepeater?

UWP has the UpdateLayout method on UIElement: https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.uielement.updatelayout?view=winrt-19041 but the reason we dont have it is (from the UWP docs):

Layout updates can be forced by app code rather than relying on the built-in layout system behavior by using the UpdateLayout method. However, that is not generally recommended. It is usually unnecessary and can cause poor performance if overused.

Which is also true for Avalonia, so we make it a bit more difficult by having to get the layout manager etc. but given that doing a manual layout is necessary for ItemsRepeater we could expose UpdateLayout on ItemsRepeater.

Yeah that make sense. At least user doesn't need to hunt for LayoutManager. It noting more to make it more streamlined :)


Fix typo

EmbeddedMariaDbDataSourceDependencyContext -> EmbeddedDynamoDbDataSourceDependencyContext

The test failure has nothing to do with what I fixed.

yeah, will look onto aerospike tests

thank you for your contribution!


Notifications don't seem to be working

It appears that notifications are not working, I receive a send failed when trying to test the notifications.

Indeed it's not working again. Today I completely rebuilt the service and was working well ...... for a few hours it seems. :( Looking to see what's going on.
Thanks,
Gaston

Thanks Gaston. I did notice that it didn't hang OctoPrint anymore, it just gave the error quickly and continued on - which is a definite improvement :)

Honestly, we got lucky! This is another kind of error that luckily does not block OctoPrint.

I'll take luck any day!  I have 30 printers running this, I don't think I could live without these notifications :)

And we are back in business!!! One of the services was not correctly restarting when AWS instance was rebooted. All good now.
Thanks again for letting me know about this.
Gaston


How can I read messages using the WebClient?

I'm trying to read messages in a thread when a reaction is added to the parent message, I'm not able to find any non-deprecated method to do so.
Reproducible in:
slack_sdk==3.27.0
Python 3.12.3
Ubuntu 24.04
The Slack SDK version
slack_sdk==3.27.0
Python runtime version
Python 3.12.3
OS info
Ubuntu 24.04 LTS
Steps to reproduce:
slack_client = WebClient(token=os.environ['SLACK_SIGNING_SECRET'])

...
response = slack_client.conversations_replies(
                        channel=channel_id,
                        ts=message_ts
                    )
                    print(response)

Expected result:
Messages in the thread should come back.
Actual result:
The request to the Slack API failed. (url: https://www.slack.com/api/conversations.replies)
The server responded with: {'ok': False, 'error': 'invalid_auth'}

Requirements
For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. :bow:
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Hey @macintushar! 👋 I don't think conversations.replies is deprecated but the invalid_auth error might be from using an unexpected token. The SLACK_SIGNING_SECRET your using might have to be replaced with a SLACK_BOT_TOKEN that has one of these scopes - I believe the signing secret is used more for verifying incoming events sent to you!

Hey @zimeg! This is the response I get when I try using conversation_replies with SLACK_BOT_TOKEN
Error posting message: The request to the Slack API failed. (url: https://www.slack.com/api/conversations.replies)
The server responded with: {'ok': False, 'error': 'not_allowed_token_type'}

and this if I use the SLACK_SIGNING_SECRET
Error posting message: The request to the Slack API failed. (url: https://www.slack.com/api/conversations.replies)
The server responded with: {'ok': False, 'error': 'invalid_auth'}

Please let me know if you want any more details about this.
Thanks for the help! :pray:

@macintushar hmm I can confirm the bot token is working alright in a workspace of mine 🤔 Could you also check that this token starts with xoxb- and that it's associated with the team of the channel you're retrieving?
This might be unrelated to the SDK usage too and I think it'd be good to confirm that this is an issue with the token via the method testing page. If this happens to give the same errors, then we can dive into token strangeness!

@macintushar Switching and swapping tokens happens to the best of us! But I'm so glad we have these prefixes that hint at meaning. Also glad that cleared things up! 😄 Going to close this issue, but feel free to reopen it if needed!


Support for lit-element with storybook/polymer

Is your feature request related to a problem? Please describe.
lit-element seems to be the next evolution of polymer, but using the @storybook/polymer package with lit-element is not working out of the box.
Describe the solution you'd like
There is a little configuration that must be added in the webpack config file in order to make the storybook work with lit-element.
Describe alternatives you've considered
You may override the webpack configuration yourself (in the .storybook/webpack.config.js file) with:
module.exports = (baseConfig, env, config) => {
  config.module.rules[0].exclude = /node_modules\/(?!(lit-html|@polymer)\/).*/;
  return config;
};

Are you able to assist bring the feature to reality?
The solution is to add the previous exclude line directly in the webpack configuration.
Additional context
The exclude regexp may contain more elements like /node_modules\/(?!(@webcomponents\/shadycss|lit-html|@polymer|@vaadin|@lit)\/).*/ (discussion here: https://github.com/Polymer/lit-element/issues/54#issuecomment-439901575).

There are reasons to make a separate config:

polymer-webpack-loader is not needed for Polymer 3 and LitElement
@webcomponents/webcomponentsjs polyfill should be updated to 2.x, not 1.x

The only breaking change in the polyfill is that 1.x includes HTML imports polyfill, which is no longer needed by Polymer 3 and LitElement.
Also, version 2.x of the polyfill brings own Symbol polyfill instead, but it should not conflict with those from core-js. It would make sense to wait for webcomponents/webcomponentsjs#1021 though.

@storybook/web-components makes even more sense to me, actually.
One thing we really need  is "bare" polyfills though, will ping Polymer team again about that.

+1, we are creating a new storybook with lit-element right now and are welcome to contribute with this issue as we need to work with simple es6 classes as well.

I also suggest:

Create a separate @polymer/webcomponents package
Supports ES6 classes and can handle the polyfills (rel #3497)

Hurrah!! I just released https://github.com/storybooks/storybook/releases/tag/v5.0.0-beta.2 containing PR #5490 that references this issue. Upgrade today to try it out!
Because it's a pre-release you can find it on the @next NPM tag.
Closing this issue. Please re-open if you think there's still more to do.

@shilman that PR was only one prerequisite.
Please see https://github.com/storybooks/storybook/issues/4958#issuecomment-460771403 for a full list of the actions to implement.
I can try to refactor @storybook/polymer to make this happen, with dropping Polymer 2.
So could you reopen this issue please?

Sounds logical @web-padawan, reopening this issue for you guys.

@Keraito thanks for reopening. Could you also help me with clarifying some details about how can we tweak webpack setup used by Storybook?
I have created a very basic example of the webpack + web components here:
https://github.com/web-padawan/webpack-wc-demo
So the steps I would like to configure are described below:

replace babel-loader with the loader provided by webpack-babel-multi-target-plugin

  module: {
    rules: [
      {
        test: /\.js$/,
        use: [
          BabelMultiTargetPlugin.loader()
        ]
      }
    ]
  },

Add the BabelMultiTargerPlugin itself:

    new BabelMultiTargetPlugin({
      babel: {
        // @babel/preset-env options common for all bundles
        presetOptions: {
          useBuiltIns: 'usage'
        }
      },

      // Target browsers with and without ES modules support
      targets: {
        es6: {
          browsers: [
            'last 2 Chrome major versions',
            'last 2 ChromeAndroid major versions',
            'last 2 Edge major versions',
            'last 2 Firefox major versions',
            'last 3 Safari major versions',
            'last 3 iOS major versions'
          ],
          tagAssetsWithKey: false, // don’t append a suffix to the file name
          esModule: true // marks the bundle used with


Keep cache folders inside docker containers

Hey guys, thank you very much for that genius boilerplate.
I want to make one suggestion for enhancement:
Running on OSX has some performance drawbacks, as you have a mounted folder inside the VM and the hypervisor needs to synchronize cache folders, which is pretty slow (no matter if VBoxFS or NFS).
As you usually don't need any files inside the cache folder during development, it would be great if the cache folder can reside inside the docker container. I think this would dramatically increase the performance of the entire environment.
Best regards

Isn't it getting more difficult to delete the cache folders manually in case T3 fully blocks?

Hint: This is mainly a VirtualBox issue, performance (with or without NFS) with VMware or Parallels is great.

You can create /storage/typo3temp and symlink your typo3temp to this directory.

We could maybe add a note about this in our documentation?


Osose/ruby samples update

I fixed the models folder this time! Thanks for noticing :)

superseded by #951


jax tutorial 3 (activaton fn): code to compute dead neurons fails

Tutorial: -1 (Fill-in number of tutorial)
https://uvadlc-notebooks.readthedocs.io/en/latest/tutorial_notebooks/JAX/tutorial3/Activation_Functions.html#Finding-dead-neurons-in-ReLU-networks
Describe the bug
A clear and concise description of what the bug is.
net_relu = BaseNetwork(act_fn=ReLU())
params = net_relu.init(random.PRNGKey(42), exmp_batch[0])
measure_number_dead_neurons(net_relu.bind(params))

produces
---------------------------------------------------------------
<img width="1384" alt="Screenshot 2023-03-17 at 4 55 18 PM" src="https://user-images.githubusercontent.com/4632336/226071121-a66f4084-a60a-4d16-b8ed-05be59696b9b.png">
------------
UnfilteredStackTrace                      Traceback (most recent call last)
[<ipython-input-42-1daea13ed585>](https://localhost:8080/#) in <module>
      2 params = net_relu.init(random.PRNGKey(42), exmp_batch[0])
----> 3 measure_number_dead_neurons(net_relu.bind(params))

25 frames
UnfilteredStackTrace: flax.errors.JaxTransformError: Jax transforms and Flax models cannot be mixed. (https://flax.readthedocs.io/en/latest/api_reference/flax.errors.html#flax.errors.JaxTransformError)

The stack trace below excludes JAX-internal frames.
The preceding is the original exception that occurred, unmodified.

--------------------

The above exception was the direct cause of the following exception:

JaxTransformError                         Traceback (most recent call last)
[/usr/local/lib/python3.9/dist-packages/flax/core/tracers.py](https://localhost:8080/#) in check_trace_level(base_level)
     34   level = trace_level(current_trace())
     35   if level != base_level:
---> 36     raise errors.JaxTransformError()

JaxTransformError: Jax transforms and Flax models cannot be mixed. (https://flax.readthedocs.io/en/latest/api_reference/flax.errors.html#flax.errors.JaxTransformError)

Screenshots
If applicable, add screenshots to help explain your problem.
Runtime environment (please complete the following information):
Colab

Hi, that's quite surprising, there must have been more internal Flax changes. To prevent this from happening, I removed the binding in a30e19dd1c8c94e61eb93258380a13826bcbda08, but will need to check the other tutorials in which that may occur as well.


Ideas about middleware callback patterns

It's just an experiment, and I don't have the energy to refactor yet.
enum EventSpecialKey {
  MiddlewareReady = '__isReady__'
}

type PromisifyCallbackRetType = number | boolean | Promise<any>

interface Middleware {
  setup?: (...args: any[]) => void;
  updated: (next: () => number, ...args: any[]) => PromisifyCallbackRetType;
  unmounted?: (...args: any[]) => void;
}

type PlayerEventCallback = 'connect' | 'disconnect';

function promisifyCallback(result: PromisifyCallbackRetType, defaultValue: boolean = true) {
  if (result instanceof Promise) {
    return +defaultValue;
  }
  const ret = +result;
  return isNaN(ret) ? +defaultValue : ret;
}

function executeMiddlewares(event: { middlewares: Record<string, Middleware[]> }, callback: string, defaultValue: boolean, ...args: any[]) {
  const middlewares = event.middlewares[callback];

  for (const m of middlewares) {
    if (m.setup && !Reflect.get(m, EventSpecialKey.MiddlewareReady)) {
      m.setup(...args);
      Reflect.set(m, EventSpecialKey.MiddlewareReady, true);
    }
  }

  let index = 0;

  const next = () => {
    index++;
    if (index < middlewares.length) {
      return promisifyCallback(middlewares[index].updated(next, ...args));
    }
    for (const m of middlewares) {
      if (m.unmounted && Reflect.get(m, EventSpecialKey.MiddlewareReady)) {
        m.unmounted(...args);
        Reflect.set(m, EventSpecialKey.MiddlewareReady, false);
      }
    }
    return +defaultValue;
  };

  if (middlewares.length > 0) {
    return promisifyCallback(middlewares[index].updated(next, ...args))
  }
  return +defaultValue;
}

function OnPlayerConnect() {
  // Math.round(Math.random() * 10)
  return executeMiddlewares(PlayerEvent, 'connect', true, 0);
}

function OnPlayerDisconnect() {
  // Math.round(Math.random() * 10)
  return executeMiddlewares(PlayerEvent, 'disconnect', true, 0);
}

class Player {
  name: string = ''
  constructor(public readonly id: number) {
  }
}

class PlayerEvent<T extends Player> {

  static readonly middlewares: Record<PlayerEventCallback, Middleware[]> = {
    'connect': [],
    'disconnect': []
  };

  static readonly players = new Map<number, { context: PlayerEvent<any>, value: Player }[]>();

  constructor(private playerConstructor: new (id: number) => T) {
  }

  private getProxyPlayer(player: T) {
    return new Proxy(player, {
      set(target, p, newValue) {
        PlayerEvent.players.get(player.id)?.forEach(item => {
          const has = Reflect.has(item.value, p);
          const descriptor = Reflect.getOwnPropertyDescriptor(item.value, p)
          const writeable = descriptor && descriptor.writable;
          if (has && writeable) {
            Reflect.set(item.value, p, newValue)
          }
        })
        return true
      },

    })
  }

  private setupMiddleware(playerId: number) {
    let players = PlayerEvent.players.get(playerId);

    if (!players) {
      players = [{ context: this, value: new this.playerConstructor(playerId) }];
      PlayerEvent.players.set(playerId, players);
    }

    let player = players.find(p => p.context === this);
    if (!player) {
      const addPlayer = { context: this, value: new this.playerConstructor(playerId) };
      players.push(addPlayer);
      player = addPlayer;
    }
  }

  private unmountedMiddleware(playerId: number) {
    let players = PlayerEvent.players.get(playerId);

    if (!players) return;

    let playerIdx = players.findIndex(p => p.context === this);

    if (playerIdx === -1) return;

    players.splice(playerIdx, 1);
  }

  onConnect(fn: (next: () => ReturnType<typeof promisifyCallback>, player: T) => PromisifyCallbackRetType) {
    PlayerEvent.middlewares['connect'].push({
      setup: this.setupMiddleware.bind(this),
      updated: (next, playerId: number) => {
        const players = PlayerEvent.players.get(playerId)!;
        const player = players.find(p => p.context === this)!;

        const proxyPlayer = this.getProxyPlayer(player.value as T);
        return fn(next, proxyPlayer);
      }
    })
  }

  onDisconnect(fn: (next: () => ReturnType<typeof promisifyCallback>, player: T) => PromisifyCallbackRetType) {
    PlayerEvent.middlewares['disconnect'].push({
      setup: this.setupMiddleware.bind(this),
      updated: (next, playerId: number) => {
        const players = PlayerEvent.players.get(playerId);

        if (!players) return next();

        const player = players.find(p => p.context === this);

        if (!player) return next();

        const proxyPlayer = this.getProxyPlayer(player.value as T);
        return fn(next, proxyPlayer);
      },
      unmounted: this.unmountedMiddleware.bind(this)
    })
  }
}

const playerEvent = new PlayerEvent(Player);
const playerEvent2 = new PlayerEvent(Player);

playerEvent.onConnect((next, player) => {
  player.name = 'a';
  return next();
})

playerEvent2.onConnect((next, player) => {
  console.log(player)
  return next();
})

playerEvent.onConnect((next, player) => {
  player.name = 'b';
  return next();
})

playerEvent.onDisconnect((next, player) => {
  console.log(player);
  return next();
})

playerEvent.onDisconnect((next, player) => {
  console.log(player);
  next();
  console.log(PlayerEvent.players)
  return true;
})

playerEvent2.onDisconnect((next, player) => {
  console.log(player);
  return next();
})

console.log(OnPlayerConnect());
setTimeout(() => {
  console.log(OnPlayerDisconnect())
}, 1500)

Here are the usage guidelines:

Use a proxy to handle the assignment issue after middleware execution for multiple instances.
"await next()" is not supported, but the middleware supports async functions.
When encountering async in a middleware, it will return the defaultValue set instead of the result after awaiting. It also means that the return value of subsequent middlewares is not important. If all the middlewares are synchronous functions until the last one, and the last one also returns the result of "next()", it will return the defaultValue.
If you don't have a better idea, you can return the result of "next()" after each middleware callback.
Usually, the callbacks for creating and destroying each event instance should be registered and paired. Otherwise, unpredictable accidents may occur, such as the "onConnect" and "onDisconnect" events for a player, or the "onCreated" and "onDestroyed" events for an object.

Since the current structure is too complex, I may remove generics for classes and event classes if I have time to refactor in the future.

Try using the beta branch of infernus-starter to experience the semi-finished middleware pattern.
For the source code, please see the refactor/middleware branch of infernus.


[SPARK-21481][ML] Add indexOf method for ml.feature.HashingTF

What changes were proposed in this pull request?
Add indexOf method for ml.feature.HashingTF.
The PR is a hotfix by storing hashingTF of mllib.
I believe it is better to migrate native implement from mllib to ml. I can work on it, but perhaps it's better to tackle in two steps: at first add API (this JIRA), and then migrate code (next JIRA).
How was this patch tested?

[x] add a test case.

Can one of the admins verify this patch?

@facaiy I support to add indexOf to ml.feature.HashingTF, but I think the way you fixed  is incorrect for PySpark. So I'd suggest to migrate the HashingTF implementation from mllib to ml firstly, and then add this function. Would you like to work on it? Thanks.

Sure, @yanboliang . Thanks for your suggestion. I'll work on it later, perhaps next week. Is it OK?

@facaiy Sure. Please open a JIRA to track it. Thanks.

Can one of the admins verify this patch?

Closed as #18998 takes too long to wait.


Undo/Redo not working VS2022

When editing a razor page in an MVC project, the editor continually loses the ability to undo and redo changes in the file. This makes it almost impossible to use on production code and is a major issue for productivity. There doesn't seem to be a pattern but I'll update the issue if I notice anything.
When you close and re-open the file it seems to work again for a while but obviously at this point it's too late because the code change you needed to revert or re-apply had already become inaccessible.
VS2022 17.0

It does seem to happen more frequently when editing the .cshtml while the app is running. (maybe hot reload related?)

It does seem to happen more frequently when editing the .cshtml while the app is running. (maybe hot reload related?)

Oh that's a very interesting association. We've been trying to reproduce ourselves and haven't been able to reproduce. If you find a certain pattern with running/editing CSHTML that leads to the undo/redo not being applicable please let us know!

Looks like we have a VSTS issue and it's assigned/prioritized to the core editor team on Visual Studio currently. Closing this as duplicate of https://developercommunity.visualstudio.com/t/Razor-editor-behaves-erratically-in-VS20/1583393

@NTaylorMullen I think this could be related to the Zen Coding extension in VS from Mads. If I disable this and only this extension in my VS and try to break undo/redo I haven't been able to yet. As soon as I turn it back on and use a zen coding shortcut it will break again after a couple of tries. (have added a comment here)
Thought it might be useful for you to try and replicate again if you're involved in the issue still.

@stap123 thank you for the additional information! @madskristensen do you think your Zen coding extension could be breaking things here?

I'm uploading a new version now with a potential fix

I'll download it once it's available and test it, thanks

This does seem to have solved the issue, thanks for the fix @madskristensen I know you have about 1 million extensions to maintain 😵💫
I'll be sure to update if I can see it happening again for any other reason.


Leave in the begin output/end output HTML comments

In my opinion these are really valuable so you know the context of where things start and end :)
Awesome extension, thanks for making it.

Thanks. We'll look into it. +1


Sort by highest score doesn't produce an ordered descending list

This list is sorted by Highest Score. You'll see things with 0's appear before things with 40's and 50's.

I'm receiving some different results in production using the same filter:

BTW this is much more a service problem, since the UI doesn't apply any kind of sorting in this case.
Data are shown as the service returns.
I think we should move this issue in the service repo.

I've opened https://github.com/clearlydefined/service/issues/464 which address this problem.

Sure, closing.


May the avl tree depends can be removed?

The avl library is only used to build copypedeps, not the library itself (as built with make static-lib shared-lib).
Why is this an issue for you?


Chat - No error mesage when trying to send a corrupted file, only red dot in LHN

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Issue found when executing PR https://github.com/Expensify/App/pull/25557
Action Performed:
Pre-requisite: user must be logged in

Go to any chat
Send a corrupted file

Expected Result:
There should be an error message saying that there was a problem sending the file
Actual Result:
There is no error message, only the red dot appears in LHN
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Version Number: <IP_ADDRESS>
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/78819774/50d56732-96ba-4e18-88f9-43d39b8458a2
https://github.com/Expensify/App/assets/78819774/7a7234dd-9f60-478a-9109-f854e89237d1
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
View all open jobs on GitHub

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

Identify the pull request that introduced this issue and revert it.
Find someone who can quickly fix the issue.
Fix the issue yourself.

I can reproduce the issue on staging and dev.
@cubuspl42 any ideas how to resolve this, or should we revert https://github.com/Expensify/App/pull/25557 for now?

cc @situchan from the PR as well, if we confirm the revert fixes it, can you please handle the revert to proactively clear the deploy blockers? @cubuspl42 wont be online until EU morning. Thanks!

FWIW I tried the revert and it did not solve the issue.

Same here. I'm attempting a git bisect to isolate where the regression came from but having a hard time because for some commits to test, the app just crashes. I'll try to narrow it down a bit more and then check the diff.

Hmm if I revert https://github.com/Expensify/App/pull/26729 locally, it fixes the issue. Not sure what to make of this yet, as the change seems unrelated 👀

See my findings here -> https://github.com/Expensify/App/issues/28656#issuecomment-1744002751

I bet the message with error is just sorted to the top and hidden like the "Uploading attachment..." text 😄
That was a fun one 😂

Haha nice. Yeah both our blockers look related.
Happy to send you a revert PR if you haven't already one in the works, or I can review yours.

I'll check yours - I made a branch but did not raise a PR

I'm trying to catch up. So did reverting https://github.com/Expensify/App/pull/25557 help or not?

@cubuspl42 no it was different PR

@mountiny So will we revert-revert https://github.com/Expensify/App/pull/25557?

It was not reverted https://github.com/Expensify/App/pull/28671, the PR was closed, not merged

Issue is not reproducible on build v1.3.96-10
https://github.com/Expensify/App/assets/93399543/60143657-7ce9-4a18-8deb-5633fbce2e8b

Checking special build, will update you shortly

Not reproduced on special build
Not reproduced on special build
https://github.com/Expensify/App/assets/93399543/e135d8d7-bda1-494a-86ec-757a69310fdf


Stop double encoding Condition URLs

This addresses https://github.com/sethvargo/go-fastly/issues/65
It looks like the reason URL encoding was being done was to accomodate forward slashes in Condition names. If you look at the test fixtures however, you can see that the slash was being double encoded anyway, so this would never have worked AFAICT.
This fix makes it possible to now use any non-slash special character - I think that how to deal with slashes will need to be a broader fix, as it will affect any element that can be addressed by name in the URL.

I'll close this one in favor of #106.


Run node-labeller as an unprivileged workload

Is your feature request related to a problem? Please describe:
node-labeller currently runs in a privileged containers, and on AppArmor hosts that results in the host policy being applied to the libvirtd instance running inside the container.
The virt-launcher image is based on CentOS Stream, where QEMU lives in /usr/libexec/qemu-kvm, but on a Debian/Ubuntu host the AppArmor policy expects QEMU to be in /usr/bin/qemu-system-* and will reject attempts to run the QEMU binary in the container.
As a consequence, node-labeller won't work at all.
See https://github.com/kubevirt/kubevirt/pull/8692 for more information. This change would solve https://github.com/kubevirt/kubevirt/issues/7771 and https://github.com/kubevirt/kubevirt/issues/7638.
Describe the solution you'd like:
node-labeller should run in an unprivileged container, just like regular virt-launcher containers do, to avoid this issue. That would make it work out of the box on AppArmor hosts.
As an added bonus, this would ensure that there is no mismatch in terms of reported host capabilities between those detected by node-labeller and those detected by each virt-launcher container.

Still relevant.
/remove-lifecycle stale

/remove-lifecycle stale

/remove-lifecycle stale

/remove-lifecycle stale

/remove-lifecycle stale

/remove-lifecycle stale


Smart pagination fields

The pagination produce two database queries to resolve the count and nodes fields.
We should only run the queries when needed.
GraphQL query:
query GetBooks {
  books {
    count
    # nodes { // Commented out
    #   id
    #   title
    # }
  }
}

Generated SQL queries:
Executing (default): SELECT count(*) AS "count" FROM "Book" AS "book";
Executing (default): SELECT "id", "title", "createdAt", "updatedAt", "authorId" FROM "Book" AS "book";

In this case, nodes were not selected but the SQL query for it still ran.
Solution:
Parse the graphql info object to check which fields are selected.

Will need a new utility to parse the info object.


Only create invoices when the currency is USD

Issue #452
Description
The task for this issue are:
From Stripe to Trinary

When creating Invoices in Stripe, the connected Client in Trinary will have its currency changed to USD (the currency of the invoice) and then will be locked from updating
Do not create Trinary Payments if there are already payments in a different currency (should we "disconnect" the Client from the Customer in this case and delete the external_uuid)

From Trinary to Stripe

When creating a Trinary Payment, it should only create a Stripe invoice if the currency is supported (USD, EUR, MXN) only after updating the currency of the Stripe Customer which will then be locked after the invoice is created

TODO - Create the new function so we can lock the currency from update
Implementation Proof
https://www.loom.com/share/9fe2c2aa8b404f0cba19c22240fa6143

@mecoccaro pls resolve the file conflicts and remember to record the implementation proof again


push/unshift menu items from submenu in linux/windows

Fixes #503

LGTM

looks like this fixes a bug introduced in fdb7b39a0ba27d28e719a7ec3e894822078b6e51

LGTM -- sorry about that.


Threat Intelligence Allow List: Map of List of Strings Required

Trying to go from 5.1.0 to 6.1.0. When deploying the connectivity portion, I'm faced with this error. Adding screenshots.

Previously, I was able to pass in an empty list. I see that the new changes require an empty object but it wont accept that either.

 I used the empty object in the firewall for my primary region but not in the firewall for my secondary region. Problem resolved.


Still requiring running of lb-services on fresh install

It would appear some things are still missing and require lb-services command still be executed on a fresh install to put everything in order.  If you don't run lb-services and try to hit the main web page for the server you get the following error in the console on the server when the client attempts to connect:
Error: Cannot GET /js/lb-services.js     at raiseUrlNotFoundError (/home/ubuntu/src/DatawakeDepot/node_modules/loopback/server/middleware/url-not-found.js:15:17)     at Layer.handle [as handle_request] (/home/ubuntu/src/DatawakeDepot/node_modules/loopback/node_modules/express/lib/router/layer.js:95:5)     at trim_prefix (/home/ubuntu/src/DatawakeDepot/node_modules/loopback/node_modules/express/lib/router/index.js:312:13)     at /home/ubuntu/src/DatawakeDepot/node_modules/loopback/node_modules/express/lib/router/index.js:280:7     at Function.process_params (/home/ubuntu/src/DatawakeDepot/node_modules/loopback/node_modules/express/lib/router/index.js:330:12)     at next (/home/ubuntu/src/DatawakeDepot/node_modules/loopback/node_modules/express/lib/router/index.js:271:10)     at SendStream.error (/home/ubuntu/src/DatawakeDepot/node_modules/loopback/node_modules/express/node_modules/serve-static/index.js:120:7)     at SendStream.emit (events.js:107:17)     at SendStream.error (/home/ubuntu/src/DatawakeDepot/node_modules/loopback/node_modules/express/node_modules/send/index.js:245:17)     at SendStream.onStatError (/home/ubuntu/src/DatawakeDepot/node_modules/loopback/node_modules/express/node_modules/send/index.js:356:12)
However if you run lb-services then hit the site from the client all seems to work ok.

Which branch was this on?  Can you test on Develop and confirm still occurring?


Allowing customizing height/width in tmux.conf

I like a bigger popup window and this allows for customization of height and width of tmux display-popup

Thanks for submitting this. I'll be sure use it as well.


bitcoin-tx JSON tests + test util improvements

On top of #403
https://github.com/bitcoin/bitcoin/pull/8829 - Add bitcoin-tx JSON tests
https://github.com/bitcoin/bitcoin/pull/8830 - [test] Add option to run bitcoin-util-test.py manually
https://github.com/bitcoin/bitcoin/pull/8836 - bitcoin-util-test.py should fail if the output file is empty
https://github.com/bitcoin/bitcoin/pull/8837 - allow bitcoin-tx to parse partial transactions [partial pick]
https://github.com/bitcoin/bitcoin/pull/8881 - Add some verbose logging to bitcoin-util-test.py
https://github.com/bitcoin/bitcoin/pull/9032 - test: Add format-dependent comparison to bctest
https://github.com/bitcoin/bitcoin/pull/9023 - Add logging to bitcoin-util-test.py
https://github.com/bitcoin/bitcoin/pull/9069 - Clean up bctest.py and bitcoin-util-test.py
https://github.com/bitcoin/bitcoin/pull/9945 - Improve logging in bctest.py if there is a formatting mismatch
Trivial cherry picks. Final commit updates json files to replaces legacy addresses with cashaddr.

Rebased-as-@dagurval

utACK


add option to deploy to single node

this

adds --singleNode option to every command in ./bin/rama-cluster.sh
splits the terraform home directories into two, one for single, one for multi
puts shared code/scripts in a common directory
updates readme with shared instructions

Good to merge after those bits of cleanup.


Using Github App to trigger CI on backport PRs

Signed-off-by: Vacha Shah<EMAIL_ADDRESS>Description
Using Github App token in the auto-backport workflow to trigger CI on auto-backport PRs since events created by secrets.GITHUB_TOKEN cannot trigger other workflows. Reference: https://github.community/t/triggering-a-new-workflow-from-another-workflow/16250
Issues Resolved
[List any issues this PR will resolve]
Check List

[X] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #375 (ad6c8ec) into main (a79028f) will decrease coverage by 0.13%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main     #375      +/-   ##
============================================
- Coverage     79.42%   79.28%   -0.14%
+ Complexity     4105     4102       -3
============================================
  Files           295      295
  Lines         17207    17207
  Branches       1826     1826
============================================
- Hits          13666    13643      -23
- Misses         2646     2669      +23
  Partials        895      895

Flag
Coverage Δ

plugin
79.28% <ø> (-0.14%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

.../java/org/opensearch/ad/AnomalyDetectorRunner.java
37.64% <0.00%> (-5.89%)
:arrow_down:

...port/SearchAnomalyDetectorInfoTransportAction.java
60.00% <0.00%> (-4.45%)
:arrow_down:

...rch/ad/transport/ForwardADTaskTransportAction.java
94.06% <0.00%> (-3.39%)
:arrow_down:

...ain/java/org/opensearch/ad/task/ADTaskManager.java
75.69% <0.00%> (-1.21%)
:arrow_down:

...opensearch/ad/indices/AnomalyDetectionIndices.java
72.28% <0.00%> (+0.18%)
:arrow_up:

.../main/java/org/opensearch/ad/ml/CheckpointDao.java
70.19% <0.00%> (+0.64%)
:arrow_up:

...ain/java/org/opensearch/ad/model/ModelProfile.java
72.72% <0.00%> (+1.81%)
:arrow_up:


Integrate SwiftLint

SwiftLint integration
I worked on integrating SwiftLint into our template project. I have dived into Rules and made some configurations for our .swiftlint.yml file.
There're a couple of rules I opted in and out. Also, Some of the rules I might wanna discuss with you guys whether to include them or not. 🤔
disabled rules

trailing_whitespace

opt-in rules

attributes - Attributes should be on their own lines in functions and types, but on the same line as variables and imports.
closure_spacing - Closure expressions should have a single space inside each brace.
contains_over_first_not_nil - Prefer contains over first(where:) != nil
empty_count - Prefer checking isEmpty over comparing count to zero.
empty_string - Prefer checking isEmpty over comparing string to an empty string literal.
explicit_init - Explicitly calling .init() should be avoided.
extension_access_modifier - Prefer to use extension access modifiers
fatal_error_message - A fatalError call should have a message.
first_where - Prefer using .first(where:) over .filter { }.first in collections.
implicitly_unwrapped_optional - Implicitly unwrapped optionals should be avoided when possible.
joined_default_parameter - Discouraged explicit usage of the default separator.
literal_expression_end_indentation - Array and dictionary literal end should have the same indentation as the line that started it.
multiline_arguments - Arguments should be either on the same line, or one per line.
multiline_parameters - Functions and methods parameters should be either on the same line, or one per line.
nimble_operator - Prefer Nimble operator overloads over free matcher functions.
operator_usage_whitespace - Operators should be surrounded by a single whitespace when they are being used.
overridden_super_call - Some overridden methods should always call super
pattern_matching_keywords - Combine multiple pattern matching bindings by moving keywords out of tuples.
private_action - IBActions should be private.
prohibited_super_call - Some methods should not call super
redundant_nil_coalescing - nil coalescing operator is only evaluated if the lhs is nil, coalescing operator with nil as rhs is redundant
single_test_class - Test files should contain a single QuickSpec or XCTestCase class.
sorted_first_last - Prefer using min() or max() over sorted().first or sorted().last
trailing_closure - Trailing closure syntax should be used whenever possible.
unneeded_parentheses_in_closure_argument - Parentheses are not needed when declaring closure arguments.
untyped_error_in_catch - Catch statements should not declare error variables without type casting.
vertical_parameter_alignment_on_call - Function parameters should be aligned vertically if they're in multiple lines in a method call.
yoda_condition - The variable should be placed on the left, the constant on the right of a comparison operator.

configured rules

line_length - to ignore function declarations & comments

discussion-needed rules

closure_end_indentation - Closure end should have the same indentation as the line that started it.
discouraged_optional_boolean - Prefer non-optional booleans over optional booleans.
discouraged_optional_collection - Prefer empty collection over optional collection.
explicit_type_interface - Properties should have a type interface
file_length - need configured?
force_unwrapping - should we enable this one? seems required, but well, it could cause a lot of annoyances.
large_tuple - should make some configuration?
object_literal - should we go for literal object over normal init?
override_in_extension - Extensions shouldn't override declarations.
prefixed_toplevel_constant - Top-level constants should be prefixed by k. should we enable this one? IMO, I personally feel k is a legacy way and pretty old-school 🙈. But I like the idea of creating Constants struct. Feel more Swifty to me.
private_outlet - If we enable private_action, do we have to enable this one as well? Normally, we'd make these IBOutlets private. But in some certain case, I think general views can leaked theirs IBOutlets sometimes. Say it's a common view that doesn't contain any logic, but only its responsibility is just to have other view configure it. 🤔
quick_discouraged_call - Discouraged call inside 'describe' and/or 'context' block. Seems we should enable it, but I don't quite understand it. anyone?
quick_discouraged_focused_test - Discouraged focused test. Other tests won't run while this one is focused.
quick_discouraged_pending_test - Discouraged pending test. This test won't run while it's marked as pending. Need to check, if it's just a warning, then I think we should enable it. (think we can configure its danger level anyways)

I just learned that making unit test function private is to skip that test case. hmm 🤔

overridden_super_call - Some overridden methods should always call super

I'm not sure this is a good idea because for some functions from default SDK you don't need to call super. Especially functions of default UIView drawing cycle.
For example UIView.draw(_:) super doesn't make any sense because it's doing nothing. Also, in some cases you might want to do something like this:
`
class AbstractClass {
func doSomething() {
fatalError(message: "Implementation of abstract class must be overridden in its subclass")
}
}
class ConcreteClass {
override func doSomething() {
//Concrete Implementation
}
}
`

unneeded_parentheses_in_closure_argument - Parentheses are not needed when declaring closure arguments.

This rule is actually good. BUT. In my practice there was a situation when Swift compiler didn't want to work w/o Parentheses in case of complicated closure. I don't have an example because it was some time ago, but this can happen. But I like this rule.

untyped_error_in_catch - Catch statements should not declare error variables without type casting.

We might add it, yes. But, historically, we are not using a lot of try/catch in iOS development. So is this a point for this?

vertical_parameter_alignment_on_call - Function parameters should be aligned vertically if they're in multiple lines in a method call.

Isn't it conflicting or how it's working with multiline_arguments? Just curious.

discussion-needed rules
closure_end_indentation
I agree with that rule because of good indentation code might me much readable. I'm voting for that rule.
discouraged_optional_boolean
Also agree. Because I've seen some people using Optional Bool and its can be really annoying to work with. Because, I mean, it's a boolean, it should have two possible conditions, not three. I'm voting for that rule.
discouraged_optional_collection
Same thing here. I'm voting for that rule.
explicit_type_interface
I don't think wee need this rule, because swift gave us a beautiful opportunity to avoid doing this. For me, by RHS you can easily understand what type is this.
file_length
I don't think we need this rule, because even if we a trying to do controllers very thin there could be a files that reasonably can be vey large. A very good example of such file is a some cool custom UI component that could contain a huge amount of custom drawing using Core Graphics and other stuff. It easy for this files to be 2000+ rows of code.
force_unwrapping
This is a good rule and I also don't like force unwrapping. I'm voting for that rule.
large_tuple
We can add it, but for me it's actually a very rare situation when someone wanna create a bug tuple.
object_literal
This one is tricky. I prefer to use Object Literal. BUT. They could lead to situation like this:

Soooo, I will vote for this actually. But we still better to use Files with constants for colors and stuff like this.
override_in_extension
I don't think we need this rule. At some point those overriding could be bad because of its implicitly. BUT. But they could be a good "weapon" when you are using protocol oriented programming a lot, they might help you get more flexibility at some point.

discussion-needed rules
prefixed_toplevel_constant
You are absolutely right. This is old style. In Swift is a bad practice to use such constants. You need to incapsulate everything. For me only some basic (like mathematic functions) can be on top level.
private_outlet
We no need this rule I think. Because there could be situation where you have a UITableViewCell with only 1 or 2 @IBOutlet and its ok to configure their content directly from controller.

trailing_whitespace
Why to disable this? =)

Thanks for all the comments man. all great points! @ProudOfZiggy  ✌🏻

overridden_super_call - I'm not sure this is a good idea because for some functions from default SDK you don't need to call super. Especially functions of default UIView drawing cycle.
For example UIView.draw(_:) super doesn't make any sense because it's doing nothing.

Aha, only some of the functions will be required to call super by SwiftLint tho. But it's a good thing that you pointed that out. so I've dived into their codebase and found this one out:
private let defaultIncluded = [
        //NSObject
        "awakeFromNib()",
        "prepareForInterfaceBuilder()",
        //UICollectionViewLayout
        "invalidateLayout()",
        "invalidateLayout(with:)",
        "invalidateLayoutWithContext(_:)",
        //UIView
        "prepareForReuse()",
        "updateConstraints()",
        //UIViewController
        "addChildViewController(_:)",
        "decodeRestorableState(with:)",
        "decodeRestorableStateWithCoder(_:)",
        "didReceiveMemoryWarning()",
        "encodeRestorableState(with:)",
        "encodeRestorableStateWithCoder(_:)",
        "removeFromParentViewController()",
        "setEditing(_:animated:)",
        "transition(from:to:duration:options:animations:completion:)",
        "transitionCoordinator()",
        "transitionFromViewController(_:toViewController:duration:options:animations:completion:)",
        "viewDidAppear(_:)",
        "viewDidDisappear(_:)",
        "viewDidLoad()",
        "viewWillAppear(_:)",
        "viewWillDisappear(_:)",
        //XCTestCase
        "setUp()",
        "tearDown()"
    ]

unneeded_parentheses_in_closure_argument  - This rule is actually good. BUT. In my practice there was a situation when Swift compiler didn't want to work w/o Parentheses in case of complicated closure. I don't have an example because it was some time ago, but this can happen. But I like this rule.

I faced some compiler reporting a weird error about this parentheses thing also. but in my case, it was my fault. the compiler just reported an error that wasn't related to the actual cause. I think we can try having it enabled first and see how it goes from there. If it doesn't play well with the compiler, then we can disable it later. what do you think? 🤔

untyped_error_in_catch - We might add it, yes. But, historically, we are not using a lot of try/catch in iOS development. So is this a point for this?

I do agree on that part, but IMO, having this enabled surely wouldn't hurt us even if we just use it occasionally. But it will only help us when needed. So I'm in for having this one on. what do you think?

vertical_parameter_alignment_on_call - Isn't it conflicting or how it's working with multiline_arguments? Just curious.

Actually, I think it will support each other. To combine these rules, it will only accept things like:
func someFunction(param1: String,
                  param2: String,
                  param3: String)

the former rule will only allow param1, param2, and param3  to be aligned to each other. The latter rule will only allow all the params to stay on different lines (when we need it not to be inline).

closure_end_indentation - I agree with that rule because of good indentation code might me much readable. I'm voting for that rule.

I'd love to have it on also, but let's see if our guys are all on the same page here. @jasonnam @Dekablade01 @olivierobert

discouraged_optional_boolean - Also agree. Because I've seen some people using Optional Bool and its can be really annoying to work with. Because, I mean, it's a boolean, it should have two possible conditions, not three. I'm voting for that rule.

Yeah, I agree on this one as well. Because it makes more sense for boolean to only have two choices, but my concern was that there were other cases that I might've missed. Good point! ✌🏻

discouraged_optional_collection - Same thing here. I'm voting for that rule.

Yup, we're cool on this one then.

explicit_type_interface - I don't think wee need this rule, because swift gave us a beautiful opportunity to avoid doing this. For me, by RHS you can easily understand what type is this.

I'm not sure about this one also. Personally, I'd not like to enable it 😂 But our guys might wanna have it on. So I brought it into discussion. Anyway, I'd explicitly declare type interface when it comes to CGFloat, Float, and Double. but I'm concerned that it could introduce inconsistency to the project. what do you guys think? 🤔

file_length - I don't think we need this rule, because even if we a trying to do controllers very thin there could be a files that reasonably can be vey large. A very good example of such file is a some cool custom UI component that could contain a huge amount of custom drawing using Core Graphics and other stuff. It easy for this files to be 2000+ rows of code.

Good point! I agree, but we could also disable any rules with one comment.
// swiftlint:disable file_length

force_unwrapping - This is a good rule and I also don't like force unwrapping. I'm voting for that rule.

I strongly agree on this one and I want this rule enabled also. but my concern is that there are cases that we could perhaps require to declare some object with force unwrapping. These objects are mostly related to the view itself. Let's say if there's a class that requires injected on initialization with some certain view and that view will only be created after viewDidLoad is called (IBOutlets).
So that's why I'd like to discuss with you guys first to see if we should enable it or not, but IMO, I'm in for this rule.

large_tuple - We can add it, but for me it's actually a very rare situation when someone wanna create a bug tuple.

lol we should go for it then.

object_literal - This one is tricky. I prefer to use Object Literal. BUT. They could lead to situation like this. Soooo, I will vote for this actually. But we still better to use Files with constants for colors and stuff like this.

Sure, we will still use constants for colors and stuff. I think we will use literal object mostly on UIImage. For colors if it's to be used, it will only be used in Color constants file anyway I guess.

override_in_extension - I don't think we need this rule. At some point those overriding could be bad because of its implicitly. BUT. But they could be a good "weapon" when you are using protocol oriented programming a lot, they might help you get more flexibility at some point.

I'm actually voting for this one tho. I agree on the part that it could be used a lot and handy to do so, but we can explicitly disable this rule when required sometimes. I'm afraid that some hidden implementation might cause confusion for other team members when they just jumped into the project and expect some class to perform its expected behavior normally.
This is very much open for discussion. what do you think tho? I'm still 50/50 about it, but think I'll vote for this one 🙈

I'm not sure about this one also. Personally, I'd not like to enable it 😂 But our guys might wanna have it on. So I brought it into discussion. Anyway, I'd explicitly declare type interface when it comes to CGFloat, Float, and Double. but I'm concerned that it could introduce inconsistency to the project. what do you guys think?

Well, I'm voting for NOT adding it. And for Double you ca just write var a = 0.0 =)

I faced some compiler reporting a weird error about this parentheses thing also. but in my case, it was my fault. the compiler just reported an error that wasn't related to the actual cause. I think we can try having it enabled first and see how it goes from there. If it doesn't play well with the compiler, then we can disable it later. what do you think? 🤔

We can try I think.

I do agree on that part, but IMO, having this enabled surely wouldn't hurt us even if we just use it occasionally. But it will only help us when needed. So I'm in for having this one on. what do you think?

Also can try.

I strongly agree on this one and I want this rule enabled also. but my concern is that there are cases that we could perhaps require to declare some object with force unwrapping. These objects are mostly related to the view itself. Let's say if there's a class that requires injected on initialization with some certain view and that view will only be created after viewDidLoad is called (IBOutlets).

As we discussed, this rule will not be triggered by such situation. So we can, and I think we should, use it.

close #14


DdateTime format in json

Hello, can ask you about date time format in json? Example value  "OperationCreatedOn": "/Date(1506409448000-0700)/". Thansk a lot.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: c6a3364c-df99-19a8-ecfe-cc209eab50f2
Version Independent ID: 61fd6597-0d6b-e2f0-01c6-fc8659621062
Content: Use Webhooks to create external handlers for server events (Microsoft Dataverse) - Power Apps
Content Source: powerapps-docs/developer/data-platform/use-webhooks.md
Service: powerapps
Sub-service: dataverse-developer
GitHub Login: @jaredha
Microsoft Alias: jdaly

Thanks for your comment, @JannyM85. This issue has been assigned to the doc author for review.


Finalized logic for determining target file path for WebsiteContent objects

Pre-Flight checklist

[x] Migrations

[x] Migration is backwards-compatible with current production code

[x] Testing

[x] Code is tested
[x] Changes have been manually tested

What are the relevant tickets?
Closes #261
What's this PR do?
Updates the logic for determining the destination filepath for any given WebsiteContent object when syncing to a storage backend. Check the linked issue for a link to the doc which describes the desired behavior
How should this be manually tested?

Pick some website with the OCW course site starter
Set all content_filepath values to null for all WebsiteContent records associated with that website
Make sure you have created a sitemetadata content object
Create two content objects for Page or Resource with the same title
Create a third content object for Page or Resource
In Django admin, change the dirpath and the filename for that last content object you just created (and save, of course)
Sync this website to Github

The following should be true:

The file created for the sitemetadata object should exist at the path indicated by the "file" value in the site config
The filename for the first two content object you created should be equal to the slug-ified title, with the second one having a suffix of -2, and both objects should be in the content directory
The last content object you created should exist in Github at this path: <your dirpath value>/<your filename value>.md

Any background context you want to provide?

In order to make the reviews more manageable, I created a separate issue for removing WebsiteContent.content_filepath (https://github.com/mitodl/ocw-studio/issues/268). This PR makes that field obsolete, but it will still exist until we remove it in that issue.
I add the get_destination_filepath method in the github API module b/c it will eventually have some Github specific logic

Codecov Report

Merging #267 (8cce541) into master (ced7fdc) will decrease coverage by 0.36%.
The diff coverage is 87.80%.

@@            Coverage Diff             @@
##           master     #267      +/-   ##
==========================================
- Coverage   88.13%   87.77%   -0.37%
==========================================
  Files         120      120
  Lines        3381     3419      +38
  Branches      495      502       +7
==========================================
+ Hits         2980     3001      +21
- Misses        367      384      +17
  Partials       34       34

Impacted Files
Coverage Δ

websites/models.py
90.58% <0.00%> (ø)

content_sync/apis/github.py
91.17% <72.72%> (-4.37%)
:arrow_down:

content_sync/backends/github.py
98.48% <100.00%> (ø)

content_sync/serializers.py
91.01% <100.00%> (ø)

websites/config_schema/api.py
100.00% <100.00%> (ø)

websites/config_schema/validators.py
93.61% <100.00%> (+1.95%)
:arrow_up:

websites/constants.py
100.00% <100.00%> (ø)

websites/factories.py
100.00% <100.00%> (ø)

websites/site_config_api.py
100.00% <100.00%> (ø)

websites/conftest.py
78.57% <0.00%> (-21.43%)
:arrow_down:

Continue to review full report at Codecov.

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

@mbertrand Ready for review again


Ask for PostgreSQL Citus package

Service Package Request

There is currently no PG Citus Go package support in the track1 SDK, which is needed to implement the Citus related resources in Terraform AzureRM provider (see: terraform-providers/terraform-provider-azurerm#5040).
The Swagger: https://github.com/Azure/azure-rest-api-specs/tree/master/specification/postgresqlhsc/resource-manager

Dupe of #14875?


Error parsing CSS/Less: error evaluating function round math functions take numbers as parameters

Still trying to get Semantic UI to compile. Now getting the following error:
Error parsing CSS/Less: error evaluating function round math functions take numbers as parameters
Unfortunately my framework composes the Less source dynamically and then tries to compile so the reference given (index:10890) cannot easily be traced back to the exact Less source.
But the error is given in the _math() function in Functions.php, where the code is:
if ($args[0] instanceof Less_Tree_Dimension) {
    ....
} elseif (is_numeric($args[0])) {
    ....
} else {
    throw new Less_Exception_Compiler('math functions take numbers as parameters');
}

var_dumping $args[0] at that point shows:
[0]=>
object(Less_Tree_Operation)#102282 (5) {
  ["op"]=>
  string(1) "*"
  ["operands"]=>
  array(2) {
    [0]=>
    object(Less_Tree_Dimension)#102263 (4) {
      ["value"]=>
      float(1.285714285714286)
      ["unit"]=>
      object(Less_Tree_Unit)#102259 (5) {
        ["numerator"]=>
        array(0) {
        }
        ["denominator"]=>
        array(0) {
        }
        ["backupUnit"]=>
        NULL
        ["type"]=>
        string(4) "Unit"
        ["cache_string"]=>
        NULL
      }
      ["type"]=>
      string(9) "Dimension"
      ["cache_string"]=>
      NULL
    }
    [1]=>
    object(Less_Tree_Dimension)#130987 (4) {
      ["value"]=>
      float(14)
      ["unit"]=>
      object(Less_Tree_Unit)#130986 (5) {
        ["numerator"]=>
        array(1) {
          [0]=>
          string(2) "px"
        }
        ["denominator"]=>
        array(0) {
        }
        ["backupUnit"]=>
        NULL
        ["type"]=>
        string(4) "Unit"
        ["cache_string"]=>
        NULL
      }
      ["type"]=>
      string(9) "Dimension"
      ["cache_string"]=>
      NULL
    }
  }
  ["isSpaced"]=>
  bool(true)
  ["type"]=>
  string(9) "Operation"
  ["cache_string"]=>
  NULL
}

So it looks like having an expression inside round() is not handled.
Looking at Semantic source, this is probably the place where it fails:
/*
  This rounds @size values to the closest pixel then expresses that value in (r)em.
  This ensures all size values round to exact pixels
*/
@mini            : unit( round(@miniSize * @emSize) / @emSize, rem);
@tiny            : unit( round(@tinySize * @emSize) / @emSize, rem);
@small           : unit( round(@smallSize * @emSize) / @emSize, rem);
@medium          : unit( round(@mediumSize * @emSize) / @emSize, rem);
@large           : unit( round(@largeSize * @emSize) / @emSize, rem);
@big             : unit( round(@bigSize * @emSize) / @emSize, rem);
@huge            : unit( round(@hugeSize * @emSize) / @emSize, rem);
@massive         : unit( round(@massiveSize * @emSize) / @emSize, rem);

Is this something easily solvable?

Hi, the following test succeed: https://github.com/kylekatarnls/less.php/blob/master/test/Fixtures/math/style.less
So I guess, @miniSize or @emSize is not numeric. Can you please dump the declarations of thoses variables?

I tried with values there and get no failure: https://github.com/Semantic-Org/Semantic-UI/blob/master/src/themes/default/globals/site.variables
I will try later with the whole file, but this file may not the the cause.

Hey Kyle,
I posted you a link to a repeatable test case in Gitter private message. Let me know if you can get it from there or should I post it here publicly.

Kyle, have you had time to look at this?

Sorry @indreksiitan many project on the fire and I dropped less.php in favor of my own wrapper of the actual less node package. It requires to install node but allows to o use any version of less with no compatibility issue.

@kylekatarnls  - dropping the whole Node.JS ecosystem into our framework really isn't a viable option. I've been trying to tackle this myself for multiple days now, but unfortunately to no success. Is there a way to contact you directly and maybe try to work out a consulting deal to get this fixed? At this moment I'm willing to pay to get this to work as migrating to other solutions are even more costly.

At the contrary, it's not dropping the node.js ecosystem. less.php is a pure PHP library while less is the native node.js less package just called by PHP.
Else you can reach me via: http://contact.selfbuild.fr/


Add space after period typo to the docs

@JohnWTownsend : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Thanks @JohnWTownsend


Changing application port

Is there a simple way to change the application to point to a different port (other than 8080) or is it just a matter of changing all port 8080 instances within the application? If not I can do this on a networking level, I was just curious. Thanks.

I guess you are talking about feedr:
PORT=9090 yarn start