[5.3] Implement new password validation rule

Skeleton update: https://github.com/laravel/laravel/pull/3836
Docs update: https://github.com/laravel/docs/pull/2414
This new rule will allow to validate a given value to match the current logged in user's password. This is handy to require a user to fill in his/her password when submitting forms, etc. For example, when changing a password, you can now add an extra field to require the user's current password to be filled in as well.
This allows you to require a user to fill in his/her password on a form, for example, to change their password:
Validator::make($request->all(), [
    'current_password' => 'required|password',
    'password' => 'required|confirmed',
]);

And countless other examples where password validation can be required.
I'm still a bit unsure about the rule name. password seems a bit too general but on the other hand, it's pretty easy to use and remember. current_password seems a bit too long. passcheck is a bit weird. Feel free to suggest other ones.
I was unsure at first if this should be in core since this couples the auth and hasher component with the validation component. But on the other hand, the validation component already requires the contracts component so we can easily test this (see the added test). There's no extra coupling to the hasher and auth component since you'd only invoke them when the rule is being used.
Would love to get some more opinions on this so feel free to comment 😄

Btw, I wasn't sure because the contribution guide doesn't explicitly says so but I didn't update the Changelog file in this and my last two pr's. Should we do that for new feature pr's?

@driesvints I think it is better not to use auth inside validator, but pass the hash as a parameter to the rule.
Anyway, 👍 for the idea, I had to implement that in my projects several times.

@rkgrep @crynobone ok so more something like this?
    protected function validatePassword($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'password');

        $hasher = $this->container->make('hash');
        $currentPassword = $parameters[0];

        return $hasher->check($value, $currentPassword);
    }

This might be better indeed although it requires the user to always explicitly add the password to validate against. The previous example works more out of the box.
What we could also do is accept an optional parameter, that we have the best of both worlds and you can still pass a password if you like.
    protected function validatePassword($attribute, $value, $parameters)
    {
        $hasher = $this->container->make('hash');

        if ($givenPassword = Arr::first($parameters)) {
            return $hasher->check($value, $givenPassword);
        }

        $auth = $this->container->make('auth');

        if ($auth->guest()) {
            return false;
        }

        return $hasher->check($value, $auth->user()->getAuthPassword());
    }

@rkgrep @crynobone I've updated the PR now with these changes and added some extra tests for it.

@driesvints Just a thought here maybe we could allow the gaurd to be set via the parameters but not require it that way it's more developer friendly? :)
Keep it up! this is a addition on my oppion :+1:

Think I'm going to hold off on this for now since it's such a specialized rule.

@taylorotwell ok, no worries. Was worth a try :)


Hearing Access Service API

[ ] Consider has_preset_list to be converted form array to double linked list

[ ] Consider has_preset_list to be converted form array to double linked list

Done.  Closing.


Intl.DisplayNames not loaded when specifying a version

Bug

What
Intl.DisplayNames does not get loaded in older Safari versions.
Details
When I try to load the Int.DisplayNames polyfill in Safari 13.1.2 with the a version defined in the URL https://polyfill.io/v3/polyfill.min.js?version=3.53.1&features=default%2CIntl.DisplayNames I'm getting

When I try to load it without the version https://polyfill.io/v3/polyfill.min.js?features=default%2CIntl.DisplayNames it seems to work:

Looking at polyfill-library versions, Intl.DisplayNames was added in version 3.94.0 - which is why you are not seeing if when setting the version to 3.53.1

Ok. But then the bug is that the website is showing 3.53.1 as latest version (which is was relying on):

Thanks for letting us know about the out of date url-builder page @screendriver. I've made a pull-request to update it and updated the contributing guide to help ensure this step isn't missed in the future

Nice. Thanks 👍


Bug on docs site...

800px <> 757px viewport incomprehensible behavior <nav> & <main>

Thanks, this should be fixed in the next version.


[Feature Request]: Authentication using OAuth

Is your request related to a problem you have?
Yes, it is.
I can't use KafkaFlow with OAuth.
SaslMechanism value for OAuthBearer is missing.
Also, requesting for an exposing a delegate for SetOAuthBearerTokenRefreshHandler().
Describe the solution you'd like
Add those options to the KafkaFlow abstraction layer.
Options inside "SecurityInformation", used in "cluster -> WithSecurityInformation()".
It would be a nice to have if it could initialize the token (not requested at all, I only need to pass the delegate for refreshing the token).
Are you able to help bring it to life and contribute with a Pull Request?
No
Additional context
No response

I'm also interested in this - At first glance, the most the complex part of this would be implementing the delegate for SetOAuthBearerTokenRefreshHandler in a user-friendly way.

Any progress on this? Would love to be able to use OAuth authentication.

The PR/s above are ready and waiting to be merged. Waiting on a maintainer to review.


Analytics events getting dropped when User-Agent is null

Description:
ERROR - APIMgtUsageDataBridgeDataPublisher RequestResponse event dropped due to unavailability of mandatory data: [User agent] in event: Application consumer key: *************************3Ia, Application name: DefaultApplication, Application ID: 1, Application owner: admin, API name: Test, API version: v1.0.0, API context: /test/v1.0.0, Username<EMAIL_ADDRESS>API resource path: /foo, API resource template: /foo, API method: GET, API creator: admin, API creator tenant domain: carbon.super, API tier: Unlimited, Username<EMAIL_ADDRESS>User tenant domain: carbon.super, Host name: <IP_ADDRESS>, User IP: <IP_ADDRESS>, User Agent :null, Is throttled: false, Request timestamp:<PHONE_NUMBER>688, Response time: 543, Service time: 1, Backend time: 542, Is response cache hit: false, Response size: 0, Protocol: https-8243, Response code: 200, Destination: http://www.mocky.io/v2/5cd129e43300005717b126eb, Security latency: 0, Throttling latency: 0, Mediation latency: 0, Response mediation latency: 0, Backend latency: 542, Other latency: 0, Gateway type: SYNAPSE, Label: Synapse
Suggested Labels:
APIM 2.6.0, APIM-Analytics
Affected Product Version:
APIM 2.6.0
Steps to reproduce:

Create and publish an API.
Invoke the API without User-Agent header. Refer to below example curl command.

curl -k -X GET "https://<IP_ADDRESS>:8243/test/v1.0.0/foo" -H "accept: application/json" -H "Authorization: Bearer 5cd2c989-86ce-3467-a844-f10154016fae" -H 'User-Agent:'

Fixed via https://github.com/wso2/carbon-apimgt/pull/9039


Specify exactly what globbing patterns are allowed

The spec does not specify what globbing patterns it allows. Is it just a single * at the end, or possibly more?
It does say that:

the aggregation process is not currently recursive, therefore it will not apply to children containers.

Inspired by https://github.com/solid/solid/issues/253#issuecomment-476838647 (@melvincarvalho)

Related: do we have any more history on globbing besides https://github.com/solid/solid-spec/commit/c26141e57db9f1fcf1fd36428aa6540db79d0dcd ? @dmitrizagidulin

I've been around solid a long time, and I've probably looked at every app ever made.  I've never seen anything other than /* used to get the contents of a directory.
I think that is how it was supposed to be.  Basically we organized things like putting stuff in a per monthly folder and so on.  It would just be a pain to get every item from every day, which could be 100s.  Also the queries change a bit.
I was a bit perplexed when I saw that globbing could be used as /foo* type queries.  Because why would you do that?  It seems overkill, and using it 'just because you can'.  Better to design your app's data not to need it.
I might have seen @bblfish once make an argument around generic globbing, but unsure anything came of it.  @deiu may also have some back ground on this.
I do think there is a path towards deprecating globbig, for more efficient methods, but I'd like to see that over a long period of time.  And simple server side testing is not going to catch all the issues.  I dont mind turning off globbing if everyone agrees its not needed anymore because we have something better.

Recursive?  I dont think it has ever been recursive, has it?

@melvincarvalho Thanks, this is super important.
Because currently, NSS uses glob, which supports much more complex patterns (and that was a major reason for my concerns). So it seems that NSS is implementing a superset of globbing as defined by the spec.
Questions:

Do you have any objection to stating that a glob pattern can only contain one star?
Do you have any objection to stating that this star can only occur at the end?
Do you have any objection to stating that this star can only occur after a final slash?

Do you have any objection to stating that a glob pattern can only contain one star?

No

Do you have any objection to stating that this star can only occur at the end?

No

Do you have any objection to stating that this star can only occur after a final slash?

No
This is really how I thought globbing worked.  The idea is that how you fetch stuff influences how you design the data layout of your app.  Once you get beyond simple apps, say for a social network or chat that grows over time, you need to archive things daily, monthly, yearly etc.  Your ability to fetch from this kind of folder will influence the design of your data shapes and also your app.
It may be self evident that you could have 100s of items in a monthly LDPC, and that works well with globbing.  That was the need for which is was introduced.
Any other need, I dont see right now, and looks to me like feature creep.  Id genuinely be interested if there's a use case out there.

Thanks so much. PR forthcoming (which I will leave open for a bit until everyone agrees on the above answers).
This changes a lot 🙂 I have always seen the complex implementation of globbing (with multiple stars on arbitrary places and thus recursion). I'm opposed to including that; way less opposed to a "concatenate all in folder", which is what the current "globbing" does.

Ah right you should run this by @timbl because he uses the yyyy/mm/dd pattern so I could see he might want yyyy//
However I've always used the yyyymmdd/ pattern for this very reason.  A single glob is a nice to have, but 2 sees self indulgent! :)

@melvincarvalho Thanks, invited you an @timbl to review https://github.com/solid/solid-spec/pull/148.

@RubenVerborgh

Related: do we have any more history on globbing

I'm not sure. I've never used it.


Pipe i/o example in documentation is incorrect

The output to pipe example provided in the readme has several issues:

It does not ever close the reading end of the pipe (r).
It is my understanding that in general on Unix, one end of a pipe must be closed before using the other end. So, for example, the parent process must close the writing end before reading anything from the reading end. This is illustrated in this SO answer and I seem to recall reading about it in literature but I don't have an authoritative reference right now.
It is possible that due to OS buffering the parent will be notified that the child process exited before the reading thread receives EOF. I had this happen on my production system but not on my development system. In this case the background thread raises an exception when it tries to call r.readpartial complaining about the i/o object being closed by another thread. The main thread should join the reading thread after waiting for the launched process before carrying on to close the reading end (per bullet 1). When I added this wait, the entire process hung due to bullet 2.

