Add Prometheus metric scrapes

Adds a config option PROMETHEUS_CONFIG that instructs the server to expose a Prometheus metrics scrape endpoint. The value is a JSON document allowing control over the host and port the metrics handler will listen on (which may not be the same host/port as the OHTTP gateway), the path at which scrapes are served and the name of the metric. The only metric currently served is a histogram of response times. Its labeling is rather awkward, in an effort to work within the existing awkward tags on the StatsD metrics, which interpolate HTTP status into result strings.

I'm not sure if I handled the dependencies correctly, both because I work with Go modules infrequently and I'm not used to this style of having a go.mod and vendoring dependencies in the repository. What I did was add the import statements in prometheus_metrics.go and then ran go mod vendor to let the tool sort things out.
Example Prometheus scrape after successfully handling one request and refusing one due to illegal taret

# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
go_gc_duration_seconds{quantile="0.25"} 0
go_gc_duration_seconds{quantile="0.5"} 0
go_gc_duration_seconds{quantile="0.75"} 0
go_gc_duration_seconds{quantile="1"} 0
go_gc_duration_seconds_sum 0
go_gc_duration_seconds_count 0
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 9
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
go_info{version="go1.20.14"} 1
# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 635856
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
# TYPE go_memstats_alloc_bytes_total counter
go_memstats_alloc_bytes_total 635856
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.
# TYPE go_memstats_buck_hash_sys_bytes gauge
go_memstats_buck_hash_sys_bytes 4227
# HELP go_memstats_frees_total Total number of frees.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 0
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
# TYPE go_memstats_gc_sys_bytes gauge
go_memstats_gc_sys_bytes 6.727336e+06
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.
# TYPE go_memstats_heap_alloc_bytes gauge
go_memstats_heap_alloc_bytes 635856
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.
# TYPE go_memstats_heap_idle_bytes gauge
go_memstats_heap_idle_bytes 1.163264e+06
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.
# TYPE go_memstats_heap_inuse_bytes gauge
go_memstats_heap_inuse_bytes 2.572288e+06
# HELP go_memstats_heap_objects Number of allocated objects.
# TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 1721
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.
# TYPE go_memstats_heap_released_bytes gauge
go_memstats_heap_released_bytes 1.163264e+06
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.
# TYPE go_memstats_heap_sys_bytes gauge
go_memstats_heap_sys_bytes 3.735552e+06
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
go_memstats_last_gc_time_seconds 0
# HELP go_memstats_lookups_total Total number of pointer lookups.
# TYPE go_memstats_lookups_total counter
go_memstats_lookups_total 0
# HELP go_memstats_mallocs_total Total number of mallocs.
# TYPE go_memstats_mallocs_total counter
go_memstats_mallocs_total 1721
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.
# TYPE go_memstats_mcache_inuse_bytes gauge
go_memstats_mcache_inuse_bytes 28800
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.
# TYPE go_memstats_mcache_sys_bytes gauge
go_memstats_mcache_sys_bytes 31200
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.
# TYPE go_memstats_mspan_inuse_bytes gauge
go_memstats_mspan_inuse_bytes 54720
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.
# TYPE go_memstats_mspan_sys_bytes gauge
go_memstats_mspan_sys_bytes 65280
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.
# TYPE go_memstats_next_gc_bytes gauge
go_memstats_next_gc_bytes 4.194304e+06
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.
# TYPE go_memstats_other_sys_bytes gauge
go_memstats_other_sys_bytes 1.166341e+06
# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.
# TYPE go_memstats_stack_inuse_bytes gauge
go_memstats_stack_inuse_bytes 458752
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
# TYPE go_memstats_stack_sys_bytes gauge
go_memstats_stack_sys_bytes 458752
# HELP go_memstats_sys_bytes Number of bytes obtained from system.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 1.2188688e+07
# HELP go_threads Number of OS threads created.

# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 0.01
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 524288
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 10
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 9.437184e+06
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1.71624443907e+09
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 7.36333824e+08
# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
process_virtual_memory_max_bytes 1.8446744073709552e+19
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 1
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0

Thanks for this. Needs second code owner review.

Let me know when you want me to press the merge button.

@bwesterb I squashed the PR branch and force-pushed. IMO it's good to go, assuming the tests still pass. Thanks!

@bwesterb I'll let you press the merge button. All good for me.

Thank you @tgeoghegan !


--no-analytics still contats google analytics website

As you can see:

I'm running portainer with --no-analytics flag but inspecting the connection with uMatrix seems that it's still trying to contact google analytics

I think that it's the default behavior of the library (https://github.com/revolunet/angular-google-analytics) used here, probably reaching out to google-analytics for the required script.
When using the --no-analytics flag, it will actually prevent to send data on a periodic basis to GA. I believe this is not really an issue so I'm going to close it.
Feel free to comment / re-open if you think that I'm missing something.


Arrays/Noble Integer problem

hi pranjal,
In array section you didn't mention the code for "noble integer problem". please give that too as I am not able to code that problem.

Hi Akshay
The problem has now been solved. Please find the solution here

thanks @royalpranjal


[BUG] Account signup: There is no front-end validation of phone numbers

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
Phone numbers are not adequately validated on the front end of the signup form.
Steps To Reproduce

In any environment, browse to the signup form
Fill out a valid form
Change a phone number to just a
Submit

Expected Behavior
The UI should complain, OR the API should return an error that can be helpfully displayed
Additional context
No response
Does this issue have a priority label?

[X] I have added a priority label

Has issue been assigned to a team?

[X] I have added a team label

Addressed by moving form into the app


Calls to writeFile fail in Chrome 65 extensions

Calls to writeFile fail to initiate a download of a spreadsheet in Chrome 65 extensions. It worked as of a few days ago but recently stopped working.
Works:
Chromium 67.0.3380.0 64-bit (windows)
Does not work:
Chrome 65.0.3325.181 64-bit (Ubuntu 17.10)
Chrome 65.0.3325.181 64-bit (windows)
The problem can be replicated by creating a directory with the following files and adding the extension to Chrome by adding the folder as an unpacked extension in the Chrome extensions page. No errors show up in the development console for the extension.
manifest.json
{
  "manifest_version": 2,
  "name": "XLSX Download Test",
  "description": " ",
  "version": "0.1",
  "browser_action": {
    "default_popup": "popup.html"
  },
  "permissions": [
    "activeTab",
    "storage"
  ]
}

popup.html
<!doctype html>
<html>
<head>
    <title>XLSX Download Test</title>
</head>
<body>
    <button type="button" id="download_button">Download Spreadsheet</button>
    <script type="text/javascript" src="popup.js"></script>
    <script lang="javascript" src="xlsx.full.min.js"></script>
</body>
</html>

popup.js
document.getElementById('download_button').addEventListener('click', function() {
    var data = [{'TestCol1': 'testA1', 'TestCol2': 'testB1'},
                {'TestCol1': 'testA2', 'TestCol2': 'testB2'}];
    var wb = XLSX.utils.book_new();
    var ws = XLSX.utils.json_to_sheet(data, {
        header: ['TestCol1', 'TestCol2']
    });
    XLSX.utils.book_append_sheet(wb, ws, 'TestSheetName');
    XLSX.writeFile(wb, 'testsheet.xlsx');
});

xlsx.full.min.js
Found here

Chrome may have more stringent security restrictions compared to Chromium.  The following seems to work for 65.0.3325.181 (Official Build) (64-bit) on OSX.  If this works for you, we can add it to the write_dl function:

add the downloads permission in manifest.json:

  "permissions": [
    "activeTab",
    "downloads",
    "storage"
  ]

generate an ArrayBuffer with the "array" type, manually generate a data URL, and use chrome.downloads.download to trigger the download:

    /* generate array buffer */
    var wbout = XLSX.write(wb, {type:"array", bookType:'xlsx'});
    /* create data URL */
    var url = URL.createObjectURL(new Blob([wbout], {type: 'application/octet-stream'}));
    /* trigger download with chrome API */
    chrome.downloads.download({ url: url, filename: "testsheet.xlsx", saveAs: true });

Your solution works for me on the same version of Chrome in Windows and Ubuntu. Thank you!

The logic has been added to writeFile so it should just work now in a Chrome extension.  There is a new Chrome/Chromium demo showing how to export bookmarks from a popup and tables using content script + event page

