stageling-discover incorrectly renders values

Running stagelinq-discover, the output indicates that it's using the wrong format string placeholder for values. The output looks like this:
2024/01/24 19:17:42 	/Engine/Deck3/Track/TrackName = map[string: type:%!s(float64=8)]
2024/01/24 19:17:42 	/Engine/Deck4/Play = map[state:%!s(bool=false) type:%!s(float64=1)]
2024/01/24 19:17:42 	/Engine/Deck4/PlayState = map[state:%!s(bool=false) type:%!s(float64=1)]
2024/01/24 19:17:42 	/Engine/Deck4/Track/ArtistName = map[string: type:%!s(float64=8)]
2024/01/24 19:17:42 	/Engine/Deck4/Track/TrackNetworkPath = map[string: type:%!s(float64=8)]
2024/01/24 19:17:42 	/Engine/Deck4/Track/SongLoaded = map[state:%!s(bool=false) type:%!s(float64=1)]
2024/01/24 19:17:42 	/Engine/Deck4/Track/SongName = map[string: type:%!s(float64=8)]
2024/01/24 19:17:42 	/Engine/Deck4/Track/TrackData = map[state:%!s(bool=false) type:%!s(float64=3)]
2024/01/24 19:17:42 	/Engine/Deck4/Track/TrackName = map[string: type:%!s(float64=8)]

I think it should look like this:
2024/01/24 19:20:24 	/Engine/Deck3/Track/TrackData = map[state:false type:3]
2024/01/24 19:20:24 	/Engine/Deck3/Track/TrackName = map[string: type:8]
2024/01/24 19:20:24 	/Engine/Deck4/Play = map[state:false type:1]
2024/01/24 19:20:24 	/Engine/Deck4/PlayState = map[state:false type:1]
2024/01/24 19:20:24 	/Engine/Deck4/Track/ArtistName = map[string: type:8]
2024/01/24 19:20:24 	/Engine/Deck4/Track/TrackNetworkPath = map[string: type:8]
2024/01/24 19:20:24 	/Engine/Deck4/Track/SongLoaded = map[state:false type:1]
2024/01/24 19:20:24 	/Engine/Deck4/Track/SongName = map[string: type:8]
2024/01/24 19:20:24 	/Engine/Deck4/Track/TrackData = map[state:false type:3]
2024/01/24 19:20:24 	/Engine/Deck4/Track/TrackName = map[string: type:8]

The log.Printf call is using %s for the map[string]interface{} when it should be using %v. PR forthcoming.

I think the usage of %s was accidentally committed from experimental code. You can see on the screenshot in the README that it was supposed to output the JSON-formatted version of the value as that's closer to its raw representation.
I've merged your PR for this considering I've lost pretty much all work that was in progress during an accidental wipe of my Documents folder on my main PC, and that's the quickest way to get readable output again.


Error: There is no document formatter for 'terraform'-files installed.

Getting There is no document formatter for 'terraform'-files installed. when trying to format on a new installation of VSCode 1.25.1, vscode-terraform 1.3.4, and terraform 0.11.7
Just in case I turned on formatting and manually set the path to terraform in settings.json:
"terraform.format": {
    "enable": true,
    "ignoreExtensionsOnSave": [".tfsmurf"]
  },
  "terraform.path": "/usr/local/bin/terraform"

This was apparently an issue from mid-2017, but it was fixed back then.

Tried uninstalling and reinstalling with various combinations of restarting VSCode and finally got it working. Not sure what the original glitch was, but it was environmental in some way so I'm closing this.

In case anyone else runs up against this issue, here is what ended up working:

Open VS Code
Uninstall extension from Extensions pane
Quit and relaunch VS Code
Reinstall extension

Not very fancy, but hey... 😄


fix: reference documentation is missing + bump to v0.24.1

There was a missing newline in the reference.rst.template file
which caused the toc not to include the module docs.

Pull Request Checklist

[ ] Testing

Unit test added
CLI change?: coordinate update of integration tests with team
cdk-init template change?: coordinated update of integration tests with team

[ ] Docs

jsdocs: All public APIs documented
README: README and/or documentation topic updated

[ ] Title and Description

Change type: title prefixed with fix, feat will appear in changelog
Title: use lower-case and doesn't end with a period
Breaking?: last paragraph: "BREAKING CHANGE: <describe what changed + link for details>"
Issues: Indicate issues fixed via: "Fixes #xxx" or "Closes #xxx"

[ ] Sensitive Modules (requires 2 PR approvers)

IAM Policy Document (in @aws-cdk/aws-iam)
EC2 Security Groups and ACLs (in @aws-cdk/aws-ec2)
Grant APIs (only if not based on official documentation with a reference)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.

Don't see the version bump in here btw.

So don't merge just yet :)

Yes, I am waiting for it to build. No wowries.


Seem to have left off a hyphen.

Current coverage is 81.22% (diff: 100%)

No coverage report found for master at f785cb5.

Powered by Codecov. Last update f785cb5...4c90fb0


The cache is invalid or not created

Hi guys, I got the cache ... used it well, but after upgrading my computer's OS, I started getting this error. I know I have the cache in the same place, same permissions (everyone can read+write), and yet I get this error when invoking the get_metadata method. Any hints?
"The cache is invalid or not created"
I'd like to avoid having to recreate the cache, as it may take hours on end to download.
Thanks!

Thanks for reaching out. I haven't experienced this issue before. Could you provide some more details on your OS version before/after the update, your Python version, which metadata store you're using (Fuseki, SleeypyCat or SQLite), etc.? Thanks in advance!

Resolving since there was no activity on this issue in a while. Please feel free to re-open with the additional information requested above if you still require assistance.

hi @c-w , I experience the same issue. But instead of updating the system, I tried to do something with all books in english, i.e. book_ids = get_etexts('language', target_language). After that, the cache becomes invalid and I have to re-download it for hours.

Hi I just encountered something similar.  I was running my code a couple of times and this error popped up
...
MemoryError: (12, 'Cannot allocate memory -- Lock table is out of available locker entries')

During handling of the above exception, another exception occurred:
...
    raise InvalidCacheException('The cache is invalid or not created')
gutenberg._domain_model.exceptions.InvalidCacheException: The cache is invalid or not created

Searching for the memory error I found this resource: major.io
I'm going to see if this sorts out the issue and get back to you
Relavent info for my situation:
only using: gutenberg.query.api.git_metadata() and I'm using it to get the author and titles only
I'm running

macOS: 10.15.5
python: 3.7.7

