Docker/singularity container doesn't seem to contain ns-* commands

Describe the bug
I built a singularity container from the Dockerhub address listed on the web page and then ran "singularity run --nv nerf.simg" and tried to find the ns-* files but I am unable to find them.
To Reproduce
Run:
singularity build nerf.simg docker://dromni/nerfstudio:1.0.2
singularity run --nv nerf.sif ns-process-data video --data /workspace/video.mp4
Expected behavior
No errors
** Result:
== CUDA ==
CUDA Version 11.8.0
Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license
A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.
/opt/nvidia/nvidia_entrypoint.sh: line 67: exec: ns-process-data: not found

I also have a problem using your docker container with singularity. When I try to build the container v 1.1.3, singularity hangs at "creating SIF file".
Before that, singularity complains about permissions set in the docker container.
Is there a specific reason why nerfstudio is installed in the user directory of user 1000? Also, is there a specific reason why the cli is installed in /workspace?
I would expect, that inside the container, nerfstudio is simply installed in the base python environment and the cli scripts are installed under /usr/local/bin

a

Hi, I think I found a workaround for this problem, I hope it also applies to your case.
I am currently working with the nerfstudio image 1.1.0.
I create the container using the following .def file:
`
Bootstrap: docker
From: dromni/nerfstudio:1.1.0
%post
sudo chmod 777 /home/user
sudo rm -rf /usr/lib/x86_64-linux-gnu/libcuda.so.1 /usr/lib/x86_64-linux-gnu/libnvidia-*.so.1 /usr/lib/x86_64-linux-gnu/libnvcuvid.so.1 /usr/lib/x86_64-linux-gnu/libcudadebugger.so.1
After this when I run the container with singularity I make sure to run the following command before the actual nerf command:export PYTHONPATH=$PYTHONPATH:/home/user/pyceres:/home/user/.local/lib/python3.10/site-packages:/home/user/pixel-perfect-sfm:/home/user/nerfstudio:/home/user/Hierarchical-Localization:/home/user/garfield:/home/user/nf_bionerf`
If I try it inside the singularity shell I can also see the nerfstudio commands.
For additional reference, my exec command looks like this:
singularity exec --nv /singularity/nerfstudio.sif /bin/bash -c 'export PYTHONPATH=$PYTHONPATH:/home/user/pyceres:/home/user/.local/lib/python3.10/site-packages:/home/user/pixel-perfect-sfm:/home/user/nerfstudio:/home/user/Hierarchical-Localization:/home/user/garfield:/home/user/nf_bionerf && cd /workspace && ns-train ...'

@SwirtaB I saw you made the latest changes to the dockerfile. Question from my side: what is the design choice behind working as a user inside the dockerfile?
This makes it impossible to use the docker container with singularity/apptainer, since inside a singularity container, I still work under my own user and hence do not have access to the directory /home/user.
@FabioLddo s approach may work, but feels hacky to me.
The normal docker way would be to install nerfstudio as a system app under /usr/local. This would make the docker container usable with singularity/apptainer, which is the standard container software on most HPC clusters.

Hi @thawn,
Note that I am not the part of the team working on nerfstudio project. I have suggested and committed changes to Dockerfile in May, which is way after the initial issue (so no problem there) and I did not modify the ways in which the container works.
The way I see it, this image serves as a simple way to obtain a stable development environment and not as the go-to development workspace (requires adjustment from the end user if one wishes to use it in more complex scenarios).
If user inside container is a problem, you can change the user via --build-args (available args are: USERNAME, USER_UID, USER_GID) and run it as local user (Docker CE allows for such operation, see documentation ).
If this not solves your problem, feel free to implement changes and contribute to the repository.

Hi @SwirtaB ,
thanks for the quick reply.
I cannot solve the problem with docker, since I am forced to use singularity on our cluster (allowing docker in a multi-user environment would be a huge security risk).
I created a docker file that solved the problem for me. I will submit a pull request.
Cheers,

This can be closed as fixed by #3283
I pulled docker://ghcr.io/nerfstudio-project/nerfstudio:pr-3283 with singularity and it works well 👍


[Question  Component ]is there a method like "viewdidappear" in swift?

I  have  a ProfileView  and  because  I haven't login  so  it  shows  default avatar and  a   login button  linked  to  LoginView.
I type  my  id and  password   and  login  , success  ,then  back to ProfileView.
so, now I need to   update  the   view,   how to ?
the  componentWilMount   didn't work.
is there  a  method   like  "viewdidappear" in swift?

You can listen to the "didfocus" event on a Navigator's NavigationContext. There is no viewDidAppear method.


Update harness-self-managed-enterprise-edition-overview.md

Updated the module status for CCM and CE as beta.
Harness Developer Pull Request
Thanks for helping us make the Developer Hub better. The PR will be looked at
by the maintainers.
What Type of PR is This?

[ ] Issue
[ ] Feature
[ ] Maintenance/Chore

If tied to an Issue, list the Issue(s) here:

Issue(s)

House Keeping
Some items to keep track of. Screen shots of changes are optional but would help the maintainers review quicker.

[ ] Tested Locally
[ ] Optional Screen Shoot.

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app


grizzly: diffrent action depending on type of fault

Is your feature request related to a problem? Please describe.
Right now it is possible to choose 1 of 3 ways to handle a failure:

just continue
stop user
restart scenario

Describe the solution you'd like
There are cases when one would want different action depending on the type of failure.
So a way of setting what would happend for a specific exception type and/or message.
Describe alternatives you've considered
N/A.

Extra sugar on top would be:

stop test


docker-pass-changes

Good work @bhondgesanket768! Just commit the suggestions I have provided in a batch and we are good to go!


[KOGITO-4956] avoid registering anonymous rule units

Many thanks for submitting your Pull Request :heart:!
Please make sure that your PR meets the following requirements:

[ ] You have read the contributors guide
[ ] Your code is properly formatted according to this configuration
[ ] Pull Request title is properly formatted: KOGITO-XYZ Subject
[ ] Pull Request title contains the target branch if not targeting master: [0.9.x] KOGITO-XYZ Subject
[ ] Pull Request contains link to the JIRA issue
[ ] Pull Request contains link to any dependent or related Pull Request
[ ] Pull Request contains description of the issue
[ ] Pull Request does not include fixes for issues other than the main ticket

How to retest this PR or trigger a specific build:

Pull Request
Please add comment: Jenkins retest this

Quarkus LTS checks
Please add comment: Jenkins run LTS

Native checks
Please add comment: Jenkins run native

Full Kogito testing (with cloud images and operator BDD testing)
Please add comment: Jenkins run BDD
This check should be used only if a big change is done as it takes time to run, need resources and one full BDD tests check can be done at a time ...

@evacchi @danielezonca I didn't remove the unitRegistry map, but only populating it when a name is explicitly given instead of generating an UUID that anyway is not reachable as I did before.
This allowed me to also keep this test that is the only one using that registry so far and also demonstrating how I intended to use it. If you think that this usage pattern is not useful or anyway in contrast with the direction of the other APIs we're implementing please let me know and I'll remove both the registry and the test. At the moment I'm not strongly opinionated about this.

The Linux check has failed. Please check the logs.

well @mariofusco that won't eliminate the "leak" unless we provide some sort of "remove/dispose" method. Something we need to be aware of in the future.

The Linux check is successful.


Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'

I got the following error on 3.0.1
flutter Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Program type already present: com.google.common.util.concurrent.ListenableFuture
3.0.0 workes fine though

can you check your android gradle file whether your compile SDK version is 28 or not

Compilesdk 28, targetsdk 27


find_contours function error - endless loop and RAM out of memory

I am having some problems with the upolygon.find_contours function.
I have some input masks that make the function run endlessly, while my computer RAM starts increasing until it reaches 100% and python kernel crashes and/or I terminate the find_contours execution.
If I try to run the opencv cv2.findContours function I don't have this problem, however the hierarchical structure of the output is quite different from the one of upolygon.find_contours.
Unfortunately I am not able to map the output of cv2.findContours to a format similar to the upolygon.find_contours output, as the upolygon code has no docstring/comments explaining the output format.
Any idea of how either to fix the find_contours problem, or  how to map cv2.findContours output to upolygon.find_contours output?
Here some details:
Windows 11
python 3.10.8
upolygon 0.1.10 (updated this morning to the latest release)
I link a json file containing a few examples of masks (in RLE format) that give the error : https://cyberhawk-my.sharepoint.com/:u:/g/personal/francesco_graffitti_thecyberhawk_com/EQLKLbPehtRJpoxPoGiGnHgB-u4WuqsD6fFj4zWyfRHxaA?e=rZclfs
And here is the plot of those same masks:

Code to reproduce the error:
import json
from upolygon import find_contours, rle_decode
from darwin.importer.formats.coco import decode_binary_rle

with open('data.json') as f:
  data = eval(f.read())

mask_index = 0 # select any of the masks from the data.json file-all of them lead to an error
segmentation = data[mask_index]
counts = decode_binary_rle(segmentation["counts"])
mask = rle_decode(counts, segmentation["size"][::-1])

# this is the upolygon function that runs endlessly
_labels, external, _internal = find_contours(mask)

