Panic when trying to delete team with -1 repositories

Gogs version (or commit ref): <IP_ADDRESS>3
Git version: 1.9.1
Operating system: Ubuntu 14.04.5
Database (use [x]):

[ ] PostgreSQL
[x] MySQL
[ ] SQLite

Can you reproduce the bug at https://try.gogs.io:

[ ] Yes (provide example URL)
[x] No
[ ] Not relevant

Log gist: https://gist.github.com/jhasse/7b9822405c314bf9664eea85a149ceb6

Description
Somehow I've ended up with an invalid team. It has only one member, but -1 repositories. When I'm trying to delete the team it results in an internal server error.

Does this still happen in latest release?

Yes, still happens with <IP_ADDRESS>0.

@jhasse does restart fixes the -1 issue? This might be a bug in old Gogs version but doesn't possible to make this situation anymore.

Restarting Gogs? While updating, it was restarted multiple times.

Indeed... I think you would need to connect to your database and find team table, looking for the row with num_repos=-1 and make it 0.

Wouldn't it be possible to include a check in Gogs for num_repos < 0?

Yes, it is possible, if you don't mind wait for the fix..

Patch has pushed to fix this issue, please test on develop branch.

It worked! The team showed up with 0 repositories and I could remove it without a problem.
Thank you very much :)


Task: Update policies datastructure from set to map to have performance optimization in Mongo as well as PG branch

Closing this as this is completed.


fix: run modern build in separate process

fix #3438, #3474
Fixes modern mode issues by really running the two builds in separate processes (thus avoiding any babel preset caching issues)

We need to update the test case (e.g. using async/await in main.js) to verify the content of the two builds.

Added in https://github.com/vuejs/vue-cli/commit/805a4ce2913125cdb56d4f5d5cb3ddb9aa48e7d0

For our project this break the build process. We call vue-cli-service from a subfolder through package.json (from project1 folder: ../node_modules/.bin/vue-cli-service build --modern --verbose).
This way the the Service context is set to the project subfolder, for normal build this is good, but when modern mode kicks in, the current implementation tries to find vue-cli-service runnable with PluginApi (https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/commands/build/index.js#L61) to run it as a subprocess, but fails to locate vue-cli-service.


416 Range Not Satisfiable if requested range end > file size

Long story short
static content:
aiohttp responses with 416 Range Not Satisfiable if requested range end > file size
Expected behaviour
range end is trimmed to the file end as per RFC7233 and 206 Partial Content is returned:
" ... If the last-byte-pos value is absent, or if the value is greater than or equal to the current
length of the representation data, the byte range is interpreted as  the remainder of the
representation (i.e., the server replaces the value of last-byte-pos with a value that is one
less than the current length of the selected representation)."
Actual behaviour
416 Range Not Satisfiable returned
Steps to reproduce
Serve small static file (say, 1000 bytes), issue range request with the field 'Range: bytes=0-32767', observe 416 response
Your environment
aiohttp 1.2.0

original implementation #1382

good catch!
fixed in master


Adding numeric and JSON as types

This is probably the next most common type.  I've kept the color blue not knowing what you'd want to do there.

Thanks!

pushed 1.26


[dart] make dart test work from runtime/dart

Summary
This is me trying to make the basic Dart unit tests runnable from the CLI.
Test Plan
cd serde-generate/runtime/dart
dart test

I wasn't sure if the runtime/* folders were meant to be runnable or just source directories but if you're cool with the pubspec being added in there it seems good to me. Simpler than doing the copy and makes it easier/faster to add new tests.

I wasn't sure if the runtime/* folders were meant to be runnable or just source directories but if you're cool with the pubspec being added in there it seems good to me. Simpler than doing the copy and makes it easier/faster to add new tests.

Thanks for the comment. Great! Yes, we do have a few build/package files for some languages.


Large payloads are not supported

Current implementation does not handle payloads larger than max frame size correctly.
for large payloads:
the sending part causes a frame_too_large error on rabbitmq
the receiving part does not collect multiple frames into one message (resulting in an incomplete payload)

ok first large payload support is now in main, this issue should be closed when we add tests


Get dockerized backend serving on linux

In my attempts to get the dockerized backend up and running on my linux
machine, I encountered this issue where nginx did not have access to the
shared volume files. It turns out that volumes exposed from a linux host
machine's file system abide by the host system's ACL.
I've resolved this issue by first copying the web server files into the
app container, changing the permissions as needed, and then creating a
volume that is only shared between the nginx and app containers. This
way, the containers control the file system ACL and the host filesystem
is out of the way.
This potentially complicates processes involving bumping dependencies
but otherwise seems like a pretty clean solution, since we don't need to
modify the nginx image at all.
Definitely let me know if I've broken a dependency
management workflow, or any other workflow for that matter, in which
case the nginx image user can be modified to work nicely with the host.
test plan:

follow the setup instructions in the markdown file
request http://localhost:9000 once the containers are all up
Observe the behavior matches that of the staging endpoint when
queried: https://staging-api.coordinape.com/api

Creating a new volume to resolve this issue seems quite reasonable to me. I can test this on M1 mac. I'd like to get to a place where our Dockerfiles and builds work consistently across most host OSs, so this is great work towards getting this working on Linux!

Hey topocount, thanks for the contribution. Before merging this, we should make sure that this doesn't introduce an issue we saw in a previous attempt to change the container, namely that the container won't pick up changes to source files after it's first created.
By the way, it might also be straightforward to get the backend app running directly on your host OS once you install dependencies for PHP and composer. This is what both @zashton and I do to work on this app.

fwiw, this runs for me
I am trying to move to a setup where most devs can work locally with docker-compose, and most devs won't be changing laravel at all, so maybe we merge this anyway? because I don't think anyone is using it atm, except me as I try to setup a one command launch

Hey topocount, thanks for the contribution. Before merging this, we should make sure that this doesn't introduce an issue we saw in a previous attempt to change the container, namely that the container won't pick up changes to source files after it's first created.

@levity thanks I kind of anticipated this setup might be the same used for development (and not just e2e testing, for example). I have an alternative fix in mind in that case that I'll push tomorrow

fwiw, this runs for me
I am trying to move to a setup where most devs can work locally with docker-compose, and most devs won't be changing laravel at all, so maybe we merge this anyway? because I don't think anyone is using it atm, except me as I try to setup a one command launch

@exrhizo the lift to accommodate a development workflow isn't very high, if this can wait another day or two, if that helps.
If you have an alternative setup/command in mind for backend development workflows though, I don't want to get in your way.

Thank you for getting this sorted out, I merged the other PR :)


