Index out of range

Hi Jung Kurt
Please assist as i am recieving an index out range error on fpdf.go link 2578 where the font is set after deploying to openshift, yet the code is working locally.
Please advise what if the library would behave differently on different environments

Can you verify that the font used locally is exactly the same as the one used in openshift?

yes I used. pdf.setFont("arial" , "B", 13). This is the same code thats deployed yet locally it gives no error

Can you verify that the JSON files in the font subdirectory are that same in both the remote and local locations? In your case, it looks like font/helveticab.json may be problematic.

@jung-kurt we've experienced the same problem when deploying to heroku. Everything works in local too. Maybe getting the wrong path for the fonts? In heroku source code goes to the app directory

Thanks, @mapreal19 -- your information will be helpful in correcting this problem.

Found our problem. What happened is that we had an error when trying to render an image. That's why f.err wasn't nil here: https://github.com/jung-kurt/gofpdf/blob/master/fpdf.go#L1954-L1956 and made us think there was an issue in our fonts.
I think instead of returning we should panic here? SetFont should succeed otherwise we will have problems like this, assuming the font was set when actually it wasn't because of a previous error.

Thank you for tracking this down, @mapreal19.
One can argue with the way gofpdf handles errors, but given the large number of steps that go into creating a document, embedding the error (one of the patterns shown in Errors are values) relieves the programmer of checking for an error condition at every turn. Rather than introduce panics into the codebase, I'd like to pinpoint where the embedded error scheme failed in this case. Somewhere I think the internal error value got overwritten or a method failed to execute a quick return on an error condition. In this case, the final error check when OutputFileAndClose() or friend  is called should have clearly indicated that it was an image rendering error.

@mapreal19, can you identify the minimal number of steps needed to reproduce the problem? Will an attempt to load a non-existent image followed by a call to SetFont() result in the crash? I will step through with Delve to see where the error handling is going astray.

Just calling this I think would do (let me know if you're able to reproduce):
// set imgPath to a non-existing path
pdf.ImageOptions(imgPath, margin, margin, imgSz, imgSz, false, opt, 0, "")
pdf.SetFont(titleFont, "B", titleSz)

I suspect the error is being set here: https://github.com/jung-kurt/gofpdf/blob/master/fpdf.go#L3090
And yeah thanks for the explanation, panic there wasn't a great idea given the way you handle errors. It was meant for a quick patch. Hope you guys can find were that overwrite is being done.

Thanks, @mapreal19 -- this is helpful.

I am not able to reproduce the problem with the following snippet. However, I am not able to test it on openshift or heroku where the problems have been reported.
package main

import (
  "fmt"
  "os"

  "github.com/jung-kurt/gofpdf/v2"
)

func main() {
  var pdf = gofpdf.New("P", "pt", "A4", "")
  pdf.AddPage()
  pdf.ImageOptions("foo.jpg", 10, 10, 100, 100, false, gofpdf.ImageOptions{}, 0, "")
  pdf.SetFont("helvetica", "", 14)
  err := pdf.OutputFileAndClose("foo.pdf")
  if err != nil {
    fmt.Fprintf(os.Stderr, "%s\n", err)
  }
}

Locally, this results in the expected error open foo.jpg: no such file or directory. I do recall some error handling changes were made to some font logic. Can anyone experiencing this problem verify that an up-to-date version of the package is being used?

Hmm I think I missed this line after pdf.SetFont:
pdf.MultiCell(0, 10, "some-text", "", "", false)

@jung-kurt the helveiticab.json files are the same locally and remotely.

Hi @jung-kurt , the code is failing when pdf.multicell is called,

@mapreal19 we are experiencing the exact same issue when using multicell, and its failing on fpdf.go at that same line 2578. what is most strange is that its working fine locally, what would be different after deploying the code?

@mthizozo maybe there is a hidden error like in my case? are you using images?
This commit may be helpful for you: https://github.com/mapreal19/gofpdf/commit/83db124beba3a79b5812070468cce87bfc81c05d
What I did is forking the project and added a bunch of logs until I discovered what was going on

3aaf0b1a66c0ab02d925917376898a5856061d59 (and f58a9cb00082f4f0ee8b2e5c64a6455de46bd659 for version 2) fixes the particular problem with MultiCell() but I think there may be a larger problem here. I'd like to identify why cloud-based builds fail when local ones do not.

In my case it was because the image path was hardcoded in local, hence it didn't work in heroku so not a problem with gofpdf. Not sure about the Openshift case

Let's reopen this if it is still a problem with some environments.

On windows 10 pro, it works fine; howerver on linux, it does not.
Error
panic: runtime error: index out of range

goroutine 1 [running]:
github.com/jung-kurt/gofpdf.(*Fpdf).SplitLines(0xc00020c000, 0xc0001dd7d0, 0x10, 0x20, 0x4055800000000000, 0x20, 0x40, 0x0)
        /gohome/pkg/mod/github.com/jung-kurt/gofpdf@v1.12.6/fpdf.go:2519 +0x4d4
mysite.com/my_project/smartfactory-server/report.DrawColumnTable(0xc00020c000, 0xc000192960, 0x3, 0x3)
        /gohome/src/mysite.com/my_project/smartfactory-server/report/table.go:133 +0x64a
mysite.com/my_project/smartfactory-server/report.(*Report).writeReportCover(0xc00020a000, 0x0, 0x0)
        /gohome/src/mysite.com/my_project/smartfactory-server/report/report.go:252 +0xca2
mysite.com/my_project/smartfactory-server/report.(*Report).Start(0xc00020a000, 0x7ffd9b71a779, 0x8)
        /gohome/src/mysite.com/my_project/smartfactory-server/report/report.go:188 +0x482
mysite.com/my_project/smartfactory-server/report.(*Server).Start(0xc000173260, 0x9a3822, 0x6)
        /gohome/src/mysite.com/my_project/smartfactory-server/report/server.go:116 +0x107
github.com/devplayg/hippo.(*Engine).Start(0xc000192690, 0x0, 0x0)
        /gohome/pkg/mod/github.com/devplayg/hippo@v0.0.0-20190916124707-bb4b6afa7a8d/engine.go:39 +0x40
main.main()
        /gohome/src/mysite.com/my_project/smartfactory-server/cmd/report/report.go:46 +0x1ea

Code: "DrawColumnTable" function
func DrawTable(pdf *gofpdf.Fpdf, data [][]string) {
    resetTable(pdf)

    colCount := len(data[0])
    colWidth := float64(PDF_WIDTH / colCount)
    const (
        marginLeft = 15.0
        lineHeight = 4.5
        cellGap    = 2.0
    )
    type cellType struct {
        str  string
        list [][]byte
        ht   float64
    }
    var (
        cell cellType
    )

    pdf.Ln(-1)

    startRowNum := 0
    header := data[0]
    // Headers
    pdf.SetX(marginLeft)
    pdf.SetTextColor(24, 24, 24)
    pdf.SetFillColor(230, 230, 230)
    for colJ := 0; colJ < colCount; colJ++ {
        pdf.CellFormat(colWidth, 8, header[colJ], "1", 0, "CM", true, 0, "")
    }
    pdf.Ln(-1)
    pdf.SetTextColor(24, 24, 24)
    pdf.SetFillColor(255, 255, 255)

    startRowNum = 1

    // Rows
    y := pdf.GetY()
    for row := startRowNum; row < len(data); row++ {
        maxHt := lineHeight
        // Cell height calculation loop
        cellList := make([]cellType, 0)
        for col := 0; col < colCount; col++ {

            cell.str = data[row][col]
            cell.list = pdf.SplitLines([]byte(cell.str), colWidth-cellGap-cellGap)
            cell.ht = float64(len(cell.list)) * lineHeight
            if cell.ht > maxHt {
                maxHt = cell.ht
            }
            cellList = append(cellList, cell)
        }
        // Cell render loop
        x := marginLeft
        for colJ := 0; colJ < colCount; colJ++ {
            pdf.Rect(x, y, colWidth, maxHt+cellGap+cellGap, "D")
            cell = cellList[colJ]
            cellY := y + cellGap + (maxHt-cell.ht)/2
            for splitJ := 0; splitJ < len(cell.list); splitJ++ {
                pdf.SetXY(x+cellGap, cellY)
                pdf.CellFormat(colWidth-cellGap-cellGap, lineHeight, string(cell.list[splitJ]), "", 0, "L", false, 0, "")
                cellY += lineHeight
            }
            x += colWidth
        }
        y += maxHt + cellGap + cellGap
    }

    pdf.Ln(-1)
}

Input data of [][]string
([][]string) (len=3 cap=3) {
 ([]string) (len=2 cap=2) {
  (string) (len=16) "보고서 이름",
  (string) (len=16) "기간 보고서"
 },
 ([]string) (len=2 cap=2) {
  (string) (len=13) "대상 기간",
  (string) (len=23) "2019-10-04 ~ 2019-10-04"
 },
 ([]string) (len=2 cap=2) {
  (string) (len=13) "작성 시간",
  (string) (len=25) "2019-10-07T10:15:40+09:00"
 }
}

PDF
func CreatePdf(fontDir string) *gofpdf.Fpdf {
	var fontMap = map[string]string{
		HangulFont:     "NanumGothic.ttf",
		HangulBoldFont: "NanumGothicBold.ttf",
	}

	pdf := gofpdf.New("P", "mm", "A4", fontDir)

	pdf.AddUTF8Font(HangulFont, "", fontMap[HangulFont])
	pdf.AddUTF8Font(HangulBoldFont, "B", fontMap[HangulBoldFont])
	pdf.AddUTF8Font(HangulFont, "I", fontMap[HangulFont])
	pdf.AddUTF8Font(HangulBoldFont, "BI", fontMap[HangulBoldFont])

	pdf.SetTopMargin(30)
	pdf.SetHeaderFuncMode(func() {
		pdf.Image("img/logo_dsme.png", 10, 6, 30, 0, false, "", 0, "")
		pdf.SetY(5)
		//pdf.SetFont(HangulFont, "", 15)
		pdf.SetFont(HangulFont, "", 10)
		pdf.Cell(80, 0, "")
		pdf.CellFormat(30, 9, "SMART FACTORY REPORT", "0", 0, "C", false, 0, "")
		pdf.Ln(20)
	}, true)
	pdf.SetFooterFunc(func() {
		pdf.SetY(-15)
		pdf.SetFont(HangulFont, "I", 8)
		pdf.CellFormat(0, 10, fmt.Sprintf("Page %d/{nb}", pdf.PageNo()),
			"", 0, "C", false, 0, "")
	})
	pdf.AliasNbPages("")

	pdf.SetFont(HangulFont, "", 16)
	return pdf
}

Just hit this in my environment:
goroutine 720 [running]:
net/http.(*conn).serve.func1(0xc0003426e0)
	C:/Go/src/net/http/server.go:1746 +0xd7
panic(0x861700, 0xc4f5c0)
	C:/Go/src/runtime/panic.go:513 +0x1c7
github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf.(*utf8FontFile).getSymbols(0xc0003c02a0, 0xadc2, 0xc00038ca10, 0xc0012f8c90, 0xc0012f87e0, 0xc000487400, 0x3b, 0x80, 0xc00047a3c0, 0x0, ...)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf/utf8fontfile.go:793 +0x535
github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf.(*utf8FontFile).getSymbols(0xc0003c02a0, 0x13, 0xc00038ca10, 0xc0012f8c90, 0xc0012f87e0, 0xc00047a3c0, 0x3a, 0x3a, 0xc00038ca10, 0xc0012f8c90, ...)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf/utf8fontfile.go:814 +0x2b2
github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf.(*utf8FontFile).parseSymbols(0xc0003c02a0, 0xc0012f8d20, 0x37, 0xc0012f8780, 0x3ff0000000000000, 0x0, 0x44, 0x4)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf/utf8fontfile.go:563 +0x56b
github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf.(*utf8FontFile).GenerateСutFont(0xc0003c02a0, 0xc0012f8d20, 0x0, 0xc00041c620, 0xe)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf/utf8fontfile.go:672 +0x432
github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf.(*Fpdf).putfonts(0xc00050e000)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf/fpdf.go:4031 +0xb55
github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf.(*Fpdf).putresources(0xc00050e000)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf/fpdf.go:4506 +0x99
github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf.(*Fpdf).enddoc(0xc00050e000)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf/fpdf.go:4693 +0x77
github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf.(*Fpdf).Close(0xc00050e000)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf/fpdf.go:688 +0x9b
github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf.(*Fpdf).Output(0xc00050e000, 0x98ce00, 0xc000164770, 0x0, 0xc00050e800)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/vendor/github.com/jung-kurt/gofpdf/fpdf.go:3414 +0xde
github.com/kent-h/nextslope-backend/report/pdf.(*reportGenerator).Complete(0xc0003041e0, 0xc00041c2e0, 0xc, 0xc00041c2f0)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/report/pdf/generate.go:145 +0x64
github.com/kent-h/nextslope-backend/report.Generate(0xc000306b80, 0x6, 0x66, 0x8, 0x0, 0x0, 0x1, 0x1, 0x8, 0x0, ...)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/report/report.go:131 +0x11d9
github.com/kent-h/nextslope-backend/server.postMaintenanceSignOff(0x991280, 0xc0001760e0, 0xc0003b1000)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/server/maintenance_record.go:257 +0x464
net/http.HandlerFunc.ServeHTTP(0x90aee0, 0x991280, 0xc0001760e0, 0xc0003b1000)
	C:/Go/src/net/http/server.go:1964 +0x4b
github.com/kent-h/nextslope-backend/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc0000f8cc0, 0x991280, 0xc0001760e0, 0xc0003b1000)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/vendor/github.com/gorilla/mux/mux.go:133 +0xf8
net/http.StripPrefix.func1(0x991280, 0xc0001760e0, 0xc0003b0d00)
	C:/Go/src/net/http/server.go:2003 +0x192