I suggest using something along the following lines:

    output = ''
    r, w = IO.pipe

    begin
      process.io.stdout = w
      process.start
      w.close

      thread = Thread.new do
        begin
          loop do
            output << r.readpartial(16384)
          end
        rescue EOFError
        end
      end

      process.wait
      thread.join
    ensure
      r.close
    end

Thanks for the feedback, @p-mongo.
While the examples were meant to be illustrative rather than exhaustive/robust, given others are likely using them with the assumption they will do the "right thing", it's worthwhile to update them. I've done so in 8e809feba799, and really appreciate your input!
Wanted to address your specific points as I think they are worth discussing:

It does not explicitly close the read end of the pipe because this happens automatically. If you call r.autoclose? it would return true, meaning it is cleaned up at program exit. With that said, this code sample may be copied verbatim, so it's worth ensuring we call r.close.

You are slightly incorrect on the justification for this point (perhaps you phrased in a way I'm misunderstanding—if so my apologies), but your recommendation to close the write end of the pipe is correct.
When utilizing pipes for IPC you must close the file descriptor of the parent process. This ensures that when the (forked) child process finally closes its file descriptor for the write end of the pipe, the parent process will receive an EOF the next time it attempts to read from the read end of the pipe. If the parent process leaves its write end of the pipe open, the EOF won't be sent as there is a still a process with an open file descriptor (the parent in this case).
You can reproduce this with the following example which will not terminate until you uncomment the w.close line:
r, w = IO.pipe
process = ChildProcess.build("sleep" , "1")
process.io.stdout = w
process.start

# w.close # Uncomment this to get example to terminate

thread = Thread.new do
  begin
    loop do
      print r.readpartial(16384)
    end
    rescue EOFError # Won't happen unless we call w.close
  end
end

process.wait
thread.join

However, it's important to note that the example will still work if we call w.close after process.wait (as the loop will eventually return EOF in that case), but your suggestion to do before the thread is created is likely better form, so we'll update to do that.

I'm not able to reproduce the behavior you're describing (getting the background thread to error on the IO object being closed by another thread), but I might be misunderstanding the reproduction steps. In any case, agreed that we should call thread.join to ensure the reader exits before the parent terminates, as that is necessary for the example in 2 to work.

Thanks again for the feedback. We've updated the example.

:+1: thank you.


Don't insert newline while saving

Follow-up to #85154
Changes the new check into an error; saving while saving is now invalid behavior. I tweaked Script Editor to avoid the new error. There might be some cases when the newline is not applied correctly, but it's probably rare and harmless. Saving script in Script Editor does call apply_changes().

Thanks!


Implement basic resolver

Implements a resolver using what's available here in the reference implementation.  It's still a WIP, and there's some testing & cleanup to do.  Some issues I still have:

[ ] Performance isn't great.  It takes multiple seconds to resolve a service binding (an operation that shouldn't take nearly that long).  I'm not entirely certain why this is happening, but I suspect its our api client.  Need to investigate further.
[ ] The operator likes to fall over very frequently.  This is somehow related to leader election, since disabling leader election makes it run a little better (still not great though).

Codecov Report

Merging #109 (1949177) into main (1e11996) will decrease coverage by 2.05%.
The diff coverage is 5.26%.

:exclamation: Current head 1949177 differs from pull request most recent head f69e880. Consider uploading reports for the commit f69e880 to get more accurate results

@@            Coverage Diff             @@
##             main     #109      +/-   ##
==========================================
- Coverage   86.27%   84.21%   -2.06%
==========================================
  Files           8        8
  Lines         736      754      +18
==========================================
  Hits          635      635
- Misses         76       94      +18
  Partials       25       25

Impacted Files
Coverage Δ

projector/binding.go
87.65% <0.00%> (-5.30%)
:arrow_down:

resolver/cluster.go
94.82% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e11996...f69e880. Read the comment docs.

disabling leader election makes it run a little better

I'm not noticing any issues with leader election (I turned it back on). My deployment has been up for a few hours with no restarts.
kubectl get pods -n service-binding-controller-system
NAME                                                             READY   STATUS    RESTARTS   AGE
service-binding-controller-controller-manager-587b9d47b6-pq7hf   2/2     Running   0          3h32m

I0512 14:31:44.780435       1 leaderelection.go:248] attempting to acquire leader lease service-binding-controller-system/74b357db.servicebinding.io...
I0512 14:31:44.793375       1 leaderelection.go:258] successfully acquired lease service-binding-controller-system/74b357db.servicebinding.io


Feature Request: [Chat GPT: Add Comments] prompt

In addition to:

Add Tests
Find bugs
Optimize
Explain

I'd like to be able to select a block of code, and ask ChatGPT to add comments to the code, via the right-click context menu.
Or better yet, in the extension options, allow for the user to add their own prompts.
I know the workaround is just to edit one of the defaults to send a different prompt, but it would be nicer to have the option to customize all the prompts.

great ideas @nathanchase. Thanks for bringing it up here and keep ideas coming! This would be a nice addition definitely. I will keep you posted!

@nathanchase I added a new command Add comments for the following code prompt prefix - you can override it as usual. Please update your extension to v2

@nathanchase there is another new feature to add your custom prompt prefix using the ad-hoc command in the context menu. See this issue or readme for more details on how to use it: https://github.com/gencay/vscode-chatgpt/issues/28#issuecomment-1366155407


defn items are not displayed correctly

The problem
A definition list item is displayed as if the default stringification method is used: Pod::Defn<INTADDRESS>. For example, the following pod:
=begin pod

=defn Item1

Descr 1

=defn Item2

Descr 2

=end pod

is displayed like this:
Pod::Defn<140704499921384>

Descr 1

Pod::Defn<140704499921440>

Descr 2

Perl6: This is Rakudo version 2018.08 built on MoarVM version 2018.08, installed using rakudobrew on MacOS 10.13. Same problem is been observed with Rakudo 2018.09.

Thanks! We will check it out
El mié., 17 oct. 2018 18:27, Vadim Belman<EMAIL_ADDRESS>escribió:

Just have edited the report. 2018.09 produces same output.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/perl6/doc/issues/2389#issuecomment-430823761, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAAB9NFITW3HCZDd08DXpaPJ4xNJFN60ks5ul7zNgaJpZM4XrW1u
.

I am working on that issue in a major pod fix not yet complete. The original defn implementation I made was incomplete and it shows in this problem rendering.

But the example shown by @vrurg is incorrect. There needs to be at least two lines of text for a defn block, and the example shows only one line. The blank line following =defn ends the abbreviated block form (as it also has for the paragraph form).

Not sure if exception is a good thing here. This is documentation. And when I type p6doc in the command line I expect anything but an error message. It is way much better to see at least some reasonable text pulled out of the source even if it would contain those Pod::Defn lines or something like 'invalid defn definition block`.
Regarding the error in the code – wonder what that would be? It's not clear to me how the correct defn must look like because neither:
=defn Item
Descr

as in the documentation, nor
=defn
Item
Desc

don't produce the output I'd expect. I'm still getting the Pod::Defn lines.
Yet, correct me if I'm wrong here, but what is bad about having an empty line between =defn and the description paragraph? To my view it improves the readability of the source when the description spans over a couple of lines.

After the latest changes in Pod::To::HTML, this should work, although there are issues with p6doc #2014 which we still need to address.

Regarding =defn source format, that’s per S26 and really, IMO, is shorthand for:
=item Term

Description

Sorry for late reply, I was overloaded and forgot to re-test the latest update. Well, there is definitely an improvement as the Pod::Defn lines are now gone. The downside: the Item part is missing from the output:
Descr 1

Descr 2

And yes, I'm using p6doc.

@vrurg, have you tried the $=pod[0] output of your =defn to see what that shows?
That should show what rakudo is doing. If that loks correct, the it’s definitely the renderers.
However, you have certainly pointed out the tight coupling between rakudo pod parsing and rakudo Pod::To::* renderers. I alway assumed that was someone else’s job as a module author. The next PR I merge will consider that coupling and at least throw a warning to the devs.

