fix Admin if there is different auth_user_model in use

Please merge this fix ASAP
I am using custom user model and getting below error, when clicking on user plan object link in admin.
NoReverseMatch at /admin/plans/userplan/3/change/
Reverse for 'auth_user_change' not found. 'auth_user_change' is not a valid view function or pattern name.

@satendra02 You can install it by pip/virtualenv/pipenv with parameter -e git+https://github.com/PetrDlouhy/django-plans@fix/auth_user_model#egg=django-plans and test this.

@PetrDlouhy It is not crashing now but the a tag for user link is behaving as a string.

@satendra02 This was probably broken before this PR, now it is fixed.

Codecov Report

Merging #78 into master will decrease coverage by 0.11%.
The diff coverage is 28.57%.

@@            Coverage Diff             @@
##           master      #78      +/-   ##
==========================================
- Coverage    76.9%   76.79%   -0.12%
==========================================
  Files          29       29
  Lines        1667     1672       +5
==========================================
+ Hits         1282     1284       +2
- Misses        385      388       +3

Impacted Files
Coverage Δ

plans/admin.py
74.28% <28.57%> (-1.72%)
: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 a813201...17e4df0. Read the comment docs.

:+1: thx


In-app survey extension

Screenshot for other reviewers:

Spotted same behavior like @jim-docker before. Survey appeared 2 times in a row. Second one was right behind first one.


Add Finnish translation guidelines to documentation as new

Adding instruction for translating Zulip into Finnish language. This instruction page did not exist, but was created as new.
Testing plan:
Manually tested in local environment with the help of ./tools/build-docs
able to navigate to page from translation main page: http://localhost:9991/docs/translating/index.html
able to navigate to page form translation guidelines: http://localhost:9991/docs/translating/translating.html
page visible and fine looking and format of texts is correct when used format
Run ./tools/test-documentation --skip-external-links
-- passed!

Merged after some small edits to English style and tweaking the commit message. Thanks for doing this (and adding the translation more broadly) @aalperi!


Jump to (find) char position in file

Summary
Allow Atom to jump to a character position within a file.
Motivation
Some error logging outputs a character position where the code breaks. Entering a character position and jumping to it within a given file, will make it easier to debug and fix.
Describe alternatives you've considered
A plugin or reg-ex may be able to jump to a character position, but haven't been able to find a solution.
Additional context
Vim has this feature. It would be nice if Atom had too.

This is already supported, and is documented in atom --help
$ atom --help
Atom Editor v1.31.1

Usage:
  atom [options] [path ...]
  atom file[:line[:column]]

One or more paths to files or folders may be specified. If there is an
existing Atom window that contains all of the given folders, the paths
will be opened in that window. Otherwise, they will be opened in a new
window.

A file may be opened at the desired line (and optionally column) by
appending the numbers right after the file name, e.g. `atom file:5:8`.

...

From within Atom you can additionally use Ctrl+G to jump to any row-column position within the current document. For more details, see Moving in Atom.

@thomasjo in sublime you can jump to a character by doint cmd+t ::N where N is the Nth character in the file that you want to go to. i.e. precede the number with 2 colons. You can also to cmd+t :L where L is the line number. It would be really cool if you could to the same in atom as you can in sublime for that.

I want to be able to go the n'th character (byte) in the file in absolute terms, independently of the row and column.

@simadsen That seems like a perfect feature for either a community package. However, if you just want to scratch your own itch, you can solve this by writing a custom command. See The Init File for more details, including how to create a custom keybinding for the custom command. If I remember correctly, the method you'll want to use to implement your buffer jump logic is TextEditor::setCursorBufferPosition.
If you have further questions regarding this, please continue the discussion in our Slack or Discuss.