net/http.HandlerFunc.ServeHTTP(0xc00036bbf0, 0x991280, 0xc0001760e0, 0xc0003b0d00)
	C:/Go/src/net/http/server.go:1964 +0x4b
github.com/kent-h/nextslope-backend/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc00037b020, 0x991280, 0xc0001760e0, 0xc0003b0d00)
	E:/Kent/git/go/src/github.com/kent-h/nextslope-backend/vendor/github.com/gorilla/mux/mux.go:133 +0xf8
net/http.serverHandler.ServeHTTP(0xc000196a90, 0x991280, 0xc0001760e0, 0xc0003b0b00)
	C:/Go/src/net/http/server.go:2741 +0xb2
net/http.(*conn).serve(0xc0003426e0, 0x991540, 0xc000069d80)
	C:/Go/src/net/http/server.go:1847 +0x64d
created by net/http.(*Server).Serve
	C:/Go/src/net/http/server.go:2851 +0x2fc```

The strange part is that it seems to run perfectly fine exactly once when the process is started, but fails on every subsequent attempt.

@Kent-H -- This seems to be related to #315. A hacky workaround has been merged that makes a copy of in-memory fonts. I don't see any version information in the panic report but if your version predates eeeab0b32e45c4544d2fe95ad76c07a1bf695aa2 from four days ago you may want to update the gofpdf package(go get -u github.com/jung-kurt/gofpdf). Can you do this and report back?

Updating appears to have fixed my issue, thank you!

Thanks for the report, @Kent-H.


ImportError：libGL.so.1:cannot open shared object file:Too many levels of symbolic links

Hi,siavashMT
i was trying to run your software.but there was this error,and i tried to change the symbolic links but it was unluck.
thank you so much

can you provide the stack trace of the error. Also where able to compile the code without any issue?


API schema generation is not stable between dev enviroments

With the recent problems, I discovered that the API schema generation is highly unstable between dev and CI environments.
Main problems:

plugin URLs are included by default
the local currency config influences descriptions/enums
server endpoints changes

I think at least 1 and 2 should be changed by default to make comparisons simpler
Originally posted by @matmair in https://github.com/inventree/InvenTree/issues/6836#issuecomment-2023123850

Thoughts @SchrodingersGat

Plugins
Plugin URLs should be disabled by default. Maybe we can add a flag to the invoke task to include these? But (at least for the public schema) these should be excluded.
Currency
Would you be opposed to moving currency support out of the "sysadmin setup" - and into the database backed settings? I would like to allow this to be adjusted "at run time" anyway, so maybe this would also solve this issue.
Server Host
Can we maybe add an option to the schema generation task to pass a URL? That way we can hard-code it for the public schema generation

This all sounds reasonable. This has no urgency, I will tackle it once the 0.15.x roadmap is done from my side. Maybe this is someone else wants to tackle (partly) in the meantime

@SchrodingersGat what default currencies do we want to have included in the schema? The current default is below; we could cut it to 3 or 4 (for example AUD, CNY, EUR, USD) IMO. What is your view on this? I already have to touch the code anyway to make it stable.
            * `AUD` - Australian Dollar
            * `CAD` - Canadian Dollar
            * `CNY` - Chinese Yuan
            * `EUR` - Euro
            * `GBP` - British Pound
            * `JPY` - Japanese Yen
            * `NZD` - New Zealand Dollar
            * `USD` - US Dollar

I'm happy to reduce the "default" config setting, (AUD/CNY/EUR/USD) makes sense


Add files via upload

@N0va1992 First stage of verification passed, official domain is al.edu.pl as far as I verified. This is just an informational note. Pull request is still in the review. I appreciate your patience while waiting for the final decision.

@N0va1992 Thank you for your patience while waiting for a review and processing your request. Pull request merged.


Update CpuLimit.cpp

Don't leak opened handles

The multiple appearance of ::CloseHandle, with several repeats is not elegant...
Since this process exits anyway, closing the handles is not required.

Elegant is not, I agree. RAII can be used.
I agree also with the second sentence, the handles are closed upon exit.


No users

it connects, but there are no users with whom i can trade the marbles.

next time this happens check your node.js console/terminal logs.  its pretty talkative. you should see errors of some sort.
since those are long gone, click the setup button, then go to the Register Marble Owners section.  click the Register button to make new users.  if something is wrong, you may see errors again in the console.


Add: Mission Erweckung der Welt

Channel Name
Mission Erweckung der Welt
Alternative Names (optional)
No response
Network (optional)
No response
Owners (optional)
No response
Country
DE
Subdivision (optional)
No response
City (optional)
Offenbach am Main
Broadcast Area
c/DE;c/UA
Languages
deu;ukr
Categories (optional)
religious
NSFW
FALSE
Launched (optional)
No response
Closed (optional)
No response
Replaced By (optional)
No response
Website (optional)
https://revival-mission.de/
Logo
https://www.lyngsat.com/logo/tv/mm/mission-erweckung-der-welt-de-ua.png
Notes
No response

Do they have any web stream?

The only stream that was in there is a YouTube stream hosted by her wife.

According to LyngSat they do have a live stream: handle this one as you wish.

Found it : https://www.youtube.com/watch?v=rTzHcIZVzMU

Thanks


Improve Domain Loading

What problem are you trying to solve?
This issue comes out of an initial bug reported by @raoulvm , where use_entities was not being set correctly when domain config is split over several domain .yml files.
Investigating this bug led to the realisation of a problem with the current Domain loading implementation in the case of multiple domain files.
Currently, with a split domain, the Domain object is constructed iteratively: with separate Domains  are created from each domain file and merged together sequentially.  As a step in creating a Domain includes linking the intents in a file with the entities they will use:  either True (to use all entities in the entire domain), use_entities (to use specific entities, when these entitites are less than half of all entities), or ignore_entities (when these entities are less than half of all entities), a problem arises when entities are configured in different domain files.  Each file does not know about entities in other files, and consequently, as each Domain object is created and merged sequentially, the method to link entities to intents, _transform_intents_for_file, can make mistakes.
What's your suggested solution?
@raoulvm proposed a solution which has been implemented in this PR, but it duplicates code somewhat in a process that couples validation with attribute setting.
I explored the possibility of decoupling the load process by first validating and merging all domain yml files recursively into a single defaultdict(list). Locally I used split domains from a couple of customers to create single dict objects that appeared legit (see below for links to the output).
Passing this dict to the from_dict method, created correct entity/intent association in the Domain, but broke other steps. A PR reflecting these changes, and the breakages, can be found here.
Examples (if relevant)
Example Merged Domain 1
Example Merged Domain 2
(these docs are only visible to Rasa team members)
Definition of Done
This issue was identified using rasa 2.8.x and that's the version I've been debugging against.
I would confine any changes to 2.8.x for this issue, then create another for porting the changes to 3.0.x

[ ]  a set of tests that include complex split domain examples (possibly using sanitised customer implementations) as well as invalid domains to test validation errors.

UPDATE: This work became somewhat of a rabbit-hole that looked like it would require making a lot of changes to the logic. Since most of the team are away on vacation, it seemed wiser to park this for now and instead focus on the specfic bug that prompted this issue: #10137
Moving forward, and possibly as part of the Declarative Project Structure work, it would still be useful to improve how we load the Domain.
Some questions that arose while doing the work here:

Currently domain loading supports domain files where directories are nested (i.e. directories within directories). My proposed solution (to merge all .yml domain files into a single defaultdict(list)) was only able to handle files within the same directory. Should we establish some clear rules about how many levels of domain directories we will support?
We need to properly document the redundancy of configuring both use-entities and ignore_entities on the same intent.
The proposed solution ran into issues where the a dict was expected, but a list was received. This is due to merging the .yml files into a defaultdict(list). So any logic change that adopts the approach of this solution needs to be aware of this.
We should also define and document best practices around configuring a domain with multiple files. E.g. avoiding duplication across files, how to best separate concerns, when (and if) to use a common.yml file.

Hi @carlad - I see you are peeking out of the rabbit hole you went into...
I would add to your list:

define which keys are allowed to occur in multiple files. "config" and other "one shot" keys shouldn't be distributed.
Restrict that to intents, entities, responses (if not located in data!) and slots (more?)
raise if elements from those keys are duplicated. Force customers to clean up! No more "overwriting" of data already read. The order of file reads must not affect the outcome.

Happy holidays! 🎄

Thanks for those additions @raoulvm. I am indeed out of the rabbit hole 😉
Happy holidays to you too! 🎄 ❄ 🌟


test/recipes/80-test_ssl_old.t: use 'openssl genpkey'

We used 'openssl gendsa', but that one has aged in favor of 'openssl genpkey'

I thought Emelia's intent was that this test suite goes away once "test_ssl" was done.

Yeah well, we haven't done that yet. Meanwhile, this script risks failure any time we don't build openssl dsa, which could become a reality within not too long

This change is already part of #10977

This change is already part of #10977

... and that's been merged.  Cool, then I'm killing this.


build(image): always update system packages

Which issue(s) this PR fixes:

Issue longhorn/longhorn#8722, longhorn/longhorn#8721
What this PR does / why we need it:
Refresh and update release image system packages.
Special notes for your reviewer:

TODO: backport to master and v1.7.x.

Additional documentation or context
None

@mergify backport master v1.7.x


[Catalog] Design: Istio+SPIRE

Current Behavior
Istio+SPIRE is a deployment configuration supported by recent incorporation of this support in Istio. Meshery can configure this type of Istio deployment.
Desired Behavior
Make it easy for users to deploy this model configuration with a pre-defined design pattern.
Implementation

Using this helm chart create a reusable Meshery design for deployment of this specific Istio+SPIRE configuration.
Create an entry in the service mesh catalog.

Acceptance Tests

A functional design should be created.
The design should be publicly available in meshery.io/catalog.

Contributor Guides and Resources

🛠 Meshery Build & Release Strategy
📚 Instructions for contributing to documentation

Meshery documentation site and source

🎨 Wireframes and designs for Meshery UI in Figma
🙋🏾🙋🏼 Questions: Layer5 Discussion Forum and Layer5 Community Slack

// @mchurichi

Let’s see about posting a combined Istio+SPIRE

Right. There is no need for a capability to be added to the capabilities.json. Ultimately, clone/fork will be a capability available in both Local Provider and Remote Provider.

Right. There is no need for a capability to be added to the capabilities.json. Ultimately, clone/fork will be a capability available in both Local Provider and Remote Provider. Inspired the fact that the catalog is listed as an extension in the UI, it really won’t be considered an “extension point” in the same vein as the rest.

@acald-creator, let’s put together a list of content items that we intend to see created in the near-term. Descriptions for each of the wasm filters (~5) is one such item.

@gr455


Update pypi version

Could you please push an updated version (which also includes #8) to PyPi? Just having installed the latest version doesn't feature the rewrite options, thanks!
>>> settings.
settings.blockpage(       settings.delete(          settings.logclientips(    settings.mro(             settings.setup(
settings.clearlogs(       settings.listsettings(    settings.logdomains(      settings.rename(          settings.updatelinkedip(

Sure, at the airport right now, will @ mention you when I push to pypi.

@rhijjawi any chance you could push to pypi? thanks!

@jmelett Mind helping with that? I seem to have forgotten how to upload to pypi.

@rhijjawi  There are multiple ways for publishing packages to PyPi, all of them require you to authenticate with your PyPi account and publish the repository.
Real Python has a great guide on publishing packages in multiple ways.
https://realpython.com/pypi-publish-python-package/

@MadhavVij, @jmelett, @shadow1runner and others. Glad to let you release 1.8.0 is now on PyPI.


Extend "Security Insights" plugin with "Secret scanning" info

GH security provides "Secret scanning" information (attached a screenshot). It would be nice to display the info as a separate tab or (even better) as a table in "Security insights" tab alongside with code scanning table.

Feature Suggestion

Display secret scanning results from GH "Security" in the existing "Security insights" tab as a separate table.
Possible Implementation

Separate table within the "Security insights" tab.
Separate tab with Secret Scanning results.

I think the Secret Scanning results table could be a separate component to let devs reuse it in other tabs.
Context

Our team would like to quickly access secret scanning results.

I can contribute too.


Reagents bank toggle

This is the same PR as my previous PR , just from a dedicated branch now.
I have implemented a reagents bank toggle for the Bagnon bank menu, as described in my feature request from last week (https://github.com/tullamods/Bagnon/issues/795). This required modifications in Bagnon, Wildpants, Bagnon_Config and Wildpants_Config. (See my other pull requests.)

I moved this feature to a stand alone Bagnon plugin:
https://github.com/LudiusMaximus/Bagnon_ReagentBankButton


Use http.NoBody explicitly

Description
Use http.NoBody explicitly
Type of change

Refactor (refactoring code, removing useless files)

Testing steps
N/A
Checklist

[ ] make before_commit passes
[ ] updated documentation wherever necessary
[ ] added or modified tests if necessary
[ ] updated schemas and validators in insights-data-schemas in case of input/output change

Codecov Report

Merging #321 (b82e314) into master (6ad4483) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #321   +/-   ##
=======================================
  Coverage   72.58%   72.58%
=======================================
  Files          11       11
  Lines         580      580
=======================================
  Hits          421      421
  Misses        134      134
  Partials       25       25

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 6ad4483...b82e314. Read the comment docs.


lsd: init at 0.13.0

Motivation for this change
Add lsd https://github.com/Peltoche/lsd
Things done

[X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[X] NixOS
[X] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[X] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[X] Fits CONTRIBUTING.md.

Thanks for your review!

However they didn't work with zsh or fish.

I used the completions paths which are commonly used in other nix expressions:
https://github.com/nixos/nixpkgs/blob/c08f80839fc2dda8bfde1f4fd08b08d0403ae487/pkgs/applications/misc/ddgr/default.nix#L21-L24
https://github.com/nixos/nixpkgs/blob/c08f80839fc2dda8bfde1f4fd08b08d0403ae487/pkgs/tools/misc/fd/default.nix#L21-L24
I personally use bash, but I've tested on zsh and seems to be working

I just failed to build this on macOS.
> nix build -f . lsd
builder for '/nix/store/47k8sc0hlqgp7pj00rwwdcaxx8gj9qkb-lsd-0.13.0.drv' failed with exit code 101; last 10 log lines:
  thread 'meta::filetype::test::test_socket_type' panicked at 'failed to create the socket: Custom { kind: InvalidInput, error: StringError("path must be shorter than SUN_LEN") }', src/libcore/result.rs:1009:5
  note: Run with `RUST_BACKTRACE=1` for a backtrace.

  failures:
      meta::filetype::test::test_socket_type

  test result: FAILED. 50 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

  error: test failed, to rerun pass '--bin lsd'

I don't have sandbox enabled in my nix.conf. Is there any chance that sandbox builds with a shorter TMPDIR than the default?

env TMPDIR=/tmp nix build -f . lsd succeeded. Seems rather problematic if this can't be built with the default TMPDIR though.

That is odd, I'm building it on darwin 10.12 without any issue.
$ nix-build -A lsd
/nix/store/hdmzw3rh86vdsldz44k0k8c5x3vdljbv-lsd-0.13.0

maybe nix-daemon is running with sandbox=true, can you try restarting nix-daemon?

I've got a single-user install so no nix-daemon. This is also why I'm not using sandbox (as the docs says that requires sudo, which I'd prefer not to use).

The simplest solution here might just be to disable tests on this package. I notice the exa package is already doing that:
  # Some tests fail, but Travis ensures a proper build
  doCheck = false;


Add Sanity to CMS section

Thanks for this excellent guide!
In my humble opinion, Sanity should be added to this list.

Sure thing, let me know when conflict's fixed and I'll merge 👌

Thanks, and done!

Done! 😄 Thanks.


cog predict does not download a file when I return its Path specifying its extension

cog predict does not download a file if I explicitly write the extension in the name of the output Path (I am under Mac OS).
Example:
    Inside predict function:
    output_path = Path(tempfile.mkdtemp()) / "output.txt"
    with open(str(output_path), "w") as f:
        f.write("hello")
    return output_path

This only prints the file's content on the terminal and does not download it.
But if I remove the ".txt" from the filename the download works, but the file is a .bin and it does not contain the text.

Ah thank you -- yes Cog does some fuzzy matching to try and figure out what file types. We've been thinking about how to have a more robust type system: #205
In this case, one way to get this as a file would be to use the -o option, or to pipe to a file. For example:
cog predict -i ... -o output.txt
cog predict -i ... > output.txt

@allcontributors please add @ericguizzo for bugs 🪲


Regex === and non-encoding friendly options/match specs

Opal is treating // as if it was created with Regexp.allocate, so add a non encoding based options test of // that it can execute and also test that match fails the same way options does

Looks good, merged! (I'll perform the small fix)

Thanks for the new specs!


Replace Azure App Settings with platform independent secrets solution

Implemented docker and passed secrets via Azure App Settings.


--server-only build

On meteor 1.3 adding --server-only in the build command will skip building native ios/android apps but will deploy web.cordova directory, enabling hot code push for cordova.
MDG info related
https://forums.meteor.com/t/mupx-cordova-build/20745/7
https://forums.meteor.com/t/mupx-cordova-build/20745/2
Issue related
https://github.com/arunoda/meteor-up/issues/697
https://github.com/arunoda/meteor-up/issues/742
https://github.com/arunoda/meteor-up/issues/764
https://github.com/arunoda/meteor-up/issues/981
https://github.com/arunoda/meteor-up/issues/1005

@mnmtanish Should we change our build options format to something like this? so the users can define their own build options easily?
buildOptions: [
    "--server-only",
    "--mobile-settings='<mobile settings>' ",
    "--debug"
]

I'll merge this for now. But we have to implement a more robust way of passing options to meteor binary.

Hey, so would this be used in mup.js like this?
module.exports = {
  servers: {
    one: { /*...*/ }
  },

  meteor: {
    name: 'app',
    path: '../app',
    servers: { /*...*/  },
    env: { /*...*/  },
    dockerImage: 'madushan1000/meteord-test', //optional
    deployCheckWaitTime: 60, //default 10
    buildOptions: [
        "--server-only",
        "--mobile-settings='<mobile settings>' ",
        "--debug"
    ]
  },
};

I haven't used this version of mupx.  Is it ready or do yall feel it needs more time?
Thanks!
Mike

What is the use case for not including "--server-only" in the options?
This seems like something that should always happen, or at least be the default.

Older meteor versions didn't have a --server-only option. Using it by default can be problematic.


More proofs about hlevels.

Apparently RedPRL is much nicer than it was when @mortberg was working on these proofs last, so we were able to delete some cruft. This PR is a place for Anders to continue proving basic facts about hlevels.
It's sensible to merge this already, but let's leave it up to @mortberg: add as many commits as you'd like, and ask one of us for a review when you're done!

I had to update this PR to account for the Great Syntax Shift. I think we should go ahead and merge it before it becomes stale again, and then just open a new PR if we want to work further on this file.


Consider adding more lint checks to the default config

What
It would be great to add the generic-link-text markdown-lint rule. However, the name of this GitHub action would no longer apply if we added rules that do not pertain to alt text. Consider renaming this action and adding more rules.

What if we get even more generic and make a generalized linter for GitHub? Discussions, Issues, comments, PRs, Wiki pages, etc? 😎


Add new attribute

How I can add a new attribute to model class

You can import directly, and then press the shortcut command+ J to automatically generate a helper class


Include the bridged actions stub in all-clusters-app on all platforms.

Otherwise these attributes are broken on non-Linux/Darwin.
Problem
Bridged actions stubs are only built for all-clusters app on some platforms.
Change overview
Build them for all-clusters app on all platforms.
Testing
Verified manually that the cluster init callback is now implemented on all platforms.

/rebase


Update print.js

Commenting this istruction, it's possible to use a new theme cloned from 'theme-grid'

I have added this fix now.


Allow Timeouts of 0

Closes #1960 .
It also addresses the timeout in Puppeteer.launch(), as per the docs:

timeout  Maximum time in milliseconds to wait for the browser instance to start.
Defaults to 30000 (30 seconds). Pass 0 to disable timeout.

Seems like AppVeyor is not playing nice with the should work with a rotated element unit test.
I've increased the test limit, but the problem remains, and it's not related to this PR: #1954 also fails.


Implemented Open Type for all types in the Bazel Workspace

Creates a synthetic classpath node in the Bazel Workspace project that contains all the jars found in the bazel-bin directory. This allows you to find types using the Open Type dialog even if the type is not on the classpath of any imported package. This helps when working with large repos and you only import a small portion of them.
I did this as a hackathon project inside Salesforce so it is not finished. I will create a follow up issue with everything needed to make this nicer.

Issue #161 is the follow up work to this PR.


Twig variables 'pages' contains root page, but not the pages object

I recently stumbled across the following issue while tweaking the theme navigation bar and its footer:
{{ pages.all|gettype }}

Returns NULL
It turns out, that pages is not the Pages Object but rather the root of the pages: $pages->root().
The documentation however states:

The pages object represents a nested tree of every page object that Grav knows about.

It also links to the pages API, not the page API.
Now to solve the issue, we can go two ways:

Fix the documentation
Fix the code to point to the pages object instead of the root page

The code was added in 2014, so it's been there for quite a long time. The Quark theme for example uses pages.children.visible which will fail, if we use the pages object, as it required an additional parameter. I guess it would make most sense to fix the documentation? It could make sense to fix this in grav 1.7 as a breaking change.

Documentation suggestion: https://github.com/getgrav/grav-learn/pull/847

I agree that we shouldn't make the change, but rather fix the documentation.


sort by channel not used to visualize?

I have a dataset sorted by a column, lets say rate. I then create a stacked bar chart using a different column, lets say value.
I want a stacked bar chart on value but sorted by rate. Even though my data is already sorted by rate, when i do the following it orders the y domain alphabetically:
Plot.barX(data, { x: "value", y: "name", fill: "type" })

if I try to use sort: { y: "x", reverse: true, limit: 20 } I can't figure out how to get it to sort by my rate column instead.
I'm able to do a work around by explicitly setting the y domain to the sorted order of names I want, but it feels like i might be missing something?

Can you share a notebook? When you use sort: { y: "x", reverse: true, limit: 20 } inside a mark's options, the "x" part must refer to an existing channel (& you can also specify a reducer).
So one example might be to use:
Plot.barX(data, {
  x: "value",
  y: "name",
  fill: "type",
  stroke: "rate",
  sort: { y: "stroke", reduce: "median", reverse: true, limit: 20 }
})

but it implies you then have this stroke channel that you probably didn't want initially. Of course it's possible to use a channel with an invisible consequence (e.g. use "strokeOpacity", since there is no stroke), but it feels a bit like cheating.

I ran into this the other day but I forget the context now. It would be nice if there were some syntax to materialize a column in the sort options for when you don’t have an appropriate existing channel. Maybe something like sort: {y: {value: "rate"}}?

There is possible!
sort: (a) => a.rate
I found this in https://observablehq.com/@observablehq/sort-dots-with-plot.

Maybe we could check the optional (explicit) channels used for the tip mark?

@Fil It should already work if you use the channels option to declare an additional channel.

yes, this works: https://observablehq.com/d/c4d7fa2856198eea
Plot.plot({
  marks: [
    Plot.barX(clean_monthly_april, {
      y: 'title',
      x: 'activations',
      channels: {difference: {value: 'difference'}},
      sort: {y: 'difference'}
    })
  ]
})

meaning we can close this issue!?

Since 0.6.7 you can shorten slightly too:
Plot.plot({
  marks: [
    Plot.barX(clean_monthly_april, {
      y: 'title',
      x: 'activations',
      fill: 'difference',
      channels: {difference: 'difference'},
      sort: {y: 'difference'}
    })
  ]
})

We could potentially allow this shorthand in the future
Plot.plot({
  marks: [
    Plot.barX(clean_monthly_april, {
      y: 'title',
      x: 'activations',
      sort: {y: 'difference'}
    })
  ]
})

where we materialize the difference channel implicitly if it doesn’t already exist using the difference field. But, that introduces some ambiguity because it puts channel names and channel values in the same namespace. So, probably better to declare the channel explicitly as above.

More discussion: https://talk.observablehq.com/t/observable-plot-cell-how-to-order-y-axis-by-a-specific-field/8120/6
I think we should probably allow field names to be specified, with channel names taking priority — assuming that it’s possible for us to inspect whether a channel with the given name exists at runtime. (I think it should be possible?) And then we’ll need to introduce some disambiguation syntax. For channels, probably:
sort: {y: {channel: "x", order: "descending"}}

For fields, probably:
sort: {y: {value: "latitude", order: "descending"}}

Unfortunately the latter is already supported for referencing channel names. So we’ll probably need to continue to allow that, but we could issue a warning saying that it’s deprecated and may be removed in the future? This would mean you’d need to specify a function if the field name collides with a channel:
sort: {y: {value: (d) => d.x, order: "descending"}}


sphinx-proof trying to access parts of sphinx.ast that don't exist

Describe the problem
@AakashGfude I am trying to build: https://github.com/jstac/continuous_time_mcs and betting the following traceback.
Exception occurred:
  File "/Users/matthewmckay/anaconda3/lib/python3.8/site-packages/sphinx_proof/domain.py", line 106, in resolve_xref
    map(str, env.toc_fignumbers[todocname]["proof"][target])
KeyError: 'equivirr'

so it looks like sphinx-proof is trying to access parts of the sphinx.ast that don't exist.
Link to your repository or website
https://github.com/jstac/continuous_time_mcs
Steps to reproduce

Build project

The version of Python you're using
No response
Your operating system
No response
Versions of your packages
No response
Additional context
No response

Hey, @mmcky  I tried running this repository with sphinx-proof - v0.1.0. And could not replicate this issue.

ok thanks @AakashGfude I will try this again then.

I confirm this is now the case 👍


No such module 'Argo'

Xcode Version 11.3.1 (11C505) Swift 5.1
I followed the instructions to get started:
Run make bootstrap to install tools and dependencies.
Run make test-all to build and run tests on all platforms.
when I try to build scheme Kickstarter-IOS I get the error No such module 'Argo'
How do I resolve this?

Fixed by looking at a previous closed issue


data source "octopusdeploy_project": cannot get endpoint /api/projects?skip=120&take=30 from server

After downloading the plugin and putting it in my terraform directory. I used the main.tf from https://github.com/MattHodge/terraform-provider-octopusdeploy/issues/5 and I can run a terraform init but when I plan it gives me this issue.
$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.octopusdeploy_project.banana: Refreshing state...

Error: Error refreshing state: 1 error(s) occurred:

* data.octopusdeploy_project.banana: 1 error(s) occurred:

* data.octopusdeploy_project.banana: data.octopusdeploy_project.banana: error reading project name bananas: cannot get endpoint /api/projects?skip=120&take=30 from server. failure from http client json: cannot unmarshal string into Go struct field ActionTemplateParameter.DefaultValue of type map[string]octopusdeploy.PropertyValue

I hit the endpoint directly and it works.
$ curl -X GET 'https://octo.domain.com/api/projects?skip=120&take=30' -H "X-Octopus-ApiKey: $OCTOPUS_CLI_API_KEY"
{
  "ItemType": "Project",
  "TotalResults": 440,
  "ItemsPerPage": 30,
  "NumberOfPages": 15,
  "LastPageNumber": 14,
  "Items": [
    ...
  ]
}

Is this a bug?

Hi @nitrocode , do you have properties in this project with encrypted values?
I currently have an issue with this in the client API: https://github.com/MattHodge/go-octopusdeploy/issues/8

Hi @MattHodge. Nope, it's in clear unencrypted text. When I setup my go ide, I plan to step through this and update the ticket.

In the Octopus API, the DefaultValue is a PropertyValueResource. This resource is serialized differently depending on whether the value is sensitive or not.
If it is not sensitive, it is serialized as as string. Otherwise it is serialized as a SensitiveValue:
{
    "HasValue": true
    "NewValue": "Foo"
}

See https://github.com/OctopusDeploy/OctopusClients/blob/3ca4c11d6dadf4565ac0239b6730164c23054e77/source/Octopus.Client/Model/PropertyValueResource.cs#L48

This issue is now biting us in the butt at Stack Overflow. Going to comment on the issue here as this seems to be where most of the pertinent information lies.
Not sure if this project is still actively maintaned of if it's stalled?
Based on the code from @droyad above, the changing of the data type based on some other value screws with Golang's strongly typed data structures (and leads to issues like this). As such I think we will need to have a few new fields in the underlying object:
type ActionTemplateParameter struct {
	DefaultValueType   string
	DefaultValueRaw    interface{} `json:"DefaultValue,omitempty"`
	DefaultValueMap    map[string]PropertyValue
	DefaultValueString string
}

However this would be a breaking change, as DefaultValue is no longer present (replaced by DefaultValueMap). This would mean checking the value of DefaultValueType to see if it's map or string and then referencing the appropriate field.
The deserialisation would need an additional step to determine the type of DefaultValueRaw and copy the value into the field with the appropriate data type.
Thoughts?


Inconsistent use of dirname - hack | scripts

The release archive promote the use of ./scripts/drogue.sh in the generated assets ( install-*.zip ) while the source code contains ./hack/drogue.sh
This may lead to inconsistency in documentation.

Thanks for the feedback. I agree, this is inconsistent. And even though "the book" has a section about that, I made the same mistake in the book :grin:
I think the right approach here is to rename the folder in the repository into scripts. As having a hack folder in the installer archives seems odd as well.


Failed at the<EMAIL_ADDRESS>postinstall script. `GLIBC_2.14' not found