asciinema to codeio converter

Hi @vinayak-mehta ,
Thanks for this nice tool/experiment!
One of the parts that look like legitimate improvements over the state of the art is the codio part. It's quite nice once you have it, but it takes ages to put together.
I was therefore wondering what your thoughts would be on some sort of a conversion mechanism between asciinema's format (https://github.com/asciinema/asciinema/blob/develop/doc/asciicast-v2.md), which seems to be kind of the standard for terminal recording. Or better yet, do you think it would be possible to read in and render the asciicast fileformat the same way the codeio file format is rendered?
Thanks again!

Yes, that is planned #40.
Converting asciinema / terminalizer formats to codio would be nice, but yeah rendering the same format inside a slide will be awesome.


laravel/installer:^5.0

v5.0 was released way back on Aug 1.
To make sure it works (I tested it on PHP v8.2) run this inside your VM:
composer global require laravel/installer:^5.0
laravel new

Thanks!


Fix for issue #254 cannot customize response in ARM PUT templates

:x: There is undocummented changes. Run chronus add to add a changeset or click here.
The following packages have changes but are not documented.

:x:@azure-tools/typespec-azure-resource-manager

You can try these changes at https://cadlplayground.z22.web.core.windows.net/typespec-azure/prs/366/
Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/typespec-azure/prs/366/


Problem with MergeList /var/lib/apt/lists/adoptopenjdk.jfrog.io ...

Hi there,
I'm getting
Problem with MergeList /var/lib/apt/lists/adoptopenjdk.jfrog.io_adoptopenjdk_deb_dists_buster_main_binary-amd64_Packages

when trying to apt update.
It seems like your repository was causing this issue in the past already. Could you please have another look?
Best regards

Tracking in https://github.com/AdoptOpenJDK/openjdk-infrastructure/issues/1647.


Query results are enormous

