Publisher Client: Support input String

Currently the Confluence Publisher Client (the Java library) only supports providing content through a File. Please also support content in a String, to make it easier to publish something without having to explicitly store it on the filesystem first.
Note that attachments are not considered in this RFE.
Some relevant observations:

Currently, the ConfluencePageMetadata has a property String contentFilePath.
That property is retrieved only from the ConfluencePublisher class (in 2 places).

This could be achieved as follows:

first move all content reading into the current ConfluencePageMetadata class
then change ConfluencePageMetadata to an interface, and have a single implementation class that acts as it used to do
then add an alternative implementation class that stores the content directly in a String object


Added package.json for Package Manager support.

This file allows SabreCSG to be added as a Package in Unity projects.

This also requires an asmdef file, which then breaks all of the reflection code. It won't find additional compound brushes and volumes in your project (nor the included ones). There's also a lot of hardcoded logic that checks the Assets/SabreCSG directory. It's not quite as easy as just adding a json file.


dockerfile multi-stage

could you implement a dockerfile that handles your application? also final image would be nothing but binary and ca-certs?

@arxdsilva you can have a look at #7 and also try docker-compose locally if needed 😄


[Improvement][remote] Refactor remote module to fix code smell

What is the purpose of the pull request
This pull request fixes some of the code smell and vulnerability reported by sonar
Fixes part of #3325
Brief changelog

Refactor files to fix code smell and vulnerability reported by sonar in the remote module

Verify this pull request
This pull request is code cleanup without any test coverage.

Codecov Report

Merging #4576 (3636df0) into dev (891df6d) will decrease coverage by 0.04%.
The diff coverage is 54.54%.

@@             Coverage Diff              @@
##                dev    #4576      +/-   ##
============================================
- Coverage     44.73%   44.68%   -0.05%
+ Complexity     3343     3339       -4
============================================
  Files           530      531       +1
  Lines         22838    22841       +3
  Branches       2669     2669
============================================
- Hits          10217    10207      -10
- Misses        11702    11711       +9
- Partials        919      923       +4

Impacted Files
Coverage Δ
Complexity Δ

...he/dolphinscheduler/remote/codec/NettyEncoder.java
86.66% <0.00%> (ø)
3.00 <1.00> (ø)

...eduler/remote/command/TaskKillResponseCommand.java
0.00% <ø> (ø)
0.00 <0.00> (ø)

...inscheduler/remote/exceptions/RemoteException.java
0.00% <0.00%> (ø)
0.00 <0.00> (?)

...pache/dolphinscheduler/remote/utils/Constants.java
71.42% <0.00%> (-11.91%)
1.00 <0.00> (ø)

...org/apache/dolphinscheduler/remote/utils/Pair.java
54.54% <0.00%> (ø)
3.00 <0.00> (ø)

...he/dolphinscheduler/remote/utils/ChannelUtils.java
33.33% <20.00%> (-6.67%)
1.00 <1.00> (ø)

.../apache/dolphinscheduler/remote/utils/IPUtils.java
50.81% <27.27%> (-1.64%)
16.00 <1.00> (ø)

...inscheduler/remote/handler/NettyClientHandler.java
35.08% <40.00%> (-2.21%)
6.00 <0.00> (ø)

...inscheduler/remote/handler/NettyServerHandler.java
45.09% <42.85%> (ø)
6.00 <1.00> (+1.00)

...dolphinscheduler/remote/future/ResponseFuture.java
83.05% <75.00%> (ø)
19.00 <3.00> (ø)

... and 6 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 891df6d...3636df0. Read the comment docs.

Codecov Report

Merging #4576 (3636df0) into dev (891df6d) will decrease coverage by 0.04%.
The diff coverage is 54.54%.

@@             Coverage Diff              @@
##                dev    #4576      +/-   ##
============================================
- Coverage     44.73%   44.68%   -0.05%
+ Complexity     3343     3339       -4
============================================
  Files           530      531       +1
  Lines         22838    22841       +3
  Branches       2669     2669
============================================
- Hits          10217    10207      -10
- Misses        11702    11711       +9
- Partials        919      923       +4

Impacted Files
Coverage Δ
Complexity Δ

...he/dolphinscheduler/remote/codec/NettyEncoder.java
86.66% <0.00%> (ø)
3.00 <1.00> (ø)

...eduler/remote/command/TaskKillResponseCommand.java
0.00% <ø> (ø)
0.00 <0.00> (ø)

...inscheduler/remote/exceptions/RemoteException.java
0.00% <0.00%> (ø)
0.00 <0.00> (?)

...pache/dolphinscheduler/remote/utils/Constants.java
71.42% <0.00%> (-11.91%)
1.00 <0.00> (ø)

...org/apache/dolphinscheduler/remote/utils/Pair.java
54.54% <0.00%> (ø)
3.00 <0.00> (ø)

...he/dolphinscheduler/remote/utils/ChannelUtils.java
33.33% <20.00%> (-6.67%)
1.00 <1.00> (ø)

.../apache/dolphinscheduler/remote/utils/IPUtils.java
50.81% <27.27%> (-1.64%)
16.00 <1.00> (ø)

...inscheduler/remote/handler/NettyClientHandler.java
35.08% <40.00%> (-2.21%)
6.00 <0.00> (ø)

...inscheduler/remote/handler/NettyServerHandler.java
45.09% <42.85%> (ø)
6.00 <1.00> (+1.00)

...dolphinscheduler/remote/future/ResponseFuture.java
83.05% <75.00%> (ø)
19.00 <3.00> (ø)

... and 6 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 891df6d...3636df0. Read the comment docs.


Correct yard syntax for dry-initialiser classes

Changes in this PR

update yard documentation for dry-initializer options and params

 Correct yard syntax for dry-initialiser classes

The indentation is inconsistent but I don't know if that matters. I'd like to see things indented under @attribute please, and if default is set, it'd be good to see that in the doc

@peterdavidhamilton I've fixed the indentation and added a note about default values where necessary. I was hoping YARD would have a @default tag or similar, but it doesn't, so I just mentioned the default values on the @return tag.


About Heatmaps

Hello, I noticed that the point location loss in Section 3.2 of your paper mentioned that three heatmaps are produced by adding three respective convolutional blocks. However, it seems that the human point heatmap and the object point heatmap in your code are generated from one convolutional block. Is there something wrong with my understanding?

Hi, you are right. The initial version of the released code is implemented with the human and object two-branches style. However, we find that combining human and object detection into a single branch can achieve similar performance and few computation costs through experiments. Therefore, we modify and refine this setting.

Thanks for your reply. Please close it.


Spnego target system selection strategy

This pull handles #497
Many thanks to @seanrbaker for bringing this forward.
The pull contains a set of webflow actions that try to decide if SPNEGO should be activated for the given request. These strategies are per IP, HostName or a given LDAP attribute. If an IP match is found, or a hostname match is found, or an LDAP attribute is found, the action will produce "yes" allowing the flow to resume to SPNEGO.

I don't know SPNEGO, but I have a few questions / comments...

I updated the pull based on the discussion on this thread.

Moving ahead with this PR. @seanrbaker is there anything else you'd rather see here?

I'm sure there'll be more good ideas as this gets moved into production elsewhere, but this looks good to me!

@seanrbaker thanks. Assuming and once this pull merges in, would you be able to help with the documentation? I can always assist where needed.

I'm sure I'm going to need help with style and syntax, but otherwise sure thing!


Add video preview image for Media Finder form widget

This PR adds a video preview image for mediafinder fields that have their mode config set to video. It renders the video screenshot by loading the first 10 seconds of the video and uses a HTML5 canvas element to take a snapshot as an image (stopping the video load afterwards).

In the course of this, I have also rewritten Media Finder to a Snowboard widget.
Only things left to do are:

Make sure it works in preview and update contexts
Perhaps cache or save the preview image so it doesn't have to load the video.
Put something in place if the video cannot load (placeholder image perhaps?)

Something that I'd like to do as a general pattern across all our frontend development is to ensure that all assets live under either dist/ or src/ folders, with the objective being that /src folders aren't expected to exist on production servers or be persisted to CDNs.
So assets/dist/js vs assets/js/dist

With this and #958 it's looking more and more like we need to get #16 done as the thumbnail is definitely something that should stored in the item's metadata.

@bennothommo what's the status of this?

I've held this work until we have media library metadata in place.


updated examples for clarity - [merged]

In GitLab by @mbobra on Mar 27, 2020, 13:43
Merges master -> master
Made the following changes to the Example Gallery:

Registering and Aligning Level 1 Data (prepping_level_1_data.py)

Combined paragraphs 1 and 3 to and moved them to the top of the example to make the motivation for the example a bit clearer
Described why the pointing keywords are out of date
Defined and linked VSO. The contribution guidelines for the SunPy example gallery say:

The examples should avoid using acronyms without defining them first (e.g. Virtual Solar Observatory, or VSO).

Included the m_normalized map by adding m_normalized.peek() to the end of the example. The contribution guidelines for the sunpy example gallery say:

Each example should, where possible, include at least one image, map, or plot to use as the icon in the example gallery.

Updating Pointing and Observer Keywords in the FITS Header (update_header_keywords.py)

Included the word “some” when referencing the accuracy of FITS header keywords
Included the phrase “standard” and linked to the FITS standard in the second paragraph of the example
Defined and linked VSO and JSOC
Placed rogue Å in the fourth paragraph after 171
Removed comma at the end of fourth paragraph and after phrase “accurate derived observer position” (since most phrases that lead to an example do not end with a comma)
Listed the relevant keywords updated by the update_pointing function
Included the output of m_observer_fixed.peek() as an image

Modeling Channel Degradation over Time (instrument_degradation.py)

Mentioned why the instrument degrades over time
Defined and linked JSOC
Mentioned degradation models and linked to Boerner+2012