Version detials:
node v12.16.3
npm  v6.14.4
node-sass 4.12.0
Error starts with logged message:
Binary has a problem: Error: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by xyzPath/node_modules/node-sass/vendor/linux-x64-72/binding.node)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>postinstall script.

What operating system are you running node-sass on, please specify the exact version

This also happens for me on Ubuntu 18.04 using node 12.19.0 and npm 6.14.8

It worked well with node version: 10.23.0  👍  :)

i am facing same issue
Version detials:
node v15.5.1
npm 6.14.8
node-sass 4.12.0
Although , npm official says https://www.npmjs.com/package/node-sass
node 15+ works with node-sass 5.0+

i am facing same issue
Version detials:
node v15.5.1
npm 6.14.8
node-sass 4.12.0
Although , npm official says https://www.npmjs.com/package/node-sass
node 15+ works with node-sass 5.0+


FRONTEND WITH FRAMEWORK: VueJS-1.5 => Installing Vue-DevTools

Contributors are required to include a procedure to Install Vue-DevTools, which should cover questions like:-
What is Vue-DevTools?
Why it is needed?
How to install it?
How to open Vue-DevTools in the browser? (you can make GIF, which shows how to open this)
etc....
And also mention that we will learn, how to use it further in the upcoming topics.
Also, make sure -
Avoid copy/paste, We will be checking.
Changes should be made inside the Frontend_Web_Development_React_Angular_Vue/ dir inside Frontend_Web_Development_React_Angular_Vue branch.
The task will be assigned on first come first serve
Check out Contribution Guidelines
and Code Of Conduct