In DF, some are 10GB. We scan through the entire file to extract the information needed for the map display. Obviously this is not tractable.
Proposal: Let's create QueryResults objects and store those, rather than building them every time we need them.

Well that proposal doesn't quite work as QueryResults are precomputed for a given time. However what we can do is explode the result envelopes into separate resultenvelopes for each variable, so we're not scanning over so much of the disk every time.

Implemented that way, on query creation I'm seeing sustained I/O of about 5 MB/s locally, with a single worker.

On the AGEB shapefile (which is small), it's peaking at 175 KB/s.

We could store ResultSets rather than ResultEnvelopes, which would reduce the amount of unnecessary deserialization by approximately a factor of three.

While that last comment is true, it's probably not worth the effort, as soon we'll be storing distributions as opposed to bounds, and we'll have to rethink the data store yet again.

With that implementation it looks like it's pulling ~400MB off the disk to render a query in Mexico City. That's not great but it's better than 10 GB. We'll have to decide how we handle this once we are realizing distributions; I'm thinking Tuple3 keys of <Variable, Percentile, Feature ID>; then we can use subMap to get all of the items for a particular distribution. If I'm not mistaken, MapDB will store these in order so retrievals should be very efficient.

This is fixed by the flat query result store in the queues branch.


Metadata management and batch ingest automation with Git/GitHub, Jenkins, Ansible, and JIRA

Metadata management and batch ingest automation with Git/GitHub, Jenkins, Ansible, and JIRA
Suggested by: Alex Dunn and Chrissy Rissmeyer
Presenter: Alex Dunn and Chrissy Rissmeyer
Format: Presentation
Audience: Devs, Metadata

Alex Dunn (UCSB), Chrissy Rissmeyer (UCSB)
Remove “Ansible”
Several years ago UCSB incorporated Git/GitHub and JIRA into our metadata management and batch ingest workflows. Since then we’ve looked at repurposing other development tools to provide lightweight and automated solutions to problems we often face. One is that we rely primarily on batch ingests when adding content to our Samvera repository. As a result it’s especially important for the metadata to be error-free; it’s not fun to have an ingest fail overnight and spend the morning tracking down why. Programmatically testing and validating digital object metadata prior to ingest helps us avoid these failures. The metadata itself is managed by Git and stored in GitHub; this allows us to run automated checks against any changes using Jenkins and some custom libraries we’ve written for validating CSV and MODS metadata. In this session, we will provide an overall of our current ingest preparation workflow and the tools we are using, and will discuss some of the benefits that have come out of this collaborative effort.
Intermediate; metadata/dev


[Bug]: Scratchpad Heading Feature needs a second heading

Bug Description
HI,
my Scratchpad file looks like this:
---
aliases:
tags: []
---

# scratches

--
erstellt:  `=dateformat(this.file.ctime, "DDDD HH:mm")`
letzte Änderung: `=dateformat(this.file.mtime, "DDDD HH:mm")`
Ordner: `=this.file.folder`

Adding something to that file, also putting   scratchpad#scratches into the 'Scratchpad Path' property the text will be added at the end of the file, below the line Ordner and not below the headline.
When adding another headline below # scratches  it works. As workaround, because I don't want another headline I added  #  %%dummy%% as second headline, so it's at least hidden.
Thanks for your work,
Caunus
Relevant Screenshot
No response
To Reproduce
No response
Debugging Log
No log

Workflow Configuration

Version & System Information
I'm using the Obsidian Version Version 1.4.2 and the 3.12.8 and as all the latest versions of the recommended plugins

Last working version
just testet
Make sure you have done the following

[X] I have updated to the latest version of this workflow.
[X] I have read the documentation of the feature I am having problems with.
[X] I am using Alfred 5. (Alfred 4 is not supported by this workflow anymore.)
[X] I have updated to the latest version of the Metadata-Extractor and the Advanced URI plugin.
[X] If the o… main search does not work, I made sure that I haven't changed any of the default settings of the Metadata-Extractor. Furthermore, I have tried rerunning osetup and it still does not work.
[X] If notes in general can be found, but recently created or renamed notes cannot, I used the oupdate command to manually update the metadata.
[X] I have not renamed my Obsidian config folder, it's still .obsidian (About → Advanced → Override config folder).