Unfortunately I don't know too much about what I'm doing. I realize now  the reference I listed just rebuilds the data base : ( .  but it looks like they identified an issue with stopping the process with keyboard interrupts. Which definitely could be the reason I ran into this error.  I have canceled a few scripts mid process and it happened just after making a few tweaks and restarting : (.  Not sure if you can help, but I'd appreciate any advice/perspective : )


FW-374. Fix.

This pull request contains the implementation of sixtop maintenance process and a simple monitoring process according sixtop sublayer draft. Additionally, a sixtop handler is used for identify the entity who call the sixtop reservation protocol. A new subId (new IE)is  used for informing neighbor about the entity of current sixtop handler.

@changtengfei,
What kind of testing did you do on this code?

I run this code in simulation with three nodes, which topology is linear.
mote 1 is set to dagroot, mote 2 is mote 1's child, mote 3 is mote 2's child.
using ietf90client to trigger OTF on mote 3, so there will be track through mote 3 to mote 1.
the packets can be sent through txrx cell and reserved soft cell. (tx or rx), current pdr on each link is100%
Go to topology page, I changed the pdr on the link from mote 3 to mote2 to 0.5
after a while, the pdr(numTxAck/numTx) on the cell from mote 3 to mote 2 is lower than a threshold I set. a monitoring process will detect that and call maintenance process to reallocate the cell.
the cell between mote 3 to mote 2 has been changed to another one. (a new cell is reserved after remove the old one)
the cell between mote 2 to mote 1 is not changed.

Notice that, if you want to test the code, you should change the NUMSLOTSOFF (in schedule.h) to any value larger than one since the mote 2 at least require two cells, one for Tx parent and one for Rx from child. Or simulation will crash

@changtengfei , thanks!


504 Gateway Timeout Using Local Tunnel with Google Colab

Hello there. I am currently trying to run a streamlit app using local tunnel in my Google Colab notebook, and I ensured that I got the correct external port using !curl ipv4.icanhazip.com. I put it into the url that comes up when I run localhost with the port 8501, and it loads for a long time and then gives me a 504 gateway timeout error page. Is localhost currently down or did I go about this the wrong way? Thank you!

I'm also only getting 504 errors


PP-13064 Allow toggling corporate exemptions in Worldpay accounts

With recent work[1], we have introduced the ability to toggle corporate exemptions for Worldpay accounts in Connector via REST patch requests.
With this change, we are now introducing a new entry in the Worldpay account configuration, showing whether corporate exemptions are enabled or disabled, and including a link with the text 'Manage'.
Clicking on 'Manage', the user is then shown a page explaining how Worldpay 3DS Corporate Exemptions work, with radio buttons at the bottom of the page where the user can decide to 'Turn on or off Corporate Exemptions' and then 'Save' the change.
Further information and screenshots in Jira[2] and in this PR[3].
[1]
https://github.com/alphagov/pay-connector/pull/5513
[2]
https://payments-platform.atlassian.net/browse/PP-13064
[3]
https://github.com/alphagov/pay-toolbox/pull/1839
Scenario 1  (New configuration entry)

Corresponding setting in the DB

If Worldpay 3DS is not set, there is an error message

Scenario 2 (Corporate exemptions are enabled)

Scenario 3 (New setting page)

Scenario 4 (Turn on the setting)

Scenario 5 (Turn off the setting)

Scenario 6 (Patch request to turn exemptions on)

Scenario 7 (Patch request to turn exemptions off)

Scenario 8 (successfully enabling Worldpay corporate exemptions shows a success message)

Scenario 9 (successfully disabling Worldpay corporate exemptions shows a success message)

Scenario 10 (error when enabling or disabling Worldpay corporate exemptions shows an error message)

As Marco is on holiday, best to just get this merged.
The content comment is a minor thing and can be ignored for now.


NodeJS - Cookie Jar Support

axios running on NodeJS does not provide Cookie jar support natively. Ideally the library would either provide built in cookie jar functionality or easily accommodate existing cookie jar libraries.
The Request API could be modified to support the following options:
{
...
  // `jar` is a boolean that controls cookie jar support for the request
  jar: true, // default
...
}

or
{
...
  // `jar` is a cookie jar that will be used for the request
  jar: cookieJar, // default
...
}

where
var tough = require('tough-cookie');
var cookiejar = new tough.CookieJar();

Note:
Trivial cookie support using tough-cookie can be added by leveraging interceptors:
var tough = require('tough-cookie');
var Cookie = tough.Cookie;
var cookiejar = new tough.CookieJar();

axios.interceptors.request.use(function (config) {
  cookiejar.getCookies(config.url, function(err, cookies) {
    config.headers.cookie = cookies.join('; ');
  });
  return config;
});

axios.interceptors.response.use(function (response) {
  if (response.headers['set-cookie'] instanceof Array) {
    cookies = response.headers['set-cookie'].forEach(function (c) {
      cookiejar.setCookie(Cookie.parse(c), response.config.url, function(err, cookie){});
    });
  }
  return response;
});

@nicholasrobinson you say that using interceptors provides "trivial cookie support". What is missing for full support?

I would imagine that "full" cookie jar support would:

respect cookie deletion headers in server response
respect cookie expiration
maybe more..?

As for cases where you wouldn't want cookie support:

Unit testing of http endpoints?
Deliberately ignoring cookie headers?

IMO there should be a flag to disable cookie jar support. More generally speaking though it is useful to be able to emulate browser functionality in automated testing scenarios.

In Node, you may also wish to use different cookie jars depending on which sites you are accessing.  A default cookie jar could be defined, but an alternate used on specific requests.  Just leverage the existing merging of options that Axios already provides.

I was recently trying to do just that (add trivial cookie support) and I've used the code sample posted by @nicholasrobinson. Unfortunately I couldn't make it work like that.
It seems that axios.interceptors.request is triggered between the request being made and then callback being executed. So it doesn't inject the cookie in the request.
I made it work by manually capturing the cookie on the first server response and then manually injecting the cookie into the following requests (which is ugly) like this
function getCookie(response) {
    return response.headers['set-cookie'];
}

function makeRequestWithGivenCookie(cookie) {
    return axios.get('/',{headers: {"Cookie": cookie}});
}

Am I missing something here? BTW axios is great! Cookie support would really be an awesome feature.

Please, take a look at https://github.com/mzabriskie/axios/issues/206#issuecomment-233758315
@damoclark, you could do that easily with the kind of plugin that I described in the other thread and use different axios instances for those specific requests.

would definitely like to see cookies/persistent sessions support in axios. A third party module is a great addition but there's no guarantee on it's maintainability in the future.

would definitely like to see cookies/persistent sessions support in axios. A third party module is a great addition but there's no guarantee on it's maintainability in the future.

@lirantal we're rather short maintaining the functionality Axios has at the moment so adding things that can be implemented in plugins won't help that.
I'm closing this issue as it won't be implemented in core and there's a library that implements this in ECOSYSTEM.md

@andreportela
I'm writed simple example for works with cookie/session in node.js
https://gist.github.com/nzvtrk/ebf494441e36200312faf82ce89de9f2

Hi @nzvtrk I didn't have the time to take a look at it. But thanks for sharing! 😃 It may be useful to a lot of people that end up here.
It has been a long time since I moved on. But it seems that this feature is already implemented on a lib. Maybe I would rather just use it. 🤷♂


Cannot increase size of PDF page

I cannot incrase size using setSize method.
firstPage.setSize(width+200, height+100)
It works well when I'm shrinking image.
What could be the reason?
Im using this example to test: https://jsfiddle.net/j5L38u1h/8/

Looks like this is probably a bug. I'll dig into this further when I get a chance.

I was testing this bug using version v1.17.1 and it seems be have been fixed.
Below are the steps I took:

Copied the HTML and CSS files to my local machine
Cloned the pdf-lib repo
Build the pdf-lib using npm run build
Edited the HTML file to reference the local build

I believe you can just update the jsfiddle to use<EMAIL_ADDRESS>instead of<EMAIL_ADDRESS>


Kernel upgrade on Ubuntu 14.04 + aufs drops back to devicemapper

If you utilize the curlable install script install.sh on Ubuntu 14.04 to install docker, it adds the linux-image-extra-$(uname -r) package for aufs support.  If a newer kernel package is available, installed, and then the system is rebooted, docker will fall back to devicemapper because we install linux-image-extra-$(uname -r) and not linux-image-extra-virtual.
Substituting linux-image-extra-virtual for linux-image-extra-$(uname -r) works fine but as a bit of a side effect, installing linux-image-extra-virtual will also cause a system to update to the latest available kernel package.  I am not sure if that would be a desirable result at all as it leaves the system in a state of the current kernel still not having aufs support until the system is rebooted.  Updating line 128 of install.sh to kern_extras="linux-image-extra-virtual linux-image-extra-$(uname -r)" installs the linux-image-extra-$(uname -r) package for the current kernel and also installs it through the virtual package for the newer kernel that will be active after a reboot.
I did not include a PR to change this behavior as I wanted to fully understand what should be the expected result.  As it stands now, the current behavior of dropping from aufs to devicemapper upon kernel upgrade doesn't feel proper since you essentially lose anything that was running on the system previously.  Being able to keep the linux-image-extra- package up to update with the kernel via apt-get dist-upgrade seems like it would be the expected behavior.

If you have the changes ready, creating a PR might work, sometimes people here find it easier to see actual code and discuss that.
Just speaking for myself, though 😊


added detect-movement example project

link from my github source  https://github.com/edihasaj/detect-moevement-lorawan

it is tested and it is working. Maybe you can contribute by adding an image in the readme section.

Hey @edihasaj, thanks for contributing! There are a few things that would need to be addressed first before merging this. I'll comment them in the code but it boils down to:
There's no need to use the delay() function - in its current state, the example can take up to 200 seconds to react and send data after an event has happened. Instead, by adding an interrupt (or simply reading the PIR pin every second), you could make it send data only if an event happens. This would save battery life, improve response and send less payloads if there's no movement.


[pt] Add pt/content/docs/getting-started

Add a localization to the getting-started docs
Issue: #4922

/cc @edsoncelio @EzzioMoreira

/fix:all

LGTM ✅

LGTM ✅

Will take this as an approval from the docs-pt-approvers since that group still does not exist

/fix:all


Overwrite flag to GCSFileSystem.get method

This comes in handy for me when working with large files and wanting to only copy them once to set an environment

Any change here? I will close as stale if not.


Not available in bower

Since few days now, ionic-service-analytics is not available through bower.
Here is the result of the "ionic add ionic-service-analytics" command

Hey Thomas, I just pushed up a new version. Could I get you to run ionic add ionic-service-analytics again and tell me if you get the same error? Thanks.

Hi !
Just throw the command and boom !

Thanks :) fixed


Isolate CEF only functionality in a standalone go module

It would be useful if you could isolate the CEF module that has bindings to the cef, so it can be used standalone.
Currently every other implementation in Go is out of date and abandoned.
Thank you for your efforts.

Hello, I don't understand what you mean.
Are you saying that only CEF is encapsulated in Go?
If that's the case, it's contrary to my original intention.
The bottom layer of Energy is developed based on the LCL component library, which includes the CEF component, as well as other webview2, webkit, etc.
Moreover, Energy will support LCL, CEF, webview2, and webkit in the next version, providing a wider range of options.

It is worth noting that LCL is a very powerful cross platform native UI component library.
If you want to use only CEF instead of other components, it won't affect your usage either. The dynamic library may be slightly larger, and the execution files for Go slightly larger.


May I share a menu component for everyone,thanks!

Thanks

Thanks i will fix it in a moment!

I put mine at the end of the list,Thanks


Use stable/sane ConditionSet sort order

I don't believe this is mentioned anywhere in the spec, but it is an important detail: the sort order of conditionsets in the FeatureVariations table has meaningful impact on whether a variation is applied, since we apply the first set of variations that is encountered.
This uses a different sorting strategy than fonttools; fonttools appears to sort the conditionsets in the order that they are first referenced, whereas I am ordering them in the order that they are declared.
I prefer my approach because it is more explicit, and since all conditionsets (except for the NULL conditionset) need to be explicitly defined, it makes sense that they are defined in the order they should be applied. This is particularly true because the order of conditionsets applies to all features, and having the ordering be determined by the first appearance in any feature feels error prone.
Also it looks like fonttools does not handle the 'NULL' conditionset. I think this is good; although mentioned in the spec the NULL conditionset is weird in that it is never declared, and so can't participate in my ordering. I think that the spec should be updated and support for an explicit NULL should be removed, and the user is free to declare an empty conditionset as desired, which can then participate in the sort order.
In any case, the further I dig into this work the more it becomes clear that it really is not heavily used, and maybe needs to be rethought completely, so I don't want to waste too too much time on it.

This uses a different sorting strategy than fonttools

Is this going to be a problem wrt making fontc match fontmake? - it would be helpful to not diverge without good reason and if we have good reason we should typically update fontmake to match.

My thinking is basically: as far as I can tell, none of this stuff is used in any real font, so I don't expect it to matter in practice? I will definitely bring this up in a discussion of the spec, and if we decide that the fonttools behaviour is desirable than we can write that down somewhere and make sure we match.
(full disclosure: I implemented this, and then went and tested fonttools and noticed the discrepancy. It obviously would've been better to check with fonttools first. Right now though, I want to move on to working on variable value records, since those seem to be much more actively useful/used)

I have mild concern that it would be far easier to resolve now with the change clearly in front of us than later with a huge diff where we're mystified why nothing matches.

okay sure, I'll investigate more tomorrow.


Make it clear that the examples are for OpenLayers 2

This adds " 2" to "OpenLayers" in the example index title and heading.

Trivial non-code change, so merging.


Type definition of a Generic type is shared even if the TypeVar is different

Using a generic to dynamically create two types reuses the type_definition of the first created type instead of creating a new one
returned_type here is returning the type of the first generic class, instead of the correct one
https://github.com/strawberry-graphql/strawberry/blob/master/strawberry/union.py#L72
(Pdb++) returned_type
<GraphQLObjectType 'LoginErrorsValidationError'>
I will try to write some code to replicate it

I am not able to replicate it anymore: https://glitch.com/edit/#!/deciduous-intriguing-accelerator?path=app.py%3A14%3A17
I am pretty sure the code is the same as when we first found out about the issue, but now it seems to be working correctly


I would like to join your team and contribute with my many years of experience and skills.

Hi, I'm Ethan Tan, a seasoned web full-stack and blockchain developer with over 8 years of experience in the industry. I specialize in building robust, scalable web applications and innovative blockchain solutions. Leveraging my expertise in frameworks like React.js, Vue.js, and Next.js, along with my proficiency in Solidity for smart contract development, I deliver high-quality, secure, and efficient solutions tailored to meet your specific needs.

Hey John ! Defo looking foward for your help. I just need to read a bit on the security and project contribitors structure and will give you the permissions to collaborate.
Just give me few days and will grant you that.
Thanks a million for your interest.

Ops mistake here.
John I'm happy to add you to the project. I'm looking forward for any help. I will just ask you few days as I need to add some security and structure the roles and the basic pipelines before adding more contributor. Just give me few days.

okay
I will wait

Could not work on the pipelines yet but gave you write permissions on the repository.

What tasks do you need me to help you with?

Look I'm not an expert in solidity  so is very likely that i dont followed good pratices. Could you give a look at the smart contracts and see if there's any bad pratice there?  I have cleanup a bit and update the packages.json but would be good to have your eyes on it.
Also if you want to improve the test scenarios to get any error of logic that I could have done while writing it would be amazing.
I'm working on getting an small SDK to deploy the contracts and soon will publish yo have your feedback.  Thank you!

I want to help you
-Contact Info
skype: https://join.skype.com/invite/FVUI6gLcYgAE
telegram: https://t.me/ethantan1116
slack: https://join.slack.com/t/ksc-xme4972/shared_invite/zt-2ld45idp2-G9HkxP_wX4ctwQshyPM7Ig
discord: https://discord.gg/VxnfdY4bS4

Tried to find you on discord but it directs to channels and not a specific user.  When you have some time can reach me on ltrarbach, I appreciate your offer for contribuite.

okay
Do you have telegram?


[v-clicks] depth parameter

Is your feature request related to a problem? Please describe.
When using the <VClicks> component or the corresponding directive with nested lists (see example for one below), then only the top-level elements will be "keyed" for clicks.

Example list

Entry 1
Entry 2

Entry 2a
Entry 2b

Entry 2bA

Entry 3

It'd lead to three clicks and the reveal order would be Entry 1, Entry 2 and all sublists, Entry 3.
There is no way to "key" sublists individually or make them open one-by-one as well.
Describe the solution you'd like
Instead of adding the directive manually there, a depth attribute for the component (or value/attribute for the directive) would be desirable IMO. The value would be 1 by default to keep the current behavior.

depth=2 would have the following order: Entry 1, Entry 2, Entry 2a, Entry2b with sublist (Entry 2bA), Entry 3
depth=3 would have the following order: Entry 1, Entry 2, Entry 2a, Entry2b, Entry 2bA, Entry 3

Describe alternatives you've considered
A suitable option would be applying v-click manually (what I tend to do at the moment). This is fine but a depth param would add more convenience 😋
Another alternative to the depth parameter would be adding v-click to each subitem (of lists). But this is less configurable and also changes the standard behavior

Not stale ☺

Strongly second this!

Would this be a duplicate of #362?

Yes and no. Definitely related but not strictly a duplicate I'd say

not stale 👀

Noo stale bot. Why 🙈

@manniL it works in v0.40.5! Thanks @tonai I needed this today and saw it just released.

Indeed, resolved by https://github.com/slidevjs/slidev/pull/893 👏🏻


Images don't work in the README

Hello @FreddyFernando ! Could you please describe conditions which this error was seen? It's works correctly for us.
Thank you!


.net Standard Support

If I run the Microsoft Portability Analyzer (https://docs.microsoft.com/en-us/dotnet/standard/analyzers/portability-analyzer) over liblog I get a number of blocking warnings around various .net api's that are not compatible with the .net Standard.

System.Diagnostics.StackTrace : Currently there is no workaround, but we are working on it. Please   check back
System.Diagnostics.StackFrame: Consider removing   dependency on this API.

Is there any plans to address this limitation with the current codebase?

Fixed in #149


Validate Data Packages

Currently, we support validating a data source (i.e: a CSV file).
The pipeline constructor takes a data package spec, but does not use it/know what to do with it.
Need to spec out how to work with Data Packages in a validation pipeline.

Now duplicates https://github.com/frictionlessdata/goodtables/issues/66


Commits avatar when email set to private, and misc.

Gitea version (or commit ref): 1.0.0+373-gd76d67d
Git version: 2.7.4
Operating system: Ubuntu 16.04
Database (use [x]):

[ ] PostgreSQL
[ ] MySQL
[x] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[x] No
[ ] Not relevant

Log gist:

Description
If I commit, while having the email setting to keep it private, avatar will not show on commits (see https://gits.quark.business/David/collantes.us/commits/master). The one showing avatar is last commit, after unticking Keep email address private.
Also note the tick box on search, near All, it seems to be needing some padding.
Screenshots

I think I figured out the avatar problem.
On app.ini, under [service] there is the NO_REPLY_ADDRESS setting. It is not an address what should be entered, but a not reply domain. I had<EMAIL_ADDRESS>and that was causing my address to become david<EMAIL_ADDRESS>(saw this on the logs) which is terribly wrong. Changing NO_REPLY_ADDRESS to not-a-valid-email.quark.business fixed the problem.
The little UI glitch (tick box and All too close) remains.

@lunny bottom line, the setting NO_REPLY_ADDRESS has a misleading name. It is used to create the private address, but it isn't an email address what the value should be, but an invented TLD.

Yes. I see. It's a misleading name.

@lunny should I split this issue? The second part did not relate to the first, I should not have piggy bagged two completely different things into one. Let me know.

OK. Feel free to do that.

Isn't this a bug? When Keep email address private is checked, commits done via UI (file edits directly on Gitea and merging pull-requests) do not link to the user's profile. Doesn't Gitea know who the user is who committed or pushed the commit? It properly links to the user profile when the commits are directly pushed from local to Gitea.

@Mohammed90 users are linked only through e-mail addresses.


Add dedicated return type

Professor @kelloggm, this is my new codes for Specimin. Apart from having dedicated return type for each unsolved method, this new codes also have a new approach to analyze MethodCallExpr instances. We won't rely on the messages of the UnsolvedSymbolException anymore. (we still rely on UnsolvedSymbolException, we just don't rely on the message content of the exception)
This new approach is similar to induction. For a method call such as this one: Object.method1().method2()....methodN(), methodN() will only be analyzed and has synthetic file created if all the synthetic files related to methodN-1() are ready and compilable. Thus, when we actually analyze methodN(), it is easy to know which synthetic class it belongs to. So for the example above, in the first run, UnsolvedSymbolVisitor will create the synthetic file for Object if needed. Then in the second run, UnsolvedSymbolVisitor will create the synthetic file for method1(), and so on.
The number of times that UnsolvedSymbolVisitor will loop is equal to the number of elements in the longest method call in the input. I think this approach will run fast enough for developers to feel comfortable when using Specimin. In the future, we can improve the performance by combining this visitor with TargetMethodFinderVisitor. Also, for each run,  UnsolvedSymbolVisitor will delete all the old synthetic files and re-write everything all over again. We can improve the performance by having UnsolvedSymbolVisitor only delete and re-write synthetic files that are actually updated during that run.
Please take a look and let me know your opinion. Thank you

This new approach is similar to induction

This is a good approach - nice work.

The number of times that UnsolvedSymbolVisitor will loop is equal to the number of elements in the longest method call in the input. I think this approach will run fast enough for developers to feel comfortable when using Specimin

I agree that this is reasonable complexity.

In the future, we can improve the performance

When this PR is merged, you should open issues for each of these proposed optimizations.

Professor @kelloggm, I have updated the codes based on your comments and also add the codes to use Javac to check and fix the return type of synthetic methods if needed. Please take a look. Thank you.


Update test workflow configuration and commands @coderabbitai

Relates to #1
This pull request includes several updates to the GitHub Actions workflow for testing and coverage in the .github/workflows/test.yml file. The changes focus on renaming jobs, improving caching, and enhancing the setup and execution of tests.

        If the exit code was non-zero it raises a CalledProcessError.  The
        CalledProcessError object will have the return code in the returncode
        attribute and output in the output attribute.

        The arguments are the same as for the Popen constructor.  Example:

        >>> check_output(["ls", "-l", "/dev/null"])
        b'crw-rw-rw- 1 root root 1, 3 Oct 18  200[7](https://github.com/GabLeRoux/time-sync-tools/actions/runs/11601542559/job/32304535311#step:8:7) /dev/null\n'

        The stdout argument is not allowed as it is used internally.
        To capture standard error in the result, use stderr=STDOUT.

        >>> check_output(["/bin/sh", "-c",
        ...               "ls -l non_existent_file ; exit 0"],
        ...              stderr=STDOUT)
        b'ls: non_existent_file: No such file or directory\n'

        There is an additional optional argument, "input", allowing you to
        pass a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it too will be used internally.  Example:

        >>> check_output(["sed", "-e", "s/foo/bar/"],
        ...              input=b"when in the course of fooman events\n")
        b'when in the course of barman events\n'

        By default, all communication is in bytes, and therefore any "input"
        should be bytes, and the return value will be bytes.  If in text mode,
        any "input" should be a string, and the return value will be a string
        decoded according to locale encoding, or by "encoding" if set. Text mode
        is triggered by setting any of text, encoding, errors or universal_newlines.
        """
        for kw in ('stdout', 'check'):
            if kw in kwargs:
                raise ValueError(f'{kw} argument not allowed, it will be overridden.')

        if 'input' in kwargs and kwargs['input'] is None:
            # Explicitly passing input=None was previously equivalent to passing an
            # empty string.

        The returned instance will have attributes args, returncode, stdout and
        stderr. By default, stdout and stderr are not captured, and those attributes
        will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
        or pass capture_output=True to capture both.

        If check is True and the exit code was non-zero, it raises a
        CalledProcessError. The CalledProcessError object will have the return code
        in the returncode attribute, and output & stderr attributes if those streams
        were captured.

        If timeout is given, and the process takes too long, a TimeoutExpired
        exception will be raised.

        There is an optional argument "input", allowing you to
        pass bytes or a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it will be used internally.

        By default, all communication is in bytes, and therefore any "input" should
        be bytes, and the stdout and stderr will be bytes. If in text mode, any
        "input" should be a string, and stdout and stderr will be strings decoded
        according to locale encoding, or by "encoding" if set. Text mode is
        triggered by setting any of text, encoding, errors or universal_newlines.

        The other arguments are the same as for the Popen constructor.
        """
        if input is not None:
            if kwargs.get('stdin') is not None:
                raise ValueError('stdin and input arguments may not both be used.')
            kwargs['stdin'] = PIPE

        if capture_output:
            if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
                raise ValueError('stdout and stderr arguments may not be used '
                                 'with capture_output.')
            kwargs['stdout'] = PIPE
            kwargs['stderr'] = PIPE

        with Popen(*popenargs, **kwargs) as process:
            try:
                stdout, stderr = process.communicate(input, timeout=timeout)
            except TimeoutExpired as exc:
                process.kill()
                if _mswindows:
                    # Windows accumulates the output in a single blocking
                    # read() call run on child threads, with the timeout
                    # being done in a join() on those threads.  communicate()
                    # _after_ kill() is required to collect that and add it
                    # to the exception.
                    exc.stdout, exc.stderr = process.communicate()
                else:
                    # POSIX _communicate already populated the output so
                    # far into the TimeoutExpired exception.
                    process.wait()
                raise
            except:  # Including KeyboardInterrupt, communicate handled that.
                process.kill()
                # We don't call process.wait() as .__exit__ does that for us.
                raise
            retcode = process.poll()
            if check and retcode:
>               raise CalledProcessError(retcode, process.args,
                                         output=stdout, stderr=stderr)
E               subprocess.CalledProcessError: Command '['python', '-m', 'src.main', 'toggl']' returned non-zero exit status 1.

/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/subprocess.py:571: CalledProcessError

During handling of the above exception, another exception occurred:

command = ['python', '-m', 'src.main', 'toggl']
expected_output = 'Toggl functions available'

    @pytest.mark.parametrize(
        "command, expected_output",
        [
            (
                ["python", "-m", "src.main", "toggl"],
                "Toggl functions available",
            ),  # Add expected output or part of it
            (
                ["python", "-m", "src.main", "wrike"],
                "Wrike functions available",
            ),  # Add expected output or part of it
            (
                ["python", "-m", "src.main", "openai"],
                "OpenAI functions available",
            ),  # Add expected output or part of it
        ],
    )
    def test_fire_cli(command, expected_output):
        try:
            output = subprocess.check_output(command, text=True)
            assert expected_output in output
        except subprocess.CalledProcessError as e:
>           pytest.fail(f"Command '{' '.join(command)}' failed with error: {str(e)}")
E           Failed: Command 'python -m src.main toggl' failed with error: Command '['python', '-m', 'src.main', 'toggl']' returned non-zero exit status 1.

tests/test_main.py:2[8](https://github.com/GabLeRoux/time-sync-tools/actions/runs/11601542559/job/32304535311#step:8:8): Failed
----------------------------- Captured stderr call -----------------------------
/opt/hostedtoolcache/Python/3.11.10/x64/bin/python: No module named src.main
______________ test_fire_cli[command1-Wrike functions available] _______________

command = ['python', '-m', 'src.main', 'wrike']
expected_output = 'Wrike functions available'

    @pytest.mark.parametrize(
        "command, expected_output",
        [
            (
                ["python", "-m", "src.main", "toggl"],
                "Toggl functions available",
            ),  # Add expected output or part of it
            (
                ["python", "-m", "src.main", "wrike"],
                "Wrike functions available",
            ),  # Add expected output or part of it
            (
                ["python", "-m", "src.main", "openai"],
                "OpenAI functions available",
            ),  # Add expected output or part of it
        ],
    )
    def test_fire_cli(command, expected_output):
        try:
>           output = subprocess.check_output(command, text=True)

tests/test_main.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

timeout = None, popenargs = (['python', '-m', 'src.main', 'wrike'],)
kwargs = {'text': True}, kw = 'check'

    def check_output(*popenargs, timeout=None, **kwargs):
        r"""Run command with arguments and return its output.

        If the exit code was non-zero it raises a CalledProcessError.  The
        CalledProcessError object will have the return code in the returncode
        attribute and output in the output attribute.

        The arguments are the same as for the Popen constructor.  Example:

        >>> check_output(["ls", "-l", "/dev/null"])
        b'crw-rw-rw- 1 root root 1, 3 Oct 18  2007 /dev/null\n'

        The stdout argument is not allowed as it is used internally.
        To capture standard error in the result, use stderr=STDOUT.

        >>> check_output(["/bin/sh", "-c",
        ...               "ls -l non_existent_file ; exit 0"],
        ...              stderr=STDOUT)
        b'ls: non_existent_file: No such file or directory\n'

        There is an additional optional argument, "input", allowing you to
        pass a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it too will be used internally.  Example:

        >>> check_output(["sed", "-e", "s/foo/bar/"],
        ...              input=b"when in the course of fooman events\n")
        b'when in the course of barman events\n'

        By default, all communication is in bytes, and therefore any "input"
        should be bytes, and the return value will be bytes.  If in text mode,
        any "input" should be a string, and the return value will be a string
        decoded according to locale encoding, or by "encoding" if set. Text mode
        is triggered by setting any of text, encoding, errors or universal_newlines.
        """
        for kw in ('stdout', 'check'):
            if kw in kwargs:
                raise ValueError(f'{kw} argument not allowed, it will be overridden.')

        if 'input' in kwargs and kwargs['input'] is None:
            # Explicitly passing input=None was previously equivalent to passing an
            # empty string.

        The returned instance will have attributes args, returncode, stdout and
        stderr. By default, stdout and stderr are not captured, and those attributes
        will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
        or pass capture_output=True to capture both.

        If check is True and the exit code was non-zero, it raises a
        CalledProcessError. The CalledProcessError object will have the return code
        in the returncode attribute, and output & stderr attributes if those streams
        were captured.

        If timeout is given, and the process takes too long, a TimeoutExpired
        exception will be raised.

        There is an optional argument "input", allowing you to
        pass bytes or a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it will be used internally.

        By default, all communication is in bytes, and therefore any "input" should
        be bytes, and the stdout and stderr will be bytes. If in text mode, any
        "input" should be a string, and stdout and stderr will be strings decoded
        according to locale encoding, or by "encoding" if set. Text mode is
        triggered by setting any of text, encoding, errors or universal_newlines.

        The other arguments are the same as for the Popen constructor.
        """
        if input is not None:
            if kwargs.get('stdin') is not None:
                raise ValueError('stdin and input arguments may not both be used.')
            kwargs['stdin'] = PIPE

        if capture_output:
            if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None:
                raise ValueError('stdout and stderr arguments may not be used '
                                 'with capture_output.')
            kwargs['stdout'] = PIPE
            kwargs['stderr'] = PIPE

        with Popen(*popenargs, **kwargs) as process:
            try:
                stdout, stderr = process.communicate(input, timeout=timeout)
            except TimeoutExpired as exc:
                process.kill()
                if _mswindows:
                    # Windows accumulates the output in a single blocking
                    # read() call run on child threads, with the timeout
                    # being done in a join() on those threads.  communicate()
                    # _after_ kill() is required to collect that and add it
                    # to the exception.
                    exc.stdout, exc.stderr = process.communicate()
                else:
                    # POSIX _communicate already populated the output so
                    # far into the TimeoutExpired exception.
                    process.wait()
                raise
            except:  # Including KeyboardInterrupt, communicate handled that.
                process.kill()
                # We don't call process.wait() as .__exit__ does that for us.
                raise
            retcode = process.poll()
            if check and retcode:
>               raise CalledProcessError(retcode, process.args,
                                         output=stdout, stderr=stderr)
E               subprocess.CalledProcessError: Command '['python', '-m', 'src.main', 'wrike']' returned non-zero exit status 1.

/opt/hostedtoolcache/Python/3.11.10/x64/lib/python3.11/subprocess.py:571: CalledProcessError

During handling of the above exception, another exception occurred:

command = ['python', '-m', 'src.main', 'wrike']
expected_output = 'Wrike functions available'

    @pytest.mark.parametrize(
        "command, expected_output",
        [
            (
                ["python", "-m", "src.main", "toggl"],
                "Toggl functions available",
            ),  # Add expected output or part of it
            (
                ["python", "-m", "src.main", "wrike"],
                "Wrike functions available",
            ),  # Add expected output or part of it
            (
                ["python", "-m", "src.main", "openai"],
                "OpenAI functions available",
            ),  # Add expected output or part of it
        ],
    )
    def test_fire_cli(command, expected_output):
        try:
            output = subprocess.check_output(command, text=True)
            assert expected_output in output
        except subprocess.CalledProcessError as e:
>           pytest.fail(f"Command '{' '.join(command)}' failed with error: {str(e)}")
E           Failed: Command 'python -m src.main wrike' failed with error: Command '['python', '-m', 'src.main', 'wrike']' returned non-zero exit status 1.

tests/test_main.py:28: Failed
----------------------------- Captured stderr call -----------------------------
/opt/hostedtoolcache/Python/3.11.10/x64/bin/python: No module named src.main
______________ test_fire_cli[command2-OpenAI functions available] ______________

command = ['python', '-m', 'src.main', 'openai']
expected_output = 'OpenAI functions available'

    @pytest.mark.parametrize(
        "command, expected_output",
        [
            (
                ["python", "-m", "src.main", "toggl"],
                "Toggl functions available",
            ),  # Add expected output or part of it
            (
                ["python", "-m", "src.main", "wrike"],
                "Wrike functions available",
            ),  # Add expected output or part of it
            (
                ["python", "-m", "src.main", "openai"],
                "OpenAI functions available",
            ),  # Add expected output or part of it
        ],
    )
    def test_fire_cli(command, expected_output):
        try:
>           output = subprocess.check_output(command, text=True)

tests/test_main.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

timeout = None, popenargs = (['python', '-m', 'src.main', 'openai'],)
kwargs = {'text': True}, kw = 'check'

    def check_output(*popenargs, timeout=None, **kwargs):
        r"""Run command with arguments and return its output.

        If the exit code was non-zero it raises a CalledProcessError.  The
        CalledProcessError object will have the return code in the returncode
        attribute and output in the output attribute.

        The arguments are the same as for the Popen constructor.  Example:

        >>> check_output(["ls", "-l", "/dev/null"])
        b'crw-rw-rw- 1 root root 1, 3 Oct 18  2007 /dev/null\n'

        The stdout argument is not allowed as it is used internally.
        To capture standard error in the result, use stderr=STDOUT.

        >>> check_output(["/bin/sh", "-c",
        ...               "ls -l non_existent_file ; exit 0"],
        ...              stderr=STDOUT)
        b'ls: non_existent_file: No such file or directory\n'

        There is an additional optional argument, "input", allowing you to
        pass a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it too will be used internally.  Example:

        >>> check_output(["sed", "-e", "s/foo/bar/"],
        ...              input=b"when in the course of fooman events\n")
        b'when in the course of barman events\n'

        By default, all communication is in bytes, and therefore any "input"
        should be bytes, and the return value will be bytes.  If in text mode,
        any "input" should be a string, and the return value will be a string
        decoded according to locale encoding, or by "encoding" if set. Text mode
        is triggered by setting any of text, encoding, errors or universal_newlines.
        """
        for kw in ('stdout', 'check'):
            if kw in kwargs:
                raise ValueError(f'{kw} argument not allowed, it will be overridden.')

        if 'input' in kwargs and kwargs['input'] is None:
            # Explicitly passing input=None was previously equivalent to passing an
            # empty string.

        The returned instance will have attributes args, returncode, stdout and
        stderr. By default, stdout and stderr are not captured, and those attributes
        will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
        or pass capture_output=True to capture both.

        If check is True and the exit code was non-zero, it raises a
        CalledProcessError. The CalledProcessError object will have the return code
        in the returncode attribute, and output & stderr attributes if those streams
        were captured.

        If timeout is given, and the process takes too long, a TimeoutExpired
        exception will be raised.

        There is an optional argument "input", allowing you to
        pass bytes or a string to the subprocess's stdin.  If you use this argument
        you may not also use the Popen constructor's "stdin" argument, as
        it will be used internally.

        By default, all communication is in bytes, and therefore any "input" should
        be bytes, and the stdout and stderr will be bytes. If in text mode, any
        "input" should be a string, and stdout and stderr will be strings decoded
        according to locale encoding, or by "encoding" if set. Text mode is
        triggered by setting any of text, encoding, errors or universal_newlines.

         If the string
            # isn't utf-8, we fall back to iso-8859-1 for all other
            # encodings.
FAILED tests/test_main.py::test_fire_cli[command1-Wrike functions available] - Failed: Command 'python -m src.main wrike' failed with error: Command '['python', '-m', 'src.main', 'wrike']' returned non-zero exit status 1.
FAILED tests/test_main.py::test_fire_cli[command2-OpenAI functions available] - Failed: Command 'python -m src.main openai' failed with error: Command '['python', '-m', 'src.main', 'openai']' returned non-zero exit status 1.
FAILED tests/test_openai.py::test_find_closest_match - TypeError: find_closest_match() got an unexpected keyword argument 'prompt'
FAILED tests/test_openai.py::test_find_closest_match_no_choices - TypeError: find_closest_match() got an unexpected keyword argument 'prompt'
FAILED tests/test_openai.py::test_find_closest_match_exception - TypeError: find_closest_match() got an unexpected keyword argument 'prompt'
FAILED tests/test_openai.py::test_find_closest_match_with_options_none - TypeError: find_closest_match() got an unexpected keyword argument 'prompt'
FAILED tests/test_toggl.py::test_get_time_entries - requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.track.toggl.com/api/v8/time_entries?start_date=[20](https://github.com/GabLeRoux/time-sync-tools/actions/runs/11601542559/job/32304535311#step:8:21)23-06-01T00%3A00%3A00Z&end_date=2023-06-30T00%3A00%3A00Z
FAILED tests/test_wrike.py::test_get_task_by_id - NameError: name 'WRIKE_API_URL' is not defined
========================= 9 failed, 3 passed in 1.79s ==========================
Error: Process completed with exit code 1.

@coderabbitai why is the pytest exit code not properly set or retrieved in the last step of the github workflow file? I want to allow code coverage to be exposed as artifact and uploaded to codecov even if the tests fail, but I also want the workflow to fail if the tests did fail. Right now, the tests are failing, coverage report is being uploaded to artifacts and sent to codecov, but the last step thinkgs the pytest job suceeded, but it did not.
Run exit_code=""
exit_code=""
if [ "$exit_code" -ne 0 ]; then
echo "Tests failed with exit code $exit_code."
exit $exit_code
fi
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.11.10/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.10/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.10/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.10/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.10/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.10/x64/lib
/home/runner/work/_temp/6c18df75-7806-4729-83cd-5bbafa600a90.sh: line 2: [: : integer expression expected

The proposed alternative solution didn't work, but the first suggestion did work.


[4.1.0-beta] Incorrect method overload selected

Relevant investigation data:
Material UI makeStyle function has 2 signatures, 1 where Props are empty object ({}), the second where props are a generic (default of {}).  When using the spread operator for the object passed into makeStyle, the second more specific (and incorrect) signature is picked. This ONLY happens when there are other values provided before or after the spread operator. If the spread object is the only set of values in the object, the 'correct' overload is suggested.
I believe all 3 cases below should be equivalent and select the same function overload.  This works perfectly in previous versions of typescript, so would indicate some form of bug or un-tracked breaking change.

TypeScript Version:  4.1.0-beta & 4.1.0-dev.20201014

Search Terms:
Material UI styles TS2554 overload type
Code

const useStylesBroken = makeStyles(theme =>
    createStyles({
        sizeSmall: {
            ...theme.typography.button, // This is simply a set of css styles - nothing relating to props
            height: '36px',
        },
    })
);
const useStylesWorks = makeStyles(theme =>
    createStyles({
        sizeSmall: {
            height: '36px',
        },
    })
);
const useStylesWorks2 = makeStyles(theme =>
    createStyles({
        sizeSmall: {
            ...theme.typography.button,
        },
    })
);

export function NotReallyAButton(): null {
    console.log(useStylesBroken());
    console.log(useStylesWorks());
    console.log(useStylesWorks2());
    return null
}

See https://github.com/berickson1/Playground/blob/master/materialUiSample.ts
Expected behavior:
Code compiles successfully (as in previous released typescript versions)
Actual behavior:
Incorrect overload chosen & compiler error:
materialUiSample.ts:27:17 - error TS2554: Expected 1 arguments, but got 0.

27     console.log(useStylesBroken());
                   ~~~~~~~~~~~~~~~~~

  node_modules/@material-ui/core/styles/makeStyles.d.ts:23:5
    23 ): (props: Props) => ClassNameMap<ClassKey>;
           ~~~~~~~~~~~~
    An argument for 'props' was not provided.

Playground Link:
Requires material-ui dependency installed, see repo at https://github.com/berickson1/Playground (yarn install && yarn build)
Related Issues:
https://github.com/microsoft/TypeScript/issues/41049 <- Looks similar but only relates to promises, so is not applicable here

@berickson1 is there a test suite or something I can use when testing out modifications to the material-ui definitions to make sure the things I might propose don't break anything?

Bisected to #40002
Without an isolated repro I don't see us getting to this right away - my initial attempt to distill this down into something that didn't require the material-ui definitions wasn't successful

In the meantime I changed this
/**
 * `makeStyles` where the passed `styles` do not depend on props
 */
export default function makeStyles<Theme = DefaultTheme, ClassKey extends string = string>(
  style: Styles<Theme, { }, ClassKey>,
  options?: Omit<WithStylesOptions<Theme>, 'withTheme'>
): (props?: any) => ClassNameMap<ClassKey>;

to this
/**
 * `makeStyles` where the passed `styles` do not depend on props
 */
export default function makeStyles<Theme = DefaultTheme, ClassKey extends string = string>(
  style: Styles<Theme, never, ClassKey>,
//                     ^^^^^
  options?: Omit<WithStylesOptions<Theme>, 'withTheme'>
): (props?: any) => ClassNameMap<ClassKey>;

and got the desired behavior

@berickson1 is there a test suite or something I can use when testing out modifications to the material-ui definitions to make sure the things I might propose don't break anything?

What I've shared is about as far as I've gotten to be honest. I was trying to prep our client codebase for typescript 4.1 and deal with the latest set of changes and ran into this. I'm only familiar with MUI types from a usage standpoint, but I can try to distill a specific example down either this weekend or early next week.
I largely wanted to get this on the radar for the TS team since MUI is a relatively popular UI component library and this introduces an (albeit unintentional) breaking change.

I did some digging and tracked the behaviour back to 1 specific line in the material-ui .d.ts. Commenting it out fixes everything in my example (but it's still needed for some font face overrides in general).
/**
 * Allows the user to augment the properties available
 */
export interface BaseCSSProperties extends CSS.Properties<number | string> {
  //'@font-face'?: JSSFontface | JSSFontface[];
}

Below is my (somewhat stream of consciousness) dive into the underlying MUI types a bit - may or may not be useful for investigations, but doesn't hurt to post
A bit more info:
createStyle takes 2 generics, the 2nd being Props.
This uses
export type StyleRules<Props extends object = {}, ClassKey extends string = string> = Record<
  ClassKey,
  // JSS property bag
  | CSSProperties
  // JSS property bag where values are based on props
  | CreateCSSProperties<Props>
  // JSS property bag based on props
  | PropsFunc<Props, CreateCSSProperties<Props>>
>;

The problematic type in there is CreateCSSProperties<Props>. This defines a type with two index accessors - one from extending BaseCreateCSSProperties, the other defined inline.  Removing either of these index signatures makes the compiler happy.
This is about as far as I've been able to make it today.

After a short delay, I have a contrived standalone repro. I've updated the git repo above and created a playground link:
https://www.typescriptlang.org/play?ts=4.0.3#code/C4TwDgpgBAUgynAYgewHbAGYEMDG0C8UA3gFBRQD0AVFAM7IC20YATspC8AJYS1QAWEFhAA0UACbJeUVMmBQGWYMCFQMyFlGFhkUKhRIBfANwkSoSFAAKbMLUQBXVDgA8N9nwgAPFanF9kACMAKwgcYDEAFQA+KEIAClYPAC5rW1oASjjYyNMSaioyGgBBABtS5AB3PmBBKAdaVWBdLAcAcyZ0KFrmWyFuaSwANywuUqxA0ogigy50IWw8KDghtvcOAdoXSIAZCFQ22rioeNpgFjm2qAAyYkMsgB8oAAZY0nJArEbSuYg4fi4GGAAH5Urt9od+KZyBgxioWKC6OdLjc7qZDCRvDpOFA5vDFtB1v0eFtwQcjgkzhcDqiiPcoE9XmQoN5fP5lqsiZwSds9uT+G8MSQ8QtcNAAEJfCAAYQQXM2LJ8+3Z8p5qAcDECqieVMub2ZFAoADkAPKRACiqQAkhhugC+Fw+MEGvJ1ZqhGIeoqsAwwFMoDhGGAxrwDRQAOQAAXU6AAtATw4j4Eg0JgxQzYAgUOgCQBtAC60O6vBBqWT2bTeAL6LMIpYBKgsrgqukrOVfEljSbLb470oFCgZQqlSgdggDkkdAgU3CGj4WD8Cgg4i4WCgAEcHEISWGoAADJwAa1klVQe9xfAay7ocyWkTgEikfFk8iw5SqUC+tC4bVQKIXuLzPW6aVFwtTIA4wC7gBcziN4N6-koDjCN0uhoNAoFHDBfjwd+iHAMhEAAHRQJE9oXqhn7viOFjQLQWAYNM5CGgoyDiA4-qtB0+zAEoXBoERu6RGE-B-jgb6lCAUCVBhC6vqgUmHhAUkvt04DXnM+6djKcp9NyvDns0UBalAyC2rRu57t2embOegSQXajqPrwqDhvIlQaIeJFkdAsG4T+qBIShqAQMuNS6IGQxCLu2nWewxKDHwMnlCRACqtAOBJUkgBB0kQaU4j1I0WlSnFGwkrmSk5basW6fF+m0Pme67vZ8i1E5HkcYVqkSR+X4BSiABKEC4MARFlQl4WNnV5WhuQlWpLqBz5qkR4nqgGYTQ1NbCkBDbSsISg6c2Nk8usnhKn4AQhGE8iEHS0TMm2V1QLFh0qFtmxuOk+rMQOQ4fmOE66N8t1zp+i5MCua6btuc1QAtSLUm0K3MuQTxvSNH0zZN30eNElXKWZr2le9x09njdjRPmaObWTn1nT9O20STXb0zjDWUxdbLXaE4THA9AvMrmViAVAVXE7VJ31ZsqPkOjrPk6dvAizT8sZudjjOFzYhSz2qvROieQs3AoBTINHG8C4zLnYqPOmTd-P3YYIjMtK4y0LQADSyl2+2SMooQS1tCQsSEMNgYsOI1vkO7X4+yArt-ZmD5JBsUmfFclSCChIylFu84oZ8jSFWgo7pG77PS7NWznY9htmHBODjChGBOOE-EbTgZOmyAUxbHHnsJ37L3B2ItvPeyD3xMyZx97wqS9+blu1+kYiD97ymPRki9mxAFv9zrjYe5vIAN-kA7mgAGsUACyVg7OaUCpXAxQAOJP3AkTFIN95QAAEuaQa5oSCBlQGcNQWAlKRHAMgNoLAsBgH4CAJeEBUgM2kIQAALJ+ecCk8hgIgYENgSlUCoOON3LGfw960HiH2b8AAvP4ihyipD7OQIinDsDQNgfAxByDUFiBYmRJyTlvy+kkp+Kc8hiY4E9kieefBYwyDkACGkwhxjcBpEZNOtBaaCB-PwYAqQABEABmAAbGALwJik5QBdkYDIphCHuU8pcchhBKFHVQbQ+hXAmFwBYaUNh+iICGOMVAcxVibF2IcfcUwwj1K0G7lwMA8gsFEWeJ+eBoUaj8CUHaXg0AsAoQgJuN8UBlG0WSRcNJUAMkAEZAKMRYPOCQgIWk8SgHnLcpkNpemEJHcQYgIBRX6fwCCbR+CFKkrQCZXVjLQEDL6PikxpjCPIk5NcgQwKmVtGuMByIoqFW8D6P0ohjIOTAuGPgK4zhjCmIVSQp41BsAYFIw6pQFBHQuBUhwXAioQFjOJRooC0AQKxLdZcqCGmpFosTDyLBDzuL3scYhyBSGoNMEAA

The title here should be updated - this doesn't appear to be related to method overloads based on the distilled sample. It appears that inferred generics are improperly selected due to the usage of the spread operator in object declaration.

I also ran into this issue today when I tried out the TS 4.1 RC. In case it's helpful, here's my repro. This type checks in TS 4.0.2 but not 4.1RC.
import {createStyles, makeStyles} from '@material-ui/core/styles';
import React from 'react';

export function HeaderBreadcrumbs() {
  const classes = useStyles();
  //              ~~~~~~~~~~~ Expected 1 arguments, but got 0. ts(2554)
  return
Hello!
;
}

const useStyles = makeStyles(theme =>
  createStyles({
    outer: {
      '& .MuiLink-root': {
        ...theme.typography.h6,  // this line is key!
        color: 'inherit',
      },
    },
  }),
);

This bug persists on 4.1.2

I'm going to close this issue. The repro is quite complex and it isn't clear to me what the types are trying to achieve, plus it looks like the working cases in the repro actually rely on type inference failing and defaulting to the {} constraint.


Pyright type checking when working with aggregate data

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the SQLModel documentation, with the integrated search.
[X] I already searched in Google "How to X in SQLModel" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to SQLModel but to Pydantic.
[X] I already checked if it is not related to SQLModel but to SQLAlchemy.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
from typing import Optional
from sqlmodel import Field, SQLModel, Session, create_engine, func, select

class Score(SQLModel, table=True):
    __tablename__ = "scores" # type: ignore

    id: Optional[int] = Field(default=None, primary_key=True)
    name: str
    score: int = Field(ge=0, le=100)

engine = create_engine("sqlite:///")
SQLModel.metadata.create_all(engine)

with Session(engine) as session:
    session.add(Score(name="Bob", score=51))
    session.add(Score(name="Alice", score=88))
    session.add(Score(name="Greg", score=12))
    session.add(Score(name="Patrick", score=100))
    session.add(Score(name="Susie", score=45))

    session.commit()

with Session(engine) as session:
    res = session.exec(
        select(
            func.min(Score.score),
            func.max(Score.score)
        )
    ).one()

    print(f"Minimum score: {res['min']}")
    print(f"Maximum score: {res['max']}")

Description
The above code works as expected and outputs:
Minimum score: 12
Maximum score: 100

However the issue I'm having is the pyright static type checking around:
res = session.exec(
    select(
        func.min(Score.score),
        func.max(Score.score)
    )
).one()

Pyright gives me the following error and the res variable has an Unkown type according to Pyright.
Argument of type "Function[NullType]" cannot be assigned to parameter "entity_1" of type "Type[_TModel_1@select]" in function "select"
    Type "Function[NullType]" cannot be assigned to type "Type[_TModel_1@select]

Expected Result / Solution Idea
The res variable should not have an unknown type.
Given the following code, the type of res should be something like CustomMinMax where CustomMinMax is a generated pydantic model/named tuple/dataclass like the following:
class CustomMinMax(BaseModel):
    min: int
    max: int

Not sure how possible that would be to do.
Has anybody faced the same issue or has any ideas on ways around this so the res variable has an appropriate type, or maybe I'm just missing a pyright config option that solves this problem?
Operating System
Linux
Operating System Details
Arch
SQLModel Version
0.0.8
Python Version
3.9.13
Additional Context
Pyright version: 1.1.271

It's not a perfect solution, but you can use declared_attr and column_property:
from typing import cast
from sqlalchemy.orm import column_property, declared_attr

...

class ScoreTableBase(SQLModel):
    __tablename__ = "scores" # type: ignore

    id: Optional[int] = Field(default=None, primary_key=True)
    name: str
    score: int = Field(ge=0, le=100)

class Score(ScoreTableBase, table=True):
    pass

class ScoreAggregate(ScoreTableBase, table=True):
    __table_args__ = {"extend_existing": True}

    @declared_attr
    def max(cls) -> int:
        return cast(int, column_property(func.max(cls.score)))

    @declared_attr
    def min(cls) -> int:
        return cast(int, column_property(func.min(cls.score)))

...

with Session(engine) as session:
    res = session.exec(
        select(
            ScoreAggregate
        )
    ).one()

    print(f"Minimum score: {res.min}")
    print(f"Maximum score: {res.max}")

use
Session.exec -> Session.execute
sqlmodel.select -> sqlalchemy.select
ex:
from typing import ClassVar, Optional

from sqlalchemy import select
from sqlmodel import Field, Session, SQLModel, create_engine, func

class Score(SQLModel, table=True):
    __tablename__: ClassVar[str] = "scores"

    id: Optional[int] = Field(default=None, primary_key=True)
    name: str
    score: int = Field(ge=0, le=100)

engine = create_engine("sqlite:///")
SQLModel.metadata.create_all(engine)

with Session(engine) as session:
    session.add(Score(name="Bob", score=51))
    session.add(Score(name="Alice", score=88))
    session.add(Score(name="Greg", score=12))
    session.add(Score(name="Patrick", score=100))
    session.add(Score(name="Susie", score=45))

    session.commit()

with Session(engine) as session:
    res = session.execute(select(func.min(Score.score), func.max(Score.score))).one()

    print(f"Minimum score: {res['min']}")
    print(f"Maximum score: {res['max']}")


Font size settings doesn't work on tags

I have the font slider all the way up (30), and the "small font/tag size" font setting also set to 30, but tags are still showing up small, and so is the cursor. For example:
Right before I move the cursor:

When I move the cursor into the tab

My apologies - After disabling the "minimal theme settings plugin", this works as expected


test augmentation in scannet segmentation

Why does ptv3 need to do data augmentation such as random rotation during scannet segmentation test? I don't seem to see voting during the test.

Hi, I am not the author, but I will try to explain it. You do not need to do test-time augmentation, but sometimes it does help to offer a more accurate prediction.
Test-time augmentation creates instances of the original test sample but with the transformation applied. So if you have 3 Augmentation Pipeline you will get 3 different samples of the same point cloud. This is done here: https://github.com/Pointcept/Pointcept/blob/7b37078ae301288309d62c4c88401716b6bdbe0e/pointcept/datasets/defaults.py#L146-L147
Right after each sample is fragmented using test_voxelize(). Usually the number of fragments, it is given by the maximum count of point in one voxel. And this is done in GridSample transformation class ( with the flag mode="test"). Check it out here: https://github.com/Pointcept/Pointcept/blob/7b37078ae301288309d62c4c88401716b6bdbe0e/pointcept/datasets/transform.py#L853
Great! So now you have a list with all the fragments. Each fragment is used to make predictions that are summed up. Look at this line: https://github.com/Pointcept/Pointcept/blob/7b37078ae301288309d62c4c88401716b6bdbe0e/pointcept/engines/test.py#L196
After summing all the predictions of the fragments, the class with the highest score is chosen. For a multi dimensional tensor, ".max(1)"  returns the indices, that is why "[1]" is for, to extract the indices.
https://github.com/Pointcept/Pointcept/blob/7b37078ae301288309d62c4c88401716b6bdbe0e/pointcept/engines/test.py#L211
I hope I provided a good overview to you.

@SpeedyGonzales949 Thx again.


Update StorageClient to follow the same static creation pattern as generated APIs

To create a StorageClient, there are now four options:

Pass in an existing StorageService
Pass in an existing initializer (less likely to be useful; drop?)
Call the static Create method and pass in optional credentials
Call the static CreateAsync method and pass in optional credentials

Now we could have a synchronous constructor which uses Task.Run to get the credentials,
basically like Create. In our other APIs we have an abstract base class and then a concrete derived
class, making the constructor route a no-no... I haven't gone for that here, although we could if
we wanted to.
We could also have an extension method of ToStorageClient on StorageService if that proved useful.
For comments: @csells @SurferJeffAtGoogle @chrsmith @ivannaranjo @remi

LGTM

Certainly options #3 and #4 are needed. What are the scenarios for #1 and #2?

Option 1 is useful if you're using code which is already constructing a StorageService in a particular way - basically, we're very upfront about this being a wrapper for StorageService, so it would be odd not to be able to construct the wrapper from what it wraps. Option 2 could be ditched though, I think.

Agreed on keeping options 1, 3 and 4 and dropping option 2.
On Apr 11, 2016, at 7:11 AM, Jon Skeet <notifications<EMAIL_ADDRESS>wrote:
Option 1 is useful if you're using code which is already constructing a StorageService in a particular way - basically, we're very upfront about this being a wrapper for StorageService, so it would be odd not to be able to construct the wrapper from what it wraps. Option 2 could be ditched though, I think.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHubhttps://github.com/GoogleCloudPlatform/gcloud-dotnet/pull/99#issuecomment-208366834

Updated to remove option 2. PTAL, then will move onto abstract classes.

LGTM
Possibly do abstract classes in a different PR?


Add table of contents to top of docs pages

Verification

[X] This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

Provide a detailed description of the proposed feature
A table of contents for documentation pages with links to every section
What is the motivation for the feature?
Makes it much easier to move around a large page such as https://docs.brew.sh/Formula-Cookbook.
How will the feature be relevant to at least 90% of Homebrew users?
Easier navigation of docs
What alternatives to the feature have been considered?
Using Find (Cmd+F). This does not work well if you don't remember the name of the section you're looking for.

I like the idea and it doesn't look like it'd be too difficult to add. Kramdown is the default Jekyll markdown renderer and it supports automatic table of contents generation.

An alternative is https://github.com/allejo/jekyll-toc.

Will review a PR for this.


table.py replace in translation

gettext_lazy('Are you sure you want to delete these {} items?').format(queryset.count())
this would be better as
gettext_lazy('Are you sure you want to delete these {count} items?').format(count=queryset.count())

agreed


YYTextView in markdown example has wrong edge insets on iOS6

This is what happens when scrolling to bottom. The content is not fully showed. On iOS 7 and later it's OK.

try to set contentInset

It's only a demo... and currently I don't have an iOS 6 device...
Wontfix...


Raplce short PHP-Tags

Why replace PHP short tags? <? has been fully removed, but as of PHP 5.4 <?= is okay.

Same with #1439 :)


My working FreeBSD startup scripts

For anyone interested, here are my scripts to get this working properly on FreeBSD:
1. wireguard-ui daemon:  /usr/local/etc/rc.d/wireguard-ui
#!/bin/sh
#
# PROVIDE: wireguard_ui
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable wireguard_ui:
#
# wireguard_ui_enable="YES"
#

. /etc/rc.subr
name="wireguard_ui"
rcvar=wireguard_ui_enable
procname="/usr/local/opt/wireguard-ui/wireguard-ui"
pidfile="/var/run/wireguard_ui.pid"
wireguard_ui_chdir="/usr/local/opt/wireguard-ui"
wireguard_ui_env_file="/usr/local/opt/wireguard-ui/env"

command="/usr/sbin/daemon"
command_args=" -s notice -p ${pidfile} -f ${procname} ${wireguard_ui_env_file}"

stop_postcmd="wireguard_ui_poststop"

wireguard_ui_poststop()
{
    rm -f $pidfile
}

load_rc_config ${name}

: ${wireguard_ui_enable="NO"}
: ${wireguard_ui_pidfile="/var/run/${name}.pid"}

run_rc_command "$1"

2. daemon to watch for changes made by wireguard-ui then restart wireguard to commit the changes
#!/bin/sh
#
# PROVIDE: wgui
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable wgui:
#
# wgui_enable="YES"
#

. /etc/rc.subr

name="wgui"
rcvar=wgui_enable
procname="/usr/local/opt/wgui/wgui"
pidfile="/var/run/wgui.pid"
#wgui_chdir="/usr/local/opt/wgui/"
command="/usr/sbin/daemon"
command_args="-P ${pidfile} ${procname}"

stop_cmd="${name}_stop"
stop_postcmd="${name}_poststop"

wgui_stop()
{
        if [ -f $pidfile ]; then
                echo "Stopping wgui."

        else
                echo "wgui is not running."
                exit 0
        fi
}

wgui_poststop()
{
        rm -f  $pidfile
}

load_rc_config ${name}

: ${wgui_enable="NO"}
: ${wgui_pidfile="/var/run/${name}.pid"}

run_rc_command "$1"

3. script for the daemon:
#!/bin/sh
PATH="$PATH:/usr/local/bin"
while inotifywait -e modify -e create  /usr/local/etc/wireguard/; do
  wg-quick down wg0
  wg-quick up wg0
done

Caveat: For the wgui script to work you will need to install inotify-tools first.
# pkg install inotify-tools

Maybe submit this to the FreeBSD ports collection?

Got got this all setup, and try to start the service, but even though it says it's starting when I try service wireguard-ui status, it says it's not running. Can't seem to figure out what I missed, would you happen to have any insight?

Got got this all setup, and try to start the service, but even though it says it's starting when I try service wireguard-ui status, it says it's not running. Can't seem to figure out what I missed, would you happen to have any insight?
EDIT: Got it running, but the only thing I can't seem to figure out is how to get the peers/clients to be seen by OPNsense, but maybe that isn't possible?

did you get the "connected peers" feature working?


VPN Settings?

I don't see anywhere to configure a VPN payload. Is that missing for any particular reason?

ProfileCreator is still under very early (but active) development. Payloads are being added slowly but Erik has been prioritizing requests.

Thanks @kevinmcox! I honestly just figured it was there and I wasn't seeing it, so I figured I'd ask for a sanity check. I'm really liking where this project is going!


To start the Android Emulator a whole lot more needs to be installed

Sorry, but this leave a lot to be wished for.
Intel® Hardware Accelerated Execution Manager does not get properly installed without doing it manually.
Android Emulator does not start, get project deployed and start debugging the project without a lot of manual work.
Make sure the installation installs a simple Android Emulator that works on CPU alone (always work, even if slow).
Get the templates to compile, deploy and debug on that emulator, even if it is KitKat-4.4 or earlier.
After installation the product should just work. Later it can be optimzed, speed up and upgraded.

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

ID: b4445585-af8f-09d3-5d35-762c3aac187b
Version Independent ID: fa9263db-60d6-eb98-eb74-842351ba5387
Content: Build your first Xamarin.Forms app - Xamarin
Content Source: docs/get-started/first-app/index.md
Product: xamarin
Technology: xamarin-forms
GitHub Login: @conceptdev
Microsoft Alias: crdun

@Darlanio Same here. I should be like install and develop.

See also the related feedback in this issue https://github.com/MicrosoftDocs/xamarin-docs/issues/1608

I get the emulator running - until it hangs and says "System UI isn't responding". No errors. The only warnings are about iOS, which is not what I am running. I am running an Oreo emulator.

The videos on this page have now been updated.


Nick: Watch worklooper.com

Nick requests the watch of the watch_keyword worklooper\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

worklooper\.com has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Jeff Schaller in Charcoal HQ


Update utils.py

make 5 changes to the docstrings of utils.py:

make the docstring of the 'func_calling_chain' function more concise.
change 'world class' to 'world-class' in variable 'prompt_func_calling_msgs' because to describe a noun 'world-class' is more suitable. This change appears 2 times in the file.
change the docstring of 'wiki_query_func_calling_chain' function to make it more accurate.
change the spell of 'response' in variable 'template' in the 'main_chain' function to make it correct.

Good job!


Fixed strict errors and bits of enhancements

Abstract static method is not allowed by PHP strict standards. In this case, we can avoid this by setting the default behavior of methods.

Thanks.


Failed to process requested module. Error when loading Az.ResourceGraph with recently updated runner images for ubuntu

Description
Starting today we got this error when running an actions workflow:

After investigation we found that the current image version used is

The action workflow mentioned ran  some months without any issues. Last time when this workflow ran successfully was yesterday when the following runner image was used:

It looks like something was changed in the new runner image that caused this issue.
In the workflow we use: ubuntu-latest.
Is there a fix for this or is it possible to switch back to the image runner that did work for us (ubuntu-22.04 version 20231030.2.0)
Platforms affected

[ ] Azure DevOps
[X] GitHub Actions - Standard Runners
[ ] GitHub Actions - Larger Runners

Runner images affected

[X] Ubuntu 20.04
[X] Ubuntu 22.04
[ ] macOS 11
[ ] macOS 12
[ ] macOS 13
[ ] Windows Server 2019
[ ] Windows Server 2022

Image version and build link
ubuntu latest
ubuntu 20.04
Is it regression?
Yes
succeeded with runner image: ubuntu-22.04 version 20231030.2.0
Expected behavior
Az.Resourcegraph module can be loaded with az.accounts version 2.9.1
Actual behavior
Error as mention in screenshot
Repro steps
run workflow with ubuntu latest or ubuntu 20.04
Run AZ Powershell script that executes Import-Module Az.ResourceGraph

@klaasjandejager, I can't reproduce it in my workflow. Could you share exact steps that lead to the error you get?

Step in workflow:
- name: Configure  functions
    uses: azure/powershell@v1
    with:
      inlineScript: |
        . '${{ env.importModuleScriptFile }}'
        Invoke-Module -moduleName 'Az.ResourceGraph'
            ....
      azPSVersion: "7.5.0"

Invoke-Module.ps1 does the following:
[CmdletBinding()]
param (
[Parameter(ValueFromPipeline = $True)]
[string[]]$moduleName
)
begin {
    if ($PSEdition -eq 'Core') {
        if (-not $moduleName) {
            # If no modules are provided in the parameter the defaults will be loaded via json
            [string]$inputJsonFile = "./input/modules.json"
            $jsonObject = Get-Content -Path $inputJsonFile -Raw | ConvertFrom-Json
            $moduleName = $jsonObject.modules.name
        }
    }
    else {
        Write-Warning "This script expects PowerShell core edition."
    }
}
process {
    try {
        $installedModules = foreach ($module in $moduleName) {
            $availableModule = Get-Module -ListAvailable -Name $module
            if (-not $availableModule ) {
                Write-Verbose "Finding, Installing & Importing the Module $module"

                Find-Module $module | Install-Module -Scope CurrentUser -Force
                Import-Module $module -Force
            }
            else {
                Write-Verbose "Module $module is already installed."
                Import-Module $module -Force
            }

            $installedModule = Get-Module -Name $module
            [pscustomobject]@{
                ModuleName = $installedModule.Name
                Version    = $installedModule.Version
            }
        }
        Write-Output $installedModules
    }
    catch {
        Write-Error "Failed to process the requested module(s). $($_.Exception.Message)" -ErrorAction 'Stop'
    }
}

It looks related to you selection of Az.Powershell version. You use 7.5.0, it bundles Az.Accounts 2.7.6 while the newest version of Az.ResourceGraph requires Az.Accounts 2.9.1. To resolve this conflict I may recommend you either to use the latest version of Az.Powershell or to specify older version of Az.ResourceGraph.

@vpolikarpov-akvelon
Same steps worked for several months, also with ubuntu-22.04 version 20231030.2.0 yesterday

We already tried to use latest version but got the same error

We already tried to use latest version but got the same error

In my workflow it helps. I understand that it doesn't mean anything, but it may indicate that there is something more in you workflow that affects the outcome. Is it possible to share complete log and/or complete workflow definition so we can examine them?

I also noticed that recently a new version of the azure/powershell action was released. I tried to compare how your workflow runs with different versions of action and found out that if fails with v1.4.0 (latest one), but succeeds with v1.3.0. Could you try pinning actions version in your workflow?
uses<EMAIL_ADDRESS>

I did some check my selves also and when I used "latest" instead of "7.5.0" for azPSVersion and azure/powershell@v1 the section that causes the issue is working again. Last night we ran all our different workflows,that failed, again with the changed settings and they finished all successfully.
Thanks for your help


Webview based product addition and edition

Who for

As a user, I want to have a minimum way to get to the scores or correct a mistake.
As a developer, I want to ensure positive or at least neutral App Reviews until we get the Native Edition working.

What
Webview based product addition and edition
Why
Blocked on

https://github.com/openfoodfacts/openfoodfacts-server/issues/4293

Part of

[ ] #505

Given the current progress, I'm closing this.


Remove deprecated version of find.

This PR removes the deprecated version of find.

This is related to #177.

I do wonder if those were really all invocations because truth be told I was dreading find a bit :D Looks great to me, thanks @keathley ! :)


Update parser and AST for explain statement

[x] Rebased/mergable
[ ] Tests pass
[x] InfluxQL Spec updated

I've now added this same code in at least 10 different branches so I wanted to get this part in to reduce the diff of any implementation. I can wait to add this if desired, but adding this means I don't have to worry about any AST related stuff while working on the implementation.


ng update to v7rc has TypeScript dependency issue (v 6.0.5)

Bug Report or Feature Request (mark with an x)
- [x ] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [x ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

node 8.10.0
npm  6.2.0
Windows 10
Angular CLI: 6.0.5
Node: 8.10.0
OS: win32 x64
Angular: 6.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package                           Version
@angular-devkit/architect         0.6.5
@angular-devkit/build-angular     0.6.5
@angular-devkit/build-optimizer   0.6.5
@angular-devkit/core              0.6.5
@angular-devkit/schematics        0.6.5
@angular/cli                      6.0.5
@ngtools/webpack                  6.0.5
@schematics/angular               0.6.5
@schematics/update                0.6.5
rxjs                              6.2.0
typescript                        2.7.2
webpack                           4.8.3
Repro steps

ng update @angular/core @angular/cli --next
Sample repo:
https://github.com/DeborahK/Angular-NgRx-GettingStarted/tree/master/APM-Demo4
When I run the ng update command against this repo, I get the error indicated in the log below and the ng update does not run.
The log given by the failure

Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=3.1.1 <3.2", would install "2.7.2")
Incompatible peer dependencies found. See above.
Desired functionality

Should successfully run ng update
Mention any other details that might be useful

The package-lock.json file for this version includes the following:
    "@schematics/angular": {
      "version": "0.6.5",
      "resolved"<EMAIL_ADDRESS>      "integrity": "sha512-oB9j+IqVtoSn3kEV6mnBslG8pxaOlUW2Kw7aCVf9DzEqTZEH5awKuPuhRkAVyiXdwHPDn21xoUGVRLy4y/BafA==",
      "dev": true,
      "requires": {
        "@angular-devkit/core": "0.6.5",
        "@angular-devkit/schematics": "0.6.5",
        "typescript": ">=2.6.2 <2.8"
      }
    },

If I manually change the typescript line to this:
"typescript": ">=2.6.2 <2.10"
It executes ng update as expected.

I think you should always update the cli first with npm i @angular/cli --next and then update other packages. I don't think this should be considered as an issue, but I may be wrong. At least we should document it.
Doing so in your project, it worked perfectly (tested with ng serve), see the PR above :wink:
BTW, an error message is still occurring when doing so:
ng update @angular/cli --next
Your global Angular CLI version (7.0.0-rc.1) is greater than your local
version (6.0.5). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
    Updating package.json with dependency @angular/cli @ "7.0.0-rc.1" (was "6.0.5")...
UPDATE package.json (1502 bytes)
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>- 3 but none is installed. You must install peer dependencies yourself.
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY<EMAIL_ADDRESS>(node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for<EMAIL_ADDRESS>wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 56 packages from 65 contributors, removed 2 packages, updated 6 packages and audited 21888 packages in 6.439s
found 21 vulnerabilities (9 low, 5 moderate, 7 high)
  run `npm audit fix` to fix them, or `npm audit` for details
Invalid rule result: Function().

I think @StephenFluin will explain how the upgrade process works, in the past we were careful to say which order to update things in.

It seems like the issue was in with the packages order (trying to upgrade angular before the CLI). Do you think the CLI should reorder them internally or it's just a doc issue ?

Every time I try to update anything, I run into snags similar to this one.
It's not a insurmountable problem, I wish there was just single command which would update all the things. What is the best way to update ng and npm?


Graph with tf.cond can not be serialized correctly after calling remove_training_nodes.

What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?
#3667 may be the same problem? But that thread is closed without a clear answer.
Environment info
Operating System:

Tensorflow 1.0.0
Python 2.7
Ubuntu 14.04

Installed version of CUDA and cuDNN:
(please attach the output of ls -l /path/to/cuda/lib/libcud*):
CUDA 8.0
cuDNN 5.1.10
*This problem occurs in both GPU and CPU environment.
If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)
The following code is to produce a .pb file that can be used for tf.import_graph_def.
import tensorflow as tf
from tensorflow.python.framework import graph_util

input_jpeg = tf.placeholder(tf.string, name='DecodeJpeg/contents')
image = tf.image.decode_jpeg(input_jpeg, channels=3)
image = tf.image.convert_image_dtype(image, dtype=tf.float32)

height = tf.constant(224)
width = tf.constant(224)
input_h = tf.shape(image)[0]
input_w = tf.shape(image)[1]

def resize_t(image_t, h=height, w=width):
  image2 = tf.expand_dims(image_t, axis=0)
  return image2

image_checked = tf.cond(
    (tf.less(input_h, height)),
    lambda:resize_t(image), lambda:image)

shape_t = tf.shape(image_checked, name='shape_t')

with tf.Session() as sess:
  # freeze the graph and export
  output_graph_def = sess.graph_def
  output_graph_def = graph_util.convert_variables_to_constants(
        sess, sess.graph_def, ['shape_t'])
  output_graph_def = graph_util.remove_training_nodes(output_graph_def)
  with open('out.pb', 'wb') as f:
    f.write(output_graph_def.SerializeToString())

The out.pb file can be generated as expected, but when I import it using the code below:
import tensorflow as tf
with open('out.pb', 'rb') as f:
  graph_content = f.read()
graph_def = tf.GraphDef()
graph_def.ParseFromString(graph_content)
_ = tf.import_graph_def(graph_def, name='')

It failed with Message:
Traceback (most recent call last):
  File "im.py", line 6, in <module>
    _ = tf.import_graph_def(graph_def, name='')
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/importer.py", line 342, in import_graph_def
    % (input_name,)))
ValueError: graph_def is invalid at node u'cond/ExpandDims/dim': More inputs specified ('cond/Switch:1') than the op expects..

What other attempted solutions have you tried?
when I removed the graph_util.remove_training_nodes call, everything works well.
So it seems that something goes wrong while removing the Identity nodes from the graph.
Logs or other output that would be helpful
(If logs are large, please upload as attachment or provide link).
Exploring the .pbtxt generated with and without graph_util.remove_training_nodes,some Identity nodes are removed and the input of ExpandDims/dim is modified to connect to the output of Switch.(maybe?)
Part of .pbtxt file content without graph_util.remove_training_nodes:
^Kcond/Switch^R^FSwitch^Z^DLess^Z^DLess*^G
^AT^R^B0

1
^Mcond/switch_t^R^HIdentity^Z^Mcond/Switch:1*^G
^AT^R^B0

'
^Lcond/pred_id^R^HIdentity^Z^DLess*^G
^AT^R^B0

M
^Scond/ExpandDims/dim^R^EConst^Z^N^cond/switch_t*^K
^Edtype^R^B0^C*^R
^Evalue^R       B^G^H^C^R^@:^A^@
h
^Vcond/ExpandDims/Switch^R^FSwitch^Z^Mconvert_image^Z^Lcond/pred_id*^G
^AT^R^B0^A*
^F_class^R^V
^T^R^Rloc:@convert_image
a
^Ocond/ExpandDims^R
ExpandDims^Z^Xcond/ExpandDims/Switch:1^Z^Scond/ExpandDims/dim*

^DTdim^R^B0^C*^G
^AT^R^B0^A

Part of .pbtxt file content with graph_util.remove_training_nodes:
^Kcond/Switch^R^FSwitch^Z^DLess^Z^DLess*^G
^AT^R^B0

L
^Scond/ExpandDims/dim^R^EConst^Z^Mcond/Switch:1*^R
^Evalue^R       B^G^H^C^R^@:^A^@*^K
^Edtype^R^B0^C
`
^Vcond/ExpandDims/Switch^R^FSwitch^Z^Mconvert_image^Z^DLess*^G
^AT^R^B0^A*
^F_class^R^V
^T^R^Rloc:@convert_image
a
^Ocond/ExpandDims^R
ExpandDims^Z^Xcond/ExpandDims/Switch:1^Z^Scond/ExpandDims/dim*

^DTdim^R^B0^C*^G
^AT^R^B0^A

@petewarden any clue maybe?
Just checking @isiosia that this is not related to Identity nodes?

FYI.
As an attempt to avoid this error,I modified the code in graph_util_impl.py at L295:
  types_to_splice = {"Identity": True}
  names_to_splice = {}
  for node in nodes_after_removal:
    if node.op in types_to_splice:
      # We don't want to remove nodes that have control edge inputs, because
      # they might be involved in subtle dependency issues that removing them
      # will jeopardize.
      has_control_edge = False
      for input_name in node.input:
      ''' ##      >>>>modified here>>>origin code:
        if re.match(r"^\^", input_name):
      ''' ##      >>>>modified code:
        if re.match(r"^\^", input_name) or \
           re.match(r".*/cond.*", input_name):
#    ''' ##      <<<<modefied end<<<
          has_control_edge = True

and it seems working well so far.

OK, interesting, thanks for debugging! If @petewarden is OK with this, then it might a good idea to send out a PR.

Unfortunately using the name to detect conditionals is pretty fragile, since lots of non-conditionals could match "./cond." too. As a workaround, it might be better to supply a list of node names or patterns not to remove as an argument to the function.

It has been 14 days with no activity and the awaiting tensorflower label was assigned. Please update the label and/or status accordingly.


Incorrect type inferring

Bug Report
A type of variable is inferreed incorrectly inside if block in case when it seems that it's possible to infer it as a more precise type (see the code below).
🔎 Search Terms
infer type
🕗 Version & Regression Information

This is the behavior in every version I tried

⏯ Playground Link
Playground link with relevant code
💻 Code

interface Data1 { xz1: number; }
interface Data2 { xz1: number; xz2: number; }
interface Data3 { xz1: number; xz3: number; }

const enum Type {
	Type1,
	Type2,
	Type3,
}

interface TypeToDataMap {
    [Type.Type1]: Data1;
    [Type.Type2]: Data2;
    [Type.Type3]: Data3;
}

function xz3<TType extends keyof TypeToDataMap>(type: TType, data: TypeToDataMap[TType]): void {
    if (type === Type.Type1) {
        console.log(data); // data is inferred here as Data1 | Data2 | Data3
    }
}

🙁 Actual behavior
The type of data is incrorrect inside if (type === Type.Type1) - Data1 | Data2 | Data3
🙂 Expected behavior
The type of data is correct inside if (type === Type.Type1) - Data1

Your assumption that type refers to data is wrong.
This is a legit call: xz3<Type.Type1 | Type.Type2 | Type.Type3>(Type.Type2, { xz1: 1, xz3: 1 })

Ah, OK, got it.
In other words we can use the type of the first argument Type.Type2 | Type.Type3 and in this case the type of the second will be something like Data2 & Data3

We need a restriction like <TType extends onekeyof TypeToDataMap> 🙂

@kirchet

We need a restriction like <TType extends onekeyof TypeToDataMap> 🙂

https://github.com/microsoft/TypeScript/issues/27808

Added one more thumbs up


Fix conda release by adding pyarrow-hotfix dependency

Fix conda release by adding pyarrow-hotfix dependency.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Once this PR is merged, we should upload the missing version to conda.
@lhoestq you did this in the past. If you tell me your approach (I see a tag called VERSION...), I could do it myself.

Maybe open a PR against the 2.14 branch and update release-conda.yml like this ?
- on:
-   push:
-     tags:
-       - "[0-9]+.[0-9]+.[0-9]+*"
+ on: push

and then set it back to normal after the release is done

After having cherry-picked the commit in this PR, I have released the conda package. See:

https://github.com/huggingface/datasets/actions/runs/6880182419/job/18713812449
https://anaconda.org/HuggingFace/datasets/files?version=2.14.7

I am merging this PR.


⚠ Bofrost.nl has degraded performance

In c6e62f4, Bofrost.nl (https://www.bofrost.nl) experienced degraded performance:

HTTP code: 200
Response time: 1156 ms

Resolved: Bofrost.nl performance has improved in 2cb0f02 after 6 minutes.