I don't agree this is supported or solved, however this title is maybe not so helpful. Really what is needed is support to jump to Nth absolutely character, counting chars from first (regardless of lines). For example I have a Python error reading a text file:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2650: ordinal not in range(128)
and would like to hop to the offending character. There was a community package which I thought would help: https://atom.io/packages/status-bar-cursor-position
however this seems to been removed / unsupported (won't install via Atom or apt for me).

Like this: https://marketplace.visualstudio.com/items?itemName=jtr.vscode-position

Yes, because the error messages in Atom give the Character position in terms of the Absolute Character Position, Atom needs a shortcut key that will allow you to jump to that character!
I second this! Please add way to do this. This issue is not resolved!

As was already stated this is something that is relatively simple to implement in a package, and it seems there is already one that may just need a bit of work to get usable again. Note that the earlier advice was slightly incorrect, you'll likely need to use a combination of TextBuffer::positionForCharacterIndex and TextBuffer::characterIndexForPosition to go back and forth between row/column coordinates and character indexes into the file.
See the earlier comment for resources on package development if you need any help.


Output Binding with dynamic filename

I am an experienced .NET developer and MCT delivering az-204. Numerous students attending az-204 are more interested in Java than .NET, so I am in the process of converting some demos to Java. I have a .NET sample where I am using an output binding for Azure Storage by setting a dynamic file name using the binder and attributes
 public static async Task RunAsync([QueueTrigger("food-orders", Connection = "InvoiceConnectionString")] string item, Binder binder, ILogger log)
{
    log.LogInformation($"Processing item: {item}");
    var pdfStream = Util.CreatePDF(item);

    // Declare imperative output binding to allow setting the filename from within the function
    var fileName = $"invoice-{Guid.NewGuid()}.pdf";
    var attributes = new Attribute[]
      {
        new BlobAttribute($"invoices/{fileName}", FileAccess.Write),
        new StorageAccountAttribute("InvoiceConnectionString")
      };

    using (var writer = await binder.BindAsync<Stream>(attributes))
    {
        writer.Write(pdfStream.ToArray());
    };
}

I have written a similar demo for a function in Java, but I just can not find any way to set the filename dynamically. Of course, I could use the Java SDK for Azure Storage and upload the file manually, but then I would not be using bindings. Is there some object like the binder and the attributes available for Java? I think this is a use case is not so uncommon and should be part of the docs
@FunctionName("UploadNewsletter")
  public HttpResponseMessage run(
    @HttpTrigger(name = "req", methods = {
                    HttpMethod.POST }, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<String> request,
    final ExecutionContext context,
    @BlobOutput(name = "outputBlob", path = "newsletters/{blobName}", connection = "StorageConnection") OutputBinding<String> blobItem) {
    context.getLogger().info("Java HTTP trigger processed a request.");

    // Parse query parameter
    final String text = request.getBody();
    String fileName = "newsletter-" + java.util.UUID.randomUUID() + ".txt";
    blobItem.setValue(text);

    return request.createResponseBuilder(HttpStatus.OK)
                    .body("Text file uploaded successfully!")
                    .build();
  }

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 910d4732-bb08-d16a-a932-19c6bd1628c2
Version Independent ID: af4358c7-cb5c-bdc7-6433-289f47dc186b
Content: Azure Blob storage output binding for Azure Functions
Content Source: articles/azure-functions/functions-bindings-storage-blob-output.md
Service: azure-functions
GitHub Login: @ggailey777
Microsoft Alias: glenga

@arambazamba
Thanks for your feedback! We will investigate and update as appropriate.

@arambazamba Imperative binding pattern can only be used in C#, other .NET languages and unfortunately, not Java. Currently, output bindings are static and dynamic filename is not possible. In such cases as you described, we suggest using Storage SDK directly.
You can submit feedback via Functions Feedback forum and I will also pass it internally to our product team. Let me know if any questions.

We will proceed to close this thread and feel free to reach out if you have any questions. happy to answer!


readme files for storageimportexport

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

Contribution checklist:

[ ] I have reviewed the documentation for the workflow.
[ ] Validation tools were run on swagger spec(s) and have all been fixed in this PR.
[ ] The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

[ ] Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
adding/removing APIs.
adding/removing properties.
adding/removing API-version.
adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

[ ] If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
Please follow the link to find more details on API review process.

/azp run automation - sdk

Can one of the admins verify this patch?

@zikalino, is this PR ready to merge?

/azp run automation - sdk

/azp run automation - sdk

/azp run automation - sdk


Add parquet file support reference in docstring

[x] Tests added / passed
[x] Passes flake8 dask

Related to #3573. Docstring was not updated.

Looks good. Note that for documentation-only changes like this, you can use [skip-ci] in the commit message.


Add AnchorJS for docs anchors.

/CC @mdo @cvrebert @hnrch02
Fixes #14897.

https://github.com/bryanbraun/anchorjs#compatibility says it supports IE9+. Does it at least fail somewhat gracefully in IE8?

Nope. I have already an issue for that, but didn't have the time to finish the patch.
With IE8, the anchor icon won't show up. The a element will though.

That's sufficiently graceful for me.

Agreed. I might find the time to finish the IE8 support upstream, but being that we won't care about it with v4, you know :p

:+1:


crossing=* was incorrect in presets (crossing / crossing_ref)

Original usage in 2008: http://wiki.openstreetmap.org/wiki/Approved_features/Road_crossings
crossing=uncontrolled for crossings without lights
crossing=traffic_signals when there lights
crossing_ref=* should be used to denote all pelicans, toucans and pegasus crossings. For 80%+ crossings of the world crossing_ref should be zebra.

Discussed on #2918.  I'm not planning to change this anytime soon as there is no better alternative at this time.  crossing=zebra is currently the 3rd most popular value for crossing.  Until the OSM community comes up with a plan for retagging these, lets leave them be.

is currently the 3rd most popular value for crossing

Only because it was entered after incorrect usage of this tag it iD presets?!

Until the OSM community comes up with a plan for retagging these

It was decided in 2008, why community have to re-decide again if some OSM editor or mass import handled this tag in the wrong way?

@bhousel, so what does crossing=zebra means? Because I don't see it if was ever defined by anyone:

A node on highway (for cars)?
A node on highway (for pedestrians)?


Remove scrollbar

I noticed that when deleting a task, the task falls and scrollbar appears. The scrollbar shrinks the page for a moment which does not look good. So I hid it from the body tag. I know this approach is not good for accessibility but it would help the webpage look nicer.

Hi @ninadnaik10
Thank you for opening this PR.
I faced this issue in #22, and at that point in time, I thought it was fixed.
But now, if you try to add more that 7-8 todos (in 100% desktop size), you'll realize, you won't be able to scroll.
PS: Try your deployed PR here: https://deploy-preview-29--tusharjustdoit.netlify.app
So, implementing a fix like this or what was done earlier; is like hiding the problem, rather than fixing it.
Thank you for bringing this to my notice. Will be reopening #22 and the fix is to always have a scrollbar fixed. So, the screen doesn't shrink — when the scrollbar appears.
Would you like to work on this PR?


failed to compile python file with smart contract to avm file

Following guide, I installed python 3.5.2 and boa. I got below error when trying to compile to avm file.
AttributeError: module 'sys' has no attribute 'file'
Detial error message as below:
(venv) ubuntu@ubuntu-VirtualBox:~/Downloads/neo-python-master/venv$ python boafile.py
Traceback (most recent call last):
File "boafile.py", line 3, in
Compiler.load_and_save('/home/ubuntu/Downloads/neo-python-master/venv/test.py')
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/compiler.py", line 104, in load_and_save
compiler = Compiler.load(path)
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/compiler.py", line 137, in load
module = Module(path)
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/code/module.py", line 235, in init
self.build()
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/code/module.py", line 259, in build
imp = Import(lineset.items, self.path)
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/code/items.py", line 220, in init
self.build()
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/code/items.py", line 239, in build
items_to_import=self.module_items_to_import)
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/code/module.py", line 235, in init
self.build()
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/code/module.py", line 259, in build
imp = Import(lineset.items, self.path)
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/code/items.py", line 220, in init
self.build()
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/code/items.py", line 231, in build
filename = module.file
AttributeError: module 'sys' has no attribute 'file'
I modified items.py source code. Change the "module.file' as the file path that I want to compile. Then, I got below error:
RecursionError: maximum recursion depth exceeded
Detail error as below:
self.build()
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/code/items.py", line 239, in build
items_to_import=self.module_items_to_import)
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/code/module.py", line 235, in init
self.build()
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/code/module.py", line 259, in build
imp = Import(lineset.items, self.path)
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/code/items.py", line 220, in init
self.build()
File "/home/ubuntu/Downloads/neo-python-master/venv/lib/python3.5/site-packages/boa/code/items.py", line 229, in build
module = importlib.import_module(self.module_path, self.module_path)
File "/usr/lib/python3.5/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 993, in _gcd_import
File "", line 202, in _lock_unlock_module
File "", line 189, in _get_module_lock
RecursionError: maximum recursion depth exceeded

are you trying to import sys module? If so you can't do that.

I'm trying to compile the example smart-contract.py:
I created a file "boafile.py" with below content:
from boa.compiler import Compiler
Compiler.load_and_save('./smart-contract.py')
Then, I ran command : python boafile.py
I was expecting the smart-contract.avm file generated. But got the error "AttributeError: module 'sys' has no attribute 'file'"

I face the same problem whenever I include the neo or logzero framework with e.g. from logzero import logger. Haven't tried it with other frameworks, but if I uncomment these import (and simply don't use these libaries), it compiles fine. But this does not seem like a feasible workaround.

You cannot import external Python modules into smart contracts. It just supports modules that strictly comply with the supported functionality of neo-boa.

So, one cannot use libraries like logzero and neo as described in the neo-python project? (e.g. here)

There is documentation specific to the compiler here:
https://neo-boa.readthedocs.io/en/latest/

Thanks everyone for your help!
@PJUllrich , I commented out some imports, the error messages are different. It complaining that some other components has no attribute 'file'. It seems on the right track. I will investigate deeper. Thanks!
@localhuman , I did have investigated the documentation you provided before I submit this issue. While, I didn't find a solution. And the smart contract I used is the one provided in neo-python-master/examples/smart-contract.py. The only thing I did is that :
I created a file "boafile.py" with below content:
from boa.compiler import Compiler
Compiler.load_and_save('./smart-contract.py')
Then, I ran command : python boafile.py

BTW: So for late response. I am in New Zealand. And now, it's 9:44 AM.

after you run Compiler.load_and_save('./smart-contract.py) you'll now have a file with an extension of .avm.
In neo-python or Neo GUI you can load that .avm file in to actually work with it, ie import contract /path/to/.avm {params} {return_type} {needs_storage} {needs_dynamic_invoke}

The problem is that, the .avm file was not generated... It's casued by the error of module 'sys' has no attribute 'file'.
I commented out some 'unnecessary' imports from smart-contract.py, but still see various error like above.


kubectl get pods (Status: CrashLoopBackOff)

Hello ...
I want to ask here I installed sysdig falco using daemonset. Here I am using Google Kubernetes Engine. I followed all the steps given. My question here is that when I run the Kubectl get pods command, the results displayed by my pods experience CrashLoopBackError, even though I use the latest git clone falcosecurity, so how do I get my pods running?
kubectl get pods
NAME                    READY     STATUS             RESTARTS   AGE
falco-daemonset-t254c   0/1       CrashLoopBackOff   5          3m
falco-daemonset-vsh5k   0/1       CrashLoopBackOff   5          3m
falco-daemonset-899wg   0/1       Pending            0          0s

Sorry, are you still having this issue?


AMD FSR 2.1

Hello @tappi287! Sorry for bothering you but I just wanted to let you know that FSR 2.1 is now available :)
https://gpuopen.com/meet-fidelityfx-super-resolution-2-1/
Not sure if this can be used with your project...
Thanks!

Sorry about that, I've opened the issue in the wrong repository... I'll let fholger know about it. Thanks!

Hey @ASchneiderBR,
think it could be useful info for everyone: FSR 2 has technically not much to do with FSR 1. FSR 2 needs motion vectors and other info from the render pipeline and therefore can not be implemented as a post processing filter.


How can I get the value of the Entry?