@tbrowder I never tried it, but did so now. It does look correct.
BTW, when I try p6man on the same file I get this error:
Cannot resolve caller handle-pod(Pod::Defn{:term("Ite..., :max-line-length(80), :suffix(), :indent-size(8), :prefix()); none of these signatures match:
    (Pod::FormattingCode $pod, Int :$indent-size = 8, Int :$max-line-length = 80, Str :$prefix is copy = "", Str :$suffix is copy = "" --> Str)
    (Pod::Block::Code $pod, Int :$indent-size = 8, Int :$max-line-length = 80, Str :$prefix = "", Str :$suffix = "" --> Str)
    (Pod::Block::Named $pod where { ... }, Int :$indent-size = 8, Int :$max-line-length = 80, Str :$prefix = "", Str :$suffix = "" --> Str)
    (Pod::Block::Named $pod where { ... }, Int :$indent-size = 8, Int :$max-line-length = 80, Str :$prefix = "", Str :$suffix = "" --> Str)
    (Pod::Block::Named $pod where { ... }, Int :$indent-size = 8, Int :$max-line-length = 80, Str :$prefix = "", Str :$suffix = "" --> Str)
    (Pod::Block::Named $pod where { ... }, Int :$indent-size = 8, Int :$max-line-length = 80, Str :$prefix = "", Str :$suffix = "" --> Str)
    (Pod::Block::Named $pod, Int :$indent-size = 8, Int :$max-line-length = 80, Str :$prefix = "", Str :$suffix = "" --> Str)
    (Pod::Block::Para $pod, Int :$indent-size = 8, Int :$max-line-length = 80, Str :$prefix = "", Str :$suffix = "" --> Str)
    (Pod::Item $pod, Int :$indent-size = 8, Int :$max-line-length = 80, Str :$prefix = "", Str :$suffix = "" --> Str)
    (Pod::Heading $pod, Int :$indent-size = 8, Int :$max-line-length = 80, Str :$prefix = "", Str :$suffix = "" --> Str)
    (Str $text, Int :$indent-size = 8, Int :$max-line-length = 80, Str :$prefix = "", Str :$suffix = "" --> Str)
    (@nodes, Int :$indent-size = 8, Int :$max-line-length = 80, Str :$prefix = "", Str :$suffix = "" --> Str)

Though I can't tell if this of any help because p6man doesn't work for me properly. Probably due to the use of rakudobrew, but p5man JSON::Fast, for example, fails with Could not open JSON::Fast. Failed to stat file: no such file or directory.

We do have to take a good look at p6doc and p6man...


Add Markdown support for criteria.narrative

Let's add sanitized markdown for criteria.narrative:
Criteria.narrative: https://1edtech.github.io/openbadges-specification/ob_v3p0.html#org.1edtech.ob.v3p0.criteria.class

Using BCSI test badge with unordered list, displays as expected on iOS Safari and Android Chrome.
(Should be tested with all supported markdown elements.)

Follow-up issue created.


Cap create pipeline feedback

[CI] Staging environment is at http://cap-staging-docs.codefresh.io.s3-website.us-east-1.amazonaws.com/cap-create-pipeline-feedback/docs/

[CI] Staging environment is at http://cap-staging-docs.codefresh.io.s3-website.us-east-1.amazonaws.com/cap-create-pipeline-feedback/docs/

[CI] Staging environment is at http://cap-staging-docs.codefresh.io.s3-website.us-east-1.amazonaws.com/cap-create-pipeline-feedback/docs/

[CI] Staging environment is at http://cap-staging-docs.codefresh.io.s3-website.us-east-1.amazonaws.com/cap-create-pipeline-feedback/docs/


Lead conversion creating an opportunity should populate opportunity's primary contact field

Per this hub thread.

**lurch: add

Tracking W-008947

Included in beta release version 3.62 (Beta 2) and higher

Included in production release version 3.62


Fix #400 Add Rails/TransactionRequiresNew cop

Replace this text with a summary of the changes in your PR.
The more detailed you are, the better.

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] The PR relates to only one subject with a clear title
and description in grammatically correct, complete sentences.
[x] Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.
[ ] If this is a new cop, consider making a corresponding update to the Rails Style Guide.

I have never used transaction(requires_new: true) of Active Record and have not been able to read and survey https://makandracards.com/makandra/42885-nested-activerecord-transaction-pitfalls.
(I remember a little about what I experienced at J2EE a long time ago :-)
I think that the following investigations are probably needed for cop documentation and implementation.

If there is an option that conflicts with transaction(requires_new: true), this cop will not offense for it when the conflict option is specified
About the background to use with joinable: false
Trade-offs when using transaction(requires_new: true). I think there is a reason why transaction(requires_new: true) is not default in Rails.

There may still be others...
Anyway, I think it is difficult for users to understand and use it if the information for using this cop is not documented. Story of transactions is complicated 😅

I have never used transaction(requires_new: true) of Active Record and have not been able to read and survey https://makandracards.com/makandra/42885-nested-activerecord-transaction-pitfalls.
(I remember a little about what I experienced at J2EE a long time ago :-)
I think that the following investigations are probably needed for cop documentation and implementation.

If there is an option that conflicts with transaction(requires_new: true), this cop will not offense for it when the conflict option is specified
About the background to use with joinable: false
Trade-offs when using transaction(requires_new: true). I think there is a reason why transaction(requires_new: true) is not default in Rails.

There may still be others...
Anyway, I think it is difficult for users to understand and use it if the information for using this cop is not documented. Story of transactions is complicated 😅

I have never used transaction(requires_new: true) of Active Record and have not been able to read and survey https://makandracards.com/makandra/42885-nested-activerecord-transaction-pitfalls.
(I remember a little about what I experienced at J2EE a long time ago :-)
I think that the following investigations are probably needed for cop documentation and implementation.
* If there is an option that conflicts with `transaction(requires_new: true)`, this cop will not offense for it when the conflict option is specified

* About the background to use with `joinable: false`

* Trade-offs when using `transaction(requires_new: true)`. I think there is a reason why `transaction(requires_new: true)` is not default in Rails.

There may still be others...
Anyway, I think it is difficult for users to understand and use it if the information for using this cop is not documented. Story of transactions is complicated sweat_smile

I will do some more research and come up with some examples to add to the documentation to make it more clear.  As well, I will clarify the appropriate use of joinable: false.  I think it might make sense to allow the cop to be configured for either requires_new: true or joinable: false or both.
Where should detailed documentation/explanations about the cop go?  With the examples?  (This is my first attempted contribution for any sort of rubocop rule)

I have never used transaction(requires_new: true) of Active Record and have not been able to read and survey https://makandracards.com/makandra/42885-nested-activerecord-transaction-pitfalls.
(I remember a little about what I experienced at J2EE a long time ago :-)
I think that the following investigations are probably needed for cop documentation and implementation.
* If there is an option that conflicts with `transaction(requires_new: true)`, this cop will not offense for it when the conflict option is specified

* About the background to use with `joinable: false`

* Trade-offs when using `transaction(requires_new: true)`. I think there is a reason why `transaction(requires_new: true)` is not default in Rails.

There may still be others...
Anyway, I think it is difficult for users to understand and use it if the information for using this cop is not documented. Story of transactions is complicated sweat_smile

I will do some more research and come up with some examples to add to the documentation to make it more clear.  As well, I will clarify the appropriate use of joinable: false.  I think it might make sense to allow the cop to be configured for either requires_new: true or joinable: false or both.
Where should detailed documentation/explanations about the cop go?  With the examples?  (This is my first attempted contribution for any sort of rubocop rule)

Where should detailed documentation/explanations about the cop go? With the examples?

Please describe it in the class comment of cop. The following is an example:
https://github.com/rubocop-hq/rubocop-rails/blob/v2.9.1/lib/rubocop/cop/rails/unique_validation_without_index.rb#L6-L15

Where should detailed documentation/explanations about the cop go? With the examples?

Please describe it in the class comment of cop. The following is an example:
https://github.com/rubocop-hq/rubocop-rails/blob/v2.9.1/lib/rubocop/cop/rails/unique_validation_without_index.rb#L6-L15

@koic @the-wendell
There is an example right from a months of debugging and frustration:
class UserAssinment
  class << self
    def create_progress!
      Progress.transaction do
         Progress.create!
         raise 'API error'
      end
    end

    def assign!
      create_progress!
    rescue => e
      logger.warn e
    end
  end
end

UserAssinment.create_progress!
p Progress.count # 0 as expected

UserAssinment.assign!
p Progress.count # 0 as expected

UserAssinment.transaction { UserAssinment.assign! }
p Progress.count # 1 surprise!

The point is that only the root transaction is a real transaction, any nested one is just an illusion by AR defaults. So exception blows the nested transaction block, but going to be rescued upper the stack and never hit the root transaction. So - root transaction will never be rolled back and will commit the part of orphaned queries above the exception. Even worse, the behavior depends on the depth of nested transaction and may (and will) be blinking across refactorings and service classes which call another service classes.


Could not find module after installation

Make sure to check the demo app(s) for sample usage
Make sure to check the existing issues in this repository
If the demo apps cannot help and there is no issue for your problem, tell us about it
Please, ensure your title is less than 63 characters long and starts with a capital
letter.
Which platform(s) does your issue occur on?

iOS
iOS latest
Device: iPhone 6S

Please, provide the following version numbers that your issue occurs with:

CLI: 5.0.0
Cross-platform modules: 5.0.1
Runtime(s): 5.0.0
Plugin(s):

{
  "dependencies": {
    "@angular/animations": "6.1.10",
    "@angular/common": "6.1.10",
    "@angular/compiler": "6.1.10",
    "@angular/core": "6.1.10",
    "@angular/forms": "6.1.10",
    "@angular/http": "6.1.10",
    "@angular/platform-browser": "6.1.10",
    "@angular/platform-browser-dynamic": "6.1.10",
    "@angular/router": "6.1.10",
    "@progress-nativechat/nativescript-nativechat": "2.0.3",
    "kinvey-nativescript-sdk": "3.11.6",
    "nativescript-accelerometer": "2.0.1",
    "nativescript-angular": "6.2.0",
    "nativescript-background-http": "3.3.0",
    "nativescript-camera": "4.0.3",
    "nativescript-fresco": "5.1.0",
    "nativescript-geolocation": "4.3.1",
    "nativescript-imagepicker": "6.0.4",
    "nativescript-intl": "3.0.0",
    "nativescript-iqkeyboardmanager": "1.3.0",
    "nativescript-ng-shadow": "^2.1.0",
    "nativescript-social-share": "1.5.1",
    "nativescript-theme-core": "1.0.4",
    "nativescript-ui-autocomplete": "3.10.1",
    "nativescript-ui-calendar": "3.9.0",
    "nativescript-ui-chart": "3.9.1",
    "nativescript-ui-dataform": "3.7.4",
    "nativescript-ui-gauge": "3.7.1",
    "nativescript-ui-listview": "3.7.2",
    "nativescript-ui-sidedrawer": "5.0.0",
    "reflect-metadata": "0.1.12",
    "rxjs": "6.2.2",
    "tns-core-modules": "5.0.1",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "babel-traverse": "6.26.0",
    "babel-types": "6.26.0",
    "babylon": "6.18.0",
    "codelyzer": "^4.5.0",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "0.7.2",
    "tns-platform-declarations": "4.2.0",
    "typescript": "~2.7.2"
  }
}

Please, tell us how to recreate the issue in as much detail as possible.
Describe the steps to reproduce it.
I'm using the files from the {N} Angular Tutorial and added this plugin like it is described in the README.
When I now start my application with the plugin loaded in my app.module.ts it is showing me the following error:
Start syncing changes for platform ios.
Skipping prepare.
Successfully synced changes for platform ios.
LOG from device iPhone: 2018-11-13 21:38:59.090 nsplaydev[4164:1757408] ***** Fatal JavaScript exception - application has been terminated. *****
2018-11-13 21:38:59.091 nsplaydev[4164:1757408] Native stack trace:
1   0x104887f84 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool, bool)
2   0x1048c06bc -[TNSRuntime executeModule:referredBy:]
3   0x104614154 -[UIApplication(PlayLiveSync) swizzled_executeModule:]
4   0x10409b4f4
5   0x21ed06bb4 <redacted>
2018-11-13 21:38:59.092 nsplaydev[4164:1757408] JavaScript stack trace:
2018-11-13 21:38:59.092 nsplaydev[4164:1757408] 1   require@file:///app/app.module.js:9:39
2   anonymous@file:///app/app.module.js:9:39
3   evaluate@[native code]
4   moduleEvaluation@[native code]
5   promiseReactionJob@[native code]
6   require@[native code]
7   anonymous@file:///app/main.js:6:27
8   evaluate@[native code]
9   moduleEvaluation@[native code]
10  promiseReactionJob@[native code]
2018-11-13 21:38:59.092 nsplaydev[4164:1757408] JavaScript error:
file:///app/app.module.js:9:39: JS ERROR Error: Could not find module 'nativescript-ng-shadow'. Computed path '/var/mobile/Containers/Data/Application/D0C52803-CC7E-486B-BA79-0C6C062291E1/Documents/Playground/LiveSync/app/tns_modules/nativescript-ng-shadow'.
2018-11-13 21:38:59.093 nsplaydev[4164:1757408] PlayLiveSync: Uncaught Exception
2018-11-13 21:38:59.094 nsplaydev[4164:1757408] *** JavaScript call stack:
(

)
2018-11-13 21:38:59.094 nsplaydev[4164:1757408] *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Error: Could not find module 'nativescript-ng-shadow'. Computed path '/var/mobile/Containers/Data/Application/D0C52803-CC7E-486B-BA79-0C6C062291E1/Documents/Playground/LiveSync/app/tns_modules/nativescript-ng-shadow'.
 at
1   require@file:///app/app.module.js:9:39
2   anonymous@file:///app/app.module.js:9:39
3   evaluate@[native code]
4   moduleEvaluation@[native code]
5   promiseReactionJob@[native code]
6   require@[native code]
7   anonymous@file:///app/main.js:6:27
8   evaluate@[native code]
9   moduleEvaluation@[native code]
10  promiseReactionJob@[native code]
', reason: '(null)'
*** First throw call stack:
(0x21f2bbea0 0x21e48da40 0x1048882d4 0x1048c06bc 0x104614154 0x10409b4f4 0x21ed06bb4)
libc++abi.dylib: terminating with uncaught exception of type NSException
2018-11-13 21:38:59.094 nsplaydev[4164:1757408] PlayLiveSync: Uncaught Exception

FYI: The plugin is installed and TSLint isn't telling me any errors, so it should find the plugin


SnapshotRenderingHelper: Fix interaction with performance priority mode

Build manual - https://dev.azure.com/babylonjs/ContinousIntegration/_build/results?buildId=34582&view=results

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Visualization tests for WebGPU (Experimental)
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15743/merge/testResults/webgpuplaywright/index.html

WebGL2 visualization test reporter:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/15743/merge/testResults/webgl2playwright/index.html

Approved here - https://dev.azure.com/babylonjs/ContinousIntegration/_build/results?buildId=34582&view=results


Training on a custom dataset

Hi,
I am trying to train the network on a small dataset of brain MRI images. I have sliced out the images and masks following the format  of your dataset. Now I am having an issue during preprocessing train volumes which results in the volumes having shape (1,1,1) as I print from resize_sample function. I am guessing it is a problem caused by my slice dimensions but I didn't figure out how to fix it. It would be really helpful if you could help!
P.S. I can send you some sample slices I used, but cannot share it here due to the file size limit.

Your volumes (input to resize_sample) are expected to be 4D arrays of shape [n_slices x slice_height x slice_width x n_channels].
Masks should be 3D arrays of shape [n_slices x slice_height x slice_width].


[OSDEV-911] Add code quality pipelines for dedupe-hub | Part 4

OSDEV-911 Add code quality pipelines for dedupe-hub | Part 4

added simple test to Dedupe Hub

I suppose init.py is also needed

added


Fix the event handlers parameter types for the color-picker component.

This adds types to the additional event handler parameters needed for the event prop in the ColorPicker component, so typescript doesn't fail when type checking.
Fixes #3020

CONTRIBUTOR checklist (do not remove)
Please complete for every pull request

[x] First-time contributors should sign the Contributor License Agreement.  If you haven't before, wait a few minutes and a bot will comment on this pull request with instructions.
[x] npm run lint:fix has been run and linting passes.
[x] Mocha, Jest (Storyshots), and components/component-docs.json CI tests pass (npm test).
[ ] Tests have been added for new props to prevent regressions in the future. See readme.
[x] Review the appropriate Storybook stories. Open http://localhost:9001/.
[x] Review tests are passing in the browser. Open http://localhost:8001/.
[x] Review markup conforms to SLDS by looking at DOM snapshot strings.

REVIEWER checklist (do not remove)

[ ] CircleCI tests pass. This includes linting, Mocha, Jest, Storyshots, and components/component-docs.json tests.
[ ] Tests have been added for new props to prevent regressions in the future. See readme.
[ ] Review the appropriate Storybook stories. Open http://localhost:9001/.
[ ] The Accessibility panel of each Storybook story has 0 violations (aXe). Open http://localhost:9001/.
[ ] Review tests are passing in the browser. Open http://localhost:8001/.
[ ] Review markup conforms to SLDS by looking at DOM snapshot strings.

Required only if there are markup / UX changes

[ ] Add year-first date and commit SHA to last-slds-markup-review in package.json and push.
[ ] Request a review of the deployed Heroku app by the Salesforce UX Accessibility Team.
[ ] Add year-first review date, and commit SHA, last-accessibility-review, to package.json and push.
[ ] While the contributor's branch is checked out, run npm run local-update within locally cloned site repo to confirm the site will function correctly at the next release.

closing this due to duplicate PR #3009


update gatsby cache plugin

https://github.com/netlify/netlify-plugin-gatsby#readme

done https://app.netlify.com/sites/simpixelated/settings/plugins


create AccessDetails interface

Rather than having methods with lots of if-then statements, define an
interface so we can have multiple implementations and just select the
right one in NewAccessDetails().
Signed-off-by: Doug Hellmann<EMAIL_ADDRESS>

Rebased and tweaked a bit


[GRM] Resource manager does not remove manually applied finalizers

How to categorize this issue?

/area robustness
/kind bug
What happened:
I created a managed resource that got successfully reconciled. I added a single finalizer to a deployment managed by the said MR. The finalizer was not removed.
What you expected to happen:
Since the applied objects are annotated with
    resources.gardener.cloud/description: |-
      DO NOT EDIT - This resource is managed by gardener-resource-manager.
      Any modifications are discarded and the resource is returned to the original state.

I expect that the finalizer is removed.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
I am not 100% sure if this is a bug or not but at first thought is seems logical that the finalizers are also overwritten.
In a real world scenario we had a cluster being stuck in deletion because some of its system components (deployed via managed resources by Gardener) had a finalizer that was wrongfully added to them in the past.

This seems to be expected behaviour: https://github.com/gardener/gardener/pull/8584


log: maybe we need a logging library?

Here is some logs from my fork of  protoactor-go.
It looks not very neat even it's using log.Printf that same as cluster/consul.
Started EndpointManager
Starting Proto.Actor server address="<IP_ADDRESS>:8080"
Starting Proto.Actor cluster address="<IP_ADDRESS>:8080"
Started Activator
Started kind="Tracker" id="partition-Tracker"
Started kind="Calculator" id="partition-Calculator"
Member joined kind="Calculator" name="<IP_ADDRESS>:8080"
Member joined kind="Tracker" name="<IP_ADDRESS>:8080"

Boot other nodes and press Enter
2020-09-09 17:11:14.536210 I | [CLUSTER] [ETCD] Skip self: /protoactor/mycluster/mycluster@<IP_ADDRESS>:8080.
2020-09-09 17:11:14.536223 I | [CLUSTER] [ETCD] ClusterTopologyEvent: 1
2020-09-09 17:11:14.536249 I | [CLUSTER] [ETCD]    &{MemberID:mycluster@<IP_ADDRESS>:8080 Host:<IP_ADDRESS> Port:8080 Kinds:[Calculator Tracker] Alive:true StatusValue:<nil>}

Maybe we should just use  "github.com/AsynkronIT/protoactor-go/log"?
or maybe we should use a mature third-party logging library?
https://github.com/avelino/awesome-go#logging
BTW: zaplog is nice, I recommend it.

+1
I'm using zaplog myself. Especially the SugaredLogger is very helpful during development since you can see where the messages originated from (file and line number).

+1
I'm using zaplog myself. Especially the SugaredLogger is very helpful during development since you can see where the messages originated from (file and line number).

En...  After a little fix, the protoactor-go/log works fine now.  I can port the feature(file and line number) you loved.
I changed my mind, maybe it's fine to use protoactor-go/log.  Just one problem when it works with os.Exsit.
e.g.:
plog.Error("Surprise! You can't see me.")
os.Exist(0)

Any suggestions?


Make adding librarian tags work smoother

Story
As a librarian, I can add librarian tags, visible only to other librarians so I can communicate with them efficiently about those records via filters.
Full story on epic https://github.com/ugent-library/biblio-backend/issues/511
Original, simplified story on https://github.com/ugent-library/biblio-backend/issues/510
Related: simplifying keywords: https://github.com/ugent-library/biblio-backend/issues/270
Success criteria

[ ] As a librarian I can add librarian tags to a specific record
[ ] As a librarian I can see the librarian tags added to a specific record added by my colleagues
[ ] As a librarian I can remove librarian tags from a specific record, whether they are added by myself or a colleague
[ ] I can filter immediately on the created librarian tags in the publication and dataset overview

Implementation
Design
Overview
Available in the "Biblio activity" tab

Adding and removing a tag

Tags are separated by typing and adding a comma (,) in between tags
Tags are removed by clicking the "X"

Implementation
Modal
https://biblio-ugent-prototype-emily-v2.vercel.app/styleguide/b-modals.html#component-03-modal-large
Mulitiple select
https://biblio-ugent-prototype-emily-v2.vercel.app/styleguide/b-inputs.html#component-09-multiple-select
Example code
https://biblio-ugent-prototype-emily-v2.vercel.app/biblio/reviewer/publication-detail/biblio-activity.html
Overview (with librarian messages) columns

Librarian tags

            <button class="btn btn-outline-primary" type="button" data-toggle="modal" data-target="#editTags">

Edit

            </button>

          funding to do: belgium
          group author publication
          funding to do: cost
          cc-by-2.0

Internal librarian message

        <textarea class="form-control" placeholder="" rows="4"></textarea>

Add internal notes here.

Librarian record message

        <textarea class="form-control" placeholder="" rows="4"></textarea>

This message will be seen by researchers in the overview and record details.

Context
Simplified implementation
https://github.com/ugent-library/biblio-backend/issues/510

Old back-end
Multiple tags:

New tag: click "+"

Will reopen this when the need arises again


Outdated CocoaPods version

The latest version released to CocoaPods is 0.1.1.
Running pod install --repo-update installs this version, not the latest 0.3.0.

I've released version 0.3.1 with correct pod configuration. But I'm not able to publish updates to cocoapods.org. Please use this repo instead for now.
pod 'CombineX', :git => 'https://github.com/cx-org/CombineX.git', :tag => '0.3.1'

Sorry for the late reply, I keep meeting lint failures. I will spend more time on this tomorrow.

Fixed.
https://github.com/CocoaPods/Specs/commit/a9bf85d82319c9d5a0f8010c72f697941a764d34


vdrift: fix build, allow parallel building

Motivation for this change
VDrift previously failed to build on gcc 6. This isn't fixed in any
released version (I don't think the last released version being from
2014 helps), but the latest git version at least builds.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

cc @viric

@GrahamcOfBorg build vdrift


prompt generation very slow

For 4096 token(which is forced by omost), use llama-3 model at 4090, it take 120s to complete prompt. And it take only 7s for SD. It's a big gap.
How can we accelerate the local GPT?

The official LLM's method runs slow.
You can speed up by using TGI or llama.cpp.


Ambiguous state of search when linking from embedded search

The Pathway Commons homepage uses the embedded search box. Upon submitting a query the user is presented with the splash page while the query executes but there is no 'Spinner' or loading feedback which is confusing.
Ensure that 'loading' or 'executing' state is indicated to user.

Issue arises when props aren't set in new window, which is the trigger for the Spinner.
https://github.com/PathwayCommons/pathways-search/blob/72d98473c68203e11ac750be275e2250ccd9de71/js/search/components/SearchWrapper.jsx#L26

Problem was calling instance method (getSearchResult) in constructor. No no. Rather call in componentDidMount();
Fixed in 6b1971e67cd2bb322cb6426c9037a5adb39b1a5e


efivar: fix build on i686, use clickable homepage

Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

Maybe at least do this conditionally, so that QA isn't lowered on the main platforms?

If the build would fail on x84_64 because of a warning and Werror we would ignore, too, so that wouldn't change much.

If the current error happened on x86_64-linux, I'd write a patch and submitted it upstream.

I wouldn't especially if it is some c specific memory overflow because I do not know anything about C except that you need to manually do memory management and there are lots of bugs about that. -Werror is for upstream developers and we drop it often because over time the build can fail especially if upstream also added -Wall.

Well sure, pure C is the main language in my paid job... but it depends on particular error – these looked easy to fix (at quick glance at least).

Seems to be fixed upstream, am testing if it backports:
https://github.com/rhboot/efivar/commit/15622b7e5761f3dde3f0e42081380b2b41639a48

Backport PR: https://github.com/NixOS/nixpkgs/pull/200964


Added splash prediction

Added splash prediction to the projectile aimbot that will try to deal splash damage if no target could be found.
Preview
Other changes:

Added a warning when tf2 is using dxlevel <90
Player priority fix

Dope, looks great for cheesing bots. Does it predict enemy movement for pre-firing splash damage?

Dope, looks great for cheesing bots. Does it predict enemy movement for pre-firing splash damage?

No, it does not predict movement. The intention of this feature was to attack enemies that are hiding behind corners etc.
I think that movement prediction wouldn't make sense here, since we could simply target the enemy directly if they're already moving into our view.

of course I tested this before merging!

Is it possible to incorporate something like cathook's auto viewmodel flipper?
https://user-images.githubusercontent.com/17802843/169708107-1ff80221-2dc5-43c5-b2b8-42ead37147ef.mp4
With that in mind, it should be possible to aim a little closer if we're firing from the left side of the screen.

could be very interesting lol

i've seen clips of it going spaz mode on cathook

That's actually a good idea

Also, it seems like splash prediction is ignoring aimbot FOV?
I'm randomly shooting off to my left/right whenever holding aimkey but not looking at anyone in FOV

sigma

also this
https://user-images.githubusercontent.com/17802843/169710413-24bd0175-4514-4c7f-ba5a-ee345755cde0.mp4

wallbang

intended feature obviously

uhh it seems that i forgot to check if the enemy can even receive splash damage from the predicted location. Should be easily fixable by casting a trace

hey lnx

look at how the uh

demoman triggerbot works

i will

I have added a viewmodel flipper to improve the accuracy:
https://streamable.com/e6x16o

Alright, i've fixed everything you mentioned about the splash prediction.
It will be added in my next PR


Can set all day of the week on the first day

Fixes #894
The current can set 0(Sunday) or 1(Monday) to first day options. But I want set 2(Tuesday).
So it was modified that it can be set to 0 to 6 options of first day.

Why should be Tuesday the first day of the week?

Please describe some actual use cases dor this change.

In the project I'm working on, the system needed to define Tuesday as the first of the week. In the system, machines that are organized by the system treat Tuesday as the first of the week. So I needed that feature.

This makes no sense to add it to the internal code as we have just 3 different variants in the world:
http://chartsbin.com/view/41671
Saturday, Sunday, Monday

This would also break the current behavior.

Not a problem in v5 :)
Closing this as most people don't need to set it to Tuesday