# this is the opencv find contours function that works as expected on the same mask
import cv2
contours,hierarchy = cv2.findContours(mask,cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)

What's weird, for example, is that the first top-left mask gives this error, but if I crop the image tighter around the annotation (leaving some padding around it, I am using as coordinates [2100:4100,1500:6600]) the find_contours function runs smoothly, even though what I cut out was just pixels having value=0.

Thanks for the thorough steps to recreate, we have a ticket in our backlog now to look into this, and you can speak to your CX reps for updates if you need them.  The code you've submitted will be very helpful in recreating the issue.
Many thanks
Owen

Just to note we are working on this issue and testing a fix here
https://github.com/v7labs/upolygon/pull/15

@Nathanjp91 @owencjones
Hey guys, I have seen from the logs that you have found the problem in the function and fixed it. Do you have an ETA on when the changes will be merged into main?
Thanks for having worked on this!

@fgraffitti-cyberhawk We have it in QA at the moment but because of the nature of the issue and the code involved was taking longer than expected. The fix is currently in a branch here of darwin-py. There's some issue getting it deployed because upolygon needs to be rebuilt with a new version for pypi to accept it in darwin-py, but you could install that branch of darwin-py and test if it resolves your issues.


Instance names are not showing. Only the states and the action

I have compile this in development environment and connect to my esp.Names of the instance are not  showing.
eg - relay1 ,sensor1
this issue is refering to the version 2 web server

this issue is refering to the version 2 web server

So the names are defaulting to the ids?
I believe you are using the old V1 webserver backend and using the new JS files from this repository.
The PR has not been pulled into the main dev stream yet. You would need to compile against https://github.com/wilberforce/esphome/tree/webserver-v2 to get the correct backend server code

yes.That's the problem now its working.

yes.That's the problem now its working.

Nice... gettting closer to this getting into the main branch...


Support for continuous variables

It would be nice, if the library could support continuous variables besides the already existing discrete states.
It's probably a big undertaking, but I'll leave it here for consideration!
Thanks!

I think creating Gaussian networks would not require too much work.   The potentials used for message passing would need to be modified.   Also, introduction of evidence would likely need to be updated.     Let me do a little bit of digging.


Make sure that landing-page information is present in MMD and that it is a valid url

