Bug: constrained string regex + min/max length may produce invalid values

When a Field specified both max_length and regex that includes start and end of string tokens and a repeatable pattern can lead to generation of invalid string value that leads to ValidationError. See reproduction:
from pydantic import BaseModel, Field
from pydantic_factories import ModelFactory
from pydantic_factories.value_generators.regex import RegexFactory

PATTERN = r'^a+b$'
GOOD_SEED = 0
BAD_SEED = 5

class A(BaseModel):
    a: str = Field(..., regex=pattern, min_length=2, max_length=10)

class AF(ModelFactory[A]):
    __model__=A

AF.seed_random(GOOD_SEED)
print(AF.build()) # a='aaaaaaab'

print(RegexFactory(seed=BAD_SEED)(pattern)) # aaaaaaaaaab
AF.seed_random(BAD_SEED)
print(AF.build()) # this breaks

Traceback (most recent call last):
  File "[redacted]reproduce-bug.py", line 18, in <module>
    print(AF.build()) # This breaks
  File "[redacted]/factory.py", line 724, in build
    return cast("T", cls.__model__(**kwargs))  # pyright: ignore
  File "pydantic/main.py", line 342, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for A
a
  string does not match regex "^a+b$" (type=value_error.str.regex; pattern=^a+b$)

As far as I can tell, this is a result of this piece of code cutting off the end of string after calling RegexFactory. I was surprised that the test suite didn't catch this error earlier, but to my surprise the test case that is supposed to verify this behavior will not report any issues if the string produced by handle_constrained_string doesn't match the regex. Not sure if that was done on purpose, but adding assert match is not None leads to this test failing.
I can't think of a quick solution to this issue, however I think having a note in the documentation regarding regex fields could be helpful.
I am interested in working on a more structured solution to this issue, unless it's unlikely to be merged. :)

Hi Andrii

I am interested in working on a more structured solution to this issue, unless it's unlikely to be merged. :)

It would be great if you do so. I am willing to help.

will not report any issues if the string produced by handle_constrained_string doesn't match the regex

I've encountered a similar problem recently (see #118) so we definitely need to adjust tests or add more tests that would do full "end2end" testing making sure that generated values do not raise ValidationErrors if supplied to constrained fields.

Right on, I'll make sure to get some time to work on this in the coming days, will get back to you once I have a clearer idea of a solution here.

@Goldziher I want to take care of it soon and it seems that we need to change this part
We have to pass min_length and max_length to RegexFactory.__call__ in order to be able to generate proper strings for regexes that contain repetitions and patterns like ^..$. So my idea is to completely get rid of the highlighted part in the handle_constrained_string and instead alter limit for repetitions parts iteratively.
WDYT?

sure

Is this still not fixed?

Is this still not fixed?

Unfortunately, no.

Well, that's a shame indeed. I'll have to see if I can work on making a PR in the coming weeks, because this project is really useful and it'd be a shame to leave it in a broken state :)

Well, that's a shame indeed. I'll have to see if I can work on making a PR in the coming weeks, because this project is really useful and it'd be a shame to leave it in a broken state :)

That would be awesome if you could raise a PR!

Starting work on the PR for this issue. Does anyone have any extra guidance before I begin?

Wouldn't wrapping the regex into a non-capturing group work? Say your regex is pattern, you could feed this string to the regex factory: (?:pattern){min,max}

@nocturn9x sorry for the delayed response. Unfortunately, I don't have any suggestions. I'm probably not the best person when it comes to regex. As long as you have a solution with corresponding tests that pass, I think we'll be good to go :)

The thing I realized is that this is a much more complicated issue than it seems. On a theoretical level, a regex engine is a Deterministic Finite Automaton (or a Nondeterministic one, if it implements PCRE-like features). A regex is basically a recipe for building an automaton that can accept or reject a given input string (it defines a regular language). Now, if we want to add length constraints to it, we need to have another DFA (or NFA) that does that: mathematically, the construction is rather simple (it's just the Cartesian product of the two), and it is known that the intersection of two DFAs (or NFAs) always exists; In practice this means we'd need an automaton that has as many states as the one built for the regex, and the input string would need to be accepted by both to be valid. That is a rather non-trivial problem to solve, especially if performance is a concern

Also, another thing: we have to remember that it may not always be possible to generate a string that can match a regex and stay within some defined length constraints. For example, if we had something as simple as (a|b|c)[0-9]+ and we wanted it to be of length 1, it would be impossible to generate a string that satisfies both conditions (because the pattern itself mandates at least 2 symbols). This is something that can likely be detected ahead of time and accounted for by raising some sort of exception

@nocturn9x any updates on this?

Heh, currently no. It's a much more complicated issue than it seems at first

I think logically there is no way to consistently solve this problem.
Regex pattern complexity is potentially unbounded, and there is no way to know where to restrict the length of an output string without carefully parsing the regex, which can yield very complex results (imagine many nested groups and |s), which can even conflict! Nothing really stops a user from using a pattern that violates the min_length or max_length restrictions, and if a system to verify these restrictions were to be added, it would fall upon Pydantic (in this case) to implement it.
I think Polyfactory shouldn't try to solve such a hard problem. This SO question asks for how to calculate the maximum and minimum length of strings that would match a regex (with no practical or easy solution at the time of writing this) which could be used to simply compare the minimum and maximum with any min_length and max_length to fail early if there is a mismatch, but again, I don't think it's Polyfactory's work to do this, and parsing the pattern would be rather expensive.
IMO, when there is a pattern defined, Polyfactory should just respect it, ignoring any other restriction that may conflict (like min_length or max_length). Maybe a warning can be fired if regex restrictions are found together with potentially conflicting others. This should be documented in any case.

@berzi I agree with your assessment. This is a highly non-trivial problem to solve, and even a hypothetical solution would probably be quite computationally expensive

@berzi, @nocturn9x thanks for your input! I agree with both of your assessment as well. I was thinking of raising an error instead of a warning. My reasoning is that if the produced string doesn't conform to the constraints, then it will result in a validation error by whichever library they're using for validation. At that point, the users may think that this is a bug from the side of polyfactory.

I think logically there is no way to consistently solve this problem.
Regex pattern complexity is potentially unbounded, and there is no way to know where to restrict the length of an output string without carefully parsing the regex, which can yield very complex results (imagine many nested groups and |s), which can even conflict! Nothing really stops a user from using a pattern that violates the min_length or max_length restrictions, and if a system to verify these restrictions were to be added, it would fall upon Pydantic (in this case) to implement it.
I think Polyfactory shouldn't try to solve such a hard problem. This SO question asks for how to calculate the maximum and minimum length of strings that would match a regex (with no practical or easy solution at the time of writing this) which could be used to simply compare the minimum and maximum with any min_length and max_length to fail early if there is a mismatch, but again, I don't think it's Polyfactory's work to do this, and parsing the pattern would be rather expensive.
IMO, when there is a pattern defined, Polyfactory should just respect it, ignoring any other restriction that may conflict (like min_length or max_length). Maybe a warning can be fired if regex restrictions are found together with potentially conflicting others. This should be documented in any case.

Actually, reading the linked SO answer it doesn't seem like it would be too hard to implement something that can at least tell what the minimum and maximum bounds for a regex are, and error out if they're not within some user-defined conditions. Turn the regex into an NFA, remove reject states, then use Dijkstra (or BF) to find out the shortest path to an accepting state (the resulting path length will be the minimum length that such automaton will accept). For the maximum length, use DFS or a similar algorithm to detect if the graph of the automaton has cycles: if it does, the max length of a match is infinity, if it doesn't then find the longest path that ends in an accept state (probably by brute force, as any algorithms to do so are probably slow anyway). This would at least make sure that the library can detect an invalid combination of pattern/bounds, although it doesn't strictly speaking solve the generation part of the problem. Still, IMHO, better than nothing

I think logically there is no way to consistently solve this problem.
Regex pattern complexity is potentially unbounded, and there is no way to know where to restrict the length of an output string without carefully parsing the regex, which can yield very complex results (imagine many nested groups and |s), which can even conflict! Nothing really stops a user from using a pattern that violates the min_length or max_length restrictions, and if a system to verify these restrictions were to be added, it would fall upon Pydantic (in this case) to implement it.
I think Polyfactory shouldn't try to solve such a hard problem. This SO question asks for how to calculate the maximum and minimum length of strings that would match a regex (with no practical or easy solution at the time of writing this) which could be used to simply compare the minimum and maximum with any min_length and max_length to fail early if there is a mismatch, but again, I don't think it's Polyfactory's work to do this, and parsing the pattern would be rather expensive.
IMO, when there is a pattern defined, Polyfactory should just respect it, ignoring any other restriction that may conflict (like min_length or max_length). Maybe a warning can be fired if regex restrictions are found together with potentially conflicting others. This should be documented in any case.

Actually, reading the linked SO answer it doesn't seem like it would be too hard to implement something that can at least tell what the minimum and maximum bounds for a regex are, and error out if they're not within some user-defined conditions. Turn the regex into an NFA, remove reject states, then use Dijkstra (or BF) to find out the shortest path to an accepting state (the resulting path length will be the minimum length that such automaton will accept). For the maximum length, use DFS or a similar algorithm to detect if the graph of the automaton has cycles: if it does, the max length of a match is infinity, if it doesn't then find the longest path that ends in an accept state (probably by brute force, as any algorithms to do so are probably slow anyway). This would at least make sure that the library can detect an invalid combination of pattern/bounds, although it doesn't strictly speaking solve the generation part of the problem. Still, IMHO, better than nothing

That sounds like a significant performance cost (consider that users may have many fields with arbitrarily large regexes) for not very much, especially if the best goal that can be achieved is guarding for errors: the alternative of simply detecting the presence of quasi-incompatible fields is computationally negligible and achieves the same.
In practice, any user that writes a regex either can encode the maximum length in the regex itself or automatically receives a length requirement. A pattern like abc[0-9] will only ever accept a length of exactly 4; a pattern like the OP's ^a+b$ could (or should, even) just as easily replace the + with a length rule. I can't think of any real use case where regex and min/max lengths have a reason to exist together, but allowing this to be done is, as you yourself describe, rather cumbersome and imperfect, even if it's technically possible.

I think logically there is no way to consistently solve this problem.
Regex pattern complexity is potentially unbounded, and there is no way to know where to restrict the length of an output string without carefully parsing the regex, which can yield very complex results (imagine many nested groups and |s), which can even conflict! Nothing really stops a user from using a pattern that violates the min_length or max_length restrictions, and if a system to verify these restrictions were to be added, it would fall upon Pydantic (in this case) to implement it.
I think Polyfactory shouldn't try to solve such a hard problem. This SO question asks for how to calculate the maximum and minimum length of strings that would match a regex (with no practical or easy solution at the time of writing this) which could be used to simply compare the minimum and maximum with any min_length and max_length to fail early if there is a mismatch, but again, I don't think it's Polyfactory's work to do this, and parsing the pattern would be rather expensive.
IMO, when there is a pattern defined, Polyfactory should just respect it, ignoring any other restriction that may conflict (like min_length or max_length). Maybe a warning can be fired if regex restrictions are found together with potentially conflicting others. This should be documented in any case.

Actually, reading the linked SO answer it doesn't seem like it would be too hard to implement something that can at least tell what the minimum and maximum bounds for a regex are, and error out if they're not within some user-defined conditions. Turn the regex into an NFA, remove reject states, then use Dijkstra (or BF) to find out the shortest path to an accepting state (the resulting path length will be the minimum length that such automaton will accept). For the maximum length, use DFS or a similar algorithm to detect if the graph of the automaton has cycles: if it does, the max length of a match is infinity, if it doesn't then find the longest path that ends in an accept state (probably by brute force, as any algorithms to do so are probably slow anyway). This would at least make sure that the library can detect an invalid combination of pattern/bounds, although it doesn't strictly speaking solve the generation part of the problem. Still, IMHO, better than nothing

That sounds like a significant performance cost (consider that users may have many fields with arbitrarily large regexes) for not very much, especially if the best goal that can be achieved is guarding for errors: the alternative of simply detecting the presence of quasi-incompatible fields is computationally negligible and achieves the same.
In practice, any user that writes a regex either can encode the maximum length in the regex itself or automatically receives a length requirement. A pattern like abc[0-9] will only ever accept a length of exactly 4; a pattern like the OP's ^a+b$ could (or should, even) just as easily replace the + with a length rule. I can't think of any real use case where regex and min/max lengths have a reason to exist together, but allowing this to be done is, as you yourself describe, rather cumbersome and imperfect, even if it's technically possible.

Heh, wish I could tell that to a client of ours that is hellbent on enforcing both. Alas, the current solution I implemented is the good ol' try until you succeed method (also known as generating the string in a while loop until Pydantic is happy, which is utterly horrible, but it works :'))