Fix TBD in PR deploy notifications

Fixed in https://github.com/gimlet-io/gimlet-artifact-shipper-action/pull/5/files


Segfault with certain options

Issue:
Picking both beam heating and power law radiation losses leads to a seg fault.
Cause:
The changes to Radiation_Model/source/radiation.cpp from commit:b39b7a7 as part of pull #90 that added in a set of if statements determining when to initialize the radiation object. Selecting electron beam heating and power law radiation sets the condition that the radiation object is needed for ionization states in the beam calculation but never initialized.
Proposed Fix:
Adding in Initialise( szFilename ); at the end of the else statement (line 40) fixes the issue, though in that case the set of if statements appears redundant.

Perhaps the logic could be rearranged a tad.

#if !defined (USE_POWER_LAW_RADIATIVE_LOSSES)

could be changed to

#if !defined (USE_POWER_LAW_RADIATIVE_LOSSES) || (defined (BEAM_HEATING) && defined(USE_POWER_LAW_RADIATIVE_LOSSES))

if I got the syntax correct . . .

Alternatively,
#if defined(BEAM_HEATING)
     Initialise( szFilename );
else (current set of if statements)
that would ensure that whenever the beam is used, you get the ionization fractions, and then only if you need them on without a beam.

Thanks for debugging this. Much appreciated! I’ve updated the master HYDRAD repository on GitHub.
Cheers,
Steve
From: junverferth @.>
Sent: Thursday, July 27, 2023 12:46 PM
To: rice-solar-physics/HYDRAD @.>
Cc: Subscribed @.***>
Subject: Re: [rice-solar-physics/HYDRAD] Segfault with certain options (Issue #98)
Alternatively,
#if defined(BEAM_HEATING)
Initialise( szFilename );
else (current set of if statements)
that would ensure that whenever the beam is used, you get the ionization fractions, and then only if you need them on without a beam.
—
Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https:/github.com/rice-solar-physics/HYDRAD/issues/98*issuecomment-1654105256__;Iw!!BuQPrrmRaQ!nVB7rfsBZF5jobOhyowCKMmp-TBgEccXJboGZfcOFE7SReFaGY8cf8VN_b-SWph-vwf7MJVXsWj7gwBOlhr077syy1Em8I82z_o$ , or unsubscribe https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ACC6C7QKULGEVETUZQCRSJ3XSKSNRANCNFSM6AAAAAA22CP4JM__;!!BuQPrrmRaQ!nVB7rfsBZF5jobOhyowCKMmp-TBgEccXJboGZfcOFE7SReFaGY8cf8VN_b-SWph-vwf7MJVXsWj7gwBOlhr077syy1Emubedszo$ .
You are receiving this because you are subscribed to this thread.  https://github.com/notifications/beacon/ACC6C7SRIYQ34ALLBXVCXY3XSKSNRA5CNFSM6AAAAAA22CP4JOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTCS6SKQ.gif Message ID: @.***>


traefik EMAIL variable

Classification

[X] Question
[X] Documentation

Reproducibility

[X] Not applicable

Description
I tried creating letsencrypt certificates with traefik according to the documentation and get errors with Error creating new account :: not a valid e-mail address from traefiks acme client.
I saw that there is a variable called EMAIL in traefik.toml but can't find it inside docker-compose.yml or .env.
Where is EMAIL set?

Where is EMAIL set?

You must set your e-mail address in traefik.toml
.env is used to define environment variables to be used for variable substitution in your docker compose file, not for traefik.toml.

So to clarify, both values EMAIL and DOMAIN have to be set manually in traefik.toml?

@atomtigerzoo Yes

Thank you - I will try and add this info to the documentation the next days if you like.


Lack of vanity address search complexity calculation

Initial impl., related to #51.

@r8d8 it was a little bit difficult to find beauty approarch to impl. it ;( Tomorrow I will write unittest, so please don't merge it until that.

Codecov Report

Merging #74 into master will decrease coverage by 18.79%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
- Coverage   37.83%   19.04%   -18.8%
==========================================
  Files           2        3       +1
  Lines          74      147      +73
==========================================
  Hits           28       28
- Misses         44      117      +73
  Partials        2        2

Impacted Files
Coverage Δ

pkg/keypair/keypair.go
71.42% <ø> (ø)
:arrow_up:

pkg/vanity/vanity.go
3.89% <0%> (-3.8%)
:arrow_down:

pkg/vanity/probability.go
0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0012d8f...de8bdaa. Read the comment docs.


add tomcat

I completed the 3 steps below:

[x] I've read the Contribution Guide.
[ ] I've updated the documentation. (refer to this for how to do so).
[x] I enjoyed my time contributing and making developer's life easier :)

I think this PR is not yet completed, just because Laradock is Docker based development environment for PHP language, adding Tomcat itself doesn't help PHP-enabled apps anything.
Please help to add some basic configuration for Tomcat to support PHP, for example, support php-fpm like nginx container.
Thanks.

I think this PR is not yet completed, just because Laradock is Docker based development environment for PHP language, adding Tomcat itself doesn't help PHP-enabled apps anything.
Please help to add some basic configuration for Tomcat to support PHP, for example, support php-fpm like nginx container.
Thanks.

It should be said that a development environment has been completed.
It should not be said that it is completely meaningless.
And many developers just need to copy the class or war to the webapps directory to run.

maybe php developer need integrated some service on tomcat


Stop removing spaces from nvm_path

It brakes switching version of node through nvm in directories with space somewhere in it's path:
https://youtu.be/dW1cxfElF5U
I can't imagine why creator of this script is removing spaces from the path, maybe there is a reason for that but I don't know it, please review it then.

@ljharb IIRC, the tr -d '[:space:]' was because pwd prints a newline character at the end.
$ pwd
/home/d4nyll
$ pwd | wc
      1       1      13
$ pwd | tr -d '[:space:]'
/home/d4nyll$ pwd | tr -d '[:space:]' | wc
      0       1      12

If it's messing up with paths that contains spaces, it'll probably be better to remove the newline character on this line.

Seems reasonable to me. @stopsopa can you add that change?

I've updated pull request to trim newline character from path

Ekhm, It's ready to be reviewed again and possibly even merged.


Systray module fails with "error: cannot coerce null to a string."

Something with the latest update seems to have run afoul with my configuration. At first it didn't even look like it involved plasma-manager until I ran nix flake check --show-trace.
Commenting out the use of the system tray module eliminates this issue, but I'm not sure exactly what changed that is causing this error.
I have attached the trace. I may need to work around this by configuring the system tray without the use of the module.
trace.txt

I did notice. We forgot to check something in a recent PR. This should after #206 is merged though :)


Can't figure out Copymode

Copymode seems to be working, but the buffer is always empty.

Arch dvtm-git: dvtm-v0.15-40-g311a8c0 © 2007-2016 Marc André Tanner
kitty 0.17.4 created by Kovid Goyal
abduco-0.6 © 2013-2016 Marc André Tanner
Kakoune v2020.01.16

I was happy to see dvtm-editor show up in the repository and solve the fact that kak doesn't have a fifo mode (AFAICT). Indeed, MOD-e does open an editor (vi, although EDITOR, VISUAL, and DVTM_EDITOR are all set to kak), but the buffer is empty.  A look at ps shows a process:
ser      1292305  0.0  0.0   6072  2680 pts/1    S+   16:19   0:00 vi +0 /tmp/dvtm-editor.myypMa

and when I manually cat that file it is empty lines; wc -l says 17 of them.
Maybe I don't understand how this works. From the README and man page, I thought if I did an ls and then MOD-e I'd get an editor with some amount of the ls command opened in the editor, and this takes the place of tmux's visual selection mode.  Do I need to do something else?

This occurs only when launched from the WM via a hotkey.  There are a lot of moving parts, and I'm not yet sure which component is causing the issue, but the full chain is:

Hotkey in i3 launches i3quake, passing the abduco command; effectively:bindsym $mod+Shift+n exec /home/ser/go/bin/i3quake -p right -H 0.6 -- $shell abduco -A

i3quake dvtm -m ^b
2. `i3quake` executes the arguments with Go's `os/exec`. The purpose of this tool is to spawn the tool and then mark the resulting window using i3 marks so it can be easily found and manipulated using i3's scratchpad, so the window can be hidden and exposed with a hotkey like any number of Quake-inspired terminals.
3. `$shell` is defined as `st`, but the behavior (copymode not working) is the same regardless of the shell used; I've tried `st`, `kitty`, and `termite`.  The variable is poorly named; it should be `$terminal` or `$termemulator`.  Whatever.
4. `$shell` runs `abduco`
5. `abduco` runs `dvtm`
6. *copymode* successfully executes launches with `MOD-e`, using my preferred `$EDITOR` (kakoune), but the buffer is empty.  The behavior is the same regardless of the editor used; I've tried `vi` and `vis`.

However: if I just launch `st` and then run `abduco -A xyz dvtm -m ^b`, then *copymode* works as expected.  Because it works by itself, I'm closing this ticket.

I have the same issue. On OpenBSD with cwm, with either xterm or st, and a vis editor copymode buffer seems to remain empty. Or at least, I can't paste anything in.


"ObjectLiteral doesn't support methods" for a project that build successfully and is referenced in another project via NuGet

This is a bit of a weird one; I'm still investigating so will post back if I find out more. It sounds strange, but here's what seems to be happening...
We have a project that uses [ObjectLiteral] and has a method:
[Reflectable(false)]
[ObjectLiteral(ObjectCreateMode.Plain)]
[External]
public sealed class Document
{
	[External]
	public extern void AppendStyleSheet(string path);
}

This seems to compile fine. We're building that into a NuGet package on our build server, and then referencing that from another project. That project appears to build fine in Visual Studio however fails when calling MSBuild directly (and thus, on the build server) with this error:
"C:\Work\Source\MyThing\MyThing-Template-Editor\MyThing.sln" (default target) (1) ->
"C:\Work\Source\MyThing\MyThing-Template-Editor\TemplateEditor\TemplateEditor.csproj" (default target) (56) ->
(BridgeGenerateScript target) ->
  C:\Work\Source\MyThing\MyThing-Template-Editor\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets(18,5): error : Error: ObjectLiteral doesn't support methods: Bridge.CKEditor.Document    at Bridge.Translator.Validator.CheckMethods(TypeDefinition type, ITranslator translator)\r [C:\Work\Source\MyThing\MyThing-Template-Editor\TemplateEditor\TemplateEditor.csproj]
C:\Work\Source\MyThing\MyThing-Template-Editor\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets(18,5): error :    at Bridge.Translator.Validator.CheckType(TypeDefinition type, ITranslator translator)\r [C:\Work\Source\MyThing\MyThing-Template-Editor\TemplateEditor\TemplateEditor.csproj]
C:\Work\Source\MyThing\MyThing-Template-Editor\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets(18,5): error :    at Bridge.Translator.Translator.AddNestedTypes(IEnumerable`1 types)\r [C:\Work\Source\MyThing\MyThing-Template-Editor\TemplateEditor\TemplateEditor.csproj]
C:\Work\Source\MyThing\MyThing-Template-Editor\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets(18,5): error :    at Bridge.Translator.Translator.ReadTypes(AssemblyDefinition assembly)\r [C:\Work\Source\MyThing\MyThing-Template-Editor\TemplateEditor\TemplateEditor.csproj]
C:\Work\Source\MyThing\MyThing-Template-Editor\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets(18,5): error :    at Bridge.Translator.Translator.InspectReferences()\r [C:\Work\Source\MyThing\MyThing-Template-Editor\TemplateEditor\TemplateEditor.csproj]
C:\Work\Source\MyThing\MyThing-Template-Editor\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets(18,5): error :    at Bridge.Translator.Translator.Translate()\r [C:\Work\Source\MyThing\MyThing-Template-Editor\TemplateEditor\TemplateEditor.csproj]
C:\Work\Source\MyThing\MyThing-Template-Editor\packages\Bridge.Min.15.7.0\build\Bridge.Min.targets(18,5): error :    at Bridge.Build.GenerateScript.Execute() [C:\Work\Source\MyThing\MyThing-Template-Editor\TemplateEditor\TemplateEditor.csproj]

Everything is using Bridge 15.7.0.
Things we can't understand:

Why this error shows up from msbuild but not from Visual Studio
Why the project containing the class in the error (Bridge.CKEditor.Document) seems to build fine both from VS and msbuild
Why the Bridge compiler is looking at Bridge.CKEditor.Document when building a project that references it (it was already built and its JS embedded in the DLL/NuGet?)
Why this error message exists if methods are supposed to be supported (https://github.com/bridgedotnet/Bridge/pull/1733)?

I'll try and find more time to dig into this today but in the meantime if you have any ideas about what's going on (or how to debug further), I'd love to hear them!

Hi @DanTup – Thanks for reporting. This week we'll try to setup a Solution which reproduces the scenario. We'll probably have some questions.

Apologies for not getting back to this, it's been hectic. I'll see if I can trim it down into something I can share (if not here, privately)

I can't repro this in an empty new solution with the project copied, so something else must be interfering! ;(
I'm gonna try and strip a copy down to see what's causing it; it might not be worth your time investigating until I've gotten somewhere..

Er, whoops!
My guess is that the old Bridge DLL is being loaded (you can only have one version of a DLL loaded if not strong named) and when the new project is compiling it's using the older version (but the tagets file is still new, which is why the version number in the message is misleading).

I don't know if you could easily detect this (mismatched version within same solution, or targets not matching loaded DLL) and give a specific message, though it's really user error (fixing the old project to use 15.7.0 resolved the issue).

We could try to compare Bridge.dll version and Bridge Compiler versions or passing a parameter into Bridge target (Bridge task) to compare to Bridge compiler version.

Ok, I'm not entirely sure the original report is accurate. We're seeing this a lot and it seems to be somewhat random. For example, we had a successful build yesterday and then a commit that literally just removed a single C# file (which had an empty [Ready] method - all of its code was already commented out) and then it failed on the next build with this message. There's literally nothing else in the changesets so I'm not sure what's happened... I wouldn't expect the buildserver to have used different versions of the packages between the two builds, but I'll try and do some more digging and post back.

I've just had a quick look on the build server and every single Bridge.dll in the whole project folder for this repo is 15.7 with the same filesize and timestamp; also suggesting it's not caused by an older Bridge reference :(

I tried to compare the MSBuild output for a working/broken project, but the projects built in different orders (we're using the /m switch) so it's hard. I'm gonna remove /m for now and see if the problem occurs again - if not, maybe it's somehow related to parallel builds but if it does, hopefully there will be a better log to compare.

Btw, forcing the same build with no changes was successful, so it's definitely intermittent even with the exact same build! :(


Favicons, Google Analytics, and cleanups

add google analytics code
cleanup footer
sync dates (to be 22-Dec-2015)

@wkirwin added google analytics, plus other cleanups


Re-Introspection Error: model.rs:174:64 Could not find relation field User on model Team.

Command: prisma db pull
Version: 3.2.1
Binary Version: b71d8cb16c4ddc7e3e9821f42fd09b0f82d7934c
Report: https://prisma-errors.netlify.app/report/13550
OS: x64 darwin 20.6.0
JS Stacktrace:
Error: [libs/datamodel/connectors/dml/src/model.rs:174:64] Could not find relation field User on model Team.
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/prisma/build/index.js:43135:28)
    at ChildProcess.emit (events.js:315:20)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)

Rust Stacktrace:
   0: backtrace::backtrace::trace
   1: backtrace::capture::Backtrace::new
   2: user_facing_errors::Error::new_in_panic_hook
   3: user_facing_errors::panic_hook::set_panic_hook::{{closure}}
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic_handler::{{closure}}
   6: std::sys_common::backtrace::__rust_end_short_backtrace
   7: _rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::option::expect_failed
  10: dml::model::Model::find_relation_field_mut
  11: sql_introspection_connector::re_introspection::enrich
  12: sql_introspection_connector::calculate_datamodel::calculate_datamodel
  13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  14: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  15: <futures_util::future::either::Either<A,B> as core::future::future::Future>::poll
  16: <futures_util::future::future::Then<Fut1,Fut2,F> as core::future::future::Future>::poll
  17: <futures_util::future::either::Either<A,B> as core::future::future::Future>::poll
  18: introspection_engine::main::{{closure}}
  19: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  20: introspection_engine::main
  21: std::sys_common::backtrace::__rust_begin_short_backtrace
  22: std::rt::lang_start::{{closure}}
  23: std::rt::lang_start_internal
  24: std::rt::lang_start

Probably duplicate of: https://github.com/prisma/prisma/issues/10453

Hi there,
As part of our effort to clean up our GitHub repo, we’re closing this issue to help focus on features and improvements that align with our focus areas and those of our community.
This issue was originally created for internal tracking purposes, but if you feel this is important to you, feel free to reopen the issue and get like-minded users to upvote as we will prioritize fixing issues based on community interest.
For more insight into our priorities and how we’re thinking about the future of Prisma, please see our blog post: https://www.prisma.io/blog/prisma-orm-manifesto.
Thank you for your understanding and support!


fix typo in autodesk.txt

in a sentence "client/README.md:19:0: "Enviroment"" corrected the word "Environment"

I believe you intended to send this PR to another repository. :)


Fix -Wmismatched-tag warnings (NFC)

This cleans up the spew of -Wmismatched-tag warnings resulting from
the PointerLikeTraits being specialised as a class rather than a
struct.  Although this does not matter for traits, MS ABI will mangle
the tag type into the name and would result in a mismatch.  NFC

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@swift-ci please test and merge

Hmm, wait, now I'm seeing this in the inverse.  Ugh, I wonder if I had the tree in a bad state.


Add prettier-standard support

Disclaimer: I'm an author
prettier-standard is a fixer (not linter), for standard rules
It uses prettier underneath
https://github.com/sheerun/prettier-standard

Sure, I'll edit out that duplicated header.
I recommend that people use ESLint instead of standard or xo, but I'll support whatever works.

Thank you, I've mentioned your plugin in the README: https://github.com/sheerun/prettier-standard
There's just one issue that happens when project uses just prettier-standard and no .eslintrc. I'll add another issue so you can track it.


Multi environment lambda layer hard codes environment

Describe the bug
I have two environments and have created a new lambda layer. When I add the lambda layer to a function in the first environment, the CFN template for that function injects the current environment's layer value as a hard coded value from the env it was created in, rather than the environment that the build is/will be occurring in
https://github.com/aws-amplify/amplify-cli/blob/bffaded7351e3bfbcb67fede139b3dab7770eda4/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/lambda-layer-cloudformation-template.ts#L154-L158
Amplify CLI Version
4.29.4
To Reproduce

Create two environments
Add a single lambda layer to both
Add the lambda layer to a function in environment A
Check the output of Layers in function-cloudformation-template.json – the value contains a hard-coded env

Expected behavior
The string value should contain a reference to Ref:env to pull the environment value from the current build environment rather than the environment where the layer was added to the function
Desktop (please complete the following information):

OS: Mac
Node Version. 10.15.3

Additional context
https://github.com/aws-amplify/amplify-cli/blob/bffaded7351e3bfbcb67fede139b3dab7770eda4/packages/amplify-category-function/src/provider-utils/awscloudformation/utils/lambda-layer-cloudformation-template.ts#L154-L158

@davekiss #5072 is along the same lines, you can follow the updates there.

Hi @davekiss, thanks for pointing this out. The env name is replaced with the current environment when you execute amplify push, however a using something like Ref:env would be better. I'm marking this as an enhancement.

Not sure if this is the same issue or not, but I have a multi env, and a lambda layer was created in env A. When I merged this into env B, although amplify push created a new lambda layer in env B, it linked the lambdas of env B to the layer of env A.
So, just my opinion, but I am struggling with the enhancement tag. To me, this means that amplify cli doesn't yet support layers in a multi env. If env B is production and env A is dev, sorry, but  I can't have production code dependent on a piece of dev code.

@kenbankspeng @jhockett totally agree, it'd be one thing if the amplify push did replace the env value but that is not the case, env is only replaced when adding the layer to the lambda. This is a bug, not an enhancement.

I just performed a little test. I enhanced the lambda layer code in env B, did a push and as expected got a new version of the layer in env B, but was my jaw dropped after observing that the lambdas in env B still link to the now out-of-date code in layer A. Sorry, but a configuration management nightmare and not a feature that can be used for production.
I do really appreciate the value that a lambda layer can add. I do hope this can be resolved quickly. Thank you.

@davekiss Agree with you - this is a bug.   @jhockett - the env name is not replaced with the current environment when you execute amplify push

One thought would be:

environment - have the ${env} in the name of the layer as suggested above.  This would mean the checkout code would not have to do anything when checking out different environments (as well as create environment not having to change).
version - have a variable ${latestVersion} that always points to the latest version of the lambda for the given environment.  This would mean when checking out a new environment as long as the 'latest version' in that environment was set when creating/checking out.   If for some reason the 'layer' needed to be pinned - this would be a manual step - much like it is now.

Given these two ideas, seems like it would not be too bad of a fix?

@jhockett Any update on this?

I've also ran into this issue attempting to use Lambda layers in a multi-environment team, would like to avoid having to run amplify update function each time someone pulls in code from others.
Any update?

Hi all, we are actively looking into reworking how layer versions work in the CLI, so fixing this issue will likely either coincide or follow that update.

Hey I noticed there was a fairly large amount of changes released in the latest version of Amplify. I was wondering if this was covered, it was not super clear if it was based on the changelog.

Hey I noticed there was a fairly large amount of changes released in the latest version of Amplify. I was wondering if this was covered, it was not super clear if it was based on the changelog.

Sorry for the confusion, but the layer versioning hasn't changed yet. I will update this issue as soon as there is more to share.

I was able to resolve it by replacing it with lambda layer arn in the cloudformation file. Layer ARN is available as an environment variable.

@akash87 That is a fantastic solution!
@jhockett The layer thing needs some attention in a big way.
In fact, a great solution would be to let lambda's in an amplify project reference javascript files outside of their folder.  This is probably the 80% use case anyway - just some shared code among a few lambdas.  Don't necessarily need the whole shared layer concept.
In the meantime a change to the above would help anyone using lambda.  For now, a few manual edits and this is much better.

@jhockett anything else to share here? Layers are really slowing our productivity down

@jhockett anything else to share here? Layers are really slowing our productivity down

Apologies, not yet. We've had to prioritize work for the admin UI in the past few months, but I expect to return to working on layers shortly. I'll do my best to update any related issues once we have improvements ready. Thank you for your patience!

Apologies, not yet. We've had to prioritize work for the admin UI in the past few months, but I expect to return to working on layers shortly. I'll do my best to update any related issues once we have improvements ready. Thank you for your patience!

I was able to resolve it by replacing it with lambda layer arn in the cloudformation file. Layer ARN is available as an environment variable.

Thanks for this workaround.
Is this consistent?

When I create a new layer version and update my function to use that version, will this be overwritten then?

I was able to resolve it by replacing it with lambda layer arn in the cloudformation file. Layer ARN is available as an environment variable.

Thanks for this workaround.
Is this consistent?

When I create a new layer version and update my function to use that version, will this be overwritten then?

I'm going to use these rules on my project to get around the problem:

use Lambda Layers only for packages storing
don't use env in a lambda layer name

For it, we need to do:

create a new layer with amplify function add
change LayerName in the template of new function myLayer-awscloudformation-template.json
from:

{
...
  "Resources": {
    "LambdaLayer": {
      ...
        "LayerName": {
          "Fn::Sub": [
            "myLayer-${env}",
            {
              "env": {
                "Ref": "env"
              }
            }
          ]
        }
   }
...
}

to
{
...
  "Resources": {
    "LambdaLayer": {
      ...
        "LayerName": {
         "Fn::Sub": "myLayer"
        }
   }
...
}

Any updates on this would be great ?

+1

Hi all!
We have an alpha build of our redesign of Lambda layers in Amplify CLI available to try. This includes several bug fixes and new features. It also includes a one-way migration step for existing layer resources. Lambda layer resources pushed with this build will not work with any other version of the Amplify CLI.
DO NOT USE THIS IN PRODUCTION!
To test it out: npm i -g @aws-amplify/cli@not-for-production-layers
Notable changes:

Complete redesign of layer version tracking. New code does not make assumptions about what layer versions exist in the cloud and always pulls the latest data from the Lambda service
Option to automatically update dependent functions to the latest deployed Lambda layer version
Added ability to delete individual layer versions
Layers now have a dependency installation step that will install dependencies based on what's in package.json for NodeJS or Pipfile for Python
Support editing layer version descriptions
Removes local version state tracking from amplify-meta.json and team-provider-info.json

We'd love to hear any community feedback!

Hi all!
We have an alpha build of our redesign of Lambda layers in Amplify CLI available to try. This includes several bug fixes and new features. It also includes a one-way migration step for existing layer resources. Lambda layer resources pushed with this build will not work with any other version of the Amplify CLI.
DO NOT USE THIS IN PRODUCTION!
To test it out: npm i -g @aws-amplify/cli@not-for-production-layers

I tried to migrate my project on this version but I got an error in the generated CloudFormation file (I made the layer accessible from my whole organization):
Resource Name: LambdaLayerPermissionAwsOrgoxxxxx1857pLegacy1Legacy1 (AWS::Lambda::LayerVersionPermission)
Event Type: create
Reason: 1 validation error detected: Value 'o-xxxxx1857pLegacy1' at 'organizationId' failed to satisfy constraint: Member must satisfy regular expression pattern: o-[a-z0-9]{10,32} (Service: AWSLambdaInternal; Status Code: 400; Error Code: ValidationException; Request ID: 5017624e-da55-4687-83e1-d370bae99a21)

By the way, the environment and the version are still hard-coded in LayerVersionArn of the layer permission:
"LambdaLayerPermissionPrivate144bc277": {
      "Type": "AWS::Lambda::LayerVersionPermission",
      "Properties": {
        "Action": "lambda:GetLayerVersion",
        "LayerVersionArn": "arn:aws:lambda:eu-west-1:XXXXXXXXXXXX:layer:BackendLayer-testb:4",
        "Principal": {
          "Ref": "AWS::AccountId"
        }
      }
    }

My guess is that the layer version used by the functions shall be placed in the file "team-provider-info.json" as it is environment-dependant.
As for Layer version permissions, this is more tricky because the number of layer versions of each environment might differ so they can't just be listed in the cloudformation template.

Thanks for the valuable feedback @jlecren! The first issue is definitely a bug, so thank you for the report.

By the way, the environment and the version are still hard-coded in LayerVersionArn of the layer permission:
"LambdaLayerPermissionPrivate144bc277": {
      "Type": "AWS::Lambda::LayerVersionPermission",
      "Properties": {
        "Action": "lambda:GetLayerVersion",
        "LayerVersionArn": "arn:aws:lambda:eu-west-1:XXXXXXXXXXXX:layer:BackendLayer-testb:4",
        "Principal": {
          "Ref": "AWS::AccountId"
        }
      }
    }

When you push in a new environment, the CFN template will be updated accordingly. We don't use refs for the env name because layer versions are specific to each environment, and so are the associated layer version permissions.

My guess is that the layer version used by the functions shall be placed in the file "team-provider-info.json" as it is environment-dependant.
As for Layer version permissions, this is more tricky because the number of layer versions of each environment might differ so they can't just be listed in the cloudformation template.

It depends on if you use the new "Latest version" setting or if you pin a specific version. You can use amplify update function to try it out.


Fix: Do not complain when endY is bigger than document height

This PR fixes the bug that was reported in this issue https://github.com/zinserjan/wdio-visual-regression-service/issues/14
As I mentioned in that issue, if part of an element stays out of viewport (need scroll to be visible) this plugin throws an error. Unfortunately, there is no documentation in code so I couldn't find what's the initial intention for this check. Anyway, what I've done is to use this module directly against our project and with this check removed from the code, wdio-screenshot successfully takes expected screenshot of the element.
As side note, I think we can remove the similar check for endX as well. Unit tests are passing but integration tests are failing in my end when I run npm run test:local due to some pixel ratio.

Thanks for your PR.

Unfortunately, there is no documentation in code so I couldn't find what's the initial intention for this check.

My intention for this check was to find a test case that fails. Initially I thought that when endY is bigger than the documents height, then we have to use the documentHeight instead to get properly taken screenshots. But I wasn't sure if that 's the right way so I ended up with that error instead :smile:
As I can see you just removed that check. Are the screenshots really ok?
I thought that this may record screenshots from areas that are not visible for user and this should never happen.
Regardless of the direction, it would be awesome & necessary to get a simple integration test for this.

@zinserjan glad to hear that. I totally agree with the integration test for this scenario. As I mentioned I tried to run integration tests using npm run test:local and it fails in image comparison part and as far as I can say it's because of pixel ratio difference between my workstation and the one that was used to generate the reference images.
I wonder what was the environment that you ran integration tests on it (in terms of pixel ratio).

I wonder what was the environment that you ran integration tests on it (in terms of pixel ratio).

Pixelratio 1. I created some of the screenshots in a VM with Ubuntu, some others with Windows (for the IE cases).
When you are testing with a Retina Macbok, tests will fail due to the size (twice as big).

@zinserjan I managed to run integration tests on Ububunu and all of them are passing. I also added two more integration tests for the new scenario and it works. Can you help on broken tests in Travis/Appveyor please? What's the process of generating reference IE images, I just copied the Linux one.

@mehdivk
Screenshots for IE are generated by IE ;-) But I'm not sure which version it was. Must be IE 9 or IE 10.
I just looked over the test page and I didn't found any reason in my browser why this should fail and tried the tests with the old code. And indeed tests passes with the old code cause element height is smaller than documents height.
Can you update the test case in a way that it will fail with the original code? I think it should be enough to expand height of the element.

@zinserjan let's park IE screenshots for now as it's not a big deal. I updated the example so it fails with the original code and passes with the change. The endY > documentHeight usually happens when you disable the main scroll by overflow: hidden and enable it again using overflow: scroll on an inner element on the page. This is a known approach when you want to have a header that remains on top of the screen during scroll and a footer that sticks to the bottom of the screen during scrolling. Updated example tries to replicate this issue with the minimum code, so it doesn't have header/footer but uses the same approach.
Digging into this problem, I noticed that we don't have the support of scrolling an element instead of the whole page. With the original fix, we can take the screenshot but the screenshot is broken because we move up the whole page instead of a specific element. I think, allowing the user to define an element as scroll target would fix this issue. I'm open to any suggestion to fix this problem.

I noticed that we don't have the support of scrolling an element instead of the whole page.

Yes, this is right and that's the real issue here. Just disabling the endY > documentHeight check doesn't solve this.

With the original fix, we can take the screenshot but the screenshot is broken

With broken you mean kind of incomplete, right? Only the visible part of the element is recorded and the rest of the screen is filled with the next element (below the captured/desired element)?

I think, allowing the user to define an element as scroll target would fix this issue.

I think it's more complicated. We have to think about two use cases:

element screenshots
document screenshots

element screenshots
This should be easiest case, cause we could detect if the element is scrollable or inside a scrollable container. I'm not sure right now if we have to check the second condition.
If the element is scrollable, we can do it the same way like with the document and move the element with css into position, take screenshot, move again and so on until it's completely recorded.
document screenshots
That's the funny part, when we want to consider the following use case:

disable the main scroll by overflow: hidden and enable it again using overflow: scroll on an inner element on the page.

This is already complicated to handle but we can increase the complexity when you have multiple elements with that behavior (e.g. side by side with different heights). How does the final screenshot look like? I think everyone has a different opinion about that.

Yes, this is right and that's the real issue here. Just disabling the endY > documentHeight check doesn't solve this.

Indeed.

With broken you mean kind of incomplete, right? Only the visible part of the element is recorded and the rest of the screen is filled with the next element (below the captured/desired element)?

Yes, the visible part will be available in screenshot and rest will be yellow in our case (background color of the page is yellow). This is due to behavour of transform: transition

or inside a scrollable container. I'm not sure right now if we have to check the second condition.
I can't think of any solution to detect if an element is within a scrollable container in a recursive way because an element may be within a container that is not scrollable but the container itself is within another container that is scrollable.

This should be easiest case, cause we could detect if the element is scrollable or inside a scrollable container. I'm not sure right now if we have to check the second condition.
If the element is scrollable, we can do it the same way like with the document and move the element with css into position, take screenshot, move again and so on until it's completely recorded.

I propose to add an scroll option to browser.saveElementScreenshot(). If provided we use related DOM element that matches the selector for the purpose of scrolling otherwise we use html. This way we won't break existing clients of the module.

disable the main scroll by overflow: hidden and enable it again using overflow: scroll on an inner element on the page.

Well I don't think we need to mess with the elements. If consumer provides a selector as scroll target, we assume that the element is already scrollable. Am I missing something?

This is already complicated to handle but we can increase the complexity when you have multiple elements with that behavior (e.g. side by side with different heights). How does the final screenshot look like? I think everyone has a different opinion about that.
TBH I'm not user of document screenshot as I belive that it's not a good pattern to take screenshot of whole document for the purpose of CSS regression tests but other devs might use it for some other reason.

We can keep this small and add support of custom scroll to the element

@zinserjan I added my proposed solution for the scroll to the PR.

I'm not convinced that this will work in all cases. I still think that we need the original virtualScroll on html to get the scroll container into position and move the content with virtualScroll again and take screenshots.
I'll try to create an example. But maybe I'm wrong cause CSS isn't my daily business :laughing:

I'm not convinced that this will work in all cases. I still think that we need the original virtualScroll on HTML to get the scroll container into position and move the content with virtualScroll again and take screenshots.

TBH I can't think of a case in which we need to move to scroll two scrollbars at the same time to take a screenshot of an element, neither this PR is going to fix all possible situations. I updated the new tests, so scroll target is different from the element under the test to show they don't need to be the same element. I would like to think of t his PR for a fix and a feature

Fix: Don't complain when endY > documentHeight, this is a geniue case and can be reproduced using new tests

Feature: Allow consumer of the API to optionally customise scroll target per test.

@zinserjan is there any intention to proceed with this PR?

@zinserjan Hi. Are you still interested in this PR? We need this feature for our project and if it's not going to be merged we have to find another solution for our problem.
Thanks

@mehdivk Sorry for the delay but the new year is very time consuming and I haven't found the time, yet.

We need this feature for our project

Which of the following do you mean exacly?

Fix: Don't complain when endY > documentHeight, this is a legit case and can be reproduced using new tests

Feature: Allow consumer of the API to customize scroll target per test optionally.

At the moment I would like to avoid introducing a new option that allows the user to define a custom scroll target until #21 and #48 are resolved. My preference is a automatic scroll element detection, so that the screenshot stitching algorithm remains as a black box for the user.

hi all.  i just got x-reffed here after suffering the following error [0] endY is out of range.  i also see that it's been open a while.  can i help in any way to get it movin?

ah, & i should have asked earlier... is there a temp workaround?

As a workaround I defined all my viewports with height: 10000. This works for my checkElement tests.

Just chiming in to say that this still exists. I'm also seeing a similar error with endX.


Customization of waiter configuration.

Fixes #981.

This is causing tests to fail on all python versions we support, you will need to fix those before we can look at this.

Fixed doc test.

Current coverage is 97.59% (diff: 100%)

Merging #1015 into develop will increase coverage by 0.01%

@@            develop      #1015   diff @@
==========================================
  Files            44         44
  Lines          6934       6932     -2
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           6766       6765     -1
+ Misses          168        167     -1
  Partials          0          0

Powered by Codecov. Last update dffa9b3...8a1ed15

Just wanted to follow up here.  We recently merged a PR that added a public API for customizing waiter configs: https://github.com/boto/botocore/pull/1267
Does this meet your use case?


As/change error handling

Change error pop up behaviour
The error message 'something went wrong' isn't really helpful at this moment. Expected behavior: Add a subtext:It looks like we lost a connection to some data. Hit reload below to reload your page. If this error persists, please get in touch at<EMAIL_ADDRESS>& add a button to reload
Changes 👷♀

display text of error popup changed
name of button changed
reload button refreshes the page

How to test 🧪

use metamask pointed to local hardhat
go to open multiply
kill hardhat

Definition of done ✔

[ ] Acceptance criteria for each issue met
[ ] Unit tests written where needed and passing
[ ] End-to-end tests for happy path
[ ] Documentation updated
[ ] Project builds without errors
[ ] Non-functional requirements met
[ ] Code reviewed and functionality tested by the reviewer (locally, Heroku, etc.)
[ ] Feature verified and accepted by Product Owner
[ ] Project deployed to production environment

going to help position the buttons

after adding extra grid divided into 2 columns


merge from arlac77/npm-package-template-esm-only

package.json

chore(scripts): cover@#overwrite c8 -x 'tests/**/*' --temp-directory build/tmp ava && c8 report -r lcov -o build/coverage --temp-directory build/tmp
chore(engines<EMAIL_ADDRESS>

:tada: This PR is included in version 3.0.8 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket: