useRouteContext returns undefined upon full page reload

Describe the bug
Upon full page reload, useRouteContext returns undefined.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-qqb8ia?file=src%2Froutes%2Ffoo%2Findex.tsx&preset=node
Steps to Reproduce the Bug or Issue

go to https://stackblitz.com/edit/tanstack-router-qqb8ia?file=src%2Froutes%2Ffoo%2Findex.tsx&preset=node
click on "Foo" link
see that "Hello /foo/index!" is shown
full reload page
see that error message "context is undefined" is shown

Expected behavior
route context is never undefined
Screenshots or Videos
https://github.com/user-attachments/assets/d8f0989c-7541-4771-8c98-65e80594df1a
Platform

OS: macOS
Browser: any
react-router version: 1.46.7

Additional context
No response

Here is a workaround:
  const router = createRouter({
    ...
  });

+ router.buildAndCommitLocation({});
+ // but... why?

I can't remember where else we discussed this, but routeContext being used in a component is an anti-pattern if you're doing SSR. Let me explain why:

Hydration needs to be relatively synchronous. We can't wait for async assets before rendering

To accomplish this, anything that was async on the server is serialized down to the client and made ready before hydration

Context is not guarantied to be serializable, so we can't serialize it.

This means that on the initial hydration render of the app, the best "context" we could provide is the router context, which should also be isomorphic (e.g. if you supply something like a query client, it should be instantiated on both the server and the client).

We can't make hydration async, and we wouldn't want to either way

We can't make beforeLoad sync

We can't guaranty serialization of routeContext, and even if we could mix, we would still need to be able to wait on the async nature of it to build up the routeContext

Proposed solution:

Do not use routeContext in components.
Possibly we remove the Route.useRouteContext hook.
Only use routeContext in loaders.

This is not SSR related. just an ordinary.

Sorry, you are correct. This should be working for non-SSR renderings. However, the issue stands. What should we do?

Removing the user access to the routeContext outside of the loader function would make it difficult for anyone using it to build something like a breadcrumbs component. Also, the route context does allow for patterns where you can in a single location permeate some options that'll be the same in the loader and in the component.
This sort of pattern is pretty handy and IMO it would be a shame to lose.
// src/routes/posts.tsx
import { createFileRoute } from '@tanstack/react-router';
import { useSuspenseQuery, queryOptions } from '@tanstack/react-query';

export const Route = createFileRoute('/posts')({
    beforeLoad: ({ params }) => {
        return { // only calculate what the queryOptions were once
            postOptions: queryOptions({ queryKey: ['posts', params.postId], ... }),
            postCommentsOptions: queryOptions({ queryKey: ['posts', params.postId, 'comments'], ... })
        }
    },
   loader: async ({ context }) => {
      await Promise.allSettled([ // you can also choose not to await here, just kick off Query
          context.queryClient.ensureQueryData(context.postOptions),
          context.queryClient.ensureQueryData(context.postCommentsOptions),
     ])
   },
  component: Posts
})

function Posts() {
   const { postOptions, postCommentOptions } = Route.useRouteContext();
   const postQuery = useSuspenseQuery(postOptions);
   const postCommentsQuery = useSuspenseQuery(postCommentsOptions);
   // ...
}

If I remember correctly, for a period of time during the beta when the loaderData was dropped, the router was setup in a way to accept non-serializable content (like a queryClient, apiFetcher, etc.), but everything returned by a Route's beforeLoad function had to be serializable.
👆🏼Would something like this be feasible here?

This allows us to serialize the loaded route context objects and send it down during SSR, but still allow the hydration to happen on the client yes?
Or maybe we have an SSR toggle that enforces the route-context into being serializable? Although this'd cause a divergence which is something we probably do not want.

reproducer in https://github.com/TanStack/router/pull/2045

this is fixed in 1.49.1


enable debug for file upload

FileUploader issue is waiting for adapter to enable debug in request.

@saadjutt01 / @allanbowe Can we close this?


Controller manager fails to start when configured with vsphere cloud provider

Bootkube version: v0.7.0
When configuring kube-controller-manager manifest to work with vsphere cloud provider, it crashes with following error:
I1009 09:01:59.841827       1 controllermanager.go:108] Version: v1.7.7+coreos.0
W1009 09:01:59.841987       1 client_config.go:529] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I1009 09:01:59.845378       1 leaderelection.go:179] attempting to acquire leader lease...
I1009 09:01:59.864214       1 leaderelection.go:189] successfully acquired lease kube-system/kube-controller-manager
I1009 09:01:59.864759       1 event.go:218] Event(v1.ObjectReference{Kind:"Endpoints", Namespace:"kube-system", Name:"kube-controller-manager", UID:"84fdcff7-accb-11e7-9cf6-000c29ecb513", APIVersion:"v1", ResourceVersion:"2799", FieldPath:""}): type: 'Normal' reason: 'LeaderElection' kube-controller-manager-4121409069-pksn4 became leader
F1009 09:02:02.045257       1 controllermanager.go:177] error building controller context: cloud provider could not be initialized: could not init cloud provider "vsphere": error retrieving vm uuid: open /sys/class/dmi/id/product_serial: permission denied

Workaround: configuring controller container to run privileged solves the issue:
...
containers:
- name: kube-controller-manager
  image: quay.io/coreos/hyperkube:v1.7.7_coreos.0
  securityContext:
      privileged: true
  command:
  - ./hyperkube
  - controller-manager
...

bootkube is known to work with the "aws" and "azure" cloud-provider integrations and with no cloud provider (i.e. ""). Looks like the "vsphere" integration requires read access to:
-r--------. 1 root root 4096 Oct 12 19:34 /sys/class/dmi/id/product_serial

A quick google of their docs shows this is only accessed as the fallback VM identifier so perhaps it would be better to provide one of the identifiers rather than granting elevated privilege to the controller manager.
https://kubernetes.io/docs/getting-started-guides/vsphere/
I don't use vsphere to test this, but perhaps you can report back if that was a more reasonable option?

@dghubble sure, I'm out of the office right now, I'll try that next monday. Thanks for the tip!

