Issue with Elixir highlighting

This HTML snippet:

    <link rel="stylesheet" href="highlight/styles/default.css">

defmodule Foo do
  def foo, do: :foo
  def bar, do: :bar
end

produces this buggy result:

because of the def f, do: # code syntax (as an alternative to the usual do/end block, which works just fine). I think @knewter took care of the Elixir highlighting, so if he has a quick fix that would be great! Otherwise, I'll try to start working on it as soon as I can. I never contributed to highlight.js though, so it could take me a while to get familiar with it :disappointed:.

Am I right that with this syntax funcation body ends with new line? (\n)?

@Sannis I don't think so. The do: is followed by an expression. Some examples of valid Elixir code:
def foo, do:
  3 + 5

or
def foo, do: 3 +
             4 +
             5

The first of the above examples is highlighted incorrectly, while the second one is highlighted without any errors.

@Sannis @whatyouhide The issue is that the elixir highlightjs extension treat do: as symbol instead a keyword.
@Sannis I have not really looked into the good of highlightjs and the elixir extension, but shouldn't that more or less easy to fix?
Thanks
Samuel

@Sannis @whatyouhide What is the status about that? we really would like to fix this because we love to use it in ex_doc :-)
Before I'm starting looking into it by myself, maybe you guys can have a quick look before me. :)
@knewter I know you have a lot to do, but if you got a few minutes, please have look. :heart: :-)

Any news on this? As @tonini said, we would really really love to fix this since it's screwing up a lot of examples in Elixir's documentation (as well as in the documentation of every library using ex_doc, i.e., every library :smile:).

Urk, what's the situation with the tests these days?  src/test.html isn't
a thing anymore, and test/index.html doesn't really trigger anything
(don't know that it should).  Is there documentation on how to add new
language support re: testing/verifying?  Because I was going to fix this
today and realize it's changed too much for me to get it done in 15 minutes
or so :(
On Fri, Jan 30, 2015 at 9:06 AM, Andrea Leopardi<EMAIL_ADDRESS>wrote:

Any news on this? As @tonini https://github.com/tonini said, we would
really really love to fix this since it's screwing up a lot of examples
in Elixir's documentation (as well as in the documentation of every library
using ex_doc, i.e., every library [image: :smile:]).
—
Reply to this email directly or view it on GitHub
https://github.com/isagalaev/highlight.js/issues/707#issuecomment-72214373
.

--
Josh Adams
CTO | isotope|eleven http://www.isotope11.com
[cell]<PHONE_NUMBER>
[work]<PHONE_NUMBER> x201

@knewter the docs on testing are here: http://highlightjs.readthedocs.org/en/latest/building-testing.html (in short, we now have tools/developer.html to play with markup).
I'm not sure when any one of us will be able to look into it (for me it's probably next Tuesday), so feel free to pick it up.

I'm looking at it now, we'll see if anything comes of it /cc @tonini @whatyouhide

so @tonini @whatyouhide @josevalim I have a few questions about this one.  In this case, isn't do an atom in an optionlist?  That's the core problem here - it's matching "thing: other" such that thing is an atom in the list.  That's matching do.  I can change the regex such that do isn't matched, in which case it would become a keyword...but then you would always get that behaviour if you used do: in an optionlist as well, which is wrong (but better?)  Basically, I need to do this work when @josevalim or someone is around to help explain to me my misunderstandings like this in the parser.  Sadly the highlight.js syntax checking is in no way presently easy to 'port' from the actual tokenizer in elixir, primarily due to my lack of experience here (only parsers I've really written that were complicated were PEGs)

@knewter I think the problem is not that do: isn't highlighted as a keyword (it's not, it's just an atom and that's fine). The problem is that all newlines after a do: get messed up.
Note that this is valid Elixir syntax:
%{a:
  3}

or
[do:
  something]

Aha I missed the point entirely :)

Am I getting this right that in the case of
def foo, do: :foo

The comma , actually signals the end of the function header and that do: is something else entirely than in the case of
def foo do
  # ...
end

?

@isagalaev what comes after , do:  should be treated the same way as what's in between do and end, with the exception that that , do: cannot accept new lines, and ; and ( ) are used instead.
I don't know if that answer your question.
def foo, do: (IO.puts "hello"; IO.puts " world")

produces internally the exact same code as:
def foo do
  IO.puts "hello"
  IO.puts " world"
end

Ooookay, I think I've fixed it, finally:

I even had to introduce a new functionality in the core for that :-) Which I hope is going to be needed for another bug elsewhere.

Awesome, thank you!

much appreciated @isagalaev !

Awesome @isagalaev, thanks so much! :heart:

This is great. I can stop feeling terrible now! :heart:


Option to launch the client as another process

Reasons
Some users may prefer to have the client as another process, instead of it being embedded into the Launcher process.
(if the game should work on Linux and Mac OS, then this option should be really done)

Closed, this is not a problem since the current client can fully integrate the game.


Commit Protobuf generated docs with serverless-ci user

It might be good to also manually commit doc update, as it'll not be triggered with this update

Good idea @medikoo , I'll add it.


Document and test options to createPatch

The documentation states that createPatch only supports context, when in actuality it passes the options on to the diffLines implementation.
This PR updates the documentation to clarify this and also adds tests to verify this behavior.
Since these methods are supposed to output a patch, it's arguable that the options doesn't make sense, but I'd argue that the ignoreWhitespace at least makes sense since outputting a patch is a pretty normalized way to display a diff and it makes sense to be able to use the existing options for it.
newLineIsToken is a bit weirder when creating "patches". I added docs and tests for that in separate commit so that it can be reverted if it's something that is not wanted.

LGTM, thank you for the contribution.

newLineIsToken is a bit weirder when creating "patches". I added docs and tests for that in separate commit so that it can be reverted if it's something that is not wanted.

Yeah, IMO allowing newLineIsToken to be passed to patch functions at all is a misfeature. When there are actual changes to newline structure, the "patches" we get - like the one shown in the newlineIsToken: true test case added here - aren't valid patches and can't be applied to the original file by jsdiff or any other tool. I find it difficult to imagine this ever being useful to anyone but easy to imagine people getting caught out by it when they generate a "patch" with this option and then discover it can't be applied.

However, let me also thank you for the tests - without them, I would never have realised this feature existed or that I was unwittingly breaking it in my third commit at https://github.com/kpdecker/jsdiff/pull/535! I think I want to the feature, but now I can at least be more deliberate about doing so and document it in the release notes...


STP - Connection pool causes agent to stop working

Started oafull on EGL2
After 2 hours of normal work, connection pool errors started to appear constantly. See below the error
The number of such errors is huge
567135 times in couple of days - it overloads the log
After 2 days, errors stopped, and it seems that nothing happens and log is empty - agent is started but does nothing. Pausing and starting the agent, cause the connection pool errors to reappear immediately
2018-06-24 10:25:14,272 -well-egl2-akka.actor.default-dispatcher-57] ERROR cmwell.tools.data.utils.akka.Retry$  - [oafulloa-hierarchy] received failure
akka.stream.BufferOverflowException: Exceeded configured max-open-requests value of [128]. This means that the request queue of this pool (HostConnectionPoolSetup(cm-well-ppe.int.thomsonreuters.com,80,Connec
tionPoolSetup(ConnectionPoolSettings(20,0,5,128,1,30 seconds,ClientConnectionSettings(Some(User-Agent: cmwell-data-tools using akka-http/2.5.11),10 seconds,1 minute,512,None,<function0>,List(),ParserSettings
(2048,16,64,64,8192,64,377487360,256,1048576,Strict,RFC6265,true,Full,Error,Map(If-Range -> 0, If-Modified-Since -> 0, If-Unmodified-Since -> 0, default -> 12, Content-MD5 -> 0, Date -> 0, If-Match -> 0, If-
None-Match -> 0, User-Agent -> 32),false,true,akka.stream.impl.ConstantFun$$$Lambda$781/1202382533@698e6236,akka.stream.impl.ConstantFun$$$Lambda$781/1202382533@698e6236,akka.stream.impl.ConstantFun$$$Lambda
$782/1033220492@57067221),None),Legacy,1 second,TCPTransport),akka.http.scaladsl.HttpConnectionContext$@1a7e826a,akka.event.MarkerLoggingAdapter@1ec2770e))) has completely filled up because the pool currentl
y does not process requests fast enough to handle the incoming request load. Please retry the request later. See http://doc.akka.io/docs/akka-http/current/scala/http/client-side/pool-overflow.html for more i
nformation.
        at akka.http.impl.engine.client.PoolInterfaceActor.<init>(PoolInterfaceActor.scala:88)
        at akka.http.impl.engine.client.PoolInterfaceActor$.$anonfun$props$1(PoolInterfaceActor.scala:34)
        at akka.actor.TypedCreatorFunctionConsumer.produce(IndirectActorProducer.scala:87)
        at akka.actor.Props.newActor(Props.scala:213)
        at akka.actor.ActorCell.newActor(ActorCell.scala:626)
        at akka.actor.ActorCell.create(ActorCell.scala:652)
        at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:525)
        at akka.actor.ActorCell.systemInvoke(ActorCell.scala:547)
        at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:282)
        at akka.dispatch.Mailbox.run(Mailbox.scala:223)
        at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
        at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

