fix(preview): fix router when deployed on subpath

Component / Package Name:
This PR contains:

[x] bugfix
[ ] feature
[ ] refactor
[ ] documentation
[ ] other

Are tests included?

[ ] yes (bugfixes and features will not be merged without tests)
[x] no

Breaking Changes?

[ ] yes (breaking changes will not be merged unless absolutely necessary)
[x] no

If yes, please include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.
List any relevant issue numbers: https://github.com/shellscape/jsx-email/issues/245
This PR fixes an incorrect setting introduced here https://github.com/shellscape/jsx-email/pull/247

Description
The preview still doesn't work when deployed on the subpath.  Assets are loaded but router configured incorrectly and returns Route not Found error
I'm filling a bit guilty, because I proposed this solution, but actually i didn't test it and speculated only looking to the code on the github. It turned out that the basepath should go into the basename router parameter.

Running the code as-is with your method for testing worked successfully. Is it only when deployed beyond localhost that it fails? I'm looking for the conditions needed for the code to fail as it is in main, since that's the only way we can protect against regressions here.

Tested it once again using STR from issue (but added --base-path email-preview):

email preview ./emails/templates --build-path /tmp/subpath/email-preview --base-path email-preview
npx http-server  /tmp/subpath/
Open link http://<IP_ADDRESS>:8080/email-preview/

Getting the same result i've got on real deployment:

Strange, that's what I used to test and it worked here.

Just found that pnpm resigned to update @jsx-email/app-preview stated as peer automatically. So i had following dependencies
"jsx-email": "2.3.5"
"@jsx-email/app-preview": "2.0.2"
When i updated the @jsx-email/app-preview explicitly to the latest i was able to see the preview app on the http://<IP_ADDRESS>:8080/email-preview/
But the react-router is still configured incorrectly, when you click on any of the templates you will see that it creates an incorrect path /{template name} instead of /email-preview/{template name}, and next f5 will cause page to be broken again.
This PR is fixing this. Currently, you assign only the root path in the router to the basepath.

Thoughts:
Using a path based navigation /root/templateName brings additional complication for the deployment and make the artifact non-transportable.
It's possible to achieve more self-contained / deployment-proof artifact if you will use hash based navigation instead:
/root/#?templateId={}
This approach is used in the playwright reports, for example. Also this approach allow deploying without an explicit specifying a --base-path

Good catch.om the url. Will give this some thoughts today and act on it tonight.

Played around a bit with this. I'm liking the pattern of /root/#virtual/template/path since it looks pretty and isn't much of a cognitive jump. We're heading out of town this afternoon for the U.S. Thanksgiving holiday, so I'll probably be a bit more delayed than usual. If that pattern is something you'd like to work into this PR, that would be cool. No worries if not, I can get to it when I'm free.

Using createHashRouter is working quite well. I'm going to release a patch version of jsx-email and a major version of @jsx-email/app-preview with the routing changes, and some other misc internal changes that speed up the preview, and should allow for the flexible deployments.

Using createHashRouter is working quite well. I'm going to release a patch version of jsx-email and a major version of @jsx-email/app-preview with the routing changes, and some other misc internal changes that speed up the preview, and should allow for the flexible deployments.

After implementing createHashRouter you can also drop recently added --base-path parameter, and set relative base https://vite.dev/guide/build#relative-base

@shellscape thanks, also path: import.meta.env.VITE_JSXEMAIL_BASE_PATH || '/' should be deleted as it's not needed with hash-based router


Closes 12 - Quick fix: empty belongs_to ids crash.

Scenario: a User belongs to a Country and a Country has many Users.
In the User index we have table-plus-with-filters and you can filter by Country.
If you just click on Search, hobo-metasearch complains because there is no
such Country with id="nothing".
This is a quick fix, but I think we should enforce the input checking. What
about a regexp to ensure that this parameter is an integer for example?.

Nice fix. I agree, maybe a regex would be helpful.


compressed file support

currently I got several zip files of PSP ROM. They're not be recognized by Daijisho unless I decompress them.

PPSSPP doesn't support loading games from zip. Decompress it. If you're worried about saving space you can convert PSP games to cso format.

PPSSPP doesn't support loading games from zip. Decompress it. If you're worried about saving space you can convert PSP games to cso format.

But RetroArch - PPSSPP supports scan and play zip file.

It's not worth the hassle to use zips for disc based games. If core crashes, which PPSSPP certainly does at times, it will not clear the cache folder. RetroArch unzips the files to a cache folder, plays the first file it finds (optical disc games for systems like PSX & Sega CD will have problems), & delete cache afterwards when content is closed (wouldn't that cause wear SD cards?)
This is why stuff like CHD and CSO exist. Convert your games if you want to prevent possible future problems & save on space. But if you do want it you can simply add it to the playler

Daijishou > Settings > Library > Inspect Player > select the player > add zip to Player accepted filename regex > Save

It's not worth the hassle to use zips for disc based games. If core crashes, which PPSSPP certainly does at times, it will not clear the cache folder. RetroArch unzips the files to a cache folder, plays the first file it finds (optical disc games for systems like PSX & Sega CD will have problems), & delete cache afterwards when content is closed (wouldn't that cause wear SD cards?)
This is why stuff like CHD and CSO exist. Convert your games if you want to prevent possible future problems & save on space. But if you do want it you can simply add it to the playler

Daijishou > Settings > Library > Inspect Player > select the player > add zip to Player accepted filename regex > Save

Cool, thx for explanation.

hi @Jetup13, one more question, why psp player doesn't support CHD by default?

You would have to direct that question to PPSSPP's devs. It's been requested years ago. Here's the issue ticket


how to fix "file does not exist and no rule available"?

hi.
root@AR:/usr/local/housejeffries-site# /usr/local/housejeffries-site/.stack-work/install/i386-linux/nightly-2016-09-09/8.0.1/bin/main build
Error when running Shake build system:

build
Error, file does not exist and no rule available:
build
CallStack (from HasCallStack):
error, called at src/Development/Shake/Rules/File.hs:103:58 in shake-0.15.10-GcLMYwHJl6F2fOZ4KrIiXZ:Development.Shake.Rules.File

root@AR:/usr/local/housejeffries-site#
thank you

I just switched over to the foward-defined version of Shake: https://github.com/seagreen/housejeffries/blob/master/Main.hs#L72 (Development.Shake.Forward). This will make problems like yours not occur because we don't have to both figure out what to build, write our rules, and hope they match up. Instead we just look at the source files and then do things based on them in one step.

hi.
root@localhost:/usr/local/housejeffries-site# stack build
Executable named nix-shell not found on path: ["/usr/local/sbin","/usr/local/bin","/usr/sbin","/usr/bin","/sbin","/bin","/usr/games","/usr/local/games","/root/racket-6.0.1/bin","/root/.stack/programs/x86_64-linux/ghc-8.0.1/bin","/root/.cabal/bin","/usr/local/rvm/gems/ruby-2.3.0/bin","/usr/local/rvm/rubies/ruby-2.3.0/bin","/usr/local/rvm/bin","/usr/local/piecrust-site/bin","/usr/local/go/bin"]
root@localhost:/usr/local/housejeffries-site#
how to fix it?

The code assumes you're using NixOS. Since you're not you can go to this line and change enable: true to enable: false and that will fix it.
That still won't get you all the way to building the site though. As you can see the code is pretty litered with references to local files that aren't included in this repo. This is so that each page gets its own history independent of the rest of the site, for instance the home page from the previous link lives in its own repo here: https://github.com/housejeffries-pages/1
I'll push up a few more comments to make the code more clear today, and let me know if you have any other questions.

I updated the README, it should be less confusing now.

this time,
root@localhost:/usr/local/housejeffries-site# stack build
it shows:
...
Linking .stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS>/build/main/main ...
housejeffries-<IP_ADDRESS>: copy/register
Installing library in
/usr/local/housejeffries-site/.stack-work/install/x86_64-linux/lts-7.2/8.0.1/lib/x86_64-linux-ghc-8.0.1/housejeffries-<IP_ADDRESS>-3LeNhbqhbj2AF6stScBHaL
Installing executable(s) in
/usr/local/housejeffries-site/.stack-work/install/x86_64-linux/lts-7.2/8.0.1/bin
Registering housejeffries-<IP_ADDRESS>...
Completed 92 action(s).
root@localhost:/usr/local/housejeffries-site#
then,
root@localhost:/usr/local/housejeffries-site# .stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS>/build/main/main build
main: Error when running Shake build system:

getDirectoryDirs /home/traveller/code/mine/hjpages
/home/traveller/code/mine/hjpages: getDirectoryContents: does not exist (No such file or directory)

root@localhost:/usr/local/housejeffries-site#
how to fix it?

root@localhost:/usr/local/housejeffries-site# .stack-work/install/x86_64-linux/lts-7.2/8.0.1/bin/main build
main: Error when running Shake build system:

getDirectoryDirs /home/traveller/code/mine/hjpages
/home/traveller/code/mine/hjpages: getDirectoryContents: does not exist (No such file or directory)

root@localhost:/usr/local/housejeffries-site#

Make sure you're following the instructions in the README, and understand why they exist. What do you have the pageDir set to? This is the location the build system will go to find each page (pages are each directories themselves, with page.md and meta.json files).

it's still not ok.
i created pages dir in src:
root@localhost:/usr/local/housejeffries-site/src# ls
css  haskell  pages  resources  templates
root@localhost:/usr/local/housejeffries-site/src#
root@localhost:/usr/local/housejeffries-site/src# ls pages
2  3  4  5  6  7  page.md
root@localhost:/usr/local/housejeffries-site/src#
root@localhost:/usr/local/housejeffries-site/src# cd ..
root@localhost:/usr/local/housejeffries-site# ls
_build  housejeffries.cabal  Main.hs  MIT-LICENSE.txt  README.md  run  shell.nix  src  stack.yaml
root@localhost:/usr/local/housejeffries-site#
root@localhost:/usr/local/housejeffries-site# .stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS>/build/main/main build
main: Error when running Shake build system:

getDirectoryDirs /home/traveller/code/mine/hjpages
/home/traveller/code/mine/hjpages: getDirectoryContents: does not exist (No such file or directory)
root@localhost:/usr/local/housejeffries-site#