Hi, this is not a bug, but the intended behavior.
"append below a heading" means appending to the section of the note belonging to the heading. The idea is that if you have a big file with multiple headings, you are able to append to a section of the note, instead of simply appending to the bottom of the file.
That's also why your "workaround" works: by adding a second heading, the "section" of the first heading ends earlier.
Adding content to the top of the heading section isn't really desirable, since you would reverse the chronology of your additions. (instead of old → new, you would order a section as new → old).
I clarified the phrasing in the settings, so it is more clear.

Hi,
thanks your are right, may be it was my bad English, but the meaning of append is implemented! Sorry for that! But ;-), I think it's not unusual to have some kind of footer in a document as I have, also I'm not sure if there is a standard which enable you to spot this the markdown for your function. So may be working with a hidden second header might be something for the documentation or FAQ. Second, and during my testing I didn't see this behavior, because I was concentrated on finding a workaround. I disagree with your statement that adding new content on top isn't desirable. I personal prefer, the order New->Old if I'm collecting things, e.g in Pocket. Never the less this might be another function "Insert below Headline".
Thanks again for your work, it looks like to be a great help working with obsidian on a Mac, it "seems", because I didn't really dive deeply into all the functionality. I have still to discover a lot helpful stuff! And sorry about my English.

Hmm yeah, reliably detecting a foot in a note might be a bit tricky. If you really prefer it the other way round, please open a feature request, and if there are more people also interested in this, I'll see that I implement it

Agree, this is tricky. I'm not a developer but I see you have to rely on some MD Objects, and a ruler might be use also in other context. So I see, the easies thing is the workaround the header hidden header. I think this is fair enough.
I will add a feature request of adding stuff from new to old, but I think this might be another function "Insert below header". Will do it soon. Thanks again!


VSCode exits without error before Mocha finishes testing

I have already asked about my problem on Reddit and Stack Overflow.
I am now starting to believe that this caused by a bug in either vscode or vscode-test, because if Mocha was the problem, it would return non-zero return code. Instead, task exits "successfully" in the middle of the test.
What is even more strange is that the task exists at random moments: sometimes the test will complete as it should. It completes more often on my home PC than on my notebook. I guess that this is because my home computer is faster, and the task is able to finish before VSCode exits.
suite("Extension Tests", () => {

    const fixtureFolderLocation = "../fixture/";

    test("Wrap in parentheses", async (done) => {
        const uri = vscode.Uri.file(
            path.join(__dirname, fixtureFolderLocation, "fixture2.html"),
        );

        const document = await vscode.workspace.openTextDocument(uri);

        const editor = await vscode.window.showTextDocument(document);

        editor.selection = new vscode.Selection(new vscode.Position(0, 0), new vscode.Position(0, 4));

        await vscode.commands.executeCommand("nkatex.wrapInParentheses");

        const text = document.getText(new vscode.Range(new vscode.Position(0, 0), new vscode.Position(0, 21)));
        assert.equal(text, "\\left ( word\\right ) ");
        done();
    });

});

When I set a breakpoint somewhere at the beginning of the test, for example at const document = ..., and when I press the "Step Over" button, the test exits immediately.
It seems that there is some asynchronous timeout that closes VSCode during tests. Debug Console just shows the suite name:

Thanks for the issue! We have a new debugger that handles things differently. If you're still running in this problem, please open an issue over there and mention this issue so I don't forget about it.

Thanks for the issue! We have a new debugger that handles things differently. If you're still running in this problem, please open an issue over there and mention this issue so I don't forget about it.


broken version of SwiftMailer in composer.json

After upgrade project to sf1.5.3 I'm get a error: PHP Fatal error:  Class 'Swift_Encoding' not found...
I'm search this class in all files but anything found.
I'm look SwiftMailer repository and found that the file lib/classes/Swift/Encoding.php with this class was deleted in v.5.2.1 and restored in v.5.3.0 - https://github.com/swiftmailer/swiftmailer/commit/52797f2246f4f784d9699beff03ef5c8bd51df7a
SwiftMailer version 5.2.2 is mandatory or it can be replaced by newer version?

Well, I think we can jump to ~5.2 in composer.json.
What do you think @GromNaN ?

@o-m-d Can you check https://github.com/LExpress/symfony1/pull/90

@GromNaN, SwiftMailer-5.4.1 installs and that error no longer occurs. Thanks.