I tried to add "permissions" in manifest.json file. but i get an error when i do 'gulp serve'.
The error is as follows :
Error - [write-manifests] Manifest validation error
(#/) Data does not match any schemas from 'oneOf'
(#/) Missing required property: description
(#/) Missing required property: extensionType
(#/componentType) No enum match for: WebPart
(#/) Additional properties not allowed: permissions
(#/) Missing required property: items
(#/) Missing required property: rootComponentId
could anyone provide a solution

I tried to add "permissions" in manifest.json file. but i get an error when i do 'gulp serve'.
The error is as follows :
Error - [write-manifests] Manifest validation error
(#/) Data does not match any schemas from 'oneOf'
(#/) Missing required property: description
(#/) Missing required property: extensionType
(#/componentType) No enum match for: WebPart
(#/) Additional properties not allowed: permissions
(#/) Missing required property: items
(#/) Missing required property: rootComponentId
could anyone provide a solution


[RESEARCH] Tax forms alternative

We currently depend on Dropbox for signing and storing tax forms.
We would like to remove this dependency and shift to an open-source solution that is better integrated into the platform both from a technical and user experience perspective.
This is a research project to:

Review open source solutions and understand & assess the work that would be involved in making this change.
Identify UX requirements that would arise from this change and shape solutions.
Identify administrative UX requirements that would alleviate the need for engineers (who currently have to do manual to deliver the outcomes required by fiscal hosts) to be involved in this process.

Duplicate of https://github.com/opencollective/opencollective/issues/6262


Broken after build and uglify (yeoman angular generator)

Uncaught Error: [$injector:modulerr] Failed to instantiate module zehitomo due to:
Error: [$injector:modulerr] Failed to instantiate module sprintf due to:
Error: [$injector:nomod] Module 'sprintf' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

Did you add sprintf to your module's list of requirements? Also, what Angular version are you using?


Enhance Terminal Output for LLM Activities

Ensure that all activities performed by the LLM, such as running functions and other operations, are clearly output to the terminal. This will help in tracking and understanding the actions taken during execution, providing better visibility and debugging capabilities.

Goes along with #39

Merged this feature into main


feat(cli): exit with code 1 when remix build fails

When builds fail remix does not exit with an error code which makes it hard to catch build failures in CI environments
https://github.com/remix-run/remix/blob/197f570841e4813b2005d1ae007523c09df3f5c5/packages/remix-dev/compiler.ts#L307-L314
Example:
❯ yarn create remix
❯ cd ./my-remix-app
❯ echo -e "import doesntExists from \"doesnt-exists\";\ndoesntExists();\n$(cat app/routes/index.tsx)" > app/routes/index.tsx
❯ npx remix build

npx remix build
Building Remix app in production mode...
The path "doesnt-exists" is imported in app/routes/index.tsx but doesnt-exists is not listed in your package.json dependencies. Did you forget to install it?
 > node_modules/@web-std/file/tsconfig.json:6:24: warning: Non-relative path "packages/file/src/lib.js" is not allowed when "baseUrl" is not set (did you forget a leading "./"?)
    6 │       "@web-std/file": ["packages/file/src/lib.js"]
      ╵                         ~~~~~~~~~~~~~~~~~~~~~~~~~~

 > app/routes/index.tsx:1:25: error: Could not resolve "doesnt-exists" (mark it as external to exclude it from the bundle)
    1 │ import doesntExists from "doesnt-exists";
      ╵                          ~~~~~~~~~~~~~~~

Build failed with 1 error:
app/routes/index.tsx:1:25: error: Could not resolve "doesnt-exists" (mark it as external to exclude it from the bundle)
Built in 571ms

❯ echo $?
0

accidentally closed this by force pushing to my remix dev branch https://github.com/remix-run/remix/pull/1527

@ryanflorence we actually got it wrong.
@jacob-ebey already added error handling for the cli here:
https://github.com/remix-run/remix/blob/main/packages/remix-dev/cli.ts#L66
The only problem with it, is that the defaultBuildFailureHandler doesn't throw anything so the error just get swallowed and it doesn't exit for some use-cases.
Now there's another thing we got wrong, the default build failure handler is also used in watch, if it would process.exit(1) on watch, it's counterproductive to the watch intent, so it's not the correct spot to implement the exit procedure.
Instead, I've created a different onBuidlFailure that throw an error but still formats the failure as the default handler.
I propose an internal change in the compiler.ts file that extracts the formatting into a function formatBuildFailure that the defaultOnBuildFailure will use to format errors and also the different onBuildFailure can use when is invoked from the cli.

@ryanflorence @mjackson can we get this merged?

@mjackson @kentcdodds @ryanflorence this has been ready for a while, can we get this merged?


feat(processor): introduce internals flag

This PR introduces the internals feature flag

Looks good! However, none of these methods looks particularly harmful as they are just accessors.

Yes, @bobbinth wants to make Processor into a private API, so we are exposing this for tests only.

Looks good! However, none of these methods looks particularly harmful as they are just accessors.

Yes, @bobbinth wants to make Processor into a private API, so we are exposing this for tests only.
Edit: Or maybe I misunderstood your question, and you're proposing doing the same thing as into_parts. The issue there was that this consumes the Processor, and these methods don't

Could be something similar to into_parts, yes. Being just a test, we shouldn't really care if we have extra clones as performance is not a concern.
But it's just different ways to approach the same problem. I just wonder if we should create extra code for something that can be solved with the current code.

Could be something similar to into_parts, yes. Being just a test, we shouldn't really care if we have extra clones as performance is not a concern.
But it's just different ways to approach the same problem. I just wonder if we should create extra code for something that can > be solved with the current code.

I didn't realise this could be solved in another way.  I think the point @vlopes11 makes is valid, we probably shouldn't be introducing this unless it's really necessary.  What do you think @hackaugusto?

The idea was not performance but readability. But I don't mind either way.
If the number of lines of code is a worry, then I suppose we could also have this struct in a private module and pub visibility:
#[cfg(feature = "internals")]
pub use internals::A;

mod internals {
    pub struct A {
        pub a: usize,
    }
}

That way we can access the attributes without consuming the data, which leaves it behind to use its methods, and we don't need any accessors.

Looks good! Thank you! I do have a couple of questions:

How is this going to be consumed in the miden crate (or anywhere else)? (i.e., if we want to have a test which accesses internal functionality of processor crate).
Instead of marking each method as internal, could we make the entire Process struct internal? (i.e., something similar to what is suggested @hackaugusto in https://github.com/0xPolygonMiden/miden-vm/pull/714#issuecomment-1440638172. I've never felt great about having Process struct be a part of the public interface, and the only reason it is public now is for testing purposes.

Following @hackaugusto and @bobbinth suggestion I have modified the Process struct such that it is private by default.  If the internals flag is provided then the Process struct and it's internals are exposed publicly.  Let me know what you think of this pattern.  One nit is that we will now have to specify --features "internals" when intending to run the full test suite but I don't think this is too big of a deal.

thanks for taking care of this! I left one comment, but overall looks good to me :)

So I've reviewed the feedback and I've converged on the following three rules regarding tagging testing objects:

If the object is only required for testing within the same crate it should be marked with [cfg(test)]
If the object is required for testing both within the same crate and some external crate it should be marked with [cfg(any(test, feature = "internals"))]
3 If the object is only required for testing of some external crate then it should be marked with [cfg(feature = "internals")]  (I'm not sure if we will ever experience this case).

I have updated the PR to reflect these rules and as such the only tag we need to add is #[cfg(any(test, feature = "internals"))] to the Process struct.  We then define the dependency of miden/tests on the internals flag in the Cargo.toml in the miden crate.  I think this is the cleanest approach.
I've also added a Makefile such that we can run the command:
RUSTFLAGS="-C debug-assertions" cargo test --release --features internals`

by executing make test from the root of the repo.
What do you guys think? @hackaugusto @bobbinth @vlopes11

So, I guess now to run the tests as we do in the CI we need to run something like this:
RUSTFLAGS="-C debug-assertions" cargo test --release --features internals

I'm wondering if there is a way to put this under a single command somehow.

I've added a Makefile to the root of the repo.  See latest comment for my thoughts on the rest of the PR.

@frisitano that sounds very good! One small nit.
We probably want the command to be, instead:
RUSTFLAGS="-C debug-assertions -C overflow-checks -C debuginfo=2" cargo test --release --features internal

We should probably update the CI with that, too. Release mode will suppress overflow errors, and they are often very dangerous as they can easily create attack vectors.

One alternative is to keep everything within the same block, with a heavy cost to readability
pub struct Foo {
    #[cfg(feature = "internals")]
    pub bar: String,

    #[cfg(not(feature = "internals"))]
    pub bar: String,
}

This would have the advantage to decrease chances that breaking changes in Process will be applied in only one of the implementations, but also it would make the struct quite unreadable. From my side, whatever of the two you prefer is fine by me!

One alternative is to keep everything within the same block, with a heavy cost to readability
pub struct Foo {
    #[cfg(feature = "internals")]
    pub bar: String,

    #[cfg(not(feature = "internals"))]
    bar: String,
}

This would have the advantage to decrease chances that breaking changes in Process will be applied in only one of the implementations, but also it would make the struct quite unreadable. From my side, whatever of the two you prefer is fine by me!

I think the problem here is that we want the Process struct itself to be private.

We probably want the command to be, instead:
RUSTFLAGS="-C debug-assertions -C overflow-checks -C debuginfo=2" cargo test --release --features internal

We should probably update the CI with that, too. Release mode will suppress overflow errors, and they are often very dangerous as they can easily create attack vectors.
I'm not very familiar with windows environments tho. Did Windows finally catch up or is it still unfriendly to use makefiles? I personally don't think we should heavily commit to windows requirements, but this is something to think about.
I did some quick research, and I saw a couple of suggestions to use MinGW, which is not very friendly/native. But then, windows users can just execute the command manually and it should be fine. Seems there is also a chocolatey package for make, so I guess that should suffice thinking

I have updated the command as you suggested.  Maybe we should create an issue to note that the CI should be updated?  I hadn't considered windows support for the Makefile.  As most of the team are using mac / linux I think we should be fine however I'm happy to change it.  Do you have any proposals?  Maybe a shell / bash script would be more portable?

@frisitano I think we can go without worrying about windows support too much.
If we are to support it, we can just recommend on the README to install make via the chocolatey package manager.


Uncaught Error: ENOENT: no such file or directory, lstat '~/Downloads\europe.png'

Tried to drag and drop an image from downloads.
Atom: 1.41.0 x64
Electron: 4.2.7
OS: Microsoft Windows 8.1
Thrown From: Atom Core
Stack Trace
Uncaught Error: ENOENT: no such file or directory, lstat 'C:\Users\Hannah\Downloads\europe.png'
At fs.js:115

Error: ENOENT: no such file or directory, lstat 'C:\Users\Hannah\Downloads\europe.png'
    at Proxy.realpathSync (fs.js:1435:7)
    at Proxy.fs.realpathSync (ELECTRON_ASAR.js:306:40)
    at TreeView.moveEntry (~/AppData/Local/atom/app-1.41.0/resources/app/static/<embedded>:14:1008510)
    at TreeView.onDrop (~/AppData/Local/atom/app-1.41.0/resources/app/static/<embedded>:14:1015683)
    at HTMLDivElement.<anonymous> (~/AppData/Local/atom/app-1.41.0/resources/app/static/<embedded>:14:989070)

Commands
  3x -8:53.4.0 core:backspace (input.hidden-input)
     -8:48.9.0 intentions:highlight (input.hidden-input)
     -8:48.2.0 core:save (input.hidden-input)

Non-Core Packages
atom-beautify 0.33.4
atom-ternjs 0.20.0
autoclose-html 0.23.0
busy-signal 2.0.1
csslint 1.2.0
emmet 2.4.3
intentions 1.1.5
language-ejs 0.4.0
linter 2.3.1
linter-jshint 3.1.17
linter-ui-default 1.8.0
pigments 0.40.2

Hi Hannah.

What did you expect Atom to do with the picture?
Why did you drag the picture into Atom?
What is the size of the picture?
Does that PNG open in a picture viewer?

Testing with a 720x720px PNG of ~20kB on my install: Atom opens the picture.

Thanks for reporting this!
This has already been fixed in https://github.com/atom/tree-view/pull/1358. It is currently scheduled for release when v1.53.0 reaches Stable.


Specifying a port does not work, always a random port is assigned.

First Check

[X] I added a very descriptive title to this issue.
[X] I used the GitHub search to find a similar issue and didn't find it.
[X] I searched the FastAPI documentation, with the integrated search.
[X] I already searched in Google "How to X in FastAPI" and didn't find any information.
[X] I already read and followed all the tutorial in the docs and didn't find an answer.
[X] I already checked if it is not related to FastAPI but to Pydantic.
[X] I already checked if it is not related to FastAPI but to Swagger UI.
[X] I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

[X] I commit to help with one of those options 👆

Example Code
from fastapi import FastAPI

app= FastAPI(
    redoc_url= None,
)

app.get("/")
async def root():
    return ("test")

Description
I am trying to run the code above,
python -m uvicorn main:app --port=8000 --reload
Which runs the API, that part is OK. However, the port is always assigned randomly and I cannot find a way to fix this.
INFO:     Uvicorn running on http://<IP_ADDRESS>:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [2432] using StatReload
INFO:     Started server process [2524]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     <IP_ADDRESS>:64692 - "GET /docs HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:64692 - "GET /openapi.json HTTP/1.1" 200 OK
Operating System
Windows
Operating System Details
Windows 11 Home SL
FastAPI Version
0.68.0
Python Version
3.10.2
Additional Context
No response

INFO: Uvicorn running on http://<IP_ADDRESS>:8000/ (Press CTRL+C to quit)

Server :point_up:

INFO: <IP_ADDRESS>:64692 - "GET /docs HTTP/1.1" 200 OK
INFO: <IP_ADDRESS>:64692 - "GET /openapi.json HTTP/1.1" 200 OK

Client ☝

As @Kludex mentioned, <IP_ADDRESS>:64692 is the client address, and your server is still running on port 8000. If you'd like to learn more you can read about ephemeral ports.

I will make sure to check it out, thank you very much.
Well, it appears there is some other issue with my current project.
Everything is still the same, however, whatever I add (such as the root function in the example code) does not appear on swagger ui.
When I add another function, such as
app.get("/test") async def test(data: str):     return {"data": data}
This is the output in the console
INFO:     <IP_ADDRESS>:65245 - "GET /test HTTP/1.1" 404 Not Found
And when I check it through chrome:
{"detail":"Not Found"}

Don't you mean
@app.get("/test")

The decorator is important.

Probably good to close this ticket when the port question was resolved.

just a typo from me, but you're right. the issue is out of topic so I' am closing the topic. thanks anyway.

Thanks for the help here everyone! 👏  🙇
Thanks for reporting back and closing the issue @ClaushIV  👍


Tooltip is offset when graph is near or beyond viewport edge

When hovering over a graph that is near or beyond the viewport's edge, the tooltip is positioned in the middle (on the Y axis) of the viewport.
I expect it to be positioned near the edge instead. Relevant code:
    <nvd3-line-chart
         height="300"
         data="data"
         showXAxis="true"
         showYAxis="true"
         interactive="true"
         showLegend="true"
         legendupdatestate="true"
         xAxisScale="xAxisTickScale()"
         xAxisTickValues="xAxisTickValues()"
         xAxisTickFormat="xAxisTickFormat()"
         xaxisrotatelabels="45"
         useInteractiveGuideLine="true"
         tooltips="true"
         interpolate="monotone"
         noData="{{'chart.noData' | translate}}">
    </nvd3-line-chart>

Is this issue going to be solved?
I tried https://github.com/novus/nvd3/issues/525, but no success.


gnome-feeds 1.0.3

Checklist

[x] Checked the nixpkgs master branch

[x] Checked the nixpkgs pull requests

Project name
nix search name: gnome-feeds

current version: 0.16.2
desired version: 1.0.3
Notify maintainers

maintainers: @pbogdan
Note for maintainers
Please tag this issue in your PR.

https://github.com/NixOS/nixpkgs/issues/204928


Add files via upload

@brouzuf First stage of verification passed, official domain is cssmi.qc.ca as far as I verified. This is just an informational note. Pull request is still in the review. I appreciate your patience while waiting for the final decision.

@brouzuf Thank you for your patience while waiting for a review and processing your request. Pull request merged.


add RateLimitExceededError

I've added a RateLimitExceededError class.
This exception provides the time you have to wait before retrying, which simplifies implementing rate limiting.

Some references may be helpful, take a note here:
https://github.com/octokit/plugin-throttling.js/blob/135a0f556752a6c4c0ed3b2798bb58e228cd179a/src/index.ts#L134-L179

@schelv i have made some changes to make the handle clearly. Could you please re-check this to ensure the handle is corrent? Thanks a lot.

It seems the graphql rate limit is not handled.

It seems the graphql rate limit is not handled.

They give a HTTP 200 status code when you exceed that limit 🤦♂
https://docs.github.com/en/graphql/overview/rate-limits-and-node-limits-for-the-graphql-api#exceeding-the-rate-limit
Maybe this? 😄
        if response.is_error:
            # check for errors.
            ....
        else:
            # also check for errors.
            ...

For graphql, according to the octokit throttling plugin, an error with RATE_LIMITED type will be returned when primary rate limit exceeded. i'm not sure if this will cover all cases (secondary rate limit). this may be improved in the feature.

Looks good!
What to do with the checks that are failing?

Don't worry about the reduced coverage, this is an imperfect test and is only used to ensure that it can run.


Feature type fbank_and_pitch throws error

I've created the settings.ini file to use Kaldi for feature extraction but it seems Persephone not picking up the settings.ini file from the directory.
here is my directory structure.
tree -L 1
.
├── constants.py
├── continuous_training.py
├── exp
├── kids_speech_sample
├── librispeech-lexicon.json
├── main.py
├── preprocess.py
├── __pycache__
├── settings.ini
├── transcribe.py
└── utils.py

Code generating the issue.
from persephone import corpus
from persephone import corpus_reader
from persephone import rnn_ctc

kids_corpus = corpus.Corpus("fbank_and_pitch", "phonemes", "kids_speech_sample")
print(kids_corpus.get_untranscribed_fns())
print(kids_corpus.get_train_fns())
print(kids_corpus.get_test_fns())

kids_corpus = corpus_reader.CorpusReader(kids_corpus, num_train=224, batch_size=16)
# model = rnn_ctc.Model("exp/", kids_corpus, num_layers=3, hidden_size=250)
#
# model.transcribe(restore_model_path="exp/model/model_best.ckpt")

and error message
WARNING:tensorflow:From /home/irfan/PycharmProjects/Timit_Phone_Recognition/.tpr/lib/python3.6/site-packages/persephone/model.py:22: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

WARNING:tensorflow:From /home/irfan/PycharmProjects/Timit_Phone_Recognition/.tpr/lib/python3.6/site-packages/persephone/model.py:27: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.

Unhandled exception
Traceback (most recent call last):
  File "/home/irfan/PycharmProjects/Timit_Phone_Recognition/transcribe.py", line 5, in <module>
    kids_corpus = corpus.Corpus("fbank_and_pitch", "phonemes", "kids_speech_sample")
  File "/home/irfan/PycharmProjects/Timit_Phone_Recognition/.tpr/lib/python3.6/site-packages/persephone/corpus.py", line 200, in __init__
    self.prepare_feats()
  File "/home/irfan/PycharmProjects/Timit_Phone_Recognition/.tpr/lib/python3.6/site-packages/persephone/corpus.py", line 395, in prepare_feats
    feat_extract.from_dir(self.feat_dir, self.feat_type)
  File "/home/irfan/PycharmProjects/Timit_Phone_Recognition/.tpr/lib/python3.6/site-packages/persephone/preprocess/feat_extract.py", line 151, in from_dir
    kaldi_pitch(dirname, dirname)
  File "/home/irfan/PycharmProjects/Timit_Phone_Recognition/.tpr/lib/python3.6/site-packages/persephone/preprocess/feat_extract.py", line 216, in kaldi_pitch
    subprocess.run(args)
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/oadams/tools/kaldi/src/featbin/compute-kaldi-pitch-feats': '/home/oadams/tools/kaldi/src/featbin/compute-kaldi-pitch-feats'

my settings.ini file content.
[PATHS]
SOX_PATH = "sox"
FFMPEG_PATH = "ffmpeg"
KALDI_ROOT = "/home/irfan/kaldi"

It doesn't look like the settings.ini file that you have created is not being used. In response to your comments here I've started a branch to try to try improve the defaults for the Kaldi path: https://github.com/persephone-tools/persephone/pull/238
Which file is the code that you reference in this issue located in?
Can you try modifying your code to import the configuration loading file by adding this line at the top of the imports:
from persephone import config

'transcribe.py' is the file I'm using to use the pitch feature.
Nope importing config does not help.

It would appear that the settings file is not being found. Can you try editing the config.py file in your site packages to include an absolute path to your configuration file? Knowing what happens in this case will help me determine what the cause of this bug is.

Okay, after changing the path is still shows the same error

This is a bit of a strange bug... I'm not entirely sure what's causing this. Is the code you are working on open source? If so I can try to reproduce the bug if you have a link to the source

Yes, check this
https://github.com/mirfan899/Timit_Phoneme_Recognition

Well, this is some strange behavior. After deleting the feat directory it seems settings.ini is being loaded and then throws another error.
/home/irfan/PycharmProjects/Timit_Phone_Recognition/.tpr/bin/python /home/irfan/PycharmProjects/Timit_Phone_Recognition/transcribe.py
WARNING:tensorflow:From /home/irfan/PycharmProjects/Timit_Phone_Recognition/.tpr/lib/python3.6/site-packages/persephone/model.py:22: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead.

WARNING:tensorflow:From /home/irfan/PycharmProjects/Timit_Phone_Recognition/.tpr/lib/python3.6/site-packages/persephone/model.py:27: The name tf.train.Saver is deprecated. Please use tf.compat.v1.train.Saver instead.

Unhandled exception
Traceback (most recent call last):
  File "/home/irfan/PycharmProjects/Timit_Phone_Recognition/transcribe.py", line 7, in <module>
    kids_corpus = corpus.Corpus("fbank_and_pitch", "phonemes", "kids_speech_sample")
  File "/home/irfan/PycharmProjects/Timit_Phone_Recognition/.tpr/lib/python3.6/site-packages/persephone/corpus.py", line 200, in __init__
    self.prepare_feats()
  File "/home/irfan/PycharmProjects/Timit_Phone_Recognition/.tpr/lib/python3.6/site-packages/persephone/corpus.py", line 389, in prepare_feats
    feat_extract.convert_wav(path, mono16k_wav_path)
  File "/home/irfan/PycharmProjects/Timit_Phone_Recognition/.tpr/lib/python3.6/site-packages/persephone/preprocess/feat_extract.py", line 186, in convert_wav
    subprocess.run(args)
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '"ffmpeg"': '"ffmpeg"'

Process finished with exit code 1

Okay, for now, it seems Kaldi pitch feature working after updating the settings.ini file.
changing KALDI_PATH to KALDI_ROOT_PATH and deleting the sox and ffmgeg path.
[PATHS]
KALDI_ROOT_PATH = /home/irfan/kaldi

Ah yes, I missed this, currently to set the root path for Kaldi you must use KALDI_ROOT_PATH and not KALDI_PATH. I see that the docs are not quite accurate here and I'll fix them over in my PR #238
@mirfan899  thanks for this issue, I didn't realize the docs were incorrect here.
@oadams  Do you think we should allow the support of KALDI_PATH? I propose that if only one is defined we can use the value that was defined. What should we do in the case of conflict where both KALDI_ROOT_PATH and KALDI_ROOT are simultaneously defined? I'm thinking that throwing an exception if both are supplied are a good idea.

I think I have fixed this issue and improved the default for Kaldi paths over in PR #238, would be keen to merge that in if the problem is fixed.


apply my own vscode settings

i prefer this one

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#46  👈 (View in Graphite)
#45
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Merge activity

Dec 29, 12:28 PM EST: A user merged this pull request with Graphite.


koordlet: fix cpi collector return value sequence

Signed-off-by: songtao98<EMAIL_ADDRESS>Ⅰ. Describe what this PR does
Previously the cpi collector utils has a return value sequence bug, which reverses the sequence of cycles and instructions , leading that when compute CPI we actually get the reciprocal of it.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews
V. Checklist

[ ] I have written necessary docs and comments
[ ] I have added necessary unit tests and integration tests
[ ] All checks passed in make test

/lgtm

/approve


Database - Current implementation of Coupon Codes returns incorrect codes

Codes are based on success or failure of the code entered. Incorrect values are displayed, incorrect codes are returned as a response.

Just an FYI if anyone is looking into this, otherwise I'll be tackling a project that will likely fix the bug

I've got an incoming fix for this, if you're bug hunting this- don't touch!


Will there be documentation of how this can be used with Typescript ?

I spent 1 hour integrating this into the project, but I came across a lot of incomprehensible obstacles that are not mentioned in the documentation.
I still don't know where to get the types for t and the rest of the functions.

t is probably the TFunction from react-i18next

@gromov-io We've got quite a few TS users. What obstacles did you encounter specifically? It would be helpful if you opened issues for each individual problem.


#419: Create a service locator for clients to be used in the commands.

I hope master is fine as target branch.

Thanks!


Scope variables, functions, methods, properties, objects, constants

Fixes #49, #71, #72, #149

Hi @sheetalkamat, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Sheetal Nandi). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;


How to retrieve the 3D mesh in a .ply or .obj format ?

Hi authors,
Is there some API to retrieve the 3D mesh in .ply and .obj format in your method ?

Hi @ankitatiisc,
We do not have an API for mesh retrieve, perhaps you can feed the image into our pretrained model to get the 3D mesh.

@chaneyddtt Similar to your Visualizer.generate_output_figures_v2 function; is there function to directly save mesh in the .ply format ? Sorry for not asking this question directly earlier.

For visualization, you can use trimesh and pyrender, here is an example:

Alternatively, you can also use the plotly.graph_objects to visualize the mesh. The export() function in Trimesh can be used to save mesh data.

Thanks!


terrascan: 1.7.0 -> 1.8.0

Motivation for this change
Update to latest upstream release 1.8.0
Change log: https://github.com/accurics/terrascan/releases/tag/v1.8.0
Things done

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

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 129145 run on x86_64-linux 1

1 package built:

terrascan


Add support for Corekube on RPC in the Solutions Tab

-1 if this is a Rackspace-managed template, the code needs to live with all the others in github.com/rcbops

@git-harry: I think we should be looking how to model 3rd party provided solution templates with this one.. You would not want to create a repo, and manage access rights for a 'partner' vendor providing their stack through this medium.
Lets use this opportunity to figure out the semantics for that type of scenario.

adding link to original PR (which is now closed) but adds more context to the merging of this PR: https://github.com/metral/rpc-extras/commit/914679aff20e779e46dc03824f4500235ecdc15b

@galstrom21
If this is a third-party template it seems misleading to brand it as RPC.
The URL being added is for a file in a branch not a specific SHA which doesn't seem a particularly strong guarantee of what is being used. That could possibly be argued as acceptable when Rackspace controls the repo but for third-party repos that seems like a bad idea.
Maybe customers would like to be able to choose whether or not they want third-party templates or even what list of templates they want to use.

@git-harry: Ok you have an issue with the repo name containing RPC.. that is an easy fix. @metral should be able to rename the repository to drop the RPC branding.
With regards to the sha/branch/head topic.. Everyone seems to have differing opinions on how that needs to be managed for a 3rd party repository. I would like to see the dev team have a discussion and come to a consensus on how yall want that managed, and then that standard can be applied here.

Hi @metral,
Sounds like we are still having some discussions here -- but could you rebase this change in the mean time?
Thanks!
--Matt

:-1:  patchset needs to be rebased.

Perhaps this should be made into a variable so that a user can add whichever extensions they want to add, 3rd party or no - in a more flexible way. Its then not our responsibility if those are added  by the user and are not "acceptable".
I think the point is valid, if the 3rd party extension changed in a malicious way we have no control over that and are simply deploying it as default to any deployers.

rebase complete

@andymcc: I agree there needs to be a way for a customer to add solution tab entries themselves..
But for this example, I think we should be deciding how we want to handle a 3rd party (read partner) solution. A partner solution will be different than a customer added solution tab entry.

@galstrom21 sure - imo we shouldn't advocate/support any solutions tab entries that we can't control, so that would mean its either in our repository or we submodule it (or some other method - using a specific SHA etc) so we can ensure we're happy with what is being pushed up, and it can't just change without us knowing about it.
I don't think it is sensible or good practice to just link to a 3rd party (of any type) repository that we have no control over without ensuring it is stable/tested - this opens us up to potential issues if changes are made to these repositories, that we don't control, that could adversely impact the deployers/users or us.

@andymcc: I do not disagree on pointing against a sha (or whatever mechanism for stability).. my point was that I would like to see us define a standard and apply it here.
Since this issue started there have heard requests for:

SHA
Branch
Tag
Point to Head

Once a standard has been defined, it can be applied in this pull request.

@claco @mancdaz
Need some managerial decisions on this issue.

Adding blocked status until we have the discussion/decision

@claco @mancdaz what managerial decisions were made?

@git-harry the discussions around ownership/support of these templates are still ongoing. I will try and get a better answer and come back here with an update


Split controller logic into scoped methods

The summary of changes (till date) is as follows:

Use pointers for API objects; this makes it easy to transfer state
between methods and limitizes the chance that we run in to
the object has been modified errors from the API server.
Split reconcile actions into dedicated methods; they are independent
and able to make decisions based on the current state of the object
they retrieve. This also makes it much easier to test their logic,
as an addition to having end-to-end tests.
Only use Client#Update when we actually update things that are not
the status object (those are at present: de(registering) finalizers).
For all other status updates, use Client#Status#Update.
Aggregate multiple returned errors using
k8s.io/apimachinery/pkg/util/errors.
Do not touch a suspended object, as it suspended. If we want to make
the suspendend state surface in e.g. kubectl, we should simply get
the value from the spec field instead of pushing a Ready==False
condition.

@seaneagan thanks for your additional round of review and thoughts. I did not have a chance last week to continue the work on this due to other priorities, but am hoping to revive the state of this PR (later) this week :sun_with_face:


Allow for sharing variables between projects!

Many vars will be shared between different projects in one specific lab. It’s helpful to not have to recreate them every time!
But also it’d be helpful to be able to filter by projects?

Possible with the digraph representation!


Crash when upgrading to FSharp.Formatting <IP_ADDRESS>

I came across the following crash when upgrading FSharp.Formatting in the mbrace-docs repository:
Generating 'c:\Users\eirik\Development\mbrace\mbrace-docs\docs\tools\..\content/azure-tutorial.html'
System.MethodAccessException: Attempt by method 'FSharpVSPowerTools.Lexer.|GenericTypeParameterPrefix|StaticallyResolvedTypeParameterPrefix|Other|@92(System.String, Microsoft.FSharp.Compiler.SourceCodeServices.FSharpTokenInfo)' to access method 'Microsoft.FSharp.Compiler.Parser.tokenTagToTokenId(Int32)' failed.
   at FSharp.CodeFormat.CodeFormatAgent.ParseSource(String file, String source, FSharpOption`1 options, FSharpOption`1 defines) in c:\Tomas\Public\tpetricek\FSharp.Formatting\src\FSharp.CodeFormat\CodeFormatAgent.fs:line 390
   at FSharp.Literate.ParseScript.parseScriptFile(String file, String content, CompilerContext ctx) in c:\Tomas\Public\tpetricek\FSharp.Formatting\src\FSharp.Literate\ParseScript.fs:line 198
   at FSharp.Literate.Literate.ParseScriptFile[d](String path, FSharpOption`1 formatAgent, FSharpOption`1 compilerOptions, FSharpOption`1 definedSymbols, FSharpOption`1 references, FSharpOption`1 fsiEvaluator) in c:\Tomas\Public\tpetricek\FSharp.Formatting\src\FSharp.Literate\Main.fs:line 67
   at FSharp.Literate.Literate.ProcessScriptFile(String input, FSharpOption`1 templateFile, FSharpOption`1 output, FSharpOption`1 format, FSharpOption`1 formatAgent, FSharpOption`1 prefix, FSharpOption`1 compilerOptions, FSharpOption`1 lineNumbers, FSharpOption`1 references, FSharpOption`1 fsiEvaluator, FSharpOption`1 replacements, FSharpOption`1 includeSource, FSharpOption`1 layoutRoots, FSharpOption`1 generateAnchors, FSharpOption`1 assemblyReferences, FSharpOption`1 customizeDocument) in c:\Tomas\Public\tpetricek\FSharp.Formatting\src\FSharp.Literate\Main.fs:line 167
   at <StartupCode$FSharp-Literate>.$Main.processScriptFile@184.Invoke(String file, String output) in c:\Tomas\Public\tpetricek\FSharp.Formatting\src\FSharp.Literate\Main.fs:line 184
   at <StartupCode$FSharp-Literate>.$Main.processDirectory@199(FSharpOption`1 format, Boolean processRecursive, FSharpFunc`2 processScriptFile, FSharpFunc`2 processMarkdown, String indir, String outdir) in c:\Tomas\Public\tpetricek\FSharp.Formatting\src\FSharp.Literate\Main.fs:line 218
   at FSharp.Literate.Literate.ProcessDirectory(String inputDirectory, FSharpOption`1 templateFile, FSharpOption`1 outputDirectory, FSharpOption`1 format, FSharpOption`1 formatAgent, FSharpOption`1 prefix, FSharpOption`1 compilerOptions, FSharpOption`1 lineNumbers, FSharpOption`1 references, FSharpOption`1 fsiEvaluator, FSharpOption`1 replacements, FSharpOption`1 includeSource, FSharpOption`1 layoutRoots, FSharpOption`1 generateAnchors, FSharpOption`1 assemblyReferences, FSharpOption`1 processRecursive, FSharpOption`1 customizeDocument) in c:\Tomas\Public\tpetricek\FSharp.Formatting\src\FSharp.Literate\Main.fs:line 181
   at FSI_0003.processDir@88(String topdir) in c:\Users\eirik\Development\mbrace\mbrace-docs\docs\tools\generate.fsx:line 93
   at FSI_0003.buildDocumentation() in c:\Users\eirik\Development\mbrace\mbrace-docs\docs\tools\generate.fsx:line 85
   at <StartupCode$FSI_0003>.$FSI_0003.main@() in c:\Users\eirik\Development\mbrace\mbrace-docs\docs\tools\generate.fsx:line 105
Stopped due to error

FCS <IP_ADDRESS> is not binary compatible with previous versions because some things have been made internal.  FSharp.Formatting uses a version constraint ">= 0.0.87" for FCS which is inherently dangerous since binary compat has never really been promised for FCS.  I think a constraint ">= 0.0.87" and "<= <IP_ADDRESS>" will work OK though in practice

I guess we should just update FSharp.Formatting to use the latest version then. But we are also relying on Visual F# PowerTools, so we might need to wait for them first...
In the meantime, is there a way to specify range in a nuspec file?

Note 1.4 is for F# 4.x support.  That might not be what you want when processing scripts as it may induce dependencies on having FSHarp.Core <IP_ADDRESS> available, at least check for that.

I see, didn't realize this is for F# 4.x. I'm testing a fix (specifying range in the NuGet package)

Ok, new version of F# formatting fixes this, but there is a big but....
If you are using Paket, you need to explicitly tell it that you want at least the current version of F# Formatting:
nuget FSharp.Formatting >= 2.10.3

As we did not have the constraint before, there is another valid resolution which is to get the latest F# Compiler Service and older release of F# Formatting. This will not work - but I think there is no way to prevent this - because the new incompatible version of FCS has a higher version :-(

Actually, maybe you only run into the issues if you also explicitly require FCS, which was the case in my project, which had:
nuget FSharp.Compiler.Service
nuget FSharp.Formatting >= 2.10.3

So, this should be OK for normal uses...

I am resolving into this:
    FSharp.Formatting (2.11.0)
      FSharp.Compiler.Service (>= 0.0.90 <= 1.3)
      FSharpVSPowerTools.Core (1.9.0)
    FSharpVSPowerTools.Core (1.9.0)
      FSharp.Compiler.Service (>= 0.0.90)

However I am still getting the same error
System.MethodAccessException: Attempt by method 'FSharpVSPowerTools.Lexer.|GenericTypeParameterPrefix|StaticallyResolvedTypeParameterPrefix|Other|@92(System.String, Microsoft.FSharp.Compiler.SourceCodeServices.FSharpTokenInfo)' to access method 'Microsoft.FSharp.Compiler.Parser.tokenTagToTokenId(Int32)' failed.
   at FSharp.CodeFormat.CodeFormatAgent.ParseSource(String file, String source, FSharpOption`1 options, FSharpOption`1 defines) in c:\Projects\FSharp.Formatting\src\FSharp.CodeFormat\CodeFormatAgent.fs:line 388
   at FSharp.Literate.ParseScript.parseScriptFile(String file, String content, CompilerContext ctx) in c:\Projects\FSharp.Formatting\src\FSharp.Literate\ParseScript.fs:line 198
   at FSharp.Literate.Literate.ParseScriptFile[d](String path, FSharpOption`1 formatAgent, FSharpOption`1 compilerOptions, FSharpOption`1 definedSymbols, FSharpOption`1 references, FSharpOption`1 fsiEvaluator) in c:\Projects\FSharp.Formatting\src\FSharp.Literate\Main.fs:line 67
   at FSharp.Literate.Literate.ProcessScriptFile(String input, FSharpOption`1 templateFile, FSharpOption`1 output, FSharpOption`1 format, FSharpOption`1 formatAgent, FSharpOption`1 prefix, FSharpOption`1 compilerOptions, FSharpOption`1 lineNumbers, FSharpOption`1 references, FSharpOption`1 fsiEvaluator, FSharpOption`1 replacements, FSharpOption`1 includeSource, FSharpOption`1 layoutRoots, FSharpOption`1 generateAnchors, FSharpOption`1 assemblyReferences, FSharpOption`1 customizeDocument) in c:\Projects\FSharp.Formatting\src\FSharp.Literate\Main.fs:line 167
   at <StartupCode$FSharp-Literate>.$Main.processScriptFile@184.Invoke(String file, String output) in c:\Projects\FSharp.Formatting\src\FSharp.Literate\Main.fs:line 184
   at <StartupCode$FSharp-Literate>.$Main.processDirectory@199(FSharpOption`1 format, Boolean processRecursive, FSharpFunc`2 processScriptFile, FSharpFunc`2 processMarkdown, String indir, String outdir) in c:\Projects\FSharp.Formatting\src\FSharp.Literate\Main.fs:line 218
   at FSharp.Literate.Literate.ProcessDirectory(String inputDirectory, FSharpOption`1 templateFile, FSharpOption`1 outputDirectory, FSharpOption`1 format, FSharpOption`1 formatAgent, FSharpOption`1 prefix, FSharpOption`1 compilerOptions, FSharpOption`1 lineNumbers, FSharpOption`1 references, FSharpOption`1 fsiEvaluator, FSharpOption`1 replacements, FSharpOption`1 includeSource, FSharpOption`1 layoutRoots, FSharpOption`1 generateAnchors, FSharpOption`1 assemblyReferences, FSharpOption`1 processRecursive, FSharpOption`1 customizeDocument) in c:\Projects\FSharp.Formatting\src\FSharp.Literate\Main.fs:line 181
   at FSI_0003.buildDocumentation() in D:\Code\GH-Exira\ges\docs\tools\generate.fsx:line 140
   at <StartupCode$FSI_0003>.$FSI_0003.main@() in D:\Code\GH-Exira\ges\docs\tools\generate.fsx:line 147

What do I exactly need to do to fix this?

not sure, but would releasing https://github.com/tpetricek/FSharp.Formatting/pull/345 help?

Here are the relevant files which cause it:
https://github.com/exira/ges/blob/master/paket.dependencies
https://github.com/exira/ges/blob/master/paket.lock
That repo build.cmd right now fails on it.

@forki perhaps, if I ran with this it worked:
nuget FSharp.Formatting 2.8.0
nuget FSharpVSPowerTools.Core 1.7.0

yeah but paket can't do magic. if stuff is in compatible we need to express this in the dependencies.

Does this issue need to be reopened then? Since the current dependencies actually don't work?

Yes it's breaking other things too. Like fsreveal
On Oct 13, 2015 7:39 PM, "David Cumps"<EMAIL_ADDRESS>wrote:

Does this issue need to be reopened then? Since the current dependencies
actually don't work?
—
Reply to this email directly or view it on GitHub
https://github.com/tpetricek/FSharp.Formatting/issues/337#issuecomment-147788114
.

Reopened. @matthid - do you have any thoughts on this? Feel free to do a new release if that can help. (Though it looks like the dependencies in the paket.lock posted by @CumpsD are reasonable...?)

For completeness sake, this is the last thing I managed to get working:
nuget FSharp.Formatting 2.8.0
nuget FSharpVSPowerTools.Core 1.7.0

    FSharp.Compiler.Service (<IP_ADDRESS>)
    FSharp.Core (<IP_ADDRESS>)
    FSharp.Formatting (2.8.0)
      FSharp.Compiler.Service (>= 0.0.86)
      FSharpVSPowerTools.Core (>= 1.7.0)
    FSharpVSPowerTools.Core (1.7.0)
      FSharp.Compiler.Service (>= 0.0.81)

Whenever I play with increasing version to something higher, things break at various places

If my understanding is correct, this is fundamentally because we get a version of FSharpVSPowerTools and a version of FSharp.Compiler.Service that are not compatible.
So perhaps we need some help from @dungpa and @vasily-kirichenko to better understand how to correctly reference VSPowerTools? (So that new releases of FSharp.Compiler.Service do not break FSharp.Formatting...??)

I tried forcing FSharp.Formatting 2.8.0 with the latest Powertools and latest compiler services (since the dependencies on powertools allow that) but strangely enough in that case I had a problem coming from powertools.
You can try with:
nuget FSharp.Formatting 2.8.0
nuget FSharpVSPowerTools.Core 2.1.0

    FSharp.Compiler.Service (<IP_ADDRESS>)
    FSharp.Core (<IP_ADDRESS>)
    FSharp.Formatting (2.8.0)
      FSharp.Compiler.Service (>= 0.0.86)
      FSharpVSPowerTools.Core (>= 1.7.0)
    FSharpVSPowerTools.Core (2.1.0)
      FSharp.Compiler.Service (>= <IP_ADDRESS>)

The problem here is https://github.com/exira/ges/blob/ca747a75b544259b714af65cf6535b776360296a/docs/tools/generate.fsx#L30
Because this is the 'first' #I line and because FAKE bundles a FSharp.Compiler.Service.dll (the latest) that one will be taken instead of the version our load script would load.
We cannot do much here at FSharp.Formatting and our dependencies are in fact correct as far as I can see.
One thing we could do would be to drop 'nuget' support and load our references via relative path (instead of by name) in FSharp.Formatting.fsx, but this may have different side-effects in other scenarios.
I think this issue can be closed.
TLDR:
@CumpsD Switch the #I Line (linked above) with the #load FSharp.Formatting.fsx line (directly below)

Ah, this was coming from ProjectScaffold https://github.com/fsprojects/ProjectScaffold/blob/master/docs/tools/generate.template#L30-L31

Confirmed to solve it.
My paket.dependencies:
redirects: on
source https://nuget.org/api/v2

nuget FSharp.Core
nuget FSharp.Formatting
nuget NUnit
nuget NUnit.Runners
nuget FAKE
nuget SourceLink.Fake
nuget EventStore.Client
nuget FsPickler.Json
nuget ExtCore
nuget Microsoft.Owin

github fsharp/FAKE modules/Octokit/Octokit.fsx

My paket.lock:
REDIRECTS: ON
NUGET
  remote: https://nuget.org/api/v2
  specs:
    EventStore.Client (3.3.1)
    ExtCore (0.8.45)
    FAKE (4.5.7)
    FSharp.Compiler.Service (0.0.90)
    FSharp.Core (<IP_ADDRESS>)
    FSharp.Formatting (2.11.0)
      FSharp.Compiler.Service (>= 0.0.90 <= 1.3)
      FSharpVSPowerTools.Core (1.9.0)
    FSharpVSPowerTools.Core (1.9.0)
      FSharp.Compiler.Service (>= 0.0.90)
    FsPickler (1.5.2)
    FsPickler.Json (1.5.2)
      FsPickler (1.5.2)
      Newtonsoft.Json (>= 6.0.5)
    Microsoft.Bcl (1.1.10)
      Microsoft.Bcl.Build (>= 1.0.14)
    Microsoft.Bcl.Build (1.0.21) - import_targets: false
    Microsoft.Net.Http (2.2.29)
      Microsoft.Bcl (>= 1.1.10)
      Microsoft.Bcl.Build (>= 1.0.14)
    Microsoft.Owin (3.0.1)
      Owin (>= 1.0)
    Newtonsoft.Json (7.0.1)
    NUnit (2.6.4)
    NUnit.Runners (2.6.4)
    Octokit (0.16.0)
      Microsoft.Net.Http
    Owin (1.0.0)
    SourceLink.Fake (1.1.0)
GITHUB
  remote: fsharp/FAKE
  specs:
    modules/Octokit/Octokit.fsx (4982e503ccc973ed1f047a52ff69a675ec4b66e1)
      Octokit

The fix:
#load "../../packages/FSharp.Formatting/FSharp.Formatting.fsx"
#I "../../packages/FAKE/tools/"

Probably should be ported back to the guys from ProjectScaffold

If you can send a fix to ProjectScaffold, that would be awesome!

https://github.com/fsprojects/ProjectScaffold/pull/212

Thanks!
I see what's happening now - there are two different copies of FSharp.Compiler.Service (one coming with FAKE and one coming with F# Formatting) and the ordering determines which one gets loaded...

ah so maybe we should internalize that into FSharp.Formatting. I'd like to
do this in FAKE, but I know a couple of scripts that assume that the file
is there
2015-10-14 10:34 GMT+02:00 Tomas Petricek<EMAIL_ADDRESS>
Thanks!
I see what's happening now - there are two different copies of
FSharp.Compiler.Service (one coming with FAKE and one coming with F#
Formatting) and the ordering determines which one gets loaded...
—
Reply to this email directly or view it on GitHub
https://github.com/tpetricek/FSharp.Formatting/issues/337#issuecomment-147974364
.

or wait. maybe I can still do this FAKE
2015-10-14 10:39 GMT+02:00 Steffen Forkmann<EMAIL_ADDRESS>
ah so maybe we should internalize that into FSharp.Formatting. I'd like to
do this in FAKE, but I know a couple of scripts that assume that the file
is there
2015-10-14 10:34 GMT+02:00 Tomas Petricek<EMAIL_ADDRESS>
Thanks!
I see what's happening now - there are two different copies of
FSharp.Compiler.Service (one coming with FAKE and one coming with F#
Formatting) and the ordering determines which one gets loaded...
—
Reply to this email directly or view it on GitHub
https://github.com/tpetricek/FSharp.Formatting/issues/337#issuecomment-147974364
.

In F# Formatting, we could have two NuGet packages - one with everything internalized (for "tool-like" use) and one with nothing internalized (for "library-like" use). Though even then, I can imagine scenarios where things would not be ideal.
I guess internalizing FSharp.Compiler.Service in FAKE is safer, because it is always used as a tool. But what happens when the F# Compiler Service running inside FAKE tries to load another F# Compiler Service that remains a mystery to me (I guess it might work though...)

FAKE 4.6 comes with internalized FCS. Please check it out.

ok this was a bad idea and crashes ALL Fake scripts. reverting

One thing we could do would be to drop 'nuget' support and load our references via relative path (instead of by name) in FSharp.Formatting.fsx, but this may have different side-effects in other scenarios.

Ok scratch that. I tried it and it doesn't work...
Now some really weird stuff:

Instead of a MissingMethodException I would expect a mighty "Could not load file or assembly or one of its dependencies", because there is no Assembly-Redirect in fsi.exe and Powertools requires 0.90.
-> Maybe this is because we load a dynamic assembly (build via reflection.emit)

OK what if we try with FAKE.exe instead of FSI.exe (which has no assembly redirect for FSC as well and uses a real assembly on the second call, because of saving the compilation results). So I figured I get a MissingMethodException on the first call and a AssemblyLoadException or something on the second call
-> but packages/FAKE/tools/FAKE.exe docs/tools/generate.fsx is actually working. What the heck is going on here? Why does it work (even with the wrong FSharp.Compiler.Service.dll loaded)?

 Fixing this now.

yeah. the other thing didn't work. When I ILRepack into FakeLib.dll the I get an invalid CLR program ...

@Krzysztof-Cieslak just reported an error with FsLab journals, which was caused by this too.
I tried understanding what's going on, but I have absolutely no idea what is compatible with what. I get the above error with the following combo:

FSharp.Compiler.Service (= 0.0.90)
FSharpVSPowerTools.Core (= 1.9.0)
FSharp.Formatting (= 2.11.0)

But at the moment, that's the only allowed mix... Do we need to:
a) Just update to FCS 1.4 (now that there is a matching VFPT release)?
b) Use VFPT 1.9 with FCS 1.3.1?
What is better option?

This also does not work:

FSharp.Compiler.Service (= <IP_ADDRESS>)
FSharpVSPowerTools.Core (= 1.8.0)
FSharp.Formatting (= 2.10.0)

Is there any combination at the moment that actually works??

I guess this might also be happening because FsLab silently loads the version from FAKE, but I can't seem to figure out how to avoid that.

Does FCS 1.4 require a different version of FSharp.Core? (which would make upgrading a nightmare...)

I have absolutely no idea what's going on here. But it seems that the version of FAKE I'm using has some effect here...

If you download FsLab journal template, then things will work.

But if you download it and change this line to require FAKE 4.5.5 rather than 4.5.4, then things break (on my machine at least).

Is this just me or can others reproduce this?

This combo works:
    FAKE (4.5.7)
    FSharp.Compiler.Service (0.0.90)
    FSharp.Core (<IP_ADDRESS>)
    FSharp.Formatting (2.11.0)
      FSharp.Compiler.Service (>= 0.0.90 <= 1.3)
      FSharpVSPowerTools.Core (1.9.0)
    FSharpVSPowerTools.Core (1.9.0)
      FSharp.Compiler.Service (>= 0.0.90)

On Oct 17, 2015 19:16, "Tomas Petricek"<EMAIL_ADDRESS>wrote:

This also does not work:

FSharp.Compiler.Service (= <IP_ADDRESS>)
FSharpVSPowerTools.Core (= 1.8.0)
FSharp.Formatting (= 2.10.0)

Is there any combination at the moment that actually works??
—
Reply to this email directly or view it on GitHub
https://github.com/tpetricek/FSharp.Formatting/issues/337#issuecomment-148935346
.

Working with FAKE 4.5.4.
Not working with any later - I've checked  latest (4.7.1), 4.6.4, 4.6.0, 4.5.7, 4.5.6`

Yes it's related to the FAKE update to FSharp.Core-4 and FSharp.Compiler-Service-1.4. However I'm not completely sure why it WORKS within a FAKE environment (FAKE.exe) but NOT outside.
The documentation generation script depends on FakeLib.dll which itself depends on the latest FSC.dll. On the other hand the script depends on FSharp.Formatting which depends on an older FSC.dll. Definitely a (high level) problem there.
By the way this seems to work as well:
nuget FSharp.Formatting == 2.11.1-alpha1 // Any recent version will work
nuget FSharpVSPowerTools.Core == 2.1.0
nuget FSharp.Compiler.Service == 1.4.2 // Any 1.4

So after updating to FSharp.Core 4 and PowerTools 2.1 it will probably start to work OK again. However understanding why it DOES work in a FAKE.exe even with a FSharpVSPowerTools.Core version which SHOULD NOT work still puzzles me (can somebody reproduce this with running the script with FAKE.exe instead of fsi.exe or is it just some weird thing happening on my machine?). I think in the future we should add some more tracing to figure out exactly which assemblies are loaded (but they are loaded lazily ...).

My tests result are all based on FsLab template and run using FAKE script.

Thanks everyone for going through the additional test cases. Now I'm really puzzled what change in FAKE is doing this...
I tried printing the version of FCS loaded in current AppDomain in FAKE 4.5.4 and it still prints the 1.4 version of FCS (but then it works....)

If you download FsLab journal template, then things will work.
But if you download it and change this line to require FAKE 4.5.5 rather than 4.5.4, then things break (on my machine at least).

Can confirm but not explain this ...
Maybe FAKE.exe runs in a security context where it is allowed to access internal methods, that would at least explain how it can sometimes work at all... Maybe the context sometimes changes depending on how assemblies are build (the only difference in 4.5.4 and 4.5.5 is adding groups and paket update https://github.com/fsharp/FAKE/compare/4.5.4...4.5.5)
To close this issue we should release a version compatible with latest FAKE (ie update to powertools 2.1.0 and latest Fsharp.Compiler.Service)
The only safe option to prevent this error for now are (at least as far as I can understand this currently):

Tell people to either upgrade FSharp.Formatting
Downgrade FAKE to version 3

Maybe we should somehow detect a valid fake version and fail early if we are not compatible?

Yeah, we should definitely update F# Formatting to latest versions.. but I would still like to understand why this is happening.
Looks like there was no relevant change in FAKE, so perhaps this is something that has been caused by an update of FCS from version <IP_ADDRESS> to version <IP_ADDRESS>. Perhaps there was some change there that affected how assemblies are loaded in FSI evaluator....?

Looks like FCS does not have a tag on GitHub for <IP_ADDRESS>, but here are the changes between <IP_ADDRESS> and <IP_ADDRESS>: https://github.com/fsharp/FSharp.Compiler.Service/compare/<IP_ADDRESS>...<IP_ADDRESS>

but I would still like to understand why this is happening.

definitely...
<IP_ADDRESS> was the first version where the methods where made internal (https://github.com/fsharp/FSharp.Compiler.Service/blob/master/RELEASE_NOTES.md#1403--). This is what @dsyme was mentioning on his first post. So I think that's the solution to the mystery? It works until FAKE-4.5.4 because it uses FSharp.Compiler.Service < <IP_ADDRESS> and doesn't work on later versions.
Funny change for a patch level version number increase :).
However this bug also shows that locking our versions in the package doesn't really solve anything for us when running within FAKE. Maybe we should figure out a way to solve this eventually, when we are hit by this again (Spawning our own AppDomain?).

Ah, I see... so really, when running inside FAKE, we always end up running against the FAKE version of F# Compiler Service... Well that's a bummer.
I guess that's what @forki was trying to solve by internalizing F# Compiler Service, so that we can load our own version.
This is all a bit silly, but at least I get it now :)

Another idea would be to move FSharp.Formatting from the build into the main dependency group of FAKE, this would ensure that FAKE is updating FSharp.Compiler.Service only when we update it here.
@forki would you accept such a change in FAKE? That's not really in the spirit of paket groups and FSharp.Formatting is not a dependency of FAKE AND most important other projects can't really do the same (it is not the correct solution but a hack imho)

Wait - I'm not sure I understand - how is this related to Paket groups? (I thought the issue is just that FAKE comes with FCS and now it happens to come with one that's not compatible with F# Formatting...)

Yes, but by putting fsf into the main group FAKE's own dependency file
would work. Then paket would resolver a FCS that is compatible to fsf. And
we would ship that version with FAKE.
On Oct 18, 2015 21:41, "Tomas Petricek"<EMAIL_ADDRESS>wrote:

Wait - I'm not sure I understand - how is this related to Paket groups? (I
thought the issue is just that FAKE comes with FCS and now it happens to
come with one that's not compatible with F# Formatting...)
—
Reply to this email directly or view it on GitHub
https://github.com/tpetricek/FSharp.Formatting/issues/337#issuecomment-149041370
.

I'm actually ok with that and would accept pr
On Oct 19, 2015 09:17, "Steffen Forkmann"<EMAIL_ADDRESS>wrote:

Yes, but by putting fsf into the main group FAKE's own dependency file
would work. Then paket would resolver a FCS that is compatible to fsf. And
we would ship that version with FAKE.
On Oct 18, 2015 21:41, "Tomas Petricek"<EMAIL_ADDRESS>wrote:

Wait - I'm not sure I understand - how is this related to Paket groups?
(I thought the issue is just that FAKE comes with FCS and now it happens to
come with one that's not compatible with F# Formatting...)
—
Reply to this email directly or view it on GitHub
https://github.com/tpetricek/FSharp.Formatting/issues/337#issuecomment-149041370
.

I have one more idea: What about adding FAKE as a dependency of FSharp.Formatting? That should work as well and is a better solution imho (as we really do depend on FAKE in the projectscaffold use-case). Ideally we would not add the dependency to the library package and only to a "scripting" package. But it should not do any harm either (an additional download in the worst case). For FAKE it would lead to slower adoption rates for new versions (as everyone needs to wait for a FSF update).
This solution assumes that people have FSharp.Formatting and FAKE in the same paket group...

This solution assumes that people have FSharp.Formatting and FAKE in the
same paket group.
that's pretty fair assumption.

2015-10-19 18:01 GMT+02:00 Matthias Dittrich<EMAIL_ADDRESS>
I have one more idea: What about adding FAKE as a dependency of
FSharp.Formatting? That should work as well and is a better solution imho
(as we really do depend on FAKE in the projectscaffold use-case). Ideally
we would not add the dependency to the library package and only to a
"scripting" package. But it should not do any harm either (an additional
download in the worst case). For FAKE it would lead to slower adoption
rates for new versions (as everyone needs to wait for a FSF update).
This solution assumes that people have FSharp.Formatting and FAKE in the
same paket group...
—
Reply to this email directly or view it on GitHub
https://github.com/tpetricek/FSharp.Formatting/issues/337#issuecomment-149259006
.


Added id and label key generators

Partially implements #15

@bernard-wagner can you add or update appropriate test cases to exercise the new public API functions?

Any guidance on how to structure these tests without duplicating all the existing tests, as the same code paths will be covered 99% of the time.

Closing this PR, per my comment above (https://github.com/ThalesIgnite/crypto11/pull/22#issuecomment-454391162).


knife ec2 does not conform to AWS/EC2 switch role (security tokens)

Evidently, the knife ec2 plugin only works with AWS access keys and secret access keys tied to account specific users.   It does not confirm to AWS "switch" role temporary access/secret keys based on SECURITY TOKENS.   We need the ec2 plugin to conform to this as temporary keys and tokens are becoming more widely adopted by AWS architects and engineers.
Information: http://docs.aws.amazon.com/STS/latest/UsingSTS/Welcome.html

+1
Agree with @rcsavage - this is a very common pattern nowadays.

@rcsavage , --aws-session-token option is added in latest knife-ec2. Closing this issue for now. Please feel free to re-open if any issue.


Adds progress Allocation to represent Decentralized Allocation Tree node.

Part of #1297. The Allocation class will be used by the ProgressEvent.

Not specifically about this, but autobuilder is a great alternative to writing these out by hand.

Hmm, I'm not sure if AutoValue Builder is able to work for the single-method builder we have here?

I see this will have no problem constructing the allocation tree.
However, I think I don't fully understand the intended usage in practice yet. I thought about some scenarios from the perspective of a developer trying to construct the whole tree with multiple depth of method calls and am left with some questions. For example, it isn't yet clear if whether it would be a caller or callee that should call newChild, if it is OK to pass the root or some child node to multiple, sequential method calls and/or pass the node down multiple call depth, if we can enforce matching the allocation units with the minimum number of newChild calls (or if it is necessary), what a callee should do if it just wants to mark completion (i.e., what info to emit as an event) when the allocation the callee got is a root node, etc. Perhaps better to ask these offline.


fixed crash with DET

Pull Request Description
What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)
Closes #1929

What are the significant changes in functionality due to this change request?
Addition of a mapping for fully correlated variables

For Change Control Board: Change Request Review
The following review must be completed by an authorized member of the Change Control Board.

[ ] 1. Review all computer code.
[ ] 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
[ ] 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
[ ] 4. Automated Tests should pass, including run_tests, pylint, manual building and xsd tests. If there are changes to Simulation.py or JobHandler.py the qsub tests must pass.
[ ] 5. If significant functionality is added, there must  be tests added to check this. Tests should cover all possible options.  Multiple short tests are preferred over one large test. If new development on the internal JobHandler parallel system is performed, a cluster test must be added setting, in  XML block, the node <internalParallel> to True.
[ ] 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change.  The requirements and the requirements test shall be in sync.
[ ] 7. The merge request must reference an issue.  If the issue is closed, the issue close checklist shall be done.
[ ] 8. If an analytic test is changed/added is the the analytic documentation updated/added?
[ ] 9. If any test used as a basis for documentation examples (currently found in raven/tests/framework/user_guide and raven/docs/workshop) have been changed, the associated documentation must be reviewed and assured the text matches the example.

@mandd

@mandd  did this fix the issue with the user or something more is needed?

@mandd ?


java.lang.NullPointerException issue

I'm having some trouble listing all of my data. every time it gets to the following code I get a java.lang.NullPointerException  error.
List<Boards> boards = Boards.listAll(com.eds.billboard.model.Boards.class);

I'm hoping someone can help me with this.
Thanks

I had also problems with that in 1.3 but could you please post the stacktrace to see what's going on and where?

+1

Having the same issue here. It started on Thursday and I've been using Sugar ORM for about 5 months now.

I was able to solve my issue. I'm going to post it just in case someone else runs into the same issue.  Basically I'm extending the Sugar app class and removed super in onCreate by mistake.

my solution.i just upgrade db version in manifest to 2.

Here's my stack trace
18406-18406/com.eds.bills E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.eds.bills, PID: 18406
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.eds.bills/com.eds.bills.Boards}: java.lang.NullPointerException
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2334)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
            at android.app.ActivityThread.access$900(ActivityThread.java:169)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:146)
            at android.app.ActivityThread.main(ActivityThread.java:5487)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.NullPointerException
            at com.orm.SugarRecord.find(SugarRecord.java:204)
            at com.orm.SugarRecord.listAll(SugarRecord.java:134)
            at com.eds.bills.Boards.PopulateBoardList(Boards.java:138)
            at com.eds.bills.Boards.onCreate(Boards.java:29)
            at android.app.Activity.performCreate(Activity.java:5451)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
            at android.app.ActivityThread.access$900(ActivityThread.java:169)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:146)
            at android.app.ActivityThread.main(ActivityThread.java:5487)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
            at dalvik.system.NativeStart.main(Native Method)
```

I finally figured it out, I forgot to add the following to my manifest file
android:name="com.orm.SugarApp"

added that and now it works.

yo eman thank you.. we have same problem. now its ok..

Thanks eman !


Olivia Zoe: Watch bdsm-bondage-fetish.ch

Olivia Zoe requests the watch of the watch_keyword bdsm-bondage-fetish\.ch. See the Metasmoke search here and the Stack Exchange search here.

bdsm-bondage-fetish\.ch has been seen in 0 true positives, 0 false positives, and 0 NAAs.

!!/approve

Coverage remained the same at 65.087% when pulling f10a8aff114b1204a483a9f4682e8c5f078f3dbc on auto-blacklist-1523707871.2068863 into e69bf31a286ce154d4c723531588e729f31ce3ea on master.


infocard: Adding support to redirect to publicip

Adding support to redirect to publicip. Works with cks clusters after https://github.com/apache/cloudstack/pull/4414

@blueorangutan package

@davidjumani a Jenkins job has been kicked to build primate packages. I'll keep you posted as I make progress.

I checked few views where this lgtm, but it could add regression for few possible places if ipaddress is not returned just ipadddressid


Split zip - Could not read corresponding local file header for file header

Hey! I have an issue with the split zip file created by 7z.
Zip file contains 1 image, 1 text file, and I'm doing a simple extraction:
try (var zipFile = new ZipFile("correctPathToZip\\some.zip.001")) {                 zipFile.extractAll("pathWhereToUnzip");             }
part1 and part2 are in the same folder. Image is extracted correctly, but for the text file I'm getting
net.lingala.zip4j.exception.ZipException: Could not read corresponding local file header for file header: some/test.log
I have attached my taste case. It seems like an issue in zip4j but I'm not 100% sure about it.
It could be related to a small text file.
Any idea what is the root cause of this issue?
testCase.zip

Thanks for the zip file. I was able to reproduce it. I will look into whats going wrong here.

Hi, i faced the some exception on the above split zip.
It is created via 7zip software, we may need to take a look on code part about handling 7zip split.

I am currently working on a fix for this. I will include the fix in the next release.

Fixed in v2.11.0 released today


initWithDsnString

Platform:

[x]  iOS
[ ]  tvOS
[ ]  MacOS
[ ]  watchOS

Swift:

[ ]  Yes -> If yes, which version?
[x]  No

sentry-swift installed with:

[ ] Cocoapods
[ ] Carthage
[x] Manually

Version of sentry-swift:
2.1.7

I have following issue:
For some reason, my app suddenly crashes at initWithDsnString. I implemented Sentry for two-three weeks ago, and everything has been working smoothly until today. I tried to upgrade Sentry-swift and KSCrash to the lastest version, but it still crashes at the same spot.
Steps to reproduce:

initWithDsnString

0x10044c840 <+128>:  add    x8, x28, x8
0x10044c844 <+132>:  str    x8, [sp, #0x38]
0x10044c848 <+136>:  stp    xzr, xzr, [x8]
0x10044c84c <+140>:  str    xzr, [x8, #0x10]
0x10044c850 <+144>:  strb   w9, [x8, #0x18]
0x10044c854 <+148>:  nop
0x10044c858 <+152>:  ldr    x22, #0x3f8b0             ; (void *)0x0000000100c09468: _swiftEmptyArrayStorage
0x10044c85c <+156>:  mov    x0, x22
0x10044c860 <+160>:  bl     0x100428fb4               ; rt_swift_retain
0x10044c864 <+164>:  sub    x8, x29, #0x78            ; =0x78*
0x10044c868 <+168>:  mov    x0, x22
0x10044c86c <+172>:  bl     0x100428a18               ; function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Dead> of generic specialization <Swift.String with Swift.String : Swift.Hashable in Swift, Swift.String> of static Swift._NativeDictionaryStorage.fromArray (Swift.Array<(A, B)>) -> Swift._NativeDictionaryStorage<A, B> at Contexts.swift
0x10044c870 <+176>:  ldp    x19, x24, [x29, #-0x78]
0x10044c874 <+180>:  ldp    x25, x26, [x29, #-0x68]

It crashes on the line:
0x10044c864 <+164>:  sub    x8, x29, #0x78            ; =0x78
How can I fix this to get it to work again?

Can you double check your code, since we haven't changed anything recently in the init process.

The problem is that I have not touched a thing since it worked the last time, which is why i am stumped.

Could it be that you updated to Xcode 8.3? Did you do a clean build? CMD+Shift+Alt+K

Yes, it turns out I have XCode 8.3 now. I tried deleted DerivedData and did a clean. It did not help. Is there something I have to do to get it work in 8.3? Thanks.

I have a objc project running locally with the latest version which works without any problems.
Using swift3 for compiling sentry (which you have to because xcode 8.3 does no longer support swift 2.3)

Thank you for your time. I am getting a more elaborated error message now:
dyld: Symbol not found: __TMaCs28_NativeDictionaryStorageImpl
  Referenced from: /.../.../Frameworks/Sentry.framework/Sentry
  Expected in: /.../.../Frameworks/libswiftCore.dylib

Just to be sure, the KSCrash og Sentry frameworks should be added to "Copy Files", and not Embed Framework, or Link Binary with Libraries? Is there any other configuration needed in XCode? I just think it is strange that it suddenly now crashes, just because of the Xcode update.

please make sure following settings are the same in all your targets.

Thanks, but I am trying to use it in a Objective-C project, so I assume there might be a different configuration needed? Before it stopped working, the only thing I changed was "Always embed swift standard libraries", and set it to Yes. I

I am in the exact same situation.  I have an Objective-C project and the app started crashing upon launch as soon as I updated to Xcode 8.3.1 (from 8.2).  I tried updating to the latest Sentry with no luck.  I have been unable to figure out a configuration that works.

Hey,
We've just released version 3.0.0 which is a rewrite in objc, please consider upgrading the errors should be gone.


Allow configuring the prepared statement cache

Running into an error where the first time a query executes (using the cursored execution mode) it works, but running it again fails because my SQL Server didn't recognize the cached prepared statement handle.
In my use-case, disabling the statement cache would be sufficient - my queries don't run very often. But in general, perhaps having discovery options that can control this cache, or exposing PreparedStatementCache as a type that applications can provide their own implementation of, would be suitable?
As a workaround I am reflectively updating the ConnectionOptions.preparedStatementCache field with my own "NoCache" implementation. But this is obviously not ideal.
I'm using 0.8.5.RELEASE, and running on Java 11. SQL Server version is 2012.

Sounds like a good enhancement. Do you want to submit a pull request?

Yep. Can do.

I see errors Could not find prepared statement with handle<PHONE_NUMBER> when repeating queries fast.
Actually not really fast, I do it by clicking a button repeatingly. If I click once per second, everything is fine. If I click faster I get the error sometimes. Sometimes it also seems to stuck and I get the error for every attempt.
In one of my applications I enabled the R2DBC pool configuration what solved the problems. In another of my application the enabling the pool didn't change the behavior at all.
What do you think. Can this PR solve this problem?


Nonetype accepted by datasaver

Fixes #1125 .

I got a little confused by the discussion in #1125. Is this ready for review now?

Yes @WilliamHPNielsen it is

The fix in data_set.py is a genuine fix! Great job. An alternative to
expected_keys = frozenset.union(*[frozenset(d) for d in results])

could be to ask the database what the keys are, but since we don't need to provide all parameters (we don't, right?), I think this is better.
Let us agree on option 1. or 2. from #1125 before merging. I vote 1.

You are right of course, I voted for option 1. I will remove the offending code.
As for your comment that we can look for all parameters in the database, I tried that and it does not appear to work. I think the reason is that before the first write to database, there are no parameters yet

I think the reason is that before the first write to database, there are no parameters yet.

That is a very good point.

@WilliamHPNielsen Lets merge this if there are no further comments.


[Compatibility Test] Oracle rac

Is your suggestion a test requirement/change or improvements of the test framework? Please describe.
Required to test oracle rac compatibility test with IS 7.1.0
Describe the solution you would prefer

Optional Fields
Additional context

Related Issues:

L1 issue reported during the testing phase - https://github.com/wso2/product-is/issues/21618


Add support to Solidity language

I would be really nice if we could support Solidity syntax.

Hey, thanks for the suggestion!. As of Carbon 3.0.0, the core Carbon team is no longer implementing new themes or languages ourselves (although we are adding the ability to create your own soon!), but we are happy to accept PRs to add new ones.
Please see https://github.com/dawnlabs/carbon#a-note-on-adding-themeslanguages for notes on how to do so 😄, and feel free to implement this!


replace brin with btree indexes where needed

This updates flyway to add an action_log index and replace brin with btree indexes on action and report_file where needed.
Test Steps:

Validate new indexes are used for the following queries:

select * from report_file
where report_id in
(select report_id
from action_log
where action_log_id > 19500000
and action_log_id < 20100000
group by report_id having count(*) > 1);

select A.created_at from action A
where
    A.action_name = 'receive'
    and A.sending_org = 'abbott'
  and created_at > now() - interval '4 weeks'
    and A.action_id > 0
order by created_at
limit 50;

 select count(*) as submissions, sum(item_count) as records_submitted
 from report_file
 where sending_org is not null and created_at >= timestamp with time zone '2022-10-01';

Changes

add an action_log index
replace brin with btree indexes on action and report_file where needed

Checklist
Linked Issues

Fixes #7920

To Be Done

Manually add indexes to production, as CREATE will only run if the indexes DO NOT exist and DROP will only run if the indexes DO exist.

Looks good! I'll work on getting before/after timing for queries listed above as well as a few of my own.
Green light from me to deploy this tonight.


Add API endpoint for all observations not in an array of place_ids

I want a way to look for any observations outside of a taxa's atlas place presences (#1154) since these would either be cool discoveries or data quality issues that should be fixed.
Can we add an API endpoint to obs/search that returns all observations not in an array of place_ids (the atlas presence places in this use case)?
e.g. if the atlas presence places included everything here except Minnesota, I could use them and this proposed API endpoint to fetch the observation of Aspidoscelis gularis  in Minnesota

How's this http://www.inaturalist.org/observations?not_in_place=1,6712,6793 ?

perfect!


Eufy Security Wont Load

Getting the below in my logs and Eufy Security won't load after restarting my Eufy Dual wired Doorbell and HA.
Logger: homeassistant.components.binary_sensor
Source: helpers/entity_platform.py:619
Integration: Binary sensor (documentation, issues)
First occurred: 1:22:46 PM (4 occurrences)
Last logged: 1:25:20 PM
Error adding entities for domain binary_sensor with platform eufy_security
Error while setting up eufy_security platform for binary_sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 619, in _async_add_entity
device = dev_reg.async_get(self.hass).async_get_or_create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: DeviceRegistry.async_get_or_create() got an unexpected keyword argument 'hardware'

For a workaround see issue #855