I think logically there is no way to consistently solve this problem.
Regex pattern complexity is potentially unbounded, and there is no way to know where to restrict the length of an output string without carefully parsing the regex, which can yield very complex results (imagine many nested groups and |s), which can even conflict! Nothing really stops a user from using a pattern that violates the min_length or max_length restrictions, and if a system to verify these restrictions were to be added, it would fall upon Pydantic (in this case) to implement it.
I think Polyfactory shouldn't try to solve such a hard problem. This SO question asks for how to calculate the maximum and minimum length of strings that would match a regex (with no practical or easy solution at the time of writing this) which could be used to simply compare the minimum and maximum with any min_length and max_length to fail early if there is a mismatch, but again, I don't think it's Polyfactory's work to do this, and parsing the pattern would be rather expensive.
IMO, when there is a pattern defined, Polyfactory should just respect it, ignoring any other restriction that may conflict (like min_length or max_length). Maybe a warning can be fired if regex restrictions are found together with potentially conflicting others. This should be documented in any case.

Actually, reading the linked SO answer it doesn't seem like it would be too hard to implement something that can at least tell what the minimum and maximum bounds for a regex are, and error out if they're not within some user-defined conditions. Turn the regex into an NFA, remove reject states, then use Dijkstra (or BF) to find out the shortest path to an accepting state (the resulting path length will be the minimum length that such automaton will accept). For the maximum length, use DFS or a similar algorithm to detect if the graph of the automaton has cycles: if it does, the max length of a match is infinity, if it doesn't then find the longest path that ends in an accept state (probably by brute force, as any algorithms to do so are probably slow anyway). This would at least make sure that the library can detect an invalid combination of pattern/bounds, although it doesn't strictly speaking solve the generation part of the problem. Still, IMHO, better than nothing

That sounds like a significant performance cost (consider that users may have many fields with arbitrarily large regexes) for not very much, especially if the best goal that can be achieved is guarding for errors: the alternative of simply detecting the presence of quasi-incompatible fields is computationally negligible and achieves the same.
In practice, any user that writes a regex either can encode the maximum length in the regex itself or automatically receives a length requirement. A pattern like abc[0-9] will only ever accept a length of exactly 4; a pattern like the OP's ^a+b$ could (or should, even) just as easily replace the + with a length rule. I can't think of any real use case where regex and min/max lengths have a reason to exist together, but allowing this to be done is, as you yourself describe, rather cumbersome and imperfect, even if it's technically possible.

Heh, wish I could tell that to a client of ours that is hellbent on enforcing both. Alas, the current solution I implemented is the good ol' try until you succeed method (also known as generating the string in a while loop until Pydantic is happy, which is utterly horrible, but it works :')). For what it's worth though, I agree: mixing regular expressions and length constraints constitutes a misuse of the tool