why still encounter error??(http://<IP_ADDRESS>:2358/Main.hs,pls check my amended Main.hs,
is  my amended Main.hs file not correct?

Your Main.hs looks good to me. Since the error mentions that /home/traveller/code/mine/hjpages can't be found, there still must be a reference to it in the code you're running. Try deleting the current executable and recompiling to make sure your executable matches the current source code.

hi.
still not ok.
root@localhost:/usr/local/housejeffries-site# rm .stack-work/install/x86_64-linux/lts-7.2/8.0.1/bin/main
root@localhost:/usr/local/housejeffries-site# rm .stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS>/build/main/main
root@localhost:/usr/local/housejeffries-site# ls
_build               Main.hs          README.md  shell.nix  stack.yaml
housejeffries.cabal  MIT-LICENSE.txt  run        src
root@localhost:/usr/local/housejeffries-site# stack build
housejeffries-<IP_ADDRESS>: unregistering (local file changes: Main.hs)
housejeffries-<IP_ADDRESS>: configure (lib + exe)
Configuring housejeffries-<IP_ADDRESS>...
housejeffries-<IP_ADDRESS>: build (lib + exe)
Preprocessing library housejeffries-<IP_ADDRESS>...
Preprocessing executable 'main' for housejeffries-<IP_ADDRESS>...
[1 of 1] Compiling Main             ( Main.hs, .stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS>/build/main/main-tmp/Main.o )
Linking .stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS>/build/main/main ...
housejeffries-<IP_ADDRESS>: copy/register
Installing library in
/usr/local/housejeffries-site/.stack-work/install/x86_64-linux/lts-7.2/8.0.1/lib/x86_64-linux-ghc-8.0.1/housejeffries-<IP_ADDRESS>-3LeNhbqhbj2AF6stScBHaL
Installing executable(s) in
/usr/local/housejeffries-site/.stack-work/install/x86_64-linux/lts-7.2/8.0.1/bin
Registering housejeffries-<IP_ADDRESS>...
root@localhost:/usr/local/housejeffries-site# ls
_build  housejeffries.cabal  Main.hs  MIT-LICENSE.txt  README.md  run  shell.nix  src  stack.yaml
root@localhost:/usr/local/housejeffries-site# .stack-work/dist/x86_64-linux/Cabal-<IP_ADDRESS>/build/main/main build
main: Error when running Shake build system:

Top-level action/want
/usr/local/housejeffries-site/_site/index.html: openFile: does not exist (No such file or directory)

root@localhost:/usr/local/housejeffries-site#
how to fix it?tks

root@localhost:/usr/local/housejeffries-site# ls
_build  housejeffries.cabal  Main.hs  MIT-LICENSE.txt  README.md  run  shell.nix  src  stack.yaml
root@localhost:/usr/local/housejeffries-site# ls _site
ls: cannot access _site: No such file or directory
root@localhost:/usr/local/housejeffries-site#
_site isn't generated at all

Try creating _site manually.


[WFLY-16718] Override the version of all the Jakarta package namespac…

…e Elytron dependencies brought in by wildfly-core
Jira issue: https://issues.redhat.com/browse/WFLY-16718
We have not overridden all the Elytron dependencies. That makes the org.wildfly.security.elytron-base module have a mix of 1.x and 2.x dependencies.
This will be a temporal solution until we drive Elytron 2.x completely from wildfly-core.
Uses the following PRs:
#15861
#15868

Thanks @yersan. I don't know if this conflicts with https://github.com/wildfly/wildfly/pull/15857 / https://github.com/wildfly/wildfly/pull/15858 but I recommend getting those merged first. I'm not available to fix any issues with those. Plus it seems like this should be tested on top of those.

Thanks @yersan!


Descrepancy in labels using api/v1/series and api/v1/query when external label and internal label has the same key

Hello,
I am using Thanos 0.32.5.
Issue:
It was noticed flaky issue, that Thanos always exposing external_label when executing queries. But it randomly giving external_label or internal_label value when labels key is the same when querieng api/v1/series.
Here is prometheus output:

And after application external_label, the new label cluster shows in thanos:

But when I am querieng api/v1/series endpoint, it randomly gives value of cluster:
{   "status": "success",   "data": [     {       "__name__": "collectd_collectd_queue_length",       "cassandra_datastax_com_cluster": "cassandra",       "cassandra_datastax_com_datacenter": "dc1",       "cluster": "cassandra",       "collectd": "write_queue",       "container": "cassandra",       "dc": "dc1",       "endpoint": "prometheus",       "exported_instance": "<IP_ADDRESS>",       "instance": "<IP_ADDRESS>:9103",       "job": "cassandra-dc1-all-pods-service",       "namespace": "cit1-core",       "pod": "cassandra-dc1-r2-sts-0",       "prometheus": "monitoring/kube-prometheus-stack-prometheus",       "prometheus_replica": "prometheus-kube-prometheus-stack-prometheus-0",       "rack": "r2",       "service": "cassandra-dc1-all-pods-service"     },     {       "__name__": "collectd_collectd_queue_length",       "cassandra_datastax_com_cluster": "cassandra",       "cassandra_datastax_com_datacenter": "dc1",       "cluster": "cassandra",       "collectd": "write_queue",       "container": "cassandra",       "dc": "dc1",       "endpoint": "prometheus",       "exported_instance": "<IP_ADDRESS>",       "instance": "<IP_ADDRESS>:9103",       "job": "cassandra-dc1-all-pods-service",       "namespace": "cit1-core",       "pod": "cassandra-dc1-r3-sts-0",       "prometheus": "monitoring/kube-prometheus-stack-prometheus",       "prometheus_replica": "prometheus-kube-prometheus-stack-prometheus-0",       "rack": "r3",       "service": "cassandra-dc1-all-pods-service"     }   ] }
Expected:
Any api call should prioritise external_label and return it as a result of request.
Possible solution:
The current solution is to rename internal label in scrape config. But mostly we are using configs via helm out of the box. Meaning, we do not set configs.  Since that, this is worth to fix discrepancy.
Series api endpoint is used by Grafana.

Are all components on the same version?

@GiedriusS sidecars have 0.32.4, the rest 0.32.5.

Hey, are you able to share some downstream blocks so we can try to reproduce locally? Also what downstream stores apis are you querying?

@mhoffm-aiven

what downstream stores apis are you querying
Not sure what are downstream stores apis. But we have global thanos, which is querieng querier on another cluster, which works with thanos sidecar. Data is stored in gcp bucket.

are you able to share some downstream blocks so we can try to reproduce locally
Can you help me with some guide? Should I just send you some chunks from bucket? If so, how can I find necessary chunks (we have too many of them and no "created at" in gcp bucket".

Mh, ok so sharing might not be practical. With "downsteam store api" i meant essentially "--endpoint"s!

Can you bump sidecars to 0.32.5? There was this
https://github.com/thanos-io/thanos/pull/6816 Store: fix prometheus store label values matches for external labels
Which feels somewhat related.

@MichaHoffmann
I suspect it is enough just to bump sidecar on the cluster where the issue is reproducible?
If so, I bumped to 0.32.5:
{     "status": "success",     "data": [         {             "__name__": "org_apache_cassandra_metrics_thread_pools_completed_tasks",             "cassandra_datastax_com_cluster": "-cassandra",             "cassandra_datastax_com_datacenter": "dc1",             "cluster": "cit1-k8s",             "container": "cassandra",             "datacenter": "dc1",             "endpoint": "metrics",             "exported_instance": "<IP_ADDRESS>",             "host": "3a2b71b6-8026-4323-a5d9-6b9420258bc5",             "instance": "<IP_ADDRESS>:9000",             "job": "-cassandra-dc1-all-pods-service",             "namespace": "cit1--core",             "node_name": "gke-cit1-k8s-cit1-nodepool-1-331970fb-6w90",             "pod": "-cassandra-dc1-r3-sts-0",             "pod_name": "-cassandra-dc1-r3-sts-0",             "pool_name": "PerDiskMemtableFlushWriter_0",             "pool_type": "internal",             "prometheus": "monitoring/kube-prometheus-stack-prometheus",             "prometheus_replica": "prometheus-kube-prometheus-stack-prometheus-0",             "rack": "r3",             "service": "-cassandra-dc1-all-pods-service"         },         {             "__name__": "org_apache_cassandra_metrics_thread_pools_completed_tasks",             "cassandra_datastax_com_cluster": "-cassandra",             "cassandra_datastax_com_datacenter": "dc1",             "cluster": "cit1-k8s",             "container": "cassandra",             "datacenter": "dc1",             "endpoint": "metrics",             "exported_instance": "<IP_ADDRESS>",             "host": "1252ec4c-66b7-47de-9745-42d368198c3e",             "instance": "<IP_ADDRESS>:9000",             "job": "-cassandra-dc1-all-pods-service",             "namespace": "cit1--core",             "node_name": "gke-cit1-k8s-cit1-nodepool-1-331970fb-xmr5",             "pod": "-cassandra-dc1-r2-sts-0",             "pod_name": "-cassandra-dc1-r2-sts-0",             "pool_name": "PerDiskMemtableFlushWriter_0",             "pool_type": "internal",             "prometheus": "monitoring/kube-prometheus-stack-prometheus",             "prometheus_replica": "prometheus-kube-prometheus-stack-prometheus-0",             "rack": "r2",             "service": "-cassandra-dc1-all-pods-service"         },         {             "__name__": "org_apache_cassandra_metrics_thread_pools_completed_tasks",             "cassandra_datastax_com_cluster": "-cassandra",             "cassandra_datastax_com_datacenter": "dc1",             "cluster": "-cassandra",             "container": "cassandra",             "datacenter": "dc1",             "endpoint": "metrics",             "exported_instance": "<IP_ADDRESS>",             "host": "1cae4b22-a89b-451f-8f02-d276b86efb83",             "instance": "<IP_ADDRESS>:9000",             "job": "-cassandra-dc1-all-pods-service",             "namespace": "cit1--core",             "node_name": "gke-cit1-k8s-cit1-nodepool-1-331970fb-movi",             "pod": "-cassandra-dc1-r1-sts-0",             "pod_name": "-cassandra-dc1-r1-sts-0",             "pool_name": "PerDiskMemtableFlushWriter_0",             "pool_type": "internal",             "prometheus": "monitoring/kube-prometheus-stack-prometheus",             "prometheus_replica": "prometheus-kube-prometheus-stack-prometheus-0",             "rack": "r1",             "service": "-cassandra-dc1-all-pods-service"         }     ] }
Issue not gone.

what downstream stores apis are you querying
With "downsteam store api" i meant essentially "--endpoint"s!

Well, we have many endpoints.
        - query         - '--log.level=info'         - '--log.format=logfmt'         - '--grpc-address=<IP_ADDRESS>:10901'         - '--http-address=<IP_ADDRESS>:10902'         - '--query.replica-label=replica'         - '--endpoint=thanos-sidecar-querier-query-grpc.monitoring.svc:10901'         - '--endpoint=thanos-storegateway.monitoring.svc:10901'         - '--endpoint=lv01-prometheus01.int.company.live:10903'         - '--endpoint=lv01-prometheus02.int.company.live:10903'         - '--endpoint=ro01-prometheus01.int.company.live:10903'         - '--endpoint=ro01-prometheus02.int.company.live:10903'         - '--endpoint=ge01-prometheus01.int.company.live:10903'         - '--endpoint=ge01-prometheus02.int.company.live:10903'         - '--endpoint=thanos.ci.int.company.live:443'         - '--endpoint=thanos.ci-en1.int.company.live:443'         - '--endpoint=thanos.dev.int.company.live:443'         - '--endpoint=thanos.live.int.company.live:443'         - '--endpoint=thanos-1.global.int.company.live:443'         - >-           --endpoint=astradb-thanos-sidecar-querier-query-grpc.monitoring.svc:10901         - '--grpc-client-tls-secure'         - '--grpc-client-tls-cert=/certs/client/tls.crt'         - '--grpc-client-tls-key=/certs/client/tls.key'         - '--grpc-client-tls-ca=/certs/client/ca.crt'
The one, which have metrics in questions is thanos.dev.int.company.live:443

@andrejshapal Can you try bumping up the version? Seems it is the same bug fixed in v0.32.5

@yeya24
Hello,
Bumped everything to 0.32.5 and still see the same issue.

Hey @andrejshapal can you share configuration of the offending thanos.dev.int.company.live please?

@MichaHoffmann Sure:
spec:
  project: application-support
  source:
    repoURL: https://charts.bitnami.com/bitnami
    chart: thanos
    targetRevision: "12.13.13"
    helm:
      values: |
        fullnameOverride: thanos
        existingObjstoreSecret: thanos-objstore
        existingObjstoreSecretItems:
          - key: objstore.yml
            path: objstore.yml

        metrics:
          enabled: true
          serviceMonitor:
            enabled: true
            labels:
              prometheus: main

        query:
          replicaCount: 4
          dnsDiscovery:
            enabled: false

          resources:
            requests:
              cpu: 2
              memory: 15G
            limits:
               cpu: 3
               memory: 20G

          stores:
            - "thanos-sidecar-querier-query-grpc.monitoring.svc:10901"
            - "thanos-storegateway.monitoring.svc:10901"
            - "lv01-prometheus01.int.onairent.live:10903"
            - "lv01-prometheus02.int.onairent.live:10903"
            - "ro01-prometheus01.int.onairent.live:10903"
            - "ro01-prometheus02.int.onairent.live:10903"
            - "ge01-prometheus01.int.onairent.live:10903"
            - "ge01-prometheus02.int.onairent.live:10903"
            - "thanos.ci.int.onairent.live:443"
            - "thanos.ci-en1.int.onairent.live:443"
            - "thanos.dev.int.onairent.live:443"
            - "thanos.live.int.onairent.live:443"
            - "thanos-1.global.int.onairent.live:443"
            - "astradb-thanos-sidecar-querier-query-grpc.monitoring.svc:10901"

          grpc:
            client:
              tls:
                enabled: true
                existingSecret:
                  name: thanos-client-server-cert
                  keyMapping:
                    ca-cert: ca.crt
                    tls-cert: tls.crt
                    tls-key: tls.key

        bucketweb:
          enabled: true
          extraFlags:
            - --label=cluster
          ingress:
            enabled: true
            hostname: thanos-bucketweb.global.int.onairent.live
            annotations:
              kubernetes.io/ingress.class: traefik-internal
            tls:
            - hosts:
              - thanos-bucketweb.global.int.onairent.live
              secretName: wildcard-global-int-onairent-live

        compactor:
          enabled: true
          logLevel: debug
          retentionResolutionRaw: 1y
          retentionResolution5m: 1y
          retentionResolution1h: 1y
          extraFlags:
            - --compact.concurrency=1
            - --downsampling.disable
            - --bucket-web-label=cluster
            - --compact.skip-block-with-out-of-order-chunks
          persistence:
            enabled: true
            size: 600Gi

          resources:
            requests:
              cpu: 3
              memory: 2G
            limits:
               memory: 10G

        storegateway:
          enabled: true
          replicaCount: 4
          persistence:
            enabled: true
            size: 45Gi
          updateStrategyType: RollingUpdate
          readinessProbe:
            failureThreshold: 10
            periodSeconds: 30
          resources:
            requests:
              cpu: 1
              memory: 25G
            limits:
               cpu: 3
               memory: 30G
          grpc:
            server:
              tls:
                enabled: true
                existingSecret:
                  name: thanos-client-server-cert
                  keyMapping:
                    ca-cert: ca.crt
                    tls-cert: tls.crt
                    tls-key: tls.key

        queryFrontend:
          ingress:
            enabled: true
            hostname: thanos-query-frontend.global.int.onairent.live
            annotations:
              kubernetes.io/ingress.class: traefik-internal
            tls:
            - hosts:
              - thanos-query-frontend.global.int.onairent.live
              secretName: wildcard-global-int-onairent-live

          extraFlags:
            - --query-frontend.log-queries-longer-than=10s
            - --labels.max-query-parallelism=28
            - --query-range.max-query-parallelism=28
            - --query-range.split-interval=2h

        receive:
          enabled: false

        volumePermissions:
          enabled: true

I also noticed it returns one cluster untill 07:00 27/10/2023 (local time, now is 12:41) and at 07:05 already 2 "clusters".

can you share the prometheus configurations from the instances that monitor the offending cassandra cluster too please?

We use kube-prometheus-stack. Nothing really special:
    - repoURL: https://prometheus-community.github.io/helm-charts
      chart: kube-prometheus-stack
      targetRevision: "50.3.1"
      helm:
        values: |
          fullnameOverride: kube-prometheus-stack
          commonLabels:
            prometheus: main

          defaultRules:
            create: false

          kube-state-metrics:
            fullnameOverride: kube-state-metrics
            prometheus:
              monitor:
                enabled: true
                additionalLabels:
                  prometheus: main
                metricRelabelings:
                  - action: labeldrop
                    regex: container_id
                  - action: labeldrop
                    regex: uid
                  - sourceLabels: [__name__]
                    action: drop
                    regex: 'kube_configmap_(annotations|created|info|labels|metadata_resource_version)'
            collectors:
              - certificatesigningrequests
              - configmaps
              - cronjobs
              - daemonsets
              - deployments
              - endpoints
              - horizontalpodautoscalers
              - ingresses
              - jobs
              - limitranges
              - mutatingwebhookconfigurations
              - namespaces
              - networkpolicies
              - nodes
              - persistentvolumeclaims
              - persistentvolumes
              - poddisruptionbudgets
              - pods
              - replicasets
              - replicationcontrollers
              - resourcequotas
              - secrets
              - services
              - statefulsets
              - storageclasses
              - validatingwebhookconfigurations
              - volumeattachments
            metricLabelsAllowlist:
              - pods=[version]

          kubeScheduler:
            enabled: false

          kubeEtcd:
            enabled: false

          kubeProxy:
            enabled: false

          kubeControllerManager:
            enabled: false

          prometheus-node-exporter:
            fullnameOverride: node-exporter
            extraArgs:
              - --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/)
              - --collector.filesystem.fs-types-exclude=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|tmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$
            prometheus:
              monitor:
                enabled: true
                additionalLabels:
                  prometheus: main
                relabelings:
                  - action: replace
                    sourceLabels:
                    - __meta_kubernetes_pod_node_name
                    targetLabel: instance

          coreDns:
            enabled: false

          kubelet:
            enabled: true
            serviceMonitor:
              cAdvisorMetricRelabelings:
                - sourceLabels: [__name__]
                  action: drop
                  regex: 'container_cpu_(cfs_throttled_seconds_total|load_average_10s|system_seconds_total|user_seconds_total)'
                - sourceLabels: [__name__]
                  action: drop
                  regex: 'container_fs_(io_current|io_time_seconds_total|io_time_weighted_seconds_total|reads_merged_total|sector_reads_total|sector_writes_total|writes_merged_total)'
                - sourceLabels: [__name__]
                  action: drop
                  regex: 'container_memory_(mapped_file|swap)'
                - sourceLabels: [__name__]
                  action: drop
                  regex: 'container_(file_descriptors|tasks_state|threads_max)'
                - sourceLabels: [__name__]
                  action: drop
                  regex: 'container_spec.*'
                - sourceLabels: [id, pod]
                  action: drop
                  regex: '.+;'
                - action: labeldrop
                  regex: id
                - action: labeldrop
                  regex: name
                - action: labeldrop
                  regex: uid

              cAdvisorRelabelings:
                - action: replace
                  sourceLabels: [__metrics_path__]
                  targetLabel: metrics_path

              probesMetricRelabelings:
                - action: labeldrop
                  regex: pod_uid

              probesRelabelings:
                - action: replace
                  sourceLabels: [__metrics_path__]
                  targetLabel: metrics_path

              resourceRelabelings:
                - action: replace
                  sourceLabels: [__metrics_path__]
                  targetLabel: metrics_path

              relabelings:
                - action: replace
                  sourceLabels: [__metrics_path__]
                  targetLabel: metrics_path

          grafana:
            enabled: false

          alertmanager:
            enabled: false

          prometheus:
            enabled: true
            monitor:
              additionalLabels:
                prometheus: main

            serviceAccount:
              create: true
              name: "prometheus"

            thanosService:
              enabled: true

            thanosServiceMonitor:
              enabled: true

            ingress:
              enabled: true
              annotations:
                kubernetes.io/ingress.class: traefik-internal
              hosts:
                - prometheus.dev.int.company.live
              tls:
              - hosts:
                  - prometheus.dev.int.company.live
                secretName: wildcard-dev-int-company-live

            prometheusSpec:
              enableRemoteWriteReceiver: true
              serviceAccountName: prometheus
              enableAdminAPI: true
              disableCompaction: true
              scrapeInterval: 10s
              retention: 2h
              additionalScrapeConfigsSecret:
                enabled: false
              storageSpec:
                volumeClaimTemplate:
                  spec:
                    accessModes: ["ReadWriteOnce"]
                    resources:
                      requests:
                        storage: 20Gi

              externalLabels:
                cluster: cit1-k8s
                replica: prometheus-cit1-1

              additionalAlertManagerConfigs:
                - scheme: https
                  static_configs:
                    - targets:
                        - alertmanager.company.live

              thanos:
                image: quay.io/thanos/thanos:v0.32.5
                objectStorageConfig:
                  name: thanos-objstore
                  key: objstore.yml

              ruleSelector:
                matchLabels:
                  evaluation: prometheus
              serviceMonitorSelector:
                matchLabels:
                  prometheus: main
              podMonitorSelector:
                matchLabels:
                  prometheus: main
              probeSelector:
                matchLabels:
                  prometheus: main
              resources:
                requests:
                  cpu: "3.2"
                  memory: 14Gi
                limits:
                  cpu: 8
                  memory: 20Gi

Is there another replica somewhere maybe? Asking since it has the external "replica" label

@MichaHoffmann Nope. IWe have HA prometheuses on some clusters, but added replica label everywhere just for consistency.

having replica label on things that are not replicas of one another feels like ti could be an issue

@MichaHoffmann I can try to remove replica label. But this should not be an issue, sisnce it just used as a deduplication label?

@MichaHoffmann I have removed replica label, but no effect on issue in question.

@MichaHoffmann I have removed replica label, but no effect on issue in question.

Ah well, an attempt was made. Do you have the same issue if you uncheck "Use Deduplication" ?

@MichaHoffmann In thanos query with or without deduplication issue is not noticed. I don't think querieng works via api/v1/series.

You can specify ?dedup=false i think on the API request ( https://thanos.io/v0.33/components/query.md/#deduplication-enabled )

dedup false:
{
  "status": "success",
  "data": [
    {
      "__name__": "org_apache_cassandra_metrics_thread_pools_completed_tasks",
      "cassandra_datastax_com_cluster": "-cassandra",
      "cassandra_datastax_com_datacenter": "dc1",
      "cluster": "cit1-k8s",
      "container": "cassandra",
      "datacenter": "dc1",
      "endpoint": "metrics",
      "exported_instance": "<IP_ADDRESS>",
      "host": "3a2b71b6-8026-4323-a5d9-6b9420258bc5",
      "instance": "<IP_ADDRESS>:9000",
      "job": "-cassandra-dc1-all-pods-service",
      "namespace": "cit1--core",
      "node_name": "gke-cit1-k8s-cit1-nodepool-1-331970fb-6w90",
      "pod": "-cassandra-dc1-r3-sts-0",
      "pod_name": "-cassandra-dc1-r3-sts-0",
      "pool_name": "InternalResponseStage",
      "pool_type": "internal",
      "prometheus": "monitoring/kube-prometheus-stack-prometheus",
      "prometheus_replica": "prometheus-kube-prometheus-stack-prometheus-0",
      "rack": "r3",
      "service": "-cassandra-dc1-all-pods-service"
    },
    {
      "__name__": "org_apache_cassandra_metrics_thread_pools_completed_tasks",
      "cassandra_datastax_com_cluster": "-cassandra",
      "cassandra_datastax_com_datacenter": "dc1",
      "cluster": "-cassandra",
      "container": "cassandra",
      "datacenter": "dc1",
      "endpoint": "metrics",
      "exported_instance": "<IP_ADDRESS>",
      "host": "1252ec4c-66b7-47de-9745-42d368198c3e",
      "instance": "<IP_ADDRESS>:9000",
      "job": "-cassandra-dc1-all-pods-service",
      "namespace": "cit1--core",
      "node_name": "gke-cit1-k8s-cit1-nodepool-1-331970fb-xmr5",
      "pod": "-cassandra-dc1-r2-sts-0",
      "pod_name": "-cassandra-dc1-r2-sts-0",
      "pool_name": "InternalResponseStage",
      "pool_type": "internal",
      "prometheus": "monitoring/kube-prometheus-stack-prometheus",
      "prometheus_replica": "prometheus-kube-prometheus-stack-prometheus-0",
      "rack": "r2",
      "service": "-cassandra-dc1-all-pods-service"
    }
  ]
}

dedup true:
{
  "status": "success",
  "data": [
    {
      "__name__": "org_apache_cassandra_metrics_thread_pools_completed_tasks",
      "cassandra_datastax_com_cluster": "-cassandra",
      "cassandra_datastax_com_datacenter": "dc1",
      "cluster": "-cassandra",
      "container": "cassandra",
      "datacenter": "dc1",
      "endpoint": "metrics",
      "exported_instance": "<IP_ADDRESS>",
      "host": "3a2b71b6-8026-4323-a5d9-6b9420258bc5",
      "instance": "<IP_ADDRESS>:9000",
      "job": "-cassandra-dc1-all-pods-service",
      "namespace": "cit1--core",
      "node_name": "gke-cit1-k8s-cit1-nodepool-1-331970fb-6w90",
      "pod": "-cassandra-dc1-r3-sts-0",
      "pod_name": "-cassandra-dc1-r3-sts-0",
      "pool_name": "InternalResponseStage",
      "pool_type": "internal",
      "prometheus": "monitoring/kube-prometheus-stack-prometheus",
      "prometheus_replica": "prometheus-kube-prometheus-stack-prometheus-0",
      "rack": "r3",
      "service": "-cassandra-dc1-all-pods-service"
    },
    {
      "__name__": "org_apache_cassandra_metrics_thread_pools_completed_tasks",
      "cassandra_datastax_com_cluster": "-cassandra",
      "cassandra_datastax_com_datacenter": "dc1",
      "cluster": "-cassandra",
      "container": "cassandra",
      "datacenter": "dc1",
      "endpoint": "metrics",
      "exported_instance": "<IP_ADDRESS>",
      "host": "1252ec4c-66b7-47de-9745-42d368198c3e",
      "instance": "<IP_ADDRESS>:9000",
      "job": "-cassandra-dc1-all-pods-service",
      "namespace": "cit1--core",
      "node_name": "gke-cit1-k8s-cit1-nodepool-1-331970fb-xmr5",
      "pod": "-cassandra-dc1-r2-sts-0",
      "pod_name": "-cassandra-dc1-r2-sts-0",
      "pool_name": "InternalResponseStage",
      "pool_type": "internal",
      "prometheus": "monitoring/kube-prometheus-stack-prometheus",
      "prometheus_replica": "prometheus-kube-prometheus-stack-prometheus-0",
      "rack": "r2",
      "service": "-cassandra-dc1-all-pods-service"
    }
  ]
}

Would it be possible to send promtool tsdb dump output with appropriate matcher from the offending prometheus? ( With the labels censored like in this example ); I could build a block and try to debug locally from that!

@MichaHoffmann Sorry for long waiting, had busy week.
dump.zip

Hey,
I did small local setup with your data and can reproduce:
$ curl -sq -g '<IP_ADDRESS>:10904/api/v1/series?' --data-urlencode 'match[]=foo'  | jq '.data.[].cluster'
"xxx-cassandra"
 fedora  ~  git  thanos-repro  andrej   
$ curl -sq -g '<IP_ADDRESS>:10904/api/v1/series?' --data-urlencode 'match[]=foo'  | jq '.data.[].cluster'
"xxx-cassandra"
 fedora  ~  git  thanos-repro  andrej   
$ curl -sq -g '<IP_ADDRESS>:10904/api/v1/series?' --data-urlencode 'match[]=foo'  | jq '.data.[].cluster'
"cluster_1"
 fedora  ~  git  thanos-repro  andrej   

with prometheus configured like
global:
  external_labels:
    cluster: cluster_1

Ok i think i have found the issue and have a fix; was able to reproduce in a minimal acceptance test case.


Major fix

PR checklist

[ ] This comment contains a description of changes (with reason).
[ ] If you've fixed a bug or added code that should be tested, add tests!

[ ] If you've added a new tool - have you followed the pipeline conventions in the contribution docs
[ ] If necessary, also make a PR on the nf-core/quantms branch on the nf-core/test-datasets repository.

[ ] Make sure your code lints (nf-core lint).
[ ] Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
[ ] Usage Documentation in docs/usage.md is updated.
[ ] Output Documentation in docs/output.md is updated.
[ ] CHANGELOG.md is updated.
[ ] README.md is updated (including new tool citations and authors/contributors).

Linting still fails. You might be able to just do prettier -m if you have prettier installed.

Nice. How did you fix the testdata?

Without fixing test_localize testdata .Network issues?


Is there a way to show foreign fields?

I am trying to show fields that are connected to a related model i.e. "foreign__name". Can this be accomplished with the specific implementation?
I am currently getting the error of
"'ManyToOneRel' object has no attribute 'primary_key'"

Did someone encounter a similar issue?


default “instant” date value not visible

Hi,
Objective : Try to display default “instant” date value.
Issue : I am trying to display $scope.instant ("31/03/2014") value but it is not visible but if i comment datepicker span (<span datepicker-popup) it is able to show the instant date value("31/03/2014").
code: controller :
app.controller('DatepickerDemoCtrl', function ($scope) {
$scope.instant = "31/03/2014";
$scope.open = function($event) {
$event.preventDefault();
$event.stopPropagation();
$scope.opened = true;
};
$scope.save=function(date){
console.log(date);
}
});
HTML :

Instant : {{instant}}

save

</div>

Please take a look at https://github.com/angular-ui/bootstrap#need-help


Vessel Profile

As per https://docs.google.com/document/d/1K-iSxSOaCVdMJweiwOUwVO92tVaCU7FjvlUmco11tgY/edit#bookmark=id.l5vflqjb5z2u font size of vessel name should be 20pt; font size of permit should be 15pt; spacing should match design in https://mongodb.invisionapp.com/share/RWX43EEF567#/screens/415937316

Done


Move overrides from scrapers/package.py into a separate file, scrapers/overrides.json

I rewrote scrapers/package.py to move the OVERRIDES constant into a new file, scrapers/overrides.json. I also did some refactoring on the side to call a new function get_json_data. The functionality, I believe, remains unchanged. (I have used the jd tool to verify that only the timestamp changes whenever I rerun scrapers/package.py.)

Totally stuck, and there's a merge conflict to. So I'm gonna get rid of this entire pull request and try again.


folder naming

Description of the new feature / enhancement
Would it be possible to add date characters so that the folder would be created with a specific name, for example {YYYY}{MM}{DD} -
Scenario when this would be used?
Would it be possible to add date characters so that the folder would be created with a specific name, for example {YYYY}{MM}{DD} -
Supporting information
No response

This should be a feature of New+!
Meanwhile you can do that with PowerRename if you create a file then rename it with regex like this if you create multiple folders for the day:

Or you can temporarily use the command line like this:
CMD (change '/' for the character present in echo %date% which you don't want) :
mkdir "%date:/=% - rest of the name"

Powershell
New-Item -ItemType Directory -Name "$(Get-Date -Format "yyyymmdd") - rest of the name"

Powershell script with an alias

Create the ps1 script with this content:

param(
[string]$filename
)
New-Item -ItemType Directory -Name "$(Get-Date -Format "yyyymmdd") - $filename"

Make a new alias

New-Alias -Name "New-DateDirectory" -Description "Creates a folder that has a date with the script previously created" -Value "Path/to/script.ps1" -Scope "Global"

Usage example:
New-DateDirectory "new folder example"

    Directory: C:\foo\bar

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        2024-10-25     17:11                20241125 - new folder example


navigation tools for map

the map looks great, could we have navigation tools

Discussed in meetings that having people interact with the map is no long that desirable, and as such am closing this.


Removal of H1 headings and ToCs

Usage of H1 headings is not recommended therefore this commit removes them. Table of content was added to some of the pages, but Docsy generates automatically a ToC to the left side of the page. Manual maintenance of ToCs is not needed.

/assign @liamfallon @efiacor

/lgtm
/approve


Freeze dependencies used in CI

Ensure the Cargo.lock file has been updated after changes are made to Cargo.toml.
Run tests in CI using the exact versions in the lock file.

Exposes https://github.com/librespot-org/librespot/issues/1336

Build fails due to #1336

Can you rebase and get the CI to pass?

Thanks


Plugin manager settings

You can load a plugin from one of these choices:

from the command line arguments
from RINGMesh.ini file next to your executable
from RINGMesh.ini file in your home directory

The code test the solution 1, then 2, then 3. If one them succed, it stops trying the next options. You only have to put the name of the plugin (eg RINGMesh_io), the extension and the directory will be found (or not) from the OS and the RPATH/PATH values.

SonarQube analysis reported 3 issues

 1 blocker
 1 major
 1 minor

Watch the comments in this conversation to review them.

SonarQube analysis reported 2 issues

 1 blocker
 1 major

Watch the comments in this conversation to review them.

SonarQube analysis reported 1 issue

 1 major

Watch the comments in this conversation to review them.


[chore] fix render issue causing test failures

Related to: https://github.com/signalfx/splunk-otel-collector-chart/pull/1359

The "functional-tests/Test helm install in AKS" check is still failing for all PRs and can be ignored for this PR.


[$1000] Incorrect Order of Messages: User-Generated Messages Override Welcome Message as First Message in Chat Room

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

Action Performed:

Go to web chrome and login with User A
Click profile > create a Workspace
Click '+' > New Room
Name the room > select a workspace > Visibility - Public (everyone)
Click on the Room > Settings > welcome message > write message
Go to chat and write a chat message in the room
Go to Room details > share code > copy code > send the code to User B
Open the room with User B and verify that welcome message is Not the first message in the room

Expected Result:
Welcome message should be the first message in the room as it is a greeting.  User generated messages should follow the welcome message.
Actual Result:
Welcome message was not the first message. User generated messages overrode it as the first message.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

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

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

Version Number: 1.3.29-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/43996225/456edd96-e71e-4b26-80ab-5b18c4dbe9a5
https://github.com/Expensify/App/assets/43996225/dafa89ba-9b43-4d34-a225-9b399ad1d6f5
Expensify/Expensify Issue URL:
Issue reported by: @avi-shek-jha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686353533877299
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~0105c575abaff412de
Upwork Job ID:<PHONE_NUMBER>410546688
Last Price Increase: 2023-06-20

Hey, I am from Callstack - expert contributor group
Just letting everyone know that I'll start investigating this one 🙋

@arthurmfgtab Pleaase post daily updates and proposal before making a PR, thanks!

Hired in upwork
Interal job - https://www.upwork.com/ab/applicants/1671261595410546688/job-details
External job - https://www.upwork.com/jobs/~0105c575abaff412de
@avi-shek-jha reporter
@fedirjh C+

Thanks for reporting, @fedirjh
I'll check that out today :)

@fedirjh regarding new welcome messages being generated every time a new user joins a workspace, well, I'm still investigating this, but this seems to be backend-related, as I don't think we created these welcome messages on the frontend side.

This is totally expected, the user should actually get the welcome message after they join! We can close it!


Invalid Key: Not working with both Azure OpenAI and OpenAI

Hello Team
I have created an Azure OpenAI resource and passed the endpoint through the extension settings. But, @vision throws invalid API key message.
Tried by OpenAI Key, but the result is same - "Invalid Key"

@ambilykk hey! sorry our documentation needs a little updating, but in both scenarios, there has to be a positive $ of credit in the account for it to work.

@justschen
I have an Azure subscription with a credit balance and have set up Azure OpenAI within the same subscription.

@ambilykk in the azure open ai studio, can you double check that you're using the correct endpoint (target uri) and that the deployment names match up?

Thank you @justschen; I am able to configure the Vision extension.
Initially I have passed the OpenAII endpoint from Azure portal. That doesn't work.
Now, I have used the URL from the deployment; something like the below
https://xxxx.openai.azure.com/openai/deployments/gpt-4/chat/completions?api-version=2024-08-01-preview
Please update the document with the expected API URL details.


Feature Request: Zoom on current node.

Currently, the plugin shows the whole graph.
It would be great to have the ability to auto-zoom on the current node we're looking at.
f.e given the following graph:

Auto-Zooming in here:

This sounds like a cool idea, but I don't have a good "this is how I want this to work" concept in my head, so might take a while before I attempts this.

I don't see myself doing this any time soon, so I'm closing the issue.
But if anyone is interested in implementing this - please talk to me, it could be a really cool feature!


Add Supported Hardware Revisions List to Raspberry Pi page

The current documentation is unclear about what specific versions of Raspberry Pi hardware are supported
Given the bugs in this repo (and posts elsewhere), I assume Raspberry Pi 4 is not supported at this time, but if that's the case, it would be great if that was reflected in the documentation.

You assessment is accurate


Is there a way not to send out scope in the authorize call?

Hi,
First of thanks for the great library.
I am doing Authorise code flow with PKCE.
During the first authorise call I have a requirement not send scope in the outgoing request itself.
If you see the below request, I need a way that from the outgoing call scope is not sent at all
Current-
https://xxx-npe.okta.com/oauth2/aus212222/v1/authorize?client_id=0o9NU4343&code_challenge=jadfsdfsdfo&code_challenge_method=S256&response_type=code&state=xxx&redirect_uri=http://x.x.x.x:4000/callback_&scope=openid_
Required-
https://xxx-npe.okta.com/oauth2/aus212222/v1/authorize?client_id=0o9NU4343&code_challenge=jadfsdfsdfo&code_challenge_method=S256&response_type=code&state=xxx&redirect_uri=http://x.x.x.x:4000/callback
Is it possible?

Making scope = null during creation of UserManager object not giving me desired.

If there is no such way, is it possible to get all the scopes on a resource?
The problem I've have is Okta returns failure message if I query for a scope which is not there on a resource. In my application there are some resources with different scopes.
So the workaround Okta specified is to first set the scope as openid and query the code and state. With that retrieve the ID token. Now parse the ID Token and find out the claims user has.
Now do one more round of auth dance with the retrieved cliams and add those scopes only which were there.
Can this library do this?

scope is required by the spec:
https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest


Catch IOError in PollingQueueConsumer

Hi folks,
We're getting IOError: Socket closed while waiting for synchronous RPC calls to complete. The disconnections are expected (HAProxy timing out after 60s) but the error type isn't (IOError instead of socket.error)
Here's a typical stacktrace
Traceback (most recent call last):
 File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 240, in trace_task
   R = retval = fun(*args, **kwargs)
 File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 438, in __protected_call__
   return self.run(*args, **kwargs)
 File "/data/backoffice/forcity_core/api_simulation/scenario/tasks.py", line 69, in compile_timeline_via_broke                                              r
   ret.reply_event.queue_consumer._setup_consumer()
 File "/usr/local/lib/python2.7/dist-packages/nameko/standalone/rpc.py", line 80, in _setup_consumer
   self.consumer.cancel()
 File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 461, in cancel
   cancel(tag)
 File "/usr/local/lib/python2.7/dist-packages/amqp/channel.py", line 1633, in basic_cancel
   (60, 31),  # Channel.basic_cancel_ok
 File "/usr/local/lib/python2.7/dist-packages/amqp/abstract_channel.py", line 67, in wait
   self.channel_id, allowed_methods, timeout)
 File "/usr/local/lib/python2.7/dist-packages/amqp/connection.py", line 241, in _wait_method
   channel, method_sig, args, content = read_timeout(timeout)
 File "/usr/local/lib/python2.7/dist-packages/amqp/connection.py", line 330, in read_timeout
   return self.method_reader.read_method()
 File "/usr/local/lib/python2.7/dist-packages/amqp/method_framing.py", line 189, in read_method
   raise m
IOError: Socket closed

Catching IOError in PollingQueueConsumer._setup_consumer is enough to fix the problem.
Do you think this is worth merging? Or should we find another solution?
Thanks,
Alex
/cc @manfred-chebli

since we are just trying to reset the consumer, ignoring ioerrors as well seems fine. i'd like to understand when we get those instead of thesocket.error that we are already catching. if this turns out to be what we want, we can probably catch both together except (Foo, Bar) and amend the comment

transport.py in py-ampqlib will raise IOError when it can't read from or write to the socket. I guess this is cannot be considered a "socket error" since the socket never actually failed, it's just closed.
In fact, according to the python 2 socket docs socket.error has been a child of IOError since 2.6. In the python 3 socket docs it is a subclass of OSError since 3.3 (of which IOError is an alias, I believe).

cool, thanks for the investigation and the patch!
(looks like you have a pyflakes error causing the tests to fail)

For some reason I couldn't get the Travis log until now. I'll fix the line length and squash my commits.

cool! if you fancy, you can amend this pr to add yourself to the list of contributors in the project root
👍

Done, thanks @davidszotten

We are running into this issue a fair amount both in the services we run and with clef/flask-nameko - is there an ETA for a next release that will include this fix?


deprecated caller_location wrong

Cookbook version
N/A
Chef-client version
14.3.37
Platform Details
ubuntu 18.04, AWS EC2
Scenario:
I'm running chef-client 14.3 after 13.10, looking for deprecations. It appears to be finding deprecations, but instead of showing where they are, it's printing the wrong caller location:
Examples:
Deprecated features used!
  Resource windows_auto_run has been loaded from a cookbook. The resource windows_auto_run is now included in Chef and will take precedence over the existing cookbook resource in the next major release of Chef (15.0, April 2019). You may be able to remove this cookbook dependency from your runlist if you do not use other recipes/resources/libraries from the cookbook. Alternatively there may be a newer version of this cookbook without the windows_auto_run resource. at 1 location:
    - /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37/lib/chef/log.rb:51:in `caller_location'
   See https://docs.chef.io/deprecations_map_collision.html for further details.
  Resource windows_feature has been loaded from a cookbook. The resource windows_feature is now included in Chef and will take precedence over the existing cookbook resource in the next major release of Chef (15.0, April 2019). You may be able to remove this cookbook dependency from your runlist if you do not use other recipes/resources/libraries from the cookbook. Alternatively there may be a newer version of this cookbook without the windows_feature resource. at 1 location:
    - /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37/lib/chef/log.rb:51:in `caller_location'
   See https://docs.chef.io/deprecations_map_collision.html for further details.

Steps to Reproduce:
Not sure, but maybe any deprecation would show the issue?
Expected Result:
That it would show the calling cookbook's file and line number.
Actual Result:
It shows
   - /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.3.37/lib/chef/log.rb:51:in `caller_location'

Argh opened in wrong chef client github :|


Tree view for -l?

It would be nice to have some mechanism to reflect the filesystem hierarchy in the structure of tests.
The purpose is to:

Present the project structure in the test list using an attractive tree view - for example:
util/
    pack/
        zlib
            - Compressing works
            - Decompressing works
        lzss
            - Compressing works
            - Decompressing works
            - Unaligned streams are filled with 0

Simplify searching for things responsible for test failures by having 1:1 test↔class relation

Establish simple and clear convention for test naming that also solves naming conflicts

Ability to intuitively search for tests without knowing them, for example after working on dir/subdir/important.cc, relevant tests can be discovered and executed by supplying dir/subdir/ or dir*subdir* as argument

Problems with using existing means to accomplish this:

Tags

Can't present project structure nicely in the --list
Cumbersone to tell directories with the same name ([dir][subdir])
Tags in -l are printed in order reverse to the declaration order, so instead of [dir][subdir], it shows [subdir][dir]

Test names

Cumbersome conflict avoidance, for example to search for tests containing file when one has file/ directory, one needs to look for */*file* or similar (that can fail as well)
Doesn't look pretty in -l, can't easily tell typos like one can with -t
Feels wrong - we specify two things in one place

So what else? Rather than supplying third option to TEST_CASE() macro, I'm thinking of having special tag syntax such as [/path] that should stay backwards compatible with 99.9% of people out there - and the --list format could change only if there are any path-like tags in the project.
Or much simpler - remember __FILE__ and use it for presentation (-l or new switch) and searches.

@rr - sorry I missed this the first time around.
Is this still relevant to you?
One thing that has changed in the meantime that is relevant is the -# option, which results in every test case being given an additional tag derived from the filename (i.e. picked out of __FILE__).
It's not quite what you're after because only the filename is considered, not the path - but it might be a step closer to what you wanted.
Personally I'm not sure doing more than this is worth it. If you need an organisational unit beyond filename I think tags are going to be sufficient.
What's still missing is the hierarchical listing aspect. I'm not sure how valuable this is in the general case. But if you're still interested we can talk more about that.

Once #1190 is in, this can be done by using custom reporter to route -l through.


TsunamiBuilder readme link is broken

The docs also don't seem to exist for 0.5.1. Not sure if I'm just accessing things before a CI finished.

Yeah, that's a little unfortunate. It happens because of https://github.com/livioribeiro/cargo-readme/issues/18, which is a little out of my control. We could remove the link from src/lib.rs, but that'd be a little sad, or we could manually remove it from the (generated) README.md, but then we'd have to maintain it over time. I think the right thing to do here is probably just to monitor the cargo-readme issue for now.

As for the missing docs.rs page, I'm not sure what happened. I've reported it here: https://github.com/onur/docs.rs/issues/23#issuecomment-369052824

The docs.rs page is up now, so I'll close this :)


Help with Transformer for simple query DSL?

Hi there!
I am a total newb when it comes to language-craft, and was wondering if I could get a little guidance on what I'm trying to do. I'll give you the high level of my proof-of-concept, followed by my current test code - hopefully this will facilitate targeted advice.
High Level
I want to be able take a boolean expression like so: foo AND NOT (bar or baz >=6)
And convert it to a Python function like so:
def tester(test_obj):
    return test_obj["foo"] and not (test_obj["bar"] or test_obj["baz"] >= 6)

This pretty much means that I need to establish a little query DSL that combines boolean expressions and comparators, from what I understand. I have the tail ends of this process pretty much locked down: the grammar I've produced seems to be what I want, and compiling/exec-ing the function body should be very straightforward.
Here's my question: How do I create a transformer that takes my boolean expression tree and turns it into the string body of a python function?
(If there's another approach or construct I should be using, I'm all ears!)
What I have so far
A Simple filter grammar:
filter_grammar.lark
?start: boolean_expression

?boolean_expression: term [OR_OP term]
?term: factor [AND_OP factor]
?factor: constant
    | NOT_OP factor
    | "(" boolean_expression  ")"
    | NAME
    | comparison
?constant: FALSE | TRUE | NUMBER

?comparison: factor comparator factor

?comparator: EQUALS | LT | LTE | GT | GTE

// Custom Terminals
//

FALSE: "False" | "false"
TRUE:  "True"  | "true"
AND_OP: "AND" | "&"
OR_OP: "OR" | "|"
NOT_OP: "NOT"

EQUALS: "="
LT: "<"
LTE: "<="
GT: ">"
GTE: ">="

// Common Terminals
//

%import common.NUMBER
%import common.CNAME -> NAME
%import common.WS
%ignore WS

A test file:
test_parser.py
from lark import Lark, Transformer
import ast

def get_parser():
    with open("filter_grammar.lark") as f:
        grammar = f.read()

    parser = Lark(grammar)
    return parser

# TROUBLE AREA ######

#
# How do I build a transformer that converts a boolean
# algebra expression into a python function, e.g.,
# from something like this:
#
# foo AND NOT (bar or baz >=6)
#
# to something like:
#
# def tester(test_obj):
#     return test_obj["foo"] and not (test_obj["bar"] or test_obj["baz"] >= 6)
#

class FunctionTransformer(Transformer):
    def boolean_expression(self, terms):
        print(terms)
        return terms

    def term(self, factors):
        return factors

    def factor(self, things):
        return things

    def name(self, string):
        return f"child_obj['{string}']"

    def number(self, number):
        return int(number)

    def and_op(self, _):
        return "and"

    def or_op(self, _):
        return "or"

    def not_op(self, _):
        return "not"

###
# END TROUBLE AREA
###

boolean_algebra_expression = """
    ((deaf OR hearing_impaired) AND age_years <=3)
        OR
    (NOT speaks_en AND age_years = 4)
"""

parser = get_parser()

tree = parser.parse(boolean_algebra_expression)

print(tree.pretty())

# Create property tester function using transformed
# boolean algebra --> python function.

boolean_expression_body = FunctionTransformer().transform(tree)

print(type(boolean_expression_body))

function_parts = [
    "def property_tester(self, child_dict):  return",
    boolean_expression_body,
]

new_code = ast.parse(" ".join(function_parts), mode="exec")

new_func = compile(new_code, filename="temp.py", mode="exec")

namespace = {}

exec(new_func, namespace)

property_tester = namespace["property_tester"]

test_child_one = {
    "deaf": True,
    "hearing_impaired": False,
    "age_years": 2,
    "speaks_en": True,
}

assert property_tester(test_child_one)

test_child_two = {
    "deaf": False,
    "hearing_impaired": True,
    "age_years": 3,
    "speaks_en": True,
}

assert property_tester(test_child_two)

test_child_three = {**test_child_two, "age_years": 4}

assert not property_tester(test_child_three)
# Too old, should give False

test_child_four = {**test_child_two, "speaks_en": False}

assert property_tester(test_child_four)
# Doesn't speak english and is also 4 - should give True

In particular, I'm wondering: should I be creating a transformer rule for every nonterminal/head of production? How do I handle nested binary operations?
Thanks in advance!

Rico

Look at the calc example: https://github.com/lark-parser/lark/blob/master/examples/calc.py
It basically tells you everything you need to know, except instead of calculating the value, you'll want to return a string of f"({a} {op} {b})", etc.
Nested operations aren't an issue with this approach, the transformer will fold them in the right order and you'll get one big string at the end.

The calculator example doesn't really help for rules where there's optional pieces of the production, like
?bool_expr: bool_term ["OR" bool_term]
?bool_term: bool_factor ["AND" bool_factor]

I've got it working with this grammar
?start: bool_expr

?bool_expr: bool_term ["OR" bool_term]
?bool_term: bool_factor ["AND" bool_factor]
?bool_factor: id
              | "NOT" bool_factor
              | "(" bool_expr ")"
              | relation_expr
?relation_expr: id comparator (const | id)

?comparator: EQ | NE | LT | LTE | GT | GTE

id: NAME

EQ: "="
NE: "!="
LT: "<"
LTE: "<="
GT: ">"
GTE: ">="

?const: NUMBER | "true" | "false"

// Common Terminals
//

%import common.NUMBER
%import common.CNAME -> NAME
%import common.WS
%ignore WS

and this Transformer subclass:
@v_args(inline=True)
class FunctionTransformer(Transformer):
    def bool_expr(self, bool_term, other=None):
        if other:
            return f"({bool_term} or {other})"
        else:
            return bool_term

    def bool_term(self, bool_factor, other=None):
        print(other)
        if other:
            return f"({bool_factor} and {other})"
        else:
            return f"{bool_factor}"

    def relation_expr(self, name, comparator, other):
        return f"{name} {comparator if comparator != '=' else '=='} {other}"

    def id(self, name):
        return f"child_obj['{name}']"

But again, the question remains regarding whether or not this is the "right" approach. For instance, it feels weird that I have to alias the NAME terminal with an id nonterminal to get things working.

The calculator example doesn't really help for rules where there's optional pieces of the production

I beg to differ.
?bool_expr: bool_term ["OR" bool_term]

Expands into
?bool_expr: bool_term | bool_term "OR" bool_term

Which is just like the calculator example
And the ? in boo_expr tells Lark to fold the rule automatically if its length == 1, so you don't have to deal with that case.

I've got it working with this grammar

It looks alright, except you're not handling const correctly.
And like I said above, you don't need to handle when other=None, because the method won't be called in that case.
(I assume you're not using placeholders=True)

it feels weird that I have to alias the NAME terminal with an id

It's fine, I don't think it's that weird. But perhaps in the future even that won't be necessary, if I accept this PR: #416

I beg to differ.

ah, I see now what you mean with the expansion - out of curiosity, why did you opt to not use the EBNF optional delimiter (square brackets) in the calculator example? Again, I'm completely brand new to grammars and DSLs so the translation doesn't automatically happen in my head (yet). Regardless - good to know for future reference. Thanks!
And the ? in bool_expr tells Lark to fold the rule automatically if its length == 1, so you don't have to deal with that case.

That makes sense, I'll get rid of that conditional block.
It looks alright, except you're not handling const correctly.

Could you elaborate a bit more? Do you mean in the grammar itself or with the Transformer?

I just wanted to keep the calculator as simple and straight-forward as I can, since many beginners will look at it first.
I mean you're not distinguishing between true and false. You can either give each one an alias, or use the ! operator to keep the text.

I just wanted to keep the calculator as simple and straight-forward as I can, since many beginners will look at it first.
Got it. That makes sense. I think my issue here was using EBNF as my entry point and not exposing myself first to the underlying BNF construct that square brackets are sugaring.
Thanks again!

If you can think of a way that I can improve the documentation, let me know

Sure! This would be going a bit above and beyond since it's not really your job to teach EBNF, but, just a table showing Lark -> EBNF equivalent -> BNF derivatives would be super helpful for beginners to at least serve as a general outline of "what are my options in creating a grammar"
if you wanted to really make sure people "get" what's possible in defining a grammar, you could follow in the footsteps of David Beazley (a la Python Cookbook) or the Python MOTW guys by having a set of "recipes" for common things set up in a table like this:

Grammatical feature
Match examples
EBNF
BNF
Lark
Transformer Code
Visitor Code
Explanation

Of course, some cells will be empty sometimes, but that's sort of the point in that it helps you understand when to use certain constructs vs. others.

Interesting idea. Can you provide a link to such a table, for example?

OK so now I realize I was mistaken about the cookbook format which is in Problem, Solution, Discussion format (so it's paragraphs - not as structured as the table I had there). Maybe closer to what I was thinking of is Django ORM for SQL users, namely in that it's just a nice little comparison table.
I'm trying to think of where I saw an actual table and coming up empty...

Here's a great example from these notes:
BNF
<expr> ::= '-' <num> | <num>
<num> ::= <digits> | <digits> '.' <digits>
<digits> ::= <digit> | <digit> <digits>
<digit> ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'

EBNF
<expr> := '-'? <digit>+ ('.' <digit>+)?
<digit> := '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'

And then you could even go and have the Lark renditions of each one, and explain that EBNF isn't actually more powerful than BNF, and that you are basically just replacing "or-ing" with more semantically meaningful optional and/or repetitive delimiters.
Again that slide deck is a great resource because it has examples like:
• If you have a rule such as:
<expr> ::= <digits>
<digits> ::= <digit> | <digit> <digits>

• You can replace it with:
<expr> ::= <digit>+

Good idea, I'll write something up when I have the time.


tests: drivers: disk: Replace the MAX function with if and else

As the parameter of "MAX" is uint32, the nagetive number will be bigger than 0. The MAX function does not work as expected. So change it to if/else form.
Fixes #51146
Signed-off-by: Hu Zhenyu<EMAIL_ADDRESS>

All CI checks are passed, thanks to review.


[Feature Request] Hide Item icons

Imported items that do not have a unique icon still have the default one pop out and it can cover some of the description text and look a bit jarring. Having the option to disable icons for those of us that do not use them would be much appreciated. Even better would be an option to only show the icon if it's not the default satchel one, that way we can still have unique icons for cool items if we want them.

Done.   Items that use the default item-bag.svg will not show the icon


Encryption of all files

Hi,
Having some issues encrypting all .js files all at once, what is the best suggested method to perform this?  Thanks!

My favorite approach is to use a third-party package (webpack or so) to create a bundle from the project, then I'd compile that bundle file using bytenode.
Also, check the README.md file:

Compile all .js files in ./app directory.

user@machine:~$ bytenode --compile ./app/*.js

Compile all .js files in your project.

user@machine:~$ bytenode --compile ./**/*.js

Note: you may need to enable globstar option in bash (you should add it to ~/.bashrc):
shopt -s globstar

Not the best solution, and it will need more work (removing the plain .js files .. etc), but it works in most cases.


Dropdown onClose not firing when press DropdownToggle

Hi, I want to add animation for closing DropdownMenu.
I think to add some style within onClose callback. Nevertheless it can be closed by pressing DropdownToggle,  this callback are not called. It called only when click is outside dropdown

We need not animation here
If you wanted use this
might change CSS by use styled component for work around as below:
const StyledDropdownMenu = styled(DropdownMenu)`
   &.dropdown---Wq_VE.open---2SG_5 > .dropdown-menu---2R-2v {
       visibility: visible;
       opacity: 1;
       transition: opacity .2s linear;
   }

   &.dropdown-menu---2R-2v {
       visibility: hidden;
        opacity: 0;
        transition: visibility 0s .2s, opacity .2s linear;
   }
`;


⚠ Avatar API Endpoint has degraded performance

In fb904bf, Avatar API Endpoint (https://avatar.roblox.com/v1/avatar-rules) experienced degraded performance:

HTTP code: 200
Response time: 1258 ms

Resolved: Avatar API Endpoint performance has improved in a1c1726.


fleet() function

Hello,
The fleet() function is returning only one event, is this normal? how could i modify it in order to catch hostile event?
I already catch them if there is no other fleet movement, but not if there are several.

the fleet refers to the fleet you can control (callback)
hostile and neutral fleets will get there own separate functions
if you wish to have all fleets change the fleet find-all methods to fetch the top event viewer. the thing is that you will get all missions leaving and the samefleet comming back at the same time and need to do all sorts of coordination checking to figure out wich fleet is hostile or not.

i have already change the parse of the "page=ingame&component=movement" by the top event box, but the issue is that your iteration over the zip(html_find_all) and the fleet_class return only the first event.
Therefore i'm able to catch hostile event perfectly, but not anymore if there is more than 1 event.

I never studied the top Event Box i focused on the bottom events because there are much easier to parse and get data off.
Thats the reason i am planning to develop seperate functions for that.

If you succeed to parse to event (even only for hostile) using your fleet_class, it would be cool ! so more things to do with top event box in case of attack

your welcome
https://github.com/alaingilbert/pyogame/commit/8a2586996742f3821152d01b6b6c3917b0514ef2

is it retuning some info like:

attacker name
Attacker planet coord
impact time
My attacked planet coord / name ?

your function catch only the first attack right ? if there's several, we cannot return them all ? Would be great to catch attacker player' ID also (for send mesg func), for the countdown i've added into fleets_class:
date_format = '%d.%m.%Y %H:%M:%S'
time1 =  datetime.now().strftime('%d.%m.%Y %H:%M:%S')
time2 = datetime.strptime(time1, date_format)
delta  = arrival - time2
sec = delta.seconds
countdown = str(timedelta(seconds=sec))

as the normal fleet it will return all fleets that are hostile
there is a datetime with arrival in it its a datetime object you can timedelta it for the countdown
but its easeaer to just arrival < datetime.now - 1min

if you want player id pass the origin parameter to galaxy and get player id that way

but wait there is a bug with the palyer id

il fiyx it tomorrow

ok thanks, for the player id, i prefer catch it via the hostile_fleet func, in order to avoid making to much request to ogame server -> more stealthier

i'm able to see only one fleet returned, and it still return the first fleet event, for example, i have 3 eventRow (fleet), in this order:
arrival countdown: 5 min -  ALLY
arrival countdown: 10 min - HOSTILE
arrival countdown: 15 min - ALLY
The fleet_hostile function take only the first event, then when i did a "for fleet in fleets", i see only the "5 min -  ALLY" fleet.

Galaxy returns all info in system, inside a dict[], so cannot retrieve the good one based on coord without having to do a loop etc.

i had to delete " dest=destination.planet" from constant to be able to get player_id or attacked planet_name from galaxy func

but yeah still a small issue with the player ID and player name returned with galaxy func

i look to make it easier and return the player id in the hostile fleet.
That mean i will return player_id in the normal fleets to to keep consistant.

i noticed that if my fleets lit returned only one fleet, its because it found only one playerid (the hostile one), so so solution would be to put "playerid" to None if not found inside friendly events

data-playerId appears only on hostile fleet event it seems, not for my own fleet event, looks quite painfull to return player_id in the normal fleet

whatever i tried, comprehension list etc, i can not succeed to put player_id as empty or "None" value into the list, when the tag is missing for friendly fleet. i guess it would be easier to fix the galaxy function bug

i look into tomorrow keep on tight

Is it possible to return the mission (mission type) too in the hostile_fleet function? just like the fleet function does

i added mission type back to hostyle fleet

I'm getting everything but not mission type from the hostile_fleet function, I've tried both the stable and development versions but whenever I do:
for hfleet in empire.hostile_fleet()
  print(str(hfleet.list))

I'm always getting:
[event, player, datetime.datetime, origin, destination]
I have doble and triple checked the hostile_fleet function code from /usr/lib/python3.8/site-packages/ogame/init.py file
And it should return the mission value from the fleets_class, but it's not
    def hostile_fleet(self):
        response = self.session.get(
            url=self.index_php + 'page=componentOnly&component=eventList'
        ).text
        html = OGame.HTML(response)
        missions = len(html.find_all('id', 'eventRow-', 'attribute'))
        coordinates = [self.celestial_coordinates(id) for id in self.planet_ids() + self.moon_ids()]
        coordinates = [coords[:-1] for coords in coordinates]
        fleets = []
        for player_id, fleet_mission, event_id, fleet_arrival, fleet_origin, fleet_destination in zip(
                html.find_all('class', 'sendMail', 'attribute', 'data-playerId'),
                html.find_all('data-mission-type', '', 'attribute')[-missions:],
                [int(fleet_id.replace('eventRow-', '')) for fleet_id in html.find_all('id', 'eventRow-', 'attribute')],
                html.find_all('data-arrival-time', '', 'attribute'),
                [html.find_all('target', '_top', 'value')[i] for i in range(0, missions * 2, 2)],
                [html.find_all('target', '_top', 'value')[i] for i in range(1, missions * 2, 2)]):

            if const.convert_to_coordinates(fleet_destination) in coordinates:
                class fleets_class:
                    event = event_id
                    mission = int(fleet_mission)
                    player = int(player_id)
                    arrival = datetime.fromtimestamp(int(fleet_arrival))
                    origin = const.convert_to_coordinates(fleet_origin)
                    destination = const.convert_to_coordinates(fleet_destination)
                    list = [event, mission, player, arrival, origin, destination]

                fleets.append(fleets_class)
        return fleets

i redone the fleet and the hostile aswell and added friendly fleet aswell. the returned parameters are the same on every fleet function. Check out dev Branch.


Add flag to check to look for a countermodel

Much better comment on that function now.

I'd approve it, but I think @codyroux should have a looksie. Any tests needed?

Quick work! We'll add tests for the jump reachability spec in a bit, probably should be a separate PR. I don't think we need to test this, really (famous last words).


SPDX Relationship support

Current implementation expects exactly one relationship with identifier not starting with "NO" and assumes that this describes how another component CONTAINS itself.
Drawbacks

A component can only be included once
Any generator defining the inclusion otherwise will result in wrong association

Implementation now allows arbitrary relationship definitions.
Pending item is that rendering and output only support single relationship.


User Model : 1 attribute is invalid

Just playing with latest sails 0.11.2. When creating the user it threw the following error message "1 attribute is invalid".
UserModel:
attributes: {
  name: {
      type: 'string'
  },
  title: {
      type: 'string'
  },
  email: {
      type: 'string',
      email: true,
      unique: true
  },
  encryptedPassword: {
      type: 'string'
  }

}
If email: true is removed, the user creation works just fine.

UserModel:
should be:
UserModel: {

On Oct 23, 2015, at 3:31 PM, mshettysubbaiah<EMAIL_ADDRESS>wrote:
UserModel:

When creating the user it threw the following error message "1 attribute is invalid".

Care to share with us the user model you are trying to create?

Hi guys,
Sorry about not providing sufficient details. My User model is a very basic structure with following attributes:
module.exports = {
attributes: {
name: {
type: 'string',
required: true
},
title: {
type: 'string'
},
email: {
type: 'string',
email: true,
required: true,
unique: true
},
encryptedPassword: {
type: 'string'
}
}
};
The POST submitted data to the database only to witness the error as provided below:
name: test
title: null
email<EMAIL_ADDRESS>Error (E_VALIDATION) :: 1 attribute is invalid
at WLValidationError.WLError (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/error/WLError.js:26:15)
at new WLValidationError (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/error/WLValidationError.js:20:28)
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/validate.js:46:43
at allValidationsChecked (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/core/validations.js:210:5)
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:49:16
at done (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:239:19)
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:40:16
at validate (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/core/validations.js:147:49)
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:162:20
at /usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:230:13
at _arrayEach (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:81:9)
at _each (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:72:13)
at Object.async.forEachOf.async.eachOf (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:229:9)
at Object.async.forEach.async.each (/usr/local/lib/node_modules/sails/node_modules/waterline/node_modules/async/lib/async.js:206:22)
at Validator.validate (/usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/core/validations.js:207:9)
at /usr/local/lib/node_modules/sails/node_modules/waterline/lib/waterline/query/validate.js:42:25
Invalid attributes sent to User:
• email
• "email" validation rule failed for input<EMAIL_ADDRESS>I had to remove "email: true" inside my model to make it work. I am not sure what I am missing here. Would appreciate your feedback
regards,
Manjunath


Replacing a broker does not get recognized by other brokers

Not sure if this is a kafka issue or a dcos-kafka issue.
Is it dcos-kafka responsibility to "update" ip of new broker nodes?
We replaced broker-1, and we see this error in other brokers:
[2016-10-13 23:32:31,327] WARN [ReplicaFetcherThread-0-1], Error in fetch kafka.server.ReplicaFetcherThread$FetchRequest@180da2d6 (kafka.server.ReplicaFetcherThread)
java.io.IOException: Connection to <IP_ADDRESS>:9092 (id: 1 rack: null) failed
	at kafka.utils.NetworkClientBlockingOps$$anonfun$blockingReady$extension$2.apply(NetworkClientBlockingOps.scala:63)
	at kafka.utils.NetworkClientBlockingOps$$anonfun$blockingReady$extension$2.apply(NetworkClientBlockingOps.scala:59)
	at kafka.utils.NetworkClientBlockingOps$.recursivePoll$1(NetworkClientBlockingOps.scala:112)
	at kafka.utils.NetworkClientBlockingOps$.kafka$utils$NetworkClientBlockingOps$$pollUntil$extension(NetworkClientBlockingOps.scala:120)
	at kafka.utils.NetworkClientBlockingOps$.blockingReady$extension(NetworkClientBlockingOps.scala:59)
	at kafka.server.ReplicaFetcherThread.sendRequest(ReplicaFetcherThread.scala:239)
	at kafka.server.ReplicaFetcherThread.fetch(ReplicaFetcherThread.scala:229)
	at kafka.server.ReplicaFetcherThread.fetch(ReplicaFetcherThread.scala:42)
	at kafka.server.AbstractFetcherThread.processFetchRequest(AbstractFetcherThread.scala:107)
	at kafka.server.AbstractFetcherThread.doWork(AbstractFetcherThread.scala:98)
	at kafka.utils.ShutdownableThread.run(ShutdownableThread.scala:63)

@jessecollier Can you please share how you performed the replace operation ?

@mohitsoni by calling dcos kafka broker replace 0 or calling the API

@jessecollier I tried the replace operation on the latest released version, and I didn't see this particular failure. Here's what I did:

Created a DC/OS cluster
Ran: dcos package install kafka
Waited for Kafka to becomes healthy
Ran: dcos kafka broker replace 1
Replaced broker-1 came up just fine.

I then inspected the logs and didn't see the StackTrace that you reported.
Did I miss anything ?

So I will say that the broker replacement part works. broker-1 does in fact come back up.
However, it is unclear (through code and documentation) whether there is anything done to the kafka service to ensure that broker is fully integrated back into the cluster as a leader of partitions and replica.
Here's what we are doing:

5 brokers
rep factor of 3
50 partitions
6 topics

Produce some messages on each topic and enough to be on every partition. You can see through kafka-topics.sh that each partition is evenly disrupted with 3 nodes in ISR.
Replace a single broker. Continue to monitor ISR. You'll notice that broker is missing from all the ISR's. Checking the logs indicate it is connecting to the old IP.
You should see that broker drop from ISR. Never recovering. Checking logs show the stacktrace

Are you killing the agent or just replacing the broker? Does it get scheduled on the same machine?

Just a simple replace. It does not start up on the same machine. Get's scheduled onto another machine.

And now you are concerned with the fact that the restarted broker is missing from all ISRs? Do I understand the problem correctly?

Correct. And all other brokers do not seem to have recognized the IP change as well.

Is the new broker correctly registered in ZK?

@jessecollier So, I tried following:

Created a DC/OS cluster
Ran: dcos package install kafka
Waited for Kafka to becomes healthy
Created topic: dcos kafka --name=kafka topic create topic1 --partitions=3 --replication=3
Replace broker 1: dcos kafka broker replace 1
Produced 100K messages: dcos kafka topic producer_test topic1 100000
And, checked for under replicated partitions: watch -n 1 dcos kafka topic under_replicated_partitions

While the broker 1 was down, the partition were under replicated:
(Output of watch -n 1 dcos kafka topic under_replicated_partitions)
{
  "message": "Output: \tTopic: topic1\tPartition: 0\tLeader: 0\tReplicas: 0,2,1\tIsr: 0,2\n\tTopic:
 topic1\tPartition: 1\tLeader: 0\tReplicas: 1,0,2\tIsr: 0,2\n\tTopic: topic1\tPartition: 2\tLeader:
 2\tReplicas: 2,1,0\tIsr: 2,0\n"
}

As soon as the broker 1, came back online. Kafka was able to re-replicate on it's own:
(Output of watch -n 1 dcos kafka topic under_replicated_partitions)
{
  "message": ""
}

Does that address your concerns ?

Thanks for testing this.
We were sending a lot of traffic at the time we saw the issue. Let me try replicating your steps in our environment and see if anything changes.

@jessecollier Sounds good. I'm going to close this for now. Feel free to re-open this one if you encounter any related issue.


话题对接

以解决，谢谢老师！

Sorry for the late reply. Being quite busy these days. Glad to see your problem solved!

是我一些细节没注意到，我应该先多思考思考，感谢老师的工作！


MNT: Re-rendered with conda-smithy 3.1.5 and pinning 2018.05.22

Checklist

[ ] Used a fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy
[ ] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


Support an option like --stdin-filepath

When CSharpier formats a file from stdin, it considers the current directory to be the location of the file for purposes of finding a config file and ignore file.
We should add an option --stdin-filepath
This will be considered the location of the file for purposes of finding the config file and the ignore file.

Closing for lack of interest


psen_scan_v2: 0.3.4-1 in 'noetic/distribution.yaml' [bloom]

Increasing version of package(s) in repository psen_scan_v2 to 0.3.4-1:

upstream repository: https://github.com/PilzDE/psen_scan_v2.git
release repository: https://github.com/PilzDE/psen_scan_v2-release.git
distro file: noetic/distribution.yaml
bloom version: 0.10.7
previous version for package: 0.3.3-1

psen_scan_v2
* Prevent error when diagnostics are disabled. Fix #294
* Set exception in stop-future
* Apply clang-tidy fixes to header-files. Fix #277
* Remove latched flag from active zoneset topic
* API change: convenience usage of ScannerConfiguration
* Remove unrelated parameter DEFAULT_X_AXIS_ROTATION from standalone
* Contributors: Pilz GmbH and Co. KG

@martiniil mind to add a LICENSE file at the source repository root (as per current contribution guidelines)?
Edit: I see a LICENSES directory. Not all of them are reflected in the package.xml though. Best to sort this out now then.

@hidmic Thanks for your comment. The entry in the package.xml is correct. But the LPLG license text is not complete on its own, it only adds to the GPL license text. So we provide both.
Is there anything more we can do to sort this out?

But the LPLG license text is not complete on its own, it only adds to the GPL license text. So we provide both.

I see. Putting both in a single LICENSE file is equally ad-hoc.

Nevermind then. Going in.


NOTICK: Explicitly mark member variables as @Volatile

As they may change as a result of configuration update.

Sorry, @conalsmith-r3 and @JamesHR3 - I pressed "Merge" too soon.
But please feel free to provide further input on this PR, which we might need to address as subsequent PRs.


Idea from community

https://mods.factorio.com/mod/no-maraxsis-gatekeep-promethium
https://mods.factorio.com/mod/beacon_maraxsis_tenebris

maybe consider add this stuff at optionnal settings ?
what do you think @notnotmelon

What's the benefit of it? People could already install those mods. No need to make a setting when its so easy to install those mods.

have one official mod and no need dependency, and if many people take the second mod, it's maybe because it's usefull or needed ? =)


adding edit button

Trying out the gitbook edit button.
It doesn't seem to show up in the rendered previews below; it's working when I run bookdown::render_book() on my computer (using the Docker image)
Is this something we want, or not worth it?

This is awesome! 🤩 I can actually see it in the preview, although the icons look weird. Would be interested to see if that goes away upon render.

We should make another issue for explaining how to find/do this in the appendix, because folks probably won't intuitively click up there if they want to submit feedback.

@KatherineCox is this something we could add to https://github.com/jhudsl/AnVIL_Book_Instructor_Guide and https://github.com/jhudsl/GDSCN_Book_SARS_Galaxy_on_AnVIL?
Seems like we might want a template :)

@avahoffman we can definitely add it to the other two repositories, it's an easy change.  Want me to submit the PRs?
Candace is working on adding something for feedback to the template, jhudsl/DaSL_Course_Template_Bookdown#322.
That would add a general feedback link (which could link wherever we want), as opposed to my PR which turns on the gitbook edit button linking directly to the Rmd of whatever page the reader is viewing.
Nothing stops us from doing both, if we want.  I'd lean towards having both.  Perhaps we could have the general feedback button link to a Google form for people who aren't comfortable with GitHub.

@KatherineCox I like the idea of having both, as long as we're clear that either can be used (e.g., users wouldn't have to do both)


GH-36735 : Add TimeUnit and TimeZone to the arrow.type.TimestampType display

Rationale for this change
The arrow.type.TimestampType display should include the TimeUnit and TimeZone properties. Right now we only display the ID property:
>> type = arrow.type.timestamp(TimeUnit="Second", TimeZone="America/Anchorage")

type =

  TimestampType with properties:

    ID: Timestamp

We should show the other two properties in the display.
What changes are included in this PR?
Modified the display of TimestampType:
>> type = arrow.type.timestamp(TimeUnit="Second", TimeZone="America/Anchorage")

type =

  TimestampType with properties:

          ID: Timestamp
    TimeUnit: Second
    TimeZone: "America/Anchorage"

Now TimeUnit and TimeZone are included.
Are these changes tested?
Added a test case to tTimestampType called Display. It verifies TimestampType objects are displayed correctly in the Command Window.
Are there any user-facing changes?
Yes, users will see the new display.

Closes: #36735

I believe the CI failures are unrelated to my changes.


(BOLT-407) Ensure TargetSpec is aliased while resolving types

When resolving types to display as part of bolt plan show, ensure
TargetSpec is still an alias in the compiler so that types using that
name resolve to an existing type.

CLA signed by all contributors.