is something like adding a check for landing_pagein full_check (https://github.com/metno/discovery-metadata-catalog-ingestor/blob/main/dmci/tools/check_mmd.py#L281) enough? and is landing_page the name of the attribute? I cannot find it in either CF or ACDD so the name is probably something else..

is something like adding a check for the landing page in full_check (https://github.com/metno/discovery-metadata-catalog-ingestor/blob/main/dmci/tools/check_mmd.py#L281) enough?

Yes, I think so. Landing page is an MMD "related_information" field with type="Dataset landing page". It is not obvious that it should be there, as it is not required, so I'm not sure if we can use the mmd_strict.xsd to check this. Probably better to add some python lines.

and what is the name of the attribute?

Example:
<related_information>
    <type>Dataset landing page</type>
    <resource>https://data.met.no/dataset/<uuid></resource>
</related_information>

The url should be pointing to our production server, or maybe be dynamically created. The latter is maybe best, but then we have to handle this in dmci itself. This could be done based on the environment (dev, staging or production) and the dataset uuid. In this case, we need to add the field to the MMD string before distribution to file, pycsw and solr.

I cannot find anything like landing_page or similar in either CF or ACDD so the name is probably something else.. and also it must not be a resource otherwise there would be no need to check the url, right?

Not sure what you mean, but I think we can only check the url pattern. Anyway, the check is maybe not that important if the landing page field is added by dmci itself.

if I understand correctly by seeing issue "Add landing page information when creating mmd#225", the landing page info would be created elsewhere (edit: this is https://github.com/metno/py-mmd-tools/issues/225)

Yes, it could be done in py-mmd-tools but when I think about it, it may be better in dmci since it is strongly connected to the data site/system which is "known" in the dmci service. @johtoblan - what do you think? In that case, we can close https://github.com/metno/py-mmd-tools/issues/225.

* as for the url check what  I mean is that the code currently already checks for all the urls that are in the "resources" category  https://github.com/metno/discovery-metadata-catalog-ingestor/blob/main/dmci/tools/check_mmd.py#L303

Ok, then that may be enough.

Discussed in review meeting now. We add data.met.no in the MMD files. This can be changed in dmci to adjust for dev and staging envs.

Update: the landing page should be set by dmci, since this is the entry point for the data management service. See https://github.com/metno/py-mmd-tools/issues/225

should this happen only for /v1/create or /v1/insert kinda events or also for /v1/validate?
because if the former then it could be part of the _insert_update_method_post function https://github.com/metno/discovery-metadata-catalog-ingestor/blob/main/dmci/api/app.py#L113 and instead if the latter then it must be probably its own function which will be called by _validate_method_post too and not just _insert_update_method_post

So you use verify, get a Everything is ok, and then it fails on update/insert?

mmh I do not fully understand how _validate_method_post and post_validate() work in context but for now I would write a function called something add_landing_page that would be called after checks like worker.validate(data) and then takes the byte string data and the uuid (or extracts is if we do not want modify other places so that it's passed out) and adds the needed chars via regex.. (easy to do it just before the last \n</mmd:mmd>\n if there is no related_information, not sure how to handle the case where the field is already present in the xml file..)

So you use validate, get a Everything is ok, and then it fails on update/insert?

Why should it fail on update/insert?

mmh I do not fully understand how _validate_method_post and post_validate() work in the context of the full chain, but for now I could write a function called something add_landing_page that would be called after checks like worker.validate(data) and then takes the byte string data and the uuid (or extracts is if we do not want modify other places so that it's passed out) and adds the needed chars via regex.. (easy to do it just before the last \n</mmd:mmd>\n

It needs to be in the right place in the MMD because of how the xsd is defined. Check mmd_strict.xsdto find the right place.

if there is no related_information, not sure how to handle the case where the field is already present in the xml file..)...

I think you'll need to replace it if it's already there, or check and replace if it is incorrect.

So you use validate, get a Everything is ok, and then it fails on update/insert?

Why should it fail on update/insert?

If we add validation to the update/insert that is not present in validate

So you use validate, get a Everything is ok, and then it fails on update/insert?

Why should it fail on update/insert?

If we add validation to the update/insert that is not present in validate

But that shouldn't be a problem as long as we know the internal functionality is correct? We can make sure it works using unit tests..?

mmd_strict.xsd

you mean /tests/files/mmd/mmd.xsd?
how can it be placed in the right order agnostically of what other fields are present? like, we do not expect a predictable number of fields the mmd files, beyond the mandatory ones.. or am I missing something?

mmd_strict.xsd

you mean /tests/files/mmd/mmd.xsd? how can it be placed in the right order agnostically of what other fields are present? like, we do not expect a predictable number of fields the mmd files, beyond the mandatory ones.. or am I missing something? like for example, where would it be placed in an example like tests/files/api/passing.xml?

https://github.com/metno/mmd/blob/master/xsd/mmd_strict.xsd

The host url for the landingpages should also change with respect to environments.
Now new precessed mmd-files sendt to mmd-xml-dev, still have https://data.met.no/dataset/
should be https://data-test.met.no/dataset/ for dev environment and https://data-staging.met.no/dataset/ for staging environment

yeah, that will be read from the config

@magnarem - should we also change the metadata_identifier from  no.met:<uuid> to no.met.dev:<uuid> and no.met.staging:<uuid> for the dev and staging envs as part of this?

as far as I understand the order in a xsd template matters only inside of the xs:sequence indicator blocks, so if there is no related_information in data already, adding it before the last </mmd:mmd> should be fine right? otherwise I can't think of an easy way of doing it that would hold for whatever possible valid xml file/data string

sure @mortenwh, fine by me, the idea of having something _string is that I though we woud preserve the existing namespace and just append .dev/.staging or nothing, but I guess there's no way there can be anything else, or we want to have anything else than no.met ?? if that's the case then having the whole namespace in the conf instead of just environment_string is ok I guess

but anyway I'll change from web_catalog to overrides in the PR attached to this issue, so that it's already there for issue #147

Sounds good! In case others want to use dmci, I guess the full namespace (e.g., no.met.staging) is best.


Added example specification files

examples/config_dc2_test_med.yaml is the top-level specification file and it calls out all the other ones.
examples/notes.txt shows some thoughts on how we might use these to build and run campaigns

This has been overtaken by events and the comments have been incorporated into the design of the specification files.


Wave Pirates fix and QoL tweaks

Skippable Cutscenes:

Fixed an issue in Mine Security Station where the wave pirates won't drop down if the player didn't skip the cutscene immediately.

QoL:

Increased the size of the bottom door open trigger in Root Cave
Mine Security Station:

Changed the Shadow Pirates to activate the Wave Pirates cutscene upon DeathRattle instead of Dead
Resized the cutscene trigger so it's not accidentaly skipped if jumped over.
Removed vanilla behavior of the cutscene playing again upon killing the Shadow Pirates if entering the room in reverse.

I’m not sure I agree with the changes to vanilla behavior in MSS. There are still people who get Storage Depot A and use the cutscene to repo back to where the Wave Pirates are in MSS. I am one of them.

Both triggers are good ideas.

what reggie said

if the qol changes aren't strictly necessary for the fix to work, they should be in a separate PR probably

I’m not sure I agree with the changes to vanilla behavior in MSS. There are still people who get Storage Depot A and use the cutscene to repo back to where the Wave Pirates are in MSS. I am one of them.

Counterpoints:

If you kill the Wave Pirates first then the Shadow Pirates, it would be pretty confusing to see an empty cutscene that replays the music and everything else except that nothing happens.

I doubt many other people would care to do speedrun strats in a randomizer but this is just my opinion.

I can still change this if decired.

I’m not sure I agree with the changes to vanilla behavior in MSS. There are still people who get Storage Depot A and use the cutscene to repo back to where the Wave Pirates are in MSS. I am one of them.

Counterpoints:

If you kill the Wave Pirates first then the Shadow Pirates, it would be pretty confusing to see an empty cutscene that replays the music and everything else except that nothing happens.

I doubt many other people would care to do speedrun strats in a randomizer but this is just my opinion.

I can still veto this if desired.

Toaster and I had come up with a good grade for the “cost” of a QoL being introduced, and the other MSS changes fall into the “lose more than you gain” category for me.
The behavior is expected.

From a casual perspective, these changes are nice, but it'd probably be better to have them seperate from QoL. So that speedrunners who have the muscle memory burned down to use reposition strats can continue to rely on them and newcomers being less confused.

If you kill the Wave Pirates first then the Shadow Pirates, it would be pretty confusing to see an empty cutscene that replays the music and everything else except that nothing happens.

Are these really valid issues? I genuinely do not see any complaints regarding this vanilla behavior, and many have already been playing with this behavior implemented so they have come to expect it, so reverting this would be counterintuitive because players already expect vanilla behavior out of this. If players understand this behavior fully, they can learn to take advantage of the reposition and make some pretty creative plays in the same way a speedrunner does.

Retract this change. Everything else is good

I'm still working on some other commits, will probably finish today.

Are those commits going into this branch? The less you dogpile into one PR, the faster it is for me to review/approve/merge

Are those commits going into this branch? The less you dogpile into one PR, the faster it is for me to review/approve/merge

mmm I suppose I'll make a different PR then, I still have to change the thing tho


Support for git lfs fetch --recent

git lfs fetch --recent downloads files for things other than your current checkout, to pre-empt their use and thus avoid making the user wait when they switch a branch, or want to check out recent changes.
It can do 2 things:

Fetch a snapshot of files at 'recent branches', committed within a configurable number of days of the current date. This means switching to those branches is far quicker than before.
Fetch previous versions of files that existed before a branch tip, committed within a configurable number of days of the last commit on that branch. This applies to the current HEAD and all 'recent branches', if any. This means looking at recent changes on interesting branches is quick.

You can also make --recent the default via lfs.fetchrecentalways.
The fetch operations are deliberately ordered so the most useful things are done first:

Fetch snapshot of the current HEAD
Fetch recent branches, most recent to least recent
Fetch recent previous versions, starting with HEAD and then recent branches, most recent to least

This means that this command can be left in the background if you want; once the current ref is finished you can carry on working and let the recent fetching happen in the background. Reporting on the command line has been upped a little bit so the user can see which part of the fetch is going on.
This PR also includes:

A dedicated 'config' man page listing all of the git config options that Git LFS adds
fetch at a ref now only downloads the state at that ref, and not previous versions (without --recent). Previously fetch would use the --do-walk option to git rev-list which means it would include any previous changes to the same files and also files which were deleted. This is more efficient and the --recent option gets time-bounded previous versions.
Utility methods like CurrentRef now return a Ref struct instead of a single value; this saves round-trips when you need the name of the ref as well as the SHA (also categorises into branch/remote branch/tag)
When files are skipped in fetch because of the include/exclude filter, this is reported if GIT_TRACE=1
Tests added for CurrentRef and CurrentRemoteRef

This branch looks great :metal: I'm ready to merge this once the (nitpicky) man page stuff is sorted.

I've made the man changes, and I've also changed the defaults for remote ref fetching after some reflection (latest commit).


ServiceRoleBinding for Google Cloud Function

Describe the bug
I'm trying to add a Google Service Account into ServiceRoleBinding to authorize a Google Cloud Function to certain services.
Expected behavior
I expect the GC Function with an specific ServiceAccount as identity, to be authorized according to a ServiceRoleBinding and ServiceRole to perform actions.
Steps to reproduce the bug

With ClusterRbacConfig enabled,
Create a ServiceRole with the methods and services needed, and
A ServiceRoleBinding, referencing that ServiceRole, tried with the following:

subjects:
  - user: "serviceaccountemail"

Where serviceaccountemail is the Google Cloud Service Account email.

Deploy a Google Cloud Function with that Google Cloud Service Account as identity, and that tries to perform actions defined in the ServiceRole, and you will get 403 RBAC: access denied.

I can achieve this for any user, or for a local serviceaccount with cluster.local/ns/<namespace>/sa/<serviceaccount>, but cannot do it for a SA of a GC Function.
Version
Istio: 1.1.0
Kubernetes: v1.12.5-gke.5
Installation
Downloaded it with wget -qO- https://github.com/istio/istio/releases/download/${ISTIO_VERSION}/istio-${ISTIO_VERSION}-linux.tar.gz | tar xvz where ISTIO_VERSION=1.1.0
Installed with helm install
Enabled the sidecard injection with
kubectl label namespace <namespace> istio-injection=enabled --overwrite
Environment
GKE with NodeImage Container-Optimized OS (cos)

The problem is that Istio mesh uses Kubernetes service accounts, which are different than Google Cloud service accounts. My guess is that you have to federate Google Cloud service account. This is an interesting use case. I'll see if I can find out more.

Thanks @pitlv2109 ! Were you able to find something about it?
We have a pretty good setup for authentication and authorization, but we need to enable functions to access some of our services in our cluster. So until we get this fixed for functions, we have set originIsOptional: true in the istio policy and allow actions for everyone...but we need to allow only the functions.

I think supporting Google Cloud Function is still under development...
@yangminzhu could you confirm?

The GCP service account is not supported in Istio authorization. Could you modify your function to attach the identity token with the request, and use Istio Authentication/Authorization policy to check the identity token?

thanks @yangminzhu , that was our alternative, and we have done that. Thanks!


Git leaks - Usability feedback

Hey There,
Thanks again for a really great tool.  I'm providing this feedback here, as per our discussions on reddit DM's.
I've got a bit of feedback that i think would help greatly with general usability. I'm slightly selfish in that these would greatly help me, however, I think it would also help other peoples adoption as well.

Customise the datadir / workdir directory on the CLI
Currently all data produced by the tool goes into ~/.gitleaks/ , however, for larger audits, it would be really great to be able to specify this directory so that the user could target a different location for performance or archival reasons.

JSON data output enhancements
This is a really great capability, possibly one of the killer features of your implementation.
Right now, for repositories that contain no results, you create a JSON file with a null value.
Ideally this should either not be created, or it should contain an empty array. This would ease parsing capabilities for those using your tool to generate large batches of results then post process them using something like Ruby (Which is what I am doing). My general feeling is that no report should be created if there are no matches, however, I think consistency is key however.

--quiet mode / --logfile
A quiet mode or logfile capability would help with automating your tool further, alongside more detailed exit codes as detailed below.

Return code definitions / Extended return code capability ?
Right now, from what I understand, the tool returns 0 for successful execution, and non-zero for unsuccessful execution. It would be great to have a bit more detail exposed as exit codes for different circumstances, such as if a scan executed, and returned matches, etc.

This would help greatly with automating your tool further. However, I'd love to hear what you and other users think about this.
A good example of this implemented well is in Puppet's --detailed-exit-codes functionality.

Externalising the regex matches ?
I'm not sure if this is something that will greatly affect performance, but it would be great to externalise the REGEX matches into a configuration file so that you don't have to rebuild the binary when updating rules. Putting them into a runtime configuration file (Maybe YAML) would really help usability. Being able to specify the datadir / workdir in this same file would also be great.

A very basic example could look like this:
---
config:
  workdir: /somewhere/else
regex:
  AWS:
    pattern: <REGEX>

Once again, thanks again for a great tool :)
K

Hey K,
Thanks so much for the detailed feedback. This is exactly what I was looking for and will help direct me during my next code jam. I think these four features would really help folks integrate gitleaks into whatever CI/pipeline/infra they have. Perhaps we could work together on defining exit codes?
Cheers 👍

Tackled the simplest of the bunch and now no reports will be generated if no leaks are found.

Absolutely.
Let me get a sample set of exit codes over to you tomorrow.
I'll take the latest build for a spin then as well.
This is going to be great when its in, escpecially for pipelines and audits.
K

Morning!,
OK how does this sound. I have reworked Puppet's --detailed-exitcodes option and when present, git leaks would return:
--detailed-exitcodes
Provide extra information about the scan via exit codes;  If enabled, 'gitleaks' will use the following exit codes:

0: The scan succeeded with no findings

1: The scan failed, or wasn't attempted due to an execution failure.

2: The scan succeeded, and secrets / patterns were found.

When this option is not used, the tool will by default  return 0 for execution success and 1 for all failure types. Thus keeping current functionality unchanged.
We can then add further detailed exit codes 3+ later if required.
Feedback welcome,
K

Hey @keirans, just wanted to let you know I'm still working on implementing all of these features. Progress here: https://github.com/zricethezav/gitleaks/tree/feature/usability
quite a big refactor

All good mate.
Just had a quick look, it's looking great.
I had another bit of feedback to add around when cloning , looping through all branches rather than operating off master as well. I think that will give you more coverage. Whats easiest for you ? Add it to my original suggestions at the top for tracking for the time being ?
Let me know if you want some help atleast with some of the doco, etc. My Markdown is better than my go ;)
K

https://github.com/zricethezav/gitleaks/pull/55 should do the trick on most of what you requested 👍 still need to implement externalizing regex... yaml has some goofy escape sequences so i might just opt for writing regex into a straight txt file...

I'm taking this for a spin now and will let you know how I go :)
Thanks again for your enhancements.
K

Hey There,
I've taken the new version for a run, it's looking pretty good.
I did find that the -r option that I was using on a bare repository, local repository was no longer working for me, however i solved this by just pre-cloning the repo and then using the -l option on the clone which got me solved. It would be nice if that could be fixed, but its nothing too major.
Apart from that, the report dir switch works very well and have really helped make the tool much friendlier to use, thanks for adding this, alongside not creating reports when there are no results.
Some of the other smaller things I think could help general usability is maybe explaining what some of the switches do in a little more detail:
*  --concurrency=<INT>    Upper bound on concurrent diffs
*  --since=<STR>          Commit to stop at
*  --b64Entropy=<INT>     Base64 entropy cutoff (default is 70)
 * --hexEntropy=<INT>     Hex entropy cutoff (default is 40)
*  -e --entropy           Enable entropy

If you want to drop a little bit of information my way, i'll happily update the README and tidy it up a little to help where I can.
I do have another feature that I think would make yours stand out from the other tools, and that is scanning all the branches of a repository (local and remote , via additional flags) rather than just the master branch. Let me know your thoughts on this, and I can open a feature request alongside how i'd suggest to implement it's logic.
Let me know what you think, and thanks as always :)
K


The "ContextRequested" event does not work correctly on touchscreens

Describe the bug
While holding the Button control on touchscreens, ContextRequested event fires twice and Click event also fires.

When holding down the button, ContextRequested event fires twice. When releasing the button, Click event fires.
Expected behavior
While holding down on Button, ContextRequested event fires only once, and releasing the Button does not fire Click event (like in UWP).
Screenshots

Environment

OS: Windows 11 23H2
Avalonia-Version: 11.0.5

ContextRequested should be raised once on inner ContentPresenter and bubbled up. For some reason it was raised second time on a Button (Source=Button).  This is a bug.
But not sure about Click, since ContextRequested event wasn't Handled=true. But if UWP does it differently, we should be at least consistent with it.

I decided to check the code above in the UWP project, and found out that the Click event also fires after holding down and releasing the button. It’s strange that I haven’t seen this behavior in UWP apps, so this may not be considered a bug.
However, I want the Click event not to be triggered. I added the line args.Handled = true into ContextRequested, but it didn't work.


Error when create module

I have installed Laravel 6.0 AdminPanel but when I can't create module. Pls help me check this error.

Thanks

Make full access for all user first

Run this command
"composer require laravel/helpers"

We have fixed issues in the new release. please check and let me know if you still find it.


django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.

Deployment Method

[X] Installer
[ ] Docker Development
[ ] Docker Production
[ ] Bare metal Development
[X] Bare metal Production
[ ] Digital Ocean image
[ ] Other (please provide a link Steps to Reproduce

Describe the problem*
Error about loading MySQLdb module when module is available to test python script.
I had an sqlite version running on 22.04 to evaluate installed by the script downloaded from get.inventree.org, but when trying to change to a MySQL database, I couldn't get it to work. I reinstalled the server with a fresh version of the latest 20.04 LTS and got the same error.
I have tested the connection to the remote MySQL server and can log in as the Inventree user using the password assigned to the account.
Server with a fresh install of Ubunti 20.04 with packages preinstalled and the install script run to enable a MySQL database installation.
uname -a
Linux serv1 5.4.0-153-generic #170-Ubuntu SMP Fri Jun 16 13:43:31 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
error line:     import MySQLdb as Database
Test script to load MySQLdb module
nano test.py
try:
import MySQLdb as Database
except ImportError as err:
print ('Error loading MySQLdb module')
version = Database.version_info
print (version)
python3 test.py
(2, 2, 0, 'final', 0)
Output: module loads successfully in test.py
Steps to Reproduce
Install the latest Ubuntu Server 20.04.06LTS from Canonical
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3 python3-dev python3-pip python3-invoke python3-venv git gcc g++ gettext gnupg poppler-utils libpango-1.0-0 libpangoft2-1.0-0 libjpeg-dev webp
sudo apt-get install pkg-config
sudo apt-get install default-libmysqlclient-dev
sudo pip3 install mysqlclient
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash
sudo apt-get install libmariadb-dev-compat
sudo pip3 install mariadb
wget -qO install.sh https://get.inventree.org
chmod +x install.sh
sudo -i
export INVENTREE_DB_ENGINE=mysql
export INVENTREE_DB_NAME=Inventree
export INVENTREE_DB_USER=Inventree_user
export INVENTREE_DB_PASSWORD=**************
export INVENTREE_DB_HOST=rem.ote.ipa.ddr
export INVENTREE_DB_PORT=3306
./install.sh
journalctl
Jul 13 10:38:56 serv1 inventree-web-1.service[45590]: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Jul 13 10:38:56 serv1 inventree-web-1.service[45590]: Did you install mysqlclient?
Jul 13 10:38:56 serv1 inventree-web-1.service[45590]: [2023-07-13 10:38:56 +0000] [45590] [INFO] Worker exiting (pid: 45590)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: [2023-07-13 10:38:56 +0000] [45592] [ERROR] Exception in worker process
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: Traceback (most recent call last):
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 15, in
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     import MySQLdb as Database
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: ModuleNotFoundError: No module named 'MySQLdb'
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: The above exception was the direct cause of the following exception:
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: Traceback (most recent call last):
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     worker.init_process()
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 134, in init_process
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     self.load_wsgi()
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     self.wsgi = self.app.wsgi()
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     self.callable = self.load()
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return self.load_wsgiapp()
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return util.import_app(self.app_uri)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/util.py", line 359, in import_app
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     mod = importlib.import_module(module)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return _bootstrap._gcd_import(name[level:], package, level)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "", line 1014, in _gcd_import
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "", line 991, in _find_and_load
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "", line 975, in _find_and_load_unlocked
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "", line 671, in _load_unlocked
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "", line 848, in exec_module
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "", line 219, in _call_with_frames_removed
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/InvenTree/InvenTree/wsgi.py", line 15, in
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     application = get_wsgi_application()  # pragma: no cover
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     django.setup(set_prefix=False)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/init.py", line 24, in setup
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     apps.populate(settings.INSTALLED_APPS)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     app_config.import_models()
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     self.models_module = import_module(models_module_name)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return _bootstrap._gcd_import(name[level:], package, level)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "", line 1014, in _gcd_import
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "", line 991, in _find_and_load
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "", line 975, in _find_and_load_unlocked
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "", line 671, in _load_unlocked
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "", line 848, in exec_module
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "", line 219, in _call_with_frames_removed
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/InvenTree/build/models.py", line 8, in
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     from django.contrib.auth.models import User
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/contrib/auth/models.py", line 3, in
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 48, in
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     class AbstractBaseUser(models.Model):
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/models/base.py", line 122, in new
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     new_class.add_to_class('_meta', Options(meta, app_label))
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/models/base.py", line 326, in add_to_class
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     value.contribute_to_class(cls, name)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/models/options.py", line 207, in contribute_to_class
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/utils/connection.py", line 15, in getattr
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return getattr(self._connections[self._alias], item)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/utils/connection.py", line 62, in getitem
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     conn = self.create_connection(alias)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/utils.py", line 204, in create_connection
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     backend = load_backend(db['ENGINE'])
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/utils.py", line 111, in load_backend
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return import_module('%s.base' % backend_name)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return _bootstrap._gcd_import(name[level:], package, level)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 17, in
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     raise ImproperlyConfigured(
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: Did you install mysqlclient?
Relevant log output
journalctl

Jul 13 10:38:56 serv1 inventree-web-1.service[45590]: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Jul 13 10:38:56 serv1 inventree-web-1.service[45590]: Did you install mysqlclient?
Jul 13 10:38:56 serv1 inventree-web-1.service[45590]: [2023-07-13 10:38:56 +0000] [45590] [INFO] Worker exiting (pid: 45590)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: [2023-07-13 10:38:56 +0000] [45592] [ERROR] Exception in worker process
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: Traceback (most recent call last):
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 15, in <module>
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     import MySQLdb as Database
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: ModuleNotFoundError: No module named 'MySQLdb'
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: The above exception was the direct cause of the following exception:
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: Traceback (most recent call last):
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     worker.init_process()
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 134, in init_process
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     self.load_wsgi()
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     self.wsgi = self.app.wsgi()
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     self.callable = self.load()
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return self.load_wsgiapp()
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return util.import_app(self.app_uri)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/gunicorn/util.py", line 359, in import_app
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     mod = importlib.import_module(module)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return _bootstrap._gcd_import(name[level:], package, level)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "<frozen importlib._bootstrap_external>", line 848, in exec_module
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/InvenTree/InvenTree/wsgi.py", line 15, in <module>
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     application = get_wsgi_application()  # pragma: no cover
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     django.setup(set_prefix=False)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     apps.populate(settings.INSTALLED_APPS)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     app_config.import_models()
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/apps/config.py", line 301, in import_models
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     self.models_module = import_module(models_module_name)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return _bootstrap._gcd_import(name[level:], package, level)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "<frozen importlib._bootstrap_external>", line 848, in exec_module
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/InvenTree/build/models.py", line 8, in <module>
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     from django.contrib.auth.models import User
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/contrib/auth/models.py", line 3, in <module>
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 48, in <module>
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     class AbstractBaseUser(models.Model):
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/models/base.py", line 122, in __new__
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     new_class.add_to_class('_meta', Options(meta, app_label))
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/models/base.py", line 326, in add_to_class
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     value.contribute_to_class(cls, name)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/models/options.py", line 207, in contribute_to_class
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/utils/connection.py", line 15, in __getattr__
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return getattr(self._connections[self._alias], item)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/utils/connection.py", line 62, in __getitem__
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     conn = self.create_connection(alias)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/utils.py", line 204, in create_connection
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     backend = load_backend(db['ENGINE'])
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/utils.py", line 111, in load_backend
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return import_module('%s.base' % backend_name)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     return _bootstrap._gcd_import(name[level:], package, level)
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:   File "/opt/inventree/env/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 17, in <module>
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]:     raise ImproperlyConfigured(
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Jul 13 10:38:56 serv1 inventree-web-1.service[45592]: Did you install mysqlclient?

Are you sure that you have installed mysqlclient within the virtual environment that InvenTreePlugin is running in?

Yes, python isn't my thing, I was hoping the install script would install requirements where they're needed, not really sure about the whole venv thing. This is the only thing on the server, I was assuming a bare metal install would just install things system wide.
All the package installs above were very much trial and error over the last days as progress was made to get the install script to actually run. The biggest headache was eventually loading the libmariadb-dev-compat package direct from Mariadb repo to get the C connector to a high enough version that the mysqlclient module needed for its dependency. Hence is was installed system wide and not in the inventree virtual environment.
Anyway, thanks, progress made.
su inventree
cd /opt/inventree/
source ./env/bin/activate
pip3 install mysqlclient
invoke update
It appears to write a default config to /opt/inventree/Inventree/config.yaml which didn't work as it was default, so I added my DB config and re-ran invoke update.
It ran though a load of checks, backed up up the non existent database and loaded a default one.
I think I have an empty database, I can't login with the creds listed in the install log.
I am also confused as I have config files in /etc/inventree and /opt/inventree/Inventree that have different secret_key.txt files and probably other differences.
Which is used when the services are started by systemctl start inventree.service?
How do I get an admin login? I assume using the forgot password won't work with an empty db as well as the default email is a domain registered to someone on the Internet with a valid MX record to receive default password resets. I would suggest example.local as a safer default.

@not-bob-hope if you are running the package installation you do not need all packages you listed. This works in my tests:
sudo apt-get install mysql-server libmysqlclient-dev pkg-config -y
wget -qO install.sh https://get.inventree.org/
chmod +x install.sh
sudo -i
export INVENTREE_DB_ENGINE=mysql
export INVENTREE_DB_NAME=Inventree
export INVENTREE_DB_USER=Inventree_user
export INVENTREE_DB_PASSWORD=**************
export INVENTREE_DB_HOST=rem.ote.ipa.ddr
export INVENTREE_DB_PORT=3306
export SETUP_EXTRA_PIP='mysqlclient mariadb'
./install.sh

The configs by default are in /etc/inventree. I would suggest to remove the inventree package with apt remove inventree --purge before running the commands agian.

Yes, that worked thanks, I have a running server.


Minimap indication and scrollbar have different height

Testing: https://github.com/microsoft/vscode/issues/91250
Setting "editor.minimap.mode": "contain"
Observe: the minimap scroll indication and the scrollbar handle have different height. Should they be the same in that mode.

Scroll bar has minimal height for large files, and if minimap shrinks to fit all content it wont be definitely smaller that scroll.

Indeed, they normally would be the same height. But the scrollbar slider is artificially inflated to a minimum height (20px) to make it possible to easily grab it with the mouse


remote data

Wanted to use this with remote data, Im prb just using it wrong
But what I wanted to repopulate the dropdown when trying into the search box
Nothing have to be changed without user selection a row
Thx
      this.Choices = new choises(this.element,{
      callbackOnChange : (value) => {
          //this triggers, ok
      },
      callbackOnSearch : (value)=>{
        //this triggers, but setvalue cant be used, it just adds all the time, and set input value to one of the rows
//tried setChoises to but nothing happend

      }
    });

my bad, setChoises worked, sorry 😄

Looks like I have a issue after all
when I use setChoises it also adds, didnt notice before I removed the text in search bar
How can I make it so its always replace the existing with setChoises

Just to clarify, are you wanting to set the choices based on what a user is searching for?
Thanks

Yes, and every time the "callbackOnSearch" triggers I call the server, and set the choises

Ahh I understand. There is a method to clear choices but it is a private functions - I'll make it public for you tomorrow!

great thx.
A option to the setChoises could have been a solution to
setChoices(choices, value, label, replaceChoises)  if true if replaces the existing.
Is it possible to have one label for the dropdown and another one for the label that get set?
Was thinking about using the callbackOnCreateTemplates, but looks like you cant pass additional data inn with setChoises() and use them
setChoices([
            {value: 'One', label: 'Label One', otherLabel:"something else"},
            {value: 'Two', label: 'Label Two', otherLabel:"something else"},
            {value: 'Three', label: 'Label Three',otherLabel:"something else",},
        ], 'value', 'label');

callbackOnCreateTemplates: function (instance, template) {
      var classNames = instance.config.classNames;
      return {
        item: (data) => {
          return template(`

              ★ ${data.label}

            `);
        },
        choice: (data) => {
          return template(`

 0 ? 'role="treeitem"' : 'role="option"'}>
                ★ ${data.label} ${data.otherLabel}

            `);
        },
      };

Hi @vegarringdal,
As of version 2.3.1, it is now possible to pass a replaceChoices flag when using the setChoices method. See: https://github.com/jshjohnson/Choices#setchoiceschoices-value-label-replacechoices
I'm going to look into passing additional data for templates in the future!
Thanks

@jshjohnson Thx
Other options that could be useful was maybe a searchTimeout, so search dont get triggered to fast if someone if writing fast.
Also maybe a minimum dropdown size could be a nice feature, or function we could call to set before we setChoices, could calculate size we needed depending on result length.


Ensure director name is displayed on page when validation errors are found

Ensure director name is displayed on page when validation errors are found

Name remains on screen when error at nationality page.
When entering a nationality and selecting continue, an error message appears for third nationality.
May need revisiting.


Add City College of Dongguan University of Technology

Hello,
Here is my University's website: http://ccdgut.edu.cn/
and this is the Computer and Information Science Department website: http://jxx.ccdgut.edu.cn/
Thank you & Best regards,
Zhensheng Yuan

@yzsme Pull request merged. Thank you!


Relay bug

Linking two wisps to a relay then allowing only the wisp with more media than the other wisp to transfer media with the relay will drain the wisps media pool into somewhere that is not the other wisp. How much media is drained seems to be dependent on the other wisps media pool.  If the wisp with less media is linked to the relay first, everything works as expected.
How I replicated this bug:

Place relay.
Place wisp1 with int limit media pool
Place wisp2 with 100 media pool
Link wisp1 and wisp2 to the relay.
Allow wisp1 to transfer media with index 0 (link with relay)
Wisp1 will deplete media rapidly (I am sure of everything up to this part) until it has 100 media and then standard upkeep costs (What seems to be happening to me)
Seems like the relay acts as a wisp2 and wisp1 tries to balance its media with it, however the media goes nowhere. This is showed when we repeat the bug but with two int limit media pool wisps. The wisp doesn't drain or if it does drains very little.
P.S. Sorry for the 2006 video quality

https://github.com/Talia-12/Hexal/assets/155905131/f73cfda4-ab2e-4ced-92da-f6c41bf9f529
https://github.com/Talia-12/Hexal/assets/155905131/b6928d0d-2700-43da-8695-866e5a341d98

This is the crash one gets if trying to pick up the relay with the NBT data after the bug has been done.
Not sure if this is caused by the bug or some other issue but might be worth taking a look at. https://pastebin.com/BSquk7Kq


Missing selected index

Could be interesting to have the index of the selected item.
I've done it locally directly in the McPicker.swift file here:
    public func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
        self.pickerSelection[component] = pickerData[component][row]
        self.pickerSelection[1] = String(row)
    }

I then get the result in the done Handler:
            mcPicker.show { (selections: [Int : String]) -> Void in
                self.mySelection = myArray[Int(selections[1]!)!]
            }

McPicker isn't meant to give you an index, its meant to give you the selection result. Thats why the doneHandler gives you the selected string per component.
One thing I didn't put in the README which I should perhaps clarify. McPicker takes an array of string arrays, data: [[String]], as a parameter. So, if you passed
let passedInData: [[String]] = [
    ["Sir", "Mr", "Mrs", "Miss"], // Component 0
    ["Kevin", "Lauren", "Kibby", "Stella"] // Component 1
]

and during initialization McPicker by default sets selections to [0 : "Sir", 1 : "Kevin"] for initial values (aka, first item per component). When you select done the doneHandler passes back
mcPicker.show { selections in
        if let prefix = selections[0], let name = selections[1] {
            self.label.text = "\(prefix) \(name)"
        }
}

The label would then read Sir Kevin and from my perspective there is no need to reference back to passedInData as you do in your example with myArray.
If you really do want to know the index I'd suggest doing something like this
// Say you passed this
let passedInData: [[String]] = [
    ["Sir", "Mr", "Mrs", "Miss"], // Will be component 0
    ["Kevin", "Lauren", "Kibby", "Stella"] // Component 1
]

// Imagine a user selected these
let selections: [Int:String] = [0 : "Sir", 1 : "Stella"]

// Inside the doneHandler do
if let secondComponentSelection = selections[1] {
    print(passedInData[1].index(of: secondComponentSelection)!)
    // Prints 3
}  else {
    print("Component selection doesn't exists")
}

// repeat per selection

Hopefully this helps. If not, feel free to make a PR and we can have a look at what you have in mind.

The provided solution doesn't work if there are repeats in the data array. For example, if you display a McPicker for selected user named folders, there is no guarantee that the user has named each folder uniquely. Returning the index of the selected item and then cross referencing that to the data source used when setting up the McPicker is the superior and only safe way to accomplish this. What do you think?

The provided solution doesn't work if there are repeats in the data array. For example, if you display a McPicker for selected user named folders, there is no guarantee that the user has named each folder uniquely. Returning the index of the selected item and then cross referencing that to the data source used when setting up the McPicker is the superior and only safe way to accomplish this. What do you think?


Use local ES for test-harness & upgrade to ES 2.2 w/ Shield

Closes #209
This PR is primarily intended to refactor the Docker Compose configuration for the test-harness, using a locally running Elasticsearch instance, rather than one in Docker due to VirtualBox's slow I/O.  However, I did not want to come back to this as soon as we upgraded to ES 2.2, so I've merged in the work @chosak did on #206, and then added a few additional fixups to get it all running.
A few of these "fixes" need further research, like:

Why do we now need fully-qualified field names in queries, when we didn't before.
Why does matchPhraseQuery no longer work for street names?  I've switched this to matchQuery.

I also discovered bugs in the Census geocoder unrelated to the ES upgrade.  There will be follow-up issues for both grasshopper and grasshopper-loader coming soon with more details on these fixes.  In the meantime, I have commented out the houseQuery portion of the filter.  This means the Census geocoder now returns results, but they are pretty inaccurate.
I have not changed the standard Docker Compose setup, keeping ES as a Docker container.  I don't think we'll be using a full dataset when running this setup, so it seemed better to keep it simple.  If we decide we need this external ES setup across-the-board, it'll be a pretty simple fix.
I think this PR now replaces #206 as it has all of its changes, plus more.  However, there's a lot of good conversation over on that issue, so please check it out as well while reviewing this one.
NOT READY FOR MERGE
I wanted to get this PR up so folks can start reviewing.  However, I'm not quite finished with updating the docs.  I'll let everyone know when this is fully ready-to-go.

The changes pulled in from #206 look good to me. As you mentioned over there t'd be nice to pull out the client builder stuff into a utility function, as that code's now repeated in several places.
Regarding fully-qualified field names, see this comment in the 2.0 breaking changes notes.
I dug a bit into matchPhraseQuery but couldn't find any obvious 2.0+ change that would have modified this behavior.

@chosek, thanks for checking this out, and for the link about how references to nested fields changed.

I've created issue #212 and #213 for tracking outstanding issues from this PR.

I think the test_harness docs are in pretty good shape.  I'm taking down the "do not merge" sign.  The PR is now ready for full review.
If you'd like to check out the docs rendered form, head over to:

https://github.com/hkeeler/grasshopper/tree/compose-test-harness-fix/test-harness


Add note about limit.

@ninadara - wasn't positive on this one but added what I think. CC @chuckedmonson

Sorry, I was confused. This is not valid. I was reading something about Azure. Closing this one.


Slow loading on Explorer Collections

Tested myself too. Items loads quick and fast.
Is there some roundtrip?
at https://beta.kodadot.xyz/rmrk/explore/collectibles
https://user-images.githubusercontent.com/5887929/214887318-72259eaa-860b-4e30-aa67-95db607a7171.mov
ht @exezbcz for pointing

Meanwhile we are using cf-r2 so did not notice any slow, but on 3G mobile is IT slow, so.


Conformity of current multicast IP

The choice of the multicast IP in https://github.com/ignitionrobotics/ign-transport/blob/1b3a3e0dae80c7b42805d6f54a5a5dfe11f0c27b/include/ignition/transport/Discovery.hh#L1358
should be reconsidered, since it's nonconforming. According to IANA, "the range of addresses between <IP_ADDRESS> and <IP_ADDRESS>, inclusive, is reserved for the use of routing protocols and other low-level topology discovery or maintenance protocols, such as gateway discovery and group membership reporting." The importance of this range is also the reason, why RFC4541 requires that "packets with a destination IP (DIP) address in the 224.0.0.X range which are not IGMP must be forwarded on all ports" because e.g. routers with missing IGMP join messages could lead to switches splitting up the network. All currently available switches adhere to that recommendation.
The problem with the current choice is that all messages are flooded to the whole network, especially if several instances of gazebo are running with high update rates and >1k packets/s. In our case, with a /22 network and many clients, this leads to a large increase of non directed additional traffic, also to IoT devices and other hosts that don't cope well with massive broadcasts. As this issue might affect a lot of users, even unknowingly, it should be dealt with on a general level instead of in cases where the problem arises.
All other IP ranges defined for multicast are really "multicasted" by switches and hence suited, but since RFC2365 recommends the 239.255.x.x range for this use, I would suggest to change the hardcoded IP to something like <IP_ADDRESS> (ROS2 already uses <IP_ADDRESS> afaik) or make it configurable with a reasonable default value.

Thanks for the detailed explanation. It sounds reasonable to make it configurable with a default option in the range 239.255.x.x.

@mbmende , see pull request #200 . Could you give it a try?

Looks good so far with the latest changes in https://github.com/ignitionrobotics/ign-transport/commit/34f8476bdf1b440a0dccc39bc79d1a5cb6e7be66.

Good catch... So this is why our site admin was angry with a few gazebos flooding the whole local network :) When I launch Gazebo with IGN_IP=<IP_ADDRESS>, then the flooding doesn't occur...

See pull request #200 .


Update eclipse Java formatter preferences to match internal

This file https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml
seems to still use the old grouped import ordering.

https://github.com/google/styleguide/pull/271


in Android if deliveryResult fails, purchase event fire at every app launch

Version of react-native-iap
5.2.0
Version of react-native
0.62.2
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
Event to fire in case deliveryResult fails
Actual behavior
Retry / conclude the purchase
Tested environment (Emulator? Real Device?)
Real Device
Steps to reproduce the behavior
Hi, thank you for all the work , i'm using purchase steps provide by the library. it works fine when i get success response from my Server . if somehow request fails what to do then ?. right now every time i open app purchase event gets fired
below is the template from example i'm using
class RootComponent extends Component<*> {
  purchaseUpdateSubscription = null
  purchaseErrorSubscription = null

  componentDidMount() {
    RNIap.initConnection().then(() => {
      // we make sure that "ghost" pending payment are removed
      // (ghost = failed pending payment that are still marked as pending in Google's native Vending module cache)
      RNIap.flushFailedPurchasesCachedAsPendingAndroid().catch(() => {
        // exception can happen here if:
        // - there are pending purchases that are still pending (we can't consume a pending purchase)
        // in any case, you might not want to do anything special with the error
      }).then(() => {
        this.purchaseUpdateSubscription = purchaseUpdatedListener((purchase: InAppPurchase | SubscriptionPurchase | ProductPurchase ) => {
          console.log('purchaseUpdatedListener', purchase);
          const receipt = purchase.transactionReceipt;
          if (receipt) {
            yourAPI.deliverOrDownloadFancyInAppPurchase(purchase.transactionReceipt)
            .then( async (deliveryResult) => {
              if (isSuccess(deliveryResult)) {
                // Tell the store that you have delivered what has been paid for.
                // Failure to do this will result in the purchase being refunded on Android and
                // the purchase event will reappear on every relaunch of the app until you succeed
                // in doing the below. It will also be impossible for the user to purchase consumables
                // again until you do this.
                if (Platform.OS === 'ios') {
                  await RNIap.finishTransactionIOS(purchase.transactionId);
                } else if (Platform.OS === 'android') {
                  // If consumable (can be purchased again)
                  await RNIap.consumePurchaseAndroid(purchase.purchaseToken);
                  // If not consumable
                  await RNIap.acknowledgePurchaseAndroid(purchase.purchaseToken);
                }

                // From<EMAIL_ADDRESS>you can simplify above `method`. Try to wrap the statement with `try` and `catch` to also grab the `error` message.
                // If consumable (can be purchased again)
                await RNIap.finishTransaction(purchase, true);
                // If not consumable
                await RNIap.finishTransaction(purchase, false);
              } else {
                // Retry / conclude the purchase is fraudulent, etc...
               // WHAT TO DO HERE . any event is to be fired ??
              }
            });
          }
        });

        this.purchaseErrorSubscription = purchaseErrorListener((error: PurchaseError) => {
          console.warn('purchaseErrorListener', error);
        });
      })
    })
  }

What is returning from deliveryResult? I think you should deliver some UX scenario to the user when something unexpected occurred. Things like please try again.


Use a brew as a theme, three ways - prep work for user sharable theming.

This PR explores the idea of User themes being derived from brew documents. It does not address the notion of permissions ( beyond normal brew access ) or tagging a brew as a theme document. The only limitation it places is on the csstheme endpoint not including the theme if it uses the legacy renderer.
This has been implemented in three different ways to allow for comparison and discussion

/api/css/:id : This returns the style frontmatter of the referenced document as a text/css document.
/api/theme/:id : This returns an object with the reference'd object's theme and style frontmatter.
/api/csstheme/:id : This returns the stylye frontmatter of the referenced document as a text/css document and adds the theme as an @import ( if not using the legacy renderer )

I prepared the PR this way to make comparing and contrasting the different methods easier.
Update
Based on revisiting earlier conversations on theme parenting, I have removed the first two options and renamed the path for the third as /css/.
I have added an additional option for parental recursion on static themes.

/api/css/[renderer]/[theme] will import the parent theme ( if present ) via the API path and the theme via its static path and . For example, /api/css/V3/5eDMG will result in

@import /api/css/V3/5ePHB
@import /themes/V3/5eDMG/style.css

the initial idea was to have a this as an alternative to brew themes, so the idea would be to store this style in the db as a new kind of object, and pull that in the brew theme selector.
I am aware that such a functionality is outside of the scope of this particular PR, but we can make this follow a syntax compatible with other brew themes.

the initial idea was to have a this as an alternative to brew themes, so the idea would be to store this style in the db as a new kind of object, and pull that in the brew theme selector.
I am aware that such a functionality is outside of the scope of this particular PR, but we can make this follow a syntax compatible with other brew themes.

The initial idea was to be able to select normal brews to import their Style Tab contents as Themes, so no need for a separate kind of DB objects.

For reference

https://github.com/naturalcrit/homebrewery/issues/1097
https://github.com/naturalcrit/homebrewery/pull/3075

The initial idea was to be able to select normal brews to import their Style Tab contents as Themes, so no need for a separate kind of DB object. See #1899 under the "Custom Themes" heading in the original comment.

Addtionally, the brew.text could be used for both documentation and example for the theme.

That is part of my intent for brews that are intended to be shared styles assuming a style tag and an eventual UI for selecting (personal and favorited) styles.

Addtionally, the brew.text could be used for both documentation and example for the theme.

The neat thing is that the brew.text can contain <style>...</style> content for any documentation-specific styling, avoiding loading that into the brew.style property (and consequently loaded by other brews).
This could even include <style>@import url('/css/theme-documentation.css')</style> for a consistent look across multiple theme documentations =)

#3321 was based on this as a possible path. As that has been approved, I'm closing this as a redundancy.


[Bug] Workflow list shows nothing (but it should)

Describe the bug
It seems that there's a bug in code that prevents loading workflows. It is happening when listing status=ALL.
What's interesting, I can see workflows when inspecting JSON responses.
workflow-list.vue:335 Uncaught (in promise) TypeError: startTime.add is not a function
    at _callee$ (workflow-list.vue:335)
    at tryCatch (runtime.js:65)
    at Generator.invoke [as _invoke] (runtime.js:303)
    at Generator.prototype.<computed> [as next] (runtime.js:117)
    at asyncGeneratorStep (workflow-list.vue:86)
    at _next (workflow-list.vue:86)

To Reproduce
Steps to reproduce the behavior:

Go to 'workflow list'
No workflows appear although there are some running

Expected behavior
I expected to see workflows.
Screenshots

Desktop (please complete the following information where relevant):

MacOS
Brave
Docker ps:

➜  ~ docker ps
CONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS              PORTS                                                                      NAMES
d7d76f99a811        temporalio/admin-tools:1.3.0   "tail -f /dev/null"      25 minutes ago      Up 25 minutes                                                                                compose_temporal-admin-tools_1
ccfe46fd1e0d        temporalio/web:1.3.0           "docker-entrypoint.s…"   25 minutes ago      Up 25 minutes       <IP_ADDRESS>:8088->8088/tcp                                                     compose_temporal-web_1
60391f5f7929        temporalio/auto-setup:1.3.0    "/docker-entrypoint.…"   25 minutes ago      Up 25 minutes       6933-6935/tcp, 6939/tcp, 7234-7235/tcp, 7239/tcp, <IP_ADDRESS>:7233->7233/tcp   compose_temporal_1
67ee058fe1a5        postgres:9.6                   "docker-entrypoint.s…"   25 minutes ago      Up 25 minutes       <IP_ADDRESS>:5432->5432/tcp                                                     compose_postgresql_1

Additional context
It seems to start happening when one of the running workflows throws an exception.

same for me
Another interesting thing is that workflows are not visible only if one of them is in running state. If all are completed - workflow list displays ok

The issue itself is fixed locally. I'm adding unit tests for the all workflows view. The fix should be released asap as a patch


Fix golint linter issues and enable it in CI

Another linter one. More convoluted in number of lines but all have been done via automatic renaming tooling.

You went a bit overboard ;-)
Could you leave the vendored ones out and also matterclient/matterclient.go and matterhook/matterhook.go as those are used in external projects too and breaks stuff if changed.
According to https://github.com/golangci/golangci-lint#false-positives we can add a //nolint:golint or maybe there's another way.


Inferred command flushes (hard sync points) and at-least once system separation

What problem does this solve or what need does it fill?
When working with command flushes, you rarely care that two systems are separated by a particular copy of apply_system_buffers.
Instead, you care that it is "separated by at least one copy". This pattern occurs commonly: with command buffers, state transitions, transform propagation and pretty much anything you might use the Deferred type (#6817) for.
Trying to manage this in a single app can be challenging, as it requires a fairly global view of system scheduling that's easy to accidentally break.
The problem gets much worse when third-party plugins are involved though: each plugin must add its own cleanup systems to uphold its invariants, and is unaware of what other plugins may be doing, even if they could trivially share these cleanup systems.
What solution would you like?
Add a new form of system ordering, which requires commands to be applied at least once between them.
This could look like:
// Special casing
app.add_system(a.before_and_flush(b));

// Generalized chain-like syntax on system sets
app.add_systems((a,b).separated_by(apply_system_buffers));
app.configure_set(MySet.seperated_by(apply_system_buffers));

// Generalized two argument syntax
app.add_system(a.before_and_seperated_by(b, apply_system_buffers);

The scheduler should then attempt to ensure that at least one system of the appropriate type is run between a and b
Of course, figuring out how to do so efficiently is far from trivial and an MVP should probably be quite naive (perhaps only checking, rather than automatically inserting!).
Interestingly, I think that this should only work for system type sets, not arbitrary system sets. It's far too easy to get very surprising behavior if the exact system separating your system can change in non-local ways.
What alternative(s) have you considered?
Better graph visualization would help, but doesn't solve the problem of third-party plugins that have no way of being aware of each other.
This could be generalized to arbitrary systems which would be very useful for cache-flushing patterns like #4513 or state transitions. It's unclear if that will be more or less complex than simply doing so for apply_state_transitions.
Additional context
Previously discussed in https://github.com/bevyengine/rfcs/pull/45, but cut due to scope concerns.
This would be a powerful tool to enable better configurability of plugins (#2160), as plugin authors can be much less strict about the provided configuration.

After doing this writeup, I'm personally convinced that we should aim for a general system-type agnostic solution. The pattern is very useful in a ton of places, and I think the syntax is significantly more explicit (and it makes it much easier to search for apply_system_buffers).

Useful discussion on approaches [here] (https://discord.com/channels/691052431525675048/749335865876021248/1079960842583408681).
We can either use a sweep line approach or a backtracking algorithm.

#9822 effectively fixed this. Closing out.


update build readme shared resoruces section to note PLNSRVCE-251 protection

It occurred to me @Michkov that some mention of the PLNSRVCE-251 protection in your recent README updates per PLNSRVCE-535 is warranted for completeness.
If you agree and we get to a consensus on the precise wording of the change, we can officially associate with 535

looks like the CI job start failed ... will try to close / reopen the PR

oh ... it skips the e2e if it is just a readme update:  https://github.com/openshift/release/blob/master/ci-operator/config/redhat-appstudio/infra-deployments/redhat-appstudio-infra-deployments-main.yaml#L26

Since we want to switch completely to PipelinesAsCode soon then not sure if we need to document this, with PaC it will not be valid anymore

ok I'm fine with tracking the PaC progress where ultimately the PLNSRVCE-251 logic is reverted
closing


Multiple ASGI functions with different names

Is your question related to a specific version? If so, please specify:
What binding does your question apply to, if any? (e.g. Blob Trigger, Event Hub Binding, etc)
Question

We want to deploy multiple ASGI services (FastAPI) using this approach:
https://learn.microsoft.com/en-us/samples/azure-samples/fastapi-on-azure-functions/azure-functions-python-create-fastapi-app/
Currently, the functions are always called http_app_function.
That means that if we deploy one service it overwrites the one which was deployed previously.
Is there a way to customize the name of the function or any other possibility to have multiple ASGI services deployed in one function app?
Thanks in advance,
Michael

The same happens to me. Furthermore, in Insights, functions cannot be distinguished as they all have the same name.

@MichaelWimmerMaibornWolff, thanks for raising the issue. Unfortunately, it is not supported by our current python function runtime architecture, but we are working on new features that can resolve this problem. Will keep you updated.

This works if you want multiple endpoints:
function_app.py
"""Main app"""

import azure.functions as func
from fastapi import FastAPI

fast_app_1 = FastAPI(root_path="/1")
fast_app_2 = FastAPI(root_path="/2")

@fast_app_1.get("/hello/{name}")
@fast_app_2.get("/hello/{name}")
async def get_name(name: str):
    return {
        "name": name,
    }

app = func.FunctionApp()

# Azure Functions v2 HTTP trigger decorator
@app.function_name("backend-api1")
@app.route(route="1/{*route}", auth_level=func.AuthLevel.ANONYMOUS)
async def backend_api(req: func.HttpRequest) -> func.HttpResponse:
    return await func.AsgiMiddleware(fast_app_1).handle_async(req)  # pragma: no cover

@app.function_name("backend-api2")
@app.route(route="2/{*route}", auth_level=func.AuthLevel.ANONYMOUS)
async def backend_api(req: func.HttpRequest) -> func.HttpResponse:
    return await func.AsgiMiddleware(fast_app_2).handle_async(req)  # pragma: no cover

host.json
{
  "version": "2.0",
  "extensions": {
    "http": {
      "routePrefix": ""
    }
  }
}

This has been addressed in https://github.com/Azure/azure-functions-python-library/pull/216 and will be available in the latest library version. AsgiFunctionApp and WsgiFunctionApp objects can now take in a customizable function_name param.


How to increase octaves?

like here http://libnoise.sourceforge.net/tutorials/tutorial4.html#octaves

You need to do it yourself:  Have a look at my demo here:
Demo: http://hypercubed.github.io/perlin-terrain-angular-demo/
Source: https://github.com/Hypercubed/perlin-terrain-angular-demo


Fix RaXmlDeploymentProcessor

Linux with security manager Build 2002 is now running using a merge of 3aea09f99e1c486e1aa6e47e27701f18b7d9f50d

Windows Build 2181 is now running using a merge of 3aea09f99e1c486e1aa6e47e27701f18b7d9f50d

Linux Build 7129 is now running using a merge of 3aea09f99e1c486e1aa6e47e27701f18b7d9f50d

Linux with security manager Build 2002 outcome was SUCCESS using a merge of 3aea09f99e1c486e1aa6e47e27701f18b7d9f50d
Summary: Tests passed: 877, ignored: 284 Build time: 0:09:05

Windows Build 2181 outcome was SUCCESS using a merge of 3aea09f99e1c486e1aa6e47e27701f18b7d9f50d
Summary: Tests passed: 2952, ignored: 357 Build time: 0:46:08

Linux Build 7129 outcome was SUCCESS using a merge of 3aea09f99e1c486e1aa6e47e27701f18b7d9f50d
Summary: Tests passed: 2952, ignored: 357 Build time: 0:50:13


Have main.c print out about.txt

As a debug thing to make sure everything's compiled correctly

You already know everything compiled correctly if it doesn't give an error. But I'll add this anyway, I think it's a good idea.

Finally done


chore(ui): Move application of search filter out of filter chips

Description
Prerequisite refactor to allow multi-sort-by-severity in https://github.com/stackrox/stackrox/pull/12764. This removes the usage of useURLSearch() from the <SearchFilterChips> component and relies on the parent component to pass the state and setter down.
Why?
Due to the new sort functionality needing to update sort parameters each time the filter changes, we need to hook into the setSearchFilter() function that sets the search in the URL. However, the widely used SearchFilterChips component calls its own version of useURLSearch() internally, regardless of other calls up the component tree, and uses this hook to clear the filters.
This results in incorrect sorting when the user removes a severity sort via the filter chips.
The fix is to pass the setSearchFilter() function down to this component instead of it handling updates to global state itself.
User-facing documentation

[ ] CHANGELOG is updated OR update is not needed
[ ] documentation PR is created and is linked above OR is not needed

Testing and quality

[ ] the change is production ready: the change is GA or otherwise the functionality is gated by a feature flag
[ ] CI results are inspected

Automated testing

[ ] added unit tests
[ ] added e2e tests
[ ] added regression tests
[ ] added compatibility tests
[ ] modified existing tests

How I validated my change
Manual testing of the following locations to verify search functionality works correctly:

Listening Endpoints page
Discovered clusters page
Compliance coverage pages
Violations page
All VM Workload CVE related pages

gke-ui-e2e-test failure is due to the known "Configuration Management Dashboard" flake


[Question] How can one cancel a RxMoya request

Hi, I am new in moya. I am still dont understand about disposable. I heard to cancel RXMoya request we need to dispose but I still confusing how to dispose the observable. Can anyone give me a sample to handle this proble ??

var disposeBag = DisposeBag()
provider.rx.request(.zen).mapString().subscribe(onSuccess: { json in
    print(zen) // this will never get called because we dispose
}) { error in
    print(error)
}.disposed(by: disposeBag)

disposeBag = nil

so here, the request will be started, but the subscription will never print, since we dispose (set to nil) the disposeBag before the request can return.
If you're interested in the implementation, when the disposeBag is set to nil, code here in RxMoya gets called that cancels the request using Alamofire.
Is there anything else we can shine the light on for you

@AndrewSB thanks for solution, but when I set disposeBag to nil, I got error

Nil cannot be assigned to type 'DisposeBag'

I change
disposeBag = nil
to
disposeBag = DisposeBag()
and now it working, thanks

Ahh, my fault. The swift type system probably inferred disposeBag to not be an optional. Change the first line to
var disposeBag: DisposeBag? = DisposeBag()

and you should be fine

UPDATE
we can use .takeUntil(rx.methodInvoked(#selector(viewWillDisappear(_:)))) to handle disposable :)

Ahh, my fault. The swift type system probably inferred disposeBag to not be an optional. Change the first line to
var disposeBag: DisposeBag? = DisposeBag()

and you should be fine
Happy you got it to work 😄

But if optional, you can't say .disposed(by: disposeBag), because it requires an unwrapped variable. If you force unwrap, and set disposebag nil later before request ends, the code crashes at point of .disposed(by: disposeBag!)

.takeUntil(rx.methodInvoked(#selector(viewWillDisappear(_:))))

I can't add a takeuntil anywhere? Please show specific basic code in place with MoyaRequest?

I believe it's unrelated to a DisposeBag. instead of adding the disposable from the request to a dispose bag, you can .request(...).subscribe(...).takeUntil(rx.methodInvoked(#selector(viewWillDisappear(_:))) and it sounds like @alfian0 has tested to see that it works


test codecov integration

try integrating codecov

Welcome to Codecov :tada:
Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.
Thanks for integrating Codecov - We've got you covered :open_umbrella:

/merge


Add option to hide files in global media library

Short description
This PR was made in collaboration with @bob606 . This PR is supposed to add the option to hide files or directories in the global media library for regional media libraries.
Proposed changes

Update models for directory and media file, and the according migration file
Add checkbox in the view

Side effects
This PR is still a work in progress. So far the functionality that the directories and files actually get hidden is still missing and we have worked so far only on the prerequisites for it.
Resolved issues
Fixes: #1578

Pull Request Review Guidelines

@MizukiTemma Thank you for your suggestions. I wasn't able to reproduce your issue, but if your suggestion works, it should be fixed now. Can you please check?
If so, we can move to the next issue, the thing with the checkbox that is showed, although it shouldn't

Thank you a lot for your suggestions. I tried to work them all in. Please feel free to test it again :)

Thank you a lot for your suggestions. They are worked in now and you can check again :)


Stop ignoring directories

This was lazy/dumb of me to insist this.  People get issues like this: https://github.com/Strachu/FileArchiver/issues/1
Look over where entries for directories are ignored.  This was recently changed for 7Zip.

Extraction looks okay.  Need to see about actually creating archives with empty directories and creating empty directories in helper extensions.

Are there any new thoughts on this? My project relies heavily on both reading and creating archives with directories.

PRs welcome.  I'll approve this change to make empty directories