[BEKEN] update examples build files for BEKEN

Change overview

update examples build config files for BEKEN

a zap file in config/beken does not look right.

Thanks, We remove it by using lighting-common/lighting-app.zap.

/rebase


go/build: defaultGOPATH cannot handle the confiliction correctly

Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
package main

import (
	"fmt"
	"go/build"
)

func main() {
	fmt.Println(build.Default.GOPATH)
}

then,
$GOROOT="$HOME/go" GOPATH="" go run c.go:

$GOROOT="$HOME/go/" GOPATH="" go run c.go:
/Users/hiro/go

What did you expect to see?
same outputs
What did you see instead?
different outputs
Does this issue reproduce with the latest release (go1.7.5)?
IIUC, default go path is introduced in go1.8.
System details
go version devel +3e55059 Mon Jan 30 20:38:03 2017 +0000 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/hiro/.go"
GORACE=""
GOROOT="/Users/hiro/go"
GOTOOLDIR="/Users/hiro/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wq/dwn8hs0x7njbzty9f68y61700000gn/T/go-build575104841=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
GOROOT/bin/go version: go version devel +3e55059 Mon Jan 30 20:38:03 2017 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +3e55059 Mon Jan 30 20:38:03 2017 +0000 X:framepointer
uname -v: Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.12.2
BuildVersion:	16C67
lldb --version: lldb-360.1.70
gdb --version: GNU gdb (GDB) 7.12

If GOROOT is being corrupted due to the mishandling, we should consider fixing this in 1.8.
/cc @bradfitz

That one-line change might be okay. I'd prefer to see a test, though, at which point it's more than one line.
I'll let @rsc decide.

Assigning "" to an environment variable does not unset it.
package main

import (
        "fmt"
        "os"
)

func main() {
        fmt.Println(os.LookupEnv("GOPATH"))
}

deadwood(~/src) % go run printenv.go
/home/dfc true
deadwood(~/src) % unset GOPATH
deadwood(~/src) % go run printenv.go
 false
deadwood(~/src) % env GOPATH="" go run printenv.go
 true

@davecheney
go/build/build.go uses:
func envOr(name, def string) string {
	s := os.Getenv(name)
	if s == "" {
		return def
	}
	return s
}

I cannot judge this is WAI or an another subtle bug, though.

I'm not sure this is a bug
On Wed, 1 Feb 2017, 10:27 hirochachacha<EMAIL_ADDRESS>wrote:

@davecheney https://github.com/davecheney
go/build/build.go uses:
func envOr(name, def string) string {
s := os.Getenv(name)
if s == "" {
return def
}
return s
}
I cannot judge this is WAI or an another subtle bug, though.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/golang/go/issues/18863#issuecomment-276527057, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAAcA-2wq94CuSkV8eINLFbSVrgPHBTMks5rX8NUgaJpZM4LytPI
.

Cherry-pick to release branch pending.


[BUG] Revisit ReactorNettyHttpResponse::close()

It looks like there are cases where when ReactorNettyHttpResponse::close() is called the connection is in the disposed state but the underlying body is not drained, which can result in leak warnings from netty.
Need to followup with the reactor-netty team to understand the behavior of connection disposal.
This is not impacting the majority of the cases since almost all cases either we subscribe to the body in RestPoxy or by the user when downloading as raw ByteBuf. One case in key-vault revealed this issue where it was not disposing the body inside the policy and was expecting close() to do it

Hi,
We are facing the same issue with azure keyvault 4.1.5. Please could someone help us identify the right version the below leak issue is fixed. Is there any azure key vault version below 4.2.0 which has the fix ?
{
"timestamp":<PHONE_NUMBER>173,
"status": 500,
"error": "Internal Server Error",
"message": "Request processing failed; nested exception is java.lang.RuntimeException: Max retries 3 times exceeded. Error Details: failed to allocate 16777216 byte(s) of direct memory (used: 486539271, max: 501743616)"
}