Reset to use newHostConnectionPool

Happened again on EGl2 - after 2 days of running of oa-full agent
2018-07-19 07:55:06,731 -well-egl2-akka.actor.default-dispatcher-52] WARN  cmwell.tools.data.utils.akka.Retry$  - [oafulloa-hierarchy] received 200 OK but response body is not valid. host=c727vbacsnd12.int.thomsonreuters.com data=/data.thomsonreuters.com/2-28df8098e9d480eaea0205d0c26224b7168e62407c6804c58109d08b9cdd4e0f
2018-07-19 07:55:08,435 -well-egl2-akka.actor.default-dispatcher-64] ERROR cmwell.tools.data.utils.akka.Retry$  - [oafulloa-identifiers] status is not success (500 Internal Server Error) HttpEntity.Strict(application/json,{"success":false,"error":"Exceeded configured max-open-requests value of [1024]. This means that the request queue of this pool (HostConnectionPoolSetup(localhost,9000,ConnectionPoolSetup(ConnectionPoolSettings(4,0,5,1024,1,30 seconds,ClientConnectionSettings(Some(User-Agent: akka-http/10.0.11),10 seconds,1 minute,512,None,<function0>,List(),ParserSettings(2048,16,64,64,8192,64,8388608,256,1048576,Strict,RFC6265,true,Full,Error,Map(If-Range -> 0, If-Modified-Since -> 0, If-Unmodified-Since -> 0, default -> 12, Content-MD5 -> 0, Date -> 0, If-Match -> 0, If-None-Match -> 0, User-Agent -> 32),false,true,akka.stream.impl.ConstantFun$$$Lambda$683/1215466851@14d6b113,akka.stream.impl.ConstantFun$$$Lambda$683/1215466851@14d6b113,akka.stream.impl.ConstantFun$$$Lambda$684/200596599@69b4a9a5),None),Legacy,1 second,TCPTransport),akka.http.scaladsl.HttpConnectionContext$@6161c4b1,akka.event.MarkerLoggingAdapter@25656b97))) has completely filled up because the pool currently does not process requests fast enough to handle the incoming request load. Please retry the request later. See http://doc.akka.io/docs/akka-http/current/scala/http/client-side/pool-overflow.html for more information."})
2018-07-19 07:55:08,435 -well-egl2-akka.actor.default-dispatcher-64] WARN  cmwell.tools.data.utils.akka.Retry$  - [oafulloa-identifiers] server error: will retry again in 30 seconds host=Some(X-CMWELL-Hostname: c525cqycsnd03.int.thomsonreuters.com) status=500 Internal Server Error entity=HttpEntity.Strict(application/json,{"success":false,"error":"Exceeded configured max-open-requests value of [1024]. This means that the request queue of this pool (HostConnectionPoolSetup(localhost,9000,ConnectionPoolSetup(ConnectionPoolSettings(4,0,5,1024,1,30 seconds,ClientConnectionSettings(Some(User-Agent: akka-http/10.0.11),10 seconds,1 minute,512,None,<function0>,List(),ParserSettings(2048,16,64,64,8192,64,8388608,256,1048576,Strict,RFC6265,true,Full,Error,Map(If-Range -> 0, If-Modified-Since -> 0, If-Unmodified-Since -> 0, default -> 12, Content-MD5 -> 0, Date -> 0, If-Match -> 0, If-None-Match -> 0, User-Agent -> 32),false,true,akka.stream.impl.ConstantFun$$$Lambda$683/1215466851@14d6b113,akka.stream.impl.ConstantFun$$$Lambda$683/1215466851@14d6b113,akka.stream.impl.ConstantFun$$$Lambda$684/200596599@69b4a9a5),None),Legacy,1 second,TCPTransport),akka.http.scaladsl.HttpConnectionContext$@6161c4b1,akka.event.MarkerLoggingAdapter@25656b97))) has completely filled up because the pool currently does not process requests fast enough to handle the incoming request load. Please retry the request later. See http://doc.akka.io/docs/akka-http/current/scala/http/client-side/pool-overflow.html for more information."})
2018-07-19 07:55:09,684 [scala-execution-context-global-410]         ERROR cmwell.tools.data.utils.akka.Retry$  - [oafulloa-identifiers] error in consuming data bytes from response, paths=/data.thomsonreuters.com/2-2303727a17ea66957e6ae87aac071dd26311e8dfaa5c88b6698e1c099508bb8c, err=akka.http.scaladsl.model.EntityStreamException: Entity stream truncation
akka.http.scaladsl.model.EntityStreamException: Entity stream truncation


Writing event without checking-bug

In all places when the code writes log event, it should check if event is not null and length >0.
old code
this.WrappedTarget.WriteAsyncLogEvent(logEvent);
new code.
if (logEvents != null && logEvents.Length > 0)
such as AsyncTargetWrapper.cs

Hey!
Could you  give an example what you mean?

Think Grant-Liu wants the AsyncWrapper to check the length of the dequeued LogEvents-array, before calling the WrappedTarget.

This is correct.
It should check the lendth.