Correcting for Instrument Degradation (skip_correct_degradation.py)

Defined and linked VSO
This example produces a plot of total intensity as a function of time at the end, but for some reason it does not show up in the example script. Perhaps this example is not running? (The gallery example output says: Total running time of the script: ( 0 minutes 0.000 seconds)). This plot could be used as the icon for this gallery example.

Computing Wavelength Response Functions (calculate_response_function.py)

Included a simple explanation of a wavelength response function
Changed the plots that show response as a function of wavelength to show the response going to zero, i.e.: ax.set_xlim((c.channel + [-20, 20]*u.angstrom).value). It also helps see that the function is asymmetric. (This changed is based on is personal preference).

In GitLab by @wtbarnes on Mar 27, 2020, 13:52
Thanks a lot for this @mbobra :tada: :rocket:
All of the changes look great to me. Regarding your second point in example 4, the reason that no plot is produced is because the example is explicitly skipped. When you append skip_ to the title of the example, sphinx-gallery will include the example in the gallery but it will not run it.
Initially we ran this example every time, but for some reason, the VSO will no longer return consistent results over that long of an interval (~8 years). For the past several months, it always comes back empty, though when I first wrote the example it worked.
I've opened #53 to track this and I hope we will eventually be able to unskip it.

In GitLab by @mbobra on Mar 27, 2020, 13:59
Ah okay sounds good! ☀

In GitLab by @wtbarnes on Mar 27, 2020, 14:04
approved this merge request

In GitLab by @wtbarnes on Mar 27, 2020, 14:12
mentioned in commit 2bd7d9b2c5b71a0eddeef1d4b1e5bb4fc6e6de26

In GitLab by @wtbarnes on Mar 27, 2020, 14:12
merged


Update language file for zh-Hant

Update language file for zh-Hant

@lloy0076 - yep. My point exactly:)

Thank you @mics8128! Merged!


Improve error message when attempting to run the iOS app alongside the desktop and web in development

@marcaaron
Details
Adds a script to check if a port is running. Then we use this script to check if the port 8081 is already in use before trying to run the ios or android app during development. If the port is occupied by another process, it will print an error.
Fixed Issues

Fixes https://github.com/Expensify/Expensify/issues/157479
Tests

Run npm run desktop
Run npm run web
Run npm run ios
Check that it prints this error:

Now close the processes for desktop and web.
Run npm run ios again
The app should launch successfully.

QA Steps

Run npm run desktop
Run npm run web
Run npm run ios
Check that it prints this error:

Now close the processes for desktop and web.
Run npm run ios again
The app should launch successfully.

Tested On

[x] Mac OS
[ ] Linux
[ ] Windows

Screenshots

npm has a package.json file and a package-lock.json file. It seems you updated one without the other, which is usually a sign of a mistake. If you are updating a package make sure that you update the version in package.json then run npm install

npm has a package.json file and a package-lock.json file. It seems you updated one without the other, which is usually a sign of a mistake. If you are updating a package make sure that you update the version in package.json then run npm install

Awesome, tests well for me!

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

Why 8081? Won't it use 8080 by default?

metro runs on 8081

So the issue only happens if you've got 8080 and 8081 occupied then try to run metro.

Hmmm I think a more robust solution would be to implement something similar to our desktop start script that uses portfinder to find an open port.

There's more context on the original issue if you want to continue this there.

🚀 Deployed to staging in version: 1.0.73-4🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@thienlnam @marcaaron This PR looks like internal QA, can someone confirm?

@isagoico Yeah, sorry about that. This is internal QA!

Oh actually, it should already be listed as internal QA

Checking this off the deploy checklist because it's a dev-only change. Shouldn't affect staging in any way.

🚀 Deployed to production in version: 1.0.74-0🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


zipkin-{ui,web}: Reorganize webpack structure

Moves the generated assets from dist to build/resources/main, following Gradle conventions. Everything there gets automatically packed up into the jar we generate from zipkin-ui.
Generates separate index.html for /dependency/, making the package directly usable by static webservers. This means active servers can also implement the simpler heuristic "try PATH/index.html, then PATH, then 404" or "try PATH, then PATH/index.html, then 404". The previous one was "try PATH if it has a dot in it (that is, it has an extension), then PATH/index.html, then 404.
Renames the dir static to zipkin-ui to avoid conflicts with other packages. See https://github.com/openzipkin/zipkin/pull/1038 and https://github.com/openzipkin/zipkin-java/pull/98#issuecomment-197352561
Simplifies zipkin-web handler registration. The code originally pretended to support URL placeholders like :id in /foo/:id. That's not, in fact, the case (it just replaced :id with /). The new routes directly use the specification of the Finagle HttpMuxer.
Move everything but index.html into assets subdir in the webpack.  Due to the way the Finagle HttpMuxer works, this allows a simplified description of the routing functionality we expect. Specifically, with these two rules, we get exactly the heuristic described above:

anything under /assets/ should be served as is from the classpath
anything under / should try to serve PATH/index.html, or 404.
Together with HttpMuxer saying "the longest matching rule wins", this
translates to: if no other rules match, try to serve
PATH/index.html

Refactors Handlers.handlePublic to allow reusing its caching logic when serving index.html.
Generate index.html using html-webpack-plugin. This lets us move things around without worrying about updating the contents of index.html manually.

@adriancole @eirslett I think this is ready for another round of reviews.
@dsyer FYI, this implements the "rename static to zipkin-ui in the jar" KISS solution mentioned in https://github.com/openzipkin/zipkin-java/pull/98#issuecomment-197453093.

Generates separate index.html for /dependency/

This would break in other cases, e.g. the /trace/:traceId endpoint. And it wouldn't be very forwards-compatible once we add more routes.

on rename of "/static" to "/zipkin-ui" I think this was a nudge to try to use webjar format, which neither are. It probably will help, at the end of the day, and the amount of custom code in zipkin-java doesn't change all that much I think.

ps for things like this, it is kindof more convenient to raise on a openzipkin/zipkin so no need to fetch and pick commits to try it (plus I can contribute there, too)

Moved to shared branch in #1049

@eirslett Indeed, I missed that. Will revert that change.
@adriancole on webjar: I agree it was a nudge in that direction. I don't have a strong opinion on the webjar-vs-not debate, and don't know enough to form one. I'm deferring to @eirslett on this one, I was under the impression we had a consensus.


Compile TS instead of having Atom Compile it

This would allow us to use new features such as ES6 imports, destructuring and such.
It also may have a positive impact on start time, in regards to getting the package running.

I wonder how much time we would truly end up saving?

In start up, it depends on the compiler that atom is using.  With the ts 1.4 compiler, it's a decent amount of time.  With the ts 1.5 compiler (that atom-typescript uses) it would be very marginal.
I would also include developer productivity things, destructuring, for of, etc.
https://github.com/Microsoft/TypeScript/wiki/Roadmap#15

Closing as we now have a gulp task to compile on demand, and compileOnSave set for those using atom-typecript.


Brainstorming functions to make PySpark easier

One of the overall goals of this project is to make PySpark easier.  The purpose of this issue is to brainstorm additional functionality that should be added to quinn to make PySpark easier.
Let's look at the Ruby on Rails web framework that has a well known ActiveSupport module to make common web development tasks easy.
When you use Rails and search "rails beginning of week", you're immediately directed to the beginning_of_week function, which is easy.
When you type in "spark beginning of week", you're redirected to this blog post I wrote, which provides a spark-daria Scala function for beginningOfWeek, which is also easy.  I can see that users read this blog post every day from the Google Analytics traffic.
When you type in "pyspark beginning of week", you're redirected to this Stackoverflow question, which is scary, complicated, and makes this seem hard.  I need to write a blog post that ranks #1 for "pyspark beginning of week" searches that show the quinn.week_start_date() function, so Python users think this is easy.  We have a function that's easy, but it's not findable yet.
What are your thoughts for new functions we can add to quinn that will help make PySpark easy?

If I understand you correctly, we are looking for new functions, that do not exist yet, to make PySpark more easy, right?

@robertkossendey - yep, what new functions should we add to make PySpark easier?

One thing that comes to my mind immediately is the calculation of how many business days lie between two dates. I found it always annoying that PySpark does not provide such functions natively.

@MrPowers One thing I find myself doing constantly, is a regex string between functionality is super annoying, and I have to use it all the time. Like if you just want to find the first occurrence of a string between two other strings

I think we can add some math sugar. For example, recently, I worked on implementing of Differential Privacy and found that there is only Uniform random distribution out of the box, and to implement Laplacian random distribution, you should invest a lot of time. Also offen I use random integers to repartition the data, but there is no functionality to generate random ints out of the box.
Also, I want to see aggregation functions like first_row, last_row, max_row, min_row, and so forth and so on. It is really often task, for example, to get "the most recent by date row per customer or per product".

Also I really want to see some functionality for working with S3/HDFS/DBFS/etc using only PySpark but @MrPowers you told me that it is better to do it in eren, not quinn repository.

One thing that comes to my mind immediately is the calculation of how many business days lie between two dates. I found it always annoying that PySpark does not provide such functions natively.

Shameless plug :P
https://fpvmorais.com/post/databricks_workdays/

@fpvmorais - looks like your workdays function would be a good contribution.  We'd probably be able to figure out how to do it without a UDF.  Want to submit a PR?

I would love to submit it :D Do I just PR on this repo?

@fpvmorais - can you please comment on this issue, so I can assign the work to you? You can submit the PR by forking the repo and then creating the PR on your fork.

@MrPowers Small proposal - maybe adding UUID5 (not as complete as Python version obviously, but better than nothing) generator? - https://github.com/YevIgn/pyspark-uuid5/blob/2055a4aa8429424ef79c248f78aba2a33e462806/src/research_udf_performance.py#L158 - recently I made an attempt to write one, this version doesn't use UDF, Pandas/PyArrow
What is your opinion?