If you don't know this framework. Don't worry still, you can contribute.
Here I am attaching some references for you.
https://vuejs.org/v2/guide/
https://www.tutorialspoint.com/vuejs/vuejs_overview.htm
https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/Vue_getting_started
You can also study from any other source to learn.
Note -> These references contents are not to copy/paste. Avoid copy/paste, We will be checking.

Hey @SourabhSaraswat-191939 I would suggest you to add the required labels to this issue as it would help make a better clarity for individuals looking for a particular issue inside of a particular domain.

Hey @GyaniRoman23,
Actually, mentors do not have the right to add labels, milestones, and merging the PR. This thing will be done by supervisors.
When the supervisor sees issues. They add related labels and milestones.
Hope you understand.

Hey @GyaniRoman23,
Actually, mentors do not have the right to add labels, milestones, and merging the PR. This thing will be done by supervisors.
When the supervisor sees issues. They add related labels and milestones.
Hope you understand.

Oh!! I get it. Thank you for the information.

I want to work on it

Hey @GyaniRoman23,
Actually, mentors do not have the right to add labels, milestones, and merging the PR. This thing will be done by supervisors.
When the supervisor sees issues. They add related labels and milestones.
Hope you understand.

Oh!! I get it. Thank you for the information.

👍🏻

I want to work on it