We ran across this when porting from from Apache HttpClient to Azure SDK HttpClient.
Here's a small repro in case it helps with investigation: https://github.com/trask/netty-bytebuf-leak-repro
In the meantime, always consuming the response (even in cases where we don't require it) prevents the issue from occurring.

Thank you for the reproduction of this @trask!

@krishgeeneuron, unfortunately there are no versions of KeyVault Keys 4.1.x that contain of fix for the error you've seen. Any version later than 4.2.3 should contain a fix where retried exceptions consume the error response body before retrying, resolving the ByteBuf leak issue.

@anuchandy, is the goal of this issue to resolve ByteBuf leaks when using Azure SDKs with the Netty HttpClient implementation or to resolve any usage of the Netty HttpClient implementation? If it is the former this has already be resolved as azure-core will handle consuming the response body on an error retry attempt, if it is the latter the Netty HttpClient implementation assumes that the caller will handle the consumption of the body.

Hi @alzimmermsft - At that time, it was that -

Get Netty HttpResponse object (that composes the Flux(ByteBuf> body object)
Directly call close() on the parent HttpResponse object without consuming its body object.
Then this was leaking the body.


getNearbyPlaces(UNLIMITED_RESULTS)

Hello,
I am trying to get an "unlimited" amount of results out of the getNearbyPlaces() method, so I give Integer.MAX_VALUE as limit but I always get 60 results.
I went into the GooglePlaces class and it seems the getPlaces() method overrides my limit with :
limit = Math.min(limit, MAXIMUM_RESULTS); // max of 60 results possible

But then the number of request that have to be sent is calculated with the new limit :
int pages = (int) Math.ceil(limit / (double) MAXIMUM_PAGE_RESULTS);

So obviously I can never have more than 60 results even though it should be possible.

60 result is the limitation imposed by Google Places API, not this library. Please check https://developers.google.com/places/web-service/search#PlaceSearchResponses

So when the javadoc of the API says "Returns the places at the specified latitude and longitude within the specified radius. If the specified limit is greater than MAXIMUM_PAGE_RESULTS, multiple HTTP GET requests may be made if necessary."
I thought the API would handle the multiple calls

That is actually what it does. You will see that MAXIMUM_PAGE_RESULTS=20. If necessary, the library makes additional calls up to 3 times in total to get up to 60 results. I hope this make sense.

It does make sense if the limit you provide is 60 or less.
But the way the javadoc is written, I understand that the API handles the case when you want more by making a loop over http GET and requesting everything up to the limit you want.
Isn't it possible ?

Unfortunately, the problem is that the Places API will return 60 places even if your radius covers 1000 places.
I run into a similar issue a few days ago. The solution I found is to keep radius really small, around 70 meters. Then shift the search location lat-long left, right, up down until you cover all the necessary area of interest. If you mostly get 60 results with given conditions, that means your radius is still big for the area, make it smaller.

I actually want to get every place in a major city.
So I have to call the method a tremendous amount of time with different latitude and longitude to cover the whole city.
With a small radius to try not to have two time the same place, then eventually I have to remove from the list the places that are already in it.
This is not very optimized and I guess some places would be missed.

Aw ok that's what I thought. It's a shame Google's API doesn't help us that way.

Unfortunately, it does not help. Especially with 1000/day query limit, it can take weeks to cover the whole city.

Damn, and I thought I would be able to cover Paris within minutes, let's say hours if needed...

I am pulling my hair since last week to cover a city that is way smaller and less populous than Paris. And still not there yet.

If it helps I just saw that you can have up to 150.000 request per 24h for free if you create a billing account that will not be used, only to check your identity.
It can make a difference on our applications.

I saw that statement a while ago and I guess misunderstood what they say. You are right, you can get up to 100,000 requests for free.


No Relationship visible on Catalog

Where to verify the version of the data catalog created by my organization? And how do i make sure the relationships are auto shown on my uploaded objects? Does it do auto discovery of the relationships?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 1fd2055b-85c6-5e87-7417-eb09731dc7a6
Version Independent ID: 6282c208-8d54-c923-2156-b4081f134f4a
Content: Introduction to Azure Data Catalog
Content Source: articles/data-catalog/data-catalog-what-is-data-catalog.md
Service: data-catalog
GitHub Login: @markingmyname
Microsoft Alias: maghan

@ndondapati can you please share the document you are referring to so we can better assist?

I will close for now. Please open a new issue directly on the doc you are having issues with so we can better assist.

https://azure.microsoft.com/en-us/updates/azure-data-catalog-support-for-relationships-and-related-data-assets/

@ndondapati thanks. I have assigned the issue to our Data-Catalog engineers to assist further.

@ndondapati Since this issue is not related directly to the doc, I would recommend you to create a thread on the forums - MSDN or stack overflow.
Once you post your issue on forums, it will have visibility across the community which is a better suited audience for such types of issues.
Please create a Forum thread and post it's link here and tag me. I will now proceed to close this issue. Feel free to comment if you have any other queries.


Take advantage of batch mode for crypto validation

Apparently some crypto libraries can offer significant speed advantages when doing validation in batch mode. We could take advantage of this at various levels of granularity:

Optimize validation of individual transactions; this would be a "local" batch mode for the transaction inputs.
Optimize validation of whole blocks
Optimize validation of batches of transactions in the mempool (related: input-output-hk/ouroboros-network#1303)
Optimize validation across blocks (related: input-output-hk/ouroboros-network#1911).

Possibly related to https://github.com/input-output-hk/ouroboros-consensus/issues/547


Custom select is not working in version 1.4.7

Hii,
I am using angular js version 1.4.7. In that i m using custom-select directive. So, it gives error as follows :
Error: [$compile:ctreq] http://errors.angularjs.org/1.4.4/$compile/ctreq?p0=select&p1=ngOptions
at Error (native)
Please look into this.

Are you using the v1.0 release? It is a known issue. The current version on the master branch fixed that, but with breaking changes. I just created a new version 2.0.0 release from the current master branch.


Love system for notes

I've merged this already (since it does work), but there are some bugs.

This might sound strange, but you actually need to be allowed to give 's while not logged in. I.e. user.id is zero. In that case it's associated with the IP address, rather than the account.
Also it looks like if I have 2 tabs open, I remove it in one tab, try to remove it again in the other tab it's stuck on.

Not a showstopper, but they should be addressed.


[BUG] Curator files omitted from manual install

A minor issue, but step 3.3.8 "Build curator" of the manual install neglects to mention that the curator files need to be copied from the git repo before the docker command is run.

Also osmap.csv


Week numbers may be wrong

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
In Denmark, the week number 1 starts on the first week with 4 days in the new year. This means that right now, 2022-06-23 is week 25, while this calendar card says week 26.

You can compare this with ugenr.dk, which shows the current week number.
Expected behaviour
I was expecting a setting that could configure this behavior, but I couldn't find anything (besides which day was the first day of the week.
I'm hoping that something like moment would be able to handle this. I checked on a device with danish locale, and it also showed week 26, so it's not applying currently.
Steps To Reproduce
Should occur always, at least for Danish users.
Card Version
v7.0.0
Home Assistant Version
2022.6.6
Configuration
type: custom:atomic-calendar-revive
entities:
  - calendar.my_calendar
showCalendarName: true
showWeekDay: true
sortByStartTime: true
showDate: true
dateFormat: dddd, DD MMMM HH:mm
hoursFormat: HH:mm
maxDaysToShow: 6
refreshInterval: 60
showWeekNumber: true
disableLocationLink: true
disableEventLink: true
showNoEventsForToday: true
dimFinishedEvents: true
fullDayEventText: Hele dagen
noEventText: Ingen events
showProgressBar: false
hideFinishedEvents: true
showRelativeTime: true
hideDuplicates: true
showMultiDay: true
showMultiDayEventParts: true
showCurrentEventLine: false
noEventsForNextDaysText: Ingen kalender info
firstDayOfWeek: 1

Relevant log output
N/A

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Additionally, when the current locale is danish, "Week" isn't translated.. :)

Ok I have released a new version, can you install, and then in the browser console you should see the new version plus the language it thinks it should be using:

Let me know what you get on here and I will check the card is loading the correct things for this, also if you could let me know under your user, what is the name of the language you have selected, I assume either Dansk or Deutsch?

Not sure if you saw my comment on PR 720... the new translation in sl.json for week is incorrect - can you please check and correct it?

Ok I have released a new version, can you install, and then in the browser console you should see the new version plus the language it thinks it should be using:

Let me know what you get on here and I will check the card is loading the correct things for this, also if you could let me know under your user, what is the name of the language you have selected, I assume either Dansk or Deutsch?

Updated, and it now says "Uge" (yay)
It reports "da".

Hello, I'm experiencing the same issue. It seems if only the "en-gb" version shows the "correct" week number and all the other ones   don't. I'm using "en-gb" and "hu". I assume that the only workaround is to set HA local to en-gb and reinstall the component or are there other alternatives?
Thank you!

checked and this appears to be correct:


Migrate asset purgatory mechanism

New Asset returned by aquarius will have asset.purgatory: https://github.com/oceanprotocol/docs/blob/feature/ddo_v4/content/concepts/did-ddo.md#purgatory
{
  "purgatory": {
    "state": true,
    "reason": "Copyright violation"
  }
}

So we do not have to hit our own purgatory proxy anymore and can get the purgatory state directly from the Asset

Not yet implemented in aquarius

In #986 I disabled the check for it, so that asset details could render https://github.com/oceanprotocol/market/pull/986/files#diff-6056f6e2304b814eb73b7cdd36508bdecd24a1a19242dbfb8547f8eb9afdd22bR113-R114
Issue for Aquarius https://github.com/oceanprotocol/aquarius/issues/669

oceanprotocol/aquarius#669 is done, once that's deployed to https://aquariusv4.oceanprotocol.com this issue is unblocked


style header title

is there a possible way to style the header for screens?

Hi @ellismarte! It looks like this is not a bug of the library nor a feature request, so I'll close it: I suggest next time you use Stack Overflow which is better suited for answering these types of questions. I also encourage you to join the Reactiflux community on Discord. There are React Native and React Navigation channels with helpful people who might be able to answer your question. I would also like to mention that there is a collection of helpful links and tutorials for React Navigation in the README which might be helpful for you.
That said, here's the docs about it
If you believe that you are experiencing a bug or have a feature request, please open a new Issue following the dedicated template or submit a PR.


Use text colors from application theme

Add the new attribute 'default_text_colors'. When true, the cursor color, text color, and text hint colors come from the application Theme.
This is a possible solution to https://github.com/dbachelder/CreditCardEntry/issues/25

Awesome... thanks for the PR! I will review as soon as I can and merge if it works with my projects :)

hey @dbachelder have you had a chance to take a look?

merged. thanks!


Add Brine Leas Sixth Form (BL6)

Website URL: http://bl6.org.uk/
Course URL: http://bl6.org.uk/course-directory/ (In the PDF document)
Screenshot of usage (email seen at top-right corner) - Note that the website shown in the screenshot (https://webmail.brineleas.co.uk) is the address used to login to email accounts, which is linked to on the homepage (http://bl6.org.uk/) in the navigation bar (EMAIL).

@curz46 Pull request merged. Please notice that free educational license for JetBrains tools is for high and higher schools students, i.e. those who are over 13 of age. Thank you!


Changed RgbToGrayscale to accept an image.Image interface.

This is a really nice library! I have been using it on a Raspberry Pi for real-time processing and I think the proposed pull request gives better performance.
Accepting the interface image.Image makes this function easier to use with gocv.NewMat().ToImage() and other fuctions that might implement image.Image.  It skips the use of pigo.ImgToNRGBA(img), which gives a performance boost when doing real-time analysis.

Could this also be a possible solution for #10?

I completely agree with your point of view, this is why I'm accepting this PR.


[question]: is chrome locale override a bad idea

chrome local override
This is only "one step faster" opinion.

Not sure if you got you, can you explain it a bit more? Thanks

Not sure if you got you, can you explain it a bit more? Thanks

Sometimes, only for demonstrate few css changes i have opened a project with chrome filesystem. This is a lazy solution. In this case i make changes with devtools and these changes are available, because chrome modifiy the given files.
Eg.: folder is created (C:\Users...\Desktop...), open this folder with chrome filesystem (with file protocol), enable persistent overrides and all changes from chrome are available in files.
Very common use case is making changes in chrome (small changes) and copy or rewrite it in style or html part. But with the lazy mode, changes are available just in time.
I dont have any idea, how can be enable in embedded browser, and what side effects can be happen (css prop is changed, file written, compiler detects the change, recompile code, ...).
Is this good enough? :)

Maybe try with https://github.com/antfu/windicss-runtime-dom?


Fields not displayed correctly when viewing detailed information of a log with JSON fields on the "Log Query" page

Description:
In the Log Query page, when I click on a log entry that contains JSON fields to view its detailed information, the Fields section on the right side does not display the fields correctly.
Temporary Fix:
I have made a simple fix for this issue, which you can find in the following commit:
Commit Link
If this fix is acceptable, I would be happy to submit a pull request to address this issue.

@zzzdong  it looks good,I noted a small comment.


Smartctl blog

https://wiki.opennms.org/wiki/Smartctl
https://issues.opennms.org/browse/ORG-74

Would be happy to!
But I get this error:

On Nov 27, 2017, at 2:10 PM, Ronny Trommer<EMAIL_ADDRESS>wrote:
@indigo423 approved this pull request.
Fine for me, @JessiDoesStuff https://github.com/jessidoesstuff can you add some native speaker sprinkles? :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/opennms-forge/opennms.org/pull/35#pullrequestreview-79277768, or mute the thread https://github.com/notifications/unsubscribe-auth/AQq3C2zAo6Dx4dyWih4-DGsnndADEBNPks5s6wkUgaJpZM4PxRjI.

@mfuhrmann can you give JessiDoesStuff the permissions to edit in your repo?

@JessiDoesStuff Done! :-)

@indigo423 Why did you close this one?


httpOci gives '401 on reattempt after auth: https://registry.gitlab.com/'

While trying to follow the 'Working with GitLab CI' example at: https://containers.dev/guide/gitlab-ci
using this GitLab pipeline definition:
 $ cat .gitlab-ci.yml
---
default:
  image: docker:latest
  services:
    - docker:dind

variables:
  DOCKER_TLS_CERTDIR: "/certs"

before_script:
  - apk add --update nodejs npm python3 make g++
  - npm install -g @devcontainers/cli

build:
  stage: build
  script:
    - devcontainer features package src

deploy:
  stage: deploy
  rules:
    - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
  script:
    - echo "${CI_REGISTRY_PASSWORD}" | docker login ${CI_REGISTRY} --username ${CI_REGISTRY_USER} --password-stdin
    # - cat ~/.docker/config.json
    # - export DEVCONTAINERS_OCI_AUTH="${CI_REGISTRY}|${CI_REGISTRY_USER}|${CI_REGISTRY_PASSWORD}"
    # - echo ${DEVCONTAINERS_OCI_AUTH}
    # - devcontainer features info --log-level trace tags ${CI_REGISTRY}/${CI_REGISTRY_IMAGE}/graphnos
    - devcontainer features publish --log-level trace --registry ${CI_REGISTRY} --namespace ${CI_REGISTRY_IMAGE} src

I get the following 401 auth error from httpOci. As can be seen from the commented out additional line and addition of --log-level trace I tried to determine if there was problem. But unfortunately it's not obvious to me why the 401 is happening. The docker login succeeded, and httpOci reports finding auth docker populated in /root/.docker/config.json
Executing "step_script" stage of the job script
00:09
Using docker image sha256:5b912308540a3c49177b012c400f71cbb53ff56c4ee79f36323fdff7527f9f44 for docker:latest with digest docker@sha256:1dfc375736e448806602211e09a9b1390eb110548dcb839eef374da357ca5f5d ...
$ apk add --update nodejs npm python3 make g++
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz
(1/35) Upgrading musl (1.2.4-r1 -> 1.2.4-r2)
(2/35) Installing libgcc (12.2.1_git20220924-r10)
(3/35) Installing libstdc++ (12.2.1_git20220924-r10)
(4/35) Installing libstdc++-dev (12.2.1_git20220924-r10)
(5/35) Installing binutils (2.40-r7)
(6/35) Installing libgomp (12.2.1_git20220924-r10)
(7/35) Installing libatomic (12.2.1_git20220924-r10)
(8/35) Installing gmp (6.2.1-r3)
(9/35) Installing isl26 (0.26-r1)
(10/35) Installing mpfr4 (4.2.0_p12-r0)
(11/35) Installing mpc1 (1.3.1-r1)
(12/35) Installing gcc (12.2.1_git20220924-r10)
(13/35) Installing musl-dev (1.2.4-r2)
(14/35) Installing libc-dev (0.7.2-r5)
(15/35) Installing g++ (12.2.1_git20220924-r10)
(16/35) Installing make (4.4.1-r1)
(17/35) Installing brotli-libs (1.0.9-r14)
(18/35) Installing c-ares (1.19.1-r0)
(19/35) Installing icu-data-en (73.2-r2)
Executing icu-data-en-73.2-r2.post-install
*
* If you need ICU with non-English locales and legacy charset support, install
* package icu-data-full.
*
(20/35) Installing icu-libs (73.2-r2)
(21/35) Installing nghttp2-libs (1.57.0-r0)
(22/35) Installing nodejs (18.18.2-r0)
(23/35) Installing npm (9.6.6-r0)
(24/35) Installing libbz2 (1.0.8-r5)
(25/35) Installing libexpat (2.5.0-r1)
(26/35) Installing libffi (3.4.4-r2)
(27/35) Installing gdbm (1.23-r1)
(28/35) Installing mpdecimal (2.5.1-r2)
(29/35) Installing libpanelw (6.4_p20230506-r0)
(30/35) Installing readline (8.2.1-r1)
(31/35) Installing sqlite-libs (3.41.2-r2)
(32/35) Installing python3 (3.11.6-r0)
(33/35) Installing python3-pycache-pyc0 (3.11.6-r0)
(34/35) Installing pyc (0.1-r0)
(35/35) Installing python3-pyc (3.11.6-r0)
Executing busybox-1.36.1-r2.trigger
OK: 358 MiB in 89 packages
$ npm install -g @devcontainers/cli
added 1 package in 2s
$ echo "${CI_REGISTRY_PASSWORD}" | docker login ${CI_REGISTRY} --username ${CI_REGISTRY_USER} --password-stdin
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
$ devcontainer features publish --log-level trace --registry ${CI_REGISTRY} --namespace ${CI_REGISTRY_IMAGE} src
[2023-11-06T09:02:30.141Z] @devcontainers/cli 0.52.1. Node.js v18.18.2. linux 5.4.109+ x64.
[2023-11-06T09:02:30.141Z] Packaging feature collection...
[2023-11-06T09:02:30.143Z] Processing feature: feature1...
[2023-11-06T09:02:30.161Z] Packaged 1 features!
[2023-11-06T09:02:30.161Z] Processing feature: feature1...
[2023-11-06T09:02:30.162Z] > input: registry.gitlab.com/registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1
[2023-11-06T09:02:30.162Z] >
[2023-11-06T09:02:30.162Z] > resource: registry.gitlab.com/registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1
[2023-11-06T09:02:30.162Z] > id: feature1
[2023-11-06T09:02:30.162Z] > owner: registry.gitlab.com
[2023-11-06T09:02:30.162Z] > namespace: registry.gitlab.com/nickbroon/my-devcontainer-feature
[2023-11-06T09:02:30.162Z] > registry: registry.gitlab.com
[2023-11-06T09:02:30.162Z] > path: registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1
[2023-11-06T09:02:30.163Z] >
[2023-11-06T09:02:30.163Z] > version: latest
[2023-11-06T09:02:30.163Z] > tag?: latest
[2023-11-06T09:02:30.163Z] > digest?: undefined
[2023-11-06T09:02:30.163Z] Feature Annotations: {"dev.containers.metadata":"{\"id\":\"feature1\",\"version\":\"1.0.0\",\"name\":\"GraphNOS Development\",\"description\":\"GraphNOS APT repository configuration\",\"documentationURL\":\"https://gitlab.com/graphiant/tools/my-devcontainer-feature/-/blob/main/src/feature1\",\"licenseURL\":\"https://gitlab.com/graphiant/tools/my-devcontainer-feature/-/blob/main/LICENSE\",\"options\":{\"feature1_release\":{\"type\":\"string\",\"description\":\"GraphNOS Release\",\"proposals\":[\"main\",\"2.x\",\"3.x\"],\"default\":\"main\"}},\"postCreateCommand\":\"/usr/local/bin/feature1-add-apt-repo.sh\",\"containerEnv\":{\"GRAPHNOS_ENTITLEMENT_TOKEN\":\"${localEnv:GRAPHNOS_ENTITLEMENT_TOKEN}\"}}"}
[2023-11-06T09:02:30.163Z] Fetching published versions...
[2023-11-06T09:02:30.204Z] [httpOci] Attempting to authenticate via 'Bearer' auth.
[2023-11-06T09:02:30.207Z] [httpOci] Found auths entry in '/root/.docker/config.json' for registry 'registry.gitlab.com'
[2023-11-06T09:02:30.207Z] [httpOci] Attempting to fetch bearer token from:  https://gitlab.com/jwt/auth?service=container_registry&scope=repository:registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1:pull
[2023-11-06T09:02:30.358Z] [httpOci] 401 on reattempt after auth: https://registry.gitlab.com/v2/registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1/tags/list
[2023-11-06T09:02:30.358Z] (!) ERR: Could not fetch published tags for 'registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1' : {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Class":"","Name":"registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1","ProjectPath":"","Action":"pull"}]}]}

[2023-11-06T09:02:30.358Z] (!) ERR: Failed to publish 'registry.gitlab.com/registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1'
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit code 1

Why would httpOci fail to auth and get a 401 here? Any suggestions on further debugging/logging to attempt?

Thanks for sharing the detailed trace logs.
To help debug this, would you be able to create a gitlab PAT manually (ensuring the permissions are permissive enough to push/pull from the gitlab registry) and use that in instead of CI_REGISTRY_PASSWORD?  That would be helpful for me to see if it's a detail we should update in the guide, or perhaps an implementation issue in the CLI.
I'm admittedly not too familiar with gitlab registry auth, it may be an issue in the CLI's implementation here.

I created a PAT with all permissions granted and tried using that instead, but got the same error.
I made this change, and had saved the PAT in a CI variable PERSONAL_ACCCESS_TOKEN for the job to use.
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,7 +21,7 @@ deploy:
   rules:
     - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
   script:
-    - echo "${CI_REGISTRY_PASSWORD}" | docker login ${CI_REGISTRY} --username ${CI_REGISTRY_USER} --password-stdin
+    - echo "${PERSONAL_ACCCESS_TOKEN}" | docker login ${CI_REGISTRY} --username ${GITLAB_USER_LOGIN} --password-stdin
     # - cat ~/.docker/config.json
     # - export DEVCONTAINERS_OCI_AUTH="${CI_REGISTRY}|${CI_REGISTRY_USER}|${CI_REGISTRY_PASSWORD}"
     # - echo ${DEVCONTAINERS_OCI_AUTH}

Docker could still login using the PAT, and as before httpOci found auth details in config.json but failed.
$ npm install -g @devcontainers/cli
added 1 package in 1s
$ echo "${PERSONAL_ACCCESS_TOKEN}" | docker login ${CI_REGISTRY} --username ${GITLAB_USER_LOGIN} --password-stdin
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
$ devcontainer features publish --log-level trace --registry ${CI_REGISTRY} --namespace ${CI_REGISTRY_IMAGE} src
[2023-11-06T17:33:07.243Z] @devcontainers/cli 0.52.1. Node.js v18.18.2. linux 5.4.109+ x64.
[2023-11-06T17:33:07.243Z] Packaging feature collection...
[2023-11-06T17:33:07.245Z] Processing feature: feature1...
[2023-11-06T17:33:07.263Z] Packaged 1 features!
[2023-11-06T17:33:07.264Z] Processing feature: feature1...
[2023-11-06T17:33:07.265Z] > input: registry.gitlab.com/registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1
[2023-11-06T17:33:07.265Z] >
[2023-11-06T17:33:07.265Z] > resource: registry.gitlab.com/registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1
[2023-11-06T17:33:07.265Z] > id: feature1
[2023-11-06T17:33:07.265Z] > owner: registry.gitlab.com
[2023-11-06T17:33:07.265Z] > namespace: registry.gitlab.com/nickbroon/my-devcontainer-feature
[2023-11-06T17:33:07.265Z] > registry: registry.gitlab.com
[2023-11-06T17:33:07.265Z] > path: registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1
[2023-11-06T17:33:07.266Z] >
[2023-11-06T17:33:07.266Z] > version: latest
[2023-11-06T17:33:07.266Z] > tag?: latest
[2023-11-06T17:33:07.266Z] > digest?: undefined
[2023-11-06T17:33:07.266Z] Feature Annotations: {"dev.containers.metadata":"{\"id\":\"feature1\",\"version\":\"1.0.0\",\"name\":\"GraphNOS Development\",\"description\":\"GraphNOS APT repository configuration\",\"documentationURL\":\"https://gitlab.com/graphiant/tools/my-devcontainer-feature/-/blob/main/src/feature1\",\"licenseURL\":\"https://gitlab.com/graphiant/tools/my-devcontainer-feature/-/blob/main/LICENSE\",\"options\":{\"feature1_release\":{\"type\":\"string\",\"description\":\"GraphNOS Release\",\"proposals\":[\"main\",\"2.x\",\"3.x\"],\"default\":\"main\"}},\"postCreateCommand\":\"/usr/local/bin/feature1-add-apt-repo.sh\",\"containerEnv\":{\"GRAPHNOS_ENTITLEMENT_TOKEN\":\"${localEnv:GRAPHNOS_ENTITLEMENT_TOKEN}\"}}"}
[2023-11-06T17:33:07.266Z] Fetching published versions...
[2023-11-06T17:33:07.307Z] [httpOci] Attempting to authenticate via 'Bearer' auth.
[2023-11-06T17:33:07.310Z] [httpOci] Found auths entry in '/root/.docker/config.json' for registry 'registry.gitlab.com'
[2023-11-06T17:33:07.310Z] [httpOci] Attempting to fetch bearer token from:  https://gitlab.com/jwt/auth?service=container_registry&scope=repository:registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1:pull
[2023-11-06T17:33:07.481Z] [httpOci] 401 on reattempt after auth: https://registry.gitlab.com/v2/registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1/tags/list
[2023-11-06T17:33:07.481Z] (!) ERR: Could not fetch published tags for 'registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1' : {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Class":"","Name":"registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1","ProjectPath":"","Action":"pull"}]}]}

[2023-11-06T17:33:07.481Z] (!) ERR: Failed to publish 'registry.gitlab.com/registry.gitlab.com/nickbroon/my-devcontainer-feature/feature1'
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit code 1

Thanks! Every registry seems to do auth a little differently (a lot follow a specification set out by docker, but nearly every registry has some exception).  We're implementing this ourselves in the CLI so we need to account for these differences.
I think we'll need to dig in more to understand the differences. Afterwards a regression test can be placed here to ensure continued support: https://github.com/devcontainers/cli/blob/main/src/test/container-features/registryCompatibilityOCI.test.ts#L40-L69

Upon closer review, it looks like GitLab does not yet support the arifacts specification required to publish dev container Features.
I'd recommend raising an issue with gitlab, or instead publishing your Features to one of the many registries that do currently support the spec (Google CR, GitHub CR, Azure CR, docker hub, etc...)
Please do re-open this if/when the support is implemented by gitlab :)

@joshspicer can you detail or link the information you reviewed that led you to conclude that Gitlab did not support the required Artifacts Specification? I can use this as part of opening an issue with Gitlab.

The "oras" project I linked above outlines all the implementors.  I couldn't find any evidence online that this data is out-of-date, please correct me if i'm wrong: https://oras.land/docs/compatible_oci_registries#registries-supporting-oci-artifacts

I found https://gitlab.com/gitlab-org/gitlab/-/issues/385277 that requests that GitLab add support for OCI artifacts

I guess https://containers.dev/guide/gitlab-ci should be marked as not working/supported (assuming it ever did), and linked to this issues.

(For any future readers) I think that this issue may still be valid (we may need to do a little fixing of the auth implementation to support gitlab), but doing so today would provide no value without the container registry supporting the aforementioned spec


JSON Serialization

Hello, i want to serialize json from my model but i am unable to do it.
JSON Format :
[
  {
    "restaurantId": 2494,
    "typeObject": [
      {
          model 1
      },{
          model 2
      },{
          model 3
     }
 }
]

can i achieve this?

You can create a new dictionary with the following syntax
"yourKey" : [
  {
    "restaurantId": 2494,
    "typeObject": [
      {
          model 1
      },{
          model 2
      },{
          model 3
     }
 }
]

Use this dictionary to create your model class.

You can do the first option actually.
Use one of the following methods:

+arrayOfModelsFromDictionaries:error:
+arrayOfModelsFromData:error:


Add tuplify, setify and dictify decorators

These are trivial to implement using the listify decorator, but why
reinvent the wheel when you can have an expressive name.

Hey @rbu, thanks for sharing your additions!
I hope you'll continue to maintain them and use these helpers in your own unstdlib fork. I don't plan on merging these into my version of unstdlib just yet, but I will keep the PRs open and tagged for the future. :)

Btw if you have more ideas, please look for ones like listify where a simple utility can be used in all kinds of different usecases, rather than concrete manifestations of various usecases. (I'd prefer to avoid making a <type>ify for every kind of type in Python.)

Thank you @shazow for the quick response!
I was hoping to get them merged. Can you give a little bit of background on why you do not plan to merge them? Just so I know whether it's actually worthwhile to send additional PRs.
Just a little bit of background: We have been moving around these helpers in a "somewhat library" between projects already (and in fact, there's more coming). My goal is to end the endless forking and get on with depdendable versions installable via PyPI. I had the impression that sending them to unstdlib, they would be better off than in a fresh project.However, I do not see a point in maintaining my own fork just to maintain additional helpers, as this defeats the purpose: you would not get my fixes to your helpers, unless I send them, and I would have to track your changes. I'd rather have a library depending on unstdlib then.

Regarding your feedback:
I agree that dictify and setify serve rather specific purposes and if they are what is holding back this/the other PRs, I'd rather drop them. tuplify I think serves a wider purpose as it encourages designing APIs that return immutable types unless it's actually sensible to return a mutable type, which arguably with listify it almost never is.

@rbu On a high level, take a look at the Organization & Philosophy section.
The idea is that you'd fork unstdlib.py and publish your own version of it on PyPI if you need to, maybe rbu_unstdlib or something.
I suspect each person's version of unstdlib might solve a somewhat different problem. In my particular case, as expressed in the Organization & Philosophy section, I'm looking to have fewer tools that do more. I think listify vs dictify is a good example of this. I rather have listify because I can use it to do what dictify would do, but I don't need permutations of every type in this library. :)
That said, I do appreciate the PRs because it makes it easier for other people browsing to unstdlib to see relevant forks that might do things they want. (Maybe we can do more for that in the future, like have a wiki or somehow generate docs across all forks.)
Also I want to acknowledge that this is an unorthodox model for an open source project, to discourage centralization as is traditional. I'm not sure it's a Great Idea, or that it will even work, but I want unstdlib to be an experiment of this kind of model.

I'm happy to take part in the experiment (as I already did by sending PRs) and I value your feedback on the actual code (that was fun!), but as I mentioned earlier I'd rather start a downstream library from yours or keep a slimmed down fork so I don't even have to think about the parts of it I don't need right now.

I'd rather start a downstream library from yours or keep a slimmed down fork so I don't even have to think about the parts of it I don't need right now.

Sounds good to me!


Attribute selectors

Testing the beta version of backstopjs and noticed that attribute selectors don't work (but they did with phantom).
Error: An error has occurred evaluating the script in the browser.SyntaxError: Unexpected identifier
works:
selectors: [   '.test' ]
doesn't work:
selectors: [   "[data-backstop='test']" ]
Hopefully it's an easy fix! Thanks!

@lancetharper Does this work if you escape the inner quotes? e.g.
"[data-backstop=\'test\']"
or
"[data-backstop=\"test\"]"

@lancetharper thanks for posting to chromy -- but it's actually a backstop issue.  Can you let me know if using the escape works?  If so -- I will make backstop work the same as with casper in this case.   Please let me know.  thanks!

@garris I tried "[data-backstop=\"test\"]" which my linter changed to '[data-backstop="test"]' and that worked for me.

@lancetharper   Great! thanks for verifying.   I will add explicit escaping in BackstopJS soon to make the issue go away in all cases.   Cheers.


Waterfall?

Nice work.
How hard would it be to add a pinterest-like 'Waterfall' Layout ability using this?
https://github.com/chiahsien/CHTCollectionViewWaterfallLayout

I think this might be a good Android counterpart https://github.com/etsy/AndroidStaggeredGrid

iOS is now implemented in version 1.1.0

:+1: very nice!

Cool! thanks!

Just tested it out in simulator! nicely played :)
I'm curious if Ti.UI.iOS.createAnimator on the items of the CollectionView is possible, just as in native development.

Thanks for testing this @yozef !

+1

Hi @yozef,
I tried your solution on Android but it did not work!
The item gets inserted on the listView but it shows just a white square instead.
Did you experience this behaviour on your tests?
My best,

@deckameron I just tried it on iOS

@yozef Thanks! :)

Hey @deckameron ,
the waterfall layout is not available for Android.
I'm working on it ;)

@mpociot
Hi!
What about waterfall layout on Android? Maybe I could help you to implement it if you'l tell me what to do?

@mpociot  you never actually had the change to implement on Android, Im correct?

It never was change to implement on Android, sorry :(


Show Progress During Download

Maybe we can use downloadFile from rust-analyzer:
https://github.com/rust-analyzer/rust-analyzer/blob/master/editors/code/src/net.ts
which is also licensed under Apache 2.0

@magnus-madsen
I've looked it over and the solution seems solid. If we're to use the fetchRelease as well, we should have either a stable or nightly tag for https://github.com/flix/flix. If we have both we could let the user choose the one they'd prefer.

You are welcome to use their code verbatim, as long as you preserve copyright information.
As for the tags, I propose the following very simple solution:

We fetch the newest stable via the GitHub api.
If you want to use a nightly then you have to manually download and place the JAR.

Here we go:
curl https://api.github.com/repos/flix/flix/releases/latest

yields:
{
  "url": "https://api.github.com/repos/flix/flix/releases/32408169",
  "assets_url": "https://api.github.com/repos/flix/flix/releases/32408169/assets",
  "upload_url": "https://uploads.github.com/repos/flix/flix/releases/32408169/assets{?name,label}",
  "html_url": "https://github.com/flix/flix/releases/tag/v0.14.0",
  "id": 32408169,
  "node_id": "MDc6UmVsZWFzZTMyNDA4MTY5",
  "tag_name": "v0.14.0",
  "target_commitish": "master",
  "name": "Version 0.14.0",
  "draft": false,
  "author": {
    "login": "magnus-madsen",
    "id": 2287953,
    "node_id": "MDQ6VXNlcjIyODc5NTM=",
    "avatar_url": "https://avatars2.githubusercontent.com/u/2287953?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/magnus-madsen",
    "html_url": "https://github.com/magnus-madsen",
    "followers_url": "https://api.github.com/users/magnus-madsen/followers",
    "following_url": "https://api.github.com/users/magnus-madsen/following{/other_user}",
    "gists_url": "https://api.github.com/users/magnus-madsen/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/magnus-madsen/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/magnus-madsen/subscriptions",
    "organizations_url": "https://api.github.com/users/magnus-madsen/orgs",
    "repos_url": "https://api.github.com/users/magnus-madsen/repos",
    "events_url": "https://api.github.com/users/magnus-madsen/events{/privacy}",
    "received_events_url": "https://api.github.com/users/magnus-madsen/received_events",
    "type": "User",
    "site_admin": false
  },
 "prerelease": false,
  "created_at": "2020-10-10T18:04:15Z",
  "published_at": "2020-10-10T18:07:42Z",
  "assets": [
    {
      "url": "https://api.github.com/repos/flix/flix/releases/assets/26802521",
      "id": 26802521,
      "node_id": "MDEyOlJlbGVhc2VBc3NldDI2ODAyNTIx",
      "name": "flix.jar",
      "label": null,
      "uploader": {
        "login": "magnus-madsen",
        "id": 2287953,
        "node_id": "MDQ6VXNlcjIyODc5NTM=",
        "avatar_url": "https://avatars2.githubusercontent.com/u/2287953?v=4",
        "gravatar_id": "",
        "url": "https://api.github.com/users/magnus-madsen",
        "html_url": "https://github.com/magnus-madsen",
        "followers_url": "https://api.github.com/users/magnus-madsen/followers",
        "following_url": "https://api.github.com/users/magnus-madsen/following{/other_user}",
        "gists_url": "https://api.github.com/users/magnus-madsen/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/magnus-madsen/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/magnus-madsen/subscriptions",
        "organizations_url": "https://api.github.com/users/magnus-madsen/orgs",
        "repos_url": "https://api.github.com/users/magnus-madsen/repos",
        "events_url": "https://api.github.com/users/magnus-madsen/events{/privacy}",
        "received_events_url": "https://api.github.com/users/magnus-madsen/received_events",
        "type": "User",
        "site_admin": false
      },
      "content_type": "application/java-archive",
      "state": "uploaded",
      "size": 33614614,
      "download_count": 0,
      "created_at": "2020-10-10T18:06:41Z",
      "updated_at": "2020-10-10T18:06:49Z",
      "browser_download_url": "https://github.com/flix/flix/releases/download/v0.14.0/flix.jar"
    }
  ],
  "tarball_url": "https://api.github.com/repos/flix/flix/tarball/v0.14.0",
  "zipball_url": "https://api.github.com/repos/flix/flix/zipball/v0.14.0",
  "body": "- Added support for Visual Studio Code via LSP.\r\n- Allow `use` directly in namespaces.\r\n- Added `default` expression.\r\n- Added `MutList` to standard library.\r\n- Improved type inference w.r.t. kinds.\r\n- Various bug fixes."
}


Configuration to delete match files

Once you change that little bit, it looks good.

@twizmwazin done


Multi-element matching returns false positives

I wrote a unit test to demonstrate that multi-element matching is not working and returns false-positives.
if list := Find(doc, "//book[genre='Fantasy'][author='Corets, Eva']"); len(list) != 1 {
	t.Fatal("//book[genre='Fantasy'][author='Corets, Eva'] items count is not equal 1")
}

https://github.com/drauschenbach/xquery/blob/master/xml/query_test.go

Hi,@drauschenbach ,//book[genre='Fantasy'][author='Corets, Eva'] matches 2 elements: <book id="bk103"> and <book id="bk102">, not one element.
im not sure whether it is right: //book[genre='Fantasy'][author='Corets, Eva'] = //book[genre='Fantasy' or author='Corets, Eva']) ??

Adjacent bracketed elements in a path means AND. At least according to my read of the spec, and this tester site: https://www.freeformatter.com/xpath-tester.html
Or another way to go, that also doesn't work, is this: //book[genre='Fantasy' and author='Corets, Eva']

Update XPath package to fix.
Thank you for reporting your issue 👍


Update pxt-blockly with new field editors

Pull pxt-blockly with colored slider change.
See https://github.com/Microsoft/pxt-blockly/pull/65

New Field editors:

colorwheel
toggle
fixing text and number dropdown fields

Tested on

[x] Edge
[x] IE
[x] Chrome Mac

@abchatra can I merge this when the build passes? or is master blocked?

Fine to merge


Parsing Error at DB Connection

dsn := "sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm"
db, err := gorm.Open(sqlserver.Open(dsn), &gorm.Config{})

The above is connecting to DB.
My password  starts with/includes the character '@'.
The golang gives error because it parse the host name after '@'.
This parsing structure should be change because the user name or password could include '@'.
Thanks

GORM using driver github.com/denisenkom/go-mssqldb

GORM using driver github.com/denisenkom/go-mssqldb


Simplify nearby classes, improve code quality

Summary:
Nearby classes needs some simplification.

Good job @neslihanturan :)


Add freethreading builders for the Fedora Rawhide buildbots

@stratakis: The test failed. Example:
Configuration Errors:
  duplicate builder builddir '3.x.cstratak-fedora-rawhide-x86_64'
  duplicate builder builddir '3.x.cstratak-fedora-rawhide-aarch64'
  duplicate builder builddir '3.x.cstratak-fedora-rawhide-ppc64le'

Merged. Let's see how it goes.


Related tables are created and validated using a wrong data type

The method createRelatedTable in RelatedTablesCoreExtension creates a new related table when needed using as data type the name of the relation (i.e. features,  media or simple_attributes):
https://github.com/ngageoint/geopackage-core-java/blob/24ba2ebe4f4ba3a7e2655875bc306f1f62e97b7e/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L662
And validates existing related tables data type agains using the name of the relation:
https://github.com/ngageoint/geopackage-core-java/blob/24ba2ebe4f4ba3a7e2655875bc306f1f62e97b7e/src/main/java/mil/nga/geopackage/extension/related/RelatedTablesCoreExtension.java#L576-L587
Contents of new related tables also perform a similar check:
https://github.com/ngageoint/geopackage-core-java/blob/24ba2ebe4f4ba3a7e2655875bc306f1f62e97b7e/src/main/java/mil/nga/geopackage/extension/related/UserRelatedTable.java#L103-L104
However, the current draft of the GeoPackage Related Tables Extension  states that the GKPG type of the related table shall be attributes for media and simple_attributes relationships.
The current behaviour hinders the usage of GPKG files created with this implementation. For example, GDAL 2 is able to list simple_attributes tables when no attributes tables are present. When any  attributes table is present, it ignores simple_attibutes and media tables by default. This behaviour affects QGIS 3 as it uses the default configuration of the underlying GDAL library and then hides simple_attributes tables when they are mixed with attributes tables.
Possible solutions:

Extend RelationType to store in a field (e.g. contentDataTypeName) the data content type associated with the relation and use it instead of the relation name for creating and validating content.
Make UserRelatedTable subclass of AttributesTables and perform required validations in setContents.

Fixed here with test updates here.
Updated example GeoPackage here.
I agree with opengeospatial/geopackage#459 to make that more clear.

Fixed in 3.1.0


Smart Answer flow tests mini RFC round 2

Trello: https://trello.com/c/qQL1Uuwh/421-review-and-feedback-on-smart-answers-integration-test-proposal
This PR continues the discussion from https://github.com/alphagov/smart-answers/pull/5394. I've opened a new PR for this as lots of progress has occurred since the initial discussion and I wanted to reduce confusion as to what was in and out of the proposal.
Backstory
As per: #5350 we have started work to form a proposal on an integration testing approach for Smart Answer Flows that is able to exercise their ERB files. The purpose of this quick RFC is to get early feedback and input on the approach to help work towards a relatively quick consensus of how to move forward.
Desirable properties of these tests are:

Fast to run
Assertions at view level to prove their execution
Method to achieve full (or at least very high) coverage of flow files
Easy to understand (well relatively, given how hard Smart Answers can be to understand)
Relatively low on tedium to write and repetition to read (ideally length of test flow file is within 2x the flow file length)
Be consistent between flows

This PR
This PR serves as a working demonstration of the new proposal for testing Smart Answer flows. It is built on top of https://github.com/alphagov/smart-answers/pull/5337 and thus uses that as a base branch to provide only the proposal in the diff (and that will break if I rebase that 😬 ).
The approach taken to testing Smart Answer flows is:

each question is tested individually, rather than a flow through an answer
all user-visible outcomes of a question are explored - such as next_node and validations
all erb files associated with a Smart Answer should be rendered as part of testing, but only asserted on specifically if they have logic
they don't aim to test code beyond what is specific for the Smart Answer flow

This PR contains examples of 5 Smart Answers written in the new approach. It builds on the 3 of the initial PR by converting them to syntax changes and making them operational, it then picks 2 of the more unique Smart Answers - BenefitCapCalculator and MarriageAbroad - to stress test this approach against some of the more unusual needs.
Syntax
Set up and start page
class ExampleFlowTest < ActiveSupport::TestCase
  include ExperimentalFlowTestHelper

  setup { testing_flow SmartAnswer::ExampleFlow }

  should "render a start page" do
    assert_rendered_start_page
  end

  # ...
end

Asserting a question goes to a next node
  context "question: receiving_non_exemption_benefits?" do
    setup do
      testing_node :receiving_non_exemption_benefits?
      add_responses receive_housing_benefit?: "yes",
                    working_tax_credit?: "no",
                    receiving_exemption_benefits?: []
    end

    should "render question" do
      assert_rendered_question
    end

    context "next_node" do
      should "have a next node of housing_benefit_amount? for an empty response" do
        assert_next_node :housing_benefit_amount?, for_response: []
      end

      should "have a next node based on the response" do
        assert_next_node :bereavement_amount?, for_response: %w[bereavement child_benefit]
      end
    end
  end

Testing validation
  context "question :shift_worker_hours_per_shift?" do
    setup do
      testing_node :shift_worker_hours_per_shift?
      add_responses basis_of_calculation?: "shift-worker",
                    shift_worker_basis?: "full-year"
    end

    should "render question" do
      assert_rendered_question
    end

    context "validation" do
      should "be invalid for hours below 0" do
        assert_invalid_response "-1"
      end

      should "be invalid for hours above 24" do
        assert_invalid_response "25"
      end
    end

    context "next_node" do
      should "have a next node of shift_worker_shifts_per_shift_pattern?" do
        assert_next_node :shift_worker_shifts_per_shift_pattern?, for_response: "8"
      end
    end
  end

Testing logic in an outcome
  context "outcome: results" do
    setup { testing_node :results }

    should "render feeling unsafe help when the appropriate responses are given" do
      add_responses need_help_with: %w[feeling_unsafe],
                    feel_unsafe: "yes",
                    nation: "england"

      assert_rendered_outcome text: "If you feel unsafe where you live or you’re worried about someone else"
    end
  end

What has changed since the last PR
Shoulda matchers are gone
These have been removed because they have a problem that you can't run the test individually.
For example, if a shoulda matcher fails you are suggested to run: rails test /Users/kevindew/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/shoulda-context-2.0.0/lib/shoulda/context/context.rb:62 which isn't much help.
So, despite the extra duplication of typing involved I concluded not using shoulda matchers was a better option
Setting the node being tested
There is now syntax of testing_node :node_name in context blocks for questions and outcomes. This serves two purposes: 1) making it easier to isolate what is tested and 2) reducing duplication in assertions.
I found while writing these tests that it was easy to have problems with the setup information for a response, which could be difficult to debug for a next node and could be wholly misleading for any validation tests (for example if you're testing a value is invalid and an earlier response is also invalid your test may incorrectly pass). I found these problems were vastly reduced by setting the node and then ensuring it's valid before actually asserting on the code.
Context blocks for next_node and validations
As suggested in the feedback of https://github.com/alphagov/smart-answers/pull/5394 this has been done to make it clearer what we're actually testing within a question node.
My expectation is that we always test next_node and validate blocks, as they produce a user visible outcome. I don't think we need to test an on_response block unless it does something complex that needs testing as these are implicitly tested for any logic in the Smart Answer (the logic is what's the point of an on_response block if it doesn't end up doing something visual)
Only asserting on conditional content
As per the consensus of https://github.com/alphagov/smart-answers/pull/5394 we don't need to do lots of content checking. Instead we just assert that expected content isn't empty which exercises the view.
The place were we do assert on content is outcomes that have conditional logic.
Change of test directory
These tests have moved from their previous location of test/integration/smart_answer_flows to test/flows. This has been done to better capture that tests are a little bit special and have aspects of both integration and unit tests.
The intention is to later move the code for the flows from lib/smart_answer/smart_answer_flows to app/flows which will match the tests. Given that the flows aren't library code and have various erb files they seem more logically placed in the app directory.
What/how to Feedback
This code is now reaching a state where it is approaching mergability, so I'm hoping we're mostly past the point of needing any drastic changes and more in the realm of refinement.
It'd be good to learn if the approach demonstrated here:

raises any questions
any of the new things in this raise eyebrows
any concerns you have that this approach might not be suitable for a particular flow scenario
any (hopefully minor) suggestions on what would make this better

Hi @kevindew - this is looking really good! It's a shame we lost the shoulda matchers - I kinda liked that syntax. But I understand why.
It'll be interesting to convert some of the existing tests and see how long it takes to get the pattern and (like everyone who's worked on Smart Answers) to see how much faster the tests run once they're all done!

Cracking job, don't really have anything to add. I really like how universal it's become. Marriage abroad is a great improvement!

Thanks @gclssvglx and @JonathanHallam 👍 . Yeah speed wise will be interesting. I'm expecting it'll mostly just make the current rpsec time negligible. A couple of quick benchmarks for prosperity"
A recent CI run took 4 mins 10 second.

Finished in 1 minute 24.7 seconds (files took 3.01 seconds to load)
71 examples, 0 failures

Randomized with seed 36254

Coverage report generated for RSpec to /var/lib/jenkins/workspace/smartanswers_main/coverage. 4245 / 10467 LOC (40.56%) covered.
rake jasmine:ci
Puma starting in single mode...
* Puma version: 5.3.2 (ruby 2.7.2-p137) ("Sweetnighter")
*  Min threads: 5
*  Max threads: 5
*  Environment: test
*          PID: 26248
* Listening on http://<IP_ADDRESS>:42672
Use Ctrl-C to stop
Waiting for server on localhost:42672...
jasmine server started
Waiting for suite to finish in browser ...
............
12 specs, 0 failures
bundle exec brakeman . --except CheckRenderInline --no-summary --quiet

No warnings found

Run options: --seed 26074

# Running:

...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................warning: parser/current is loading parser/ruby27, which recognizes
warning: 2.7.3-compliant syntax, but you are running 2.7.2.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
warning: parser/current is loading parser/ruby27, which recognizes
warning: 2.7.3-compliant syntax, but you are running 2.7.2.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
warning: parser/current is loading parser/ruby27, which recognizes
warning: 2.7.3-compliant syntax, but you are running 2.7.2.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
warning: parser/current is loading parser/ruby27, which recognizes
warning: 2.7.3-compliant syntax, but you are running 2.7.2.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................../var/lib/jenkins/workspace/smartanswers_main/lib/support_ticket.rb:44: warning: GDSZendesk::Client#ticket at /usr/lib/rbenv/versions/2.7.2/lib/ruby/2.7.0/forwardable.rb:154 forwarding to private method ZendeskAPI::Client#ticket
.../var/lib/jenkins/workspace/smartanswers_main/lib/support_ticket.rb:44: warning: GDSZendesk::Client#ticket at /usr/lib/rbenv/versions/2.7.2/lib/ruby/2.7.0/forwardable.rb:154 forwarding to private method ZendeskAPI::Client#ticket
......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Finished in 132.991241s, 57.0038 runs/s, 154.9501 assertions/s.
7581 runs, 20607 assertions, 0 failures, 0 errors, 0 skips

In my local environment things are much slower 😢  (to the extent I'm sure I must have a problem)

Local run, 14 mins total, 7 mins RSpec
➜  smart-answers git:(main) echo "starting `date`" && rake && echo "finished `date`"
starting Mon 21 Jun 2021 16:46:27 BST
bundle exec rubocop --parallel
Inspecting 432 files
................................................................................................................................................................................................................................................................................................................................................................................................................................................

432 files inspected, no offenses detected
yarn run lint
yarn run v1.22.10
$ yarn run lint:js && yarn run lint:scss
$ standardx 'app/assets/javascripts/**/*.js' 'spec/javascripts/**/*.js'
$ stylelint app/assets/stylesheets/
✨  Done in 4.74s.
/Users/kevindew/.rbenv/versions/2.7.2/bin/ruby -I/Users/kevindew/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib:/Users/kevindew/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rspec-support-3.10.2/lib /Users/kevindew/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb

Randomized with seed 58364
.......................................................................

Finished in 7 minutes 38 seconds (files took 5.49 seconds to load)
71 examples, 0 failures

Randomized with seed 58364

Coverage report generated for RSpec to /Users/kevindew/govuk/smart-answers/coverage. 4245 / 10467 LOC (40.56%) covered.
rake jasmine:ci
Puma starting in single mode...
* Puma version: 5.3.2 (ruby 2.7.2-p137) ("Sweetnighter")
*  Min threads: 5
*  Max threads: 5
*  Environment: test
*          PID: 46690
* Listening on http://<IP_ADDRESS>:63910
Use Ctrl-C to stop
Waiting for server on localhost:63910...
jasmine server started
Waiting for suite to finish in browser ...
............
12 specs, 0 failures
bundle exec brakeman . --except CheckRenderInline --no-summary --quiet

No warnings found

Run options: --seed 44068

# Running:

.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................warning: parser/current is loading parser/ruby27, which recognizes
warning: 2.7.3-compliant syntax, but you are running 2.7.2.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................warning: parser/current is loading parser/ruby27, which recognizes
warning: parser/current is loading parser/ruby27, which recognizes
warning: 2.7.3-compliant syntax, but you are running 2.7.2.
warning: 2.7.3-compliant syntax, but you are running 2.7.2.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
.warning: parser/current is loading parser/ruby27, which recognizes
warning: 2.7.3-compliant syntax, but you are running 2.7.2.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................/Users/kevindew/govuk/smart-answers/lib/support_ticket.rb:44: warning: GDSZendesk::Client#ticket at /Users/kevindew/.rbenv/versions/2.7.2/lib/ruby/2.7.0/forwardable.rb:154 forwarding to private method ZendeskAPI::Client#ticket
./Users/kevindew/govuk/smart-answers/lib/support_ticket.rb:44: warning: GDSZendesk::Client#ticket at /Users/kevindew/.rbenv/versions/2.7.2/lib/ruby/2.7.0/forwardable.rb:154 forwarding to private method ZendeskAPI::Client#ticket
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Finished in 351.097830s, 21.5923 runs/s, 58.6930 assertions/s.
7581 runs, 20607 assertions, 0 failures, 0 errors, 0 skips
finished Mon 21 Jun 2021 17:00:52 BST

@leenagupte

I'm not sure if this is supposed to be production-ready or just an example? If it's just an example then 👍 🎉 . If it's supposed to be production ready, there's a few nitpicks about how many responses need to be added to the initial setup in the tests. It would be nicer if that set-up is closer to the thing being tested.

Not production ready yet, opened for feedback rather than as a pre-cursor to merging. I plan to have less tests in a single PR (probably just one) as I imagine 5 is a bit overwhelming for review, but good for getting a feel of the approach.
I think it'd be helpful to add your comment about responses though as that sounds like something that'll be common to every implementation of this (you'll always need to set-up the necessary response context to test a node). One of the pain points I anticipated was this feeling very tedious but it hasn't been too bad on the ones I've tested so far.

I don't have any helpful suggestions I'm afraid, but I think documentation-wise what would be help is to know which type of test to use and when. Also, do these tests replace the existing integration and unit tests?

Yes they'll supersede and lead to the removal of test/integration/smart_answer_flows, test/unit/smart_answer_flows and spec/features/flows. One of things I have to work out still is how to deal with any namespace collisions as they co-exist (these example tests avoid that by having ExperimentalFlow in their name)

The approach gets a 👍 from me.

🎉
Thanks for the comments - really helpful 👍

I've pushed up a commit https://github.com/alphagov/smart-answers/pull/5440/commits/b299889707416d04f0e4b793bf251f012eb58347 which explores how we could test SmartAnswers with shared functionality without duplicating all the tests. It's perhaps a bit contrived as the two flows compared are almost identical but seemed to work.

Superseded by: https://github.com/alphagov/smart-answers/pull/5459
Bits and pieces to be pulled out into separate PR's


503 Service Temporarily Unavailable

I'm trying to run wallabag with nginx-proxy. I can run Wallabag directly:
$ docker run --detach  -v /opt/wallabag/data:/var/www/wallabag/data -v /opt/wallabag/images:/var/www/wallabag/web/assets/images -p 80:80 wallabag/wallabag

and it works (and redirects to the login page):
$ curl -I http://localhost
HTTP/1.1 302 Found
Server: nginx
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Powered-By: PHP/7.1.14
Set-Cookie: PHPSESSID=f3977b6703abd265a234b46a8ef7ab90; path=/; HttpOnly
Cache-Control: no-cache, private
Date: Fri, 02 Mar 2018 07:49:58 GMT
Location: http://localhost/login

But then I try running it with nginx-proxy
docker run -d     --name nginx-proxy     -p 80:80     -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy

docker run -d --name wallabag -v /opt/wallabag/data:/var/www/wallabag/data -v /opt/wallabag/images:/var/www/wallabag/web/assets/images -e VIRTUAL_HOST=wallabag wallabag/wallabag

and I get this error message.
curl -i http://wallabag.localhost
HTTP/1.1 503 Service Temporarily Unavailable
Server: nginx/1.13.8
Date: Fri, 02 Mar 2018 07:56:38 GMT
Content-Type: text/html
Content-Length: 213
Connection: keep-alive

<title>503 Service Temporarily Unavailable</title>

503 Service Temporarily Unavailable

nginx/1.13.8

I'm sure it's my fault, but I'm not sure where. Any ideas where I could be messing this up? Thanks!

Following. Having the same issue when running reaction commerce with nginx reverse proxy and letsencrypt docker containers. My reaction commerce app runs on port 3000

Your VIRTUAL_HOST is set to wallabag but you're requesting wallabag.localhost - these are 2 different hostnames, and nginx-proxy returns 503 when there's no hostname match.
Have you tried with -e VIRTUAL_HOST=wallabag.localhost ?

@sickill Thanks for responding. Here's the result I get when trying that:
$ docker run -d     --name nginx-proxy     -p 80:80     -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy

$ docker run -d --name wallabag -v /opt/wallabag/data:/var/www/wallabag/data -v /opt/wallabag/images:/var/www/wallabag/web/assets/images -e VIRTUAL_HOST=wallabag.localhost wallabag/wallabag

$ curl -i http://wallabag.localhost
HTTP/1.1 502 Bad Gateway
Server: nginx/1.13.8
Date: Mon, 05 Mar 2018 01:29:41 GMT
Content-Type: text/html
Content-Length: 173
Connection: keep-alive

<title>502 Bad Gateway</title>

502 Bad Gateway

nginx/1.13.8

No idea what's happening here. But I would suggested dropping -d from both docker run commands and start them in foreground in 2 separate terminal tabs/windows. This way you can easily see all output/errors from the processes in these containers.

@sickill Good idea. It works well; the service was still starting up when I tried to connect to it. Running without -d allowed me to see when it was ready. Thanks!