Improve Debugging: Connectivity, Asset errors, and Server Options

If the app is started with debug=True, there are two instances of the app created. You'll see the server start, then another version will restart just afterwards.
Issue 1
I was seeing a lot of DEBUG Starting new HTTP connection and still am not sure where that is coming from or expected, like this Starting new HTTP connection (1): <IP_ADDRESS>:80. It appears this happens each time we send data, but it seems like an existing connection should be able to be reused if available. However, not seeing where this is happening, I'm not sure. This could be expected behavior, but wanted to check.
Issue 2
I then switched to MQTT, which is what I thought I was using, but must have lost that setting at some point. With MQTT, I was getting tons and tons of messages about the subscription being setup in the on_connect method.
2023-09-11 13:47:34 INFO Backend: Subscriptions to the rover MQTT topics succsessfull
2023-09-11 13:47:35 INFO Backend: Subscriptions to the rover MQTT topics succsessfull

I found references to this issue occurring when you have multiple clients with the same client_id. I confirmed this by adding an on_disconnect method and printing out the disconnect code. Sure enough, it was code 7, which means duplicate client ids. They suggested randomizing the client_id to avoid this issue. What is happening is when debugging a client is created with a 60 second keep alive, then another just after it. Both clients exist and disconnect and reconnect over and over.
The solution is something like this in mqttcomm.py, in the connect_mqtt method, then setting client_id like this:
def connect_mqtt(connect_data: dict()) -> mqtt:
    client_id = connect_data['MQTT'][0]['CLIENT_ID'] + '-' + str(datetime.datetime.now().second)
    username = connect_data['MQTT'][1]['USERNAME']
    password = connect_data['MQTT'][2]['PASSWORD']
    mqtt_server = connect_data['MQTT'][3]['MQTT_SERVER']
    port = connect_data['MQTT'][4]['PORT']
    def on_connect(client, userdata, flags, rc):
        if rc == 0:
            logger.info('Backend: Subscriptions to the rover MQTT topics succsessfull')
        else:
            client.connection_flag = False
            logger.warning('Backend: MQTT connection to the rover lost. Code: '+str(rc))

    def on_disconnect(client, userdata, rc):
        logger.warning('MQTT disconnect: Code: ' + str(rc))

Issue 3
To set break points so that I could step through and debug this issue, I'm using visual studio code to run the app. When debugging with visual studio code, I used this launch configuration. It tells it to use the selected interpreter and to run the app.py file from the CaSSAndRA directory underneath the project/workspace directory. This ran fine, but I found that the assets path code is using a relative path and that doesn't work with this setup.
        {
            "name": "App",
            "type": "python",
            "request": "launch",
            "program": "app.py",
            "console": "integratedTerminal",
            "justMyCode": true,
            "cwd": "${workspaceFolder}/CaSSAndRA/",
            "python": "${command:python.interpreterPath}"
        }

The change required in app.py is the following:
assets_path = os.path.abspath(os.path.dirname(__file__)) +'/src/assets'

One additional improvement I've been meaning to look into for debugging is removing the commented debug=True parameter in the app.py file and moving that into a command line parameter. This would avoid dirtying up the work environment with another change that isn't something we'd commit. I'm just not sure how easy it is to do this with a flask app.
These options also could be captured in run configurations in visual studio code or something like that, so they are easy for others to use.

It looks like this is how we could pass in any of the supported options. Technically, these environment variables would get used with a simple app.run_server() call, but this approach would allow us to manage the default options if wanted.
I'm fine removing all the run_server inputs and just configuring via env variables, since this approach also works well with docker.
Example:
    # get run settings from env, otherwise use our defined defaults
    host = os.environ.get('HOST', '<IP_ADDRESS>')
    port = os.environ.get('PORT', 8050)
    debug = os.environ.get('DEBUG', False)
    props_check = os.environ.get('DASH_PROPS_CHECK', False)

    app.run_server(host=host, port=port, debug=debug, dev_tools_props_check=props_check)

This dash reference shows the env variables for each option available to run_server.

Issue 1
I was seeing a lot of DEBUG Starting new HTTP connection and still am not sure where that is coming from or expected, like this Starting new HTTP connection (1): <IP_ADDRESS>:80. It appears this happens each time we send data, but it seems like an existing connection should be able to be reused if available. However, not seeing where this is happening, I'm not sure. This could be expected behavior, but wanted to check.

I'm not sure anymore, but if I remember correctly it is a normal behavior of POST request, at least with the used library. I have to double check that.

Issue 2
I then switched to MQTT, which is what I thought I was using, but must have lost that setting at some point. With MQTT, I was getting tons and tons of messages about the subscription being setup in the on_connect method.

Is that a problem on a productive system or just in debug case?

The change required in app.py is the following:
assets_path = os.path.abspath(os.path.dirname(file)) +'/src/assets'

I have tons of relative path calls, should it be changed too to absolute path call?

I'm not sure anymore, but if I remember correctly it is a normal behavior of POST request, at least with the used library. I have to double check that.

That was what I was curious about. I think you are using requests from what I've seen. I believe with requests you can reuse a session, but requires a little bit of managing it. You essentially are creating a session, then using a method on that session to make the http call. However, you do need to handle when the session isn't valid anymore and create a new one in that case. I'm not sure how many people are using the http method of connecting, but thought it was worth highlighting.

Is that a problem on a productive system or just in debug case?

It is much more likely when debugging, but from what I can tell makes running the app in debug mode (hot reloading, etc) using mqtt impossible. I have seen it once or twice when not debugging if I kill the server then start it again quickly. So, it would be possible I think in a production environment to have this issue, depending on how the app is started or restarted.
For example, I'm working on a branch at the moment to make docker more usable. One thing that is nice about tools that manage docker containers is that many will have a button to update the app. If you do that, they tell the app to gracefully shutdown, pull the new image, then start the app all with one click. I think this issue would occur in that case as well.
Separately, I found a number of references about using the paho mqtt library where they specifically say you do not want to use fixed name client ids. It just opens up the app for issues when encountering edge cases like this that can easily be avoided.
I'm going to take care of this change in the docker/debugging branch I'm currently working through

I have tons of relative path calls, should it be changed too to absolute path call?

I've been working through how the paths are handled in the app overall to understand it a bit better. I'm going to update all these instances anyways so that docker is better supported and I think it'll improve the entire workflow of updating the app for everyone. Relative paths aren't necessarily bad, as long as they are used carefully. I'll be taking care of this in my changes.
Besides the one example I called out, the approach that I see that I'm working on at the moment is removing the assumption from the app that the data folder is always relative to the backend folder. It isn't using relative paths specifically, but is making assumptions about where the data folder is located. Instead, I'm exposing optional arguments so that we can start the app with an external data folder, a different port, or different debug settings without editing any files.
In general, the approach of structuring apps to work well with docker helps separate your runtime app data and app configuration from the application itself.


Trigger "waveform-ready" event whenever waveform peaks are drawn (improvements on #2034)

Short description of changes:
This PR builds on the work of @marizuccara in https://github.com/katspaugh/wavesurfer.js/pull/2034:

Trigger waveform-ready event when provided peaks are drawn and backend is of type of MediaElement or MediaElementWebAudio.
This event becomes useful especially if the audio resource provided is an url and the preload attribute is of type none, because in this case the ready event is triggered only after the audio starts playing (canplay),

The two changes I have added are:

Fixing the load ArrayBuffer response test.
Firing the ready event in one additional code path, as discussed with @thijstriemstra and @sundayz here. I opted to fire the existing ready event in another circumstance, rather than create a new event, as there did not seem to be a consensus one way or the other.

Related Issues and other PRs:
fixes #2031
PR: #1990

Coverage increased (+1.7%) to 82.518% when pulling 0791b13f1356273dd1e43b396c37a5cc05781cfe on npr:master into a33cea854c232593d97ed0527a52a40187d060dd on katspaugh:master.

Okay, so now waveform-ready event is triggered not only for the MediaElement backend but for both backends, when the waveform is drawn. Okay, it is a consistent solution. I approve it!

can you also merge this branch forward so we can verify the change using travis?

can you also merge this branch forward so we can verify the change using travis?

I've done so, taking a look at failing test shortly...

taking a look at failing test shortly...

fetchFile uses callbacks.

ping @bwestergard

Apologies, @thijstriemstra, other work took priority. I'll fix this on Monday.

Okay @thijstriemstra. I think this is ready to go. All karma tests are passing locally for me on both browsers. I removed this assertion because I can't quite see the purpose of it. If it is kept, it seems the fetchFile utility fails to use same-origin even when the option is explicitly passed in. This is an issue with the fetchFile implementation.


Logger & Splunk installation

Operating System Version:  Windows 10
Deploying via (VirtualBox/VMWare/AWS/Azure/ESXi):  VirtualBox
Vagrant Version (if applicable):

Managing splunk on the logger machine from the command line is an issue. Using sudo ./splunk restart successfully restarts splunk, however during the building process of the logger box the script logger_bootstrap.sh file tries to create the tcp listener for the splunk universal forwarder on TCP port 9997, this appears to have failed because the splunk gui doesn't show that port being configured.  This entry should be located here /opt/splunk/etc/system/local.  Manually executing the  command  echo -e "[splunktcp://9997]\nconnection_host = ip" >/opt/splunk/etc/apps/search/local/inputs.conf from a shell into the logger box also fails in both locations.  Reviewing the file  /opt/splunk/etc/apps/search/local/inputs.conf  with vi shows the entry does exist, changes can't be saved due to permissions, but it should be located here /opt/splunk/etc/system/local/inputs.conf instead.  Without that a TCP port being configured in the proper location, communications with the splunk universal  forwarder won't work.   This is confirmed by not seeing any clients defined under forwarder management in the splunk gui.  Based on the permissions shown in putty for the splunk folders, they are owned by the user splunk which is not a user in Ubuntu.  Does anyone  have any insight into this?   How is the WEF server communicating with the logger server using the universal forwarder?

this appears to have failed because the splunk gui doesn't show that port being configured.

Inputs  and other things configured via Splunk .conf files don't always show up in the GUI. You can if the input is active with:
nc -v localhost 9997

Is the wef server a deployment client that can be managed/controlled by the logger machine - splunk deployment server?

@oasec1 WEF is managed via subscriptions on the WEF host in the form of XML files. Here's some recommended reading on it:
https://blog.palantir.com/windows-event-forwarding-for-network-defense-cb208d5ff86f
https://github.com/palantir/windows-event-forwarding


cotp: 1.1.0 -> 1.2.1

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/replydev/cotp/releases.
meta.description for cotp is: Trustworthy, encrypted, command-line TOTP/HOTP authenticator app with import functionality
meta.homepage for cotp is: https://github.com/replydev/cotp
Updates performed

Rust version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.2.1 with grep in /nix/store/8r3z00ik41klnv9fnh00bnchzspmi98k-cotp

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
cotp

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/8r3z00ik41klnv9fnh00bnchzspmi98k-cotp \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A cotp https://github.com/r-ryantm/nixpkgs/archive/f1215fc09a42c7d39492469c177d86a1d46222e6.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/8r3z00ik41klnv9fnh00bnchzspmi98k-cotp
ls -la /nix/store/8r3z00ik41klnv9fnh00bnchzspmi98k-cotp/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

cotp

Maintainer pings
cc @davsanchez for testing.

Thanks @wegank ! Wasn't able to get to this yesterday.


BUILD A QUIZ APP

@Ayushparikh-code Can I work on this issue please?

@Ayushparikh-code Can I work on this issue please?

ok

I would like to work on this issue

@Ayushparikh-code  Please assign me, I have completed my other two issues :)