@Saurabh-crypto16, Go for it.

I want to work on it

@Saurabh-crypto16, Go for it.

Assign me @SourabhSaraswat-191939

content added


ETA for stable 2.0

Are there any chance of getting a stable version of the 2.0 out?

Only @gsscoder has access to do that and he currently has other commitments to attend to. If you're concerned about crashing the latest master is stable, but unfortunately it's not available via NuGet.

It seems stable enough to me, I have been using it for more than 6 months now (the latest beta on nuget) , and it works just fine.  I am mostly concerned that it has a beta version number, and when it is marked as a dependency in another package that package also has to have a beta version number.  So it is mostly annoying, can work around it by not declaring it, but not so nice.  But guess we have to wait on @gsscoder .

@nemec do you know the current status on the stable? I have some time to spend on this project right now and I'm really keen to fix the remaining bugs that we would require for stable. But I dont know the roadmap. Even if @gsscoder is busy surely he can just put in a new nuget version if the source is in a good place.

You know, I'm not really sure. There is a 2.0 stable milestone, but comments within one of the issues indicate that it's postponed until post-2.0 release. TBH I'm happy to call it stable.

I'm running into the same issue as @OsirisTerje, I'd really like a stable release number to be able to use this project in other (non-beta) packages... @gsscoder any chance?

@gsscoder hasn't been active in a long time should someone maybe create a new nuget package of this?

@igloo15 @OsirisTerje Funny! I tried to make an unofficial released package called CommandLineParser.Unofficial, but when I tried to push it to nuget I found out someone already had exactly the same idea:  https://www.nuget.org/packages/CommandLineParser.Unofficial

I finally got access to the official repo and pushed a new prerelease package based on the latest master. #361 seems to be the only outstanding bug that should be resolved before we can release a stable 2.0.
https://www.nuget.org/packages/CommandLineParser/2.1.1-beta

Any update on when 2.0 will be released? The NuGet publish date on 1.9.71 of  Feb 27, 2013 probably makes a lot of people think this project is dead.
Also- could someone update the CodePlex site so that it says at the top in large print that development has moved to Github? I had no idea this repo existed without doing a lot of digging- CodePlex is still one of the top hits on Google.

I posted a comment on what appears to be the last remaining bug:
https://github.com/gsscoder/commandline/issues/361
I seems to be clear what's wrong, but I'm not sure if there is an easy fix.

Any chance to create a release package soon? Its been a year and looking at NuGet it seems a lot of people have just resolved to using the unofficial package by now.. Minor bugs can be fixed later as well. If the goal is to have a bug free release then I guess we have to wait another year.


ServerTrustPolicy.swift crashes Swift compiler on cmd line