I want to get the user_name and passwords' values when I click the btn submit.
                 append = &gtk::Entry {
                        //set_buffer: &model.entry,
                        set_tooltip_text: Some("username"),
                        connect_activate(sender) => move |_| {
                            //send!(sender, AppMsg::get_user_name);
                        },
                    },
                 },

I want to get the Entry value when I click the sumit btn.
             append = &gtk::Box {
                    set_orientation: gtk::Orientation::Horizontal,
                    set_spacing: 10,
                    append = &gtk::Button {
                        set_label: "login",
                        connect_clicked(sender) => move |_| {
                           // **how can I get the Entry value here?**
                            send!(sender, AppMsg::Login((model.user_name, model.password)));
                        },
                    },
                    append = &gtk::Button {
                        set_label: "reg",
                        connect_clicked(sender) => move |_| {
                            send!(sender, AppMsg::Reg);
                        },
                    },
                },

it does help me！thanks
By the way how can I learn relm？ I need some doc to learn API .

There are two options:

You store the value of the entry in your model. The easiest way to do this is to create an EntryBuffer and store it inside the model. Then you use set_buffer to set the buffer of the entry in the view! macro. Whenever you want to get the value of the entry you can the just call self.buffer_name.text() in the update method.
You name your entries and move them into the button closure:

connect_clicked(sender, entry1_name, entry2_name) => move |_| {
   let user_name = entry1_name.buffer().text();
   let password = entry2_name.buffer().text();
   send!(sender, AppMsg::Login((user_name, password)));
},

I hope this helps you :)

It does help me. Thanks .by the way where can I learn relm.I mean the api.

You can learn Relm4 with the book, the examples or the documentation. You can find all those links in the Readme.
Also, this article might help you: https://aaronerhardt.github.io/blog/posts/gui_speedrun/


Missing songs in desktop app

I have a problem with the content showed in the web version of Google Music and the desktop app, there are some tracks that are missing in the app but they're in the cloud of the web version. Also checked if there were under another name album but not. I'm attaching a screenshot showing the problem. I tried to uninstall and reinstall de app but the problem persists.

Is there anything in common with the songs that are gone? Are they disliked or do you have any custom css enabled?

No, the all have the same metadata (except for the track title). They share album, artist, etc...

I still having the same issue, is there any fix to it??
https://imgur.com/a/tau2S5d

I'm also experiencing this issue. I recently built a new desktop and when I loaded up GPMDP a bunch of songs aren't showing up. They are still showing up when I login to the web version directly using Chrome and using and the Android App.
It almost seems like it's using an older copy of the library metadata.


Locale resolution called before platform passes locale data.

Apps tend to call locale resolution twice at startup: once before locales have been passed to Flutter by FlutterView.java or FlutterViewController.mm which causes the first attempt to fail, and a second time after it is passed, which succeeds.
Locale resolution should only need to be called once on initial startup, and the first call may cause issues with the locale being null.
I suspect resolution is being called too early, and the initial failure results in it needing to be called again. Otherwise, it is also possible there exists a race condition somewhere that results in locales not passed when they should have been already.

Putting this on hold as I can no longer repro. I suspect the issue still exists, so if anyone has any cases where this is still happening, please reopen/provide information and I will be glad to take another look at it.

I'm seeing it happen twice when the language is changed via the device language setting.  I figure it might be happening once when the setting is changed and again when the app comes from the background.  HTH, but it's not a show stopper, so I'm letting it ride.


How to get all farmer accounts on a farm

I'm writing the auto-crank feature, but got stuck on getting all the farmer accounts list or snapshot.
how can I make this work? after this I'll opensource the auto-crank.
also is there any discord we can talk with fellow developers on this source?, if there is none please create one

Hey :) On the SDK there's a function that called fetchAllFarmerPDAs (that fetches all the farmer PDAs) that I believe you can use for this.
Here's an extract of code of a script I wrote to auto refresh all the farmers of a farm, I left only the functions required to get all the farmers, any question let me know :)
import {stakingDefaults} from "./constants";
import {clusterApiUrl, Connection, PublicKey} from<EMAIL_ADDRESS>import {GemFarm} from "./types/gem_farm"; // this route may change for you
import {Program, Provider} from "@project-serum/anchor";
import {NodeWallet} from "@metaplex/js";
import farmIdl from "./idl/gem_farm.json"; // this route may change for you

(async () => {
    // this gives you all the initialized farmers of your farm
    const farmerPDAs = await fetchAllFarmerPDAs(stakingDefaults.FARM_ID, undefined);
    console.log(farmerPDAs);
})

// Function from the SDK that fetches all the farmers
export const fetchAllFarmerPDAs = async (farm?: PublicKey, identity?: PublicKey) => {
    const filter: any = [];

    if (farm) {
        filter.push({
            memcmp: {
                offset: 8, //need to prepend 8 bytes for anchor's disc
                bytes: farm.toBase58(),
            },
        });
    }

    if (identity) {
        filter.push({
            memcmp: {
                offset: 40, // need to prepend 8 bytes for anchor's disc
                bytes: identity.toBase58(),
            },
        });
    }

    return await getFarmProgram().account.farmer.all(filter);
}

// Builds the farm anchor program
export const getFarmProgram = () => {
    const {conn, wall} = getWallet();

    return new Program<GemFarm>(
        farmIdl as any,
        stakingDefaults.GEM_FARM_PROG_ID,
        new Provider(conn, new NodeWallet(wall), {commitment: 'confirmed'})
    );
}

// Returns a connection and a wallet for the fees
export const getWallet = () => {
    const conn = new Connection(clusterApiUrl(stakingDefaults.CLUSTER as any), 'confirmed');
    const wall = stakingDefaults.REFRESH_PAYER; // this is a Keypair

    return {conn, wall};
}

how to refresh other stakers whenever I try to call refreshFarmerWallet I get this:
  msg: 'The given account is not owned by the executing program'


Cannot join Discord server

Did the invite link expire?

Which link are you referring to? The one in the readme works as far as I can tell at least...

Works now :+1:


EventRepository IMG not resolving [similar to CacheManager img issue]

img src="static/img/db/db-jdbc.png" style="width:50px"

this time the image does not exist db-jdbc.png

... and creating the event repository springjdbc is not that difficult just a matter of time.

Part of 1.6.3


Simplified timezone update handling:

Fix #4965: Adjusted the timezone update script to initialize
structs properly.
Updated the scripts to generate the files directly
Added a small HOWTO
Split zone information to separate files to allow automatic
update without further manual editing.

@bmiklautz added a note to the README.timezones.
As this is not run during compile time (only manually on a windows machine) I don't think that is a big issue.


Registry conformance tool: Add support for gzipped protos

The conformance command code only check for zipped protos and not gzip:
https://github.com/apigee/registry/blob/main/cmd/registry/conformance/conformance-task.go#L106
This results in failure to report accurate conformance reports for gzip protos, add another check for gzip mimeType and handle the bundle accordingly before writing the contents to the file.

The protos were uploaded using the following command:
tar cvzf apigeeregistry_protos.tar.gz google/cloud/apigeeregistry

From what I understand our current support for UnGzipping cannot handle gzipped archives, it can only handle gzip compressed individual files. Make sure that we handle the gzipped protos and document clearly the recommended ways of compressing and uploading the proto files.
@timburks I might need some help with this.

As we discussed, I'd like to lower the priority of this significantly (I'll tag it "wont fix" but am open to discussion). We currently have  a way to upload collections of files (zip archives), and adding a second burdens downstream tools with the need to support both. I don't think adding a second archive method adds any functional value.
I think this problem may have appeared because there was confusion about the uploadable mime types in an application UI. I think clarifying that would be the best way to resolve this.


Move BinaryCoding.h and add big-endian support

Moves src/Bitcoin/BinaryCoding.h to src/BinaryCoding.h
Renames all functions to <encode/decode><16/32/64><LE/BE>

Seems like you missed some spots and the tests failed.

@alejandro-isaza My bad, I missed an import. The CI is still failing, but I think this is not my fault.

Looks like a glitch. Can you try rebasing on latest master.