From: Rolf Kristensen<EMAIL_ADDRESS>Sent: Monday, December 12, 2016 4:23 PM
To: NLog/NLog
Cc: Grant-Liu; Author
Subject: Re: [NLog/NLog] Writing event without checking-bug (#1833)
Think Grant-Liu wants the AsyncWrapper to check the length of the dequeued LogEvents-array, before calling the WrappedTarget.

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/NLog/NLog/issues/1833#issuecomment-266597004, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIHGRVLyrQZGmQq6rIzUkd7lc0gBrnXHks5rHeV4gaJpZM4LJKCe.

Will be fixed together with #1853

@304NotModified Merged and can be closed.

Thanks!


Bug: has_many with id_method_name returns only one object (instead of an array) and with the wrong ID

This is very similar to #237, I think they might be related, so I'm going to use the same example.
Picture simple relationship like this:
class ASerializer
  include FastJsonapi::ObjectSerializer

  has_many :bs, id_method_name: :custom_id
end

class BSerializer
  include FastJsonapi::ObjectSerializer

  set_id :custom_id
end

As you can see, we have explicitly told it to use :custom_id as the foreign key for the has_many association. But the problem is when we run ASerializer.new(instance_of_a, {include: [:bs]}).serializable_hash, the generated hash is like this:
{
  data: [
    { id: AID,
      type: :a,
      attributes: {},
      relationships: {
       bs: {
        data: {id: "AID", :type=>:B}
      }
  ],
  included: [
    { id: B1CUSTOMID, ... },
    { id: B2CUSTOMID, ... },
  ]
}

As you can see, there's clearly a bug, because on relationships.bs, its returning an object (instead of an expected array, because it's a has_many) with just one element (even tough the example object has 2 associated Bs!), and the ID returned inside that object is actually A's own ID, which does NOT match any of the included IDs (because there you will find, as expected, B's ids).
If I simply remove the id_method_name from that has_many association, leaving it like this:
class ASerializer
  include FastJsonapi::ObjectSerializer

  has_many :bs
end

And run the exact same command, the generated output is like this:
{
  data: [
    { id: AID,
      type: :a,
      attributes: {},
      relationships: {
       bs: {
        data: [
         {id: "B1ID", :type=>:B}
         {id: "B2ID", :type=>:B}
       ]
      }
  ],
  included: [
    { id: B1CUSTOMID, ... },
    { id: B2CUSTOMID, ... },
  ]
}

As you see, then the generated Hash contains an array in relationships.bs,  but it's also unusable because the IDs there won't match the IDs in the included key because there we use :custom_id.
Unfortunately I have zero experience in coding tests, so I can't help with writing one.

I just confirmed it also happens with belongs_to: as well.
If it helps debugging (just a hint), my id_method_name is :id_hash, which is coincidentially the same name as some methods used by the gem.

@shishirmk Did you manage to reproduce the bug?

@feliperaul I ran into the same issue and landed here. Luckily I found the solution to this "bug" by diving into the code of the FastJsonapi::Relationship.
The problem here is the option id_method_name. We used it wrong the whole time. The method, that is specified in id_method_name is NOT called on the included relationship - it is called on the serialized object.
TL;DR to get this working you have to do:
class A
  has_many :bs

  # Define a method in A which collects all custom ids of related B's.
  def custom_b_ids
    bs.map(&:custom_id)
    # Or when you are using Rails you could do:
    bs.pluck(:custom_id)
  end
end

class ASerializer
  include FastJsonapi::ObjectSerializer

  # Here we have to specify the created method on A
  has_many :bs, id_method_name: :custom_b_ids
end

class BSerializer
  include FastJsonapi::ObjectSerializer

  set_id :custom_id
end

I hope that helps.

I ran into the same type of issue for belongs_to.
This is what i have done:
class ASerializer
  include FastJsonapi::ObjectSerializer

  set_id :uuid
  belongs_to :b, id_method_name: :uuid
end

class BSerializer
  include FastJsonapi::ObjectSerializer

  set_id :uuid
end

I ran ASerializer.new(instance_of_a).serializable_hash and got following output:
{
  data: {
      id: uuid_for_instance_of_a,
      type: :a,
      attributes: {},
      relationships: {
          b: {
            data: {
                id: uuid_for_instance_of_a,
                type: :b
             }
          }
     }
}

Expected Output:
{
  data: {
      id: uuid_for_instance_of_a,
      type: :a,
      attributes: {},
      relationships: {
          b: {
            data: {
                id: uuid_of_b_to_which_a_belongs,
                type: :b
             }
          }
     }
}

Yes this is the same "issue" as with the has_many relationships.
The method id_method_name is not called on the B object - it is called on the A object.
So to fix this issue you would have to do this:
class A
  belongs_to :b

  # Define a custom method that gets b's custom id
  def b_uuid
    b.uuid
  end
end

class ASerializer
  belongs_to :b, id_method_name: :b_uuid
end

@henvo I understood your point. But:
First, I think there should not be a need of using id_method_name to set id for the b for the relationships. It should use id from b's serializer. (Just Like AMS)
Second, if id_method_name has to be used then it should be called upon relationship object. It does not make sense to set id of b's object by calling a method for a's object.
@shishirmk Please consider this. As current behavior does not make sense.

@rishabhsairawat I completely agree.

Just stumbled upon this issue myself and found a solution in a referenced link.
https://github.com/Netflix/fast_jsonapi/issues/338#issuecomment-451205662
For the case of ASerializer having many BSerializer, a working example should be:
class ASerializer
  ...
  has_many :bs, id:method_name: :uuid do |object|
    object.bs
  end
end

But this being said I agree with @rishabhsairawat. The current behavior is a surprise and its workaround is redundant.


CoDICE: Add catdescs and fieldnames to housekeeping CDF attributes

Currently the housekeeping data uses "TBD" for many of the catdesc and fieldname fields in the CDF attributes. These should be updated to actually store useful information. This could possibly be done programmatically by grabbing the short_description and long_description fields in the XTCE definition files. Perhaps something like:
for key, value in (packet.header | packet.data).items():
    fieldname = value.short_description
    catdesc = value.long_description

Just an FYI that I agree we could do something like you mentioned here, but Tim brought up a good point during the PR review about trying to settle around the YAML definitions rather than programatically adding attributes so I removed it.
https://github.com/IMAP-Science-Operations-Center/imap_processing/pull/687#discussion_r1672497506
I suppose we could add a keyword argument to the function to allow that since it sounds like others have also wanted a similar thing. But in general, I think for now if it is just housekeeping data we ignore this and add the istp=False check to cdflib for l1 housekeeping files since it isn't required.


MUI and Docusaurus build error

When building docusaurus project with MUI, some styles were not applied correctly

https://github.com/facebook/docusaurus/discussions/7498


Strange error message

Not sure what caused this, and I can't replicate. Does this mean we're able to submit a form with a problematic radius?

cc @richardwestenra

Looks like "0" is considered invalid input for driver radius

valid range : 0 < radius < 100
Let me know if I need to change that
Last time we discussed this, we said a radius of 0 makes no sense

Radius of 0 implies only within the zip code, so would be good to change at some point but this is not a priority right now.


FOSSA Scan - Do Not Merge

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

Project coverage is 91.36%. Comparing base (bd7aa11) to head (fb4cf05).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #166   +/-   ##
=======================================
  Coverage   91.36%   91.36%
=======================================
  Files          11       11
  Lines         417      417
  Branches       79       79
=======================================
  Hits          381      381
  Misses         31       31
  Partials        5        5

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


Update sbt-scoverage to 1.6.0

Updates org.scoverage:sbt-scoverage from 1.5.1 to 1.6.0.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention @scala-steward in the comments below.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [{ groupId = "org.scoverage", artifactId = "sbt-scoverage" }]

labels: semver-minor

Codecov Report

Merging #114 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #114   +/-   ##
=======================================
  Coverage   95.45%   95.45%
=======================================
  Files           5        5
  Lines          22       22
  Branches        1        0    -1
=======================================
  Hits           21       21
  Misses          1        1

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 297e623...74bcac1. Read the comment docs.


[app] Add SideNav Component

Description
This PR adds a sidenav component.
Screenshots

To be merged after #8

Codecov Report

Merging #9 (e2b81a6) into main (7f8eefc) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main        #9   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            2         8    +6
  Lines           10        37   +27
  Branches         1         1
=========================================
+ Hits            10        37   +27

Impacted Files
Coverage Δ

diagnostics-app/src/app/app.component.ts
100.00% <100.00%> (ø)

diagnostics-app/src/app/core/enums/global.enums.ts
100.00% <100.00%> (ø)

...nostics-app/src/app/core/services/theme.service.ts
100.00% <100.00%> (ø)

.../layout/content-layout/content-layout.component.ts
100.00% <100.00%> (ø)

...tics-app/src/app/layout/header/header.component.ts
100.00% <100.00%> (ø)

diagnostics-app/src/app/shared/material.module.ts
100.00% <100.00%> (ø)

diagnostics-app/src/app/shared/shared.module.ts
100.00% <100.00%> (ø)

... and 3 more

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 7f8eefc...e2b81a6. Read the comment docs.


Add seccomp audit metrics

What type of PR is this?
/kind feature
What this PR does / why we need it:
This adds the seccomp/selinux audit metrics to the GRPC interface. Those
will be used by the log enricher to provide metrics around its logging
enhancement.
Which issue(s) this PR fixes:

None
Does this PR have test?
None

Special notes for your reviewer:
None
Does this PR introduce a user-facing change?

Added log enricher metrics `security_profiles_operator_seccomp_profile_audit_total` and `security_profiles_operator_selinux_profile_audit_total`.

Codecov Report

Merging #492 (1a2a772) into master (c31cc60) will increase coverage by 0.72%.
The diff coverage is 51.51%.

@@            Coverage Diff             @@
##           master     #492      +/-   ##
==========================================
+ Coverage   37.52%   38.25%   +0.72%
==========================================
  Files          23       23
  Lines        1138     1200      +62
==========================================
+ Hits          427      459      +32
- Misses        696      726      +30
  Partials       15       15

one nit inline, otherwise lgtm, tested by running the recently added enricher tests (well, all e2e tests, but the enricher code was touched here, so...)

Yes, as a follow-up PR I'll integrate a test of the metrics into the existing e2e test.


Type-asserting to optionable types should be permitted.

Basically, revert #1.
It is way too much hassle always having prove the result a type-assertion non-nil before you can use it, and it's by far the most un-Go-ish thing in SGo code.
If we allow type-asserting to an optionable type T, we can do two things:

Compile x.(T) into essentially x.(T); if x == nil || x.y.z == nil || ... { panic(...) /* or ok = false */ }
Compile x.(T) into x.(T).

1 would most closely match Go's type-assertion (and, for instance, Swift's ! and Rust's unwrap) behavior when x doesn't have type T, but we would lose SGo's property that you can just remove the ?s and \s and get working, idiomatic Go code.
2 would be the simplest solution, just giving up on SGo's type safety guarantees altogether and fall back to Go's, as we have to do with reflection.
I think 2 is preferable.

I will implement 1. After a while using SGo, I'm now convinced that the language is pretty much useless if we fall back to Go's guarantees so often (and type-asserts happen often enough).
An important caveat is that whether you stored a ?T or a T in an interface is lost at runtime, so you can type-assert T to ?T and ?T to T, the difference being that T adds the necessary runtime nil checks. But we keep soundness this way.
It follows too that you can't type-switch to ?T and T at the same time, as there's no runtime way to differentiate between them.

This is done, but it's not really thoroughly tested and it's kind of tricky so it could be broken.


Add protip about global flag when scanning for multiple matches

Description of the Change
I spent a while scratching my head wondering why scanInBufferRange was stopping after the first match. I don't think the global flag requirement is obvious from the existing documentation.
Release Notes
N/A

Thanks for the contribution @oggy!  We reviewed your suggestion and while we agree it could be helpful, we also think that it’s more a general reminder about regular expressions rather than something specific to these functions so we’ve decided to leave it as is.
But thank you again for your interest and contribution :bow:


Updating CONTRIBUTING doc with a contents tree at top.

Updated the syntax used for headings according to:
http://documentation-style-guide-sphinx.readthedocs.io/en/latest/style-guide.html#headings

See it live: https://github.com/dhermes/google-cloud-python/blob/local-contents-in-contrib/CONTRIBUTING.rst

Pretty cool!
Are the
*****************
Wrapped Headers
*****************

required to make that work?

@daspecster No, it's the .. contents directive

Yeah I realize that but I didn't know if that directive required any special formatting to be supported.

No

There's no assignees for this but it LGTM.

My bad on the assigned


Fix jitter buffer in speech addon

[ ] Provide graphs to check resource exhaustion
[ ] Debug why the audio fails

Spent a few hours getting the test to pass. It was breaking because "Warning" or "error" was in the message.

Remove AEC code for now to reduce complexity.

Idea: use the voip client as a webrtc demo.

Remove speech for now?


Using Python3 by default

Bug Fix: Python2 is no longer distributed by default and not even linked on some distros (like Ubuntu 20.04).

yes, even on the other one with the installation script this is an issue.

@OGKryptoCoder What other one?

The clone with the installation script

@derEisele Ping!


Wait for image to load

Hi,
I'm trying to show an of an image loaded online.
the thing is it takes a little bit to show the image, so i think that the animation takes place on a transparent image that hasn't been loaded yet, and only then it shows up.
I tried to use it like this:
           <Display enable={this.state.popImage}>               <Image                    onLoad={() => this.setState({ uri: this.state.uri, popImage: true })}                    style={{ width: 200, height: 200 }}                    source={{ uri: this.state.uri }}               />         </Display>
but then nothing happens at all
i think it's some kind of a recursive problem
when i set the image at the first time the popImage is false, and then when i load the image it calls setState() that reset the uri and bool, but then the image is reloaded again :-)
do you have a suggestion of how to initiate the animation only after the image is fully loaded?
Thanks

Try to pass keepAlive={true} for example:
'''
 keepAlive={true} <Image onLoad={() => this.setState({ uri: this.state.uri, popImage: true })} style={{ width: 200, height: 200 }} source={{ uri: this.state.uri }} />
'''
Let me know if that helps.

It now shows the image, but without animation.
i tried to show it slowly by setting enterDuration={10000}, but then i discovered that the animation doesn't work either.
i got it working after i set enter: "fadeInRight"
it seems that without the enter arg it doesn't show animation.
that leads me to point that i think the readme lacks the list of all possible animations.
How can i use the cool animation showed at the top gif of the readme?
Thanks

You right you must pass enter prop for animations to work,
For full animations list you can refer to:
https://github.com/oblador/react-native-animatable
At the bottom part you will see all the strings that you can use for enter / exit props

So.. can we close this issue?

yep, it looks ok


Maintainers and going forward

Hello all
This project has been stale for a while (due to us not putting much work in it since we didn't use it for the last couple of years) — we deeply apologize for that. But it still has a lot of traction and would really benefit from the work of all the people that helped build it and all the fantastic forks that exist today.
We are actively considering creating an independent organisation to hold this repo (and possibly all the plugins / related code), so that everyone can get involved, correct, enhance, triage issues, test, etc ... From there, we can pick a few members to publish packages for instance, to smooth the process and speed things up.
Let us know what you think in the comments of this issue below, or via mail at<EMAIL_ADDRESS>we're happy to discuss so the project can really be useful and progress as it should.
Thanks
Best !
Cyril @ Joshfire

Here we are now : https://github.com/jsonform/jsonform

:tumbleweed:

Is there an npm module? I want to use this with all the dependencies loaded. If necessary, I will contribute to make it.

Hi @goldingdamien
It is published on npm : https://www.npmjs.com/package/jsonform
But the dependencies are a bit of a mess at the moment... they are directly in the deps/ folder. If you want to improve that, it would be great !
Best

@tchapi Hi, I can make a function to load dependencies such as below. I am not familiar with the source of the project, Please let me know how it should be added. Also please let me know what environments it should support as I usually use es2015 code and I do not see any build process in this project.
//Each dependency listed here: https://github.com/jsonform/jsonform/blob/master/README.md#dependencies
const settings = {
  ace: /opt/ace/ace/js,
  ...
}

function load(keys=[]){
  const toLoad = []
  keys.forEach((key)=>{toLoad.push(settings[key])})
  return loadUrls(toLoad)
}

There is no build process yet, so everything has to be created.
The only required dependencies are jQuery and Underscore. The other libraries depend on the features wanted, so they should not be explicitly required.
I myself do not know exactly how to tackle this, so any suggestions are welcome TBH.

I am not familiar with how jquery extensions are applied to npm packages, but general npm packages would result in something like "const jsonForm = require('json-form')" and then I guess a selector function to get the form element and then an execute function. I will try and create a demonstration soon as I am quite in need of such functionality for a couple of projects I am working on.

I created a demo Github repository.
Something like this would need to wrap the JSON Form library to prevent dependencies not loaded errors.
The demo doesn't take into consideration more detailed circumstances such as JQuery already being loaded in the page.
Please take a look:
https://github.com/goldingdamien/jsonform-loader

Thanks @goldingdamien and sorry for the late response as I am quite busy atm on various projects. I will try to take some time in the near future to review what you propose. Do you think it would be worth it to create this loader repo directly in the jsonform organization, of which you can become a contributor, so that it's more consistent ?

@tchapi Yes that is fine. Please let me know of your opinion when you have the time.


Allow searching a string in installed packages information

Problems

changing a setting/shortcut requires to find the installed package it's supposed to belong to (can be tricky at times, it's a bit time consuming), scroll down and find the term by eye;
sometimes people assume you know where to find a certain setting and if not the case you have to search it on the web, which is time consuming;

Proposal
Allow searching terms in all of the installed packages by looking up:

package settings' name and description (and maybe setting's allowed values?)
package keybindings' command, selector and source
eventually, package name and description
eventually, package READMEs

(on Atom 1.13.0 now)

Please reopen this on the atom/settings-view repo.

Done, sorry for the noise, thanks!


Faster recurrent policy evaluate actions

The currently recurrent policy implementation uses a GRUCell and thus a for-loop to evaluate each step in the rollout.  This PR changes the recurrent policy to use a GRU (which unfortunately breaks existing pre-trained models) and evaluates the sequence with as few forward calls as possible.
In order to reset the hidden state, the masks tensor is checked to see if any element has a zero for each step in the rollout (a zero in masks corresponds to at a done in the rollout).  If steps t_1 and t_2 have at least one done, then steps t such that t_1 <= t < t_2 are run with one call to forward.
This results in a massive speed up whenever the number of steps with at least one done is significantly less than the rollout length.  In PongNoFrameskip-v4 with PPO I see ~1000 FPS while training with this change while I see ~380 FPS with the current implementation.
This does end up being slower if the number of steps with at least one done is very close to the rollout length.  If I artificially set every step to have at least one done, I see ~305 FPS.  If I artificially set every other step to have at least one done, I see ~450 FPS, so the break even is fairly quick.
For PongNoFrameskip-v4 with A2C, I see ~1860 FPS with this change, and ~1800 FPS with the current implementation.   Due to the longer rollout in PPO, this change is more beneficial for that algorithm, but it doesn't hurt A2C either.
To check if I didn't break anything by doing this, I trained a recurrent policy with PPO in PongNoFrameskip-v4, and the reward curve looks as expected.

Unfortunately I don't have anywhere with MuJoCo installed, so I am not sure how simple that will be for me to run.

Oh. No worries then, I will run it this weekend.


PartnerRegistration - POST Partner Data runs on 403 error

Detected in version: v.1.8.0 RC3
Summary
The job POSTPartnerRegistration runs on a 403 error with the user sa171 (secrets available on INT centralIdP)
Possible issue: endpoint validation
Test Execution: on INT via swagger

@jjeroch  you mean the endpoint: POST: api/administration/registration/network/partnerRegistration right?

The seeded data of keycloak have been fixed for all environments.

sucessfully tested on rc.


implement config for width, focus behavior and filtering

closes #8
I have added the features discussed in the ticket, was easier than I thought.
I would appreciate a merge and new release, I think we should not clutter the
ecosystem with a bunch of variants/forks.
This is all backwards compatible.
I kept the behavior at what it does currently unless the new functions get used.

requested changes done.

Thanks!


Template merge 1.11

Signed-off-by: Zethson<EMAIL_ADDRESS>Did not want to work on the TEMPLATE branch -> here's the merge for 1.11

x Test failures:

    Test #5 - CI is not building the correct docker image. Should be: docker build --no-cache . -t nfcore/proteomicslfq:1.0.0
    Test #5 - CI is not tagging docker image correctly. Should be: docker tag nfcore/proteomicslfq:dev nfcore/proteomicslfq:1.0.0

exclamation Test warnings:

    Test #4 - Config manifest.version should end in dev: '1.0.0'

@jpfeuffer should we ignore them, since we want to continue with dev?

x Test failures:

    Test #5 - CI is not building the correct docker image. Should be: docker build --no-cache . -t nfcore/proteomicslfq:1.0.0
    Test #5 - CI is not tagging docker image correctly. Should be: docker tag nfcore/proteomicslfq:dev nfcore/proteomicslfq:1.0.0

exclamation Test warnings:

    Test #4 - Config manifest.version should end in dev: '1.0.0'

@jpfeuffer should we ignore them, since we want to continue with dev?

What are the options?
call it dev? call it 1.1.0pre or something? why would we stick with 1.0.0?

Regarding new release cycle: https://github.com/nf-core/proteomicslfq/pull/99
Which I forgot to merge.

@jpfeuffer I readded the single threaded and very low configs.
If you want I can change the other profiles to the former values. Whatever you prefer.
I think I got confused between nf-core's standards and what I personally follow at mlf-core. I personally bump to *-SNAPSHOT versions, whose nf-core equivalent is *dev. Hence, the new version is now 1.1.0dev. After we have merged this you can merge the documentation PR that you mentioned.
Cheers

I see. Yeah 1.1.0dev sounds good. I guess the Docker containers are still tagged :dev?
I am in favor of using our old default memory/CPU settings.
On the one hand I don't want to always adapt them at template updates, on the other I like ours better.
The nfcore defaults e.g. feel a bit disproportional with CPU vs Mem

      - name: Push Docker image to DockerHub (dev)
        if: ${{ github.event_name == 'push' }}
        run: |
          echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
          docker tag nfcore/proteomicslfq:latest nfcore/proteomicslfq:dev
          docker push nfcore/proteomicslfq:dev

Yes, they are still tagged dev. I used the nf-core bump-version command, so everything is as it should be.

@jpfeuffer reverted configs to the previous ones.
Ready to merge from my side.


Ensure content is downloadable.

"Latest mapping file downloaded is empty, however AGP mapping files in the past were downloaded with no trouble."
Review download buttons from existing plates, etc. and ensure content is downloadable. Where content is not downloadable, or is an invalid file, investigate as to the cause.

We may have more info about what happened here, as a side-effect of today's meeting re miniPCR; below are my notes of what I heard from MacKenzie:
Ran through a single plate (HNRC) that was part of a bigger sequencing run, but only uploaded HNRC to LabControl, but didn't run Prepare Amplicon Sequencing Pool.  Note: were still offered options to download sample sheet and prep sheet, but they were corrupt.
So: They were trying to download sample sheets and prep sheets for a library plate pool, not for an amplicon sequencing pool.  Betcha a dollar this is the ultimate cause of why the stuff that was downloaded was corrupt/empty.

Hoo doggies--I tracked this one down.  The issue is reproducible: go to "Sequencing runs" > "Prepare sequencing run" and select any amplicon library plate pool (not an amplicon sequencing pool).  Create the sequencing run (which works just fine) and then go to "Sequencing runs" > "List" and click on the "Download Preparation Sheets" button next to the new sequencing run you just created.
I believe I can fix this by extracting the logic to determine whether a pool is a library plate pool or an amplicon sequencing pool from
https://github.com/jdereus/labman/blob/645c798e0094e9962973c2d111c4860b1e8e5b23/labcontrol/db/util.py#L29-L35
and extending generate_prep_information to decide whether to expect one layer of pool_compositions or two (and thus deciding on the appropriate sql accordingly) by checking to see whether all the pools in the SequencingProcess are library plate pools (one layer of pool_compositions) or amplicon sequencing pools (two layers of pool_compositions).  I will have the code throw an error if there are heterogeneous types of pools in the SequencingProcess, because (a) I cannot think of any way that could actually happen, and (b) if it did I wouldn't know how to handle it :-/


Closes #757: Fix wrong latestNonce

Closes #757

Revert #754
Add v2 estimation endpoint that replaces latestNonce with recommendedNonce

Example:
Endpoint: POST - /v2/chains/<chain_id>/safes/<safe_address>/multisig-transactions/estimations
Example request body:
{
  "to": "0xD9BA894E0097f8cC2BBc9D24D308b98e36dc6D02",
  "value": "0",
  "data": "0x095ea7b3000000000000000000000000ae9844f89d98c150f5e61bfc676d68b4921559900000000000000000000000000000000000000000000000000001c6bf52634000",
  "operation": 0
}

Assuming the current nonce of the Safe is 7 and the transaction with the highest nonce stored on the service is 76 the following response will be returned:
 {
   "currentNonce": 7,
   "recommendedNonce": 77,
   "safeTxGas": "63417"
 }

recommendedNonce can be directly used for proposing a new Safe transaction without further adjustments.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

385 of 391 (98.47%)  changed or added relevant lines in 5 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.3%) to 88.328%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/routes/safes/handlers/estimations.rs
36
37
97.3%

src/routes/safes/routes.rs
16
17
94.12%

src/routes/safes/tests/routes.rs
327
331
98.79%

Files with Coverage Reduction
New Missed Lines
%

src/routes/safes/routes.rs
1
22.21%

Totals

Change from base Build<PHONE_NUMBER>:
0.3%

Covered Lines:
11124

Relevant Lines:
12594

💛  - Coveralls


Integration Tests failed with spring cloud config server

Tests failed randomly with:
Could not locate PropertySource and the fail fast property is set, failing
...
Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for http://host:port/application/test

if fail fast set to false, then tests failed with:
Unexpected exception during bean creation; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'some_property' in value "${some_property}"
But sometimes all tests pass without errors.
Versions:
<spring.boot.version>2.0.9.RELEASE</spring.boot.version>
<spring.cloud.version>Finchley.SR3</spring.cloud.version>

Config server running in docker 18.09.1-ol
ADDITION:
After ran config server on other docker host problem's gone away.
I wrote simple script:
#!/bin/bash
for (( i=0; i<1000; i++))
do
    curl -s http://myhost:myport/application/test
    echo ""
    echo "#####################################################"
done

all calls successful on both servers.

Are these your own tests?  Can we see a sample that reproduces the problem?  Does it only happen when running in a Docker container?

The problem on production config server when I run tests from localhost without docker or from ci environment with docker. I can't reproduce it when I run config server on localhost. How to understand what is the problem?

Can you provide a complete, minimal, verifiable sample that reproduces the problem?  It should be available as a GitHub (or similar) project or attached to this issue as a zip file.

Yes, but I need some time.

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Ping @burtsevyg

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.


fix: make blake2b optional

What was wrong?
fixes: #1959
may fix: #1941
How was it fixed?
Used the native implementation of blake2b compression function if blake2b-py is not installed.
Made blake2b-py an optional dependency via eth-extra.
To-Do

[x] Clean up commit history

[ ] Add entry to the release notes

Cute Animal Picture

Generally looks good but CI errors need to be addressed.

As far as I can tell, none of the linting errors has to do with files I edited.

Also just pinging @carver since that might affect Py-EVM and he's closer to that project than I am.

Yes, this definitely might affect downstream users of py-evm, like eth-tester and trinity. trinity has been deprecated, but I think for eth-tester it should be an optional dependency

Sorry for the late response.

As far as I can tell, none of the linting errors have to do with files I edited.

Yes, but they still need to be addressed since we can not merge a PR that didn't pass all CI checks.
I'm not working on this project anymore (and I just actually noticed this is a Py-EVM PR not a blake2b PR :see_no_evil: ) but I know that @carver is currently working on EIP-1559 support for Py-EVM so if you don't feel like investing time into fixing these linting issues you may just wait for them to be fixed in master and then rebase at a later point :)

I just actually noticed this is a Py-EVM PR not a blake2b PR

Yes, this seemed like the best solution to this issue as adding Windows support to the Rust-based blake2-py would be much more difficult, and the blake2 precompile is not used nearly enough in production to justify that work.

@carver is currently working on EIP-1559 support for Py-EVM so if you don't feel like investing time into fixing these linting issues you may just wait for them to be fixed in master and then rebase

I would prefer this sooner than later, I will take a look at the linting issues. This is a blocker for me.

Thanks @fubuloubu

Great! Thanks!
Any idea, when this get released (uploaded to PyPI)?

The next release will probably happen after London tests pass. You can watch #2021

Note: this will not fix #1941 because the issue there is the pyethash dependency


MSVC 2019 in C++17 mode: Test 142 flaky

The following tests FAILED:
142 - scheduling operator tests-schedule_on task<> pipe syntax (Failed)

https://github.com/andreasbuhr/cppcoro/runs/1518604986?check_suite_focus=true


[Bug] Searching using CCMixter shows incorrect data

Description

When searching through the portal using the ccMixter search option, I got redirected to the ccMixter website, but instead of displaying search results, a "nah" page is shown. This suggests a potential bug in the ccMixter integration within the search portal.
Reproduction

 Select ccMixter as the search provider

 Enter any word in the search input e.g Help

 Click on the Search button

See error.

Expectation

When a user selects ccMixter as their search provider and enters a search term, they should be redirected to ccMixter with relevant search results for that term displayed. The system should properly handle search queries and return appropriate results.
Screenshots

Environment

Device: (eg. iPhone Xs; laptop) Laptop
OS: (eg. iOS 13.5; Fedora 32) Windows 11
Browser: (eg. Safari; Firefox) Chrome
Version: (eg. 13; 73)
Other info: (eg. display resolution, ease-of-access settings)

Additional context

The integration with other search sites works as expected, and the issue seems isolated to ccMixter.

Resolution

[ ] I would be interested in resolving this bug.

This pr fixes this issue https://github.com/creativecommons/search/issues/259


make test-containers-test fails on centos-8.5

make test-containers-test fails  with unable to parse addrs in 'test_ceph_a'. this is happening in centos-8.5
[rgowdege@dhcp53-192 go-ceph]$ cat /etc/centos-release
CentOS Linux release 8.5.2111

I am adding the output of the logs
[rgowdege@dhcp53-192 go-ceph]$ make test-containers-test
docker run --security-opt label=disable --rm \
	--net test_ceph_net \
	-v test_ceph_a_data:/ceph_a \
	-v test_ceph_b_data:/ceph_b \
	-v /home/rgowdege/projects/go-ceph:/go/src/github.com/ceph/go-ceph:z \
	  \
	go-ceph-ci:octopus \
	--wait-for=/ceph_a/.ready:/ceph_b/.ready \
	--mirror-state=/ceph_b/.mstate \
	--ceph-conf=/ceph_a/ceph.conf \
	--mirror=/ceph_b/ceph.conf
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
WARN[0000] error mounting subscriptions, skipping entry in /usr/share/containers/mounts.conf: getting host subscription data: failed to read subscriptions from "/usr/share/rhel/secrets": open /usr/share/rhel/secrets/rhsm/rhsm.conf: permission denied
go: downloading github.com/aws/aws-sdk-go v1.35.24
go: downloading golang.org/x/sys v0.0.0-20200501145240-bc7a7d42d5c3
go: downloading github.com/jmespath/go-jmespath v0.4.0
go: downloading github.com/stretchr/testify v1.4.0
go: downloading github.com/gofrs/uuid v3.2.0+incompatible
go: downloading github.com/davecgh/go-spew v1.1.0
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v2 v2.2.8
go: downloading github.com/gofrs/uuid v1.2.0
github.com/ceph/go-ceph
github.com/ceph/go-ceph/rgw
github.com/aws/aws-sdk-go/aws/client/metadata
github.com/ceph/go-ceph/internal/retry
golang.org/x/sys/internal/unsafeheader
github.com/ceph/go-ceph/common/commands
github.com/aws/aws-sdk-go/internal/sdkmath
github.com/aws/aws-sdk-go/internal/sync/singleflight
github.com/ceph/go-ceph/internal/callbacks
github.com/aws/aws-sdk-go/internal/sdkio
github.com/aws/aws-sdk-go/internal/strings
github.com/ceph/go-ceph/internal/cutil
golang.org/x/sys/unix
github.com/aws/aws-sdk-go/internal/shareddefaults
github.com/ceph/go-ceph/internal/errutil
github.com/aws/aws-sdk-go/aws/awserr
github.com/jmespath/go-jmespath
github.com/ceph/go-ceph/contrib/implements/internal/implements
github.com/aws/aws-sdk-go/internal/ini
github.com/aws/aws-sdk-go/aws/endpoints
github.com/ceph/go-ceph/contrib/implements
github.com/aws/aws-sdk-go/aws/awsutil
github.com/aws/aws-sdk-go/aws/credentials
github.com/ceph/go-ceph/internal/timespec
github.com/ceph/go-ceph/rados
github.com/aws/aws-sdk-go/aws
github.com/aws/aws-sdk-go/aws/request
github.com/aws/aws-sdk-go/private/protocol
github.com/aws/aws-sdk-go/private/protocol/rest
github.com/aws/aws-sdk-go/aws/signer/v4
github.com/ceph/go-ceph/rgw/admin
github.com/ceph/go-ceph/internal/commands
github.com/ceph/go-ceph/contrib
github.com/ceph/go-ceph/cephfs
github.com/ceph/go-ceph/rbd
github.com/ceph/go-ceph/rbd/admin
github.com/ceph/go-ceph/cephfs/admin
rm -f ./implements
go build -o implements ./contrib/implements
*** waiting for /ceph_a/.ready ...done
*** waiting for /ceph_b/.ready ...done
Setting up mirroring...
server name not found: test_ceph_a (Name or service not known)
unable to parse addrs in 'test_ceph_a'
2021-12-08T13:16:55.563+0000 7fd355384700 -1 monclient: get_monmap_and_config cannot identify monitors to contact
[errno 22] RADOS invalid argument (error connecting to the cluster)
make: *** [Makefile:151: test-containers-test] Error 1

podman verson:
[rgowdege@dhcp53-192 go-ceph]$ podman version
Version:      3.3.1
API Version:  3.3.1
Go Version:   go1.16.7
Built:        Wed Nov 10 02:53:56 2021
OS/Arch:      linux/amd64

Interesting. The tests rely on the ability to resolve the name of the container to an address. This works for docker and recent versions of podman, but maybe the podman on centos 8 doesn't have this feature?
We may want to document a minimum version of podman to use -- or perhaps figure out a way to do this on older podman versions too?
Regardless, thanks for finding this!

@rakeshgm
Can you please check whether DNS is enabled for newtork test_ceph_net as follows?
$ podman network inspect test_ceph_net | grep dns_enabled

If not this might suggest that CNI plugin dnsname is absent which is required for podman to setup the use of dnsmasq on a CNI network to resolve each other by name. Try installing podman-plugins on CentOS to get dnsname CNI plugin. Afterwards you can verify by creating a test network as follows:
$ podman network create test_net
$ podman network inspect test_net | grep dns_enabled

If enabled now, try cleaning up and re-run the target:
$ make test-containers-clean
$ make test-containers-test

I could reproduce the issue and can confirm that the absence of CNI plugin is the root cause for failure seen in name resolution. Therefore closing the issue. Feel free to open new one in case of further issues.


vine.co errors

for example (youtube-dl version 2015.03.18 on Windows7 64bit):
C:\Prog>youtube-dl.exe https://vine.co/v/MInzDm7MVzg
[Vine] MInzDm7MVzg: Downloading webpage
Traceback (most recent call last):
File "main.py", line 19, in
File "youtube_dl_init_.pyo", line 408, in main
File "youtube_dl_init_.pyo", line 398, in _real_main
File "youtube_dl\YoutubeDL.pyo", line 1452, in download
File "youtube_dl\YoutubeDL.pyo", line 665, in extract_info
File "youtube_dl\YoutubeDL.pyo", line 711, in process_ie_result
File "youtube_dl\YoutubeDL.pyo", line 1067, in process_video_result
File "youtube_dl\YoutubeDL.pyo", line 968, in _calc_headers
File "youtube_dl\YoutubeDL.pyo", line 975, in _calc_cookies
File "urllib2.pyo", line 202, in init
File "urllib.pyo", line 1060, in unwrap
AttributeError: 'NoneType' object has no attribute 'strip'

Fixed in ccf3960. This issue should be fixed in the next release of youtube-dl. Thanks for the report.


Paket integration

Needed to update CI to use paket during build:
.paket\paket.bootstrapper.exe
.paket\paket.exe restore

This resolves #7


by.exactRepeater with one-time data binding

Can we make by.exactRepeater() match repeaters with one time data-binding:
ng-repeat="gridColumn in ::panelGrid.columnDefs"

In this case would be good to have element.all(by.repeater("gridColumn in panelGrid.columnDefs")) locate the repeater.
Also, by.exactBinding() may have a similar issue (haven't checked).
Thanks.

I don't think we should get into the business of syntax parsing for Angular, as it'll be a maintainability nightmare. Is there a reason why this is useful? (i.e. instead of element.all(by.repeater("gridColumn in ::panelGrid.columnDefs"))

Agree with @hankduan here - closing for now.


some tags were not closed

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@rpetrusha no problems


fix(helm): fix postgresql svc name

What
Fix PostgreSQL service name in the Helm chart
Background
When postgresql.architecture is replication, 2 services with suffixes are created

${release-name}-postgresql-primary
${release-name}-postgresql-read

*Those suffixes are also customizable via primary.name and readReplicas.name, but the default values are -primay and -read.
However, the current chart always tries to use ${release-name}-postgresql regardless of postgresql.architecture

@ryok-0319 can you please take a look at the tests, some of them failed

GHA has been flaky - I re-ran them and they passed...


cmdeploy issues in a NAT'd environment

I stumbled upon this while trying to deploy to a fresh Debian Bookworm VM behind NAT last night and had to work around it. This scenario breaks some assumptions that are built into chatmail:
If you try to deploy in a NAT'd environment where the hostname of the server is a private/internal hostname and not the same as the A/AAAA record and you'll find cmdeploy uses the chatmail.ini value for mail_domain, so you have to override that in a ~/.ssh/config so it will connect to the right place.
After you've overcome that hurdle, the next issue is that acmetool appears to have some built-in sanity checks to make sure it's reachable before attempting to issue the certificate, so it tries to reach http://mail_domain:80. This will fail because of hairpin routing (request hits your firewall/router and has to come right back out the same interface) which is generally denied for security reasons. You can fix this by adding an entry to your /etc/hosts file to declare your mail_domain is reachable at <IP_ADDRESS>
At this point I can confirm that 80, 443, and all the IMAP/SMTP ports are open to the public internet.  However, acmetool keeps failing to issue a certificate and I don't know why. I didn't capture those logs (sorry, it was very late and I just wanted this to work), but it was the typical failed-HTTP-validation scenario. I was looking in /run/acme/acme-challenge and nothing ever showed up in there, so I'm not surprised the validation was failing. Very strange all around.
I worked around this by disabling acmetool during deployment and using my own automation with Chef to deploy my certificate to the same location acmetool was going to use.
The chatmail cmdeploy could use some work to allow providing your own certificates and to not make some of these assumptions, or at least permit overriding what you're connecting to for deployment.

There is #439 which introduced an ssh-option. this simplifies the first problem, right?

could you maybe close this issue here and make a new one if needed, and also provide more information so we can work on a fix, addressing it?


Constant error in events.js

Have installed the latest version, set up my gulpfile.js, but when I run the task I get this error:
events.js:85
      throw er; // Unhandled 'error' event
            ^
TypeError: undefined is not a function
    at LazyResult.run (/Users/petergasston/Sites/prototypes/mucking-about/cssnext/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/postcss/lib/lazy-result.js:193:24)
    at LazyResult.sync (/Users/petergasston/Sites/prototypes/mucking-about/cssnext/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/postcss/lib/lazy-result.js:179:32)
    at LazyResult.stringify (/Users/petergasston/Sites/prototypes/mucking-about/cssnext/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/postcss/lib/lazy-result.js:210:14)
    at LazyResult._createClass.get (/Users/petergasston/Sites/prototypes/mucking-about/cssnext/node_modules/gulp-cssnext/node_modules/cssnext/node_modules/postcss/lib/lazy-result.js:232:25)
    at cssnext (/Users/petergasston/Sites/prototypes/mucking-about/cssnext/node_modules/gulp-cssnext/node_modules/cssnext/index.js:220:20)
    at DestroyableTransform._transform (/Users/petergasston/Sites/prototypes/mucking-about/cssnext/node_modules/gulp-cssnext/index.js:24:23)
    at DestroyableTransform.Transform._read (/Users/petergasston/Sites/prototypes/mucking-about/cssnext/node_modules/gulp-cssnext/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at DestroyableTransform.Transform._write (/Users/petergasston/Sites/prototypes/mucking-about/cssnext/node_modules/gulp-cssnext/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/Users/petergasston/Sites/prototypes/mucking-about/cssnext/node_modules/gulp-cssnext/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/Users/petergasston/Sites/prototypes/mucking-about/cssnext/node_modules/gulp-cssnext/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)

Have checked my paths and run a ‘virgin’ pipeline, all works fine; the error is when cssnext is run.

My files, for reference: https://github.com/stopsatgreen/gulp-cssnext

Seems related to https://github.com/cssnext/cssnext/issues/131

That seems right - disabled autoprefixer and it runs without problems.
features: {
  autoprefixer: false
}


arbitrary "sleep 30" is unsafe

either it is too long and it is too bad.
either it is too short and you don't know about it (the rest will fail probably).
can you find a condition to check whether gogs has finished bootstraping ?
then implement a while loop around it.

Yes it's bad, I don't know any good condition I can use. Maybe some SQL to see if a specific table exist.

Fixed on the new repo https://github.com/YunoHost-Apps/gogs_ynh


Inception

This pull request fixes deployment tracking of the deployment tracker service. This is possible now that we have blue/green deployments.

+1


Enhance docs; include volume and port mapping for Docker/WSL2 use cases [Fixes #31]

Hi @dirkgroot
Here's the documentation update that includes the points triaged via #31 .

Thank you, this is a big improvement in the docs!


Same sharedPreferencesName between 2 apps on the phone

I'm trying to debug a problem on IOs only where a user lost all his data. I know there are many moving parts but while going trough the code (I can't replicate the issue) I wondered what happens if another application use the same "sharedPreferencesName" on the same phone.
I assume nothing happens but maybe you get another app info encrypted or something like that.
Do you have any idea? should I try to build a second app on the simulator?
Thanks,
Stefano

Hey Stefano, unfortunately I have no idea. If you fix it, please share your solution here.

Of course I will, unfortunately I don't have an iPhone so even testing this is hard, maybe I should buy one.


Auth::logoutOtherDevices() requires a double login submission...

Laravel Version: 8.15.0 (no jestream, fortify, etc)
PHP Version: 7.3.3
Database Driver & Version: MySQL 5.8

Description:
On my login action, I call auth()->attempt(...);, then auth()->logoutOtherDevices(...); and finally return redirect()->route('dashboard'); and everything works great. However, if I logout, I have to submit my login twice before it actually logs me in.
Steps To Reproduce:
I have 3 routes
Route::get('/', DashboardIndexAction::class)->name('dashboard');

Route::post('/logout', LogoutAction::class)->name('logout');

Route::get('/login', LoginAction::class)->name('login');
Route::post('/login', LoginSubmitAction::class);

As I mentioned above, in my login controller I call the auth attempt, on a successfully login I call the logoutOtherDevices, and then I redirect to the dashboard route. On my logout controller I simply call auth()->logout(); and then return redirect()->route('login');. However, if I do logout, as I said it redirects me to my login route, but if I try to login again, upon the first form submission it simply redirects me back to the login page. On the second submission it actually logs in. That first form submission after a logout POSTs to /login, which redirects me via GET to /, and that 302's to /login again making me think the login was successful (of course it was, my credentials were correct), but the GET to / seems to run AuthenticateSession (or some other core middleware) which then redirects back to /login...

Hey there,
Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to report back and I'll gladly help you out and re-open this issue.

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

Thanks!

I've been talking to some fellow users on larachat's Slack for the past 2 hours trying to figure out what could be causing this. :)

@alturic can you create a fresh laravel repo with the minimum amount of code needed to reproduce this? Please commit custom code separate from the base laravel installation.

I mean, I could but I would spend more time doing all of that than you would simply making two controllers with these 7 lines of code:
Logout action/route via POST
auth()->logout();

return redirect()->route('login');

and a login action/route via POST
if (!auth()->attempt($request->only('email', 'password'), $request->remember)) {
      return back();
}

auth()->logoutOtherDevices($request->post('password'));

return redirect()->route('home');

And of course uncommenting AuthenticateSession::class in Kernel.php.
If you wouldn't help without me making a repo, you can keep the ticket closed. Those two snippets of code (outside of the form view) is literally all the code needed to reproduce. :)

For anyone else that may run into this, I appear to have fixed it on my logout controller by doing the following.
Current, making me submit a login form twice after logout:
        auth()->logout();

        return redirect()->route('login');

Updated logout action, which doesn't require a double form submit now:
        auth()->logout();
        $request->session()->invalidate();

        $request->session()->regenerateToken();
        return redirect()->route('login');


Implement ViewOf(v types.Value, t *types.Value) types.Value

ViewOf takes a value and a type and produces a new value.
Defined recursively:

if t.Type() is not a subtype of t, return error
if v.Type().Equals(t) || t.Equals(types.ValueType) return v
switch t.Kind:

case: Struct:

return a new Struct with fields:

visit each field in v. if t has a corresponding field name and the the field value in v is a sub-type of the field value in t, include the field and set its value to be ViewOf(sub-value, sub-type)

case: Set, List, Map:

return a new Set, List or Map:

visit each value in the collection (k/v pair in the case of map). if the value's type is a sub type of  some element type of t include it and produce its value by ViewOf(value, t.ElementType).

Other potential names for this function: ExtractSupertype? Filter? ExtractView?
The verb Extract seems very apropos to me.

I think ExtractView is nice. This thing is very similar to a View in other databases.

I think it's also worth thinking what the full signature looks like assuming this is going to need to be implemented incrementally:
ComputeView(currInput, prevInput, prevView types.Value, viewType *types.Type, vrw types.ValueReadWriter) (view types.Value)

This is done in attic, right @aboodman

yup
On Fri, Jun 9, 2017 at 1:22 PM, Rafael Weinstein<EMAIL_ADDRESS>wrote:

Closed #3205 https://github.com/attic-labs/noms/issues/3205.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/attic-labs/noms/issues/3205#event-1117873303, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAE6BLO4YgugrAcDH0PC1jIr7dZiHtQ0ks5sCamDgaJpZM4MGwsJ
.


Error installation qlik tools 7.1: missing wheel package

Hi, I have a issue in the qlik tools 7.1 installation.
The errors is missing wheel package.

Thank you

Hi Marco, this looks like a change with pip 20.1. The wheel package did not need to be explicitly installed previously.
Thanks for raising this issue. I have just published a new release with a fix:
https://github.com/nabeel-oz/qlik-py-tools/releases

Hi @nabeel-oz ,
i try new release but the issue not change.

Hi @nabeel-oz, the qlik-py-tools-7.2.zip is run but the Source code (zip)  not run in the release 7.2

Hi @MarcoBIConsultant, yes apologies I just updated the initialization scripts in the release files. I haven't pushed the changes to the source code yet as they've gone into another branch that I want to merge soon.

Hi @nabeel-oz  dont worry. Thank you for all.


App hangs when more than 3 tokens are used

Hello,
Don't know if it's a bug or not but.. this is what happens:
Starting 3a742e725a6b_shhgit.www ... done
Recreating shhgit.app            ... done
Attaching to 3a742e725a6b_shhgit.www, shhgit.app

It hangs, not even the banner shows.
Any thoughts?

One more thing. It's adding file blob for urls:
`Actually: https://github.com/bozinoski777/cv_api/blob/master/f78a4a620531c9e64a93bbe738ad7dcc28922191/settings
Expected: https://github.com/bozinoski777/cv_api/blob/master/settings
{Url: "https://github.com/bozinoski777/settings.git", Matches: null, Signature: "Django configuration file", File: "/f78a4a620531c9e64a93bbe738ad7dcc28922191/cv_api/settings.py", Stars: 0, …}`
Just an example

Yes, problem with file blob for urls is exist. Please call how to fix it.

One more thing. It's adding file blob for urls:
`Actually: https://github.com/bozinoski777/cv_api/blob/master/f78a4a620531c9e64a93bbe738ad7dcc28922191/settings
Expected: https://github.com/bozinoski777/cv_api/blob/master/settings
{Url: "https://github.com/bozinoski777/settings.git", Matches: null, Signature: "Django configuration file", File: "/f78a4a620531c9e64a93bbe738ad7dcc28922191/cv_api/settings.py", Stars: 0, …}`
Just an example

Does this still happen @jaredxx1? So we need to put 3 tokens max. But do we get rate-limited with only 3 tokens?

Does this still happen @jaredxx1? So we need to put 3 tokens max. But do we get rate-limited with only 3 tokens?

I confirm shhgit completely breaks with just 3 github tokens... :((
Doesn't hang with 2 tokens.

I confirm shhgit completely breaks with just 3 github tokens... :((
Doesn't hang with 2 tokens.

I've not looked in to this yet but it could be because it's exhausting your threads. Try running shhgit with --threads 30, for example.


Set up a read-only database account on the terraref server.

On the database server for http://terraref.ncsa.illinois.edu/bety:

[x] Create a "read-only" role (named "viewer").
[x] Give Rob the password for user "viewer".
[x] Give user "viewer" SELECT access to all public tables in the bety database.
[ ] Remove trust authentication lines from pg_hba.conf and ensure scripts that rely on this authentication (if any) can still run by providing an alternative (Rob).
[x] Make sure /home/bety/bety/config/database.yml and other sensitive configuration files are not world readable.
[x] Change database password for user "bety".
[ ] Update password in scripts that used the old password (if any) or provide alternative authentication path (Rob).
[x] Update password in database.yml config file.

I ran these commands:
CREATE ROLE viewer;
GRANT USAGE ON SCHEMA public TO viewer;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO viewer;

As a test I added user jefft:
CREATE USER jefft IN ROLE viewer PASSWORD ******;

The pg_hba.conf file is controlled by puppet and is not supposed to be edited directly (it says).   There are some changes that should be made if we don't want all machine users to have full access to the bety database.
If an ident server is running on bety6, we could use Ident authentication for all machine users, possibly using a mapping to map them all to database user viewer so that viewer access could be added or taken away merely by editing the pg_ident.conf file.

Should we have a service level account for this rather than manually adding each user to the database? We're using LDAP to authenticate the user to the VM and the service level account would have read-only access so I think it would reasonably secure and easier to administer.

I agree with this, single account is easier. Only issue is if that password is given to others, but that should not matter since they can not access the database without SSH.

@robkooper If there are no scripts that rely on the old bety password, you can close this (see task list at top).

I've revoked SELECT access from the users table for purposes of security.
REVOKE SELECT ON TABLE "public"."users" FROM "viewer";

I've also revoked access from the PEcAn modeling tables so that only relevant tables are visible (to reduce the overhead of having to read through a long list of obscure tables. All of these "REVOKE" statements are here:
https://gist.github.com/dlebauer/4aae063ac38d1dba9859da1ddfb5d2c5