On swift-2.0 branch, using XC7b4:
$ xcodebuild -project Alamofire.xcodeproj/
...
CompileSwift normal arm64 /Users/paul/work/opensource/Alamofire/Source/ServerTrustPolicy.swift
...
Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-7<IP_ADDRESS>/src/llvm/include/llvm/Support/Casting.h, line 237.
0  swift                    0x000000010cee3b8b llvm::sys::PrintStackTrace(__sFILE*) + 43
1  swift                    0x000000010cee42cb SignalHandler(int) + 379
2  libsystem_platform.dylib 0x00007fff8e11cf1a _sigtramp + 26
3  libsystem_platform.dylib 0x00007fbb5aaebe30 _sigtramp +<PHONE_NUMBER>
4  libsystem_c.dylib        0x00007fff8f9fdb53 abort + 129
5  libsystem_c.dylib        0x00007fff8f9c5c39 basename + 0
6  swift                    0x000000010b3fca10 hoistOrCopySelf(swift::ApplyInst*, swift::SILInstruction*, swift::DominanceInfo*, bool) + 624
7  swift                    0x000000010b3fc3ef swift::ArraySemanticsCall::hoistOrCopy(swift::SILInstruction*, swift::DominanceInfo*, bool) + 319
8  swift                    0x000000010b24d4bb (anonymous namespace)::SwiftArrayOptPass::run() + 4283
9  swift                    0x000000010b1c00ae swift::SILPassManager::runFunctionPasses(llvm::ArrayRef<swift::SILFunctionTransform*>) + 1598
10 swift                    0x000000010b1c0d28 swift::SILPassManager::runOneIteration() + 984
11 swift                    0x000000010b1bdcd4 swift::runSILOptimizationPasses(swift::SILModule&) + 500
12 swift                    0x000000010aec9e08 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 9992
13 swift                    0x000000010aec74e3 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2627
14 swift                    0x000000010aec35af main + 2015
15 libdyld.dylib            0x00007fff979b95c9 start + 1
Stack dump:
0.  Program arguments: ...
1.  While running SILFunctionTransform "SIL Swift Array Optimization" on SILFunction "@_TFO9Alamofire17ServerTrustPolicy19evaluateServerTrustfS0_FTCSo8SecTrust14isValidForHostSS_Sb".

Apparently an Apple bug, but it’s breaking Carthage builds for client projects.

Do you have any workarounds for this?

Seems the debug build is working but the release is crashing.

Disabling Swift optimisation on the Release builds seems to be a workaround.

This is exactly why I hate disabling Travis CI. We would have caught this if there was an Xcode 7 build. Either way, I have a completely packed day so I won't be able to look into this until this evening.
Could anyone else take a stab at figuring out what's causing the root issue?

Is there any possible create a new Branch without disabling Travis CI for swift 2.0.when I use the 1.2.3 there is some wrong happened.