I would like to work on this issue

assigned u for this ✔👍

@Ayushparikh-code But I though you'll assign me the issue. You have said okay, when I asked you to assign me the issue. I've finished building this project too.

@Ayushparikh-code But I though you'll assign me the issue. You have said okay, when I asked you to assign me the issue. I've finished building this project too.

ok no problem u can build it by creating a separate issue for that because this issue is already to @arnav1776 hence merging pr closed this issue !


Fix votes query

Fixes #118

 Query for votes fail on certain queries

@bonustrack here without spaces.settings everything just works fine, we get the space data anyway because space is a foriegn key

Make sure it doesnt break space loading for vote

@bonustrack Please feel free to merge this :P


Log

Support

highest priority :100:

Am working on this on a logged_axis branch. Challenging because we need to also reset the xaxp or yaxp if y or x is logged.

gs <- gsplot() %>%
    lines(c(1,3,4,20),c(1,2,3,4),log='x')
gs

but I am hardcoding the xaxp reset manually right now until I can figure it out.


[WIP] Fix Issue 2283

Description
change peer REST port from 5000 to 7050 to avoid conflict with UPnP on Windows. Also reassigned all other ports as follows:
7050 REST
7051 peer gRPC
7052 peer CLI
7053 peer events
7054 eCAP
7055 eCAA
7056 tCAP
7057 tCAA
7058 tlsCAP
7059 tlsCAA
NOTE: when this PR lands, it will require people to rebuild their Vagrant development environment(s), so we will want to make an announcement.
Motivation and Context

Fixes #2283
Also @bcbrock recommended that we eventually seek a block of ports from IANA. We should hold off on that until we sort out Consensus next.
How Has This Been Tested?

ran all tests
Checklist:

[x] I have added a Signed-off-by.
[x] I have either added documentation to cover my changes or this change requires no new documentation.
[x] I have either added unit tests to cover my changes or this change requires no new tests.
[x] I have run golint and have fixed valid warnings in code I have added or modified. This tool generates false positives so you may choose to ignore some warnings. The goal is clean, consistent, and readable code.

Signed-off-by: Christopher Ferris<EMAIL_ADDRESS>

@christo4ferris Is it time for us to apply for official ports from IANA? I believe we could apply for a range of several numbers and then define them later as needed.
Note that port 5075 is assigned to an "Experimental Physics and Industrial Control System" so it is probably a safe choice. However there are also many ports in the 5000 range that are not assigned.
See: https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv

I didn't check IANA, but we certainly could do that. There's a sizable block here 7041-7069. I think that we use five presently. What is less clear is that we can simply reserve a block. There are some fairly rigorous rules. What is also unclear to me is why we need so many ports. Seems like the fewer ports we need to expose the better.

I see that 5075 is also claimed to be used by some Skype product: https://technet.microsoft.com/en-us/library/gg398833.aspx
You are right that we use 5: gRPC, HTTP (REST), Profiling, CLI, and events. 5 ports is not unheard of for one service (see ports 5985-5990). X-windows reserves a block of 64.
If an "Experimental Physics and Industrial Control System" can get a port, then I would think that the "Cobol of the 21st Century" should be able to get a few!

On second thought, we should probably wait until at least the next architecture before requesting permanent port assignments. We may end up needing many more than 5.

I can change this to poach the unassigned range above. It was unclear to me why we went to 30k range for membership services and events. @srderson is there some history?

I don't know the history of the membership services port choice. Perhaps @diegomasini may know

I'll be updating with the block I highlighted above soon as the build/tests pass

NOTE: when this PR lands, it will require people to rebuild their Vagrant development environment(s), so we will want to make an announcement.

I think we should aspire to use as few ports as possible.  Collect all GRPC services on one port, and all HTTP services on another.

I don't disagree but Think that should be an independent refactor

I've tested this on Windows and I have not detected any port conflicts. It appears to work out of the box, which is a nice improvement!
I'd be happier if the all tests passed but unfortunately I can't remember the last time that was true on my machine so that's independent...

migrated PR to Gerrit - closing


docs(knapsack): content and properties updated for checkbox

Description

Knapsack documentation updated for checkbox component.
What's included?

Added missing properties from mwc documentation.
Added descriptions for properties.
Added events and document references.

Test Steps

[x] Run 'start' task in NX console for the knapsack folder
[x] Open the localhost url
[x] Navigate to Components/Checkbox

General Tests for Every PR

[x] npm run start still works.
[x] npm run lint passes.
[x] npm run stylelint passes.
[x] npm test passes and code coverage is not lower.
[x] npm run build still works.

Gif

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

v8.6.0
GitHub release

Your semantic-release bot :package::rocket:


Bug: Kernel panic on memory plug

Environment

Steps to reproduce

Expected result

Actual result

Other logs, links

...

@knizhnik created a branch with in-memory cache neondatabase/neon#4891

Should we merge mmap version of the cache and remove our tmpfs hacks?

Yes, once reviewed & passing tests, etc. I'm not familiar enough with C to review it.

This has been mitigated by moving the file cache to disk, but the underlying kernel issue is still present, so: leaving this issue open, but reducing priority.