If you're interested, I have an old (now abandoned) project where I basically made an engine to make regexes generate strings rather than parse them: https://gitlab.com/brzrkr/genex
I abandoned it because it stopped being fun, but it kinda works. Except it explodes if the regex is too complex. But it might serve as inspiration I guess. (Disclaimer: it's old code so it might suck.)


Update to Next.js 15 with Typed App Router, Data Fetching, and Shopify Client Organization

Description:
Upgrade project to Next.js 15 and implement the new typed App Router.
Refactor data fetching to align with the latest Next.js practices.
Improve the organization and structure of the Shopify client to enhance maintainability and performance.
Tasks:
Upgrade Next.js to version 15.
Update routing to use the typed App Router.
Refactor data-fetching methods for improved consistency.
Reorganize Shopify client structure for better code clarity and efficiency.
Notes:
Ensure backward compatibility where necessary and optimize for any breaking changes introduced in Next.js 15.

This is on Next 15 and the recommended patterns!


Bump clickhouse server version

Fixes excessively high CPU and RAM usage on idling instance
All the following graphs are stacked CPU time / container, and the largest area is the clickhouse server. Spikes are not relevant except for the fact they indicate a restart of the plausible and clickhouse containers.
Upgrading from the latest compose file from the analytics repo caused the following increase in CPU usage from clickhouse

Upgrading clickhouse to the latest version brought it back to a much lower level

Notice how the CPU usage was steadily increasing after I upgraded (even across restarts of the docker container)

After a longer test, the CPU and RAM load are still significantly higher than they were before the update.
Seems like restoring changes that were introduced in https://github.com/plausible/community-edition/pull/13 helps as well, but still nowhere clause the <1% CPU usage it was at before the update
Even though it is much less noticeable, the plausible container itself has doubled its CPU usage since the update.
Checking clickhouse's debug log shows that plausible is frequently performing queries in the background, even when there are no visitors to any of my websites

I let it run for a while, and I confirm the tweaks from #13 helped decrease the CPU usage further


Externalize files

Move JS and CSS to external files
Add

@jasondlee not sure we need to split css in 2, at least for now all decks will use same style, but if we are going to do that it would make more sense to put whole style from dszlides on default, and then override to our style on wildfly?

@jasondlee not sure we need to split css in 2, at least for now all decks will use same style, but if we are going to do that it would make more sense to put whole style from dszlides on default, and then override to our style on wildfly?
Other than this "slides POV existencial question" all seems good to me, tried the onstage controlling on both safari and chrome.

@emmartins Yes. I was thinking that wildfly.css would be the changes specific to our needs, while the other would remain as close to upstream as possible. I put them in two files largely because they were in two different

thanks @jasondlee


Fixed the operationId of get/put/delete action

MSFT employees can try out our new experience at OpenAPI Hub  - one location for using our validation tools and finding your workflow.

Changelog
Please ensure to add changelog with this PR by answering the following questions.

What's the purpose of the update?

[ ] new service onboarding
[ ] new API version
[ ] update existing version for new feature
[ ] update existing version to fix swagger quality issue in s360
[x] Other, please clarify - update existing version to fix an issue in the operation ids of a particular endpoint (out of 4 operations, 3 were defined with incorrect operation id)

When you are targeting to deploy new service/feature to public regions? Please provide date, or month to public if date is not available yet.
When you expect to publish swagger? Please provide date, or month to public if date is not available yet.
If it's an update to existing version,  please select SDKs of specific language and CLIs that require refresh after swagger is published.

[x] SDK of .NET (need service team to ensure code readiness)
[ ] SDK of Python
[ ] SDK of Java
[ ] SDK of Js
[ ] SDK of Go
[x] PowerShell
[x] CLI
[ ] Terraform
[ ] No, no need to refresh for updates in this PR

Contribution checklist:

[x] I commit to follow the Breaking Change Policy of “no breaking changes
[x] I have reviewed the documentation for the workflow.
[x] Validation tools were run on swagger spec(s) and errors have all been fixed in this PR. How to fix?

If any further question about AME onboarding or validation tools, please view the FAQ.
ARM API Review Checklist

[ ] Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.

Adding new API(s)
Adding a new API version
Adding a new service

[ ] Please ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

[ ] If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist
If there are following updates in the PR, ensure to request an approval from API Review Board as defined in the Breaking Change Policy.

[ ] Removing API(s) in stable version
[ ] Removing properties in stable version
[ ] Removing API version(s) in stable version
[ ] Updating API in stable version with Breaking Change Validation errors
[ ] Updating API(s) in preview over 1 year

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
Please follow the link to find more details on PR review process.

@erich-wang I'm aware that chaning the operation id is considered a breaking change because it changes the function name in the SDK, but currently we don't have an officail SDK yet (just a preview version).

@erich-wang I'm aware that chaning the operation id is considered a breaking change because it changes the function name in the SDK, but currently we don't have an officail SDK yet (just a preview version).

@dosegal, I don't have permission to merge this PR as it is marked with breaking change by CI. You still need go thru the process to get exception,  thanks.

Hi @dosegal, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review.
Action: To initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
If you want to know the production traffic statistic, please see ARM Traffic statistic.
If you think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ms/swaggerfeedback.

@dosegal, I don't have permission to merge this PR as it is marked with breaking change by CI. You still need go thru the process to get exception,  thanks.

Hi @dosegal, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review.
Action: To initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
If you want to know the production traffic statistic, please see ARM Traffic statistic.
If you think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ms/swaggerfeedback.

@mikhailshilkov this is a good point, I agree with you. However, the use of this API is relatively limited and we wanted not to carry this annoying mistake throughout the API lifetime, a mistake that can also confuse the API consumers.
We also verified that the impact on such tools is relatively small - most of the calls are from a client we generated for our E2E. The rest, much less, are powershell / python scripts.

@mikhailshilkov this is a good point, I agree with you. However, the use of this API is relatively limited and we wanted not to carry this annoying mistake throughout the API lifetime, a mistake that can also confuse the API consumers.
We also verified that the impact on such tools is relatively small - most of the calls are from a client we generated for our E2E. The rest, much less, are powershell / python scripts.


Can't build.

==> Starting build()...
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
host_os_version=0
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/sorcus/mxml/src/mxml':
configure: error: C compiler cannot create executables
See `config.log' for more details
==> ERROR: A failure occurred in build().
    Aborting...

config.log - https://gist.github.com/MrSorcus/eaff21bbc650a1e4711c082a56428535
Linux vs0 4.10.11-1-ARCH #1 SMP PREEMPT Tue Apr 18 08:39:42 CEST 2017 x86_64 GNU/Linux

Looks like the configure script has not been regenerated, but otherwise the error you are getting indicates a bad or missing compiler. The config.log file shows the following error:
/usr/bin/ld: cannot find -lgcc_s

which points to you missing one of the GCC support libraries...

Same error on ubuntu 64 bit.
It's the configure script that can not deal with recent gcc versions. For example it tries to use the cmdline switch -V which is unknown to recent gcc:
./configure outputs:
mario@mbox:~/z/mxml$ ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in /home/mario/z/mxml': configure: error: C compiler cannot create executables See config.log' for more details
config.log shows:
gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)
configure:2696: $? = 0
configure:2685: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2696: $? = 1
configure:2685: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:2696: $? = 1
configure:2716: checking whether the C compiler works
configure:2738: gcc    conftest.c  >&5
/usr/bin/x86_64-linux-gnu-ld: cannot find Scrt1.o: No such file or directory
/usr/bin/x86_64-linux-gnu-ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
configure:2742: $? = 1
configure:2780: result: no


User details required

Required details:
User Name,
Last Visited,
Email
user image

@MARZOOQUE Endpoint to read organisation admin profile details - https://consent-bb-swagger.igrant.io/v2023.8.2/index.html#get-/onboard/admin


update bubble_sort.py in tasks/python/medium

Pull Request Type
What kind of change does this PR introduce?
[ ] Solved an issue/task
What is the current behavior?
empty function yet to be implemented for given algorithm
What is the new behavior?
implements the function correctly
Other information
Here is the attached screenshot to where i solved it

Merged

This is an automated message from Fork, Commit, Merge [BOT].

Thank you for your contribution! Your pull request has been merged. The files have been reset for the next contributor.
What's next?
If you're looking for more ways to contribute, I invite you to check out our forkcommitmerge.io website repository. The repository contain real issues that you can help to resolve or create some of your own if you see any bugs or want to add new features to the site, etc. You can also check out the Influences section in the README to find more projects similar to this one.
Also please leave a star to this project if you feel it helped you, i would really appreciate it.
I look forward to seeing your contributions!


TWO PAGE PDF GENERATED

Though the HTML was of single page and after converting it into PDF, everything fits in well. But, a single blank page is attached to the PDF file. I don't need the second page. Need help in how to avoid generation of that extra page.

Having the same issue

@marcbachmann  Can you please have  a look into this issue please?

please provide more info. html & config to reproduce would be nice.

var html = fs.readFileSync(channelConfig.customerInvoicePath+invoiceNumber+'.html', 'utf8');
							var options = { header: {contents: '' }, footer: { contents: { default: '{{page}}'}}, height: '2000px', width: '1414.227124876255px', border: {top: '1cm', right: '1cm', bottom: '1cm', left: '1cm'}, zoomFactor: '1' };
							pdf.create(html, options).toFile(channelConfig.customerInvoicePath+invoiceNumber+'.pdf', function(err, res) {

									invoiceDocGenResultObj.orderNumber = invoiceNumber;
									invoiceDocGenResultObj.docGenStatus = 'success';
									resultArray.push(invoiceDocGenResultObj);
									return fulfill(resultArray);
							});
						}

This is the config file. should i append the html too? I have written it in xml and have parsed it into html. should i append the whole xml file?

I'm using handlebars templates, below is html file generated:
https://drive.google.com/file/d/0B5CJVwHYW_QOYVNEY1pCTGp0Zlk/view?usp=sharing
and the page setup I'm using:
{
  "format": "A4",
  "orientation": "portrait",
  "border": {
    "left": "1cm",
    "right": "1cm",
    "top": "1cm",
    "bottom": "1cm"
  },
  "header": {
    "height": "20mm"
  },
  "footer": {
    "height": "10mm"
  }
}

I am also having the same issue, one blank page is attached to the pdf file, and the config I'm using,
{                 zoomFactor: 1.0,                 viewportSize: {                     width: 1200,                     height: 1280                 },                 "border": {                     "top": "0",                     "right": "1in",                     "bottom": "0",                     "left": "1in"                 },                 "format": "A4",                 "orientation": "portrait",                 "footer": {                     "height": "28mm",                     "contents": {                         default: 'Page {{page}}'                     }                 } }

Hi guys, I had this in the CSS which was causing it for me;
.page {
    page-break-after: always;
}

Changing to this fixed it:
.page {
    page-break-after: always;
}

.page:last-of-type {
    page-break-after: auto
}

@chrisrickard  Nice, that solved my issue, thanks!

Thanks @chrisrickard , working for me too!!

Taking out the footer config removed the extra page, but now I don't have a footer. 👀

Adding viewport height to the body resolved my issue
body {
height:100vh;
}

Adding viewport height to the body resolved my issue
body {
height:100vh;
}

This is my html.
var html = "\n" +
"
\n" +
"
\n" +
"       Certificate of Completion\n" +
"       \n" +
"       This is to certify that\n" +
"       \n" +
"       "+user.local.name+"\n" +
"       has completed the course \n" +
"       "+course.course_name+" \n" +
"       an online course offered through AMP Digital \n" +
"       dated\n" +
"      #set ($dt = $DateFormatter.getFormattedDate($grade.getAwardDate(), "MMMM dd, yyyy"))\n" +
"      $dt\n" +
"\n" +
""
How can I fix this issue, i.e. where to change CSS?

Adding viewport height to the body resolved my issue
body {
height:100vh;
}

Thank you. Worked for me too,

Is there a way to generate one page in PORTRAIT and the next one in LANDSCAPE for the same PDF?

Adding viewport height to the body resolved my issue
body {
height:100vh;
}

Thank you. Worked for me too,

Adding viewport height to the body resolved my issue
body {
height:100vh;
}

Worked for me too


Move f8tenant to use Openshift Template based deployment

depends on https://github.com/almighty/almighty-jobs/pull/134

looks good


Fork Cabal library & cabal-install for bootstrapping

We should build a forked version of Cabal built with GHC 7.10.3 that will help us compile the rest of the packages easily. It should be customised to deal with the specifics of GHCVM.

This is done now. See the history of cabalvm.


Decide on user and timetable information storing

Describe the task that needs to be done.
Communicate between user and timetable teams to decide how to store user data, including courses they take.
Describe how a solution to your proposed task might look like (and any alternatives considered).
Know how timetables fit into the user data structure
Notes

I understand this issue is being discussed in your meeting tonight, but just hoping that more details can be added to this for the proposed solution once decided
currently blocking #49

Discusssed in team meeting 3/20/2022, closed


Fix handling of healthcheck from image

proposed fix for #3525 cmd/podman/shared/create.go:
If the image doesn't provide any options, e.g. interval, timeout, etc.,
then apply the standard defaults when creating the container. Now podman
correctly schedules the healtcheck service & timer for the container.

proposed fix for #3507 libpod/healthcheck.go

remove duplicate check, already called in HealthCheck()
reject zero-length command list
check for Docker command list, starting with NONE, CMD or CMD-SHELL
otherwise pass command list as-is to container

/ok-to-test

Checking if failure is a flake...
/test special_testing_rootless TEST_REMOTE_CLIENT:false

/test special_testing_rootless

That one's a known flake. For reference, the /retest commands don't work on most tests - you need to go into the page for the failing test, and click the restart link

Tests with Docker V1 images, generated on Fedora 30 with default docker installation. F30 podman package rebuilt with WIP patches included.

Dockerfile HEALTHCHECK line
output from podman image inspect <IMAGE> | fgrep HEALTHCHECK
output from podman container inspect --format {{json .Config.HealthCheck}} test
output from systemctl --user show <CONTAINER ID>.timer | fgrep TimersMonotonic=
output from podman --log-level=debug healthcheck run test 2>&1 | fgrep "executing health check command"

Healthcheck disabled
1 - HEALTHCHECK NONE
2 - HEALTHCHECK \u0026{[\"NONE\"] \"0s\" \"0s\" '\\x00'}
3 - null
4 - timer not found (i.e. none scheduled)
5 - ERRO[0000] container <CONTAINER ID> has no defined healthcheck

Healthcheck with one command
1 - HEALTHCHECK CMD /bin/true
2 - HEALTHCHECK \u0026{[\"CMD-SHELL\" \"/bin/true\"] \"0s\" \"0s\" '\\x00'}
3 - {"Test":["CMD-SHELL","/bin/true"],"Interval":30000000000,"Timeout":30000000000,"Retries":3}
4 - TimersMonotonic={ OnUnitInactiveUSec=30s ...
5 - executing health check command /bin/sh -c /bin/true for <CONTAINER ID>

Healthcheck with 1-element command list
1 - HEALTHCHECK CMD ["/bin/true"]
2 - HEALTHCHECK \u0026{[\"CMD\" \"/bin/true\"] \"0s\" \"0s\" '\\x00'}
3 - {"Test":["CMD","/bin/true"],"Interval":30000000000,"Timeout":30000000000,"Retries":3}
4 - TimersMonotonic={ OnUnitInactiveUSec=30s ...
5 - executing health check command /bin/true for <CONTAINER ID>

Healthcheck with 2-element command list
1 - HEALTHCHECK CMD ["/bin/echo", "test"]
2 - HEALTHCHECK \u0026{[\"CMD\" \"/bin/echo\" \"test\"] \"0s\" \"0s\" '\\x00'}
3 - {"Test":["CMD","/bin/echo","test"],"Interval":30000000000,"Timeout":30000000000,"Retries":3}
4 - TimersMonotonic={ OnUnitInactiveUSec=30s ...
5 - executing health check command /bin/echo test for <CONTAINER ID>

Healthcheck with one command and non-default interval
1 - HEALTHCHECK --interval=40s CMD /bin/true
2 - HEALTHCHECK \u0026{[\"CMD-SHELL\" \"/bin/true\"] \"40s\" \"0s\" '\\x00'}
3 - {"Test":["CMD-SHELL","/bin/true"],"Interval":40000000000,"Timeout":30000000000,"Retries":3}
4 - TimersMonotonic={ OnUnitInactiveUSec=40s
5 - executing health check command /bin/sh -c /bin/true for <CONTAINER ID>

Healthcheck with one command and non-default timeout
1 - HEALTHCHECK --timeout=50s CMD ["/bin/true"]
2 - HEALTHCHECK \u0026{[\"CMD-SHELL\" \"/bin/true\"] \"0s\" \"50s\" '\\x00'}
3 - {"Test":["CMD-SHELL","/bin/true"],"Interval":30000000000,"Timeout":50000000000,"Retries":3}
4 - TimersMonotonic={ OnUnitInactiveUSec=30s ...
5 - executing health check command /bin/sh -c /bin/true for <CONTAINER ID>

Healthcheck with one command and non-default retries
1 - HEALTHCHECK --retries=10 CMD ["/bin/true"]
2 - HEALTHCHECK \u0026{[\"CMD-SHELL\" \"/bin/true\"] \"0s\" \"0s\" '\\n'}
3 - {"Test":["CMD-SHELL","/bin/true"],"Interval":30000000000,"Timeout":30000000000,"Retries":10}
4 - TimersMonotonic={ OnUnitInactiveUSec=30s ...
5 - executing health check command /bin/sh -c /bin/true for <CONTAINER ID>

Tests with Docker V2 images, generated on Fedora 30 with Docker CE 19.03 installation. F30 podman package rebuilt with WIP patches included.

Dockerfile HEALTHCHECK line
output from podman image inspect <IMAGE> | fgrep HEALTHCHECK
output from podman container inspect --format {{json .Config.HealthCheck}} test
output from systemctl --user show <CONTAINER ID>.timer | fgrep TimersMonotonic=
output from podman --log-level=debug healthcheck run test 2>&1 | fgrep "executing health check command"

Healthcheck disabled
1 - HEALTHCHECK NONE
2 - HEALTHCHECK \u0026{[\"NONE\"] \"0s\" \"0s\" \"0s\" '\\x00'}
3 - null
4 - timer not found (i.e. none scheduled)
5 - ERRO[0000] container <CONTAINER ID> has no defined healthcheck

Healthcheck with one command
1 - HEALTHCHECK CMD /bin/true
2 - HEALTHCHECK \u0026{[\"CMD-SHELL\" \"/bin/true\"] \"0s\" \"0s\" \"0s\" '\\x00'}
3 - {"Test":["CMD-SHELL","/bin/true"],"Interval":30000000000,"Timeout":30000000000,"Retries":3}
4 - TimersMonotonic={ OnUnitInactiveUSec=30s ...
5 - executing health check command /bin/sh -c /bin/true for <CONTAINER ID>

Healthcheck with 1-element command list
1 - HEALTHCHECK CMD ["/bin/true"]
2 - HEALTHCHECK \u0026{[\"CMD\" \"/bin/true\"] \"0s\" \"0s\" \"0s\" '\\x00'}
3 - {"Test":["CMD","/bin/true"],"Interval":30000000000,"Timeout":30000000000,"Retries":3}
4 - TimersMonotonic={ OnUnitInactiveUSec=30s ...
5 - executing health check command /bin/true for <CONTAINER ID>

Healthcheck with 2-element command list
1 - HEALTHCHECK CMD ["/bin/echo", "test"]
2 - HEALTHCHECK \u0026{[\"CMD\" \"/bin/echo\" \"test\"] \"0s\" \"0s\" \"0s\" '\\x00'}
3 - {"Test":["CMD","/bin/echo","test"],"Interval":30000000000,"Timeout":30000000000,"Retries":3}
4 - TimersMonotonic={ OnUnitInactiveUSec=30s ...
5 - executing health check command /bin/echo test for <CONTAINER ID>

Healthcheck with one command and non-default interval
1 - HEALTHCHECK --interval=40s CMD /bin/true
2 - HEALTHCHECK \u0026{[\"CMD-SHELL\" \"/bin/true\"] \"40s\" \"0s\" \"0s\" '\\x00'}
3 - {"Test":["CMD-SHELL","/bin/true"],"Interval":40000000000,"Timeout":30000000000,"Retries":3}
4 - TimersMonotonic={ OnUnitInactiveUSec=40s
5 - executing health check command /bin/sh -c /bin/true for <CONTAINER ID>

Healthcheck with one command and non-default timeout
1 - HEALTHCHECK --timeout=50s CMD /bin/true
2 - HEALTHCHECK \u0026{[\"CMD-SHELL\" \"/bin/true\"] \"0s\" \"50s\" \"0s\" '\\x00'}
3 - {"Test":["CMD-SHELL","/bin/true"],"Interval":30000000000,"Timeout":50000000000,"Retries":3}
4 - TimersMonotonic={ OnUnitInactiveUSec=30s ...
5 - executing health check command /bin/sh -c /bin/true for <CONTAINER ID>

Healthcheck with one command and non-default start period
1 - HEALTHCHECK --start-period=60s CMD /bin/true
2 - HEALTHCHECK \u0026{[\"CMD-SHELL\" \"/bin/true\"] \"0s\" \"0s\" \"1m0s\" '\\x00'}
3 - {"Test":["CMD-SHELL","/bin/true"],"StartPeriod":60000000000,"Interval":30000000000,"Timeout":30000000000,"Retries":3}
4 - TimersMonotonic={ OnUnitInactiveUSec=30s ...
5 - executing health check command /bin/sh -c /bin/true for <CONTAINER ID>

Healthcheck with one command and non-default retries
1 - HEALTHCHECK --retries=10 CMD /bin/true
2 - HEALTHCHECK \u0026{[\"CMD-SHELL\" \"/bin/true\"] \"0s\" \"0s\" \"0s\" '\\n'
3 - {"Test":["CMD-SHELL","/bin/true"],"Interval":30000000000,"Timeout":30000000000,"Retries":10}
4 - TimersMonotonic={ OnUnitInactiveUSec=30s ...
5 - executing health check command /bin/sh -c /bin/true for <CONTAINER ID>

From my PoV this PR is ready for final review & approval.

/approve

Healthcheck with empty command
1 - HEALTHCHECK CMD [""]
2 - HEALTHCHECK \u0026{[\"CMD\" \"\"] \"0s\" \"0s\" \"0s\" '\\x00'}
3 - {"Test":["CMD",""],"Interval":30000000000,"Timeout":30000000000,"Retries":3}
4 - TimersMonotonic={ OnUnitInactiveUSec=30s ...
5 - ERRO[0000] container <CONTAINER ID> has no defined healthcheck

i.e. podman does create the unit & timer, but any attempt to start the healthcheck is rejected by podman. Hence there are no attempts logged in the container and its health state stays at Starting.

Can I have a LGTM from the reviewers?

LGTM

@rhatdan @giuseppe @vrothberg PTAL

/lgtm


Update diagnostic-settings.md

The behavior warned of can equally occur from migrations across resource groups/subscriptions as well as from deletes, since moving a resource is essentially a delete/recreate from ARM's perspective

@rboucher - can you review the proposed changes?
IMPORTANT: When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team


Add exist event

This PR adds the new event EXIST triggered when the observed element already exists when the wait method is called. Previously the ADD was thrown to handle that use case. This allows to disambiguate such situations.
This is a breaking change though.

:tada: This PR is included in version 2.0.0-beta.7 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Add .GetTagValue() to validator.FieldError

First of all, I've read ALL issues about FieldName translation.
There's no clear way to properly translate field name, either on docs or issues comments. The easiest way is to use RegisterTagNameFunc (as many people do), and if you choose to do this way, you'll fail to translate any cross-field validation (as #621 pointed out), lose the possibility to get json tag value (to proper show errors on frontend forms) and you're stuck to a single translation forever.
As @deankarn pointed on #364, RegisterTagNameFunc was not designed to translation stuff, but for sending feedback to the caller (mostly with json tag value).
So, considering you use RegisterTagNameFunc properly with json tag you'll still have problems as RegisterTagNameFunc is ignored on cross-field validation (#621) and you'll have to implement your anykind-replacer for both PasswordConfirm and password_confirm (json tag) translations.
My proposal to solve these problems is to  (fix #621 and) give validator.FieldError access to custom tag values (.GetTagValue()). This solution could be cheap to implement and cheap to run translations (strings.Replace() do the job pretty well) .
Example code below:
package main

import (
	"encoding/json"
	"fmt"
	"reflect"
	"strings"

	"github.com/go-playground/locales/pt_BR"

	ut "github.com/go-playground/universal-translator"
	validator "github.com/go-playground/validator/v10"
	ptbr_translations "github.com/go-playground/validator/v10/translations/pt_BR"
)

var (
	uni      *ut.UniversalTranslator
	validate *validator.Validate
)

type S struct {
	Foo string `json:"foo" validate:"required,min=0" ptbr="Foo translation"`
	Bar string `json:"bar" validate:"max=4" ptbr="Bar translation"`
	Moo string `json:"moo" validate:"max=4" ptbr="Moo translation"`
	Boo string `json:"boo" validate:"eqfield=Moo" ptbr="Boo translation"`
}

func main() {

	ptbr := pt_BR.New()
	uni = ut.New(ptbr, ptbr)
	trans, _ := uni.GetTranslator("pt_BR")

	validate = validator.New()
	ptbr_translations.RegisterDefaultTranslations(validate, trans)

	validate.RegisterTagNameFunc(func(fld reflect.StructField) string {
		return fld.Tag.Get("json")
	})

	s := S{
		Foo: "",
		Bar: "kakaka",
		Moo: "lala",
		Boo: "lalal",
	}

	err := validate.Struct(s)
	valErrs := err.(validator.ValidationErrors)

	callerFeedback := map[string]string{}
	for _, e := range valErrs {
		callerFeedback[e.Field()] = strings.Replace(
			e.Translate(trans),
			e.Field(),
			e.GetTagValue("ptbr"), ///////////////////// new method ////////////////////
			-1,
		)
	}

	bJSON, _ := json.Marshal(callerFeedback)
	fmt.Println(string(bJSON)) // sending feedback
}

Even if  RegisterTagNameFunc was not designed to translation stuff,  this change could also help people on different scenarios and doesn't run out of lib goals.
Hope you all liked.

I generated this behaviour on my project side.


Use $GITHUB_OUTPUT file to avoid deprecation warning

Since https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ we get a warning in every action:

Can you please implement the new $GITHUB_OUTPUT file to set the outputs?
Thanks a lot!

@schlomo This has been fixed in v1.4.0. Thanks.

@schlomo I have now release v1.4.1 as well.


Write XMTP-specific content style guide

v1 provided - still very much a WIP: https://hq.xmtp.com/resources/content-style-guide


[hotfix][docs] Add SQL Gateway doc reference in the Chinese version of table overview

What is the purpose of the change
Add SQL Gateway doc reference in the Chinese version of table overview
Brief change log
Add SQL Gateway doc reference in docs/content.zh/docs/dev/table/overview.md
Verifying this change
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): no
The public API, i.e., is any changed class annotated with @Public(Evolving): no
The serializers: no
The runtime per-record code paths (performance sensitive): no
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
The S3 file system connector: no

Documentation

Does this pull request introduce a new feature? no

@KarmaGYZ Pls review this when you have time.


The dollar sign $ creates trouble when running one test

Expected Behavior
We should be able to run a single test case by go test -v -tags=e2e -count=1 ./test -run ^TestTaskRun$.
Actual Behavior
go test -v -tags=e2e -count=1 ./test -run ^TestTaskRun$
There is no test running.
Steps to Reproduce the Problem

Run the command: go test -v -tags=e2e -count=1 ./test -run ^TestTaskRun$

I guess this may be a careless error. When I remove the dollar sign, it worked fine by running "Run the command: go test -v -tags=e2e -count=1 ./test -run ^TestTaskRun".
Additional Info

/assign @houshengbo

@houshengbo right, I think it's becasue TestTaskRun test go renamed :sweat_smile:. The $ is part of the support regular expression you can use with -run to filter tests to run.


Enhancement Suggestion: Date validation with other field comparisons

Like you do with Presence:
{
beginDate : 'future',
endDate: 'after:beginDate'
}

You can easily extend indicative to add your own rules , so for this scenario.
Method itself

var indicative      = new(require("indicative")),
    _                     = require("lodash"),
    moment          = require("moment");

var afterField = function(data, field, message, args){
  var after_field = args.split(",")[0];
  if(new Date(data[field] !== 'Invalid Date')){
    data[field]         = new Date(data[field])
  }
  if(new Date(data[after_field] !== 'Invalid Date')){
    data[after_field]         = new Date(data[after_field])
  }
  return new Promise(function(resolve,reject){
    if ((!_.has(data, field)) || moment(data[field]).isAfter(data[after_field])) {
      resolve("passed")
    }else{
      reject(message)
    }
  });
}

indicative.extend('afterField',"Invalid date",afterField)

Validation
var rules = {
  beginDate : 'required|future',
  endDate   : 'after_field:beginDate'
}

var body  = {
  beginDate : "2015-07-20",
  endDate  :  "2015-07-18"
}

indicative
  .validateAll(rules,body, valMessages)
  .then(function(){

  })
  .catch(function(err){
    console.log(err)
  })

What we have done is added a new validation called after_field to indicative.
You add methods as camelcase and use them as underscore.
Where validation method afterField becomes after_field while consuming

thanks for the feed back i will attempt this and let you know.


feat(core): introduces TypedTuiMapper

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Refactoring
[ ] Build or CI related changes
[ ] Tests related changes
[ ] Documentation content changes

What is the current behavior?
Closes #5506
What is the new behavior?

Is it a breaking change? Can we avoid breaking by defaulting to any until 4.0?

The change in TuiMapper is definitely breaking and it can't be avoided (at least by default generic parameters or something) I think. But the PR can be made non-breaking with the following changes.
We declare a new TypedTuiMapper type next to TuiMapper like the following.
/**
 * Typed mapping function.
 *
 * @deprecated Will be removed in v4.0. Use `TypedTuiMapper` instead.
 */
export type TuiMapper<T, G> = (item: T, ...args: any[]) => G;

export type TypedTuiMapper<T extends unknown[], G> = (...args: T) => G;

We add an overload with the TypedTuiMapper to the MapperPipe.transform method as proposed.
@Pipe({name: `tuiMapper`})
export class TuiMapperPipe implements PipeTransform {
    /**
     * Maps object to an arbitrary result through a mapper function
     *
     * @param value an item to transform
     * @param mapper a mapping function
     * @param args arbitrary number of additional arguments
     */
    transform<T, G>(value: T, mapper: TuiMapper<T, G>, ...args: any[]): G;
    transform<T extends unknown[], U, G>(
        value: U,
        mapper: TypedTuiMapper<[U, ...T], G>,
        ...args: T
    ): G {
        return mapper(value, ...args);
    }
}

I will make a commit to this PR with these modifications to see the overall picture.

Hi @waterplea! Are the pipes broken or I did something bad?

@Frequency21 I think it's my fault about CI, please wait for a while

@Frequency21 Could you change<EMAIL_ADDRESS>to<EMAIL_ADDRESS>in your branch yml files for test?

Of course.

so, apparently it doesn't work yet
what about<EMAIL_ADDRESS>-><EMAIL_ADDRESS>

Let's try

Looks good to me :) thanks for the quick fix

@Frequency21 please, rebase into main branch, you can revert action/checkout


Build failure due to upstream vendoring

I recently attempted to build packer-azure and failed due to missing dependencies.
The upstream dependency of azure-sdk-for-go recently switched to Go vendoring (https://github.com/Azure/azure-sdk-for-go/commit/10a9f00fbc45293d677e2c416285ece01b011ded) resulting in build failures.
Attempting to change the rewritten paths to the new vendored paths fail as Go seems to disallow it.
Build failure:
root@3f183e751d95:/go/src# go get -v github.com/Azure/packer-azure/packer/plugin/...
github.com/Azure/azure-sdk-for-go (download)
package github.com/Azure/azure-sdk-for-go/Godeps/_workspace/src/github.com/Azure/go-autorest/autorest/azure: cannot find package "github.com/Azure/azure-sdk-for-go/Godeps/_workspace/src/github.com/Azure/go-autorest/autorest/azure" in any of:
	/usr/local/go/src/github.com/Azure/azure-sdk-for-go/Godeps/_workspace/src/github.com/Azure/go-autorest/autorest/azure (from $GOROOT)
	/go/src/github.com/Azure/azure-sdk-for-go/Godeps/_workspace/src/github.com/Azure/go-autorest/autorest/azure (from $GOPATH)
package github.com/Azure/azure-sdk-for-go/Godeps/_workspace/src/github.com/Azure/go-autorest/autorest/to: cannot find package "github.com/Azure/azure-sdk-for-go/Godeps/_workspace/src/github.com/Azure/go-autorest/autorest/to" in any of:
	/usr/local/go/src/github.com/Azure/azure-sdk-for-go/Godeps/_workspace/src/github.com/Azure/go-autorest/autorest/to (from $GOROOT)
	/go/src/github.com/Azure/azure-sdk-for-go/Godeps/_workspace/src/github.com/Azure/go-autorest/autorest/to (from $GOPATH)

Build failure after attempted path rewrite:
root@3f183e751d95:/go/src# go get -v github.com/Azure/packer-azure/packer/plugin/...
package github.com/Azure/packer-azure/packer/plugin/packer-builder-azure-arm
	imports github.com/Azure/packer-azure/packer/builder/azure/arm
	imports github.com/Azure/azure-sdk-for-go/vendor/github.com/Azure/go-autorest/autorest/azure: use of vendored package not allowed
package github.com/Azure/packer-azure/packer/plugin/packer-builder-azure-arm
	imports github.com/Azure/packer-azure/packer/builder/azure/arm
	imports github.com/Azure/azure-sdk-for-go/vendor/github.com/Azure/go-autorest/autorest/to: use of vendored package not allowed

Perhaps it's time start vendoring now that Go seems to have settled on a standard in 1.6?
https://tip.golang.org/cmd/go/#hdr-Vendor_Directories

@paulmey @boumenot How do you feel about adopting Glide? I think that @agy is right. You'll break for any duration between us introducing breaking changes in go-autorest, and getting azure-sdk-for-go updated to support those changes.
There are a couple ways of alleviating this pain:

The most direct: you vendor your dependencies using glide.

Ask azure-sdk-for-go to check in their vendored dependencies. Then, with Go 1.6 or GO15VENDOREXPERIMENT=1, you would be building with azure-sdk-for-go's vendored version of go-autorest. (Link to the Vendor rules: https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo/edit#!)

CC: @brendandixon @ahmetalpbalkan

Agreed, @agy is right.  We should fix this.

@agy @colemickens @boumenot Storing packages within a vendor directory makes sense for the outer most package, but causes problems when sub packages try to do so. We used to store dependent packages in a vendor directory (using Godeps). We backed off (just recently) since it was causing other users of the SDK grief. It's possible that some of that grief was introduced by Godeps (which rewrote the import paths) vs. the model toward which Go is moving.
The problem is that the full import path determines the type and any type sharing between a package and a consumer breaks when they rely on different versions. The ARM packages of the SDK return types defined in go-autorest (e.g., enhanced error types, responses). The consumer must, then, also rely on go-autorest to consume these types. If the SDK uses a different version of go-autorest (drawn from a local vendor directory) than the consumer (pulling from Github or their own vendor directory), compilation breaks.
The only guaranteed solution is for packages to not vendor, but to clearly state their dependencies and for consumers to vendor as needed.

Fixed by #222.


Multiple domains

I am thinking of how to use a single postfix to serve multiple domains. I will try to come up with the required changes and do a PR.

Hi, well by now I always told contributors with this wish to fork my project and modify it to their needs. But if you implement it nicely I'm happy to merge it.
Thanks and greetings
Marvin

I figured this could be done with a nginx plugin as a reverse proxy.
On Wed, 19 Jul 2017 at 19:12, Marvin<EMAIL_ADDRESS>wrote:

Closed #7
https://github.com/MarvAmBass/docker-versatile-postfix/issues/7.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MarvAmBass/docker-versatile-postfix/issues/7#event-1170657618,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAcgaR4wHxTwQE6ZkLEsWr8oGJsk0L1eks5sPjj5gaJpZM4MwMOn
.

good idea, keeps the container logic simple and gives you flexibility 👍


Programing exercise: Student does not see the results from the latest submission in the overview

Describe the bug
The overview of a Programming exercise sometimes does not show the results from the latest submission. Instead it shows the result of a previous submission.
To Reproduce

Create a Programming exercise
Make some submissions with different results (e.g. with / without warning or different percentage of passed tests)
Go to the list of exercises of your course
The results on the overview is not from the latest submission (This does not appear always, see Additional context)

Expected behavior
The overview on the left-hand side always shows the results for the latest submission.
Screenshots
The overview on the left-hand side shows here a warning symbol, but the latest submission has no warning. But as you can see all previous submissions have a warning. It looks like the

Which version of Artemis are you seeing the problem on?
7.4.3 (and also older version)
What browsers are you seeing the problem on?
Other (specify in "Additional context")
Additional context
The visual impact of the bug, which the screenshot shows, appears on our productive Artemis server and was noticed by one student. The reproduction in a test environment was not successful yet, but an error in the log seems to indicate what is the problem behind it.
An Query did not return a unique result error occurs which indicates that there is not deterministic which result is selected here. The problem appears with PostgreSQL, maybe this problem is also related to some difference between MySQL and PostgreSQL.
Relevant log output

full log entry with stracktrace
2024-07-13T18:47:38.557+02:00 ERROR 34844 --- [Artemis] [taskScheduler-3] .w.a.s.s.ParticipantScoreScheduleService : Exception while processing participant score for exercise 7 and participant 3 for participant scores:

org.springframework.dao.IncorrectResultSizeDataAccessException: Query did not return a unique result: 2 results were returned
	at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:301)
	at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:244)
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:550)
	at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
	at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:335)
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:160)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
	at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:136)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:223)
	at jdk.proxy2/jdk.proxy2.$Proxy305.findByExercise_IdAndUser_Id(Unknown Source)
	at de.tum.in.www1.artemis.service.scheduled.ParticipantScoreScheduleService.executeTask(ParticipantScoreScheduleService.java:283)
	at de.tum.in.www1.artemis.service.scheduled.ParticipantScoreScheduleService.lambda$scheduleTask$5(ParticipantScoreScheduleService.java:234)
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.hibernate.NonUniqueResultException: Query did not return a unique result: 2 results were returned
	at org.hibernate.query.spi.AbstractSelectionQuery.uniqueElement(AbstractSelectionQuery.java:586)
	at org.hibernate.query.spi.AbstractSelectionQuery.getSingleResult(AbstractSelectionQuery.java:570)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.springframework.orm.jpa.SharedEntityManagerCreator$DeferredQueryInvocationHandler.invoke(SharedEntityManagerCreator.java:418)
	at jdk.proxy2/jdk.proxy2.$Proxy466.getSingleResult(Unknown Source)
	at org.springframework.data.jpa.repository.query.JpaQueryExecution$SingleEntityExecution.doExecute(JpaQueryExecution.java:223)
	at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:92)
	at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:152)
	at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:140)
	at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:170)
	at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:158)
	at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:164)
	at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:143)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
	at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:70)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:392)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:138)
	... 16 common frames omitted

Hi @BaumiCoder, it appears that one of our courses encounters the issue as well. So it may not be fully fixed. We are currently using Artemis 7.6.5

Emphasis again on the additional context:

The problem appears with PostgreSQL, maybe this problem is also related to some difference between MySQL and PostgreSQL.

We use PostgreSQL, @dfuchss what DB are you using?
To make it potentially easier to reproduce and determine if the problem only occurs with PostgreSQL. The likely cause in any case is that some query does not ensure the correct order but uses them as-is as received from the database.

We are using MySQL 🤔

But I think for us it's related to the locking of an exercise.

Reproduction steps:

Programming exercise with manual submission. After the due date, but before the assessment release date.
State 1: The manual assessment has not yet been started.

$\Rightarrow$ The last result is shown as intended.

State 2: Submit an assessment as instructor.

$\Rightarrow$ The sidebar now shows the second-to-last result.

I think I can trace it back to the CourseStorageService that already contains only the wrong result instead of the last one.
This is filled by the courses/for-dashboard REST call. Checking the response sent over the network, I can verify that already the wrong result/submission is sent to the client.


[vote]: vote for release 1.7.0

[ ] I have registered the PR changes.

Ⅰ. Describe what this PR did
vote for release 1.7.0(https://github.com/seata/seata/milestone/28)
at least 3 votes with binding to pass
Please vote accordingly:

[x] +1 approve
[x] +0 no opinion
[x] -1 disapprove with the reason

vote result:
Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

All compatibility tests passed.
https://github.com/seata/seata/actions/runs/5451806323/usage

+1 binding
Dubbo/SCA+Nacos, DML SQL commit/rollback , oracle19c/mysql 5.7 pass.


How to train a pure Chinese zipformer without bpe model

I noticed that the training script in librispeech/ASR/pruned_transducer_stateless7_streaming/train.py uses bpe model, which is not the same as sherpa-ncnn-streaming-zipformer-zh-14M-2023-02-23. So if i would like to train a zipformer model with Chinese character modeling, which recipe can i refer to ? Thanks.

which recipe can i refer to

You can refer to any recipe in icefall that is for Chinese, for instance, aishell, or wenetspeech.

Thanks a lot.


 Few things which I thought could be causing this:

OpenGL options (depth-testing for example), but I checked and doesn't seem to cause problems

Vertex Data (hardcoded in Mesh::createQuad()) may be invalid, but I checked by using a blender plane model which made no difference

Shader source is invalid (highly unlikely)

GUI Shader not being bound properly or at the correct time (most likely but can't see how yet)

Quad vertex indices were malformed; silly mistake.


I dati sul COVIDー19 di Protezione Civile sono esposti anche come Web Map Service

https://services6.arcgis.com/L1SotImj1AAZY1eK/ArcGIS/rest/services/COVID19_Province/FeatureServer
https://services6.arcgis.com/L1SotImj1AAZY1eK/ArcGIS/rest/services/COVID19_AREE/FeatureServer
https://services6.arcgis.com/L1SotImj1AAZY1eK/ArcGIS/rest/services/COVID19_andamento/FeatureServer
https://services6.arcgis.com/L1SotImj1AAZY1eK/ArcGIS/rest/services/COVID19__Regioni/FeatureServer

Grazie mille per la dritta @aborruso


Potential race condition with kubeadm, no kube-proxy, ENI-mode, with Cloud-Controller-Manager

Bug report
General Information

Cilium version: 1.7.2
Kernel version: 5.6.6
Orchestration system version: Kubernetes 1.18.2

I'm using terraform to spool and deploy kubeadm on AWS.
How to reproduce the issue
The issues is that if the Cloud Controller Manager is not brought up before Cilium the node is brought, and the operator starts running ENIs will be attached to the instance before the CCM has a chance to validate the node, AWS will return a 400 because it won't know which interface to validate against. Similar to this big report: https://github.com/kubernetes/kubernetes/issues/70924
Potential workaround
I used the following for my CCM deployment:
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: cloud-controller-manager
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: system:cloud-controller-manager
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: ServiceAccount
  name: cloud-controller-manager
  namespace: kube-system
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    k8s-app: cloud-controller-manager
  name: cloud-controller-manager
  namespace: kube-system
spec:
  selector:
    matchLabels:
      k8s-app: cloud-controller-manager
  template:
    metadata:
      labels:
        k8s-app: cloud-controller-manager
    spec:
      hostNetwork: true
      serviceAccountName: cloud-controller-manager
      containers:
      - name: cloud-controller-manager
        image: docker.io/graytshirt/cloud-provider-aws:0.18.0
        env:
        - name: KUBERNETES_PORT_6443_TCP
          value: tcp://@KUBEENDPOINT@:6443
        - name: KUBERNETES_SERVICE_HOST
          value: @KUBEENDPOINT@
        - name: KUBERNETES_PORT
          value: tcp://@KUBEENDPOINT@:6443
        - name: KUBERNETES_SERVICE_PORT
          value: "6443"

        command:
        - /usr/bin/aws-cloud-controller-manager
        args:
        - --leader-elect=true
        - --use-service-account-credentials
        #- --allocate-node-cidrs=true
        #- --configure-cloud-routes=true
        - --cluster-cidr=@POD_SUBNET@
        - --cluster-name=@CLUSTER_NAME@
      tolerations:
      # this is required so CCM can bootstrap itself
      - key: node.cloudprovider.kubernetes.io/uninitialized
        value: "true"
        effect: NoSchedule
      # this is to have the daemonset runnable on master nodes
      # the taint may vary depending on your cluster setup
      - key: node-role.kubernetes.io/master
        effect: NoSchedule
      # Spool the CCM before there is a CNI present
      - key: node.kubernetes.io/not-ready
        effect: NoSchedule
      # this is to restrict CCM to only run on master nodes
      # the node selector may vary depending on your cluster setup
      nodeSelector:
        node-role.kubernetes.io/master: ""

As you may see the kubernetes environment variables have been overwritten with the OOB api endpoint address. Similar to setting the SERVER_IP_ADDRESS in the helm chart here: https://docs.cilium.io/en/v1.7/gettingstarted/kubeproxy-free/#quick-start

Thanks for the report! The mitigation steps look like they could be helpful for other users that may hit this.
This seems to me like ideally there would be a mechanism in k8s that allows ensuring that Cilium is provisioned after the Cloud-Controller-Manager; or alternatively that Cilium's cilium-operator component has a (optional?) feature to look for the CCM and wait until it's ready?
Not sure what the scope of changes would be to implement a generic solution within the Cilium project.

As part of the node validation step the CCM untaints the node.cloudprovider.kubernetes.io/uninitialized key. It's possible for the operator to wait for this taint to be lifted before adding ENIs. On Apr 24, 2020 6:06 PM, Joe Stringer<EMAIL_ADDRESS>wrote:
Thanks for the report! The mitigation steps look like they could be helpful for other users that may hit this.
This seems to me like ideally there would be a mechanism in k8s that allows ensuring that Cilium is provisioned after the Cloud-Controller-Manager; or alternatively that Cilium's cilium-operator component has a (optional?) feature to look for the CCM and wait until it's ready?
Not sure what the scope of changes would be to implement a generic solution within the Cilium project.
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.

@dmolik If I understand this issue correctly then we would need to start providing load-balancing to enable apiserver connectivity but hold the IPAM operation until the taint is lifted to not trigger the addition of ENIs.

Yes. I would agree with that.

https://github.com/kubernetes/kubernetes/pull/92800 should fix it as per my understanding!


Added bmsastem.org

Bio-Med Science Academy

@atawney24bm First stage of verification passed, official domain is biomedscienceacademy.org as far as I verified. This is just an informational note. Pull request is still in the review. I appreciate your patience while waiting for the final decision. Proof of domain ownership: https://biomedscienceacademy.org/instructor/kollat-laura/

@atawney24bm Thank you for your patience while waiting for a review and processing your request. Pull request merged.


Apply AppCompat theme and use AppCompat classes

This effectively gives us a "Material" theme, fixing https://openedx.atlassian.net/browse/MA-1002

@1zaman @BenjiLee Ready for review, if you please :)

@bguertin Does this PR also include some refactoring outside of updating the theme?

LGTM, I see that the hamburger has moved over

Does this PR also include some refactoring outside of updating the theme?

I only tried to do what was necessary to support the new theme. All the changes are related to that.


Eval Mode in select()

SMI, SCMI, and SCG need to have self.model.eval() in their select() methods. Without it, the embedding computation will not necessarily be the same for similar points, which may cause performance degradation.

This issue has been resolved in the latest merge to main; all strategies should now be put in eval() mode when calling select()


[Request] Toggle to hide superfluous totals

G'Day!
It'd be neat if we could say "Don't show the 'total' total if all of the items are already on the hotbar/in this stack".
If I've just got the one sword, I don't need it to say '1' there.
Similarly if I've just got the one stack of 32 porkchops, I don't need it to say 32 twice.
Cheers!

https://github.com/BlazingTwist/ItemCounts/releases/tag/1.0.2 does have "more_than_stack" and "more_than_one" rules.
I could add an additional "more_than_hotbar" rule

Actually all of my use-cases are covered by more_than_stack.
I don't actually mind seeing the grand total even if some other stacks are on the hotbar, as long as it's more than a stack it makes sense.
Thanks! :D


Avoid race condition when installing plugins

When installing multiple plugins asyncronously, a race condition can cause plugins to fail to install, or fail to be registered as installed. As an example, asyncronously installing multiple (5+) plugins often causes plugins/{platform}.json to drop plugins as they are all trying to write to it at once.

It's great. it must be merged asap

@ReactiveRaven I'm going to have to manually merge this one. Hang tight.

is this still a bug actually?

Thanks for opening the issue. It seems that issue has been resolved. I am going to close this issue but please feel free to reopen another issue if this occurs again.


fix(ui): tweak sirv gzip bug workaround for html reporter

Description

Probably related https://github.com/vitest-dev/vitest/discussions/6927#discussioncomment-11298317

The workaround seems already discussed when it was introduced https://github.com/vitest-dev/vitest/pull/3113#issuecomment-1492403214, but the exotic case is actually on the side of vite preview, so it might be better to flip the condition.
I'll wait for the OP to see if this change would actually help.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

[ ] It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
[ ] Ideally, include a test that fails without this PR but passes with it.
[ ] Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

[ ] Run the tests with pnpm test:ci.

Documentation

[ ] If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

[ ] Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

No response from OP, so closing. Probably any sensible CDN should serve html.meta.json.gz with application/gzip, so there shouldn't be an issue.


Enhance wrapping

Make it so equations always end a line with + (my preference), or start a line with +, or build in an optional argument to allow the user to select which version they want.

Make the wrapping be based on only the number of characters that get rendered, and not on things like \text{}

All, weighing in a bit late on this - what if we:

First found the length of the LHS
And then only wrapped the RHS with wrap() (adding the length of the LHS in the process)

Would this generally work? Is there a better way?

So as you can probably tell the development has slowed here a bit. We're all busy, obvi. I won't have time to work on any of this until next week at the earliest. If you want to take a stab at this using this method, that would be awesome!
I think the method you mention would work, but it would be great if we could do a full refactor so we can address the two bullets above too. They seem theoretically possible to address to me but every time I've sat down to try to write something I end up confusing myself and abandoning for other issues before I get too far.

Ah, sorry about that, I meant to post this to #33 (though it's certainly relevant to this!). Will see what I can do; I think my busy time wrapped up last week but y'all's may be beginning this week, so may be a good time for me to dive in (for me at least).

Yeah no worries, I actually assumed it was in reference to that issue. But posting here is good so we don't lose track of both issues. I finished up the term late last week too but only have two days this week before taking a quick vacay with the fams. Then when I get back I need to devote almost all my attention to grant work for the next two months or so but I will try to work on this when I can. Would still like to get it submitted to CRAN soon-ish.

Ha, I was about to tackle this right now, with the same idea @jrosen48 had (only wrapping the RHS). If we include the RHS, we get weird things like this:

where the first line of the RHS is tiny (just α) because the LHS is so big

Something like this looks far more natural

I agree the latter looks much better. I'm also not totally sure I understand the inconsistent spacing around + and = but it would be nice if it always had a space on either side.

I think the spacing around + and = might be a LaTeX bug/feature maybe, since it's manipulating kerning around characters to get stuff justified nicely? It's fixable if we add ~s after = and the final + in the line:
\begin{aligned}
\log\left[ \frac { P( \text{out} = \text{1} ) }{ 1 - P( \text{out} = \text{1} ) } \right] =&
~ \alpha + \beta_{1}(\text{cat1}_{\text{b}}) + \beta_{2}(\text{cat1}_{\text{c}}) + \beta_{3}(\text{cat2}_{\text{B}}) ~ + \\
& \beta_{4}(\text{cat2}_{\text{C}}) + \beta_{5}(\text{cont1}) + \beta_{6}(\text{cont2}) + \epsilon
\end{aligned}

Ah... I like that quite a bit better but maybe there's a good reason LaTeX does that?

Yep, I figured it out—fix coming in a few minutes, along with a completely new way to wrap things that should address trailing +s. Instead of wrapping based on character counts, since LaTeX commands like text{} inflate counts, I've instead added a tentatively-named terms_per_line argument. In the screenshot above, terms_per_line would be 4.

Oh I like that a lot! Nice thinking!

Voila! 1697a06 takes care of this and it's magical! Will submit a PR soon.

Addressed by #35!


Expression: correct relocation model for Windows

The Windows Code Generation model cannot generation code with the PIC relocation
model - all code is implicitly position independent due to the DLL load slide
that occurs if it is not loaded at the preferred base address.  Invert the
condition and inline the single use of the variable.  This should also aid the
WASM target.  This significantly improves the state of the (swift) repl on
Windows (and should aid in expression evaluation on Windows).
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@361443 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 3b0388e3746bc88193da27092e837cb099188d29)

CC: @JDevlieghere
This enables the repl to begin functioning on Windows

@swift-ci please test


[NODEJS] node process not terminating after readline.createInterface(); despite calling readline.close()

readline.on('close', function () { process.exit(0) }); works but cannot be used bc it's unknown when the programm actually halts

seems to happen when there's a leak, i.e. some subroutine not terminating e.g. by not releasing all memory properly when finished.
problem currently circumvented by moving getToken() procedure for GMAIL OAUTH2 into a /setup.js, which needs to be called manually before starting operations. setup.js then calls process.exit(0) manually when done.


Thickness of selected range

Is it possible to set the thickness of the line for the selected range? Or for the whole line?

rsb:barHeight


System.IO.IOException: The process cannot access the file 'C:...\UserSelectedRecord.json' because it is being used by another process.

Microsoft PowerToys version
0.35.0
Running as admin

[X] Yes

Area(s) with issue?
General
Steps to reproduce
PowerToysReport_2021-04-20-08-40-30.zip
✔ Expected Behavior
No response
❌ Actual Behavior
Version: <IP_ADDRESS>
OS Version: Microsoft Windows NT 10.0.19042.0
IntPtr Length: 8
x64: True
Date: 20/04/2021 08:37:24
Exception:
System.IO.IOException: The process cannot access the file 'C:\Users\cbmay\AppData\Local\Microsoft\PowerToys\PowerToys Run\Settings\UserSelectedRecord.json' because it is being used by another process.
at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at System.IO.Abstractions.FileWrapper.ReadAllText(String path)
at Wox.Infrastructure.Storage.JsonStorage`1.Load()
at PowerLauncher.ViewModel.MainViewModel..ctor(PowerToysRunSettings settings)
at PowerLauncher.App.<>c__DisplayClass14_0.b__0()
at Wox.Infrastructure.Stopwatch.Normal(String message, Action action)
at PowerLauncher.App.OnStartup(Object sender, StartupEventArgs e)
at System.Windows.Application.OnStartup(StartupEventArgs e)
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Other Software
No response

2021-04-20.txt

PowerToys should not crash because of this, we'll investigate and try to identify a solution. Thanks!

@conrocas
Let us know if it happens again.

@conrocas
Let us know if it happens again.

I will update the thread when I encounter the issue again, however, I haven't come across the issue since

Closing due to inactivity and lack of consistent repro. If the issue arises again we'll re-investigate.


docker howto

Hi,
I would like to ask you on the right way to use the plugin with a dockerized phpstan stack.
the main issue is how to map the path between vscode and the container.
Before I start diving into it, could you provide me some pointers ?
thx

just read the doc doo

but it does not work because of docker verbose output...
17:02 $ bin/phpstan_docker
[+] Creating 1/0
 ✔ Container xxx-mariadb-1  Running                                                                                0.0s
Note: Using configuration file /var/www/xxx/phpstan.neon.

vscode output
[check:18] PHPStan process exited with error  filteredErr=Container m2m-mariadb-1  Running  rawErr= Container m2m-mariadb-1  Running

  data=
[status-bar] Hiding status bar, last operation result = Error

And do you happen to know how to tell phpstan@docker to use cache ?

Is there not some way to prevent that output while running the docker phpstan command? If not then it's going to be pretty hard to work around this. I'd have make the phpstan command specifically ignore docker-related output but not the rest.


Reset sorting does not work

Describe the bug
I've noticed an issue with row sorting.

Once rows have been sorted, it isn't possible to return to the original order.

Your minimal, reproducible example
https://codesandbox.io/p/sandbox/bug-tanstack-table-sorting-reset-vwxdp7
Steps to reproduce

Click Expand All
Click Sort: Ascending
Click Sort: Reset

Row order does not change when Sort: Reset is pressed.

Current
Expected

Expected behavior
Row order should return to original order when Sort: Reset is pressed.
How often does this bug happen?
Every time
Platform
OS: Windows 11, Browser: Firefox, Version: 117.0.1
react-table version: 8.10.3
Terms & Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

I'd like some input from the maintainers (@tannerlinsley @KevinVandy) before proceeding. I'm unsure if this is a regression (or even expected behaviour).
As a quick fix/hack, the following patch fixes the behaviour - but I expect this won't be a scalable solution:
diff --git a/packages/table-core/src/utils/getSortedRowModel.ts b/packages/table-core/src/utils/getSortedRowModel.ts
index 1807f7b6..72e32b1a 100644
--- a/packages/table-core/src/utils/getSortedRowModel.ts
+++ b/packages/table-core/src/utils/getSortedRowModel.ts
@@ -10,7 +10,7 @@ export function getSortedRowModel<TData extends RowData>(): (
       () => [table.getState().sorting, table.getPreSortedRowModel()],
       (sorting, rowModel) => {
         if (!rowModel.rows.length || !sorting?.length) {
-          return rowModel
+          return table.options.getCoreRowModel(table)();
         }

         const sortingState = table.getState().sorting

Appears to be related to issue #5081.
Although the linked CodeSandbox on that issue doesn't highlight the bug - it does show that header.column.getToggleSortingHandler() behaves as normal and resets sorting.


Use base64 to encode salt in wallet file format

Related to https://github.com/massalabs/massa/pull/4044
Close #551
Encodes salt in wallet file format to base64

@Thykof @thomas-senechal Adapted to code to follow the new change in the massa-standard regarding salt (use unpadded base64)

Codecov Report
Patch coverage has no change and project coverage change: +0.35% :tada:

Comparison is base (4a161b9) 41.93% compared to head (ca8e0eb) 42.28%.
 Consider uploading reports for the commit 27b22b8 to get more accurate results

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #596      +/-   ##
==========================================
+ Coverage   41.93%   42.28%   +0.35%
==========================================
  Files          19       19
  Lines        1240     1284      +44
==========================================
+ Hits          520      543      +23
- Misses        662      682      +20
- Partials       58       59       +1

Files Changed
Coverage Δ

pkg/wallet/wallet.go
0.00% <0.00%> (ø)

... and 2 files with indirect coverage changes

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

@Thykof Is it expected that the e2e Tests fail ?
I don't really understand what's wrong in it

@Thykof Is it expected that the e2e Tests fail ? I don't really understand what's wrong in it

I re-run failed test now it's ok.

Closed as this is not useful anymore: https://github.com/massalabs/massa-standards/pull/111#discussion_r1299679927
May be reused later on if some changes are necessary in the wallet file format


bugfix: when result is null, throw null point expection

bugfix: when result is null, throw null point expection

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (3d5d94e) 96.82% compared to head (5d595e7) 92.68%.

:exclamation: Current head 5d595e7 differs from pull request most recent head 14f87a9. Consider uploading reports for the commit 14f87a9 to get more accurate results

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master       #8      +/-   ##
==========================================
- Coverage   96.82%   92.68%   -4.15%
==========================================
  Files          21       21
  Lines         410      410
  Branches        0       72      +72
==========================================
- Hits          397      380      -17
  Misses         13       13
- Partials        0       17      +17

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


Matchmaker rating shown as 0

The client shows no 4v4 matchmaker rating for many people when they play their first game even though the initialization happens correctly on the server. So it defaults to 0 in game.
Oddly enough for some people it works.
Correct rating initialization can be confirmed by looking at the ratings of the replay after the game has finished

This happens because the server does the initialization internally and doesn't send the client the players rating before the game starts so the client defaults to zero. So this isn't really a client issue because it doesn't have the necessary information

Then why does it work for some players?

Largely this is probably just a race condition which is why it works for some people

Also, @Askaholic says they are in the player_info message, so the client can get them from there. I suspect that is why it works for some people, depending on when the message arrives

The player_info message is not sent out right as soon as a change occurs. The server batches up the players and sends then in intervals. So that is the race condition. If it gets an updated message before the game starts it will show the initialized rating. If it doesn't then the players will show as 0.

Makes sense. Probably the right thing to do would be to add the rating to the game_launch message?

for who all the players just the player who the message is going to? Also I will move this to the server


Kustomize support says v3 but is actually v4

terrascan version: 1.7.0
Operating System: all

Description
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
Kustomize support uses the latest libraries, and Kustomize has bumped their version to v4 (~Feb). However, the support list in the help screen still lists v3 as the supported version. Preferably, Terrascan should support both v3 and v4, as there are some breaking changes in v4 and many folks would still be using v3.
What I Did

Run terrascan help scan
Notice that the only valid version for kustomize is "v3", but this is incorrect; the libraries currently imported now are supporting v4.

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

Addressed with #932


IIIFViewer renders as expected when a manifest contains born digital items

As described in the rfc 'Born Digital in IIIF', when a Manifest contains a mixture of formats, some of which are supported by current IIIF and some which are not:

the supported formats should render as expected in the IIIF viewer.
for unsupported formats, a placeholder image should be rendered in the viewer and a link to download the original file should be available to the user for viewing with their own software.
for Manifest that represents an object comprising multiple files, arranged in a directory structure, a navigable representation of that structure will be displayed.

After experimenting with our viewer and a selection of example IIIF manifests, it doesn't always appear to work as expected. For example, the placeholder images are not rendered and the directory structure is not always complete.
Getting the IIIFViewer to function as expected would be a great MVP starting point for this work. Especially as we can't deal with mixed formats at present. We only expect one at a time and the presence of audio/video or pdfs in a manifest currently prevents the IIIFViewer from rendering in favour of audio/video players or the browsers pdf renderer.

See https://docs.google.com/document/d/1i9v2ROV9BR8diGWesZwsuvbaiPm8iC38DsMToZ1Ee5w/edit?usp=sharing for background

This may become necessary at a later date, but for the first iteration we are doing #10568


Preserves result order

Fixes #60
This was implemented by adding the Swift Collections dependency and adjusting most ordinary Dictionary instances to OrderedDictionary.
Graphiti will require a PR to be compatible, which I will submit shortly.
Thanks!!

Since this does change the interface with Graphiti, we should probably make it a major release so that SPM doesn't resolve to incompatible versions of GraphQL and Graphiti. Graphiti can be a minor release.

@NeedleInAJayStack great work. Yeah, let's bump major. Feel free to merge and tag! 😊