@robertkossendey - FYI, we added the function to compute the number of business days that fall between two dates.  We should probably extend it so the user can supply a list of holidays for their respective countries if that's something they need.

@MrPowers A function that might be useful is one that could generate a spark schema, including nested structs, from json-schema/openapi.

@MrPowers A function that might be useful is one that could generate a spark schema, including nested structs, from json-schema/openapi.

May you give an example,  please? Because there is already a method pyspark.sql.types.StructType.fromJson(json), that create a schema object from JSON.


Huge calender icon in Evolution settings

Using this theme, the calendar icon in the settings panel in evolution is huge. Like 10 times bigger than all the other icons.

@DasJott Thanks for the update. What icon theme are you using? I do not maintain the Ultra-flat-icon repo unfortunately, and this looks more like their issue. Can you please post a screenshot of the problem as well?

OH, i am so sorry. It seems I messed something up. I use the "Ultra-flat-orange" and it seems it's not delivered with flatabulous :D

Thanks. What icon theme are you using?

ultra-flat-orange

Closing. Belongs to Ultra-Flat-Icons.


feat: welcome notification

Description

Resolves # (issue)
Part of https://github.com/WalletConnect/cloud-app/issues/869
How Has This Been Tested?

Due Diligence

[ ] Breaking change
[ ] Requires a documentation update
[ ] Requires a e2e/integration test update

Few changes in the latest iteration:

add enabled field, notification is only sent if enabled=true
/welcome_notification -> /welcome-notification to be consistent with other endpoints
GET /welcome-notification now returns null instead of 404 when no welcome notification exists


Some code example for CssParseErrorEvent

I need to get a list of parsing errors for a CSS stylesheet. I see there is CssParseErrorEvent class, but was unable to find corresponding sample code in the unit tests or in the documentation. Is there any relevant example (CSS/HTML parsing errors)?
            var cssText = @"body {background-image *: url(paper.png);"; // invalid
            var parser = new CssParser();
            var css = parser.ParseStylesheet(cssText);
            // how do we get parsing error(s) here?