I isolated the offending line. Tried a few different things, but for now this gets rid of the compilation error in beta4 until someone figures out a better way to fix it:
diff --git a/Source/ServerTrustPolicy.swift b/Source/ServerTrustPolicy.swift
index 3022d58..59b1314 100644
--- a/Source/ServerTrustPolicy.swift
+++ b/Source/ServerTrustPolicy.swift
@@ -178,7 +178,7 @@ public enum ServerTrustPolicy {
                 serverTrustIsValid = trustIsValid(serverTrust)
             } else {
                 let serverCertificatesDataArray = certificateDataForTrust(serverTrust)
-                let pinnedCertificatesDataArray = certificateDataForCertificates(pinnedCertificates)
+                let pinnedCertificatesDataArray = certificateDataForCertificates([] + pinnedCertificates)

                 outerLoop: for serverCertificateData in serverCertificatesDataArray {
                     for pinnedCertificateData in pinnedCertificatesDataArray {

Nice job finding that workaround, @robrasmussen!

So @robrasmussen definitely wins the rockstar badge for the day! Thank you for tracking this down!
I pushed a modified version of #621 in fb8c54c giving attribution to @robrasmussen for the change. I have also filed rdar://22024442 which I would encourage everyone to duplicate to help get this resolved.
You can now compile Alamofire in both Debug and Release on iOS and OS X without any issues. Hopefully this resolves the issue for everyone. If not, please comment on this issue and I'll re-open as necessary.
Again, thanks to everyone for helping out! 🍻

HTH, thanks for the awesome library.

This isn't just for release but essentially any configuration that is not debug


[FEATURE] Arch. Definitions

Feature:

Problem: Now, all components are initialized with app: front-end, back-end, repository like a blocklist.txt e etc.

Solution: Segregate in two or more layers:

Front-end: Responsible for receive and plot data to building front-end components.

Consider move the front-end for Django framework for make avaliable on internet with registration screen and setup for block bet-sites.

back-end: Responsible for handling the data and make avaliabled data to consumers

Implement the repository of data, logs, hosts-file and etc.. Maybe move this repository to Relational Database or Object Storage. Suggestion: Create a docker-compose for this and use Hexagonal Arch for manage this adapter.
Implement the automatic way for receive new sites

@IvanildoBarauna i think that the blocklist should be add in end of file.
Maybe the user already use configs in current hosts.
@jhowbhz

I started doing this segregation work to divide the responsibilities. What bothers me somewhat is the current structure of the project, but over time we will improve it! Feel free to help us with this!

Hello, everyone. My software engineering knowledge is between inter and junior. But, I still wanna help more.
I was thinking about the entire issue, trying to split it into small tasks...
Implement the automatic way for receive new sites
Considering the @IvanildoBarauna's   suggestion above, what do you think about creating a Twitter or Bluesky profile to let users tag the profile, adding the BET site url? After that, a script will:

extract links from post
save links into a file
add links to the future database (or the actual blocklist.txt)

PS: I do not want to put the car before the horse here!!
I would love to help, but I don't know how in a practical manner.
So, I had to ask to GPT about Ivanildo's suggestion about back-end:
1. Hexagonal Architecture Design
Core Layer (Business Logic):
Place all core logic for reading the blocklist, validating requests, and handling access restrictions in the core layer. Keep it independent of frameworks or specific technologies to make the core logic portable across platforms (desktop, mobile).
Ports and Adapters:

Ports: Define interfaces (like BlocklistRepository, LogRepository, HostManager) for services that interact with data or external dependencies.
Adapters: Implement adapters to interact with the data layer and manage the blocklist, logs, and the hosts file. By separating adapters, you can easily switch from a file-based blocklist to a database, for example, by implementing new adapters.

2. Data Management with a Relational Database or Object Storage
Start by setting up a database to manage blocklists, logs, and other information. You might use a relational database like PostgreSQL or a lightweight object storage if you need more flexible storage.

In Docker Compose, set up services for each component:

version: '3.8'
services:
  db:
    image: postgres:latest
    environment:
      POSTGRES_USER: username
      POSTGRES_PASSWORD: password
      POSTGRES_DB: blocklist_db
    volumes:
      - db_data:/var/lib/postgresql/data
  app:
    build: .
    depends_on:
      - db
    environment:
      DATABASE_URL: postgres://username:password@db/blocklist_db
volumes:
  db_data:

3. Implementing the Core Components
Repository for Data Management:
Implement the repository pattern for accessing the blocklist data in the database. For instance:
class BlocklistRepository:
    def __init__(self, db_connection):
        self.db_connection = db_connection

    def get_blocked_sites(self):
        # Query database for blocked sites list
        pass

    def log_access_attempt(self, site, status):
        # Insert access attempt into logs table
        pass

Hosts File Management:
For desktop environments, an adapter can interact with the OS’s hosts file directly. For mobile, this part would differ since mobile platforms don’t allow direct hosts file access; you may need to rely on DNS filtering or a VPN configuration instead.
4. Expanding to Mobile

To manage mobile platforms (iOS and Android), a VPN-based solution may work best. Consider creating a lightweight VPN server or integrating with third-party VPN libraries that allow you to control access based on the blocklist stored in your backend.
The mobile app will need to periodically synchronize with the back-end service for the latest blocklist updates.

5. Logging and Monitoring

Create a logging repository for storing and managing access logs, which can be used for reporting or further analysis.
Set up logging middleware in the app container to centralize logs, or use a logging service like Fluentd or Logstash with Docker Compose to manage and analyze logs.

6. Docker Compose Configuration

Use Docker Compose to define and manage services for the database, app, and any other necessary components (like logging services). This setup makes it easy to deploy locally and later move to the cloud.

Is it safe enough??

Hey, @biralavor! Thank you for the feature ideas; they all make sense for the goal we want to achieve. I think your ideas could become separate issues, as the focus of the one we’re discussing now is related to code architecture and design. Once again, your ideas are very welcome!


Issue#8261 : Added test cases for InfiniteStreamRecognize class

Description
Fixes #8261
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist

[ ] I have followed Sample Format Guide
[ ] pom.xml parent set to latest shared-configuration
[ ] Appropriate changes to README are included in PR
[ ] These samples need a new API enabled in testing projects to pass (let us know which ones)
[ ] These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
[ ] Tests pass:   mvn clean verify required
[ ] Lint  passes: mvn -P lint checkstyle:check required
[ ] Static Analysis:  mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only
[ ] This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
[ ] This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
[x ] Please merge this PR for me once it is approved

I converted PR to draft because it does not pass automatic testing. Please, ensure that all tests pass before submitting it to the review.
It seems that the execution time of the test is bound by 5 min waiting for microphone input that is hard-coded in the code sample. If my interpretation is correct, the code sample and test should be modified to bring the running time of the test under 1 min.


CB-14145 resolve npm audit issues in patch fix

Platforms affected
Windows
What does this PR do?

Set VERSION to 6.0.1-dev & update JS snapshot to version 6.0.1-dev via coho, using local coho with apache/cordova-coho#176 for patch release support (on mac due to some issues with updating JavaScript on Windows)
Update cordova-common to 2.2.5, pinned in this patch fix, to resolve the npm audit issues
pin other dependencies in package.json in this patch fix
completely reinstall node_modules (ignoring node_modules/.bin) using the following command on<EMAIL_ADDRESS>npm install --only=production
Update cordova.js from<EMAIL_ADDRESS>with the following changes, using local coho with apache/cordova-coho#176 for patch release support (on mac due to some issues with updating JavaScript on Windows):

CB-9366 log error.stack

update bundledDependencies to support deprecated Node.js 4 in this patch fix
add Node.js 8 & 10 to AppVeyor CI & Travis CI in this patch fix
add blank lines to .travis.yml in this patch fix
RELEASENOTES.md 6.0.0 fixes

remove extra info (now obsolete)
note cordova.js update from<EMAIL_ADDRESS>other minor fixes

What testing has been done on this change?

able to build and run Cordova Windows app when using deprecated Node.js version 4 without ugly engine error warnings
able to build and run Cordova Windows app on Node.js version 8
npm audit (using<EMAIL_ADDRESS>shows 0 vulnerabilities

CI testing done:

[x] verify that npm test and other items succeed on AppVeyor CI
[x] verify that build tests items succeed on Travis CI

Checklist

[x] Reported an issue in the JIRA database
[x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected. (with some exceptions)
Added automated test coverage as appropriate for this change.

pin other dependencies in package.json in this patch fix
Why?

update bundledDependencies to support deprecated Node.js 4 in this patch fix
Why are so many additional libraries now listed there?

Commit: .gitignore ignore package-lock.json in 6.0.x
was this somewhere decided to how Cordova should handle package-lock.json?

Commit: CB-14145 remove node_modules before patch fix
Why?

Several commits: "... in 6.0.x"
What does this mean? Won't these commits get merged to master as well?

Is it correct that RELEASENOTES don't have a 6.0.1 entry here?

pin other dependencies in package.json in this patch fix

Why?

Keep npm install behavior as predictable as possible.

update bundledDependencies to support deprecated Node.js 4 in this patch fix

Why are so many additional libraries now listed there?

With node_modules installed by newer version of npm (comes with non-deprecated version of Node.js), additional libraries need to be listed to work on Node.js 4. We know that Node.js 4 is deprecated but should not be dropped in a patch release:-(

Commit: .gitignore ignore package-lock.json in 6.0.x

was this somewhere decided to how Cordova should handle package-lock.json?

I think this was discussed in document on dev list for next major release (not sure). But I think we do not want to introduce this file in patch release, that is why I added it to .gitignore.

Commit: CB-14145 remove node_modules before patch fix

Why?

A combination of updated dependencies and npm from non-deprecated version of Node.js results in such a massive change to node_modules that it seems cleanest to remove old node_modules before making the update.

Several commits: "... in 6.0.x"

What does this mean? Won't these commits get merged to master as well?

The changes proposed here are tailored specifically to the patch release in the 6.0.x branch. A number of changes are needed in node_modules since we should not drop Node.js 4 in a patch release. But I think we do not want all of these changes in the master branch.
I think we want to take a cleaner approach in the master branch: drop Node.js 4 support, remove committed node_modules, and target the next major release.
I would be happy to add a note to some of the commits with the reason why we do not want them in the master branch.

Is it correct that RELEASENOTES don't have a 6.0.1 entry here?

Yes I did not do that part yet. (I think it should be in another JIRA task according to https://github.com/apache/cordova-coho/blob/master/docs/platforms-release-process.md.)

Ok, to be honest I still don't really understand what is going on here, but if you are confident that this won't break anything please go ahead - I don't want to block any cleanup, and there should be no negative impact because of these changes.

Reopening, will remove appveyor.yml updates from patch fix, apologies for the confusion.

Reopening, will remove appveyor.yml updates from patch fix, apologies for the confusion.

Why? Who was confused? I have 0 context what is going on here.


mesh union of two pieces of cylinders with a common side face

Hello,
Assuming the boolean union of two pieces of cylinder with a common side face, as case ,
common cylinders extremities become internal to the resulting mesh body.
Is it possible to do that using numpy-stl, leading a watertight and not overlapping mesh result.
Does removal of common faces, indicating the plane where these faces are located, before union would be suitable ?
Thank you so much for advice.

The main goal of this library is storing and loading STL files to a numpy array. After that you can manipulate it any way you want but the library itself doesn't offer many options in terms of manipulation.
There are a few methods for rotation: https://numpy-stl.readthedocs.io/en/latest/stl.html#stl.Mesh.rotate
And transforming a mesh: https://numpy-stl.readthedocs.io/en/latest/stl.html#stl.Mesh.transform
Or translating a mesh: https://numpy-stl.readthedocs.io/en/latest/stl.html#stl.Mesh.translate
But removing common faces is a much more intricate operation. You'll have to write an algorithm for that yourself, but if you create something good I'm open to adding it to the library :)


Add binary auto-handled properties to IModelTransformer tests

Requires imodeljs-native 2.14.1 in order to pass.

@khanaffan see another AzureFileHandler test failure. I think it's flaky.
  1) AzureFileHandler
       should return false for cancel request after disk error:
     AssertionError: Expected an error to be thrown!
      at Context.<anonymous> (src/test/FileHandlers.test.ts:230:12)


[Design] Smarter antiforgery

Adds the concept of an IAntiforgeryPolicy marker interface as well as
the ability to overide policy with a 'closer' filter.
Adds a new [IgnoreAntiforgeryToken] attribute for overriding a scoped
antiforgery policy.
Adds a new [AutoValidateAntiforgeryToken] attribute (good name tbd) for
applying an application-wide antiforgery token. The idea is that you can
configure this as a global filter if your site is acting as a pure
browser-based or 1st party SPA. This new attribute only validates the
token for unsafe HTTP methods, so you can apply it broadly.

@Eilon - feedback on name?

:shipit:

In case anyone else arrives here searching how to use AutoValidateAntiforgeryTokenAttribute, here's how you do it:
services.AddMvc(options =>
{
    options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute());
});


Bug Report: lime test windows -debug not working

U didn't install the extension-webm
Run all the commands mentioned Here

wrong
I installed it I just need an ndll

@LLEVC did run this command?
lime rebuild extension-webm windows?

yes

I'll do it one more time


Investigate adding and exporting metrics from a WASM module

In order to be able to observe what is happening at runtime via tools such as prometheus and grafana being able to expose some metrics around the WASM module would be useful. An example of this would be a counter that counts how often the module has been invoked for a particular host another would be to expose the number of failed requests etc
cc @rahulanand16nov

EZ PZ 😎

I think that https://github.com/Kuadrant/wasm-shim/issues/106 and https://github.com/Kuadrant/wasm-shim/issues/105 would cover this issue.


A simple build wrapper example with Timestamper

@reviewbybees

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

:bee:

:bee:


[Wallet] keep awake verification loading screen + fix upgrade screen

Description
Keep awake verification loading screen.
Other changes
Fix design in Upgrade screen, fix it for iOS.
Tested
iOS and Android physical devices
Related issues

Fixes https://github.com/celo-org/celo-monorepo/issues/5001

Backwards compatibility
Yes
Screenshot

That language is pretty scary.  Is that what we want?

Thanks for the flag
Wording rec:
"App Update Available" "Your current version is out of date, please update to the latest version" @i1skn @aaronmgdr @jmrossy

@aaronmgdr @jmrossy I've updated the wording, PTAL

Hi @tarikbellamine I have verified this Task on latest test flight build (25) & Android internal build Android internal build 1.2.0(1004294313) and observe the following:
Keep awake verification loading screen

Verify mobile screen awake when user is on confirming countdown screen while verifying phone number.

Fix design in Upgrade screen, fix it for iOS

Verify user is able to see "App update " page when user install old version
i am not able to see "App update" screen  with following steps:

Installed 1.0.1 build from test flight > Sign in with existing account.
Installed 1.0.1 build from play store > Sign in with existing account.
Installed play store 1.0.1 build> walk through screens.

Note: Currently, we have 1.2.0 internal build for Android and IOS.
please let me know if i need to verify with another steps to get the screen

@jeanregisser how can Ankit prompt this?


fix: switch empty default error

Fixing an exception thrown when loading a pipeline containing a Switch Activity with child Activities in the default case in Data Factory.
I used a Switch with an empty default to route to various error cases with Fail Activity with the default case being success.

@microsoft-github-policy-service agree

Hello Arjen, thanks for the kind words. Done.


Fix memcopy in Tensor copy constructor

Current implementation of Tensor use custom copy constructor that copies memory. This should be changed to default not copying constructor

:octocat: cibot: Thank you for posting issue #281. The person in charge will reply soon.


TaskList Storage

implemented feature to read/save task list from/to local folder. Tests are covered for this feature too.
Fixes #70 #20

Codecov Report

Merging #74 (4c66283) into master (29be5ff) will increase coverage by 0.02%.
The diff coverage is 74.52%.

@@             Coverage Diff              @@
##             master      #74      +/-   ##
============================================
+ Coverage     74.15%   74.17%   +0.02%
- Complexity      453      481      +28
============================================
  Files            79       82       +3
  Lines          1393     1491      +98
  Branches        143      148       +5
============================================
+ Hits           1033     1106      +73
- Misses          321      346      +25
  Partials         39       39

Impacted Files
Coverage Δ

src/main/java/seedu/address/MainApp.java
0.00% <0.00%> (ø)

src/main/java/seedu/address/model/Model.java
100.00% <ø> (ø)

.../java/seedu/address/model/util/SampleDataUtil.java
15.00% <0.00%> (-5.00%)
:arrow_down:

src/main/java/seedu/address/model/UserPrefs.java
71.42% <20.00%> (-8.58%)
:arrow_down:

...rc/main/java/seedu/address/model/ModelManager.java
91.66% <50.00%> (-6.52%)
:arrow_down:

...rc/main/java/seedu/address/logic/LogicManager.java
76.19% <100.00%> (+1.19%)
:arrow_up:

src/main/java/seedu/address/model/TaskList.java
94.28% <100.00%> (+1.97%)
:arrow_up:

src/main/java/seedu/address/model/task/Task.java
100.00% <100.00%> (ø)

...in/java/seedu/address/storage/JsonAdaptedTask.java
100.00% <100.00%> (ø)

...eedu/address/storage/JsonSerializableTaskList.java
100.00% <100.00%> (ø)

... and 2 more

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more


see an outline of all the parameters I have declared in the outline view of the explorer in VS Code

I wonder if we have telemetry on the average or median number of parameters used in these files? I'd be curious how often these param files extend beyond a single "page" (the viewport in vs code)


Update Jupyter Notebooks to account for the API breaking changes

🐞 Problem
#203 PR introduced few API breaking changes in the metric module. The jupyter notebooks have, therefore, become outdated.
🎯 Goal
Update the notebooks in docs/source/examples. In short, do the required changes and rerun them.
💡 Possible solutions
See

http://docs.einsteinpy.org/en/latest/api/metric/metric_index.html
http://docs.einsteinpy.org/en/latest/api/coordinates/coordinates_index.html

📋  Steps to solve the problem

Comment below about what you've started working on.
Add, commit, push your changes
Submit a pull request and add this in comments - Addresses #212
Ask for a review in comments section of pull request
Celebrate your contribution to this project 🎉

@ritzvik i want to work on this issue.

i want to work on this issue. May I?

Sure @fiterace . Have your way with the issue ;)

@fiterace Sorry for not giving you adequate time to take up the issue. Hope you would understand the urgency.
@shreyasbapat PR has been put up addressing this. #217


chore(deps): update common-dev-assets digest to d297ae2

This PR contains the following updates:

Package
Update
Change

common-dev-assets
digest
a2cffcb -> d297ae2

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

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

GitHub release
v5.0.0

Your semantic-release bot :package::rocket:


Upgrade to 0.8.0 and re-render

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

Let's use https://github.com/conda-forge/arrow-adbc-split-feedstock/pull/19 instead


x/build/cmd/coordinator: unable to add a post submit builder for non-master branch

While troubleshooting #46786 we discovered an edge-case where a post submit was not initiated even thought the configuration seemed correct. @dmitshur discovered that the coordinator will not run post submit builds for builders which are not configured to run for the go repository in the master branch.
@golang/release

The second bullet point in #30779 is related to this.


Upcoming changes to PyO3's API (possibly in 0.21)

This is a ticket to pin to give visibility to discussion and feedback of an overhaul we're considering for PyO3's API, projected for 0.21 release later this year.
TLDR; we plan to move types like &'py PyAny to be stored instead in a smart pointer type Py<'py, PyAny>. The existing Py<T> type will continue to exist, but renamed, maybe to PySend<T> or PyStatic<T> (name ideas welcome).
The reason for doing this is because we believe this will offer a faster and lower memory usage API. The &'py PyAny types are reliant on an internal datastructure we call the "reference pool", and it's the cause of memory frustrations such as #1056. It's a thread-local datastructure, so it also has a performance overhead whenever it is accessed. From benchmarks in prototypes I think as much as 30% overhead can be removed when doing lots of operations with Python objects.
There will be some work needed to migrate to this new API, mostly due to changes in ownership semantics. I think it may be possible to expose the existing &'py PyAny API in a separate crate (say pyo3_pool, name to be bikeshed) to make migration easier.
There has been a lot of thought put into this API design over a large span of time. We want to preserve as many existing semantics as possible as well as provide an as simple a migration path as possible from current PyO3 code. We want PyO3 to be as fast as possible while also being accessible to Python users coming to Rust for the first time.
For the discussion of the latest prototype of this new API, see https://github.com/PyO3/pyo3/pull/3361
All feedback and questions welcome.

but renamed, maybe to PySend or PyStatic (name ideas welcome).

I was somewhat enamoured with PyUngil<T> matching the Ungil trait.

I could live with that, even if we have to rename it again in a nogil future.

That's right, this might unnecessarily complicate things. My second least favourite was PyDetached because it comes with nicely fitting verbs attach/detach for method to switch between Py/PyDetached.

Yes I quite like PyDetached too

I am new to Pyo3, today I do a comparison test as follows:
Python.py run Rust app.pyd, read 1GB partition from a 41GB file, 1GB vector return to Python, then Python put this vector to run Rust writing this 1GB file to disk, total time is 25s.
_, csv_meta = pr.get_csv_partition_address(file_path, 1000)
csv_vector, csv_meta = pr.get_file_partition(file_path, csv_meta, csv_meta.partition_address[0], csv_meta.partition_address[1])
pr.write_csv(csv_vector, csv_meta)
If using another Rust code to run the Rust binary app, total time is 1.2s.
let (_, csv_meta) = get_csv_partition_address(&file_path, 1000);
let csv_vector = get_file_partition(&file_path, csv_meta.partition_address[0], csv_meta.partition_address[1]);
write_csv(csv_vector, csv_meta.clone());
I am exploring whehter it is possible to implement zero copy of dataset between Python and Rust.

Having modifying some setting with #Pyo3,
Python->Rust vs Rust->Rust

Previouly is 25s vs 1.2s
Now is 1.4s vs 1.2s

I use a 41GB file for the following test, output 1 partition of 1GB to disk
import peakrs as pr
df = pr.get_csv_partition_address(file_path, 1000MB)
df = pr.get_file_partition(file_path, df, df.partition_address[0], df.partition_address[1])
pr.write_csv(df, "Test_Result.csv")

@hkpeaks Please do not hijack this issue which is specific to the upcoming API changes. I you would like to discuss your experiments with us, please open a separate discussion. Thank you.

Pyo3 is exceptional useful for my Rust project, how to achieve zero copy of dataset move between Rust and Python has been solved.

I propose that PyCell<'py, T> becomes an alias for Py<'py, T>, and we can deprecate the alias. That way the API for pyclass and native types becomes more uniform.

(We would still need a different PyCell<T> internally for all the borrow tracking, we can just detach it from the public API.)

What would the equivalent of borrow(), try_borrow(), etc. be with this approach?

Ah. Well then, I'd never noticed that. Sorry for the noise!

All good worth stating explicitly!

I'm not sure if this qualifies as "API change", but I'd love for modules to have an m_free and m_clear method, that explicitly releases the memory and de-initializes them.

@holzschu I agree that'd be a nice feature but unrelated to the proposal in the OP. Probably best discussed on #3294 or similar proposals.

One thing which I noted when implementing #3531 is that if multiple traits methods with the same name are applicable for one type we get ambiguity, and that would be the advantage of inherent methods.
I think we are expecting to have a 1:1 mapping of traits to types so this should not be a problem. How I noticed this is because our (internal) Py2::borrowed_from_gil_ref is generic over T: AsTypeInfo and takes &T::AsRefTarget as the input, so that means that the output Py2<T> is not fully constrained and needs additional annotating sometimes.

Since we've got quite a few features and a couple of breaking changes beginning to take shape, I'm beginning to think it'll make sense to release 0.21 separate to (before?) this major API overhaul.
In the meanwhile I'll continue to chip away at the implementations like #3572, so hopefully if this doesn't make it into 0.21 we can land alpha releases of 0.22 with this API change committed shortly after.

Just a status update here: after discussion of #3668 the leaning in https://github.com/PyO3/pyo3/issues/3674#issuecomment-1864333737 was that it makes sense to release this new API in 0.21, so for better or worse 0.21 is going to be quite a large release!

PyO3 0.21 is released, this is now done.

While studying these changes and PyO3 in general, I wonder: why was GILPool even introduced in the first place? Why wasn't something like Bound present in PyO3 since the beginning? I would be very grateful for some historic pointers.

A great question. The GIL Refs design was made long ago (it predates me), and perhaps at the time it wasn't realised what the performance consequences were likely to be. You can find it in early commits to this repository but with very little discussion. GIL Refs main advantage was simplicity. The syntax &PyAny is concise and allowed users to avoid writing lifetimes in many cases, which was certainly very friendly for newcomers!


Default installation under Windows leads to unexpected behavior

To reproduce:
0) Have none of the IJulia pre-requisites installed / in PATH.

Run an Admin command prompt and launch the Julia REPL (I used 0.4.5 on win10-x64)
Pkg.add("IJulia"), this step should use miniconda to install jupyter and anything else needed.
using IJulia; notebook()

This should result in a jupyter instance that tries to serve the notebook from the root of c: (an instance did spawn on my machine, but what it actually tries to do is partly speculation) which leads to a 404 error in the jupyter page that opens in a browser, since Windows does not allow access to the root or something like that.

Hmm, it would be easy enough to change the directory if pwd() returns c:\.   What directory should it default to on Windows?
cc @Carreau ... should jupyter notebook be smarter about this?

Or maybe this should be fixed in julia itself ... maybe julia.exe should change to homedir() by default?

I guess it is happening because your julia.exe program is in the root directory?

Julia was installed in c:\Julia-0.4.5, where any IO should be fine.

We can likely check that the directory the notebook is started from (or the directory it is configured to start in) have sufficient permission and abort if that's not the case. I think that may have been taken care of recently (at least we had complaint of notebook note starting in C:\System32\) I'll investigate.

@matteyas, then how are you launching Julia?   Are you opening cmd.exe in the root directory and then typing in the path of julia.exe or something?

I had julia.exe in my PATH variable, so I could start it anywhere and I am certain I did not start it in C:. I am currently trying to reproduce the error (though with 0.4.6), and I will post results within 12h or so!

What is IJulia.notebook_cmd?

julia> IJulia.notebook_cmd
2-element Array{ASCIIString,1}:
"C:\Users\[me]\.julia\v0.4\Conda\deps\usr\Scripts\jupyter"
"notebook"

Okay, I've changed it to default to opening the dashboard in homedir().   Let me know if Pkg.checkout("IJulia") (to grab the latest IJulia master) does not fix the problem.

(Julia doesn't use cmd -c to spawn processes; it uses uv_spawn, which calls the Win32 API function CreateProcessW directly.)

Neat, I'll try that as soon as I get back to work. I just find it really weird that the notebook started in the very same path that any new cmd.exe instance changes directory to on startup (through a startup-script). Before trying the fix, I'll see if changing the cmd startup path will change the notebook path as well, just out of curiosity.