I can confirm that using vm-name parameter on the vsphere.conf file solves the issue (my bad I didn't recheck vsphere guide, it has changed from last time I used it) and is the correct approach.
Thanks for your time.

Setting the vm-name doesn't work for me. I don't see any further usage of this parameter in the provider.
I'm not a go Pro but I don't see any other way as giving access to /sys/class/dmi/id/product_serial because of vsphere.go:
// Deprecated as the virtual machines will be automatically discovered.
// VMUUID is the VM Instance UUID of virtual machine which can be retrieved from instanceUuid
// property in VmConfigInfo, or also set as vc.uuid in VMX file.
// If not set, will be fetched from the machine via sysfs (requires root)
VMUUID string `gcfg:"vm-uuid"`

func newControllerNode(cfg VSphereConfig) (*VSphere, error) {
if cfg.Global.VMUUID == "" {
		// This needs root privileges on the host, and will fail otherwise.
		cfg.Global.VMUUID, err = getvmUUID()
		if err != nil {
			glog.Errorf("Failed to get VM UUID. err: %+v", err)
			return nil, err
		}
}

My workaround is to do a /usr/bin/chmod 444 /sys/class/dmi/id/product_serial in the kubelet.service ExecStartPre. Not the beautifulest solution, but better than running privileged: true in my opinion.
@amarruedo wondering if using vm-name only is working for you

@adnoh yeah, specifying vm-name on vSphere.conf of master and worker nodes worked for me.

I agree with @adnoh. Also the Kubernetes doc for using vsphere as a cloud provider seems to be out of sync with VM Wares own doc: https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/existing.html
Specifically it states:

Below is summary of supported parameters in the vsphere.conf file for Kubernetes version 1.9.x
user is the vCenter username for vSphere Cloud Provider.

password is the password for vCenter user specified with user.
port is the vCenter Server Port. Default is 443 if not specified.
insecure-flag is set to 1 if vCenter used a self-signed certificate.
server is the vCenter Server IP or FQDN
datacenters is the names of the datacenters on which Node VMs are deployed.
default-datastore is the default datastore to use for provisioning volumes using storage classes/dynamic provisioning.
resourcepool-path is the path to resource pool where dummy VMs for Storage Profile Based volume provisioning should be created. It is optional parameter.
folder VM Folder path where Node VMs can be present.

Meaning that vm-name is not supported for k8s 1.9.

Check the code here.
The vm-uuid (VMUUID) and vm-name (VMName) parameters still exist but are deprecated and therefore should not be used, these values are auto discoverable by giving access to /sys/class/dmi/id/product_serial.
This issue should be reopened.

For information, looking at upcoming Kubernetes release 1.10, the vsphere cloud provider will no longer access /sys/class/dmi/id/product_serial or require those parameters (vm-uuid, vm-name) to be provided (PR here)
It will get them from the NodeInfo object, which in term gets populated here and here

So in 1.10 I get this same error at vsphere.go:404
https://github.com/kubernetes/kubernetes/blob/release-1.10/pkg/cloudprovider/providers/vsphere/vsphere.go#L402
Isn't the following the problem:
https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/vsphere/vsphere_util.go#L526?


Navigation options for web book text

Search engines are indexing the text and dropping people onto chapters or other parts of books. For example, I just ended up on https://standardebooks.org/ebooks/evelyn-underhill/practical-mysticism/text/halftitlepage
Do we want/need some sort of mini navigation to rescue people who can’t use the back button to proceed?

Maybe, but what the heck did you search for that it returned a top result of a page with only 8 words in it?
The nice thing about the current system is that we can just explode the epub and then expose it to the web. But if we added navigation then it would be a lot more post processing. Plus, if we add more elements then their styling could be messed up by the book CSS. For example what would happen to a top nav bar for a dedication, where children of <body> are centered using flex?

That specific example came up in a search for pages that mention "standardebooks" that were new in the last week. So not a normal query 😁 But still, I can easily imagine a user searching for a quote and ending up on one of our pages. It’s maybe not worth the hassle though.
If browsers supported <link rel="prev"/> / <link rel="next"/> I’d suggest adding them to the head, but that never happened.
Close if you feel like it’s not useful.

<link rel> would be a good addition I think. Another option is to use robots.txt to block indexing of the books themselves. Though I'm not sure if that's really what we want to do. If you want you can put together a PR to include <link rel> in the head in deploy-ebook-to-www. Relevant code starts around line 249.

Though it may be tough to do it in Bash since you'd have to parse the spine. Maybe it's time for deploy-ebook-to-www to be rewritten in Python. Though I don't have time for that for the foreseeable future!

I've thought about this a little more, and looked at some of the search results that lead people to SE, and it does look like Google et al are indexing at least the ToCs of a lot of the ebooks and sending people there for certain search queries. So maybe it does make sense to inject a header into the top of each exploded epub. Do you want to explore some possibilities for that?
Personally I think sticky headers are very annoying, but they do have some limited usefulness for small mobile devices. Maybe a small header with our name/logo that links to the homepage, and then a link to the ebook ToC? The header might be non-sticky for large screens but sticky for ipad size and below?
I looked more closely at our sectioning and since we require at least a child <section> for each <body> it might be feasible to inject a nav bar as a direct child of <body> without messing up the layout of the actual page, for uniquely formatted pages like dedications.

Sorry, spare time has been limited. Just a link back to the ToC sounds good. I’ll investigate what it would take for this.

I’ve got a first draft done, but to test properly I’m trying to update the Docker image to allow for deploy-ebook-to-www usage. I don’t fully understand though what’s happening at https://github.com/standardebooks/web/blob/d7cc174c4fc01ece72a0045d76ba61bbc82cab00/scripts/deploy-ebook-to-www#L378-L383
My understanding is that se:committers refers to an se user in a committers group, but we’re already setting up an se group earlier, and Ubuntu at least complains if a user is given the same name as a group. Any help appreciated!

On the server, there is an se user and a committers group. The se user is mostly for web site filesystem level permissions, it is not a "real" user. There is also an se group for managing the SE website. The committers group includes many real users like you and me, who are allowed to write to the repos themselves. It does not have anything to do with the actual website per se but is more for managing the actual ebook repos. Ubuntu should have no problem with this setup because that's how the live server is set up right now :)


correlating response messages with sends

HI @levlam ,   I want to grab a bunch historical messages from a channel (in Java)  and calling  TdApi.GetChatHistory in a loop repeatedly. In order to make sure that I receive messages consistently and stop when reach the end or an error , do I need a block after send on each request until I get a response ? or there is a better way to go about this. An example would be nice.
thanks.

You need to send requests consecutively, because before the previous request is completed you don't know what to pass as from_message_id to the next request.

I ended up blocking on each call until receive a response. It looks butt ugly now won't even post what I have , but will come back when I get a chance to get CompletableFuture version working.
thanks @levlam for all your help.


Update OWNERS_ALIASES

What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?:

NONE

/approve


Documentation: Command line argument descriptions vanished

Hey!
I just noticed that the description of all command-line arguments for fmriprep has disappeared in the stable version.
A quick check showed that the last time a description was shown was in version 1.2.3.
Maybe something went wrong during the commits in between?
Cheers,
Paul

Thanks for the heads up! We should definitely fix this.
The test documentation builds succeed, so it's likely to be a ReadTheDocs issue. Seems like ReadTheDocs is having trouble loading fMRIPrep modules, as they check for directories that don't exist. This might be the root cause, and is probably related to #1388.

I just noticed this as well.  We should probably make a quickfix release after fixing this.


Not working in private browsing

When using in a private browsing session the following error raises
Failed to open indexedDB, are you in private browsing mode? vendor.3d7f4559.js:26:111016

Browser:
Firefox Browser 94.0

https://t.me/nostr_protocol/9429
If Firefox doesn't want to open indexedDB. There is nothing we can do except stop using browsers altogether.


add a flag to suppress errors when no gen files are found

We have a widely useful task in gro check that wraps up the following:

typechecks
runs tests
checks formatting
checks generated files are not stale

The last one is a bit tricky because some projects might not use Gro's file generation, but we still want gro check to be convenient. We usually want gro gen to fail loudly if there's nothing to generate. This adds the optional flag okIfNone to the gen task to suppress errors specifically when no files are found, instead printing a helpful diagnostic and exiting quietly. It's then used in the gro check task.
I considered not using a flag and instead using the heuristic that if you do gro gen it'll not error, but gro gen dirWithNoGenFiles would error, but opted for the more explicit, less surprising flag route.
I tried to think of a good name and this was the best I could come up with. 🤷

This use case seems kind of specific. In gradle (sorry if the comparisons to gradle are getting tedious) there's a specific flag (-x) that you can add to your cli to remove a task from execution (even it's a sub task of the one defined). So for example ./gradlew clean build -x test skips the test task that is part of the build task.  So the example gro command for if you want to skip code generation you just do gro check -x gen

I appreciate the comparisons, keep em coming. That's a good solution, hmm. I'll think about this more. Am in no hurry to merge.

Thinking about this more, the desired interface to gro check for users is to run gro check plainly with no arguments and not have to know that it's checking on gro gen status when they're not using those features. Users can always implement their own check task for completely custom behavior.
Perhaps the better, more obvious, more correct solution, that doesn't have a weirdly named argument (a telling code smell!), is to make Gro's check task scan to see if the user's source directory contains any gen files. If there are no gen files, it won't run the gen check. Yep sounds obvious. 😁 Then, the gro gen task never has special case behavior - it always errors out if given paths containing no gen files. How does that sound?

That sounds good to me! An opinionated default & the flexibility to implement one's own task if code gen isn't part of your project. 🎉

Ok I think this is gtg, much better than before. It feels right to put this complexity in the check task. I extracted the findGenModules helper and gave it a very simple test - the functions it composes are well tested.


APPS-1275 Use restore with retry logic

Codecov Report
Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 79.81%. Comparing base (89a2697) to head (248889e).
Report is 1 commits behind head on main.

Files
Patch %
Lines

pkg/service/client_manager.go
0.00%
5 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #223      +/-   ##
==========================================
- Coverage   80.31%   79.81%   -0.50%
==========================================
  Files          14       14
  Lines         645      649       +4
==========================================
  Hits          518      518
- Misses         99      103       +4
  Partials       28       28

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

@filkeith we do need schema, it is used to fetch aerospike configuration.


#4004 covering missing strings

Thank you for your contribution to the KodaDot NFT gallery.
👇 _ Let's make a quick check before the contribution.
PR type

[ ] Bugfix
[x] Feature
[ ] Refactoring

What's new?

[x] PR closes #4004
[ ] Requires deployment <rubick/magick_issue>
[ ] <brief_description_of_what_I've_added>

Before submitting Pull Request, please make sure:

[x] My contribution builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[x] I've tried to respect high code quality standards
[x] I've didn't break any original functionality
[ ] I've posted a screenshot of demonstrated change in this PR

Optional

[ ] I've tested it at </rmrk/collection/26902bc2f7c20c546a-1FVG7>
[ ] I've tested PR on mobile and everything seems works
[ ] I found edge cases
[ ] I've written some unit tests 🧪

Had issue bounty label?

[x] Fill up your KSM address:
Payout

Community participation

[x] Are you at KodaDot Discord?

Screenshot

[ ] My fix has changed something on UI; a screenshot is best to understand changes for others.

I'll keep updating this PR with more missing strings

I'll keep updating this PR with more missing strings

Maybe you know this, maybe you don't but I found pretty good plugin which helps identify / scan the codebase for hardcoded strings or possible missed translations:

https://github.com/lokalise/i18n-ally
https://plugins.jetbrains.com/plugin/17212-i18n-ally

just a note: we should probably reopen most of the translations once this get done properly

pay 30 usd

😍 Perfect, I’ve sent the payout
💵 $30 @ 34.35 USD/KSM ~ 0.873 $KSM
🧗 EzGc4s9PgCPx1YnF3fqzhLzVHpHMTL4LWPScwpDrR8JKgSU
🔗 0x3be9c118fbee811f9c8ebb4357595686a1bcb64ec1d75774f25a8e8410468b29
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues


Missing Alta Pine Dr 91001 Addresses

The following addresses are missing from the database
"34.202003","-118.130543","906","Alta Pine Dr","Altadena","91001"
"34.201946","-118.130362","920","Alta Pine Dr","Altadena","91001"
"34.201924","-118.130145","930","Alta Pine Dr","Altadena","91001"
"34.201869","-118.129977","940","Alta Pine Dr","Altadena","91001"
"34.201786","-118.129761","950","Alta Pine Dr","Altadena","91001"
"34.201657","-118.129418","970","Alta Pine Dr","Altadena","91001"
"34.201627","-118.129203","978","Alta Pine Dr","Altadena","91001"
"34.201525","-118.129039","988","Alta Pine Dr","Altadena","91001"
"34.201541","-118.128848","998","Alta Pine Dr","Altadena","91001"
"34.201464","-118.128666","1006","Alta Pine Dr","Altadena","91001"
"34.201376","-118.128485","1016","Alta Pine Dr","Altadena","91001"
"34.201345","-118.128284","1026","Alta Pine Dr","Altadena","91001"
"34.20131","-118.128105","1038","Alta Pine Dr","Altadena","91001"
"34.201092","-118.127951","1050","Alta Pine Dr","Altadena","91001"

I'll look in LA County to see if any datasets have this

906 Alta Pine Dr. is in here:
http://assessor.gis.lacounty.gov/assessor/rest/services/PAIS/pais_parcels/MapServer/0

@deharlow I just downloaded what is in OA, and these are all in there? Is there a reason you believe they are missing?  Thanks!

They were not in the data sent I downloaded on 10/31/2017. Sorry about the confusion, will double check with a new data set from today.

Should be good to go! what dataset did you download? I just grabbed the https://s3.amazonaws.com/data.openaddresses.io/runs/287602/us/ca/los_angeles.zip and it is in there. Cheers!
Can I close out the issue, or would you like to double check first?

Ok, so they are showing up incorrectly on Alpine Villa Dr, not Alta Pine Dr.

do you have an example of the error(s) on Alpine Villa Dr?

From your own screenshot...

yep, just looked and you are right. Let me find out source. I may have to call assessor's/ gis dept and let them know their base data is bad. Give me a bit.
Thanks!

My second screenshot was from http://maps.assessor.lacounty.gov/ so I know they have it right there.

yep, i checked there. It may be coming from the gis dept and not assessor. checking now

just called; the file is current to 10/30
Mark Greninger
Geographic Information Officer
County of Los Angeles
Internal Services Department
350 South Figueroa St
Suite 188
Los Angeles, CA 90071
<EMAIL_ADDRESS>(213) 253-5624
If the data is bad, e-mail him and they will get in their work order I was told.  Almost done downloading on my end, then I will update you.

this data is bad.

@deharlow did you notice any other issues?

Not so far. Did you email them or should I?

There are addresses with timestamps in 2017 in the filed available so the source at least needs to be refreshed.  The cached GDB appears to have been created over a year ago.

I emailed them and mentioned addresses in this area are not correct.

You are right – those should be Alta Pine – I’ll make sure that gets fixed.
If you see anything else like this let me know and we’ll research and fix.  Sometime the algorithm that connected the points to the streets got confused …
Mark Greninger
(213) 253-5624

@justinelliotmeyers Another address 1671 VERANADA AVE ,ALTADENA,CA,91001 34.174917, -118.099296 is missing, would you like me to add a new ticket or just continue on this one.

@deharlow I think if you notice issues with the dataset, send them directly to Mark. They are the ones who created/ maintain the data. we just use as a source, and do not actually update the raw data. You might want to ask him if they ever compare to the assessors office data to make sure errors are not created along their processing. Let me know if you want me to reach out to him, or if you do, either is fine with me.
Cheers

I sent him a note this morning. A few more are coming out of the woodwork as people view the map I made.

@deharlow Thanks a ton for reaching back to the source! Going to close this ticket as we will automatically pull the corrected data every week.


Fix to make it work with the latest Sandbox environment

This PR includes the following changes.

Fix the contract argument for execute-contract.

The current doc for execute-contract causes failure since it uses a single quote for the contract argument. (The JSON standard seems to require double quotes)

Rename $USERNAME to $SANDBOX_USERNAME not to conflict with the existing environment variable.

My local environment already defines $USERNAME and it might be the case for someone else.

Upgrade the version of client SDK since the Sandbox uses 2.1.0 scalar-ledger

@superbrothers I'm merging it but PTAL when you get a chance.

LGTM 👍


Debug why half-light radius is off in GalSim benchmarks

For example (pasted from #293):
│ 60  │ "bright_galaxy"               │ "X center (world coords)"    │ 0.005335   │ 0.005335   │
│ 61  │ "bright_galaxy"               │ "Y center (world coords)"    │ 0.005335   │ 0.005335   │
│ 62  │ "bright_galaxy"               │ "Minor/major axis ratio"     │ 0.4        │ 0.404819   │
│ 63  │ "bright_galaxy"               │ "Angle (degrees)"            │ 0          │ 0.0        │
│ 64  │ "bright_galaxy"               │ "Half-light radius (pixels)" │ 3.78788    │ 5.67052    │
│ 65  │ "bright_galaxy"               │ "Brightness (nMgy)"          │ 20         │ 19.9419    │
│ 66  │ "bright_galaxy"               │ "Probability of galaxy"      │ 1          │ 0.994971   │

I think I figured this out. You might know much of this already but I'll write up everything I figured out so we're on the same page/for posterity.
First of all, I added a test case with a perfectly round galaxy (minor/major axis ratio = 1). This case has the same axis ratio (configured in GalSim) as "angle_and_axis_ratio_1" and "angle_and_axis_ratio_2"; the former has an axis ratio of 0.2, the latter of 0.4. Comparing the three is informative:
│ 3   │ "round_galaxy" │ "Minor/major axis ratio"     │ 1        │ 0.989962 │
│ 5   │ "round_galaxy" │ "Half-light radius (pixels)" │ 3.78788  │ 3.61934  │

│ 3   │ "angle_and_axis_ratio_2" │ "Minor/major axis ratio"     │ 0.4      │ 0.40537  │
│ 5   │ "angle_and_axis_ratio_2" │ "Half-light radius (pixels)" │ 3.78788  │ 5.64817  │

│ 3   │ "angle_and_axis_ratio_1" │ "Minor/major axis ratio"     │ 0.2      │ 0.205604 │
│ 5   │ "angle_and_axis_ratio_1" │ "Half-light radius (pixels)" │ 3.78788  │ 7.95618  │

For "round_galaxy" with an axis ratio of 1, the inferred half-light radius is almost right (4% low); as the axis ratio goes down the inferred half-light radius gets larger.
I think the issue is in how one defines "half-light radius" for a elliptical galaxy. The Wikipedia page defines it only for circular galaxies. So both GalSim and Celeste seem to define it (implicitly, at least) in terms of an original circular galaxy which gets transformed to produce the observed galaxy.
The difference is that Celeste uses a transformation in which, starting from a circular galaxy (a collection of bivariate normals), we simply shrink along the minor (y) axis to achieve the desired axis ratio, then rotate (this I backed out from the code in get_bvn_cov, correct me if I'm wrong). GalSim works by producing a circular (exponential) galaxy with a given half-light radius, then calling shear(), which produces an area-preserving transform. Effectively, if the minor/major axis ratio is a, then after shrinking the minor axis by a, it scales the whole image (both dimensions) by 1/sqrt(a), expanding it to preserve total area. This expansion is why Celeste infers a larger half-light radius. In both of the cases above, it's off by approximately by a factor of 1/sqrt(a).
I tried making test_case_definitions.py scale the images by sqrt(a) after applying the shear, making GalSim's transformation match Celeste's (in theory?); this causes Celeste to infer nearly-correct half-light radius in all three cases. It's consistently low, but it's much closer:
│ 5   │ "round_galaxy" │ "Half-light radius (pixels)" │ 3.78788  │ 3.61934  │
│ 5   │ "angle_and_axis_ratio_2" │ "Half-light radius (pixels)" │ 3.78788  │ 3.61477  │
│ 5   │ "angle_and_axis_ratio_1" │ "Half-light radius (pixels)" │ 3.78788  │ 3.61645  │

Question is, which is the right definition to use (if either)? GalSim's area-preserving transform seems nice, but this is a question for an astronomer, not me.

This is great news! And the units issue you discovered with galsim data may apply to our stripe 82 validation also. Let's compare the half-light radii in units based on Galsim's area-preserving transform. The Celeste definition of half-light radius made sense to me at the time, but apparently it isn't the standard definition. I'll try scaling by sqrt(a) in the code for scoring Celeste on stripe 82 too.

OK, I'm not sure which fix you prefer---

an internal change to Celeste's handling of e_scale, or
a change in the GalsimBenchmark.jl script to scale up Celeste's e_scale value before comparing it with the GalSim value (and we would want to document this particular interpretation of e_scale), or
a change in the GalSim image generation script to shrink galaxies in generated images so that the half-light radius matches Celeste's definition.

I think 2 is best --- a change to Celeste would be invasive, and it's no problem if Celeste's internal representation of parameters differs from what we report, so I prefer 2 to 1. For reporting, we might as well use units astronomers are familiar with, so I prefer 2 to 3, though that doesn't matter too much.


customDevices.json Loading Problem

Version
Build/Run method:
[ x] Docker
[ ] Git Clone + npm install + npm run build + npm start
[ ] Pkg
Z-Wave JS UI version: <IP_ADDRESS>b107a
Z-Wave JS version: 12.4.4
Describe the bug
I am trying to create a custom Home Assistant MQTT discovery configuration for my thermostat, a Honeywell T6 Z-Wave. After a lot of digging around for examples on the internet, I've come up with a configuration that doesn't throw any syntax errors. Here is the content of that file:
{
  '39-8-11': [
    {
      type: 'climate',
      object_id: 'thermostat',
      values: [
        '49-0-Air temperature',
        '64-0-mode',
        '67-0-setpoint-1',
        '67-0-setpoint-2',
        '67-0-setpoint-1',
        '67-0-setpoint-11',
        '67-0-setpoint-12',
        '66-0-state',
        '68-0-mode'
      ],
      mode_map: {
        'off': 0,
        'heat': 1,
        'cool': 2,
        'auto': 3,
        'energy_heat': 11,
        'energy_cool': 12
      },
      setpoint_topic: {
        'heat': '67-0-setpoint-1',
        'cool': '67-0-setpoint-2',
        'auto': '67-0-setpoint-1',
        'energy_heat': '67-0-setpoint-11',
        'energy_cool': '67-0-setpoint-12'
      },
      default_setpoint: '67-0-setpoint-1',
      fan_mode_map: {
        'auto': 0,
        'low': 1,
        'circulation': 6
      },
      discovery_payload: {
        min_temp: 50,
        max_temp: 90,
        modes: ['off', 'heat', 'cool', 'auto', 'heat', 'cool'],
        fan_modes: ['auto', 'low', 'circulation'],
        action_topic: '66-0-state',
        action_template: '{{ value_json.value | lower }}',
        current_temperature_topic: '49-0-Air temperature',
        current_temperature_template: '{{ value_json.value }}',
        fan_mode_state_topic: '68-0-mode',
        fan_mode_command_topic: true,
        mode_state_topic: '64-0-mode',
        mode_command_topic: true,
        temperature_state_template: '{{ value_json.value }}',
        temperature_command_topic: true
      }
    }
  ]
}

The zwavejs log shows this error during startup of zwave-js-ui:
2024-02-26T19:15:15.339Z CONFIG   Error parsing config file customDevices.json: The device config file is malformed!                                   packages/config/config/devices/customDevices.json:                                   manufacturer id must be a lowercase hexadecimal number with 4 digits (ZW0340)
I've tried putting the manufacturer id in different formats (four-digit decimal, four-digit hex, two-digit hex) and none of them are accepted. The one I provided here seems to match what is expected based on the devices.js file. I have attached the customDevices.json file, the log files and json dump for the thermostat node.
Any help figuring this out would be greatly appreciated!
customDevices.json
zwave-js-ui-store.zip
node_20.json

Thank you so much! Moving it to the root store directory and using the correct JSON format did the trick. The .js version gave an error about not having an exports module.


Jfr mappers backport

Back porting the jfr-mappers module to Java 8 so it can eventually be used with Java 8_262+. I wanted to retain Java 11 language features  for the jfr-mappers test source set. Gradle 6.7.1 provides good support for different java versions per source set via its new toolchains feature, so I upgraded to gradle wrapper 6.7.1 to take advantage of this.
A side affect of the gradle upgrade is that the publishing plugin had to be adjusted because its now stricter about ensuring that artifacts published were not created by another build. I had to make some minor tweaks to account for this additional safety check, and in the process disabled the jfr-daemon:jar task, which nobody should be using.

This looks pretty solid, @jack-berg - let's discuss on Monday. I feel like I want to land the jlink PR first and then rebase this one, if that's OK?

Closes #133.

Closes #133.


Card TS Convert

Blast, forgot strict: true again.  Will work on that...

Thanks for the review.  I have responded to or made all the changes that I think were requested.  Please have another look.


Laravel 4 flysystem

Added support for using multiple Flysystem Filesystem disks while maintaining backwards compatibility.

Very nice, thanks! I'll try to review the changes in the coming week. If all is good, I'll merge it an tag an new 1.x version.

I don't use laravel-5, but I believe the same changes will get most of the way there.
Only would want to change the use of the Laravel-Flysystem to use native disks.
That would just need a change where it loads the disk
to:
if ($this->disk) {
            $filesystem = app('filesystem')->disk($this->disk)->getDriver();
        } else {
...


[deployer] Allow skipping and forcing the creation/update of a cluster config file

Context
Follow-up to https://github.com/2i2c-org/infrastructure/issues/2187#issuecomment-1453407343.
Running deployer generate dedicated-cluster for aws or gcp clusters, will each generate some initial files that were templated for a new cluster, like terraform, support files and even an intial cluster.yaml file in the case of GCP.
These files are generated together from one command and in case a file already exists, it gets overridden.
Proposal
We should not allow overriding existing files, except if a force flag exists. Alternativelly, we could always override if it exists, but provide a skip flag for each of them.
However, I believe the first proposal is safer.
Updates and actions
No response

We should not allow overriding existing files, except if a force flag exists.

Yes a clear :+1: for this path! I suggest emitting a warning instead of overwriting a file if they already exists, clarifying that they would be replaced or updated if --force is used.

Its easier to document use of a non-intrusive command than an intrusive command that may merit misc warnings about it. So this could be beneficial to have done before #2187 which in turn I think is relevant to reduce our long term workload.

Its easier to document use of a non-intrusive command than an intrusive command that may merit misc warnings about it. So this could be beneficial to have done before https://github.com/2i2c-org/infrastructure/issues/2187 which in turn I think is relevant to reduce our long term workload.

💯 Yes! Perfect! Thanks for labeling it @consideRatio!

We should not allow overriding existing files, except if a force flag exists.

Yes a clear 👍 for this path! I suggest emitting a warning instead of overwriting a file if they already exists, clarifying that they would be replaced or updated if --force is used.

A clarification: I think we shouldn't write/update anything unless all changes made can be done.
I got an idea btw, what about instead of introducing --force and checking for files etc, we instead check that git state is clean like a git rebase also does before its proceeds. If we do that, we know that whatever is changed can easily be reverted via git reset --hard HEAD, and that it also can be inspected easily via git diff.
The code to implement this is probably relatively simple and can be adopted as a general strategy for generate commands. I think its a great practice to isolate commits made by tooling as well, and this would help with such practice.

I got an idea btw, what about instead of introducing --force and checking for files etc, we instead check that git status is clean like a git rebase also does before its proceeds.

Great idea @consideRatio! I was thinking, why not have both? I will first describe what I have in mind, then why I think having both will be beneficial.
When running deployer generate dedicated-cluster the following checks should happen in this order:

run git status

use this to check if any of the files that this commands generates has not been modified and not committed
few important things in this step:

only the status of these files is important and not all of them
by making sure there aren't things that have not been commited, we ensure we are not loosing work when --force is used to override a file, as a git restore will get the file back

check if any of the files this command is trying to generate already exist

if any of them already exists, emit a warning message and abort if a --force flag has not been used
if --force is used, overwrite them completely.

Benefits of having both
The argument in favour of using just git status is that right now, the script behaves like it has --force enabled by default. But because we add the git status step, any changes can be easily reverted if we do not wish to override the files. Is this correct?
But what if, you override the files but are not aware of this? I'm thinking of a scenario where I want to deploy another leap cluster let's say, but on AWS this time. And by mistake, I use the generate command for gcp and override the initial cluster. Then continue with another mistake, commit the file and even do a terraform apply?
I admit that there must happen many mistakes in a row for this scenario to happen  And even if this happens, thanks to versioning we can revert all of it eventually, but not without work.
This is why I believe, it is worth to have the script only override files if --force is explicitly used to make it more mistake-proof ` and make sure we are intentionally overriding files. Also, adding this flag, is not something complicated and I think it's a small time investment now to avoid unintentional changes.

The argument in favour of using just git status is that right now, the script behaves like it has --force enabled by default. But because we add the git status step, any changes can be easily reverted if we do not wish to override the files. Is this correct?

Yes, but I think there are some additional benefits. I've especially considered the benefits of doing just a strict git status check where nothing is allowed to be dirty. Then the benefits could be:

easy to document, understand, and maintain such dumb logic
easy to inspect changes made with git status and git diff (not cluttered by other changes)
easy to commit the changes made with git commit -am "..." (putting tool generated changes in its own is a nice practice to reduce the complexity of code review)
easy and safe to cleanup the changes with git reset --hard HEAD and git clean -fd
easy to re-use a simple "check_before_continuing_with_generate_command" function for all deployer generate commands, no matter if they generate new files or is expected to update files in place etc.

If having such logic only, then I figure a --force flag would mean "bypass the git status check". I can see this be relevant to use for some deployer generate commands where you may want to update a file multiple times in a row or similar before making a commit.

Very happy to go with what you decide @GeorgianaElena, you have given this a lot of thought!!


Rewrite to MVVM architecture

I recently got a chance to use MVVM & Android Databinding in a project and I really like it. I like to think of MVVM has the evolution of MVP since the "presenter" (ViewModel) doesn't contain an instance of the View.

@Plastix When are you planning to do this?

@ravidsrk Some point this week.

@Plastix Great, please create a separate repo for MVVM.

@ravidsrk I was thinking of transitioning the master branch to MVVM and having a MVP branch.

Ugh...As much as I love Kotlin I always run into issues trying to do fancy stuff with annotation processing tools.
I'm running into this KAPT limitation https://github.com/gen0083/KotlinDaggerDataBinding when trying to use types generated by annotation processors with Dagger (For example I want to be able to use one of my PaperParcel model classes in the dependency graph).

🎉

🎉


Example script for routing PoW to local node

We need an example script showing how to use RoutingWrapper to route PoW requests (attachToTangle and interruptAttachingToTangle) to a local node.
See https://github.com/iotaledger/documentation/blob/iota.lib.py/stable/source/includes/_adapters.md#routingwrapper for more information.

Fixed in release: 1.2.0.
Thanks @johngrantuk!


Slick Vertical not flush

short description of the bug / issue, provide more detail below.

Slick Vertical slideshows has gaps between slides.
====================================================================
Code at fault: https://github.com/kenwheeler/slick/blob/master/slick/slick.css#L113
Any particular reason for this?
Thanks,
Tom

Can you add fiddle or smthng?

@jamilalisgandarov Not really sure the point in the fiddle, the code shows exactly what is happening.
A vertical slideshow slides have transparent borders.
But yes — https://jsfiddle.net/simeydotme/fmo50w7n/
Change settings to: vertical: true.
Done.

@leggomuhgreggo Hi, Has this been fixed, do not see a PR referenced?

I think so. Can you recreate in a reduced test case, using jsfiddle or codepen?

@leggomuhgreggo Erm, see https://github.com/kenwheeler/slick/issues/2997#issuecomment-317022807

That's the default demo.

@leggomuhgreggo Correct.

Change settings to: vertical: true.

https://github.com/kenwheeler/slick/blob/master/CONTRIBUTING.markdown#test-case-required

@leggomuhgreggo https://jsfiddle.net/9p2cm0eo/2/

Hmm, I'm not seeing any gaps.

@leggomuhgreggo It's there because it's in the code.
I've updated the fiddle to show contrast — https://jsfiddle.net/9p2cm0eo/3/
Just drag the slide and you will see the black line inbetween.

Hmm, I see the focus outline. Is that what you mean? If so, Should be able to avoid with the following, but be forewarned it's bad a11y.
.slick-slide:focus {outline: none}

@leggomuhgreggo No.
Basically, the question is, what is border: 1px solid transparent; doing to .slick-slide?

Seems to me it's doing nothing. I guess it could be preventing margin collapse. Since everything is box-sizing: border-box it shouldn't be doing anything to the outer dimensions of the slide. If you are seeing gaps, I wonder if it has to do with rounding issues, I've seen that happen if the slider width doesn't mod slideCount to zero.


Quickstart for Helm-based Operators is not working on OpenShift

Bug Report
What did you do?
I followed https://master.sdk.operatorframework.io/docs/building-operators/helm/quickstart/
mkdir nginx-operator
cd nginx-operator
operator-sdk init --plugins=helm
operator-sdk create api --group demo --version v1 --kind Nginx
make docker-build docker-push IMG=docker.io/nmasse/nginx-operator:test
make install
make deploy IMG=docker.io/nmasse/nginx-operator:test
kubectl apply -f config/samples/demo_v1_nginx.yaml
kubectl get all -l "app.kubernetes.io/instance=nginx-sample"

What did you expect to see?
I expected to see an nginx pod come up. But it never came up.
What did you see instead? Under which circumstances?
The operator logs exhibit an error failed to install release: serviceaccounts \"nginx-sample\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on
Full log file:
{"level":"info","ts":1597936277.6508987,"logger":"cmd","msg":"Version","Go Version":"go1.13.15","GOOS":"linux","GOARCH":"amd64","helm-operator":"v1.0.0"}
{"level":"info","ts":1597936277.6517258,"logger":"cmd","msg":"WATCH_NAMESPACE environment variable not set. Watching all namespaces.","Namespace":""}
{"level":"info","ts":1597936281.6490111,"logger":"controller-runtime.metrics","msg":"metrics server is starting to listen","addr":"<IP_ADDRESS>:8080"}
{"level":"info","ts":1597936281.6504083,"logger":"helm.controller","msg":"Watching resource","apiVersion":"demo.my.domain/v1","kind":"Nginx","namespace":"","reconcilePeriod":"1m0s"}
I0820 15:11:21.651919       1 leaderelection.go:242] attempting to acquire leader lease  nginx-operator-system/nginx-operator...
{"level":"info","ts":1597936281.7339883,"logger":"controller-runtime.manager","msg":"starting metrics server","path":"/metrics"}
I0820 15:11:39.625672       1 leaderelection.go:252] successfully acquired lease nginx-operator-system/nginx-operator
{"level":"info","ts":1597936299.6272435,"logger":"controller","msg":"Starting EventSource","controller":"nginx-controller","source":"kind source: demo.my.domain/v1, Kind=Nginx"}
{"level":"info","ts":1597936299.7290106,"logger":"controller","msg":"Starting Controller","controller":"nginx-controller"}
{"level":"info","ts":1597936299.7297232,"logger":"controller","msg":"Starting workers","controller":"nginx-controller","worker count":4}
{"level":"error","ts":1597936394.6697314,"logger":"helm.controller","msg":"Release failed","namespace":"nginx-operator","name":"nginx-sample","apiVersion":"demo.my.domain/v1","kind":"Nginx","release":"nginx-sample","error":"failed to install release: serviceaccounts \"nginx-sample\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tpkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128\ngithub.com/operator-framework/operator-sdk/internal/helm/controller.HelmOperatorReconciler.Reconcile\n\tsrc/github.com/operator-framework/operator-sdk/internal/helm/controller/reconcile.go:181\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:235\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:209\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:188\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\tpkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:155\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\tpkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:156\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tpkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:133\nk8s.io/apimachinery/pkg/util/wait.Until\n\tpkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:90"}
{"level":"error","ts":1597936394.6907682,"logger":"controller","msg":"Reconciler error","controller":"nginx-controller","name":"nginx-sample","namespace":"nginx-operator","error":"failed to install release: serviceaccounts \"nginx-sample\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tpkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:237\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:209\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:188\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\tpkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:155\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\tpkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:156\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tpkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:133\nk8s.io/apimachinery/pkg/util/wait.Until\n\tpkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:90"}

Environment

operator-sdk version:

operator-sdk version: "v1.0.0", commit: "d7d5e0cd6cf5468bb66e0849f08fda5bf557f4fa", kubernetes version: "v1.18.2", go version: "go1.13.11 darwin/amd64", GOOS: "darwin", GOARCH: "amd64"
helm-operator version: "v1.0.0", commit: "d7d5e0cd6cf5468bb66e0849f08fda5bf557f4fa", kubernetes version: "v1.18.2", go version: "go1.13.11 darwin/amd64", GOOS: "darwin", GOARCH: "amd64"

Kubernetes version information:

I'm using OpenShift Version 4.3.5, which is based on Kubernetes v1.16.2.
I'm the cluster-admin of this cluster.

Kubernetes cluster kind: 3 masters, 3 workers, in VM.

Are you writing your operator in ansible, helm, or go?

Helm
Possible Solution
The generated config/rbac/role.yaml is missing privileges on nginxes/finalizers.
The operator-sdk create api command that generates this file needs to be updated to include this privilege since it is required on OpenShift.
##
## Rules for demo.my.domain/v1, Kind: Nginx
##
- apiGroups:
  - demo.my.domain
  resources:
  - nginxes
  - nginxes/status
  - nginxes/finalizers
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch

Since the generated objects include a ownerReference field that references the created CR, on OpenShift the operator needs to be able to set finalizers on the created CR.
apiVersion: v1
kind: ServiceAccount
metadata:
  annotations:
    meta.helm.sh/release-name: nginx-sample
    meta.helm.sh/release-namespace: nginx-operator
  creationTimestamp: "2020-08-20T15:19:08Z"
  labels:
    app.kubernetes.io/instance: nginx-sample
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: nginx
    app.kubernetes.io/version: 1.16.0
    helm.sh/chart: nginx-0.1.0
  name: nginx-sample
  namespace: nginx-operator
  ownerReferences:
  - apiVersion: demo.my.domain/v1
    blockOwnerDeletion: true
    controller: true
    kind: Nginx
    name: nginx-sample
    uid: c5d7e996-013f-40ca-bd19-14ba73728eaf
  resourceVersion: "150618365"
  selfLink: /api/v1/namespaces/nginx-operator/serviceaccounts/nginx-sample
  uid: ce916607-58dd-4c1f-bf1e-dbf6f6e86c04
secrets:
- name: nginx-sample-token-99vgm
- name: nginx-sample-dockercfg-rrzb7

Hi @nmasse-itix,
To follow up the tutorial and quickstart you need to have cluster-admin permissions. The tool scaffold  k8s manifests by default which requires this permission. You can change the scope of your project as described in my comment https://github.com/operator-framework/operator-sdk/issues/3733#issuecomment-676550898.

Hi @camilamacedo86 !
Thanks for jumping in and helping me.
I re-did the whole tutorial (after proper cleanup of course) and I do confirm that:

I am cluster-admin, and connected to the cluster when doing the operator-sdk create api that scaffolds k8s manifests.

$ oc whoami
<EMAIL_ADDRESS>
$ oc describe clusterrolebinding<EMAIL_ADDRESS>Name<EMAIL_ADDRESS>Labels:       <none>
Annotations:  <none>
Role:
  Kind:  ClusterRole
  Name:  cluster-admin
Subjects:
  Kind  Name               Namespace
  ----  ----               ---------
  User<EMAIL_ADDRESS>

$ operator-sdk create api --group demo --version v1 --kind Nginx
Created helm-charts/nginx
Generating RBAC rules
WARN[0004] The RBAC rules generated in config/rbac/role.yaml are based on the chart's default manifest. Some rules may be missing for resources that are only enabled with custom values, and some existing rules may be overly broad. Double check the rules generated in config/rbac/role.yaml to ensure they meet the operator's permission requirements.

When doing so (operator-sdk create api while being connected as cluster-admin), the generated role.yaml does NOT contain nginxes/finalizers.

The generated operator fails with the same error as before.

So, I followed step-by-step the tutorial, while being cluster-admin and the described steps lead to a non-working operator.
Can we fix the operator-sdk create api command to generate/scaffold correctly the proper RBAC permissions ?

Hi @camilamacedo86 and @nmasse-itix
I've re-run all the tests from scratch on both Minikube and OpenShift and comes to the conclusion that Nicolas suggestion is mandatory for OpenShift.
On Minikube
On a fresh install, apply the following commands:
mkdir nginx-operator
cd nginx-operator
operator-sdk init --plugins=helm --domain=com --group=example --version=v1alpha1 --kind=Nginx
export IMG=quay.io/lbroudoux/nginx-operator:v0.0.1
make docker-build docker-push IMG=$IMG
make deploy IMG=$IMG
kubectl apply -f config/samples/example_v1alpha1_nginx.yaml -n nginx-operator-system

Operator deploys correctly and is able to deploy the nginx-sample custom resource. Everything is running fine.
Checking the logs:
$ kubectl logs deployment.apps/nginx-operator-controller-manager  -n nginx-operator-system -c manager | grep error
[EMPTY]

Clean-up everything
make undeploy
cd .. && rm -rf nginx-operator

On OpenShift
On a fresh 4.5 cluster, apply the same following commands:
mkdir nginx-operator
cd nginx-operator
operator-sdk init --plugins=helm --domain=com --group=example --version=v1alpha1 --kind=Nginx
export IMG=quay.io/lbroudoux/nginx-operator:v0.0.1
make docker-build docker-push IMG=$IMG
make deploy IMG=$IMG
kubectl apply -f config/samples/example_v1alpha1_nginx.yaml -n nginx-operator-system

Operator deploys correctly but is not able to deploy the nginx-sample custom resource.
Checking the logs:
$ kubectl logs deployment.apps/nginx-operator-controller-manager  -n nginx-operator-system -c manager | grep error
{"level":"error","ts":1598273662.1000674,"logger":"helm.controller","msg":"Release failed","namespace":"nginx-operator-system","name":"nginx-sample","apiVersion":"example.com/v1alpha1","kind":"Nginx","release":"nginx-sample","error":"failed to install release: serviceaccounts \"nginx-sample\" is forbidden: cannot set blockOwnerDeletion if an ownerReference refers to a resource you can't set finalizers on: , <nil>","stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\tpkg/mod/github.com/go-logr/zapr@v0.1.0/zapr.go:128\ngithub.com/operator-framework/operator-sdk/internal/helm/controller.HelmOperatorReconciler.Reconcile\n\tsrc/github.com/operator-framework/operator-sdk/internal/helm/controller/reconcile.go:181\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:235\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:209\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\tpkg/mod/sigs.k8s.io/controller-runtime@v0.6.2/pkg/internal/controller/controller.go:188\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\tpkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:155\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\tpkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:156\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\tpkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:133\nk8s.io/apimachinery/pkg/util/wait.Until\n\tpkg/mod/k8s.io/apimachinery@v0.18.6/pkg/util/wait/wait.go:90"}

Clean-up everything
make undeploy
cd .. && rm -rf nginx-operator

On OpenShift with modified RBAC on finalizers
On a fresh 4.5 cluster, apply the same following commands:
mkdir nginx-operator
cd nginx-operator
operator-sdk init --plugins=helm --domain=com --group=example --version=v1alpha1 --kind=Nginx
export IMG=quay.io/lbroudoux/nginx-operator:v0.0.1

before pursuing, edit config/rbac/role.yaml and add the nginxes/finalizers resource like below:
[...]
##
## Rules for example.com/v1alpha1, Kind: Nginx
##
- apiGroups:
  - example.com
  resources:
  - nginxes
  - nginxes/status
  - nginxes/finalizers
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- verbs:
  - "*"
  apiGroups:
  - ""
  resources:
  - "serviceaccounts"
  - "services"
- verbs:
  - "*"
  apiGroups:
  - "apps"
  resources:
  - "deployments"

# +kubebuilder:scaffold:rules

Finish with the last commands:
make docker-build docker-push IMG=$IMG
make deploy IMG=$IMG
kubectl apply -f config/samples/example_v1alpha1_nginx.yaml -n nginx-operator-system

Operator deploys correctly and is able to deploy the nginx-sample custom resource.
Checking the logs:
$ kubectl logs deployment.apps/nginx-operator-controller-manager  -n nginx-operator-system -c manager | grep error
EMPTY

There's a remaining issue when deploying the Pod because of security conflict with OpenShift SCC but it's not related to Operator SDK:
2020/08/24 13:13:19 [warn] 1#1: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:2
nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:2
2020/08/24 13:13:19 [emerg] 1#1: mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied)
nginx: [emerg] mkdir() "/var/cache/nginx/client_temp" failed (13: Permission denied)

Conclusion
As a conclusion, I would say that the tests confirm that Operator SDK for Helm does not work out-of-the-box on OpenShift. Finalizer permission on Custom Resource is required by OpenShift because of more restrictive default RBAC permissions on serviceaccount that should not be there on upstream Kubernetes. As this permission is not required by custom code logic and Operator SDK should be the preferred way for customers to develop operators on Red Hat's OpenShift, I suggest adding this permission by default when generating scaffold resources for a new Helm backed API.

Hi @lbroudoux
really thank you for your comment;
So, it means that we need to:

update the docs as described in; https://github.com/operator-framework/operator-sdk/issues/3733#issuecomment-676521753

improve the tool to generated for Ansible/Helm the status and finalizers roles by default. (I assume that the same issue will also be checked with Ansible i) E.g

[...]
##
## Rules for example.com/v1alpha1, Kind: Nginx
##
- apiGroups:
  - example.com
  resources:
  - nginxes
  - nginxes/status
  - nginxes/finalizers
  verbs:
  - create
  - delete
  - get
  - list
  - patch
  - update
  - watch
- verbs:
  - "*"
  apiGroups:
  - ""
  resources:
  - "serviceaccounts"
  - "services"
- verbs:
  - "*"
  apiGroups:
  - "apps"
  resources:
  - "deployments"

# +kubebuilder:scaffold:rules

I've made some tests with Ansible but the permission is not required as the SDK does not place a finalizer on the Custom Resource. This seems to be done only with Helm.

update the docs as described in; #3733 (comment)

@camilamacedo86 These docs are not related to this issue AFAICT. The operator developer needs cluster admin to be able to create the CRDs and deploy the operator into the cluster. The operator does NOT need cluster admin (it uses the Role defined in config/rbac/role.yaml)
I think the solution here is just the simple addition of the finalizers permission in the default Helm role scaffold here: https://github.com/operator-framework/operator-sdk/blob/35df158954e7dbc643bf705e5710112dcdc5f005/internal/plugins/helm/v1/scaffolds/internal/templates/config/rbac/manager_role.go#L159-L161
@lbroudoux or @nmasse-itix Would either of you be interested in submitting a PR to fix this issue?

Hi @joelanford,

@camilamacedo86 These docs are not related to this issue AFAICT. The operator developer needs cluster admin to be able to create the CRDs and deploy the operator into the cluster.

The helm quickstart has not the pre-requirement for the users know the user requires cluster-admin permission.
See: https://github.com/operator-framework/operator-sdk/issues/3733#issuecomment-676521753

Ensure that all quickstart and tutorial docs for Ansible/Helm/GO has as Prerequisites User authorized with cluster-admin permissions
Also, would be very nice we have a doc on the website with quite similar info of https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control#iam-rolebinding-bootstrap to link on the Prerequisites. We cannot link the cloud.google.com doc, however, it is exactly the info that shows missing.

The issue #3733 is the same scenario faced here.

Done PR: https://github.com/operator-framework/operator-sdk/pull/3779

Re-opening because PR #3779 did not resolve this issue for Helm operators. It applied the change to the Ansible operator scaffolding, but this permission change is not required for Ansible operators because the Ansible operator does not use a finalizer on the main CR.
I will submit a PR shortly that makes this change for Helm and reverts the change for Ansible.

For Helm, the finalizer permission will be added in #4105
For Ansible, the finalizer permission was added in #3779
Also, we need to cherry-pick the #4105 to 1.0.


Perf updates & current run

There was a bug recently that caused the BZNG-centric parts of the perf script to fail, but now that https://github.com/brimsec/zq/pull/349 is merged, the script can run again, so I figured I'd check in with some up-to-date numbers.
While I was at it, I found that my other recent changes to the script to open the GZIP-compressed sample data logs hadn't covered zeek-cut and jq so I fixed those in the process.
Given our other deadlines, I'm not advocating we start obsessing over perf deltas at this time. For the record, though, I will point out that there's an apparent significant perf drop in handling BZNG format in general and BZNG output in particular. I've not yet done any kind of binary search to see what commits may have brought it on. For instance, the numbers show that doing zq -f bzng * went from <2 seconds to 18+ seconds. Granted, I know we've had to do a lot lately to fix bugs and/or support more sophisticated parts of the spec, so I don't know what's a reasonable resource budget to achieve this. But if this surprises folks, I could open a to-do item for us to circle back and revisit this perf.

FYI, I've done the binary search to find a spot with a significant performance drop. Things were faster at zq commit 3d4a9ff, where turning all the Zeek TSV sample data logs into BZNG was taking ~4 seconds.
~/work/zq-sample-data/zeek-default$ zq -version
Version: v0.0.1-296-g3d4a9ff

~/work/zq-sample-data/zeek-default$ time zq -f bzng * > /dev/null
real	0m4.019s
user	0m4.824s
sys	0m0.346s

Then @aswan's https://github.com/brimsec/zq/pull/314 briefly broke things, as it was not even possible to do a make install of the commit aebabc3 associated with that PR. However, when @aswan got things working again shortly after with his https://github.com/brimsec/zq/pull/316, things were now much slower:
~/work/zq-sample-data/zeek-default$ zq -version
Version: v0.1.0

~/work/zq-sample-data/zeek-default$ time zq -f bzng * > /dev/null

real	0m16.868s
user	0m32.511s
sys	0m1.803s

Once again, I'm not banging the table saying we need to chase this down right now. First and most importantly I just wanted a record of where it dropped. Beyond that, if @aswan or anyone else wants to give a quick look at what changed and confirm whether the enhancement justifies the resource use that led to the perf drop, we could always make yet another change and re-run the perf scripts before I commit this PR.

Now that https://github.com/brimsec/zq/pull/377 is merged, I've re-run the perf comparison script and the results show the BZNG results are closer to when we were at our best.
Separately, I notice that the permutations that read NDJSON are slower than when we were at our best, but I'm less concerned about this right now. We can always circle back and optimize that more later.


Switch to GitHub Actions for CI

This will obviate the need for third-party services, i.e. Travis, and for Codecov checks on PRs.

In #10, on Travis/macOS, forcing Homebrew to upgrade Python makes the job (e.g. 386.5) take >12 minutes, more than 4 times longer than other OS.


Dangerous configuration through environment variables

Hello, and thanks for all your effort on Fred!
We are looking to use fred in our projects, but one of the most significant issues is an environment variables-based configuration. At first, it's not a library's responsibility to read environment variables - it should be under the complete control of the application. I know there are some counter-examples like env-logger. Still, it's a library whose only goal is to read and parse env var for simplification purposes.
Configuring through env vars is especially sensitive for such an essential behavior as the security configuration. In my application, I would hardcode sensitive behavior and never allow insecure connections in the production environment. It's possible to unset environment variables on the app level, but still easy to forget and quite unergonomic.
Considering that it's breaking some isolation rules and affecting the security, I suggest removing env variables support, or at least hiding it behind the non-default feature,  and moving this configuration to a code level so that the application has complete control over such a sensitive configuration.

Thanks! So is it going to be part of the next major release?


Change vars from dict to flat list as not supported by AWX injector

Ref: https://github.com/ansible/awx/issues/1965

lgtm


I tried omitting (await) in durable objects, but it doesn't seem to work.

I saw an explanation of durable objects lifespan here
https://developers.cloudflare.com/workers/runtime-apis/durable-objects/#durable-object-lifespan
When I try to omit ctx.wait_until and remove .await from the Fetch, the durable objects does not wait for the request to complete

async bodies and other futures are lazy: they do nothing until they are run. (https://rust-lang.github.io/async-book/03_async_await/01_chapter.html)
You can use worker::Context::wait_until function that makes the execution context can live after the response is returned.


[RFC] Crate reorganization

Motivation
Three-rs is a very young project. The major part of it was developed in a very short period of time, that leads us to some structural problems.
The main problem - a lot of things is situated in the root module, while there are more suitable places.
New structure

camera module

struct Camera moved from lib.rs
trait Projection
struct Orthographic
struct Perspective

input module - add documentation
window module - no changes
scene module

Scene struct
Background enum

render struct
(?) rework render method to reduce nesting using dedicated private functions in match statements
macros module - no changes
factory module

struct Factory

loader module - new module (?)

struct Loader
Loader is stored inside Factory struct and provides functions for loading textures, sounds, meshes and so on. This functionality is separated from Factory.

geometry module - new module

struct Geometry moved from factory.rs
struct GeometryShape moved from factory.rs

mesh module - new module

struct Mesh moved from lib.rs and scene.rs
struct DynamicMesh moved from lib.rs and scene.rs
common trait for both Mesh and DynamicMesh (??)

material module - new module

struct Material moved from scene.rs
struct Texture

lights module - new module

structs AmbientLight, PointLight, HemisphereLight, DirectionalLight moved from scene.rs

node module - new module

type NodePointer
type Transform
struct Node
struct NodeInfo
struct NodeTransform

object module - new module

struct Object
struct Group

hub module - new module

struct Hub
all types used by Hub and not noticed by me in other modules (SubNode, LightData, GpuData...)

sprite module - new module

Sprite struct

controls module - new module - not sure about the name

orbit submodule - contatins OrbitalControls
animation submodule - contains animation controls

A few notes
Publicity
We should use pub(crate) to hide some things form user (not #[doc(hidden)]) and to allow access to fields and methods for other modules
Documentation
We should remove every #[allow(missing_docs)] label from code and never let them in the future.
Controls
Controls - is a special helper struct with update method, that can be used to control different objects on scene. I can see Controls being used for different Camera modes (orbital camera, FPS camera, free-flight camera, etc) and controlling animations.
So the common way of using it is:
let anim = AnimationControls::new(my_object);
anim.settings(...);
...
// somewhere in the main loop:
orbit_camera.update(&win.input);
anim.update(&win.input);

I'm not sure the it's good idea though, so give me your opinions, please.
Summary
10 new modules, major rework in scene.rs, lib.rs and factory.rs. However, I already started to do so in my own branch (not a lot of stuff done though) and I'm sure I can finish the most valuable part at this weekends.
Possible drawbacks
A lot of relatively small modules, possible problems with interop between different modules (can be solved with pub(crate).
Give me your opinions about this RFC.

The proposed crate structure is logical, so +1 from me.
Review

(?) rework render method to reduce nesting using dedicated private functions in match statements

Unnecessary at the moment.

loader module - new module

Good idea.

This functionality is separated from Factory.

In general, I'd like to see all the impl Factory blocks in one place. Navigation is a nightmare at the moment!

GeometryShape

Could be renamed geometry::Shape.

struct Texture

Textures should probably have their own module, since in general they're used for more than just materials.

hub module - new module

I don't really understand what Hub does. It would be helpful to include some notes on its relevance / usage.

We should use pub(crate) to hide some things form user (not #[doc(hidden)]) and to allow access to fields and methods for other modules

Totally agree.

Controls

I've no complaints with the current design but it might be worth experimenting with alternatives. Perhaps controls could be toggled on / off for per-frame updates, in the same way meshes can be toggled visible / invisible?
Additions

Export camera::Projection.
Remove suffixes like AmbientLight, DirectionalLight etc. in favour of path prefixed versions, i.e. light::Ambient, light::Directional etc.

(?) rework render method to reduce nesting using dedicated private functions in match statements
Unnecessary at the moment.

Yep, maybe

Could be renamed geometry::Shape.
Remove suffixes like AmbientLight, DirectionalLight etc. in favour of path prefixed versions, i.e. light::Ambient, light::Directional etc.
Export camera::Projection.

Agreed

Textures should probably have their own module, since in general they're used for more than just materials.

I thought about it, maybe it's better to have dedicated module.

I don't really understand what Hub does. It would be helpful to include some notes on its relevance / usage.

It's literally the heart of three-rs. It controls the scenegraph, and it's the place where froggy storage for actual game objects is.

I've no complaints with the current design but it might be worth experimenting with alternatives. Perhaps controls could be toggled on / off for per-frame updates, in the same way meshes can be toggled visible / invisible?

Perhaps we should discuss it in another issue? The current usage was proposed by @kvark in some way, when I was working on prototype of animation system.

It's literally the heart of three-rs. It controls the scenegraph, and it's the place where froggy storage for actual game objects is.

That makes sense. I seldom see the word 'hub' used. Perhaps it should be renamed Core or something similar? Just a thought.

Perhaps we should discuss it in another issue?

Yes, I think so.

Extra suggestions

Remove new_ prefix from Geometry constructors, replacing new_box with new_cuboid to avoid keyword clash.
Rename Geometry::from_vertices to Geometry::with_vertices.

Closed in #86


MissingPluginException (MissingPluginException(No implementation found for method getInstalledUpiApps on channel upi_pay))

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behaviour:

Enter VPA
Trigger payment
Go to opened UPI app
...

Expected behaviour
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environmental Details

OS: [e.g. Android 11]
Device: [e.g. OnePlus Nord]
Package Version: [e.g. v1.0.0]
UPI Applications in the device: [e.g. - GPay, Paytm]
Play Store: [e.g. Google, Mi, Vivo]
Other UPI / Payment packages used in the app: [e.g. - razorpay_flutter]

Additional context
Add any other context about the problem here.

Not adhering to the issue template


Handle fields with multiple variable declarators

Note that for debugging purposes, this PR already includes the change in #131. Merge #131 before reviewing this PR.
@LoiNguyenCS is there a better way to get the full class name in PrunerVisitor that you're aware of? I'm not particularly confident in how I did it, but it seems to work on the test cases.
The change in TargetMethodFinderVisitor is necessary because without it, code like:
baz(obj1);

where obj1 is a field fail to register obj1 as a used member. Removing that logic didn't cause a test to fail, so I'm not sure why it was there. @LoiNguyenCS do you know why it was originally present? There's no documentation that I can see, and git blame doesn't help (it points to https://github.com/kelloggm/specimin/commit/fac443546259ad285f446a2ae39377ac3d26b4d5, which doesn't have any documentation associated with it that I can find).

This fixes a crash reported by the evaluation tool on CF-6077 (Apache Cassandra)

Professor,

@LoiNguyenCS do you know why it was originally present?

In the visit method for MethodCallExpr, we check if a method call is invoked by a NameExpr that represents a field. Previously, I overlooked the scenario where the field might be a parameter within a method call. Thus, to avoid redundant updates for the same scenario (a field invoking a method), I've incorporated that check into the visit method for NameExpr.

We can use declaringType().getQualifiedName(),

Actually we cannot: declaringType() only exists on the return type of resolve() if the receiver is a FieldDeclaration; this method isn't present on the return type of resolve() when the receiver is a VariableDeclarator (that's why I had to make the change at all - calls to resolve on a FieldDeclaration with multiple declarators always fail).

I see, in that case, I think using multiple get() is the way to go.

@LoiNguyenCS I did a bit of refactoring based on your last comment, so please re-review


Windows Server needs Ctrl-Alt-Delete to login - suggest enable RDP in sysprep

Can you please enable RDP in the answer file so that we can log in (over a remote desktop session from another qube).
Otherwise qubes issue #1585 applies https://github.com/QubesOS/qubes-issues/issues/1585
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-8.1-and-8/hh825710(v=win.10)?redirectedfrom=MSDN

sudo systemctl mask ctrl-alt del.target in dom0 worked


Dat

Thank you very much for your code, it is very helpful to me. However, I encountered problems when training my own dataset.
Below is the error message and the layout of my dataset.
`Arguments: Namespace(batch_size=8, data_path='./datasets/skullfix_dataset/32/', dataset_name='skull_complete', diffusion_steps=1000, dropout=0.0, ema_rate='0.9999', fp16_scale_growth=0.001, in_scale_factor=0, learn_sigma=False, log_dir='logs/train', log_interval=1000, lr=0.0001, lr_anneal_steps=0, microbatch=-1, missing_volumes='0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9', noise_schedule='linear', predict_xstart=False, rescale_learned_sigmas=True, rescale_timesteps=True, resume_checkpoint='', save_interval=10000, schedule_sampler='uniform', sigma_small=False, super_res=False, timestep_respacing='', train_file_path='./datasets/skullfix_dataset/train.txt', use_checkpoint=False, use_fp16=False, use_kl=False, use_roi=False, use_scale_shift_norm=True, val_data_path='', val_ddim=True, val_file_path='./datasets/skullfix_dataset/val.txt', val_interval=10000, weight_decay=0.0)
creating model and diffusion...
Model Parameters:
in_channels: 1
out_channels: 1
cond_in_channels: 1
dropout: 0.0
conv_resample: True
use_checkpoint: False
num_heads: 1
use_scale_shift_norm: True
attention_resolutions: []
in_scale_factor: 0
channel_mult: (2, 4, 4, 4)
num_res_blocks: 3
model_channels: 32
creating data loader...
Loading data from ./datasets/skullfix_dataset/32/ and filtering with ./datasets/skullfix_dataset/val.txt
Missing counterpats: 0
Final dataset size: 25
training...
Loading data from ./datasets/skullfix_dataset/32/ and filtering with ./datasets/skullfix_dataset/train.txt
Missing counterpats: 0
Final dataset size: 75
running validation...
Traceback (most recent call last):
...
...
RuntimeError: Given groups=1, weight of size [32, 1, 3, 3, 3], expected input[8, 2, 32, 32, 32] to have 1 channels, but got 2 channels instead`

I don’t know if you have encountered similar problems. Thanks again @Monnte

Hi looks like that your dataset you have implemented creates a 2 channnels input and by default network expect the input to have 1 channel. So just change the input layer for the network. If you need further help you can contact me on different platform (e.g. Discord, my nick is: monnte). :+1:

Thanks for your reply! Do you mean the number of channels in DiffComplete? I tried to change the in_channels, but it still gave an error.
I don't know if there was a problem when I was processing the dataset.

Try to change the cond_in_channels=2.

Thanks for your help, I changed some code which caused this error and now I have fixed it. Thanks again for your code.


Api feature request

Please, add graggable item position parameter to callback canDragOver in class ReorderableState.
It is necessary for flexible work.
abstract class ReorderableState<T>(
    private val scope: CoroutineScope,
    private val maxScrollPerFrame: Float,
    private val onMove: (fromIndex: ItemPosition, toIndex: ItemPosition) -> (Unit),

    // here
    private val canDragOver: ((indexFrom: ItemPosition, indexTo: ItemPosition) -> Boolean)?,

    private val onDragEnd: ((startIndex: Int, endIndex: Int) -> (Unit))?,
    val dragCancelledAnimation: DragCancelledAnimation
)

I have made a pull request for this. Feel free to leave code review. https://github.com/aclassen/ComposeReorderable/pull/184


Buildah fails to compile when btrfs headers are not installed

Description
The Makefile does not build buildah cleanly on my RHEL 7.5 CSB without the btrfs headers installed.
Steps to reproduce the issue:
$ make

Describe the results you received:
go build -ldflags '-X main.gitCommit=6573a81 -X main.buildInfo=1536947502 -X main.cniVersion=v0.7.0-alpha1' -o buildah -tags "btrfs_noversion  containers_image_ostree_stub selinux seccomp" ./cmd/buildah
# github.com/projectatomic/buildah/vendor/github.com/containers/storage/drivers/btrfs
../../../.local/lib/go/src/github.com/projectatomic/buildah/vendor/github.com/containers/storage/drivers/btrfs/btrfs.go:8:25: fatal error: btrfs/ioctl.h: No such file or directory
 #include <btrfs/ioctl.h>
                         ^
compilation terminated.
make: *** [buildah] Error 2

Describe the results you expected:
A successful build.
Buildah version:
$ git describe --always --dirty
6573a81

Workaround:
I needed:
$ make AUTOTAGS='exclude_graphdriver_btrfs containers_image_ostree_stub selinux'

to build buildah.
Fix:
Looking at our tag-generating scripts, it looks like we have a local version of libpod's btrfs_tag.sh, but are missing an analog for its btrfs_installed_tag.sh.  Someone should bring over btrfs_installed_tag.sh if we want to support out-of-the-box compilation on systems without btrfs headers.

Fixed by #1016.


Check if uploaded video is a duplicate

Hi,
How do I check if the video is a duplicate? What happens right now is that, if the video is a duplicate, it still uploads.

I aim to spend February some time in February updating this package as well as my recently added Amazon package.
Sorry there's not currently a way of handling this.

Sorry for the late reply. Thank you very much! :+1:


GTN Meeting (12th of September)

The next meeting of the GTN will take place during the next CoFest (#1491), on Thursday, the 12th of September. The idea of these meeting is to share news about Galaxy and Training, but also just talk together.
To accommodate different time zones and schedules, there will be 2 calls (with similar discussions) at 8am (UTC + 2) and 4pm (UTC + 2) via Hangout.
Agenda and minutes document in this Google Doc, please feel free to suggest your agenda items here if there is anything you would like to discuss or learn about!

Quick reminder. The meetings are on Thursday!
If you have time, it would be nice to see maintainers of the different topics (@galaxyproject/training). We would like at the end of the calls to go through open PR and issues


webhook issue

When both onchain and lnbits wallet are enabled for SatsPay, with any webhook,
For some reason when loading the satspay QR Code page, the presence of the webhook url shows that the invoice is already paid, when it hasn't been paid! Also the data sent to the webhook is instant, and it shows the invoice is paid, even though it is not. It is as if the wait time is bypassed for paying the invoice and just set to "paid" status as default.
Very odd why this is the case. However, once the webhook variable value is blank, '' the invoice shows normally.
body = {
        "onchainwallet": ONCHAIN_WALLET,
        "lnbitswallet": LNBITS_WALLET,
        "description": desc,
        "webhook": webhook,
        "completelink": "",
        "completelinktext": "",
        "custom_css": "",
        "time": 1440,
        "amount": sats_amount,
        "extra": "{\"mempool_endpoint\": \"https://mempool.space\", \"network\": \"Mainnet\"}"
    }

When both onchain and lnbits wallet are enabled f

Is it possible that your Onchain address already has the expected amount therefore it is considered paid?
If you have both onchain and lnbits only one of them has to be paid in order to call the webhook.

I tested this with an empty onchain wallet with webhook
If there is only lnbits wallet, the webhook is not automatically called until the payment is made
If I add the onchain address, the QR page says its already paid.

I updated to LNbits version: 0.10.9, Commit version: docker
Satspay extension 0.2.3
Just tried it again with a new regular wallet and a regular admin wallet.
Regular wallet worked first try with a new OnChain Wallet entry.
Admin wallet, the existing on chain wallet kept triggering the checkmark before payment.
Had to reset the onchain wallet, by deleting the entry in OnChain Wallet Extension and then worked.
Unclear if was address related or something else in the On Chain Wallet Extension that was causing the skip and not displaying QR code on Sats Pay

Ah Just now discovered this -
I went and Rescanned all the wallets in the OnChain Wallet Extensions and that solved the checkmark problem!
Might be a good idea to make it clear somewhere on both the Tip Extension and SatsPay extension to have onchain wallet scanned to prevent issues like the QR code skip.

Can I close the issue?

yes. closing issue. Thanks @talvasconcelos


[BEAM-5959] Reorder methods according to convention

See https://github.com/apache/beam/pull/7266#discussion_r243230669

Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

It will help us expedite review of your Pull Request if you tag someone (e.g. @username) to look at it.
Post-Commit Tests Status (on master branch)

Lang
SDK
Apex
Dataflow
Flink
Gearpump
Samza
Spark

Go

---
---
---
---
---
---

Java

Python

---

---
---
---

R: @charlesccychen
CC: @lgajowy

Thanks, this LGTM.

Thanks


Remove secondary middleware caching

There were 2 caching mechanisms in play. One in this middleware and one in the ConfigurationManager dependency. This change removes the caching the middleware and delegates it the ConfigurationManager.

Exposes the cache provider's refresh time via options. This allows the middleware's metadata refresh time to be configurable. The default refresh time is 1 day.

See issue: #https://github.com/IdentityServer/IdentityServer3.AccessTokenValidation/issues/143

@andrew-laughlin,
Thanks for your contribution.
To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla2.dotnetfoundation.org.
It will cover your contributions to all .NET Foundation-managed open source projects.
Thanks,
.NET Foundation Pull Request Bot

Thanks Andrew -- a few asks: 1) Can you sign the CLA, please?, and 2) Can you rework the PR to only make the code changes, and not the dependency updates?
Thanks.

@andrew-laughlin, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request.
Thanks, .NET Foundation Pull Request Bot

@brockallen updates made, please take a look.

great, thanks!

nuget pushed

It looks like this change causes thread deadlocks/hangs under heavy load (many request running under ASP.NET) - why was the quick exit removed?


Enable version command when clickhouse server is unavaliable.

Enabled using version without ClickHouse server. Made BackupContext loading in lazily way.

@ianton-ru


maps: Handle GetValueAndDeleteBatch return code appropiately

Long story short, some libbpf APIs that don't return pointers, such as the
batch APIs might return -1 when there's a 'partial success'. In the case
of these APIs, with errno=-ENOENT, we know that we read and deleted less than
count entries, but it was still overall sucessful.
This PR fixes this for GetValueAndDeleteBatch only. We aren't addressing
all the other batch calls yet as we haven't used them
yet.
Kemal originally tacked this in https://github.com/aquasecurity/libbpfgo/pull/152, but unfortunately
not checking the return code and errno makes the interpretation of return values
bogus. I have traced the kernel code and we never returned EFAULT at least in this
libbpf call.
Test plan
$ make run-dynamic
make -C /home/vagrant/work/libbpfgo libbpfgo-dynamic
make[1]: Entering directory '/home/vagrant/work/libbpfgo'
CC=clang \
        CGO_CFLAGS= \
        CGO_LDFLAGS="-lelf -lz -lbpf" \
        go build .
make[1]: Leaving directory '/home/vagrant/work/libbpfgo'
CC=clang \
        CGO_CFLAGS= \
        CGO_LDFLAGS="-lelf -lz -lbpf" \
        go build -o ./main-dynamic ./main.go
sudo ./run.sh main-dynamic
[*] SUCCESS: all good

Thanks!
cc/ @Sylfrena @v-thakkar @kakkoyun

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

BTW this PR should fix https://github.com/aquasecurity/libbpfgo/issues/147

@grantseltzer I will probably tackle the DeleteKeyBatch API, will keep you updated! Created https://github.com/aquasecurity/libbpfgo/issues/162 to track it


Missing property in LSP completionItem/resolve request

Issue Type: Bug
When VSCode connects to the VS C++ language server and include completion is used, icons in the completion list change as the user uses the down arrow to change the selection.

The problem is that, when VSCode sends the LSP completionItem/resolve request, it doesn't fill in the kind property with the value that was originally returned on the CompletionItem by textDocument/completion. The C++ language server returns the CompletionItem without modifying that property, and VSCode then changes the icon because the resulting kind property doesn't match the original value.
This same issue as https://github.com/microsoft/vscode-languageserver-node/issues/438 , which was closed for unclear reasons.
 Do you know why it was closed?

@MrTrillian this should work on the latest next version of the library. It is here: https://github.com/Microsoft/vscode-languageserver-node/blob/master/client/src/codeConverter.ts#L467
Which version of the client libs are you using ?

@dbaeumer How would I know which version of the client libs I'm using? I only updated VSCode to the latest insider build before filing this issue. If it'll be fixed soon, I can verify my scenario afterwards

@MrTrillian every extension manages its own version of the client libs. VS Code itself doesn't ship with a LSP client to avoid version problems. Usually your extension's package.json has an entry like this:
	"dependencies": {
		"vscode-languageclient": "6.0.0-next.5"
	}

@dbaeumer I'm confused, what extension? I guess I'm using VSCode's Live Share extension version 1.0.1123 in VS code, and my LSP server is the Visual C++ one in Visual Studio. It's not clear how to find VSCode Live Share's package.json, I can't find that in my VSCode installation directory.

@MrTrillian now I see. I missed the Live Share setup. I am pretty sure LiveShare for VS Code pulls in the VS Code client libraries. Since Live Share is an extension is lives in our ${home}.vscode\extensions. In my installation their package.json has the following entry:
"vscode-languageclient": "^4.4.2",

which is a very old version. The latest is 5.3.1 and the newest next is 6.0.0-next.4. So the problem might go away if at least upgrading to the latest library version.

There is nothing VS Code or the LSP libraries can do about this. I will close the issue since it is something LiveShare has to handle correctly.


"Lungești" , "Carcadiești" , "Dumbrava" , "Fumureni" , "Gănțulei" , "Stănești-Lunca" are listed in the drop-down menu

The villages are listed in the drop-down menu alongside its corresponding county and city, according to the law
Preconditions : the  website is up and runing. After every step delete the text you typed from the search bar.

Step 1
Write in the search bar "Lungești"

Expected results
The location appears in the drop-down menu as "Sat Lungești, VÂLCEA (Lungești)"

Step 2
Write in the search bar "Carcadiești"

Expected results
The location appears in the drop-down menu as "Sat Carcadiești, VÂLCEA (Lungești)"

Step 3
Write in the search bar "Dumbrava"

Expected results
The location appears in the drop-down menu as "Sat Dumbrava, VÂLCEA (Lungești)"

Step 4
Write in the search bar "Fumureni"

Expected results
The location appears in the drop-down menu as "Sat Fumureni, VÂLCEA (Lungești)"

Step 6
Write in the search bar "Stănești-Lunca"

Expected results
The location appears in the drop-down menu as "Sat Stănești-Lunca, VÂLCEA (Lungești)"


Fixed Stored XSS

I found a small Stored XSS bug in the Webgui so I decided to fix it.
Triggering the bug:

navigate to: https://[pfSense_IP_address]/system_authservers.php
add a new server with Descriptive name =
Save the new server
Navigate to the settings tab
you should see an alertbox with the following message "I am a bug"

-Sivathmican Sivakumaran

Thanks for the submission!
Using this as a starting point I found and fixed some nearby similar issues in related pages on the RELENG_2_2 branch. Only one had an issue on the bootstrap branch but it wasn't this one specifically. The bootstrap branch will be merged back into master so the specific change in this pull request won't be needed.

Excellent! Thank you!


[BUG] names of multiple outputs vs package name

https://github.com/conda-forge/matplotlib-feedstock/blob/main/recipe/meta.yaml
package:
    name: matplotlib-suite

outputs:
    name: matplotlib-base  # has files

    name: matplotlib  # has no files

However when I try this myself for another package, none of the outputs have files
https://github.com/conda-forge/pypushflow-feedstock/blob/main/recipe/meta.yaml
package:
    name: pypushflow-meta

outputs:
    name: pypushflow  # has no files

    name: pypushflow-mx  # has no files

I traced through the conda build code and found this:
https://github.com/conda/conda-build/blob/432a9e1b41a3dec8f95a7556632f9a93fdf029fd/conda_build/build.py#L2274
So it seems that to have files bundled with an output, the output name must be equal to the package name.
In that case I don't understand how matplotlib.
In any case, grayskull should probably produce this
package:
    name: mypackage

outputs:
    name: mypackage  # has files

    name: mypackage-extra  # has no files

https://github.com/conda-forge/matplotlib-feedstock/blob/2ca6433797f0a4f77fee890c6fa39617a6a6b0b4/recipe/meta.yaml#L20

so as you are trying to have multiple outputs with different run requirements. You will need to add the main package name to the outputs run requirements, so it will fetch and install that package plus the other dependencies that you need

you need to specify in the recipe how to build the package, as it was like another recipe,

You mean you need to specify in the output how to build the package, as it was like another recipe?

you need to specify in the recipe how to build the package, as it was like another recipe,

You mean you need to specify in the output how to build the package, as it was like another recipe?

yup, pretty much it, because an output will be basically another package. So, you need to instruct conda build how to create that other package

So is this the case?
package:
    name: mypackage

outputs:
    name: mypackage  # this inherits top-level sections like build and test

    name: mypackage-extra  # this does not inherit anything

yeah! that will work, but you might need to add in run requirements for mypackage-extra the mypackage, so mypackage-extra will install mypackage and you can add just the extras deps in run requirements. I am not sure if I was clear enough, but please let me know if you have any questions


chore: making all use of Field(default=None) consistent for Optional …

…fields

This way I don't have to be confused when I look at older files for examples!

Thanks for doing this - I thought it had been done earlier, but obviously it missed some places.


JS/TS server crashed 5 times

Type: Bug
I have a custom git alias - codeall = "!f() { git status | grep both.[amd] | cut -d":" -f2 | xargs code ; }; f" - that i ran from a PowerShell prompt. After some time - perhaps 10s? - VS Code finally opened, and I saw a dialog reporting that the JS/TS server had crashed 5 times and would not be restarted.
 It looks like you may be using an old version of VS Code, the latest stable release is 1.90.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

Does it happen if you run VS Code without that script?

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!

I don't know, to be honest. This is the primary way that I open files in VS Code.


[network_info_plus] ios: handle deprecation of CNCopyCurrentNetworkInfo

Description
This PR migrates network info to modern NEHotspotNetwork APIs while keeping backward compatibility with older iOS versions. The code looks a little bit overkill for a couple of simple conditions though.
Related Issues
#240
Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[ ] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
[ ] All existing and new tests are passing.
[ ] I updated/added relevant documentation (doc comments with ///).
[x] The analyzer (flutter analyze) does not report any problems on my PR.
[x] I read and followed the Flutter Style Guide.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
[x] No, this is not a breaking change.

LGTM. It's definitely separating out the deprecated and current implementations cleanly.

@mhadaily Can we please get a review and approval? Thanks in advance.

I'll do @diegotori just give me a bit of time

can you please merge with main
Update the changelog file and pump a minor version, please?
thanks