We recently updated the kernel (#638), and should check whether this issue is now fixed because of it.


REQUEST: BROFORCE ON PORTMASTER

I've got Broforce on steam an it work also on my Chromebook (via linux space)
It's in your projects make a portmaster version?

According to our resident AAA porting dev, since it's Unity, it may be possible but we'll have to see how it performs on mainline Linux distro.  So it may only be eventually possible for support on the RG552 using JelOS since there's much work happening there to add mainline Linux kernel support there.


facing issue in pods

[!] CocoaPods could not find compatible versions for pod "StripePayments":
In Podfile:
stripe-react-native (from ../node_modules/@stripe/stripe-react-native) was resolved to 0.33.0, which depends on
StripePayments (~> 23.16.0)
None of your spec sources contain a spec satisfying the dependency: StripePayments (~> 23.16.0).
You have either:

out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
mistyped the name or version.
not added the source repo that hosts the Podspec to your Podfile.

This helped. https://github.com/stripe/stripe-react-native/issues/1116#issuecomment-1312067936


Current documentation uses pdf-themesdir/pdf-theme which do not work in 1.5.8 (1.5.0.alpha.17.dev)

Hello awesome people,
asciidoc/tor is great.
It took me some time to discover that while this works:
asciidoctor-pdf -a pdf-stylesdir=resources/themes -a pdf-style=basic  file.adoc
this silently fails to load custom pdf template config:
asciidoctor-pdf -a pdf-themesdir=resources/themes -a pdf-theme=basic  file.adoc
-v  provides this not very useful info:
/usr/lib/ruby/vendor_ruby/asciidoctor-pdf/pdf-core_ext/page.rb:23: warning: instance variable @imported_page not initialized
/usr/lib/ruby/vendor_ruby/ttfunk/table.rb:25: warning: instance variable @offset not initialized
/usr/lib/ruby/vendor_ruby/ttfunk/table.rb:25: warning: instance variable @offset not initialized
/usr/lib/ruby/vendor_ruby/ttfunk/table.rb:25: warning: instance variable @offset not initialized
/usr/lib/ruby/vendor_ruby/prawn/font/ttf.rb:117: warning: instance variable @italic_angle not initialized
/usr/lib/ruby/vendor_ruby/ttfunk/table.rb:25: warning: instance variable @offset not initialized
/usr/lib/ruby/vendor_ruby/ttfunk/table.rb:25: warning: instance variable @offset not initialized
/usr/lib/ruby/vendor_ruby/ttfunk/table.rb:25: warning: instance variable @offset not initialized
/usr/lib/ruby/vendor_ruby/prawn/font/ttf.rb:117: warning: instance variable @italic_angle not initialized

Both are listed as acceptable options, but the later skips the custom theming silently. I have seen #1127 so perhaps this will be solved soon and the docs [1] can remain as they are, so just a heads up, as this is default behavior of the Debian asciidoc package:
Asciidoctor PDF 1.5.0.alpha.17.dev using Asciidoctor 1.5.8 [https://asciidoctor.org]
Runtime Environment (ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux-gnu]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
[1] https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc#applying-your-theme

Both will continue to work well into the future. It was renamed to remove the cognitive dissonance, but both get checked (with pdf-theme*) being the preferred name.

Aha. You are simply falling victim to the active development during the transition from alpha to beta. The new names (pdf-themesdir and pdf-theme) were introduced in beta.1. Follow the release notes to stay informed of all the latest changes: https://github.com/asciidoctor/asciidoctor-pdf/releases
If you're still using alpha.17, you'll need to follow the docs from that tag. See https://github.com/asciidoctor/asciidoctor-pdf/blob/v1.5.0.alpha.17/docs/theming-guide.adoc. Once beta.2 is released, all the docs in the master branch will become current.

Clear. Thank you very much!


Add issues template for documentation issues

I would like to add a issues template for documentation issues in this repository. I believe that having a standardised template will help streamline the contribution process, ensuring that all necessary information is included and making it easier for maintainers to review issues.
Could you please assign this issue to me under GSSOC'24.

Go ahead @suhanipaliwal

Hello @suhanipaliwal! Your issue #156 has been closed. Thank you for your contribution!


Padding in Blowfish algorithm

Add Pkcs7 padding in Blowfish.

https://gist.github.com/bitbeans/fb2bf80a47b1af31b07c

Fixed by #16


ie and chrome m3u8 not play video

Hello
This a great video player, I was testing in os x the safari and ios system play correctly.
But ie11 and chrome and Andrews can not use, ts file has successfully loaded, you can help me look?
Broadcast address: http: //www.fengmu.tv/page/16

I think your stream is invalid: http://live.qingshu.me/live/a/fengmu.m3u8
Doesn't play for me in Safari either.

Closing issue for inactivity.


Clappr 0.2.35 VOD HLS issue when used inside iframe

The issue below has been tested on Chrome 48.0.2564.116, Firefox 44.02 and Edge. The issue is only present when using HLS.js and not flashHLS for playback. Various HLS VOD streams have been tested.
You can see clappr is used on the page below and plays the HLS stream fine on all browsers.
http://<IP_ADDRESS>/embed/?key=test&file=PAL25.mp4/PAL25.m3u8&preview=1
However if I embed this page using a iframe it does not play back correctly, with this stream you will see the first play attempt seems to get aborted, the second attempt is succesful. On some streams however the first playback attempt is succesful but playback starts towards the end of the stream, you can see from the screenshot below how it misses out a load of segments.

This issue is only present when embedded in a iframe.
Thanks,
Adam

@its27 please can you see if you have the same issue just with hlsjs itself so we can determine if it's a clappr bug or not?
You could use this as a starter: https://jsbin.com/kimure/edit?html,output

Hi,
HLS.js itself works fine when inside the iframe, it must be clappr related.
http://<IP_ADDRESS>/embed.html
Please let me know if you need anything else from me?
Thanks,

Is this using a newer version of HLS.js than clappr 0.2.35?

I had to remove the HLS.js test link above, I can setup another test if required though.

@its27 it's using one version behind the latest!


JUnit v4.13.1

Upgrade to JUnit v4.13.1

Coverage remained the same at 64.939% when pulling eddb9acb9a8d4cb6161ab5ee95fead26a327d85f on nhojpatrick:junit-4.13.1 into b04d78a6c6bb7a429bfedcee39da34852c5bd7ec on apache:master.


Allow extensions to be compiled from GitHub sources

name: 🎉 New Feature
about: Allow extensions to be compiled from GitHub sources
labels: enhancement

A Pull Request should be associated with a Discussion.
Note: no discussion available as I built this for my own needs and want to start a discussion based on the changes I made.
Description
This PR allows installing extensions from source. This is done by using a special extension format of the form <extension>-<org>/<repo>@<version>. Currently, only GitHub is supported and the repository is checked out using git clone --recurse-submodules -b <version> https://github.com/<org>/<repo>. This is supported on Linux and OSX, but not on Windows environments.
The rationale for adding this was that I didn't want to have separate steps depending on what extension version to install. This way, I can provide the repository URL and branch name as version string, allowing installing stable versions and compiling from source in a single step in a matrix. This was inspired by the leftover install_extension_from_source, which this PR also removes as it's unused (and replaced by this PR).

[x] I have written test cases for the changes in this pull request
[x] I have run npm run format before the commit.
[x] I have run npm run lint before the commit.
[x] I have run npm run release before the commit.
[x] npm test returns with no unit test errors and all code covered.
[x] I have checked the edited scripts for syntax.
[x] I have tested the changes in an integration test (linux only, can run on OSX separately): https://github.com/alcaeus/mongo-php-library/runs/1741774149 (also, please ignore the PHPUnit failure - that is unrelated).

Further discussion

Should we allow passing commit hashes as well? This is not supported due to using git clone but could be supported as well.
Should we provide way for users to customise the build, e.g. arguments to pass to configure? If so, this might require more changes to the action (including potentially changing the format of the extensions input)
I have yet to figure out whether this will play nice with shivammathur/cache-extensions. I assume there will be issues if somebody installed ext-org/repo@master and the commit hash changes before the cache is invalidated. This needs documentation at the very least. This can be worked around by supporting commit hashes (see above).

Let me know if you have any concerns about adding this, I'm happy to talk about potential alternatives.

@alcaeus Thanks for working on this. Installing extensions from source was on the roadmap. 🚀

Yes, it would be a good idea to support commit hashes as well.
I do not think it would be a good API if extensions input is allowed to pass configuration arguments. An alternative would be checking for an env variable say MONGODB_CONFIGURE_ARGS for mongodb extension.
Another improvement can be checking for required libraries in env variable MONGODB_LIBS.
As there is no check in add_extension_from_github to see if extension is already in extension_dir, extensions cached by extensions-cache will be overwritten by new compiled one.

@alcaeus Thanks for working on this. Installing extensions from source was on the roadmap. 🚀

Yes, it would be a good idea to support commit hashes as well.
I do not think it would be a good API if extensions input is allowed to pass configuration arguments. An alternative would be checking for an env variable say MONGODB_CONFIGURE_ARGS for mongodb extension.
Another improvement can be checking for required libraries in env variable MONGODB_LIBS.
As there is no check in add_extension_from_github to see if extension is already in extension_dir, extensions cached by extensions-cache will be overwritten by new compiled one.

An alternative would be checking for an env variable say MONGODB_CONFIGURE_ARGS for mongodb extension.

@shivammathur that sounds like a great idea, as it presumably makes it much easier to customize configure args via the build matrix. Granted, we're more likely to want to do that for the extension's own builds than a consuming library, but still nice to have the option.

An alternative would be checking for an env variable say MONGODB_CONFIGURE_ARGS for mongodb extension.

@shivammathur that sounds like a great idea, as it presumably makes it much easier to customize configure args via the build matrix. Granted, we're more likely to want to do that for the extension's own builds than a consuming library, but still nice to have the option.

@shivammathur thanks for your feedback. I've applied the suggestions from code review. Please let me know if the checks in extensions.ts can be simplified - I'm not entirely happy with the duplicate regex evaluation, especially since that code can't be covered.

I've changed add_extension_from_github to accept a commit hash as well. Anything accepted by git checkout is now fair game as a version.
I've played around with supporting <ext_name>_CONFIGURE_ARGS - this isn't a lot of effort but the question remains whether we want a common solution for all extensions or whether extensions should take care of this themselves.
An optional LIBS env var is possible, but I wonder if it would be more sensible for users to fill build dependencies themselves
Skipping the cache is fine for now. I checked how this is handled for pecl, and since the only "version" we can reliably use is a commit hash which is lost after installing, extensions are always rebuilt from source, even if the cache restored them. I can revisit this separately if we want the cache to pick up source builds as well.

@shivammathur thanks for your feedback. I've applied the suggestions from code review. Please let me know if the checks in extensions.ts can be simplified - I'm not entirely happy with the duplicate regex evaluation, especially since that code can't be covered.

I've changed add_extension_from_github to accept a commit hash as well. Anything accepted by git checkout is now fair game as a version.
I've played around with supporting <ext_name>_CONFIGURE_ARGS - this isn't a lot of effort but the question remains whether we want a common solution for all extensions or whether extensions should take care of this themselves.
An optional LIBS env var is possible, but I wonder if it would be more sensible for users to fill build dependencies themselves
Skipping the cache is fine for now. I checked how this is handled for pecl, and since the only "version" we can reliably use is a commit hash which is lost after installing, extensions are always rebuilt from source, even if the cache restored them. I can revisit this separately if we want the cache to pick up source builds as well.

@alcaeus Awesome,

You can remove the if(matches == null) blocks in extension.ts as those are unreachable. That should fix the coverage.
Support for args and libs is not required and can be added in future. I'm happy to merge this PR without that.
Support for cache can be added, since the cache key depends on the extensions input, it would invalidate when commit sha or version changes in the workflow. (https://github.com/shivammathur/cache-extensions#workflow)

@alcaeus Awesome,

You can remove the if(matches == null) blocks in extension.ts as those are unreachable. That should fix the coverage.
Support for args and libs is not required and can be added in future. I'm happy to merge this PR without that.
Support for cache can be added, since the cache key depends on the extensions input, it would invalidate when commit sha or version changes in the workflow. (https://github.com/shivammathur/cache-extensions#workflow)

@shivammathur Just a heads up, it will be a few days before I can return to this. I haven't forgotten but have to rest for a few days.

@shivammathur Just a heads up, it will be a few days before I can return to this. I haven't forgotten but have to rest for a few days.

@alcaeus Take your time. Hope you are feeling well.

@alcaeus Take your time. Hope you are feeling well.

@shivammathur thanks! I've rebased on develop and removed the superfluous if statements. I'll take a look at cache next, but believe that the PR can be merged as-is.


Release v1.1.1

Coverage increased (+0.01%) to 97.526% when pulling 176e1b274d2dea3ddcea578a4abbca4d8d1ef405 on devel into 6b295d19121aec1ef25a1d0a8ce2e037f9fb13ee on master.


Skip deletion of the assets from the few previous builds

Should not delete an bundled assets from the few previous builds.
In my opinion there should be two options:

number of previous builds to keep
number of hours or days

Similar thing is done on rails/sprockets: https://github.com/sstephenson/sprockets/blob/777f1ebfcbb397479d28509bce2ac67d12d40320/lib/sprockets/manifest.rb#L252

In my opinion there should be two options:
number of previous builds to keep
number of hours or days

While I appreciate the suggestion, I'm not sure I agree. I modeled this after gulp-clean, rather than sprockets.
IMO I think your scenario requires another plugin that runs before this one that will version it.

@johnagan how do you think it should version a built assets?

@johnagan how do you think another plugin should version a built assets?

I don't. I want it to wipe the folder every build

Isn't you trap into the scenarion, when you are deploying an application, and the old users are still could get an assets from the old build?

Nope. The point would be to exclude compiled assets from GitHub / versioning. It sounds like you're using your build directory as your distribution directory.

@johnagan your approach is to push built assets into the github, and then deploy to a production server. Lets imagine that you've deployed a SPA application first time to the server, user got your application and started to browse. Your assets has a links to a URL in the javascript, and loading on demand (through the webpack async loader) when user tries to access additional resources (lets think it's homepage to search) before you deployed the next version of your application, when your application used [hash]for defining the filename urls, instead of[chunkhash]` or you've changed contents of the assets (some of the icons were optimized). Because you are cleaning the build path, everything will be cleaned up and user will get a 404 error in this case.
What I suggest - to leave files at least for a couple of hours after the deployment, or to leave them for a few releases more, before the users will receive an updated JS with a new links to an assets.

@dmitry you're welcome to open a pull request with your recommendation and I'll review it.


feat: change tooling to pnpm monorepo

Exchanges deno with traditional node tooling.
pnpm is a widely used supported package manager for node, which offers lean monorepo capabilities.
It ships with node>=16 and can be enable with corepack which is part of the node installation.
corepack enable

The pnpm-workspace.yaml defines the path to individual projects of the monorepo.
https://github.com/paritytech/useink/blob/5df27adcf0cc110965a097a77ca9acc04d50e8c3/pnpm-workspace.yaml#L1-L3
Each project can have it's own node setup. As of now we have useink/core and useink/chains under packages and playground contains the useink-kitchen-sink frontend.
Soon we should also add the docs to the repo as well. This way we have everything in a single repo and can create PRs which push changes to all related code in one PR.
Use pnpm install at the root to install all dependencies of defined monorepo projects.
pnpm install

I added some convenience scripts in the root package.json to build a the packages or to start a development environment running the "kitchen-sink" frontend.
https://github.com/paritytech/useink/blob/ac11bff016b4484f8aad71d5294a9e8dd16a8b89/package.json#L6-L9
Build packages:
pnpm build

Run development setup:
pnpm dev

The development setup runs the tsup tooling in watch mode and starts the kitchen sink nextjs setup in development mode for recompilation on file changes.

tsup is a popular choice for bundling ts libraries.
tsup docs

The setup was heavily inspired by the repo setup of wagmi. However, I have great experience using these tools in the past.
Why?

I struggled with compiling useink with deno in "watch" mode for speeding up development cycles

dnt (Deno Node Transform) was super slow for me and I don't want to invoke it manually all the time.

dnt states itself it's under early development and may not be suitable for production: This tool is under active early development and hasn't been tested in a lot of scenarios.

we are catering to the node world first and foremost. We are building a frontend library here, deno nor bun are not as widely used for this just yet. IMHO I don't find it worthwhile to drop all the existing mature tooling and struggling with comparability for {insert deno advantage here}. 🤷

Hey @DoubleOTheven, can you give this a try and see if this works for you.
Just updated this to your recent changes in kitchen sink and useink as well.
As mentioned in the PR description I think it has some key advantages over the current deno setup. Please let me know what you think, if we go with this monorepo node approach I will adapt the gh actions as well.

This is a great change. I love that we get hot reloading and have a mono repo.
As per our call, next steps are to wrap up the PRs for Chaindata and Notifications, then move to this approach.
Nice work!

Amazing direction!
At current FT job I've implemented pnpm along turborepo to simplify overall build process:
https://turbo.build/repo

Amazing direction! At current FT job I've implemented pnpm along turborepo to simplify overall build process:
https://turbo.build/repo

Yes that would be the next step. Not sure if turborepo or nx. I personally I'm a fan and user of nx but haven't tried turborepo in the last 8 months or so. We got it on our radar for further improvement of the development experience.

heya 👋
what the progress on this, I need this to ease my testing regarding this issue:
https://github.com/paritytech/useink/issues/40
if there are any ways I can facilitate this, let me know

Version 1.1.0 has been released. Do you want to look into migrating to node based off of the latest main branch?

Yep will give it another go. 👍:)

Just updated the code in this branch to the most recent useink version.
Fyi it does not have multiple packages as the original deno code doesn't. It's just multiple entry points in a single packages as the deno version did it.
So for this initial switch we only have two projects in this this monorepo workspace, packages/useink as it's working before and the useink-kitchen-sink as playground.
Please give it a try @DoubleOTheven if everything works as expected. Also happy to get some feedback from @nicolad and @felixpolimec (#46).
At best fresh copy of this branch then use pnpm i to install all dependencies and run the playground and bundling of the library with pnpm dev.

hey @peetzweg thanks for giving it another go 🚀
I am using node v18.12.0 currently and it works perfectly, aside those conflicting errors you pointed out.
Switched to v19 using nvm, works perfectly as well.
I had some similar errors while using turborepo + pnpm and fixed with pnpm.overrides, not sure if the same fix might apply here, but worth giving a try.

Thanks this change @peetzweg. It works great on my end. The watch mode is 🔥

I would love to merge this in. Just two requests.
1. Please pull in the latest changes from `1.4.2` and `1.4.3`

2. We lost linting and auto formatting. Deno has this by default. Would you please add prettier and eslint? I'm open to moving that task to another PR if you think it best. Just raising the need...

Great points! Just updated the code.
Instead of prettier and eslint I've removed them from the playground project and added rome instead. It got quite popular and I think it's worth a try. Works great so far. Not so many languages or plugins supported but we got what we need so far.
https://github.com/paritytech/useink/blob/72fbb5c12d027b736bf3653ba384893efb725377/package.json#L11-L13
Furthermore, I've added a settings.json and extensions.json file for the for vscode. Suggestion some extensions and enabling some workspace setting to get up and running with rome.
https://github.com/paritytech/useink/blob/72fbb5c12d027b736bf3653ba384893efb725377/.vscode/settings.json#L1-L7
https://github.com/paritytech/useink/blob/72fbb5c12d027b736bf3653ba384893efb725377/.vscode/extensions.json#L1-L4

@DoubleOTheven
merged with main to resolve conflicts. Fixed lint and spellcheck actions. Had to fix some lint issues so lint ci will succeed. This commit includes the fixes:
https://github.com/paritytech/useink/pull/55/commits/071d27cac79229cb20acdf463e66c421d4dee7cb
Release action should work as well 🤞


[Vim9script] There is a reason why def function must be in pascal cas/with the first letter a capital?

I was just wondering why this decision was made. There was a particular problem that it was trying to solve, or it was to make a common style pattern.

I believe the main reason was, so that it cannot shadow builtin functions


adding Choreo to CNCF categories

Pre-submission checklist:
Please check each of these after submitting your pull request:

[ ] Are you only including a repo_url if your project is 100% open source? If so, you need to pick the single best GitHub repository for your project, not a GitHub organization.
[ ] Is your project closed source or, if it is open source, does your project have at least 300 GitHub stars?
[ ] Have you picked the single best (existing) category for your project?
[x] Does it follow the other guidelines from the new entries section?
[x] Have you added your SVG to hosted_logos and referenced it there?
[x] Does your logo clearly state the name of the project/product and follow the other logo guidelines?
[x] Does your project/product name match the text on the logo?
[x] Have you verified that the Crunchbase data for your organization is correct (including headquarters and LinkedIn)?
[x] ~30 minutes after opening the pull request, the CNCF-Bot will post the URL for your staging server. Have you confirmed that it looks good to you and then added a comment to the PR saying "LGTM"?

@kavishkafernando can you amend the PR and sign the DCO? e.g., git commit -s

@kavishkafernando can you amend the PR and sign the DCO? e.g., git commit -s

I have signed the DCO with the new commit. Would that work?

if the commit isn't amended now... git commit --amend -s
or just do a new brand PR :)
On Fri, Jul 7, 2023 at 11:39 AM Kavishka Fernando @.***>
wrote:

@kavishkafernando https://github.com/kavishkafernando can you amend the
PR and sign the DCO? e.g., git commit -s
I have signed the DCO with the new commit. Would that work?
—
Reply to this email directly, view it on GitHub
https://github.com/cncf/landscape/pull/3309#issuecomment-1625140704, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAPSINHEREYK4YRLNEI4MLXO7KLNANCNFSM6AAAAAA2BRPDYE
.
You are receiving this because you commented.Message ID:
@.***>

--
Cheers,
Chris Aniszczyk
https://aniszczyk.org

@caniszczyk all checks have passed and it mentions that the DCO has been signed and all commits have been signed off. Do I still need to send a new PR?

sorry pick one category


round trip from extension type to polars series of list of lists of array

I'm hoping to make a polars plugin that would convert geoarrow extension types into (I'm thinking) a struct with a field for each geometry type and maybe put metadata in the field name with each of those fields being represented by something like a list(list(array(f64,2))), depending on the geometry, of course. I'm not sure if any part of this is something you'd like to have in geoarrow or if you might see some obvious improvement in what I'm doing but thought I'd reach out.
What I've done so far is the one-way trip from geoarrow PolygonArray to a Series of list(list(array)). I'll experiment with the other direction later. Of course, that would be necessary for the geo functions. Starting from the PolygonArray generated here
I managed to get a Polygon into a polars Series with the following steps. It's super clunky as it goes through an intermediate Series before it makes the final Series. It does work though.
let poly: PolygonArray<i32, 2>=p_array();
let b: arrow::array::GenericListArray<i32> = poly.into_arrow();
let (_field, offsetbuffer, arcarray, _nullbuffer) =  b.into_parts();
let offsets_32: Vec<i32> = offsetbuffer.to_vec();
let offsets: Vec<i64> = offsets_32.into_iter().map(|x| x as i64).collect();
let s = Series::try_from((
    "polys",
    Box::<dyn polars_arrow::array::Array>::from(arcarray),
))
.unwrap().rechunk();
let values = s.array_ref(0);
// If I try to skip making the above Series and just do
// let values = Box::<dyn polars_arrow::array::Array>::from(arcarray);
// then I get a panic.

let data_type = polars_arrow::array::ListArray::<i64>::default_datatype(values.data_type().clone());
let arr = unsafe {
    polars_arrow::array::ListArray::new(
        data_type,
        polars_arrow::offset::Offsets::new_unchecked(offsets).into(),
        values.clone(),
        None,
    )
};
let mut ca=ListChunked::with_chunk("polys", arr);
unsafe { ca.to_logical(DataType::List(Box::new(DataType::Array(Box::new(DataType::Float64), 2))))};
ca.set_fast_explode();
let s=Series::try_from(ca).unwrap();
eprintln!("{}",s);

which results in
shape: (2,)
Series: 'polys' [list[list[array[f64, 2]]]]
[
        [[[-111.0, 45.0], [-111.0, 41.0], … [-111.0, 45.0]]]
        [[[-111.0, 45.0], [-111.0, 41.0], … [-111.0, 45.0]], [[-110.0, 44.0], [-110.0, 42.0], … [-110.0, 44.0]]]
]

BTW: I copied most of the above from the polars implode method
Just to recap, I'm reaching out to see if you've got any pointers on how to do the above better and to see if you have any interest in having the feature to go to/from polars in geoarrow (I suppose it could be feature gated).

I think there are two related questions here: how to handle Arrow data conversion between arrow-rs and polars-arrow, and how to handle geospatial data in Polars.
For the first, this is very general and not specific to geoarrow data or geoarrow-rs. I think you want to use polars_arrow::array::Arrow2Arrow. Going through a Vec will be less performant because going to a Vec will copy all arrow data. You may have to vendor Arrow2Arrow into your own project so that it's using the same version of arrow-rs that geoarrow is using.
For the second, you know I've been interested in geospatial support in polars for a long time.

geoarrow extension types into a struct with a field for each geometry type

Sure, this is like a custom implementation of an Arrow sparse union. You could have a struct of {"Point": PointArray, "LineString": LineStringArray<i64> ...} etc. But note that that will not be zero-copy with a geoarrow-rs MixedGeometryArray because the geoarrow Geometry array is an Arrow dense union.
So in particular, the PointArray in your struct will need to have the same number of rows as other data, which means allocating data for all points even when you have no points.
You'll still have to figure out the CRS storage somehow...
In a general sense, I'm most focused on growing the GeoArrow ecosystem. I would like to connect that to Polars but I'm not going to make a geopolars implementation that isn't zero-copy with GeoArrow. If Polars allows extension types, I'll make a GeoArrow-based GeoPolars, but otherwise it's more likely that I build on DataFusion when they merge user-defined types (which they plan to do: https://github.com/apache/datafusion/issues/11513)

I don't think there's anything left for me to do here, so I'll close this.


Unable to scan a slimmed image for bom and security issues

I'm building a minified ubuntu:20.04 based image with a few applications. I have to specify the applications to keep manually using several include statements as shown below.
docker run -it --rm
-v /var/run/docker.sock:/var/run/docker.sock
-v ${DOC_BUILD_ROOT}/docker-slim-state:/bin/.docker-slim-state
dslim/docker-slim build
--http-probe=false
--continue-after 1
--tag=${IMAGE}.slim:${VERSION}
\                                 # Restore dependencies listed below
--include-shell \
--include-path=/etc \
--include-bin=/bin/sh \
--include-bin=/bin/sleep \
--include-bin=/sbin/ip \
--include-bin=/usr/bin/python3 \
--include-path=/usr/bin/supervisorctl \
--include-bin=/usr/sbin/tcpdump \
--include-path=/lib/libgcc_s.so.1 \
--include-path=/lib/x86_64-linux-gnu/libgcc_s.so.1
--include-path=/usr/lib/python3 \
--include-path=/usr/lib/python3.8
--include-path=/usr/local/lib/python3.8 \
--include-path=/opt/ \
--include-path=/var/log

${IMAGE}:${VERSION}
Minifying an image appears to break scanning tools such as 'docker scan' and 'docker sbom'. These scanning tools are unable to properly scan/inventory my 'slim' image. Is there a way to specify a list of dpkg (dpkgdb) packages to keep, or some other way of preserving dpkgdb for the packages I want to keep?

it breaks these scanners as it removes dpkgdb and there is also no way for you to keep it with only these packages

Some scanners do better than others, but it's a common problem with scanners. DockerSlim ends up exposing their primitive and hacky design :-) Instead of trying to make the broken scanners work DockerSlim will produce its own component metadata.


sdk: go: dagger.Connect

c, err := dagger.Connect(ctx)
require.NoError(t, err)
defer c.Close()

tree := c.Core().Git("github.com/dagger/dagger").
	Branch("cloak").

Q However it might make sense to make dagger/client just dagger, and potentially move the serve part to a sub-package if needs be?
Done: move everything to dagger

[x] There's a connhelper concept, half baked

[x] Right now it's hardcoded to use engineconn to use the built-in engine
[x] Planning to eventually have unixconn etc, use DAGGER_HOST or something to automatically select which conn to use (e.g. core could set DAGGER_HOST=unix:///cloak.sock and dagger.Connect() would work out of the box)

[x] Lots of breakages: there's a ton of dependencies around directly to the engine package

[x] Planning to do something like dagger.Connect(ctx, dagger.WithLocalDir(...), dagger.WithWorkdir(...)) to maintain compat?
[x] Still, lots of other intricate dependencies (project config, etc). Unsure if we can get rid of them?

[x] Returned client abstracts github.com/Khan/genqlient/graphql.Client away

Interface:

client.Do() --> send a graphql request (e.g. equivalent of graphql.Client.MakeRequest)
client.Core() --> return the codegen'd API (e.g. c.Core().Container().From(...))
Codegen'd API lives in client/api

e.g. client.Query() returns an api.Query
This is to avoid mixing the codegen'd stuff with the API
Once we switch to "everyone runs their own codegen", simply updating the import path will fix it all. If we mix codegen inside the dagger package, then it'll get tricky
Q: however, not 100% convinced

/cc @kpenfound -- one of the last big breaking changes


Please reload window appears when running the development version of the extension

This image appears whenever I hit F5 on the extension source.

This is the expected behavior in Extension Development Host with the current implementation.
We realize it's not appropriate, so will removing it as part of #2772.


Show response size even if content-length header isn't present

fixes https://github.com/usebruno/bruno/issues/497

Nice!
Thanks for taking care of this @snippetkid !


[Docs] Fix position of buttons in the code snippets on quick start page.

Notes for Reviewers
This PR fixes the weird position of buttons on Quick Start Guide page in Meshery Docs. https://docs.meshery.io/installation/quick-start
Signed commits

[x] Yes, I signed my commits.

🚀 Preview for commit c285ca874e9bd23351e3e1a3ab1979950b9bdd75 at: https://64016d2cd8fa147218019a74--meshery-docs-preview.netlify.app

Hello @chinu-anand I tested the preview and saw this particular page:

I guess the problem still persists. Will you please look into it.

Yikes! I will fix that ASAP.

hey @chinu-anand , which issue does this PR fix ? I am asking this because an Issue is already opened (#7229 ) which has some parts of Issue in common with the Issue you are trying to fix with this PR, and I've already raised a PR for that. So, please check that once and do not fix the common part (merging of icons of codeblock with sidebar on quick-start page) because my PR already fixes that.
@soham4abc The Issue with the page you mentioned above, will be fixed by my PR. Please check that once.

@rinkuhasija This PR is not about just setting z-index to auto, it's part of the visual redesign of the code snippet of Meshery Docs. This PR is not referenced to an issue because it's a direct PR. Waiting to be reviewed and approved by @Chadha93.

@rinkuhasija This PR is not about just setting z-index to auto, it's part of the visual redesign of the code snippet of Meshery Docs. This PR is not referenced to an issue because it's a direct PR. Waiting to be reviewed and approved by @Chadha93. So if I don't fix that icon bug, my work will be imperfect which is not my working style.
Now it depends upon the reviewer whether to consider that particular change from my PR or yours, I feel it would be much better if your PR merges before me, my extra work will be reduced 😁.

Yes, that's what is want. I commented here so that our PR's don't create any merge conflicts. And if my PR merges, the issue already opened will be closed, and your extra work will also be reduced. 😉

🚀 Preview for commit 71539f06ebe5e2e7fbc578f1b9e71a6b2a969e80 at: https://6402c93784f6a44e37b0e02f--meshery-docs-preview.netlify.app

@chinu-anand  The changes look good to me
@leecalcote would you have a look?

hey @chinu-anand , which issue does this PR fix ? I am asking this because an Issue is already opened (#7229 ) which has some parts of Issue in common with the Issue you are trying to fix with this PR, and I've already raised a PR for that. So, please check that once and do not work with the common part (merging of icons of codeblock with sidebar on quick-start page) because my PR already fixes that. @soham4abc The Issue with the page you mentioned above, will be fixed by my PR. Please check that once.

@rinkuhasija
Can you mention the number of your PR please?

The copy icon is not visible in dark mode. Are you working on that also @chinu-anand ?

Demonstrated in the call. He's it all fixed in a open PR ( the visibility and the feedback ) refer #7166 @sudhanshutech

The copy icon is not visible in dark mode. Are you working on that also @chinu-anand ?

Demonstrated in the call. He's it all fixed in a open PR ( the visibility and the feedback ) refer #7166 @sudhanshutech

Okay that's great

🚀 Preview for commit c0be29a01274b9167b74af6c8ff714cd60552505 at: https://6406ad92774f59223f892e93--meshery-docs-preview.netlify.app

@chinu-anand I have a request to make of you regarding quick start buttons. If you'll be on the Websites meeting today, I'll describe it to you.

🚀 Preview for commit cd366b4af1da4b8974113ac33c32077b1b2ffc3c at: https://6411ea244d13f14685599f75--meshery-docs-preview.netlify.app

🚀 Preview for commit cd366b4af1da4b8974113ac33c32077b1b2ffc3c at: https://64550c0ae1454f14d29cc433--meshery-docs-preview.netlify.app

This PR is good to go.
@chinu-anand would you be on websites call today ( T minus 10) ? let's discuss and get it merged.

@vishalvivekm are we good to go with this pr ?

@vishalvivekm How are we moving with this PR?

@sudhanshutech @Chadha93
Except for the color suggestions on the three • icons, which wasn't incorporated, this PR is good to go with.

@sudhanshutech @Chadha93 Except for the color suggestions on the three • icons, which wasn't incorporated, this PR is good to go with.

I guess its not a matter of fact now , major bug has been solved so we can go for it .


Sort requirements file by package name fix issues #133 and #166

As expected by (almost) every user of pipreqs, this sort the output file by package name.

Coverage remained the same at 88.281% when pulling 3f8e71003cbbf72a5cda9425fe266de0f338dc66 on JeromeHoen:next into c8ab8cb3d8f3c16144e0e2cbb5fc294ccbff515c on bndr:next.


Incomplete build

Issue reported on Modulus CLI issues #110 by @flean
Compressing project...
7.3 MB written
Uploading project...
Upload progress [===================] 100%
Deploying project into Meteor runtime...

[✓] bundle running at xxxxxxx.onmodulus.net

Nothing happens, it just does that. No provisioning or building environment...

Any updates?

@flean We are prepping a new release candidate right now. This error seems more like a build server failure though, is this reproducible?

Meteor Projects @ <IP_ADDRESS> in Meteor enviorments, nothing happens. No build

Not sure if you guys changed anything, I tested again and it's working now.

@jackboberg have you guys pushed out the new release candidate? If not, what's the eta?

@epeng5 I believe new build/run images will be pushed to production today.

@epeng5 New images have been pushed today. To use the latest run image you need to stop/start your application. Let us know how it goes!

@harlanj @jackboberg Works like a charm! Thanks!

@epeng5 great! Glad your issues are resolved!


Allow to set buttons border radius

Is your feature request related to a problem? Please describe.
At the moment standard buttons border radius is set to 4px and it's impossible to change via CSS.
Describe the solution you'd like
Allow to change the border radius of the mwc-button component. This will allow us to get rounded buttons, like this one:

Describe alternatives you've considered
Using the ::shadow CSS selector but it doesn't seem to work...
The only workaround I found is using JS:
document.querySelector('.mwc-button--rounded').shadowRoot.firstElementChild.style = 'border-radius: 100px;';

Hey @maicol07
Thanks for submitting. We have custom properties that affect 'shape' similar to your example :)
Unfortunately our docs need to be updated to include 'shape' in our theming :(
I'll fix the docs and update here!

Fixed in https://github.com/material-components/material-components-web-components/pull/2179


Qualify VCP against SLES 12.3

If the results of the testing are positive then we should update the customer facing documentation to update the list of Container Host Operating Systems - https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/prerequisites.html
@divyenpatel
Please reassign as appropriate.

Additional validation with above workflow:

Using SPBM policy gold (created in VC)

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: thinscgold
provisioner: kubernetes.io/vsphere-volume
parameters:
    diskformat: thin
    fstype: ext3
    storagePolicyName: gold

Validated statefulset available here.
https://github.com/kubernetes/kubernetes/blob/master/examples/volumes/vsphere/simple-statefulset.yaml

sc-rdops-vm08-dhcp-229-174:~ # kubectl describe pods
Name:           web-0
Namespace:      default
Node:           sc-rdops-vm08-dhcp-230-23/<IP_ADDRESS>
Start Time:     Wed, 31 Jan 2018 19:17:48 -0500
Labels:         app=nginx
                controller-revision-hash=web-6dc8b8d6c9
                statefulset.kubernetes.io/pod-name=web-0
Annotations:    <none>
Status:         Running
IP:             <IP_ADDRESS>
Controlled By:  StatefulSet/web
Containers:
  nginx:
    Container ID:   docker://2a9dc349c5e748aed53d42f8edf207d4223632edb891b331c2f0a091a4e90546
    Image:          gcr.io/google_containers/nginx-slim:0.8
    Image ID:       docker-pullable://gcr.io/google_containers/nginx-slim@sha256:8b4501fe0fe221df663c22e16539f399e89594552f400408303c42f3dd8d0e52
    Port:           80/TCP
    State:          Running
      Started:      Wed, 31 Jan 2018 19:18:03 -0500
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /usr/share/nginx/html from www (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-tf8rd (ro)
Conditions:
  Type           Status
  Initialized    True
  Ready          True
  PodScheduled   True
Volumes:
  www:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  www-web-0
    ReadOnly:   false
  default-token-tf8rd:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-tf8rd
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type    Reason                  Age   From                                Message
  ----    ------                  ----  ----                                -------
  Normal  Scheduled               1m    default-scheduler                   Successfully assigned web-0 to sc-rdops-vm08-dhcp-230-23
  Normal  SuccessfulMountVolume   1m    kubelet, sc-rdops-vm08-dhcp-230-23  MountVolume.SetUp succeeded for volume "default-token-tf8rd"
  Normal  SuccessfulAttachVolume  1m    attachdetach-controller             AttachVolume.Attach succeeded for volume "pvc-46a8f3d9-06e3-11e8-bdee-005056803f06"
  Normal  SuccessfulMountVolume   1m    kubelet, sc-rdops-vm08-dhcp-230-23  MountVolume.SetUp succeeded for volume "pvc-46a8f3d9-06e3-11e8-bdee-005056803f06"
  Normal  Pulled                  1m    kubelet, sc-rdops-vm08-dhcp-230-23  Container image "gcr.io/google_containers/nginx-slim:0.8" already present on machine
  Normal  Created                 1m    kubelet, sc-rdops-vm08-dhcp-230-23  Created container
  Normal  Started                 1m    kubelet, sc-rdops-vm08-dhcp-230-23  Started container
sc-rdops-vm08-dhcp-229-174:~ #

@pshahzeb Great job! Can you please update our customer facing documentation to reflect SLES support ?

Closing it through above validation and documentation update through https://github.com/vmware/vsphere-storage-for-kubernetes/pull/23


fix the remaining ko installs

latest and release were not updated to use the correct ko install. This makes it so.
@mattmoor @embano1

failure seen here:
https://github.com/vmware-tanzu/sources-for-knative/actions/runs/476941856

failure seen here:
https://github.com/vmware-tanzu/sources-for-knative/actions/runs/476941856

Codecov Report

Merging #167 (0e20d18) into master (eda25e5) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #167   +/-   ##
=======================================
  Coverage   78.05%   78.05%
=======================================
  Files          18       18
  Lines         565      565
=======================================
  Hits          441      441
  Misses        121      121
  Partials        3        3

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 eda25e5...0e20d18. Read the comment docs.

Codecov Report

Merging #167 (0e20d18) into master (eda25e5) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #167   +/-   ##
=======================================
  Coverage   78.05%   78.05%
=======================================
  Files          18       18
  Lines         565      565
=======================================
  Hits          441      441
  Misses        121      121
  Partials        3        3

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 eda25e5...0e20d18. Read the comment docs.


[Divider] - Vertical dividers broken on documentation site

The vertical dividers appear to just stick to the left side. See this fiddle and screenshot below.

I am getting the same problem on my web projects. I think this code is occuring the error:
.ui.grid > .column + .divider, .ui.grid > .row > .column + .divider {
left: auto;
}
I suppose if you disable this code sample, the error is going to be removed.

Happens since last update from Chrome. Firefox renders correct.

Can confirm Chrome 51 looks fine and Chrome 52 looks bugged.

I've posted a bug with Chromium. There does not appear to be a workaround from a framework level. Hopefully Chrome team can fix this soon.
https://bugs.chromium.org/p/chromium/issues/detail?id=633011&can=1&q=position%3A absolute flex&colspec=ID Pri M Stars ReleaseBlock Component Status Owner Summary OS Modified

A simple workaround if anyone is having problems: http://jsfiddle.net/xox5kt31/2/

This worked for me:
.ui.grid>.column+.divider, .ui.grid>.row>.column+.divider {
    left: 50%;
}

That only works if you have exactly 2 columns.

Please note. This behaviour is correct to the spec and Edge works the same way. This will not be fixed by browsers.

@indiealexh This is why the conversation is with spec makers.

I'm using Firefox developer edition (52.0a2, 64bit) on ubuntu and having the same problem with vertical divider

Updated @Sarke's fiddle to use https when pulling the css in his solution (not sure how to propose changes to your fiddle): http://jsfiddle.net/allthesignals/xox5kt31/7/

This thread was useful for me, but you can also check propiedades del fenogreco

In older versions of Semantic this problem doesn't exist even with the latest Chrome versions. I think on version 2.2.2 it's rendered correctly

This issue is still happening, and all the fixes currently seem to render this as a horizontal divider - not vertical.

@samdoidge The fix I posted above works.

@Sarke Apologies, it looks like it does. I was viewing in a smaller window where it defaults as a horizontal divider.

Hey @jlukic
I appreciate all the work you've done with this framework. It's a joy to use and I'm sorry https://github.com/w3c/csswg-drafts/issues/401 rejected your proposal.
However, the behavior remains broken in the latest release and it's been so for almost 10 months now. Would it be possible to implement a workaround for the time being while the upstream bureaucracy plays out their drama?

Any update on this issue? We're using Semantic UI on a project that's about to go live and still seeing this issue on all browsers except Safari

The proposed fix is only for one divider, or two columns. The documentation page uses more. Looks like wrapping with relative position & padding/margin 0 solves it, like:

Or

But it would look way nicer if the final solution could be structured as:

Or
 or similar.

This problem also happens on Firefox 57

Why not just manually set style attr  like:
Or

How about manually set style attr to the div, like:

 Or

This workaround might be useful to someone, so long as they don't need dividers for more than five columns. It's not pretty but seems to work but I'm new to Semantic UI so this might not work as well as I think.
The .column selector can be replaced by the * selector. For more columns just repeat the pattern.
.two .ui.vertical.divider {
  left: 50%;
}

.three {
  .ui.vertical.divider {
    left: 33%;
  }

  .ui.vertical.divider + .column + .ui.vertical.divider {
    left: 66%;
  }
}

.four {
  .ui.vertical.divider {
    left: 25%;
  }

  .ui.vertical.divider + .column + .ui.vertical.divider {
    left: 50%;
  }

  .ui.vertical.divider + .column + .ui.vertical.divider + .column + .ui.vertical.divider {
    left: 75%;
  }

  .ui.vertical.divider + .column + .ui.vertical.divider + .column + .ui.vertical.divider + .column + .ui.vertical.divider {
    left: 100%;
  }
}

.five {
  .ui.vertical.divider {
    left: 20%;
  }

  .ui.vertical.divider + .column + .ui.vertical.divider {
    left: 40%;
  }

  .ui.vertical.divider + .column + .ui.vertical.divider + .column + .ui.vertical.divider {
    left: 60%;
  }

  .ui.vertical.divider + .column + .ui.vertical.divider + .column + .ui.vertical.divider + .column + .ui.vertical.divider {
    left: 80%;
  }
}

@media screen and (min-width: (@tabletBreakpoint - 1px)) and (max-width : (@computerBreakpoint - 1px)) {
  .stackable.four,
  .stackable.three {
    .ui.vertical.divider {
      left: 50% !important;
    }
  }

  .stackable.five {
    .ui.vertical.divider {
      left: 34% !important;
    }

    .ui.vertical.divider + .column + .ui.vertical.divider + .column + .ui.vertical.divider + .column + .ui.vertical.divider {
      left: 67% !important;
    }
  }
}

@kariyngva Did you read/try any of the already suggested solutions before you wrote ~500 lines of CSS...?
It's very simple
div.divider-wrap {
  position: relative;
  padding: 0;
  margin: 0;
}

And replace:

Or

With

Or

So I have read the discussion here https://github.com/w3c/csswg-drafts/issues/401 which indicates that CSSWG is not going to change the behavior. This makes me sad as it's weird, however the show must go on - are there going to be any changes from Semantic-UI's side, @jlukic?

I've updated the docs in next version to remove usage that is no longer supported (three column grids)


New error: Argument of type 'awaited T' is not assignable to parameter of type 'T'.

<EMAIL_ADDRESS>packages/@css-blocks/core/src/util/allDone.ts:17:20 - error TS2345: Argument of type 'awaited T' is not assignable to parameter of type 'T'.
  'T' could be instantiated with an arbitrary type which could be unrelated to 'awaited T'.

17       results.push(await p);
                      ~~~~~~~

To repro:

yarn
tsc -b -f packages

Might be fallout from https://github.com/microsoft/TypeScript/issues/37566 (or vice versa).


Remove dependabot, update lockfile manually

Codecov Report

Merging #525 (7a63b85) into master (f7f1c76) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #525      +/-   ##
==========================================
- Coverage   79.09%   79.08%   -0.01%
==========================================
  Files         176      176
  Lines       29191    29191
==========================================
- Hits        23088    23087       -1
- Misses       6103     6104       +1

Impacted Files
Coverage Δ

resqpy/model/_xml.py
91.13% <0.00%> (-0.28%)
:arrow_down:

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 f7f1c76...7a63b85. Read the comment docs.


Get RubyParser test suite passing!

We got this one test passing!
→ ruby test/test_ruby_parser.rb -n 'test_parse_line_block_inline_multiline_comment'

Run options: -n test_parse_line_block_inline_multiline_comment --seed 25499

# Running:

.

Finished in 0.011703s, 85.4518 runs/s, 85.4518 assertions/s.

1 runs, 1 assertions, 0 failures, 0 errors, 0 skips

I ended up cheating a bit on some of the more obscure edge cases in order to get this done, but I still count it as a huge success. I cannot count how many bugs I was able to discover and fix thanks to these additional tests. And for 99% of the bugs, I was able to make a regression test in our own lexer_test.rb and parser_test.rb unit tests, so this new test_ruby_parser.rb file isn't strictly necessary in the end. (But we'll keep it for now anyway.)

(This was squash-merged into master from the command line.)


Add Archive/Unarchive for Service Templates to features

Add the archive and unarchive actions on service_templates to product
features.
Related: https://github.com/ManageIQ/manageiq-api/pull/389

@abellotti can you review?

LGTM!! Thanks @agrare,  but I yield to @h-kataria for final approval as she knows better than I.

@h-kataria can you PTAL?

@abellotti LGTM

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1593890
@miq-bot add_label blocker

Gaprindashvili backport details:
$ git log -1
commit 23e26a2205e5f55edfa9548630768bdd69201c7b
Author: Harpreet Kataria<EMAIL_ADDRESS>Date:   Tue Jun 5 15:32:39 2018 -0400

    Merge pull request #17518 from agrare/add_archive_unarchive_product_features

    Add Archive/Unarchive for Service Templates to features
    (cherry picked from commit 7b85ecd997adba3174c6cea744460de59956c083)

    https://bugzilla.redhat.com/show_bug.cgi?id=1594023


added compile workflow

A workflow that automatically builds mikupad_compiled.html. Feel free to close if this isn't something you want.
It runs the compile.sh script, and then automatically pushed to the repository.
I've got it running on my main branch if you want to see the result.
It kept bugging me about updating to the v4 actions and the npm version, so I did that, but for some reason it gets stuck on Cleaning up orphan processes for 20+ minutes now. It builds and pushes no problem, but then the action gets stuck at the end and doesn't actually complete.
It appears that this might be caused by issues with github rather than the action itself: https://github.com/orgs/community/discussions/15133#discussioncomment-5469332

Everything working as intended now. Looks like it was the partial outage.

I honestly can't tell if this would be useful or just annoying. Pushing to the repository feels like it would create a lot of useless commits, so I don't like that.
I guess this would work nicely if it creates new releases similarly to how it works in the llama.cpp repo. The downside is that it would have lower visibility, but this could perhaps be mitigated by mentioning it in the README.

Definitely understand where you're coming from.
Rewrote it so it now creates a release. Tried making the text body of the release a bit fancy by making it show the log graph since the last change. For this, it tags every release with the number of current commits, compares it to the number of commits of the last release, then prints the git log --graph --oneline for the number of new commits.
For the first release it doesn't print that though, because that'd just take up too much space.
I've got it running again on my main with a few example commits if you wanna look at it.

This looks pretty good! But I wonder what happened here: https://github.com/neCo2/mikupad/releases/tag/release337
I guess it isn't taking into consideration the commits that are part of a merge?

The action just takes the difference between the number of commits (which it's putting in the tags, so in this case release337 - release336 = 1), and adds 1 to also show the most recent commit of the previous release.
And that's apparently just what it looks like when git log --graph ends on a merge commit.

Don't mind the ¥, Japanese system locale does weird things to backslashes in cmd.
I thought it was a good idea just to show the "starting point" or something, but the more I look at it, the more I think it's unnecessary.

I thought it was a good idea just to show the "starting point" or something, but the more I look at it, the more I think it's unnecessary.

Yeah, the starting point should already be obvious if you go to the Releases page.

Thank you for your contribution once again!


fix #121 DataSourceProcessor and DataSinkProcessor default parallelism

Set DataSourceProcessor and DataSinkProcessor's default parallelism value to 1.
When user startup a processor could don't set parallelism .
GEARPUMP-121

+1.

+0. I think users should be aware of the parallelism of processors to run and I don't see the benefit this change brings. Meanwhile, it's inconsistent with the Processor API now.

@manuzhang  When I using some processors to build a DAG , it's just to describe how to process the input stream , parallelism is the attribute of this processor . It should have a default value and one is suitable . thank you for you reply :)

@darionyaphet IMO, users should know and take care of their parallelism so we'd better it explicit. They are free to add another layer with default value which make sense for their applications but we'd better assume nothing for them.

Hi, @darionyaphet  please rebase your pr and I will merge it.

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

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

2 files (not in diff) in ...rpump/cluster/master were modified. more

Misses +75
Hits -75

1 files (not in diff) in ...che/gearpump/cluster were modified. more

Misses +1
Hits -1

1 files (not in diff) in .../org/apache/gearpump were modified. more

Misses +8
Hits -8

2 files (not in diff) in ...apache/gearpump/util were modified. more

Misses +10
Hits -10

2 files (not in diff) in ...rpump/cluster/client were modified. more

Misses +1
Hits -1

2 files (not in diff) in ...che/gearpump/cluster were modified. more
File ...ntStoreFactory.scala (not in diff) was modified. more

Misses -2
Partials 0
Hits +2

File ...cutor/Executor.scala (not in diff) was modified. more

Misses -1
Partials 0
Hits +1

@@             master        #13   diff @@
==========================================
  Files           180        180
  Lines          5950       5950
  Methods        5671       5671
  Messages          0          0
  Branches        279        279
==========================================
- Hits           3805       3713    -92
- Misses         2145       2237    +92
  Partials          0          0

[][cc-pull]

Powered by Codecov. Last updated by [f6f8903...f3b2c17][cc-compare]
[cc-base-branch]: https://codecov.io/gh/apache/incubator-gearpump/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/apache/incubator-gearpump/compare/f6f8903bf54c5a5e49e60543986410d24df57b71...f3b2c17f2af5e8a0e46d7515b51a46c813f9f63d
[cc-pull]: https://codecov.io/gh/apache/incubator-gearpump/pull/13?src=pr


Fix approximate_unread_count()

The muted_topics logic here seems completely broken, although it probably effectively acts as a no-op in not excluding any rows from the query:
def approximate_unread_count(user_profile):
    # type: (UserProfile) -> int
    not_in_home_view_recipients = [sub.recipient.id for sub in \
                                       Subscription.objects.filter(
            user_profile=user_profile, in_home_view=False)]

    muted_topics = ujson.loads(user_profile.muted_topics)
    # If muted_topics is empty, it looks like []. If it is non-empty, it look
    # like [[u'devel', u'test']]. We should switch to a consistent envelope, but
    # until we do we still have both in the database.
    if muted_topics:
        muted_topics = muted_topics[0]

    return UserMessage.objects.filter(
        user_profile=user_profile, message_id__gt=user_profile.pointer).exclude(
        message__recipient__type=Recipient.STREAM,
        message__recipient__id__in=not_in_home_view_recipients).exclude(
        message__subject__in=muted_topics).exclude(
        flags=UserMessage.flags.read).count()

There is no test coverage on this function.

The proximal issue was fixed with #1300, but we should still probably implement some form of muting-based filtering in this function.

I mention #1019 in the comment in the code, but we might actually want to address this in #1289.


Multi bitwise XOR and power operations  in an expression get misleading results

Describe the bug
The details of precedence can be found in page https://docs.microsoft.com/zh-cn/azure/quantum/user-guide/language/expressions/precedenceandassociativity.
It is shown that bitwise XOR has a higher priority than power operator,so we derived the following two formulas,but the result are confusing.
When calculate the expression (~~~(~~~ 2)) ^ 3, the order should be ~~~ 2 = -3, ~~~ (-3) = 2,2 ^ 3 = 8.But the actual order is ~~~ 2 = -3,(-3) ^ 3 = -27,~~~ (-27) = 26.
When calculate the expression (~~~(~~~ 2 ^ 3)),the order should be  ~~~ 2 = -3, (-3) ^ 3 = -27,~~~ （-27） = 26.But the actual order is 2 ^ 3 = 8,~~~ 8 = -9,~~~ (-9) = 8.
To Reproduce
namespace NISLNameSpace {
    open Microsoft.Quantum.Intrinsic;
    open Microsoft.Quantum.Convert;

    @EntryPoint()
    operation main() : Unit {
        mutable a = 3;
        mutable b = 2;
        mutable c = (~~~(~~~ b));
        mutable d = c ^ a;
        Message("a:"+IntAsString(a));
        Message("c:"+IntAsString(c));
        Message("d:"+IntAsString(d));
        mutable e = (~~~(~~~ b)) ^ a;
        Message("e:"+IntAsString(e));
        mutable f = (~~~(~~~ b ^ a));
        Message("f:"+IntAsString(f));
    }
}

Expected behavior
The result of first expression should be 8,and the second should be 26.
System information
operating system:Windows 10
dotnet version:6.0.300
QDK:v0.24.210930

After inspecting the relevant specific source code (click here), I could find out that the operators that you are currently using are named the following ways:

Bitwise not (BNOT), with symbol ~~~, and priority 45 (high precedence)
Power operator (POW), with symbol ^, and priority 40 (high precedence, but lower than bitwise not)

Bitwise XOR (BXOR, with ^^^ symbol) is not currently specified in any source code portion of your description.
However, I would study further the following statements done, for ensuring that the precedence is correctly set in our code:

bitwise XOR has a higher priority than power operator

It could be seen that:

qsBXORop has a precedence of 13 in our code (and 7 in the documentation you shared).
qsPOWop has precedence of 40 (and 15 in the documentation you shared).

So, power has a higher precedence set than bitwise XOR. A higher  precedence at an operator means that the operation would be done first. Then, power would be done first, and bitwise XOR would be done later.
Then, Could you kindly clarify why are you currently stating that XOR is not working as expected?

I‘m sorry to confuse bitwise NOT and bitwise XOR, and give you an incorrect description.
The order I want to get a clear understanding is bitwise NOT(~) and power(^). According to their precedences, bitwise NOT would be done first, and power would be done later, so when calculating (~~~(~~~ 2 ^ 3)),the order should be ~~~ 2 = -3, (-3) ^ 3 = -27,~ （-27） = 26.But the actual order is 2 ^ 3 = 8,~~~ 8 = -9,~~~ (-9) = 8.

@weucode The behavior that is described by your side does not consider parsing parenthesis, being these ignored.
Is it expected that parenthesis be taken into account by the parser?


contracts: Add configurable per-storage item cost

Fixes #7529
Check out the linked issue for a description.

I think this should be labeled B7 - Runtime Noteworthy, not B3 - API Noteworthy

I think this should be labeled B7 - Runtime Noteworthy, not B3 - API Noteworthy

bot merge

bot merge


US: Display reads, reference, and haplotypes

As a genomicist, I can display sequencing reads in the context of both the primary reference and local unique haplotypes simultaneously, so that I can see how well my reads fit with both.

Currently the display does not discern between vg reference paths and xg haplotype threads. They are both part of the same visualisation and look alike. The only way to tell them apart is via the labels in the legend. If there is no objection, I'd like to keep it that way.

They really should be basically the same class of object. But we might want
to be able to distinguish them (or maybe just the primary path?) by color,
and we will want the user to be able to tell which category a particular
path/thread is if they want to know.
On Fri, Jul 28, 2017 at 8:02 AM, Wolfgang Beyer<EMAIL_ADDRESS>wrote:

Currently the display does not discern between vg reference paths and xg
haplotype threads. They are both part of the same visualisation and look
alike. The only way to tell them apart is via the labels in the legend. If
there is no objection, I'd like to keep it that way.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/wolfib/sequenceTubeMap/issues/2#issuecomment-318676177,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AE0_XysaWuRUQ-noYBK4CykebTrkx5S3ks5sSfgAgaJpZM4OedmH
.


[Task]: Check whether resources are correctly released

Description
$subject
Describe your task(s)
No response
Related area
-> Other Area
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response

Can you please elaborate more on this including what area (language, library module, etc.) this applies to?


Imrove Documentation

Currently missing things from the documentation:

[] Postprocessing steps (this is also missing in the README)
[] dark mode (please)

Things we [c | sh]ould improve:

showing the entire workflow, maybe add graphics
maybe more interactivity, as in, more fine-grained examples

[] fix link to micro benchmarks repository


Upgrade to SDK 0.13.56-snapshot.20200325.3626.0.a3ddde3a

This updates to the latest SDK snapshot SDK 0.13.56-snapshot.20200325.3626.0.a3ddde3a, removing usage of LET and MRT.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Closed the PR as we will wait for the full release to upgrade.


Nested fragments complaining about wrong types

Elixir version (elixir -v): 1.4.0
Database and version (PostgreSQL 9.4, MongoDB 3.2, etc.): postgresql 9.4.5
Ecto version (mix deps): 2.1.2
Database adapter and version (mix deps): postgrex 0.13.0
Operating system: Ubuntu 16.04

Current behavior
I currently use two macros with fragment functions:
    defmacro coalesce(left, right) do
      quote do
        fragment("COALESCE(?, ?)", unquote(left), unquote(right))
      end
    end
    defmacro between(field, left, right) do
      quote do
        fragment("? BETWEEN ? AND ?", unquote(field), unquote(left), unquote(right))
      end
    end

But when I call them like this:
|> where([p1, p2, p3], between(p3.start_time, coalesce(^Ecto.Time.cast!("12:00:00"), ^Ecto.Time.cast!(timestamp)), coalesce(p2.stop_time, ^Ecto.Time.cast!("24:00:00"))))

I get this error:
** (Postgrex.Error) ERROR 42883 (undefined_function): operator does not exist: time without time zone >= text
12:25:36.054 [debug] pid=<0.1147.0> module=Ecto.LogEntry function=log/1 line=41 QUERY ERROR db=1.3ms
[...] AND (r2."start_time" BETWEEN COALESCE($7, $8) AND COALESCE(r1."stop_time", $9)) [[...] {12, 0, 0, 0}, {12, 25, 34, 492907}, {23, 59, 0, 0}]
    (ecto) lib/ecto/adapters/sql.ex:436: Ecto.Adapters.SQL.execute_and_cache/7
    (ecto) lib/ecto/repo/queryable.ex:130: Ecto.Repo.Queryable.execute/5
    (ecto) lib/ecto/repo/queryable.ex:35: Ecto.Repo.Queryable.all/4

It's quite a long query, so I replaced two parts with [...], but I'm 100% positive that that works.
Expected behavior
I would expect Ecto not to use constraints like type checking on fragments, because the COALESCE function will return a time without time zone instead of a text.
On a side note, why do I have to explicitly cast timestamp (A DateTime) with ^Ecto.Time.cast!(timestamp)? Can't that be done automatically?

The error is complaining about the >= operator, but in the fragment of the query you posted it is not used. It is my understand that this part of the query is not the problem.

Yes, that's my issue too, I don't use the >= operator, so I assumed it would have something to do with the between statement.

I see I copied the wrong "where"-statement, I updated it now.

What are the column types of start_time and stop_time in the database? Ecto is not doing anything special here, so I am assuming BETWEEN compiles down to >= which is leading the database to think it is comparing a text to time. The question is: from where text is coming from? I can think about some options:

The database column is text
The interpolated value is a text
The text is coming as a default type from coalesce

Although all three operations above are unlikely, I would check them to be sure. The second option does not seem to be the case given the logs above. One option is to use explicit type annotations:
defmacro between_time(field, left, right) do
  quote do
    fragment("? :: timestamp BETWEEN ? :: timestamp AND ? :: timestamp", unquote(field), unquote(left), unquote(right))
  end
end

Or the equivalent Postgres query.

\d on the database table returns time without timezone, as expected.
I changed the macro to the following:
    defmacro between(field, left, right) do
      quote do
        fragment("? :: time BETWEEN ? :: time AND ? :: time", unquote(field), unquote(left), unquote(right))
      end
    end

And it returned this error:
** (ArgumentError) Postgrex expected a binary, got {12, 0, 0, 0}. Please make sure the value you are passing matches the definition in your table or in your query or convert the value accordingly.
13:13:02.105 [debug] pid=<0.1147.0> module=Ecto.LogEntry function=log/1 line=41 QUERY ERROR db=5.4ms
[...] WHERE (r2."start_time" :: time BETWEEN COALESCE($5, $6) :: time AND COALESCE(r1."stop_time", $7) :: time) [[...] {12, 0, 0, 0}, {13, 13, 0, 490949}, {23, 59, 0, 0}]
    (voiceover_core) /home/thijs/Documents/voiceover_umbrella/deps/postgrex/lib/postgrex/type_module.ex:716: Voiceover.Core.PostgresTypes.encode_params/3
          (postgrex) lib/postgrex/query.ex:45: DBConnection.Query.Postgrex.Query.encode/3
     (db_connection) lib/db_connection.ex:1070: DBConnection.describe_run/5
     (db_connection) lib/db_connection.ex:1141: anonymous fn/4 in DBConnection.run_meter/5
     (db_connection) lib/db_connection.ex:1198: DBConnection.run_begin/3
     (db_connection) lib/db_connection.ex:584: DBConnection.prepare_execute/4
              (ecto) lib/ecto/adapters/postgres/connection.ex:80: Ecto.Adapters.Postgres.Connection.prepare_execute/5
              (ecto) lib/ecto/adapters/sql.ex:243: Ecto.Adapters.SQL.sql_call/6
              (ecto) lib/ecto/adapters/sql.ex:431: Ecto.Adapters.SQL.execute_and_cache/7
              (ecto) lib/ecto/repo/queryable.ex:130: Ecto.Repo.Queryable.execute/5
              (ecto) lib/ecto/repo/queryable.ex:35: Ecto.Repo.Queryable.all/4

So it looks like the ^Ecto.Time.cast!("12:00:00") isn't interpolated correctly for the fragment?

Can you please try COALESCE($5 :: time, $6 :: time) and so on just to be sure?

** (Postgrex.Error) ERROR 42846 (cannot_coerce): cannot cast type integer to time without time zone
[...] WHERE (r2."start_time" :: time BETWEEN COALESCE($5 :: time, $6 :: time) :: time AND COALESCE(r1."stop_time" :: time, $7 :: time) :: time)
[...] {12, 0, 0, 0}, {14, 40, 0, 804169}, {23, 59, 0, 0}]
    (ecto) lib/ecto/adapters/sql.ex:436: Ecto.Adapters.SQL.execute_and_cache/7
    (ecto) lib/ecto/repo/queryable.ex:130: Ecto.Repo.Queryable.execute/5
    (ecto) lib/ecto/repo/queryable.ex:35: Ecto.Repo.Queryable.all/4

I may be barking at the wrong tree but to me it is still looking that postgres is expecting something else besides a time in coalesce. Here would be my last try. Replace the coalesce implementation by this:
    defmacro coalesce(left, right) do
      quote do
        fragment("CASE WHEN ? IS NULL THEN  ? ELSE ? END", unquote(left), unquote(right), unquote(left))
      end
    end

Btw, the reason why using \d works is because it is not using prepared statements. So it allows Postgres to look at the whole query with parameters. Ecto, on the other hand, uses prepared statements so the query is prepared without the parameters and I believe in such cases Postgres needs to decide the types for the interpolated parameters upfront. So I am assuming it is expecting an integer or a text and when you pass :: time or something of sorts, it doesn't work as expected.
Another option you can try is to do the casting on postgres instead of Ecto. So you could have:
defmacro cast_as_time(string) do
  quote do
    fragment("? :: time", string)
  end
end

and then cast_as_time(^"12:00:00") instead of Ecto.Time.cast!.

Turns out I was calling coalesce somewhere else as well, which caused the last error...
Explicitly casting coalesce's arguments as time did the trick, the castings in the between macro were not even necessary.
So I think that ^Ecto.Time.cast!("12:00:00") is not being seen as a time, but rather a text in postgres?

So I think that ^Ecto.Time.cast!("12:00:00") is not being seen as a time, but rather a text in postgres?

It is the opposite. Postgres is guessing it to be a text and then it gets surprised when we send a time. That's because in prepared queries we first prepare the query, without the parameters, so Postgres has to guess. That's why the explicit castings help.
I don't think there is anything we can do on Ecto side, unfortunately. So I will go ahead and close this issue. Let me know though if you have ideas about how this could be improved.


Improvement: add a property to decide if filter is case-sensitive or is not

The filter could be configured to be either case-sensitive or case-insensitive.

Added by @andrey-semin. 👍


Fix Makefile and kevm script for building on MacOS BigSur

Both Makefile and bin/kevm assume that the brew installation directory on MacOS is /usr/local and thus use this directory to link to the include and lib folders of libraries installed by brew. However, in BigSur with Apple Silicon (M1), the brew installation directory is /opt/homebrew (see  home-brew install.sh line 35). Thus in the two scripts we use brew --prefix to find the installation directory of home-brew.

On MacOS, both libsecp256k1 and libcryptopp need to be built from source before running the commands to generate Haskell and LLVM backends. The change is to include the two dependencies in Makefile

Script bin/kevm omitted the -ccopt option before the include and lib path of home brew and openssl in MacOS. We added this option name.

@spencerhaoxiao do we need both libraries for both haskell/llvm as I've indicated above? ^^^


regression: sfdx package1 version list output only contains first 2000 entries in most recent versions

Summary
sfdx package1 version list output only contains first 2000 entries when you use a recent version of the CLI, older versions return more entries. Looks like the new implementation does not page over multiple pages if they are available.
Steps To Reproduce:
It's easy to reproduce using our release org, happy to provide login access if necessary.
Install version 7.139 of the CLI, this results in 2534 results (first two lines are the column headers)
$ sfdx force:package1:version:list -u hr2day-dev | wc
2536   18230  266559
Install version 7.191.3 of the CLI, this results in 2000 results
$ sfdx package1 version list -o hr2day-dev | wc
2002   14494  224432
Expected result
also using 7.193 and later you'd expect all results to be available
Actual result
result is clipped to the first 2000 entries
System Information

Which shell/terminal are you using? gitbash

Hi @mshanemc - just tried version 7.200.7, but unfortunately I have to report that the number of lines printed is still the same 2000 lines as when using version 7.191. Could you reopen this issue?
Happy to help debugging

We dug in and found that the tooling API will gack if you try to query PackageVersion with an OFFSET parameter ( to try to get records after 2000).  You can verify this via sf data query -t .
I'm going to mark it as owned by the Packaging team, and cases are required to help them proritize.

This issue is fixed in version 2.28.6.