The best examples can be found in the AngleSharp.Samples repository, namely the sample application. However, as the current pattern (event aggregator) will change soon (see #156), relevant examples would be outdated soon.
Currently, the process is as follows:

Register an IEventAggregator instance (you don't need to create one: there's a simple implementation in form of SimpleEventAggregator)
Subscribe to a desired event, e.g., CssParseErrorEvent
Once the event is published your handler will be called

The reason for changing this pattern is that I don't like the separation between AngleSharp events and DOM events. This separation may sound appealing at first, but it has some disadvantages (such as having the follow the pattern described above, being inconsistent with the other approach, or not being able to attach handlers in, e.g., JavaScript).

Thanks Florian!
The following unit test shows a working example of getting CSS parsing errors:
        [Test]
        public void AngleSharp_PoC_CssErrors()
        {
            var cssText = @"body {background-image *: url(paper.png); }"; // invalid
            var parseErrors = new List<CssParseErrorEvent>();

            var aggregator = new SimpleEventAggregator();
            aggregator.Subscribe(new Subscriber<CssParseErrorEvent>(m => parseErrors.Add(m)));

            var parser = new CssParser(new AngleSharp.Configuration(events: aggregator));
            parser.ParseStylesheet(cssText);

            Assert.IsTrue(parseErrors.Count > 0);
            foreach (var error in parseErrors)
            {
                Console.WriteLine($"{error.Position.ToString()} - {error.Code} - {error.Message}");
            }
        }

        private class Subscriber<T> : ISubscriber<T>
        {
            readonly Action<T> _listener;

            public Subscriber(Action<T> listener)
            {
                _listener = listener;
            }

            public void OnEventData(T data)
            {
                _listener(data);
            }
        }

Yes, this is the correct usage.
Please note that stars are the currency on GitHub. If useful repositories are not starred then further support may be abandoned. After all, why maintain something that seems to be uninteresting?

Sorry, I'm new to GitHub, didn't know about the stars before :smile:. Starred AngleSharp main repo and Samples repo as well.

Thanks, appreciated! :+1:


undefined method 'geocoded_by' with rake assets:precompile

I know there have been issues in the past with this error message, but this one seems different. I get this undefined method message when I attempt to run rake assets:precompile for my rails 3.1 app. The full output is:
** Invoke assets:precompile (first_time)
** Execute assets:precompile
rake aborted!
undefined method `geocoded_by' for User(Table doesn't exist):Class

Tasks: TOP => environment

geocoder is in my gemfile. Restarting the app server isn't relevant in this case, so what else is there to do?
Thanks,

Charlie

+1, same issue here.

+1 Any fix ?

The problem comes from this commit.
With this condition :
if ENV['RAILS_GROUPS'].to_s != 'assets'
As rake assets:precompile is executed with RAILS_GROUPS = assets.

That commit was a fix for issue #123 so I can't just revert it. I don't really understand what the RAILS_GROUPS environment variable is for so I'm not sure what to do. Anyone have an (informed) idea?

Also, there are a bunch of related changes to the assets:precompile task in the newly-released Rails 3.1.1. Has anyone tried with that yet?

I am currently using Rails 3.1.1 and still having the issue.
By default the rake task assets:precompile is executed with these environment variables : RAILS_ENV=production and RAILS_GROUPS=assets.
RAILS_GROUPS=assets makes the rake task load the gems which are in the assets group (in the Gemfile).
assets:precompile use RAILS_GROUPS=assets because it needs saas-rails and coffee-rails (which are in the assets group in the Gemfile) to precompile assets (because of the helpers).
Hope I was clear :)

+1 also having this issue

Me too. Although a variation on the same them:
undefined method 'reverse_geocoded_by'
:)
@dewski's proposal fixed it for me for now...
class Location < ActiveRecord::Base
  extend Geocoder::Model::ActiveRecord

  geocoded_by :address_for_geocode
  reverse_geocoded_by :latitude, :longitude
end

Could you add the gem to the assets group perhaps?

@Sush: I'm merging your commit (the revert). However, I'm a little confused about how to get this working for folks using Heroku. I think you understand asset precompilation better than I do; do you know what a proper solution to issue #123 would be? What about testing for an actual database connection (ActiveRecord::Base.connected?) before inserting Geocoder into ActiveRecord? (see lib/geocoder/railtie.rb)

The best solution for Heroku users is to set config.assets.initialize_on_precompile = false.
It will force the application to not access the DB or load models when precompiling the assets.
Unfortunately as I don't use Heroku I can't try, but it should work well.
If so you just have to revert the commit (and maybe update the documentation for Heroku users) :)

I just published version 1.0.5, which incorporates Sush's fix for this issue.

So, this gem is dead ? Here doesn't work anyway.


788 make it easier to change pi

Needed to resubmit this PR as the branch name was breaking the flow

I think every time the factory default PDF is updated, it breaks the e2e test because the pdf fixture needs updating to the new file size. I don't know how to grab the generated PDF from the cypress test to commit it though 😕

I think every time the factory default PDF is updated, it breaks the e2e test because the pdf fixture needs updating to the new file size. I don't know how to grab the generated PDF from the cypress test to commit it though 😕

I will update it this time. Otherwise, I just run the test Should be able to verify pdf download and compare with a fixture and that generates a pdf file in the downloads folder and I open that one to verify it is similar with the fixture and then replace the fixture.

Thanks @martin-trajanovski, I'll remember that for next time :)

Please could I get your review on these latest commits? 🙂 @mutambaraf @martin-trajanovski


Shaded guava dependency is being flagged for CVE-2020-8908

The OWASP DependencyCheck plugin  is flagging wavefront-sdk-java for this guava vulnerability: https://nvd.nist.gov/vuln/detail/CVE-2020-8908
Looks like guava 28.2-jre is being shaded in the sdk jar via

this version declaration: https://github.com/wavefrontHQ/wavefront-sdk-java/blob/ddbc939e33cdae69245319244da68ecdfcc7dac7/pom.xml#L141
this shading directive: https://github.com/wavefrontHQ/wavefront-sdk-java/blob/ddbc939e33cdae69245319244da68ecdfcc7dac7/pom.xml#L81

This ticket requests that the guava dependency be updated to a version which is not flagged for the vulnerability, i.e. "version 30.0 or later" according to the CVE documentation.

@hanwavefront @sushantdewan123 Can you create a release containing the fix?


Check prompt file format

Flags on .md files in directories that are not called README.md
GH Action test should check that

prompt name matches file name
PII field exists, has boolean value
type field exists, has allowed value
file parses as expected with header section, body section, response section
spellcheck of body section, response section?

Possible issue for @mykoal


Lokalise: Translations update

This pull request was initiated by Lokalise (user Agnieszka Galeza) at 2020-11-10 23:12:51

@rabbi08
Email was corected.
@Zaydme
Trailing comma is necessary. I double checked that.

@galeza
For Chinese, Polish, German, Spanish - translation
we have 'contact email<EMAIL_ADDRESS>But for 'American eng and Bristish'
we have 'contact email<EMAIL_ADDRESS>In PROD we have<EMAIL_ADDRESS>on About US page for all translations.
Note: In zeplin design shared in PR #1577 it should be<EMAIL_ADDRESS>Great if @tejasm2 @kchan335 can confirm the correct email.

@rabbi08 do we merge this or do we wait for confirmation about the email?

@galeza @Zaydme
As confirmed by @tejasm2 the email for languages should be
<EMAIL_ADDRESS>Can you update this for all languages through this PR or we need to have another PR for other languages?

@rabbi08
I will trigger a new PR


CSR mode not working with index.html in dev mode

Hello, when we use the index.html method for CSR, the rendered HTML in dev mode is completely different and omits everything defined in the index.html
It just uses a default root.tsx if it doesn't exist and don't take what I have in my index.html file.
Hope someone can help me- Thanks!

Yeah we don't use index.html. THe idea was to use all the same mechanisms. So the root gets built at build time into index.html. I don't know if this is the best, but that was the intention.

Oh okay, didn't knew that. Even though, at production build time it uses the index.html if it exists so that's a little confusing I guess.
By the way, when using root.tsx without ant index.html, the built index.html doesn't put scripts in the body at all even if we put <Scripts /> in <Body>.
In result, I had to add a DOM load event listener in the entry-client.tsx of one of my projects to fix a "document.body is undefined" error.

Also, I opened this issue because of a problem with vite-plugin-pwa which doesn't add the built index.html in the service-worker.
Results to the PWA not working offline because of index.html not cached.
I fixed this problem by using both index.html and root.tsx but don't know if that's good practice.

Hmm.. I've been playing a bunch with ssr: false and I see script/style insertion and the body tag. Is the problem with vite-plugin-pwa it doesn't recognize where index.html is located?

Is the problem with vite-plugin-pwa it doesn't recognize where index.html is located?

Yeah pretty much since with an index.html it works by default.

I fixed this problem by using both index.html and root.tsx but don't know if that's good practice.

I'm also trying to use this plugin, but I have SSR enabled. Would you be able to provide an example/link to the docs where you found how to add index.html? (I have been searching but been unable to find)

workbox: {
additionalManifestEntries: [{ url: "/index.html", revision: null }],

I also tried this before but the issue with revision: null is that your HTML file will never be updated! I came up with a solution to provider the hash of the generated HTML and put it in that revision object but it didn't worked well and each updates didn't worked properly.

I'm also trying to use this plugin, but I have SSR enabled. Would you be able to provide an example/link to the docs where you found how to add index.html? (I have been searching but I have been unable to find it - running into the same index.html has not been precached error)

I don't know if it's in the docs but I would recommend looking directly at the unit tests for SPA so you get the latest examples.
Here it is for the index.html file, https://github.com/solidjs/solid-start/blob/c9c3e5524a3e363f9745fb5ca037a4436ae61eea/test/spa-test.ts#L51-L63

In setting up for SolidStarts next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed in mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience.

See https://github.com/solidjs/solid-start/pull/1139 for more details.


Possible to reset all advancements on a server?

I'd like to clear all the advancement information for my server, and remove all the past information about which players have opened particular chests, so that they are all "new" again.
Can I do this by simply deleting the Lootr-AdvancementData.dat file? Or to I have to go in-world to each chest and reset it?

having this issue but I want to know how to reset, per player data for loot chest as well

To reset the per-player data for a single chest, you can delete the relevant data file for it. This data file is contained in the world/data/lootr folder, in the subfolder consisting of the first character of the chest's ID, and a subfolder of that consisting of the first two characters of the chest ID, etc.
You can find the specific chest ID by standing on it in game and executing the operator command /lootr id.
Alternately, if you want to clear all of the chests, you can just delete all of the subfolders.
With regards to the advancements: the advancements grants are tracked through the aforementioned AdvancementData file; deleting this, however, will not remove the advancement entirely, as you will still need to use the Minecraft /advancement command to revoke the relevant advancements.


feat: add string/to-well-formed

Returns a well-formed string by replacing all lone surrogates
Fixes #1066
Resolves # 1066
Description

What is the purpose of this pull request?

This pull request:

Replaces all lone surrogates in a string and returns a well-formed string
If the string is already well formed then return a shallow copy of the string

Related Issues

Does this pull request have any related issues?

This pull request:

resolves #
fixes #

Questions

Any questions for reviewers of this pull request?

No.
Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.
Checklist

Please ensure the following tasks are completed before submitting this pull request.

[x] Read, understood, and followed the contributing guidelines.

@stdlib-js/reviewers

I am not so great in reviewing this kind of PRs, I let Athan or Phillip review this.

@Planeshifter Can you please review these changes?

@Pratik772846 Implementation looks fine; will merge after CI has passed. Thank you!


restructured tutorial section

#732
Added submodule to Bruce's tutorial and restructured tutorial section to learning cookiecutter and learning to make cookiecutter project templates
Link to blog on git submodules
http://fmarco76.github.io/git and related services/readthedocs/

[Current coverage][cc-pull] is 99.66%

Merging [#740][cc-pull] into [master][cc-base-branch] will decrease coverage by 0.32%

File ...ookiecutter/utils.py (not in diff) was modified. more

Misses +2
Partials 0
Hits -2

@@           master       #740   diff @@
========================================
  Files          13         13
  Lines         583        583
  Methods         0          0
  Messages        0          0
  Branches        0          0
========================================
- Hits          583        581     -2
- Misses          0          2     +2
  Partials        0          0

[][cc-pull]

Powered by Codecov. Last updated by [f736c2e...16cc927][cc-compare]
[cc-base-branch]: https://codecov.io/gh/audreyr/cookiecutter/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/audreyr/cookiecutter/compare/f736c2efd853f2123b4ca289fd9130f1b2a198ad...16cc9277f1676a37edcab0a5aeea6b7e61ce3c86
[cc-pull]: https://codecov.io/gh/audreyr/cookiecutter/pull/740?src=pr


Import protos/doc rework

This PR does a handful of things. They are relatively closely intertwined, which is why I put them into one PR. If it would be easier to review if I break this apart a bit, please let me know. I did try to make sure to break the commits into logical sections that should make reviewing easier.
Highlights of what is included:

The generated proto files from googleapis/proto-client-php have been moved into this repository, with this come a  few key benefits:

We now can render docs for the proto classes.
We don't need to worry about managing releases for the ever-growing proto-client-php repository. This should help us maintain fewer conflicts.

The READMEs have been streamlined (a follow up PR will need to be filed to update the add component dev tooling). This will help us share consistent information with users, especially if they find the library via one of our read only repo splits.

READMEs for each component now share the same structure and make sure to include:

A description of the service
Details on authentication
A sample
Version details
Links out to relevant information (such as where to find helpful samples

READMEs inside the generated client directories now include sample code. This can help users understand how to quickly get up and running as now it is a bit harder to navigate where the clients exist.

When clicking into a component, the docs site will now always load a pruned version of the README as the default overview. Previously, components which were handwritten were loading the main client (e.g. StorageClient) as the default overview, conflicting with GAPIC only components where we shared a README. This required a change to the angular app that powers the doc site, a PR will be coming for that soon.

To check out how the new docs look, please visit here.
Closes #381.

This is awesome!
I have had a browse, and really like the look of the readme and doc updates. Are there any particular pieces that you think would be good to do a detailed review on? Or should I just select some APIs to do a deep dive into?

Just picking some APIs and doing a review on the structure would be incredibly helpful, from there we  can get any changes required done and then do a pass at making sure no small details were missed. :)

Taking a look, I only saw one thing - should we add README files to the Admin GAPICs? (e.g. https://github.com/dwsupplee/gcloud-php/tree/import-protos-prep-docs/Spanner/src/Admin/Instance/V1)
I will run some actual tests as well.

Yep, good call. FYI, there is an issue with the protos where the doc site is picking up "Example:" in a description and erroneously creating code blocks. It looks like the snippet parser thinks these should be tested, which isn't going to work out well 😄. Looking into a fix, right now I'm thinking we can update "Example:" to "Sample Code:" in our documentation.

Yep, saw that failure in the tests. Do you think we should add some sort of more unique token? I can totally see a proto file comment having "Sample Code:" in it as well. We could perhaps make sure to look for "* " on the following line? Or even "php", or something similar that won't muck up the docs?

@michaelbausor when you have a moment could you please merge and release https://github.com/googleapis/gax-php/pull/177? It will be required for CI to pass. :)

Opened release PR: https://github.com/googleapis/gax-php/pull/183

Awesome, thank you!

@jdpedrie If you could review the latest few commits since our last pass through, we should be good to go here :)


unable to read in markups json files for GPA on Mac

Describe the bug
I am running 3Dslicer version 5.6.2 and slicermorph from May 16th on a mac. I am unable to select markup json files from the browser when trying to run PCA on the GPA modlue. They are greyed out and unselectable. Thanks!

@drScanley I can't replicate this on my mac with the latest SlicerMorph. Couple things to check:

Thanks @muratmaga. I can select fcsv files from the folder but not Json, and moving the files has no effect.  The slicermorph is the most recent version. The dataset can be downloaded from here. Thanks!

Thanks for sharing. Now I can replicate. @smrolfe looks like our pattern matching is forcing the "mrk.json" as file selection criteria. Hence making these JSON files unselectable, even though they are valid. Can you fix that please?
@drScanley as a work around, please rename the file from .json to .mrk.json and things seems to work.

Both should be allowed and I am only seeing this issue on the Mac OS, Windows is fine. I will look into it further.

@smrolfe any updates on this?

This also happens in Mac. @smrolfe can you please address this?

Submitted the bug fix here: Update json selection syntax


Service Bus message size

Service Bus supports messages up to 1 MB in Premium tier: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quotas

@andresnava : Thanks for your contribution to the Azure documentation! The author, @wesmc7777, has been notified to review your proposed change.

@andresnava Thanks!

#sign-off


Callback function signature does not follow Node conventions

This is probably a decision you made to do things a certain way, but it seems with the 3.0.4 version of this library, the callback passed to sg.API does not follow the standard Node callback function signature convention of function (error, data). Instead, the API response is always returned as the first object.
This makes it hard to determine if something went wrong, as we are now responsible for deciphering the raw API response and analyse the response headers and status codes manually.
I don't feel that this should be the responsibility of user land, but of the library itself. What if status codes change? What if the response format changes? What if an error occurs and the returned data format becomes different, or null or undefined?
The very least that can be done to address this is for the library to determine if an error occurred, and if yes, populate the first parameter with an error object (it can have the response attached to it). If no error occurs, return null as the first parameter and the response object as the second parameter.

My current solution is to check the status code for success, e.g.:
function sendMail(mail) {
  return new Promise((resolve, reject) => {

    //Build request
    let request = sg.emptyRequest();
    request.method = 'POST';
    request.path = '/v3/mail/send';
    request.body = mail.toJSON();

    //Send request
    sg.API(request, response => {
      if (response && response.statusCode &&
        response.statusCode >= 200 && response.statusCode <= 299) {
        resolve(response);
      }
      reject(new SendMailError(
        'Sendgrid response error ' + response.statusCode
      ));
    });
  });
}

As you can see this is quite verbose though and requires a lot of boilerplate to simply send an email and check if it worked or not.
Proposed API would be something like:
function sendMail(mail) {
  return new Promise((resolve, reject) => {

    //Build request
    let request = sg.emptyRequest();
    request.method = 'POST';
    request.path = '/v3/mail/send';
    request.body = mail.toJSON();

    //Send request
    sg.API(request, (error, response) => {
      if (error {
        reject(new SendMailError(error);
      }
      resolve(response);
    });
  });
}

Or better yet, with promises returned:
function sendMail(mail) {
  return new Promise((resolve, reject) => {

    //Build request
    let request = sg.emptyRequest();
    request.method = 'POST';
    request.path = '/v3/mail/send';
    request.body = mail.toJSON();

    //Send request
    sg.API(request, response => {
      if (response && response.statusCode &&
        response.statusCode >= 200 && response.statusCode <= 299) {
        resolve(response);
      }
      reject(new SendMailError(
        'Sendgrid response error ' + response.statusCode
      ));
    });
  });
}

As you can see this is quite verbose though and requires a lot of boilerplate to simply send an email and check if it worked or not.
Proposed API would be something like:
function sendMail(mail) {

  //Build request
  let request = sg.emptyRequest();
  request.method = 'POST';
  request.path = '/v3/mail/send';
  request.body = mail.toJSON();

  //Send request
  return sg.API(request);
}

And, ideally, we'd see the return of a dedicated mail sending helper which would create the proper request for us in the background, eliminating the need for a sendMail helper and boilerplate altogether:
sg.sendMail(mail);

If this is something you are interested in pursuing I will look into making some PR's for it.

Thanks @adambuczynski,
Generally, we are planning to update the error handling, but we have not scoped that out yet. We will take this feedback into consideration when that time comes.
If you want to provide a pull request, we need a signed CLA: https://github.com/sendgrid/sendgrid-nodejs/blob/master/CONTRIBUTING.md#cla
We have setup a helper structure for the kind of enhancements you propose: https://github.com/sendgrid/sendgrid-nodejs/tree/master/lib/helpers/mail. You can either help modify that one, or create your own in the helpers directory.
Thanks for your support!

Yes I have seen the helper for mail. Do you want to create a mail sending helper on that object?

That sounds good to me :)

The suggestions @adambuczynski made are spot on.  I just updated to the v3 API and was very disappointed that I can't use a simple helper function anymore and instead have to write a bunch of boiler plate code.  I can no longer even wrap it in a Bluebird promise without writing ugly error handling code.

Awesome, thanks for the validation @beldenge!
Please follow this issue for progress. If @adambuczynski creates a pull request, I'll post it here; otherwise, we'll add this to our roadmap for one of the next library updates.

@thinkingserious I've just mailed you the signed CA, I hope to have some time next week to look into this.

@adambuczynski we have received it and thanks for the feedback!

Hi guys, haven't forgotten about this, but I've been a bit busy with several other projects. Still hope to look into this at some stage :)

@thinkingserious I've had a look at your source code, but it looks a little bit messy. If I make edits, my code linter will make a lot of automated changes to it (e.g. add missing semi colons, use consistent quote style for strings, use consistent spacings between language elements, etc. etc)
Are you ok with that happening? I don't think I will be able to work with the code otherwise, as it hurts my brain to look at it :)
PS why don't you use linters :)

@adambuczynski,
We use this linter: http://eslint.org along with the standard style guide.
Which one do you use? If we can sync up and use the same linter that would be wonderful.

I use ESLiint as well, but it doesn't seem like you apply a lot of rules as there are still so many inconsistencies in the code.
This is the config that I use: https://gist.github.com/adambuczynski/1fa24bcfc5d17b8d26e4c39ffca7560e#file-eslintrc-node-yaml

There is no .eslintrc.yaml config file in your project. Could you add/create one with your preferred rules so that I can use it as well?

@adambuczynski,
I'm happy to use yours, it looks solid :)
Please add it as part of your commit.

@thinkingserious it is setup for ES6 features though, e.g. warning when you use var instead of let and using the ES6 parser.
Is that ok, or do you prefer to use ES5 only for backwards compatibility?

We need to support Node.js versions: "0.10", "0.12", "iojs", "4"
I'm fine with the more modern approach if we don't break support for those versions.

Ok, I've kept the var's and just fixed code style issues that came up. Created a PR for that separately from this issue.

@thinkingserious I am also implementing a Promise API, but native promises were only introduced in Node 0.11.13.
Several solutions, let me know which (or combination) you prefer:

Use bluebird promises as a dependency
Check if promises are supported or not, throw an error if they aren't but if people try to use them
Allow users to set the promise implementation they want to use by simply setting sendgrid.Promise to whatever value.

Agreed.
I like this option: "Check if promises are supported or not, throw an error if they aren't but if people try to use them", but also allowing users to specify the implementation they would like.

@thinkingserious perfect. I have something ready for review, do you want me to push it to the same PR, or create a separate PR for it?

@adambuczynski you can keep in the same PR, thanks!

See #261

@beldenge would you mind adding a +1 to the PR https://github.com/sendgrid/sendgrid-nodejs/pull/261 so the Sendgrid team can move it along and consider it for merge? Thanks!

@adambuczynski I'll add the +1 now :)

Fixed with https://github.com/sendgrid/sendgrid-nodejs/releases/tag/v4.0.0


Show correct confirmation messages when removing a sensor

Popup title and buttons are in English, content in Finnish.

@markoaamunkajo no those are coming from the browser, if your browser would be set to Finnish it would be in Finnish.
We can change this to a custom dialog we implement the new renaming.


Folder and Readme for Insights

We have a few new shared components in the work so we are setting aside a spot for our work. Expecting to add a

telementry mixin
fullscreen component mixin
chart component with extensions

and hoping to migrate in

router
accessible toaster
immersive nav bar
card cover

Sounds good I'll close this


Pleas make compatible with latest built_redux

The version range for built_redux is open to  ">=6.1.1 <8.0.0" on 0.4.0
Are you trying to use 0.4.0 of built_redux_thunk? I did forget to create a release on github, maybe you just missed it.


Wrong crate name in readme

Bonjour 🇫🇷
The right name is: docker-sync
https://crates.io/crates/docker-sync

The extern crate from https://github.com/bpetit/rs-docker-sync/commit/5e0b0d5439ad2d1d3341736335052601754441ca are wrong they should be extern crate docker_sync;

Hi !
Thanks for noticing that, I've rushed the first description of the crate as I wanted to use it quickly, sorry for those inconsistencies.
I'll fix that.


Make and_wrap_original work with any_instance

There were a couple of different issues preventing and_wrap_original
from working when used with any_instance. Both of these changes were
necessary to make the test case pass, and I wasn't able to find any
other code that looked like it needed to be updated (except for
receive_message_chain, which apparently doesn't work with
and_call_original either).
This fixes #867.

Re: receive_message_chain: code that looks like it would need changing, pending spec for and_call_original. This isn't related to any_instance, but it came up when I was looking for other changes that might have been missed when and_wrap_original was added.

Thanks for rolling up your sleeves and submitting this PR for your issue, @rf-!
Re: receive_message_chain, if you want to tackle making that work with any_instance, feel free but I recall it being fiendishly difficult (I could be wrong about that, though).  any_instance is a feature none of the rspec core devs actively use and we generally discourage its use...so it's unlikely any of us will make it a priority to address these shortcomings.  Long term, I'm thinking that I'd like to actually move it out of rspec-mocks into an external gem for RSpec 4 so that it can continue to exist for those who use it without inflicting the large amount of complexity on rspec-mocks that it currently does.
Regarding this PR, my one concern is that your spec only covers one facet of the behavior of and_wrap_original for any_instance.  As that file demonstrates, there are other facets of behavior of and_wrap_original that will hopefully "just work" for any_instance (since it winds up delegating to the same thing) but we don't know that that's the case until we test it, so I'd like to see those other facets covered by specs.  Ideally, you could use a shared example group for it.  We've done a similar thing in receive_spec.rb.  The key abstractions that make that work for both the allow and allow_any_instance_of cases are wrapped (which returns allow(object), allow_any_instance_of(klass), expect(object) or expect_any_instance_of(object) as appropriate for the specific example group) and receiver (which returns the individual object the message is sent to.  See here.

For the record, I don't think receive_message_chain will work with and_wrap_original regardless of whether any_instance is in play. I've never actually used receive_message_chain, so I'm not super worried about it personally, but I wanted to flag it as another area where and_wrap_original probably won't work correctly yet.
I'll work on improving the specs for this PR. Thanks for the feedback and suggested approach.

OK, I pushed an updated version that uses shared examples to apply all of the specs with and without any_instance. I'm not sure about the naming though—I never really know what to call shared example groups. Let me know if you want any changes on that front.

Thanks, @rf-.  This is great.  I left one naming suggestion but otherwise I think we are ready to merge this.

OK, just pushed a version using allow_it.

Merged.  Thanks!

No problem, thanks for the quick merge.


fix: disable CGO when building on Fedora to avoid linking issues on the Ubuntu-based image (#2140)

Disable CGO when building on Fedora to avoid linking issues on the Ubuntu based image (#2140)

Release Note
fix linking issues when building on Fedora

Cool, do we need CGO in non-fedora?
Btw, the released kamel is usually built on my Fedora laptop (never at latest version)

I believe this might be a problem when/if we start building Camel K on any system that uses glibc 2.32 or newer. The reason is that on 2.32 they moved some of the pthread_*sigmask symbols from libpthread to libc. Therefore any binary built against 2.32, that uses pthread_* symbols won't work on older versions. The opposite is not true, though.
This is the kamel released:
objdump -T kamel | grep pthread
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_mutex_lock
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.3.2 pthread_cond_wait
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_mutex_unlock
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.3.2 pthread_cond_broadcast
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_create
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_detach
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_attr_init
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_attr_getstacksize
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_attr_destroy
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_sigmask

This is the one built on Fedora 32 (:
objdump -T kamel| grep pthread
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_mutex_lock
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.3.2 pthread_cond_wait
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_mutex_unlock
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.3.2 pthread_cond_broadcast
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_create
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_detach
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_attr_init
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_attr_getstacksize
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_attr_destroy
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.32  pthread_sigmask

So, I am guessing it may be a problem on any/most of the distros where the ABI is incompatible so crossing these version boundaries may be problematic.

My understanding is that the Kamel binary added to the operator image should be built on the image OS. I think that the current approach, that is to build the kamel binary locally, and add it to the operator image, is either an heritage of how the operator SDK scaffolded the project at its creation, or a convenient way to re-use the binary that is also used for the client CLI. We already cross-compiled the binary, which deactivates CGO, when it's built on non Linux OS.
It seems a possible solution would be to refactor the Dockerfile, and use a build stage to compile the binary on the same OS as the final image.

My understanding is that the Kamel binary added to the operator image should be built on the image OS. I think that the current approach, that is to build the kamel binary locally, and add it to the operator image, is either an heritage of how the operator SDK scaffolded the project at its creation, or a convenient way to re-use the binary that is also used for the client CLI. We already cross-compiled the binary, which deactivates CGO, when it's built on non Linux OS.
It seems a possible solution would be to refactor the Dockerfile, and use a build stage to compile the binary on the same OS as the final image.

Compiling it on the same image could solve the problem, indeed. However there's one thing that concerns me with this approach: it makes it harder for distribution packagers and downstream users building and productizing this. This is specially true on environments with secluded internet access, where the dependencies may not be available at build time. Thus forcing the users/packagers to go through the work of copying previously cached dependencies into the build stage and dealing with all the downsides of doing that.

However it's done (multi-stage build, vendoring, Go proxy), I think packaging a binary built against the runtime image it will be the executed on, is more robust, and worth the possible extra efforts.

However it's done (multi-stage build, vendoring, Go proxy), I think packaging a binary built against the runtime image it will be the executed on, is more robust, and worth the possible extra efforts.

I think it's worth mentioning that this affects not just the operator, but the CLI client as well. As I pointed with the CLI client that is available on the release page: if you are building the kamel CLI on any system that is based on glibc 2.32, you are eventually going to have this problem. It is not the case yet because @nicolaferraro is using an older Fedora version, but eventually it might be.

Right. I think that's a bit different for client binaries, as probably Mac OS and Windows ones are cross-compiled, which disable CGO as far as a know. So it's probably fine disabling it for Linux client binary. That leads to the question, why disabling it only for Fedora?
And does it necessarily imply it should be done for the operator binary, for which it's possible to guarantee compatibility with its container image?

Right. I think that's a bit different for client binaries, as probably Mac OS and Windows ones are cross-compiled, which disable CGO as far as a know. So it's probably fine disabling it for Linux client binary. That leads to the question, why disabling it only for Fedora?

I think it might be safe to disable it for any Linux system regardless of OS and I can adjust the PR accordingly. Fedora was just the one that I could reproduce the issue. I am not sure how many others distros have upgraded to 2.32 already, but I guess this is likely to become more common with newer distributions.

And does it necessarily imply it should be done for the operator binary, for which it's possible to guarantee compatibility with its container image?

Yes if you are building on Linux: https://github.com/apache/camel-k/blob/2ac21c46494cceb075c36b2c1df50c3347013c45/script/Makefile#L238-L246

FYI, I modified it to disable CGO on any Linux system.

OK, hopefully the operator won't be affected by not using any of the // +build cgo packages from the Go stdlib, which is probably the reason the binary was dynamically linked.

Hm, maybe let's wait, then? Although there is a problem that affects both the CLI and operator, if the solution may cause unforeseen problems ... then that's not ideal. I think the CGO think would work OK for the CLI, but the container may be a different problem indeed. I'll ping you to brainstorm this tomorrow.

Totally agree. I'd like to make sure we understand the impacts for the operator. That's the reason I proposed to consider building it against its container image.

@astefanutti and I talked today about this PR and it seems we have sufficient information to believe the change is safe. I am writing a summary of these, so we can understand the reasoning if the PR turns out to be broken.

It seems that the only dynamic symbols required by the binary are either glibc or golang-specific:

DYNAMIC SYMBOL TABLE:
000000000061fda0 g    DF .text<PHONE_NUMBER>000050  Base        _cgo_panic
0000000000472280 g    DF .text<PHONE_NUMBER>000019  Base        _cgo_topofstack
000000000061fe00 g    DF .text<PHONE_NUMBER>00005a  Base        crosscall2
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 __errno_location
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 getnameinfo
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 getaddrinfo
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 freeaddrinfo
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 gai_strerror
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 malloc
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 free
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 getgrgid_r
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 getgrnam_r
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 getpwnam_r
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 getpwuid_r
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 realloc
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 sysconf
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 getgrouplist
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 stderr
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 fwrite
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 vfprintf
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 fputc
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 abort
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_mutex_lock
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.3.2 pthread_cond_wait
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_mutex_unlock
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.3.2 pthread_cond_broadcast
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_create
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 nanosleep
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_detach
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 strerror
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 fprintf
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_attr_init
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_attr_getstacksize
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 pthread_attr_destroy
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 sigfillset
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.32  pthread_sigmask
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 mmap
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 munmap
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 setenv
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 unsetenv
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 sigemptyset
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 sigaddset
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 sigaction
0000000000000000      DO *UND*<PHONE_NUMBER>000000  GLIBC_2.2.5 sigismember

Cross-compiling the Linux binary on a mac results on a statically linked executable similar to the one generated by this patch.
There are two packages that rely on cgo and for both there are pure go implementations that are used as fallback when cgo is disabled or not available:

3.1 The first one is os/user for which the documentation says: " ... For most Unix systems, this package has two internal implementations of resolving user and group ids to names. One is written in pure Go and parses /etc/passwd and /etc/group. The other is cgo-based and relies on the standard C library (libc) routines such as getpwuid_r and getgrnam_r ...  When cgo is available, cgo-based (libc-backed) code is used by default. This can be overridden by using osusergo build tag, which enforces the pure Go implementation ... "
3.2 The second is the resolver on the net package. In this package the documentation states: _"...  On Unix systems, the resolver has two options for resolving names. It can use a pure Go resolver that sends DNS requests directly to the servers listed in /etc/resolv.conf, or it can use a cgo-based resolver that calls C library routines such as getaddrinfo and getnameinfo.
By default the pure Go resolver is used, because a blocked DNS request consumes only a goroutine, while a blocked C call consumes an operating system thread. When cgo is available, the cgo-based resolver is used instead under a variety of conditions: on systems that do not let programs make direct DNS requests (OS X), when the LOCALDOMAIN environment variable is present (even if empty), when the RES_OPTIONS or HOSTALIASES environment variable is non-empty, when the ASR_CONFIG environment variable is non-empty (OpenBSD only), when /etc/resolv.conf or /etc/nsswitch.conf specify the use of features that the Go resolver does not implement, and when the name being looked up ends in .local or is an mDNS name ..."_

The patch is trivial do revert if there is any problem.

So, given these findings, we agreed it would be reasonably safe to do this change.


CommitData: preprocess data in Hardware, submit with InstrCommit

We use physical Register WriteBack for loadEvent and MMIO access, and record commit Data in Commit Instr Trace. As there are multiple DUT buffer in software side, WriteBacks transferred and used may not in same cycle, so we buffer corresponding wb data until instrCommit.
As writeBacks only used in get_commit_data, and comes from int/vec/fp, we preprocess commitData in hardware side, and submit along with InstrCommit. This change will fix error of fpWriteBacks, and also help simplify logic of Load Squash.

After this change, Dual-core difftest reach 14.88 KHz with config "ZEN". Seems still some bug of Squash feature, likely related to loadEvent. I will try to fix that based on this change.


cross build publish 0.5.0

Hi!
Great job and thankyou for building this:)
I'm building against scala 2.13x but even though doc says there's a build for 2.13, it hasn't actually been published to Maven Central.
While I have cloned and done sbt +publishLocal, I'm sure many devs would like to see it publicly released.
Thanks Again!

Hi @tculshaw, thank you for reporting.
When I tried to publish this library, I have encountered some problem related to maven central.
Now I'm shooting this trouble.
Please wait for being published.
Thanks.


The property 'Authority' cannot be found on this object.

Hi,
With version <IP_ADDRESS> I was able to run this without any issues
Get-MsalToken -TenantId $TenantId -ClientId $ClientId -Scopes "User.ReadWrite.All","Directory.ReadWrite.All" -UserCredential $Credentials
but with the release <IP_ADDRESS> I get suddenly this error:
**_The property 'Authority' cannot be found on this object. Verify that the property exists.
At C:\Program Files\WindowsPowerShell\Modules\MSAL.PS\<IP_ADDRESS>\Get-MsalToken.ps1:338 char:38

... TenantId) { [void] $AquireTokenParameters.WithAuthority(('https://{0} ...

            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : NotSpecified: (:) [], PropertyNotFoundException
FullyQualifiedErrorId : PropertyNotFoundStrict_**

The ClientID is that of Microsoft Graph PowerShell (14d82eec-204b-4c2f-b7e8-296a70dab67e), and credentials are captured with Get-Credential.
I did the test within the same PS Session, same variables, simply changing the modules with -RequiredVersion during the import and I get to the error.
My Credential is a federated user identity.
Thanks for your feedback
Sincerely,
Tonino Bruno
ENGIE SA

If I remove the TenantID switch it work with the latest version (<IP_ADDRESS>), but the same does not work on the <IP_ADDRESS> as I get the following error: Get-MsalToken : AADSTS9001023: The grant type is not supported over the /common or /consumers endpoints. Please use the /organizations or tenant-specific endpoint.
Adding the -TenantID detail should not result in this error I think and feels like a bug...

Hi Hal37,
Had the same issue using this line:
$Token = (Get-MsalToken -ClientId ($Config.ScriptMainConfig.TenantConfig.clientId) -TenantId ($Config.ScriptMainConfig.TenantConfig.tenantId) -ClientCertificate $thumbPrint).AccessToken
To resolve this, while waiting for an answer from Repo's maintainer, I opened the file Get-MsalToken.ps1 in the module folder and just commented the elseif line:
"*" {
                if ($AzureCloudInstance -and $TenantId) { [void] $AquireTokenParameters.WithAuthority($AzureCloudInstance, $TenantId) }
                elseif ($AzureCloudInstance) { [void] $AquireTokenParameters.WithAuthority($AzureCloudInstance, 'common') }
                #elseif ($TenantId) { [void] $AquireTokenParameters.WithAuthority(('https://{0}' -f $ClientApplication.AppConfig.Authority.AuthorityInfo.Host), $TenantId) }
                if ($Authority) { [void] $AquireTokenParameters.WithAuthority($Authority.AbsoluteUri) }

+1 Same for me. (Context: Internal Microsoft / Office tooling) Goods news: I'm the only one on my team reproing this so far. Bad news: This is a pretty blocking issue for me - reproing across accounts, machines, and scenarios.

Ok, digging further, it looks like there was a change to the Microsoft.Identity.Client package that modified the members of ClientApplicationBase to put an Authority member and nest the existing AuthorityInfo member under that. Check your installed version using Get-Package Microsoft.Identity.Client. I had 4.16.0 installed and encountered this same error.

We need to get this module updated in such a way that it ensures that a version of Microsoft.Identity.Client that is compatible is installed.

@HAL377  @EMarcais @abgreg
I was able to fix this by uninstalling any older nuget packages for Microsoft.Identity.Client and then uninstalling and reinstalling the MSAL.PS module.

Interesting... I don't think that I have such a package installed?
PS C:\WINDOWS\system32> Get-Package Microsoft.Identity.Client
Get-Package : No package found for 'Microsoft.Identity.Client'.

Hi,
I tried your suggestion to add those DLL's directly but it did not change on my end... But perhaps I did not load the correct ones?
MSAL.PS\<IP_ADDRESS>\Microsoft.Identity.Client.4.37.0\net45\Microsoft.Identity.Client.dll
MSAL.PS\<IP_ADDRESS>\Microsoft.Identity.Client.Desktop.4.37.0\net461\Microsoft.Identity.Client.Desktop.dll

For those who are able to reproduce this, do you have any profile scripts that auto-run or other modules imported before importing MSAL.PS? MSAL.PS will allow you to use an old version of the dll libraries if they are already imported into the session. This is a common issue with the Az modules. MSAL.PS should prompt you though when this dll conflict occurs allowing you to proceed but warning you that some functionality might not work correctly.

Umm... Seems like github has been updated but PowershellGet hasn't
I replaced line 338 in the module with below and it works for me
elseif ($TenantId) { [void] $AquireTokenParameters.WithAuthority(('https://{0}' -f $ClientApplication.AppConfig.AuthorityInfo.Host), $TenantId) }

https://github.com/ioamnesia/MSAL.PS/commit/abdea2b61f147273466ed3015dcded893ee7acdc

Got the same problem in my script. The reason was ExchangeOnlineManagement module. One of its cmdlet was called before Get-MsalToken  therefore the MSAL.PS module was not imported as first.
I had to explictly put Import-Module MSAL.PS at the top of file (or just before using any other cmdlet which could load different module).

I too ran into the issue with the collision of ExchangeOnlineManagement and Get-MSALToken.  The simple solution was to use Get-MSALToken in a fresh PowerShell session.

The same issue also exist using MSAL.PS with the MicrosoftTeams module.
At the moment I'm using version <IP_ADDRESS> of MSAL.PS without issue, but new version does not work.
I'm using MSAL with SP and a AAD user for delegated permissions.
In a fresh powershell session i need to run:
Import-Module MSAL.PS -MaximumVersion <IP_ADDRESS> -ErrorAction Continue -ErrorVariable oErr -Verbose:$false
if($oErr)
{
    Write-Error -Message "Failed to import supporten module version of: MSAL.PS" -ErrorAction Stop
}

Import-Module MicrosoftTeams -MaximumVersion 3.0.0 -ErrorAction Continue -ErrorVariable oErr -Verbose:$false
if($oErr)
{
    Write-Error -Message "Failed to import supporten module version of: MicrosoftTeams" -ErrorAction Stop
}

I added the following code instead on line 338, and this seems to do the trick with object structure conflicts.
elseif ($TenantId) {
	if( Get-Member -InputObject $ClientApplication.AppConfig -Name "AuthorityInfo" -MemberType Properties )
	{
		[void] $AquireTokenParameters.WithAuthority(('https://{0}' -f $ClientApplication.AppConfig.AuthorityInfo.Host), $TenantId)
	}
	else
	{
		[void] $AquireTokenParameters.WithAuthority(('https://{0}' -f $ClientApplication.AppConfig.Authority.AuthorityInfo.Host), $TenantId)
	}
}

Could it be related to assembly dependency conflicts?

https://docs.microsoft.com/en-us/powershell/scripting/dev-cross-plat/resolving-dependency-conflicts?view=powershell-7.2
https://github.com/PowerShell/PowerShell/issues/2083

I was checking out MSAL.PS today for replacing following code for generating access token with app id and secret only:
Might be helpful for others in same situation. Until MSAL.PS get's up and running again.
# Settings
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12

# Assets
$AppRegistration = [pscredential](Get-Credential -Message 'App Id and secret')
$TenantInitialDomain = [string] '<your_initial_domain>.onmicrosoft.com'
$TenantId = [string](
    (Invoke-RestMethod -Uri ('https://login.microsoftonline.com/{0}/.well-known/openid-configuration'-f$TenantInitialDomain) -Method 'Get').'userinfo_endpoint'.Split('/')[3]
)
$Body = [hashtable]@{
    'client_id'     = $AppRegistration.'Username'
    'client_secret' = $AppRegistration.GetNetworkCredential().'Password'
    'scope'         = 'https://graph.microsoft.com/.default'
    'grant_type'    = 'client_credentials'
}

# Get access token
$AccessToken = Invoke-RestMethod -Method 'Post' ('https://login.microsoftonline.com/{0}/oauth2/v2.0/token' -f $TenantId) -Body $Body

# Example use - Connect with Microsoft.Graph.Authentication
$null = Connect-MgGraph -ContextScope 'Process' -AccessToken $AccessToken.'access_token'

I'm running MSAL.PS in one location for both 5.1 and 7.2.
Usually when the error crops up is when I switch between the runtimes, though have not spent to much time understanding where the problem comes from.
I did a debug through VSCode and saw that the $ClientApplication substructure was a bit different when it errors out.
Guess that might be because different Microsoft.Identity.Client.dll are loaded into 5.1 and 7.2.
Compensating for the object structure difference, I did not get any other errors and the token was received as expected.

@mortenlerudjordet your post as of 9 days ago (Mar-12?) looks like a good work around.
@jasoth / @apurvghai : do you know what the release process for this project is?

On the off chance is anyone having this issue after importing Graph modules? I just discovered that I get this error if I run any of the following commands before running Get-MSALToken. I'm assuming it's going to be any Graph modules though.
Select-MgProfile -Name "beta"
Import-Module Microsoft.Graph.Users
Import-Module Microsoft.Graph.Identity.Signins
Import-Module Microsoft.Graph.Authentication
If I run the Get-MSALToken before importing the other modules, I don't get the error.

@agrecaBAS, I import MSAL before graph and that seems to not give me the error

This error and numerous others can happen when the DLLs included with MSAL.PS cannot be loaded due to a conflict with another DLL loaded in the current PowerShell session, often from another module like Azure or Exchange Online Admin Shell.
You should see the following prompt during import when this occurs and as the message indicates, "Some module functionality will not work."
Ignore assembly conflict and continue importing module?
Some module functionality will not work.
[Y] Yes  [N] No  [?] Help (default is "N"):

As a workaround, I would suggest ensuring that the MSAL.PS module is loaded into the PowerShell session first before any other modules. There is a fix to this but it would require significant rework of the MSAL.PS module in C# so no guarantee this will be addressed anytime soon, if ever.

I was checking out MSAL.PS today for replacing following code for generating access token with app id and secret only:
[....]
But got the "The property 'Authority' cannot be found on this object" error. I added the code here as it might be helpful for others in same situation. Until MSAL.PS get's up and running again.

Can you explain why you care about MSAL.PS if the workaround code in your comment does the job required?
$AppID = ...
$AppSecret = ...
$TenantID = ...
$Body = [hashtable]@{
    'client_id'     = $AppID
    'client_secret' = $AppSecret
    'scope'         = 'https://graph.microsoft.com/.default'
    'grant_type'    = 'client_credentials'
}
$AccessToken = Invoke-RestMethod -Method 'Post' `
  ('https://login.microsoftonline.com/{0}/oauth2/v2.0/token' `
  -f $TenantId) -Body $Body

# Connect with Microsoft.Graph.Authentication
Connect-MgGraph -AccessToken $AccessToken.'access_token'

This works, and I don't need to load any additional modules. I have no idea what is "wrong" with doing this vs using Get-MsalToken..

@DMahalko
Because 1) IMO this functionality should work in such a module, and 2) I'd rather update an module than code.

I know this thread has been closed for a while, but installing the module first thing was an unreliable fix due to my environment. Adding a "-AzureCloudInstance 1" to the function call fixed it.
So my code became:
Get-MsalToken -ClientId $ClientId -TenantId $TenantId -ClientSecret $ClientSecret -AzureCloudInstance 1
Here is a link to how the AzureCloudInstance parameter works. It's in C# but it translates to PowerShell too.

I know this thread has been closed for a while, but installing the module first thing was an unreliable fix due to my environment. Adding a "-AzureCloudInstance 1" to the function call fixed it.
So my code became: Get-MsalToken -ClientId $ClientId -TenantId $TenantId -ClientSecret $ClientSecret -AzureCloudInstance 1
Here is a link to how the AzureCloudInstance parameter works. It's in C# but it translates to PowerShell too.

 This worked for me as well. Thank you.


Make ebpf exporter to support CORE

This PR is for ebpf exporter to support CORE.
This can make ebpf exporter to get CORE benefits and tolerate kernel changes.
I'd believe that there are more things need to do with this so please share your suggestions. Thanks.

@bobrik Can you help to take a look?

There are lots of changes here and many of them are unrelated:

Removed comments that still apply (starting with Dockerfile)
Inconsistent indentation in C files
Either missing or multiple newlines at the end of files
Broken Go formatting, even on the lines you didn't really change
Error strings starting with capital letters (only log lines should)
Functions like tableValues moved around and generating large diff with no logical changes

Could you take care of this first to make it easier to look at the actual changes?
There are SPDX headers for LGPL, I'll need to ask legal people whether we can accept it.
I would also like to see some documentation in the README on how to use this.

@bobrik Thanks for the suggestion. I will take care of them.
After move to CORE mode,  BCC related will be removed,  so I raised this PR for your to review first. Move from BCC to CORE is a right direction, but need your agreement with this.
Thanks again.

How to run ebpf_exporter with CORE mode?

Run make to have generate the image directly.
Run the image with with configuration like:

        - --web.listen-address=:10678
        - --config.file=/examples/CORE/config.yaml

@bobrik  I addressed some comments today but not finished all of these, will continue to do this tomorrow.
Thanks .

Due to not wanting to install Docker on all machines I intend to run ebpf_exporter on I tried to build on Bullseye vm as well. When running "./scripts/build-deb.sh release" I got:
dpkg-checkbuilddeps: error: Unmet build dependencies: python-netaddr

When trying to install python-netaddr:

root@rob-bullseye:~/bcc# apt-get install -y python-netaddr
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-netaddr is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-netaddr
E: Package 'python-netaddr' has no installation candidate
Installing python3-netaddr works fine on Bullseye, but that doesn't address the dependency issue.

@rob-scheepens, I think bcc build script checks out HEAD, so you need to commit your change to apply it.
Not sure how it's related to CO-RE.

@bobrik : Using the Dockerfile from https://github.com/wenlxie/ebpf_exporter/blob/upstream.master.core/Dockerfile I attempted to convert this to commands that can be scripted and run on a Debian Bullseye vm. All commands for now assume the user is root.
export PATH="/usr/lib/go-1.17/bin:$PATH"
export DEBIAN_FRONTEND=noninteractive
export LD_LIBRARY_PATH=/lib64

echo 'deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free' >> /etc/apt/sources.list.d/backports.list

sed -i "s/bullseye main/bullseye main non-free/" /etc/apt/sources.list

apt-get update

apt-get --no-install-recommends install -y sudo devscripts build-essential fakeroot pbuilder aptitude git openssh-client ca-certificates git pkg-config libelf-dev libz-dev software-properties-common clang gnupg python3-netaddr pkg-config libz-dev software-properties-common bpftool python2 python3 dh-python libclang-9-dev libclang-common-9-dev libclang-cpp9 libclang1-9 libllvm9 llvm-9 llvm-9-dev llvm-9-runtime llvm-9-tools netperf python3-pyroute2 clang-format bison flex libfl-dev libedit-dev arping iperf ethtool python3 python3-doc python3-tk python3-venv python3.9-venv python3.9-doc cmake luajit libluajit-5.1-dev debhelper
apt-get install -y -t bullseye-backports golang-1.17 libbpfcc-dev libbpfcc bpfcc-tools

git clone --branch=v0.22.0 --depth=1 https://github.com/iovisor/bcc.git /root/bcc && \
git -C /root/bcc submodule update --init --recursive

git clone https://github.com/libbpf/libbpf.git /root/libbpf && \
cd /root/libbpf && git checkout 030ff87857090ae5c9d74859042d05bfb3b613a2 && cd src && mkdir build root && BUILD_STATIC_ONLY=y OBJDIR=build DESTDIR=root make install
At this point a modification to the debian/control file is needed, see https://github.com/rob-scheepens/bcc/commit/6335995dec421e60298651cb6120d5bec247bd23 and my previous commit on that file, changing python2 dependencies as these do not work on Bullseye anymore. Script to make the changes and commit them (since the build-deb.sh script checks out HEAD):
cd /root/bcc/
git config --global user.email "user@[email.com](http://email.com/)"
git config --global [user.name](http://user.name/) "nutanix"
sed -i "s/python (>= 2.7)/python3/" debian/control
sed -i "s/python-netaddr/python3-netaddr/" debian/control
git add debian/control
git commit -m "python3 changes."
./scripts/build-deb.sh release

git clone https://github.com/wenlxie/ebpf_exporter.git /root/ebpf_exporter
cd /root/ebpf_exporter
git checkout upstream.master.core

This gets me up to the point where I run into the issue described in https://github.com/aquasecurity/libbpfgo/issues/1, where "go install" fails. I am trying to work out what to do about that.

I update the code:

Remove bcc dependency
Add tag support back
Make lib to be static linked
benchmark folder removed because of 1, will add it back

@bobrik  @rob-scheepens
Now the ebpf_exporter is static compiled,  it works well in my env.

@wenlxie : using your latest upstream.master.core I checked again and the script above still works.
When you say "Remove bcc dependency", does that mean that there is no need to have bcc installed/built anymore, and that I can remove it from the script? When I tested that, things failed.

When you say "Remove bcc dependency", does that mean that there is no need to have bcc installed/built anymore, and that I can remove it from the script? When I tested that, things failed.

It means remove the bcc codes from the code/vendor
But it still need the header file in bcc to compile the bpf binary.

Unfortunately, I was not able to build this either with the Dockerfile or in a Debian Bullseye VM with libbpf from backports. Happy to have another look when I can build and run it myself.

@bobrik : can you give it another try using the script I provided for Bullseye?
cc: @wenlxie

I was able to build this locally with some modifications. My plan is to clean this up and see how we can get this merged.
Apologies for the delay.

I was able to build this locally with some modifications. My plan is to clean this up and see how we can get this merged.
Apologies for the delay.

@bobrik Thanks for the test,  please tell me with anything that I can help.

https://github.com/aquasecurity/libbpfgo/pull/258 looks like it could be a good replacement for kaddr (or any argument) passing.
Not sure if we should wait for it though.

Many thanks @wenlxie! I'll try to roll it out internally to iron any kinks before tagging a proper v2.0.0 release.

It's out now: https://github.com/cloudflare/ebpf_exporter/releases/tag/v2.0.0


Configure NX with npm and dotnet

As a developer,
I want the repository to build npm and dotnet projects,
so I can use a single repository for multiple languages.

The features/3/nx-config branch is far enough along that it’s time to bring it into main. I will rewrite the commits onto main as a self-PR mechanism. Closing this issue as done.


Don't make function parameters required by default

After installing to Visual Studio 2015 Update 2, the functions parameters are now enforced.
Meaning that if I have a function like
var myFunc = function (hello) {};

I must specify the hello value. The solution is to put a ? character at the end of the variable name (e.g. hello?).
But why would you do that? This is so painful and not compatible with javascript standards.
Is there an option to remove this default behaviour?

That's been the behavior in TypeScript all along, it is not new in the latest VS update. TypeScript's purpose is to catch mistakes, such as passing the wrong number of arguments to a function (a very common one). I'm not quite sure what you're proposing here?

You are correct. I was used to call function from anonymous objects but it apparently does not work the same if the function is a variable.
var t : any = {};
t.funct = function(param) {

}
t(); // Works

I would personally prefer that the user that a parameter is required instead of the opposite (specifying that  a parameter is optional). But I guess one of the typescript goal is to catch mistakes.
Thank you for your help.


Only count speakers with at least one talk on dashboard speaker count

Resolves #1197

Just as a heads up, it looks like you've got merge conflict stuff in resources/views/reviewer/index.twig

I thought I fixed that stuff, dangit. One sec.

Fixed.


Receipt not rendering under pending expenses

Mail from Brittani:

When I'm looking at Atlanta's Open Collective and click under pending expenses, I cannot find the receipt for that expense.  https://opencollective.com/wwcodeatl
It looks like when I click view all expenses, the receipt does show.

closing this, it's referenced in https://github.com/opencollective/opencollective/issues/431