Done. I'll also run the tests locally, Bitrise is a bit slow.

@alejandro-isaza It passed 🍾

@hewigovens Fixed in #85

Thanks @terorie !


Change pathfinder name to pathfinder-rails

@fjsanpedro We need to change the README and verify it's working correct. I have updated the repo name.


Safari does not include cookies in JSONP requests

How to reproduce these conditions
Sample name or URL where you found the bug
firebase/functions-samples/spotify-auth, but the other auth examples may be affected too.
Failing Function code used (including require/import commands at the top)
spotify-auth/functions/index.js
const functions = require('firebase-functions');
const cookieParser = require('cookie-parser');
[...]
exports.token = functions.https.onRequest((req, res) => {
  try {
    cookieParser()(req, res, () => {
      console.log('Received verification state:', req.cookies.state);
      console.log('Received state:', req.query.state);
      if (!req.cookies.state) {
        throw new Error('State cookie not set or expired. Maybe you took too long to authorize. Please try again.');
      } else if (req.cookies.state !== req.query.state) {
        throw new Error('State validation failed');
      }
[...]

Steps to set up and reproduce
Setup the Spotify-auth example and use Safari (Version 12.0 146<IP_ADDRESS>.9) to test it.

Debug output
Errors in the console logs
State cookie not set or expired. Maybe you took too long to authorize. Please try again.
The req.cookies object is empty.
Expected behavior
No exception.
Actual behavior
As far as I can see, Safari does not include cookies in JSONP request. It works fine in Chrome though.

XHR request do not work neither ☹ I am now redirecting the whole popup to a firebase function and then passing the token back to the app via window.postMessage(). Although it works fine I'm not sure wether or not this is the right way to do it 🤔

XHR request do not work neither ☹ I am now redirecting the whole popup to a firebase function and then passing the token back to the app via window.postMessage(). Although it works fine I'm not sure wether or not this is the right way to do it 🤔

Can you share your solution, is it still working for you?

same, looks nobody care this .

I also have this issue but why noone offers a solution or help here?

Same issue, with linked in sample. Can someone post a workaround as it stops PWA working on iOS.

Pretty sure I'm having the same issue, did anyone find a solution?

Same problem here.
I got the error:
"Error in the token Function: Error: State cookie not set or expired. Maybe you took too long to authorize. Please try again."
using Chrome

I think I was finally able to solve this after poking around multiple tickets/PRs.
My solution ended up using code from:
#826
#849
#852
The basic rundown:

Change the req.cookies.state to be req.cookies.__session across the files as seen in these updated files
Update the res.cookie object to be

    res.cookie('__session', state.toString(), {
      maxAge: 3600000,
      secure: true,
      httpOnly: true,
      SameSite: 'none'
    });

(note we changed res.cookies('state'... to be res.cookies('__session'... from step 1), also note this comment

Updated my hosting rewrites to support calling the functions like:

// in firebase.json
    "public": "public",
    "rewrites": [
      {
        "source": "/redirect",
        "function": "redirect"
      },
      {
        "source": "/token",
        "function": "token"
      }
    ]

Note, I don't know if this is the secure/best/optimal way. I attempted each of these on their own and then started combining them to see what worked.

@kevinguebert You're a godsend!


Configurable histogram buckets

OpsManager/metrics currently generates fixed histogram metrics - would be useful to make this configurable to allow better granularity of measurements relevant to a given deployment.

Now that Prometheus native histogram seems to be more common, and implementations are maturing, might be worth migrating to it instead.


net: allow custom Resolver method implementation(s)

I mentioned in #12476 that I would like to detect the time it took for DNS resolution phase of the Dial process in Dialer.Dial . The solution posted there was very hacky and adds unnecessarily to the API.
@bradfitz suggested

Perhaps net.Dialer could have an optional Resolver, akin to how http.Client has an optional Transport, or http.Server has an optional ErrorLog, etc.

This seems like an excellent idea. Here is how I propose we go about it by adding minimal complexity and preserving code compatibility.
I propose net package adds a new Resolver interface.
type Resolver interface {
    Resolve(host string, deadline time.Time) (addrs []IPAddr, err error)
}

The signature of Resolver.Resolve is same as lookupIPDeadline which Dial eventually uses. Dialer gets an optional field CustomResolver of type Resolver.
The Resolver object (or nil) gets passed around thru the resolution process.
Dialer.Dial -> resolveAddrList -> internetAddrList .
internetAddrList currently always uses lookupIPDeadline, it would need to be changed such that if the passed custom resolver is not nil then use it, otherwise use lookupIPDeadline.
Other functions calling resolveAddrList or internetAddrList  would need to be modified to add an extra nil argument . This does not break code compatibility because they are unexported functions.
Benefits of allowing a custom Resolver

Allowing me to collect timing information as mentioned in #12476
Allowing users to implement their own DNS logic. Failovers, etc.
Mocking for tests.
Client side caching, pre-fetching, etc.
In time, other packages ( like the superb github.com/miekg/dns ) could provide their own Resolver implementations.
Great for people like me who rely on Go to write network debugging tools.

Should I implement and submit the change for codereview? Or wait for some comments here?

No need to prototype it yet. The code will be relatively easy compared to getting the design right.
I suspect that signature isn't general enough. Maybe it's good enough for a dialer, but perhaps it needs a different name.
I bet we don't want to define an interface in the net package. If anything, it could just be an optional func type on the Dialer, similar to funcs on http://golang.org/pkg/net/http/#Transport

Perhaps call it Lookupfunc(or better name) and deadline-ing is handled inside net package. It might mirror signature of net.LookupIP which is used by default if Lookupfunc is nil.
Anything that does a lookup could ask for optional field for Lookupfunc to allow user to provide their own implementation.

I would also like to see a Resolver interface but with multiple methods that match the net.Lookup* funcs.
type Resolver interface {
  LookupAddr(addr string) (names []string, err error)
  LookupCNAME(name string) (cname string, err error)
  LookupHost(host string) (addrs []string, err error)
  LookupIP(host string) (ips []IP, err error)
  LookupMX(name string) (mxs []*MX, err error)
  LookupNS(name string) (nss []*NS, err error)
  LookupPort(network, service string) (port int, err error)
  LookupSRV(service, proto, name string) (cname string, addrs []*SRV, err error)
  LookupTXT(name string) (txts []string, err error)
}

The timeout & deadline functionality could be configured when the resolver is created:
func NewResolver(options ResolverOption...) (Resolver, error) { }

type ResolverOption func(*resolver) error

func ResolverTimeout(duration time.Duration) ResolverOption
func ResolverDeadline(deadline time.Time) ResolverOption

@benburkert, that is not a Go-style (small) interface. Once you have 9 methods, surely somebody would want to add a tenth later, but they can't for compatibility reasons. 9 methods is also hard to implement. We'd probably have to add some sort of EmptyResolver type that people could embed which just returned errors for everything.
I'd start with looking at which interfaces are actually needed by the things this bug is about. Maybe you'd have 9 interfaces instead (maybe starting with 3?) and combine them as needed like io.ReadWriteCloser? I don't know. I haven't given this much thought yet.

What about Lookup(recordtype, query string) ...
It's similar to our Dial(network, address string) function, and would permit wildcard, ANY, and lookups for types not yet added to the dns spec.
Just spitballing...

I just ran in to this issue myself, except a little bit abstracted away from net.Dialer. My use-case may be a little weird, but this would come in extremely handy for me if it was also exposed within the net/http package.
I'm writing a utility that's going to talk over TLS to backend systems (HTTP + JSON) and I'm using Consul  to discover the individual backend nodes. The biggest issue is that I don't have all of my system's DNS requests being serviced by Consul, so pulling a configuration from /etc/resolv.conf won't really work. I plan on using their port 8600 DNS interface.
So I'll end up needing to first obtain a list of IP addresses from the Consul DNS endpoint and then use that IP address in the URL. Following that, I'll need to set the Host field on the request so that the TLS validation works. The only downside here is that I end up having to do a network operation at the creation time of the http.Request struct instead of when actually invoking the request.
If the http.Transport struct was modified to support a custom DNS resolver code path, it would make the code cleaner and avoid the upfront network call.

At the moment, Dial runs the following processes serially for simplicity:

multiple host and service discovery racers
making a short list of target addresses
multiple connection setup racers, and picking a single winner

In near future, when we want more performance on some circumstances, we probably run:

multiple host/service discovery+connection setup racers

per address family, per service {name,port}, etc

picking a single winner

For both cases, the Resolver interface needs to take information for host and service filters. Moreover, it would probably need certificates for supporting upcoming DNS over TLS and DANE.
Looks like this proposal makes it possible to place complicated DNS-related packages at x/net repository. I'm happy if we have fancy name/service discovery functionality without replumbing of packages in standard library.

Valid use-case for custom resolver, but have you tried using the Android NDK to build your binary?

I'd similarly be interested in having timing information available, similar to time_* variables in curl. A monitoring tool that can periodically probe networks would be very handy.
Happy to open up a separate proposal if it's felt to be off-topic for this one?

@jabley, that already happened for Go 1.7. See #12580

This needs a proper proposal document to move forward.

An extension to the work done in #16672

In particular, this got submitted: https://go-review.googlesource.com/29440

Need design work, but should be good for Go 1.9.

I have another use case for which this feature would be usable. I need to make some app firewall. I have proxy which uses http.Request. Urls are specified by user and I want to block access to several ip addresses, e.g. localhost. Currently I do not know any way how to do it except usage of Host header. But it is not sufficient, because I can not specify multiple ip addresses for request (in case when DNS server returns more addresses for same name). So custom dns resolver (with removing wrong ips) would be very great.

@polomsky I am doing something similar. In my Transport I am using my own dialer which is basically clone of the default dialer but applies the IP policy before making the connection usable. The drawback is a TCP connection was made but the client cant do anything with it if islocalip returns true.

So, currently net.Dialer accepts a net.Resolver which is a struct and not an interface. As I understand it, there is no way to override the Lookup* methods. Are there any plans to make it an interface? Just like how http.Client uses http.RoundTripper interface instead of explicit  http.Transport struct.

@sajal, yes, we left room for in the design for that: https://github.com/golang/go/blob/ecc4474341504f5893c8333dbb68c520dbe93ca5/src/net/lookup.go#L100

@bradfitz I'd like to point out that it would be nice if LookupPort could accept a hostname to connect to as well. For now it seems you expect port number as service argument, as shown for example by ReverseProxy implementation.
Use Case: Resolving to custom port with ReverseProxy (e.g. example.com:80 should go to localhost:3456)

Hi guys, just wondering if go 1.9 beta drops tomorrow would it means this feature won't make its way into go 1.9?

@mikegleasonjr As far as I know nobody has written the code for this.  At this point I think it is unlikely to get into Go 1.9, but it is still possible if somebody sends in a patch very soon.

I definitely net some simple way to hook LookupIP / LookupHost / LookupAddr for unit-testing purposes

Override functions as in https://golang.org/cl/115855  would be "ok". Doesn't seem consistent with other things that use interfaces; but it would allow for shenanigans (dns lookup metrics; alternatives to DNS; caching; and so forth).  This would also allow people to avoid custom dialers; instead using the battle tested dual stack happy eyeball code.

hi all,
this topic seems to be implemented and still open so I'd like to try it ;)
As described on stackoverflow I would like to directly use the new resolver configuration options.
The only option I miss is to avoid the fallback to another DNS - I thought about a switch.

Copying my comment from https://go-review.googlesource.com/c/go/+/115855#message-d80f076d91f28a2e5aa2f1eb6fdd88a33aec9502 ....

I can't think of a name or pattern I like here. The closest is naming them all LookupFooFunc, but then there's too many of them.
I do want this behavior, but we kinda already have the hook we need for testing purposes: Resolver.Dial.
We just need an easy way to wire up high-level Lookup func literals into fake in-memory DNS-speaking func implementations to assign to the Resolver.Dial field.
Before we add a bunch of stuff, I'd like to see a package (we could even put it in golang.org/x/net or nettest) that does the in-memory fake-DNS stuff and answers the DNS queries using the test/etc-provided LookupFoo funcs. Such a package should be even easier lately given the recent work on golang.org/x/net/dns.
(The user would probably also have to set Resolver.PreferGo to true to force the Dial to be used instead of cgo?)
So let's put this on hold for now until we see what such a package might look & feel like.

/cc @iangudger

Another way to achieve this with the current interface would be to use the PacketResolver from golang.org/cl/107306, wrap it in a net.Conn implantation, and return it from Resolver.Dial.

Oh, nice. PacketResolver makes such a glue package even easier.

Check out https://godoc.org/github.com/benburkert/dns for some prior art of that glue package.

@Dirbaio I did something similar in the past, but without doing any resolver stuff. (This is very old code, not sure if still valid)
func dialContext(ctx context.Context, network, address string) (net.Conn, error) {
	con, err := (&net.Dialer{
		Timeout:   dialtimeout, //DNS + Connect
		KeepAlive: keepalive,
	}).DialContext(ctx, network, address)
	if err == nil {
		//If a connection could be established, ensure its not local
		a, _ := con.RemoteAddr().(*net.TCPAddr)

		if islocalip(a.IP) {
			fmt.Println(a.IP)
			con.Close()
			return nil, securityerr
		}
	}
	return con, err
}

Usage

For anyone needs this functionality until a patch comes (if it comes at all), I recently wrote a partial net.Dialer replacement that accepts an interface Resolver. After using the custom resolver, it still uses net.Dialer internally and tries to mimic the original net.Dialer's behaviour when possible. It can also be used with http.Transport and http.Client.
Check it out here: https://github.com/cevatbarisyilmaz/ara

For anyone needs this functionality until a patch comes (if it comes at all), I recently wrote a partial net.Dialer replacement that accepts an interface Resolver. After using the custom resolver, it still uses net.Dialer internally and tries to mimic the original net.Dialer's behaviour when possible. It can also be used with http.Transport and http.Client.
Check it out here: https://github.com/cevatbarisyilmaz/ara

I appreciate your work, can you provide dialParallel for dual stack dialing?

Sure, I'll take a look.

I pushed the commit though I didn't really test it yet (at least it didn't disrupt the current tests). Feel free to open an issue in the repo for any further things.

Is there any chance that whatever approach is taken here (in the net package I mean) could/would allow for building a resolver that supports multicast DNS (even if it's only legacy queries)? It seems that native Go implementation does not support mDNS, and hence it is unavailable when building with CGO disabled.

See github.com/ncruces/go-dns for more "prior art" on hooking into net.Resolver.Dial. Implemented caching, opportunistic encryption and DoH/DoS.
This bit implements the strategy mentioned in the above comment (a fake net.Conn that you can return from Dial). With this in place, implementing the DoH exchange is a relatively simple matter.

Check out https://godoc.org/github.com/benburkert/dns for some prior art of that glue package.

I figured out the code bellow.
package main

import (
	"log"
	"net"
	"time"

	"github.com/benburkert/dns"
)

func init() {
	zone := &dns.Zone{
		Origin: "example.org.",
		TTL:    5 * time.Minute,
		RRs: dns.RRSet{
			"foo": {
				dns.TypeA: []dns.Record{
					&dns.A{A: net.ParseIP("<IP_ADDRESS>")},
				},
			},
		},
	}
	mux := new(dns.ResolveMux)
	mux.Handle(dns.TypeANY, zone.Origin, zone)

	net.DefaultResolver = &net.Resolver{
		PreferGo: true,
		Dial: (&dns.Client{
			Resolver: mux,
		}).Dial,
	}
}

func main() {
	log.Println(net.LookupHost("foo.example.org")) // it's working. output: [<IP_ADDRESS>] <nil>
	log.Println(net.LookupHost("www.example.org")) // error no such host. I don't known how to fallback to DNS query
}

Copying my comment from https://go-review.googlesource.com/c/go/+/115855#message-d80f076d91f28a2e5aa2f1eb6fdd88a33aec9502 ....

I can't think of a name or pattern I like here. The closest is naming them all LookupFooFunc, but then there's too many of them.
I do want this behavior, but we kinda already have the hook we need for testing purposes: Resolver.Dial.
We just need an easy way to wire up high-level Lookup func literals into fake in-memory DNS-speaking func implementations to assign to the Resolver.Dial field.
Before we add a bunch of stuff, I'd like to see a package (we could even put it in golang.org/x/net or nettest) that does the in-memory fake-DNS stuff and answers the DNS queries using the test/etc-provided LookupFoo funcs. Such a package should be even easier lately given the recent work on golang.org/x/net/dns.
(The user would probably also have to set Resolver.PreferGo to true to force the Dial to be used instead of cgo?)
So let's put this on hold for now until we see what such a package might look & feel like.

/cc @iangudger

@bradfitz check if this similar to what you had in mind https://go-review.googlesource.com/c/net/+/347850

I've prototyped a fairly simple change that significantly narrows the required customization to a single-function interface that doesn't abstract everything that Resolver does, just the part that is used by net.Dialer (and thus by net/http), namely the internetAddrList() private method.
In the net package, I add (in dial.go in my prototype):
type InternetAddrLister interface {
    InternetAddrList(ctx context.Context, net, addr string) ([]Addr, error)
}

And allow users to provide an alternate implementation for net.Dialer to use.
For maximum usefulness, it is best to also allow a *net.Resolver to be used as an InternetAddrLister so people can provide a replacement by just wrapping around the existing net.Resolver implementation (for cases where they want to do light customization rather than provide a whole custom resolution implementation).
I think this function is a very useful abstraction (and the Go authors appear to agree since this is used quite a few places) and we should just make it a public method of Resolver.
I can submit my changes but I wanted to align on the approach before doing so.


Research: RBAC and new database for SSO related data

#6689 uses MongoDB to store OAuth/OpenID related data. Currently, it is using the same database and user that is used by the core. The data should be saved in another database and a new user should be created that only has access to this database.
Research

[ ] How to create a new database is created on startup that is used by the Bridge for OAuth-related data?
[ ] How to create a new user is created that only has access to this database (access to the Keptn database is not allowed)?
[ ] Does the upgrade our MongoDB bitnami helm-charts to the latest versions solve our problems? Can we bind a specific user to a specific db?

This issue definitely requires some sort of initialization script to set up permissions for the users and databases.
Adding the users/databases is supported by newer versions of bitnami/mongodb but permission handle is not.


Update jackson-module-scala to 2.9.8

Fixes https://github.com/swagger-api/swagger-play/issues/190 for play 2.6

Closed with commit https://github.com/swagger-api/swagger-play/commit/e52e4c67c0b97a89b5abb83d32e5c52d0f3bc6fb


Custom "select" toolbar item problem

Here is my custom item <select>, where i load my database data using jQuery with .append() after the grid loads:
{ type: 'html', html: '<select id="company_combo" class="combo-box"></select>' }
I found a little bug(?) especially firing three grid events:

Refresh
Delete
Search

The <select> clear itselfs, showing no data and forcing me to reload them each time.
That is very boring, so is this a real bug or just an avoidable thing?
Thank you for your time :-)

:heavy_check_mark: Fixed
I added type == 'html' to the exclusion types when grid refreshes itselfs.
Here is the edited code:
if (tmp[t].id == 'w2ui-search' || tmp[t].type == 'break' || tmp[t].type == 'html') continue;


Add pgwire PostgreSQL wire protocol interface to CLI

Hello @AmrDeveloper this is a fantastic library, thanks for putting it together!
We have a need to query our Git repos using SQL but with a PosgreSQL wire protocol (so we can use it with psql or any other PostgreSQL client application).
If you're willing, we'd love to see you add a server mode in GQL using Rust pgwire crate. pgwire does all the hard work of setting up a PostgreSQL wire compatible server and can accept SQL through the wire and pass it into your GQL crates/code.
Something like this:
gql server --repo=NAME,/path/to/repo --repo=NAME2,/path/to/repo2 --port 5432

NAME, NAME2 would be schema names (case insensitive)
/path/to/repo would be the repo names

The above would launch a server listening on port 5432 that would make gql pretend to be a PostgreSQL server. Then, any SQL sent to the GQL server through any PostgreSQL client would be sent to GQL and responses returned using PostgreSQL wire protocol.
We would be able to use NAME and NAME2 schema names to combine multiple repos' output.

Hello @shah,
That's sound very cool and can be used in many projects, thanks you so much for suggestion, My first plan is to start improving the core of GQL and then working on supporting for clients but i think it will be good to start checking PosgreSQL wire protocol and maybe start this module side by side with the core.
Thank you,
Amr Hesham

GQL now has support for queering multi repositories :D

That's great news, @AmrDeveloper I appreciate the quick acceptance!

Hey @AmrDeveloper , your code works great with multiple repositories but we could use a column called repo in each table so that when you query multiple repos, we could use the repo column in our WHERE criteria.

Hey @AmrDeveloper , your code works great with multiple repositories but we could use a column called repo in each table so that when you query multiple repos, we could use the repo column in our WHERE criteria.

Nice idea, i will implement it, Thanks for suggestion

Hey @AmrDeveloper , your code works great with multiple repositories but we could use a column called repo in each table so that when you query multiple repos, we could use the repo column in our WHERE criteria.

Done, i implemented it now and will be released soon

@AmrDeveloper , hi there.
Has this been released? I tried this now with the package, it throws an error, but it works when I compiled the code.

I will release it by the end of this week at most because i am working on big improvements in error handling, functions and performance

@shah « We have a need to query our Git repos using SQL but with a PosgreSQL wire protocol (so we can use it with psql or any other PostgreSQL client application). »
Very neat idea ! With a postgreSQL wire, we could use some automatic SQL to graphQL tools like Hasura or plateformaticDB to provide a grapQL endpoint to query git repositories. It would be awesome !

GitQL 0.22.0 now has more features from postgreSQL and we can work on the write soon
Thank you


New command, bugfixes and improvements

This pull request contains mostly minor bugfixes and improvements.
New command: webviewer
-opens the webbrowser without freezing StaSh
-implemented to fix mc
-named webviewer instead of webbrowser to prevent naming conflicts with the module
Improvements:
-mc.py and gci.py are now compatible with PEP8
-mc.py and gci.py now uses colors
-more autocompletion for commands
-mc.py: now supports non-integer IDs
-mc.py: now supports dropbox logout
-(!) selfupdate.py and getstash.py: now support updating from other users forks
-added a new tip to .stash_tips.py
Bugfixes:
-fixed some bugs in mc.py (dropbox setup should no longer freeze StaSh. Sorry, missed that bug before as i tested the dropbox setup outside StaSh)
WARNING: selfupdate.py and getstash.py has been modified. I tested it on different devices and with both Pythonista 2 (but not 2.1) and 3 and it seems to work without bugs. For more info about the tests, see comment on https://github.com/bennr01/stash/commit/fc4862baebce49766a9fcb41328aa0312f82dc5a . The comment will probably be auto-appended to this commit anyway. I could not test the one-line installation, but the link seems to redirect to the getstash.py file on ywangd/master, so it should work.

@ywangd Using repo/branch is probably better than how i made it. I made it this way to minimalize the changes to selfupdate.py and getstash.py and also to make it easier for new users . Maybe also auto-replace ":" with "/" in the argument (bennr01:dev would become bennr01/dev)? This would allow the use of a GitHub-like style for the repo/branch argument.

I have made the changes. The command now takes either owner/branch or owner:branch as the update target. It is currently in the dev branch and I'll merge it to master in a day or two. Thanks!


BAEL-2727 Example Code

retest this please

Hi, I've retested using 'mvn test' on the core-groovy module and all my tests are passing.  Is it failing a test on the repo side of things or is there some other specific concern?
These are the unit test classes I added for this article (a total of 26 tests in 4 classes):
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.036 s - in com.baeldung.io.DataAndObjectsUnitTest
[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.04 s - in com.baeldung.io.ReadExampleUnitTest
[INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.043 s - in com.baeldung.io.TraverseFileTreeUnitTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.03 s - in com.baeldung.io.WriteExampleUnitTest


Added the ability to set the bridge path as an option.

I recently ran into the use case where I needed to change the location of the bridge.js file (I am using the packager nexe which treats __dirname differently to other environments).
I have made a change to node-phantom-simple to allow manually declaring the bridge.js path. By default, it takes the same behaviour so this is a non-breaking change.
I understand my use-case is specific, and the problem I had is not caused by a bug in node-phantom-simple (rather a bug in nexe), but I thought I would submit this pull request and you can review whether it's something you would like to add regardless.

It doesn't look good here. I think it's better to send patch to nexe.

No problem. Was just opening the pull request to see if it's something you'd be interested in.


Iain to read "Harry potter and the methods of rationality"

Half way! Awesome book!

Yeah! Enjoyed that!


query: ExemplarQueryResult error

Thanos, Prometheus and Golang version used:
Thanos: quay.io/thanos/thanos:v0.24.0 - go1.16.12
Prometheus: 2.29.2 - go1.16.6
Grafana: grafana/grafana:8.4.2
What happened:
I see the following error in the Grafana log
{"err":"[]v1.ExemplarQueryResult: decode slice: expect [ or n, but found \u0000, error found in #0 byte of ...||..., bigger context ...||...","logger":"tsdb.prometheus","lvl":"eror","msg":"Exemplar query failed","query":"process_cpu_usage{namespace=\"spark-test\"}","t":"2022-02-28T09:07:46.63+0000"}
{"err":"[]v1.ExemplarQueryResult: decode slice: expect [ or n, but found \u0000, error found in #0 byte of ...||..., bigger context ...||...","logger":"tsdb.prometheus","lvl":"eror","msg":"Exemplar query failed","query":"sum(zeppelin_note_cache_hit_total{namespace=\"spark-test\"}) / (sum(zeppelin_note_cache_hit_total{namespace=\"spark-test\"}) + sum(zeppelin_note_cache_miss_total{namespace=\"spark-test\"}))","t":"2022-02-28T09:07:46.73+0000"}
{"err":"[]v1.ExemplarQueryResult: decode slice: expect [ or n, but found \u0000, error found in #0 byte of ...||..., bigger context ...||...","logger":"tsdb.prometheus","lvl":"eror","msg":"Exemplar query failed","query":"process_files_open_files{namespace=\"spark-test\"}","t":"2022-02-28T09:07:46.73+0000"}

What you expected to happen:
No erros
How to reproduce it (as minimally and precisely as possible):
It just happens when I open a Grafana dashboard.
Full logs to relevant components:
Logs

level=info ts=2022-02-28T09:04:26.161364912Z caller=client.go:55 msg="enabling client to server TLS"
level=info ts=2022-02-28T09:04:26.161683494Z caller=options.go:115 msg="TLS client using provided certificate pool"
level=info ts=2022-02-28T09:04:26.161707098Z caller=options.go:148 msg="TLS client authentication enabled"
level=info ts=2022-02-28T09:04:26.166055848Z caller=options.go:27 protocol=gRPC msg="disabled TLS, key and cert must be set to enable"
level=info ts=2022-02-28T09:04:26.166787409Z caller=query.go:695 msg="starting query node"
level=info ts=2022-02-28T09:04:26.166967193Z caller=intrumentation.go:48 msg="changing probe status" status=ready
level=info ts=2022-02-28T09:04:26.167250961Z caller=intrumentation.go:60 msg="changing probe status" status=healthy
level=info ts=2022-02-28T09:04:26.167328044Z caller=grpc.go:131 service=gRPC/server component=query msg="listening for serving gRPC" address=<IP_ADDRESS>:10901
level=info ts=2022-02-28T09:04:26.167341139Z caller=http.go:63 service=http/server component=query msg="listening for requests and metrics" address=<IP_ADDRESS>:9090
level=info ts=2022-02-28T09:04:26.16746526Z caller=tls_config.go:195 service=http/server component=query msg="TLS is disabled." http2=false
level=info ts=2022-02-28T09:04:31.189964822Z caller=endpointset.go:349 component=endpointset msg="adding new sidecar with [storeAPI rulesAPI exemplarsAPI targetsAPI MetricMetadataAPI]" address=<IP_ADDRESS>:10901 extLset="{prometheus=\"openshift-user-workload-monitoring/user-workload\", prometheus_replica=\"prometheus-user-workload-0\"}"
level=info ts=2022-02-28T09:04:31.190044591Z caller=endpointset.go:349 component=endpointset msg="adding new sidecar with [storeAPI rulesAPI exemplarsAPI targetsAPI MetricMetadataAPI]" address=<IP_ADDRESS>:10901 extLset="{prometheus=\"openshift-user-workload-monitoring/user-workload\", prometheus_replica=\"prometheus-user-workload-1\"}"
level=info ts=2022-02-28T09:04:31.190073174Z caller=endpointset.go:349 component=endpointset msg="adding new sidecar with [storeAPI rulesAPI exemplarsAPI targetsAPI MetricMetadataAPI]" address=<IP_ADDRESS>:10901 extLset="{prometheus=\"openshift-monitoring/k8s\", prometheus_replica=\"prometheus-k8s-1\"}"
level=info ts=2022-02-28T09:04:31.190095015Z caller=endpointset.go:349 component=endpointset msg="adding new rule with [storeAPI rulesAPI]" address=<IP_ADDRESS>:10901 extLset="{thanos_ruler_replica=\"thanos-ruler-user-workload-1\"}"
level=info ts=2022-02-28T09:04:31.190121093Z caller=endpointset.go:349 component=endpointset msg="adding new sidecar with [storeAPI rulesAPI exemplarsAPI targetsAPI MetricMetadataAPI]" address=<IP_ADDRESS>:10901 extLset="{prometheus=\"openshift-monitoring/k8s\", prometheus_replica=\"prometheus-k8s-0\"}"
level=info ts=2022-02-28T09:04:31.190148554Z caller=endpointset.go:349 component=endpointset msg="adding new rule with [storeAPI rulesAPI]" address=<IP_ADDRESS>:10901 extLset="{thanos_ruler_replica=\"thanos-ruler-user-workload-0\"}"

Anything else we need to know:
I found VictoriaMetrics/VictoriaMetrics#2000, maybe it can help to fix the problem.
If you think this is a Grafana Issue, let me know.

Thank you for the detailed report! It should probably be enough to create an empty slice here if it is nil:
https://github.com/thanos-io/thanos/blob/main/pkg/exemplars/exemplars.go#L92
Help wanted!

Or maybe this https://github.com/thanos-io/thanos/blob/main/pkg/exemplars/exemplars.go#L92 would be an even better place

I found https://github.com/grafana/grafana/pull/42749 which seems to trigger this error.

Help wanted!

I'm not a Go developer, unfortunately, so I can't help fix this.


* TCP_NODELAY set
* Connected to localhost (<IP_ADDRESS>) port 8000 (#0)
> TRACE / HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 405 Not Allowed
< Server: openresty/<IP_ADDRESS>
< Date: Thu, 25 Oct 2018 13:39:30 GMT
< Content-Type: text/html; charset=UTF-8
< Content-Length: 179
< Connection: close
<

<title>405 Not Allowed</title>

405 Not Allowed

openresty/<IP_ADDRESS>

* Closing connection 0

Yes, it is a bit tricky. E.g. sending 302 for example does the same. Practically the only way around it is to patch the Nginx. That is what we need to do for service-mesh as seen here:
https://github.com/Kong/openresty-patches/pull/5
But at the moment we don't have any "re-branding patches" there, but that is possible.


Instructions for creating the .app on osx

I use this on osx by directly executing the file generated at neovide/target/release/neovide after following the build instructions in the readme.  However - it would be nice if I could build an actual .app directory.  I see there some code in .github/workflows that appears to be doing this?  Is the build that that generates available for download somewhere?  If not, is there a way for me to do the same locally?

Currently binaries for windows mac and linux can be found here: https://github.com/Kethku/neovide/actions
I don't really understand how macos works though. It looks like it just produces a folder... is that enough?

Yeah, there should be a .app folder.  Most apps are distributed this way and then run using open -a Foo.app.  I tried downloading the generated .app folder but it doesn't seem to run when I try it.  I get this error:
>open -a Neovide.app
LSOpenURLsWithRole() failed for the application Neovide.app with error -10825.

For now I can just keep running the neovide executable so not a big problem.  But it would be easier as an app so that I don't always need a terminal open for it.

Oh I see the problem now:

I'll try it again when I upgrade

I have no idea if that requirement is real. Not sure where the version requirement came from...

It looks like the package executable has wrong permissions set. After running chmod +x neovide in Contents/MacOS, I was able to start the app. But unfortunately on my machine it just seg-faulted


Building of 1.0.2 version

Coverage remained the same at 71.591% when pulling 61255109c63121124df5e87e20b51c77c1e84755 on 1.0.2 into 7a11ac1b49173efaa41ea58fe0064d6840d6f91e on master.

Coverage remained the same at 71.591% when pulling 7a4ac267852582e20e18becd0af59e74da5d0b36 on 1.0.2 into 7a11ac1b49173efaa41ea58fe0064d6840d6f91e on master.

Coverage remained the same at 71.591% when pulling 335de951e857c32e850c1d7b057b08d94e63129f on 1.0.2 into 7a11ac1b49173efaa41ea58fe0064d6840d6f91e on master.

Coverage decreased (-1.7%) to 69.912% when pulling 9bc7533251ca53b9a3e8821d12e7c5a1b569edd6 on 1.0.2 into 7a11ac1b49173efaa41ea58fe0064d6840d6f91e on master.

Coverage decreased (-2.8%) to 68.841% when pulling 78d4ef6ebe95ad5fac9644a517ed1fcfba541b13 on 1.0.2 into 7a11ac1b49173efaa41ea58fe0064d6840d6f91e on master.

Coverage decreased (-2.9%) to 68.675% when pulling 0ba18daf6b3f07973fb80f59b9cee68c6b1f5b0a on 1.0.2 into 7a11ac1b49173efaa41ea58fe0064d6840d6f91e on master.

Coverage decreased (-2.9%) to 68.675% when pulling 7c632582dc552ce2835307dd61866f54c2321db1 on 1.0.2 into 7a11ac1b49173efaa41ea58fe0064d6840d6f91e on master.

Coverage decreased (-2.9%) to 68.675% when pulling 4cbcb80a138bcb04f191017693ae8c1355c6e54a on 1.0.2 into 7a11ac1b49173efaa41ea58fe0064d6840d6f91e on master.

Coverage decreased (-2.9%) to 68.675% when pulling 815f61616c4edbeee46f7be71ed08ef6d0f58c38 on 1.0.2 into 7a11ac1b49173efaa41ea58fe0064d6840d6f91e on master.


Support a new update-on value "batch"

<input update-on="batch"> means that changes in that form field are queued until non-batch change (blur or input) is triggered.
blur remains the default behaviour
In future: Non-batch changes will be explicitly defined in JSON metadata.

As expressed in https://github.com/PuppetJs/PuppetJs/issues/52, blur, input, batch input modes will not be implemented by PuppetJS.
You need to solve this at framework level (Angular, Polymer, etc).
Readme.md covers this in the Two-way data binding frameworks section:

If you want to opt-out from such behavior, you need to force your framework to update the data model after the element is unfocused (blur event). Depending on the framework:

In Polymer 0.5 it is only possible with a Custom Element that extends the native , similarly but - not exactly how core-input is dome
In Polymer 0.9+, use built-in
In Angular 1.3+, use built-in

Closing as won't fix


Additional support for i18n

Added support for i18n.
Dialogs and all tabs and all sub-tabs and achievements and Stats for Nerds.
Minor improvements to Stats for Nerds.
Changed location of Generate Savefile Stats Summary.
Fixed how to change the background color of achievements.

I've stopped developing this branch, so I'm closing it


Fixed clearable option

The clearable option was not working with both, div and input. The reason was element the date-range-picker was being attached to was not being listened to, although it was being called. Moving the event listener to the init function fixed the problem.

Merged, thank you!

Not a problem. Although you may want to increment the version. Forgot about that.


feat: refactor manifest into more generic approach

Overview:
for pixi global task we need a(nother) pixi-global manifest, which in fact, seems to be a again a toml.
We already have machinery setup to modify and interact with pixi.toml, so I saw an opportunity to extend it in a more abstract way so other type manifests can also use it.
Some things missing:

[x] public functions docs
[x] fix clippy warnings
[x] a way to not clone-that-much

We already have machinery setup to modify and interact with pixi.toml, so I saw an opportunity to extract this in a more generic way so other crates can reuse it.

This gave me the impression that you generalized existing code, but it seems like you added functionality instead of moving existing one.

changed the wording around it

Note that cargo insta test --all --all-features --unreferenced=delete is useful.

Note that cargo insta test --all --all-features --unreferenced=delete is useful.

Sounds like a great candidate for a pixi task :)


Fix for 'Cannot read property 'command' of undefined', switch to new …

Not an atom package dev per ce.
But workspaceView is deprecated, switching to the appropriate calls proposed in the new atom API seems to fix the issue.

@hughsk Please merge this PR asap, the package is completely broken.

This PR looks like it should fix everything very easily. I'm concerned that this repo isn't being maintained anymore.


Reloading d.ts definitions at runtime on a running Monaco instance

I am using the Monaco Editor to embed a typescript editor in a web browser.  It works great, but I’d like to be able to change out the referenced TypeScript definition types at runtime.  So that instead of statically specifying them as:
monaco.languages.typescript.typescriptDefaults.addExtraLib(responses[0].text(), 'jquery.d.ts');
monaco.languages.typescript.typescriptDefaults.addExtraLib(responses[1].text(), 'core-js.d.ts');

which only seems to work when added BEFORE monaco.editor.create(...), I’d like to be able to change them out at runtime.
Two (rather imperfect) workarounds I can think of:

Cache the libraries that I want into localStorage, and force a page reload (or at least an editor-re-creation).  But that seems super-heavy-weight, esp. the former.  And it means it would only work when I have all the libraries already assembled, as I wouldn’t want to force multiple refreshes, and so I can’t add them iteratively.

Skip the d.ts extra-library-adding, and instead paste them into the bottom of the text in the editor.  This certainly works, except the snippets suddenly become 1000s of lines long, making scrolling difficult (and making the thing feel really heavy-weight, and sluggish)... so that’s not that great, either.

Is there some more subtle and tailored-for-the-job API that I’m missing?...

... And on a very related note, how can I fully clear the extraLibs when re-initializing the editor (i.e., to remove "stale" items that I no longer want).  Essentially, I want to be able to 100% control what the current extraLibs are for the editor.

which only seems to work when added BEFORE monaco.editor.create(...), I’d like to be able to change them out at runtime.

We have fixed that

@jrieken, could you elaborate on the fix?  I.e., what is the new API by which I can change the d.ts?
Also, where/when could I get this build?  I am currently pulling it from https://www.npmjs.com/package/monaco-editor

We released a new version of the editor very recently. The API is still the same (addExtraLib returns IDisposable (!)) but a bug preventing it  was fixed.


Add some Arith jets

Full Increment
Increment
Negate
Full Decrement
Decrement
Is Zero
Is One
Lt
Min
Max
Median

Looks good. I'm a little bit wary of the wrapping overflow behaviour in increment/decrement, given the troubles the EVM has had with this (although we do output an overflow bit so it's easy to detect/assert on it). But given that "nobody should be directly writing Simplicity" I think this is fine. It's well-defined and obvious how one would constrain it to get safer behaviour, for various definitions of "safer".
nix-build -A haskell fails on this.
But otherwise 981b63b75d78fd3fd31b0fff8af656eb20a79c8a looks good.