Documentation is a bit unclear

Hi! Could you please explain in more detail what these flags are for?
-gxgbin: the bin index to compute the ME effect
-k: number of random vector
-jn: number of jackknife blocks
-annot: annotation file
Is the annotation file the one used in this paper to include "the  carrier  status  at  the  target  gene,  and  genotypes  that  potentially  interact  with the target feature" ? The paper mentions an extension beyond common variants as implemented in FAME. Not sure if this information is included in the annotation file or if this modified version of FAME has not been released yet.
Thank you! :)

Thanks for your interest in our software.
 We just added the software we used for the paper you mentioned to the branch "extTarget". Please check the corresponding readme for more details.
To answer your question:
-annot: the path to the annotation file. Intuitively, the annotation file guides you on partitioning the genotype matrix by features. we added more explanation to the README. Please check if the new description is clear.
-gxgbin: you need to provide an annotation file (MxK) with K bins across the M features. Here is the value of gxgbin corresponding to the column index of the annotation file. For example, if gxgbin=1, and the annotation file has 100 "1"s at column 2, then the ME effect of the target feature interacting with the 100 corresponding SNPs will be computed.
-k, -jn: you can put 100 for those two flags for simple analysis. More details can be found at: https://doi.org/10.1038/s41467-020-17576-9

Thanks for making this brach available.
I'm still a bit puzzled about which file corresponds to which.
In the paper you define a C_t variable like this:

Ct represents the target pseudo gene of interest and denotes whether individuals carry a burden of pathogenic variants at the target gene t defined as follows: Ct=0 if individual i does not carry any relevant pathogenic variants at target genes. and Ct=1 if individual i carries at least one pathogenic variant at the target gene(s) t. Where exactly is this file? With which flag do you call it? I see a target.txt flag but this seem to be continuous values.

Then multi-annot.txt is the one to divide G into G1 and G2 (close vs long-distant SNPs). Correct me if I'm wrong.
Finally gxgbin in the paper case would be 2 since E_t=C_t*G_2? (You're measuring interaction between target and distal SNPs)?

Hi,
Sorry for the delayed reply. You are correct that it should be the target.txt file. In this synthetic setting it was continuous, but you can also provide the standardized binary file.
"Then multi-annot.txt is the one to divide G into G1 and G2 (close vs long-distant SNPs)"
That's correct. We typically use multi-annot for the purpose of excluding LD block from the analysis. But you can also do other types of analysis.
" (You're measuring interaction between target and distal SNPs)?":
That's also correct


farmIntegrationTest does not stop container when integrationTest or container deployment fails

Running gradlew farmIntegrationTest works perfectly unless some exception occurs.
When integrationTest gradle-task fails, then the container (e.g. jetty) stop command is not run. So after next gradlew farmIntegrationTest the webserver is running, and the gretty prematurely has to end its process.
The gretty workflow for integration test does not specify how errors are handled.
See the gradle log with a protractor nodejs task.
[launcher] overall: 1 failed spec(s)
[launcher] Process exited with error code 1
:e2e-test:integrationTest FAILED
:e2e-test:appAfterIntegrationTest SKIPPED

The configuration file:
plugins {
    id "war"
    id "java"
}

apply plugin: 'org.akhikhl.gretty'

gretty {
    httpPort = 8080
    servicePort = 9090
    statusPort = 9091

    jvmArgs = ['-Dspring.profiles.active=development']
}

task killJetty {
    mustRunAfter('integrationTest')

    doLast {
        println("Kill jetty") // this is not called
    }
}

farm {
    webapp '../web-api/build/libs/my-bundle.war'
    webapp project
}

task integrationTest {
    doFirst {
        project(':frontend').tasks['runProtractor'].execute() // execute for demonstration purposes
    }
}

I see the same behavior with appRun when there is an error on startup - ERROR Error starting server. My expectation would be that the container would be stopped:
gradle -version

------------------------------------------------------------
Gradle 2.8
------------------------------------------------------------

Build time:   2015-10-20 03:46:36 UTC
Build number: none
Revision:     b463d7980c40d44c4657dc80025275b84a29e31f

Groovy:       2.4.4
Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM:          1.8.0_60 (Oracle Corporation 25.60-b23)
OS:           Mac OS X 10.10.5 x86_64

plugins {
    id "war"

    id "org.akhikhl.gretty" version "1.2.4"
}

gretty {
    httpPort = 5656
    scanInterval = 2
    reloadOnClassChange = true
    reloadOnConfigChange = true
    servletContainer = "jetty9"
}


DOC: rationalize minimize() et al. documentation

Move documentation of solver options out from very long show_options() docstring to the internal solver functions.  Extract the docstring from these functions in show_options() and with minor magic also in the Sphinx documentation.
This way, the generated documentation contains a separate entry for each method=... value of minimize(), root(), minimize_scalar() and linprog(), each entry containing only the relevant solver option explanations.
The result looks like this: http://pav.iki.fi/tmp/scipy-opt-doc/optimize.html
Note the changes in the function signatures in the method= pages. Also note that with this change, the documentation for each solver appears in a more logical place in the code, and duplication is reduced.
It might be a good idea (after this PR) to move the solver-specific references out from the minimize() docstring to the method-specific docstrings.
This PR should address some of the observations in issue XXX (some issue that I can't find now, but which contained lengthy rants about the current situation)

Looks great!

LaTeX math does not seem to render, eg here:
http://pav.iki.fi/tmp/scipy-opt-doc/optimize.nonlin.html#module-scipy.optimize.nonlin
The same place in the docs for the last release: http://docs.scipy.org/doc/scipy/reference/optimize.nonlin.html

that's probably unrelated?

Yes, the math problem is unrelated. Displaying mathjax elements requires fetching javascript code from the mathjax site, and my web server's security policy is configured to tell browsers to not allow that.

Looks good to me overall, modulo minor remarks.
That's a very nice improvement!

Merged in e81956b. Thanks @pv!


Error in preprocessing_fn: AttributeError: 'Image' object has no attribute 'max'

I went to run the example I had before again but with classes=1 per #4; however, it seemed to error out in a different spot. I didn't think I had changed the code, but at the same time the most recent commit predates when I shared the reproducer notebook.
Here's another reproducer (pinned to the most recent commit) for a different error.
AttributeError                            Traceback (most recent call last)
[<ipython-input-7-15a16e61f48a>](https://localhost:8080/#) in <module>()
      2 preprocessing_fn = smp.encoders.get_preprocessing_fn('resnet50', 'imagenet')
      3 img = np.asarray(img)
----> 4 pred = pmm.segmentation_training.segmentation_models_inference(cropped_img, model, preprocessing_fn, batch_size=4, patch_size=224, device='cpu', probabilities=None)

1 frames
[/usr/local/lib/python3.7/dist-packages/pretrained_microscopy_models/segmentation_training.py](https://localhost:8080/#) in segmentation_models_inference(io, model, preprocessing_fn, device, batch_size, patch_size, num_classes, probabilities)
    204     # This will not output the first class and assumes that the first class is wherever the other classes are not!
    205
--> 206     io = preprocessing_fn(io)
    207     io_shape_orig = np.array(io.shape)
    208     stride_size = patch_size // 2

[/usr/local/lib/python3.7/dist-packages/segmentation_models_pytorch/encoders/_preprocessing.py](https://localhost:8080/#) in preprocess_input(x, mean, std, input_space, input_range, **kwargs)
     10
     11     if input_range is not None:
---> 12         if x.max() > 1 and input_range[1] == 1:
     13             x = x / 255.0
     14

AttributeError: 'Image' object has no attribute 'max'AttributeError                            Traceback (most recent call last)
[<ipython-input-7-15a16e61f48a>](https://localhost:8080/#) in <module>()
      2 preprocessing_fn = smp.encoders.get_preprocessing_fn('resnet50', 'imagenet')
      3 img = np.asarray(img)
----> 4 pred = pmm.segmentation_training.segmentation_models_inference(cropped_img, model, preprocessing_fn, batch_size=4, patch_size=224, device='cpu', probabilities=None)

1 frames
[/usr/local/lib/python3.7/dist-packages/pretrained_microscopy_models/segmentation_training.py](https://localhost:8080/#) in segmentation_models_inference(io, model, preprocessing_fn, device, batch_size, patch_size, num_classes, probabilities)
    204     # This will not output the first class and assumes that the first class is wherever the other classes are not!
    205
--> 206     io = preprocessing_fn(io)
    207     io_shape_orig = np.array(io.shape)
    208     stride_size = patch_size // 2

[/usr/local/lib/python3.7/dist-packages/segmentation_models_pytorch/encoders/_preprocessing.py](https://localhost:8080/#) in preprocess_input(x, mean, std, input_space, input_range, **kwargs)
     10
     11     if input_range is not None:
---> 12         if x.max() > 1 and input_range[1] == 1:
     13             x = x / 255.0
     14

AttributeError: 'Image' object has no attribute 'max'

It looks like you just needed to make cropped_img a numpy array.
cropped_img = np.asarray(cropped_img)
FYI, I'll be on vacation until July 11th, but I'll check back in at that time. Happy 4th of July!

I went ahead and committed an error check for that. Hopefully it doesn't break anything!

Ah wow, good catch! Enjoy your vacation, and happy 4th!


Re-enable py35 travis tests?

It looks like this version supports python 3.5.

:tada: !

Re-enabled in #221


Automatically detect XeLaTeX?

I am just starting to use atom for LaTeX, and the Atom-LaTeX package is great for a start. However, I am usually writing documents using pdflatex but talks (due to the awesome metropolis theme) with xelatex. Of course I can change the settings whenever I switch working on a project, but:
Is there a way to detect that automatically?
For one, many editors handle the
%! TEX program = latexmk -xelatex
line to compile that specific file with xelatex; other helpers (for example in TextMate, which was my previous editor) the compiler to choose was based on whether fontspec or xunicode was loaded (both require to use xelatex) and used that as an indicator.
Would it be possible to add this automatism to atom-LaTeX as well?

As an alternative for the magic comment line you proposed:
Atom-LaTeX searches for a .latexcfg file in your working directory, in which you can specify your compiler toolchain. An example is given in the end of Readme.md.
This doesn't fulfill your request, but might fix your workflow.

But...I like magic!
Jokes aside, you're right having two .latexcfg s (or at least one for my xelatex cases) would yield the result I want to have, namely that compiling a project with xelatex (prepared with said config) would work without changing the settings.
“With magic” (i.e. without copying a config to each project requiring xelatex) would still be nicer :) but thanks for the fix for my workflow.

@kellertuer This is indeed a "todo" feature that I need to find time to implement (PR's welcome!)
Since you like magic - have a look at arara - then choosing your per project toolchain is as simple as
% arara: xelatex: { shell : yes }
% arara: bibtex
% arara: xelatex: { shell : yes }
% arara: xelatex: { shell : yes }

Thanks for the info, I've never tried arara, but I think I'll give it a try, since that really looks like what I'd like to have (when it's not possible to have that completely automated) :)
I've never worked on Atom Plugins/Packages, so I am not of help for your PR.

Closing this in favour of above issue.

As a (final) remark, the arara package does the job for now, though I switched also to
 % arara: xelatex: {synctex: yes, action: nonstopmode, options: "-file-line-error-style", shell: yes}

instead of just activating the shell.


SELECT not populating OneToMany relations

I'm seeing an issue where my db.select() statements are not populating any OneToMany member variables in my model object, but a db.update() is. I tried both with and without using explicit joins. Am I using the library wrong? How do I get the joins to occur when I call db.select()?
It seems that .update() with CascadeAction.DELETE should remove entities that don't exist in the model being passed. Instead, I'm seeing that .update() is joining the missing entities from the OneToMany relationship from the database which .select() should have joined and that none are being deleted. While this makes a good workaround for the above issue, I'm baffled by the behavior.
@Inject
SingleEntityStore<Persistable> db;

     // ...
     CredentialsEntity credentials = db.select(CredentialsEntity.class)
                .where(CredentialsEntity.CREDENTIALS_ID.eq(SINGLE_ROW_ID))
                .get().first();
     // In debugging, none of the Target children are joined at this point to the credentials object
     // I can't seem to find any explicit joins that will work either

     db.update(credentials).toBlocking().value();
     // Now, the Target objects are joined and they exist in the credentials object
     // However, .update() should be a destructive operation that I don't want to use here

@Entity(stateless = true)
@JsonDeserialize(as = CredentialsEntity.class)
public abstract class Credentials implements Persistable {

       @Key
       int parent_id;

       @OneToMany(mappedBy = "credentials", cascade = {CascadeAction.DELETE, CascadeAction.SAVE})
       List<Target> endpoints;
}

@Entity(stateless = true)
@JsonDeserialize(as = TargetEntity.class)
public abstract class Target implements Persistable {

     @Key
     @JsonProperty(value = "target_id")
     String targetId;

     @ManyToOne
     Credentials credentials;
}

The behavior you're asking for is usually referred to as eager fetching relations. That's not currently supported in the current version. The current version supports lazy fetching which is also the default in most JPA frameworks. So you would simply call getTargets() or whatever the name of the target collection in your Credential class is called to load the relation.
Update is not a query operation but it may need to load some joined entities in order to perform a cascade operation. It should only be used when you have changes in your object you want to persist.
Hope that makes sense.

I'm not seeing that the generated getEndpoints function is actually loading the relation at all. That's the reason I bugged this issue. I was able to load the relation if I did an update operation as a side-effect, but I was not able to load the relation with a SELECT followed by an accessor from the credentials object. Instead, all of my OneToMany relations were empty, 0-sized lists.

How did you create the entity? if it's been attached through the store (either by querying and returning it as a result, or insert/updating it) then getEndpoints() should load the data.
Also you can refresh any property or relation at anytime through the refresh api e.g. data.refresh(entity, CredentialsEntity.ENDPOINTS) that will also work

Yes, I created the entity by doing this. The getEndpoints() function is not loading the data.
            SqlCipherDatabaseSource source = new SqlCipherDatabaseSource(app, Models.DEFAULT, DBSetup.DB_NAME, installId, SCHEMA_VERSION);
            source.setTableCreationMode(TableCreationMode.CREATE_NOT_EXISTS);
            if (BuildConfig.DEBUG) {
                source.setLoggingEnabled(true);
            }
            Configuration configuration = source.getConfiguration();

            rxDb = RxSupport.toReactiveStore(
                    new EntityDataStore<>(configuration));

            CredentialsEntity credentials = rxDb.select(CredentialsEntity.class)
                .where(CredentialsEntity.CREDENTIALS_ID.eq(SINGLE_ROW_ID))
                .get().toObservable().toBlocking().first();
            credentials.getEndpoints(); // this returns an empty list even though the database has data here
            rxDb.update(credentials).toBlocking().value(); // this insane workaround populates the credentials endpoints objects

I am having the same issue. I can see the tables are generated correctly when looking at the generated sqlite database, but when calling select(), the OneToMany relations are not populated. The workaround of calling refresh() worked for me as well, but I was hoping to avoid having to do that.
   Result<AllProduct> productResult = data.select(AllProduct.class).get();
   Iterator<AllProduct> productIterator = productResult.iterator();
   while(productIterator.hasNext()) {
      // iterating through AllProducts works

      // Calling data.refreshAll(allProduct); here causes the ProductDetail OneToMany relation
      // to be populated.

      List<ProductDetail> details = allProduct.getProductDetails();
      // details is an ObservableList of size 0.

      for (ProductDetail detail : details) {
         // does not enter the loop
         Log.i(TAG, "detail: " + detail.getProductName());
      }
   }

My models AllProduct and ProductDetail are similar to the Credentials and Target classes in the example in the original post.
AllProduct:
@Entity(stateless = true)
@JsonDeserialize(as = AllProductEntity.class)
public interface AllProduct extends Persistable, Parcelable {

    @Key
    @Generated
    int getId();

    String getName();

    @OneToMany(mappedBy = "allProduct", cascade = {CascadeAction.DELETE, CascadeAction.SAVE})
    List<ProductDetail> getProductDetails();
}

ProductDetail:
@Entity(stateless = true)
@JsonDeserialize(as = ProductDetailEntity.class)
public interface ProductDetail extends Persistable, Parcelable {

    @Key
    int getProductTemplateID();

    String getProductName();

    @ManyToOne
    @JsonIgnore
    AllProduct getAllProduct();
}

It works if I remove stateless = true. However, now when inserting AllProducts with mData.insert(allProductsList); the OneToMany relation in AllProduct is not persisted.
I ended up doing this:
public void writeToDatabase(List<AllProduct> allProductsList) {
   for(AllProduct allProduct : allProductsList) {
      insertProductDetails(allProduct.getProductDetails(), allProduct);
      mData.insert(allProduct);
   }
}
private void insertProductDetails(List<ProductDetail> details, AllProduct allProduct) {
   for (ProductDetail detail : details) {
      detail.setAllProduct(allProduct);
      mData.upsert(detail);
   }
}

List<AllProduct> is an ArrayList that is deserialized from json using jackson.
Is this the correct way of inserting a object with a OneToMany relation? Is it possible to have the insert() update the OneToMany relations automatically?

Hi,
in case you didn't notice, you can follow the discussion about the collection insertion problem in #388.


URL-encode semicolons in query parameters

Thank you for your contribution to Go-AutoRest! We will triage and review it as soon as we can.
As part of submitting, please make sure you can make the following assertions:

[ ] I've tested my changes, adding unit tests if applicable.
[ ] I've added Apache 2.0 Headers to the top of any new source files.

Fixes https://github.com/Azure/azure-sdk-for-go/issues/15108


Indent after equation when there is no newline between equation and paragraph

Whenever I include text immediately after an equation, I get a small indent in the text. Example:

If I put a new line (in the code) between the end of the equation and the text, then this goes away, but the vertical spacing is way too large. Example:

Any idea how to get rid of the small indent?

I could not reproduce the problem: which equation environment are you using?

Oh, interesting. I looked into it and found out I only ran into the problem when I had an \index or marginfigure immediately between the equation and following paragraph. I figured out how to fix it with \index{X}: I just change \index{X} to \index{X}%. I was unable to figure out how to fix it with marginfigure, though (tried putting % in a couple places).

Very interesting. Putting more % definitely goes in the right direction, however, they must be added almost everywhere! I have already added them in the definition of marginfigure & co. but this is not enough: you will have to add a % after every \end{marginfigure}. Thus, with the latest version, a syntax similar to the following will do the trick:
\begin{equation}
    e^{i\pi} + 1 = 0
\end{equation}
\begin{marginfigure}
    \includegraphics{examples/documentation/images/monalisa}
    \caption{ciao}
\end{marginfigure}%
This text will not be indented.

By the way, this is not only a kaobook problem, it happens even in other classes, e.g.
\documentclass{scrbook}

\usepackage{graphicx}

\begin{document}

Hello, here the document starts.

\begin{equation}
    e^{i\pi} + 1 = 0
\end{equation}
\begin{figure}
    \includegraphics{examples/documentation/images/monalisa}
    \caption{ciao}
\end{figure}
This paragraph will have a small indent (unless the previous line in the code has a \% at the end).

\end{document}

Brilliant! Confirmed that it works on my end!


Failure at Update Readme Discord Badge to latest Upstream

Hi! i tried running your discord badge but unfortunately it fails to run due to an error on "Update Readme Discord Badge to latest Upstream" can you help me fix this?
Err code:
`Run<EMAIL_ADDRESS>/usr/bin/docker run --name codexlinkdiscordactivitybadgelatest_f34f43 --label 08450d --workdir /github/workspace --rm -e INPUT_DISCORD_USER_ID -e INPUT_DISCORD_BOT_TOKEN -e INPUT_BADGE_IDENTIFIER_NAME -e INPUT_COMMIT_MESSAGE -e INPUT_PROFILE_REPOSITORY -e INPUT_URL_TO_REDIRECT_ON_CLICK -e INPUT_WORKFLOW_TOKEN -e INPUT_CUSTOM_ACTIVITY_STRING -e INPUT_GAME_ACTIVITY_STRING -e INPUT_RICH_PRESENCE_STRING -e INPUT_STREAM_ACTIVITY_STRING -e INPUT_SPOTIFY_ACTIVITY_STRING -e INPUT_ONLINE_STATUS_STRING -e INPUT_IDLE_STATUS_STRING -e INPUT_DND_STATUS_STRING -e INPUT_OFFLINE_STATUS_STRING -e INPUT_CUSTOM_ACTIVITY_COLOR -e INPUT_GAME_ACTIVITY_COLOR -e INPUT_RICH_PRESENCE_COLOR -e INPUT_STREAM_ACTIVITY_COLOR -e INPUT_SPOTIFY_ACTIVITY_COLOR -e INPUT_ONLINE_STATUS_COLOR -e INPUT_IDLE_STATUS_COLOR -e INPUT_DND_STATUS_COLOR -e INPUT_OFFLINE_STATUS_COLOR -e INPUT_STATIC_SUBJECT_STRING -e INPUT_PREFERRED_PRESENCE_CONTEXT -e INPUT_TIME_DISPLAY_OUTPUT -e INPUT_TIME_DISPLAY_ELAPSED_OVERRIDE_STRING -e INPUT_TIME_DISPLAY_REMAINING_OVERRIDE_STRING -e INPUT_TIME_DISPLAY_SHORTHAND -e INPUT_PREFERRED_ACTIVITY_TO_DISPLAY -e INPUT_SHIFT_STATUS_ACTIVITY_COLORS -e INPUT_SPOTIFY_INCLUDE_ALBUM_PLAYLIST_NAME -e INPUT_STATUS_CONTEXT_SEPERATOR -e INPUT_IS_DRY_RUN -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/Harleythetech/Harleythetech":"/github/workspace" codexlink/discord-activity-badge:latest
[632ms, INFO] at utils.py:142 -> The logger has been loaded with Coverage Level 20. (INFO)
[632ms, INFO] at entrypoint.py:69 -> Running local mode invocation not detected. Skipping checks for '.env'.
[632ms, INFO] at utils.py:430 -> Environment Variables stored in-memory are successfully resolved!
[633ms, INFO] at api.py:61 -> ClientSession for API Requests has been instantiated.
[640ms, INFO] at api.py:64 -> Discord Client Instantiatied with intents=DISCORD_CLIENT_INTENTS=
[640ms, INFO] at api.py:68 -> AsyncGithubAPILite is done initializing other elements.
[643ms, INFO] at api.py:202 -> Attempting to Fetch README from Github API <<< Harleythetech/Harleythetech (https://api.github.com/repos/Harleythetech/Harleythetech/readme)
[643ms, INFO] at badge.py:265 -> Other non-important elements loaded, waiting for the Discord Client Task to finish before continuing...
[776ms, INFO] at badge.py:269 -> Discord Client Task is done. Processing the badge...
[866ms, INFO] at api.py:129 -> Github Profile (Harleythetech/Harleythetech) README has been fetched. | Remaining Requests over Rate-Limit (999/1000)
[867ms, INFO] at badge.py:124 -> Converting README to a Readable Format...
[868ms, INFO] at badge.py:88 -> Conversion from Base64 (String) to Readable README Markdown Format is done and is loaded into the memory!
[868ms, INFO] at badge.py:138 -> Attempting to identify the badge inside README...
[869ms, INFO] at badge.py:157 -> Badge with Identifier ((Script) Discord Activity Badge) not found! New badge will append on the top of the contents of README.md. Please arrange/move the badge once changes has been pushed!
[869ms, INFO] at badge.py:166 -> Awaiting for the badge construction task to finish...
Traceback (most recent call last):
File "/app/entrypoint.py", line 175, in
entry_instance: AbstractEventLoop = loop_instance.run_until_complete(
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 690, in _wrap_awaitable
return (yield from awaitable.await())
File "/app/entrypoint.py", line 113, in start
data=[self.readme_data.result()[0], badge_updater.result()],
File "/app/badge.py", line 171, in check_and_update_badge
constructed_badge: BadgeStructure = self.badge_task.result()
File "/app/badge.py", line 271, in construct_badge
presence_ctx: dict[str, Any] = self.user_ctx[
AttributeError: 'DiscordActivityBadge' object has no attribute 'user_ctx'
Task exception was never retrieved
future: <Task finished name='DiscordClient_UserFetching' coro=<Client.start() done, defined at /usr/local/lib/python3.9/site-packages/discord/client.py:649> exception=LoginFailure('Improper token has been passed.')>
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/discord/http.py", line 300, in static_login
data = await self.request(Route('GET', '/users/@me'))
File "/usr/local/lib/python3.9/site-packages/discord/http.py", line 254, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/discord/client.py", line 665, in start
await self.login(*args, bot=bot)
File "/usr/local/lib/python3.9/site-packages/discord/client.py", line 511, in login
await self.http.static_login(token.strip(), bot=bot)
File "/usr/local/lib/python3.9/site-packages/discord/http.py", line 304, in static_login
raise LoginFailure('Improper token has been passed.') from exc
discord.errors.LoginFailure: Improper token has been passed.
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f74afed3340>
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f74b0b925e0>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f74afed42e0>,<PHONE_NUMBER>99)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f74aff71af0>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f74afe61d00>,<PHONE_NUMBER>81)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f74afed3c70>`
thank you!

Hello! Thank you for taking an interest in this project, I tried to replicate and it seems I know the issue, the instructions are not complete 😟
Basically, when you are in the part of creating the discord app, you need to create a discord bot there, the reason why is that, bots can read your state if they are part of your guild (server), with that, check the following screenshot and I hope you will get the proper token this time (should be longer than or exactly 70 characters I supposed).

Kindly replace your DISCORD_BOT_TOKEN with the new secret and let me know if it when okay.
Also note that I will be refactoring the whole thing along with complete instructions this time.

Update
so the mistake was on my side 😆
Unfortunately I have mistaken Application ID with the Bot's ID that's why it failed.
Thank you for the fast response!

Sure no problem! I will be closing this issue as it was resolved.


Fix building on Windows

Prior to this commit, it was not possible to build on Windows because of signal_hook. This commit changes the way signal_hook is used to only be imported when on Unix-like systems.
Additionally, during 49b1ad a variable was mistakenly left unchanged for the Windows variant of a function, which caused the build to fail.
This commit should resolve https://github.com/ferrous-systems/flamegraph/issues/49.
I've no idea what signal_hook is being used for here; please let me know if removing it from Windows would remove the functionality of the program as well.

Duplicate of https://github.com/ferrous-systems/flamegraph/pull/46, so closing in favor of that (which I can hopefully merge shortly)


Using REST /v2/router/send endpoint results in unexpected EOF'

Background
we've noticed a failure rate of about 60% of our sends (using REST api endpoint /v2/router/send)  from our testnet LND node.  it's an obscure error with a response of
{ code: 3, message: 'unexpected EOF', details: [] }
We originally thought it was due to running the latest v0.15.0-beta.rc6 but have since setup 2 more clean nodes running v0.14.3 on different machines and are still getting this error regularly.  it results in the send to fail completely most of the time.
Your environment

version of lnd
v0.15.0-beta.rc6 and v0.14.3-beta

which operating system (uname -a on *Nix)
Linux lnd-testnet 5.4.0-1078-gcp #84~18.04.1-Ubuntu SMP Fri Jun 3 13:37:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

version of btcd, bitcoind, or other backend
btcd - v0.22.0-beta

any other relevant environment details
Running LND in docker alpine using Dockerfile from LND
executing the REST call via Nodejs v16 using vanilla https library.

Steps to reproduce
setup a testnet LND node.
call /v2/router/send REST endpoint. we use NodeJS to talk to LND.  here's an attempt to give you a really stripped down version of how we query:
    options =  {
      ca: "<Buffer 2d 2d ... 768 more bytes>",
      host: '<IP_ADDRESS>',
      port: 8082,
      headers: {
        'Grpc-Metadata-macaroon': '02011...3334432'
      },
      path: '/v2/router/send',
      method: 'POST',
      body: {
        payment_request: 'lntb1p32j7dzpp5rsu...myeh9lagqu382yy',
        fee_limit_sat: 2,
        timeout_seconds: 45,
        amt: 334
      }
    }

    const req = https.request(options, (res) => {
      const body = [];
      res.on('data', (chunk) => {
        body.push(chunk);
      });
      res.on('end', () => {
        if (res.statusCode < 200 || res.statusCode >= 300) {
          throw new Error(`Request Error: ${res.statusCode}: ${res.statusMessage}`));
        }

        return Buffer.concat(body).toString(); // will contain '{ code: 3, message: 'unexpected EOF', details: [] }'
      });
    });

    req.on('error', reject);
    if (options.body) {
      req.write(options.body);
    }
    req.end();

Expected behaviour
the send should actually work
Actual behaviour
about 60% of the time, the send fails with { code: 3, message: 'unexpected EOF', details: [] }  the other 40% it works just fine.

Hi guggero, thanks for pointing me to those docs.  After reimplementing using websockets, i'm seeing 100% success rate...so far.
Something to point out though, is that the docs do not make mention of needing to use the websockets library if you want things to go smoothly.  in other words, the docs here https://api.lightning.community/#v2-router-send use the request (which is deprecated in favor of http.request) library to make a simple POST request, and we ended up writing our own stream-decoding-parser for handling the stream of payment updates.  which seemed to work... 40% of the time.  It was the other 60% with intermittent failures that made us very confused.
even moreso, was we used the same approach for subscribing to the invoices endpoint, but had no failures on that one... it was only the send endpoint that was giving us EOF errors.
After spending much time on this, it seems that the API docs could use some mentioning of using websockets and link to websocket docs.  or better, use websockets (ws library) in the examples instead of request

You're right, the API docs doesn't mention WebSockets in the Python examples.
So both the file https://github.com/lightninglabs/lightning-api/blob/master/templates/rest/lnd_python.md and https://github.com/lightninglabs/lightning-api/blob/master/templates/grpc/lnd_python.md should be updated accordingly.
I'm no Python programmer, so perhaps you could create a PR to that repo?
I'll review and test the changes.


Simplifications to API, proper use of principal/credentials, and make Au...

...thProvider first class genned interface
@vietj please review
I have some TODO in the docs. Would like to complete that after milestone4 :)

looks good enought to me


Add support for customizing right/left buttons

It doesn't seem possible to provide a custom right or left button with this library.

It is:
const renderRequestsRightButton = () => {
    return (
      <NavigationBarButtonItem>
        <Button onPress={addRequest}>
          <Icon
            color="#007AFF"
            name="plus"
            size={20}
          />
          Add
        </Button>
      </NavigationBarButtonItem>
    );
  };

  return (
    <Route
      component={ConnectedRequestsView}
      name="requests"
      renderRightButton={renderRequestsRightButton}
      title="Requests"
      type="replace"
    />
  );

If I got it correctly, you should be able to pass any of the following props to your routes: https://github.com/exponentjs/ex-navigator/blob/master/ExRoute.js#L6

I was able to find a similar solution in one of the other closed issues. Would be a great candidate to add to the README or the Example app.


SolRDF logo

Thanks to  @ubdesign for this cool logo, which has been realized simply by a merge. Nice idea. I think I prefer more the version without "SolRDF".


Plain text is incorrectly identified as Markdown

Using VS Code v1.67.0
When I start a new, empty file and paste some text into it, the file language often gets automatically detected as Markdown, even though it's just plain text. For example, if I paste the following text (a paragraph copied from the home page of lipsum.com) into a new document, it is detected as Markdown.
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
Steps to Reproduce:

'Ctrl + N' to start a new, empty document which starts with the language set as 'Plain Text'.
'Ctrl + V' to paste a paragraph of text.
Notice that the language automatically gets detected as Markdown.

This is pretty much expected. Markdown is the default "just normal text" language we use, you can disable the feature with workbench.editor.languageDetection. cc @TylerLeonhardt


Add instructions to readme for setting up completions for supported shells

[ ] zsh vanilla
[ ] zsh oh-my-zsh
[ ] zplug
[ ] fish
[ ] bash
[ ] elvish
[ ] powershell

For zsh, using .oh-my-zsh, this works, but this is just a hack. If someone knows a cleaner way, please share.
mkdir ~/.oh-my-zsh/plugins/just
invoke --print-completion-script=zsh > ~/.oh-my-zsh/plugins/just/_just

# hack alert
echo "autoload -Uz compinit && compinit -C  # hack to load just autocomplete" >> ~/.zshrc

+1 , can't figure out how to use it with zplug :(  https://github.com/zplug/zplug/issues/547

For zsh, put the completion script somewhere in your fpath, and be sure to have your fpath defined before calling compinit.
For example:
mkdir -p .zsh/completion
just --completions=zsh > .zsh/completion/_just

And in your .zshrc:
fpath=(~/.zsh/completion $fpath)
…
autoload -U compinit
compinit

The code in my last comment had an issue; I found it actually works directly with ohmyzsh.
I created a pull request to make it easier to add to ohmyzsh:
https://github.com/ohmyzsh/ohmyzsh/pull/9287

@kenden Nice! Please let me know when that PR lands, so it can be added to the readme.

@kenden I tried below with your commit (ohmyzsh/ohmyzsh#9287), looking at omz wiki:
mkdir $ZSH_CUSTOM/plugins/just
 wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/f90284951b33dc4dc9b5ee734e82bab8f615d344/plugins/just/_just -O $ZSH_CUSTOM/plugins/just/just.plugin.zsh
# in .zshrc
# plugins=(... just)

When I start zsh I get error:
_arguments:comparguments:325: can only be called from completion function

Am I missing something?

@vmiheer My ~/.zshrc is based on the ohmyzsh template in ~/.oh-my-zsh/templates/zshrc.zsh-template
Does it work if you use this template? These seem to be the important parts of it
export ZSH=$HOME/.oh-my-zsh
plugins=(just)
source $ZSH/oh-my-zsh.sh

Is something like eval "$(just --completions bash)" in my bashrc okay for bash?

Is something like eval "$(just --completions bash)" in my bashrc okay for bash?

Good question! I think so, but I'm not a bash user, so I'm not 100% sure.

For fish this worked for me
just --completions fish > $__fish_config_dir/completions/just.fish

or if your fish config is in the default directory
just --completions fish > $HOME/.config/fish/completions/just.fish

I got this working using @schodet's code, but be sure you put the .zsh folder in $HOME. :-)

I've learned a bit more about why this wasn't working for me and I wanted to share. My setup:

macOS Monterey 12.4
I'm using the zsh that ships with the OS
I installed just using Homebrew
I'm also using Oh My Zsh to customize the shell.

I think many Mac users will be in the same boat, especially now that zsh is the default macOS shell.
In this case, the solution is really simple. I just needed to add this line before OMZ was started in my ~/.zshrc:
fpath=(/opt/homebrew/share/zsh/site-functions $fpath)

This is because the just formula adds the completions file (named _just) to the Homebrew zsh completions directory as part of the postinstall script.
$ brew info just
just: stable 1.2.0 (bottled), HEAD
[...]
==> Caveats
zsh completions have been installed to:
  /opt/homebrew/share/zsh/site-functions

But since I was using the built-in version of zsh, instead of the Homebrew version, this directory wasn't part of the zsh fpath. And now that I'm using the completion script auto-installed in site-functions, it will get updated along with just by Homebrew.
If you initalize Homebrew before OMZ, you can also use a variable:
# Init Homebrew. Adds env vars
eval "$(/opt/homebrew/bin/brew shellenv)"

plugins=(git docker zsh-z) #etc
fpath=($HOMEBREW_PREFIX/share/zsh/site-functions $fpath)

source $ZSH/oh-my-zsh.sh

As a bonus, many other Homebrew formulae put completions in this directory (bat, rg, brew itself, etc). I wasn't getting any of them. Basically, my ZSH was just misconfigured.
If I had installed zsh using Homebrew, I expect everything would have Just Worked™.

It think this would be a great addition to the completion scripts section of the readme, if you feel like opening a PR.

I get "zsh: command not found: invoke" on this one, but just --completions=zsh > ~/.oh-my-zsh/plugins/just/_just did the job.

Thanks @k-bx , that was a mistake, I updated https://github.com/casey/just/issues/618#issuecomment-601824467


JeOS doesn't autostart docker daemon on reboot

What happened:
There is no autostart enabled for the docker service nor socket activation available in JeOS.
Generated compute instance user_data is the following:
... ... ...
until zypper -q install -y docker wget socat jq nfs-client; [ $? -ne 7 ]; do sleep 1; done
systemctl daemon-reload
ip link set dev eth0 mtu 1460
grep -q '^MTU' /etc/sysconfig/network/ifcfg-eth0 && sed -i 's/^MTU.*/MTU=1460/' /etc/sysconfig/network/ifcfg-eth0 || echo 'MTU=1460' >> /etc/sysconfig/network/ifcfg-eth0
ln -s /usr/bin/docker /bin/docker
ln -s /bin/ip /usr/bin/ip
if [ ! -s /etc/hostname ]; then hostname > /etc/hostname; fi
systemctl restart docker
systemctl enable 'cloud-config-downloader.service' && systemctl restart 'cloud-config-downloader.service'

It is executed only on the very first boot, and docker service is not activated:
# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: http://docs.docker.com

Besides other dependencies, e.g. kubelet rely on docker socket activation:
# systemctl cat kubelet
# /etc/systemd/system/kubelet.service
[Unit]
Description=kubelet daemon
Documentation=https://kubernetes.io/docs/admin/kubelet
After=docker.service
Wants=docker.socket rpc-statd.service
... ... ...

However JeOS docker package doesn't contain the docker.socket unit file and this dependency just doesn't work.
What you expected to happen:

Add docker.service into kubelet Wants directive
Or add socket activated docker.socket unit file:

[Unit]
Requires=torcx.target
After=torcx.target
Description=Docker Socket for the API
PartOf=docker.service

[Socket]
ListenStream=/var/run/docker.sock
SocketMode=0660
SocketUser=root
SocketGroup=docker

[Install]
WantedBy=sockets.target

How to reproduce it (as minimally and precisely as possible):
reboot jeos based VM
Anything else we need to know?:
Not sure why template tests contain docker service in the Units var. Therefore in tests this behavior looks file and docker service is enabled.
/cc @vpnachev @rfranzke

Some more links:
https://github.com/gardener/gardener/blob/050d0b0150d8e87571d2d5ea78d4b372889f49cc/charts/seed-operatingsystemconfig/original/templates/kubelet/_kubelet.service#L10
https://github.com/gardener/gardener/blob/4fbcf35b52bb2c046f505c1dba194e9502291918/charts/seed-operatingsystemconfig/downloader/templates/osc.yaml#L25
https://github.com/gardener/gardener-extensions/blob/4fa01606f4c2af6245010faa4ca74248c1d8330f/pkg/webhook/controlplane/unitserializer_test.go#L44
https://github.com/gardener/gardener-extensions/blob/4fa01606f4c2af6245010faa4ca74248c1d8330f/pkg/webhook/controlplane/unitserializer_test.go#L83
https://github.com/gardener/gardener/blob/050d0b0150d8e87571d2d5ea78d4b372889f49cc/charts/seed-operatingsystemconfig/original/templates/kubelet/_kubelet.service#L10

@vpnachev It appeared that new JeOS deployments stooped to work.
# systemctl status kubelet
● kubelet.service - kubelet daemon
   Loaded: loaded (/etc/systemd/system/kubelet.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: https://kubernetes.io/docs/admin/kubelet

Deployments 2 months old work fine, but new deployments don't work due to this issue. Kubelet doesn't start, VM doesn't join the cluster, Gardener keeps recreating VMs.


Add feed reader clients

This PR adds more RSS feed readers to the list of browsers:

Fever
FreshRSS
Tiny Tiny RSS
Winds

Merged. Thank you for submitting this PR!


BUG: x509: certificate signed by unknown authority

Sealos Version
v4.1.4/v4.1.6
How to reproduce the bug?
1.22
Failed to pull image "xxxx" x509: certificate signed by unknown authority
What is the expected behavior?
pull image success
What do you see instead?
No response
Operating environment
- Sealos version:v4.1.4/v4.1.6
- Docker version:no
- Kubernetes version:1.22
- Operating system:centos 7.5
- Runtime environment:
- Cluster size:1master2node
- Additional information:

Additional information
No response

what command you run?

sealos apply -f clusterfile

@willzhang sealos apply -f clusterfile

It is best to use the build image method. External docking mirroring may require the basic standard structure of registry.yml.

@willzhang sealos apply -f clusterfile manual execution sealos pull image is normal Using private image, pod pull failed with x509: certificate signed by unknown authority

sealos run labring/kubernetes:v1.25.6 labring/helm:v3.11.0 labring/calico:v3.24.5

ca.crt is harbor ca, and <IP_ADDRESS> is harbor registry url
root@node1:~# containerd -v
containerd github.com/containerd/containerd v1.6.17 299b677800044531671d336af5f0976fd2e6ac70
root@node1:~#

mkdir -p /etc/containerd/certs.d/<IP_ADDRESS>
cp ca.crt /etc/containerd/certs.d/<IP_ADDRESS>/ca.crt

test with
sealos run labring/nerdctl:v1.2.1
nerdctl pull <IP_ADDRESS>/library/xxx:xxx

@willzhang sealos apply -f clusterfile manual execution sealos pull image is normal Using private image, pod pull failed with x509: certificate signed by unknown authority

sealos run labring/kubernetes:v1.25.6 labring/helm:v3.11.0 labring/calico:v3.24.5 --single

ca.crt is harbor ca, and <IP_ADDRESS> is harbor registry url
root@node1:~# containerd -v
containerd github.com/containerd/containerd v1.6.17 299b677800044531671d336af5f0976fd2e6ac70
root@node1:~#

mkdir -p /etc/containerd/certs.d/<IP_ADDRESS>
cp ca.crt /etc/containerd/certs.d/<IP_ADDRESS>/ca.crt

test with
sealos run labring/nerdctl:v1.2.1
nerdctl pull <IP_ADDRESS>/library/xxx:xxx

Maybe he meant to go directly to kubelet to harbor to pull the image, not from sealos.hub.

@willzhang sealos apply -f clusterfile manual execution sealos pull image is normal Using private image, pod pull failed with x509: certificate signed by unknown authority

sealos run labring/kubernetes:v1.25.6 labring/helm:v3.11.0 labring/calico:v3.24.5 --single

ca.crt is harbor ca, and <IP_ADDRESS> is harbor registry url
root@node1:~# containerd -v
containerd github.com/containerd/containerd v1.6.17 299b677800044531671d336af5f0976fd2e6ac70
root@node1:~#

mkdir -p /etc/containerd/certs.d/<IP_ADDRESS>
cp ca.crt /etc/containerd/certs.d/<IP_ADDRESS>/ca.crt

test with
sealos run labring/nerdctl:v1.2.1
nerdctl pull <IP_ADDRESS>/library/xxx:xxx

Maybe he meant to go directly to kubelet to harbor to pull the image, not from sealos.hub.

yes, i meant to go directly to kubelet to harbor to pull the image，Manually execute the command nerdctl pull <IP_ADDRESS>/library/xxx: xxx is successful

Reopen

直接registry管理去做， https://github.com/labring/sealos/issues/3138


Rust and Cargo versions

When you retrieve the Rust and Cargo versions for the help command, you should not expect the machine running your bot to have rust or cargo installed.
What you appear you after is the version of Rust and Cargo that the bot was compiled against.
The best way to get the versions of Rust and Cargo at compile time would be to write a build script.
One method would be to output compile time environment variables for the env! macro to use, this can be found under this section of the docs.

@Juici thanks for the suggestions, however I do not know my way around the Cargo build script system. If you'd be willing to help me out, or create a pull request that integrates the functionality, it would be really helpful. Thanks :)


I can't use marker.setIcon to change the color of HTML Colored default marker

Hey guys,
I can't use marker.setIcon to change the color of HTML Colored default marker, although I can use it to set a image url.

Can you post your stacktrace? or the javascript code on marker.setIcon?

There was no error, I just created a marker using map.addMarker({ icon: 'red' }) and when I use marker.setIcon('blue'), nothing happens, but if I use marker.setIcon('img/marker.png') it works.

OK. Did you test in android and iOS? Both have a same problem? I'll try to fix it.

Ow, I forgot to say that I was using iOS... But no, I haven't tested it on Android, I don't have one :(

Ok! Get it. just a sec.

The correct way to pass color is using property iconColor, you are using this marker.setIcon('blue') the correct way to use it is marker.setIcon({iconColor: '#0011ff'}) in the property the correct way is: map.addMarker(
{
icon: {
iconColor: '#0011ff'
}
});
So.. but we have an error on code too. unfortunately this feature not working.
I'm fixing it and I'll push soon as possible
//the wrong code
UIColor *iconColor = [iconProperty valueForKey:@"iconColor"]; //this is a error.. I think it never work before because this code trying to convert string ('blue') to UIColor. lol.
marker.icon = [GMSMarker markerImageWithColor:iconColor]; //applying color on icon.
You can make a temporary fix replacing your marker.m content with http://pastebin.com/2tGfHD1E
however, I'll push this solution soon as possible.
Thank you for this report. :)

Thank you for the temporary fix! In my project I'm using canvas renderered markers, but I reported this anyway :P
I wish I knew Obj-C, I would like help with this, but the language looks like chinese for me =\

@Hirbod can you put some label here? This is a bug on iOS.


Inconsistent docs for number of operational modes

In the docs, it says that there are 3 operational modes but lists four:
https://github.com/grafana/grafana-operator/blob/ffdc5321da707137cc7fba26bcfd3cb83c0b4aeb/docs/docs/grafana.md?plain=1#L21-L31
I'm guessing it should say "we offer 4 operational modes", but I don't know.

Yeah, this changed with #1434, but we forgot to change the number. I'll update this now!


Specify version for the datadog-ci installation

Hi :)
Context

The datadog-ci was released with errors (2.16.0 and fixed in 2.16.1)
The latest datadog-ci version is installed in the junit-uplaod-github-action here

Problem
Even if we don't upgrade the github action on our side we pull the error because of the install of the latest version of datadog-ci
Proposal
Specify the version of datadog-ci in the installation and release a new version the junit-uplaod-github-action for each new release of datadog-ci

hey @bcaurel ! I think this makes total sense. I've implemented it in https://github.com/DataDog/junit-upload-github-action/pull/18. Sorry for the long delay to response 😅


Fix resolution of named function & class expressions as well as 'arguments'

In resolution, we special case the arguments object as well as names of function and class expressions.
However, when resolving, we ignore the resolution meaning and special case these unconditionally. That means in the following case, we will always resolve Foo as the function rather than the type.
interface Foo {
}

var x = function Foo() {
    var x: Foo;
}

Fixes #3285.

:+1:

:+1:


Update delta-streaming.md to reflect maxBytesPerTrigger is ignored for Trigger.AvailableNow

Which Delta project/connector is this regarding?

[x] Spark
[ ] Standalone
[ ] Flink
[ ] Kernel
[ ] Other (fill in here)

Description
maxBytesPerTrigger is currently ignored for streaming delta table reads when using Trigger.Once (see https://github.com/delta-io/delta/issues/843) Trigger.Once is now deprecated in favor of Trigger.AvailableNow (https://github.com/apache/spark/commit/66b1f79b72855af35351ff995492f2c13872dac5). Based on my testing this behavior is carried over to AvailableNow as well. If this is indeed correct and expected behavior then this PR updates the docs. If this is not correct then this is an issue to be resolved and the PR should be rejected.
How was this patch tested?
Observed behavior of stream while using the different triggers.
Does this PR introduce any user-facing changes?
No. Docs only

On second thought, it appears that neither maxBytesPerTrigger nor maxFilesPerTrigger is respected regardless of the trigger type for delta data sources in spark similar to what's observed here https://github.com/delta-io/delta/issues/843#issuecomment-1308484029.

Closing as further testing indicates that the options are indeed respected with AvailableNow. My original test case was flawed as it reused an existing checkpointLocation. While https://spark.apache.org/docs/3.3.1/structured-streaming-programming-guide.html#recovery-semantics-after-changes-in-a-streaming-query indicates that "Addition/deletion/modification of rate limits is allowed", not all sources support that and it appears that delta is one such source. Using a fresh checkpointLocation on my test query respected the maxBytesPerTrigger.
Apologies for any confusion with this PR!


Problem getting external metrics into prom adapter

Hi,
I am trying to configure custom/external metrics from our rabbitmq cluster (non k8s) to use for autoscaling some pods in our cluster through HPA.
I am having trouble creating the rules config for the same, since I intended to use the external metrics (non-namespaced) I followed @dgrisonnet 's advice from issue: https://github.com/kubernetes-sigs/prometheus-adapter/issues/403 to create image from master  and use it.
I was able to create the image and deploy it, I then changed the adapter config to try and add external rules, below is the config that I used:
data:
  config.yaml: |
    rules:
      default: "false"
      external:
      - seriesQuery: rabbitmq_queue_messages_published_total{group="rabbitmq-prod",queue="queue-name"}
        resources:
          namespaced: false
        metricsQuery: rate(<<.Series>>[10m])

I restarted the prom adapter pod after that but there seemed to be an error:
F0625 07:12:31.297687       1 adapter.go:301] unable to load metrics discovery config: unable to load metrics discovery configuration: unable to parse metrics discovery config: yaml: unmarshal errors:
  line 2: cannot unmarshal !!map into []config.DiscoveryRule

Not sure what I am doing wrong here, would appreciate your help. Please find the prom-adapter pod logs attached.
prom-adapter.txt

I got the same issue than you. In version v0.8.4, namespaced is not defined in this block: https://github.com/kubernetes-sigs/prometheus-adapter/blob/b67ac3e747070887f06751ed6cfb4892d4ea08af/pkg/config/config.go#L51 VS master branch https://github.com/kubernetes-sigs/prometheus-adapter/blob/7cd63baccfc68b134ba96062d72efde87e3782cb/pkg/config/config.go#L51

Hi @ashishranjan1457, you have misconfigured the top-level rule. It should be:
data:
  config.yaml: |
    externalRules:
    - seriesQuery: rabbitmq_queue_messages_published_total{group="rabbitmq-prod",queue="queue-name"}
      resources:
        namespaced: false
      metricsQuery: rate(<<.Series>>[10m])

That made me notice that the documentation for external metrics is incorrect, we should replace external: by externalRules: in the examples in https://github.com/kubernetes-sigs/prometheus-adapter/blob/master/docs/externalmetrics.md. Anyone of you wants to open a PR to fix that?

Thanks @dgrisonnet, that worked for me.
Have raised a PR for this.


Should I have requirements.txt when using pipenv?

I have a python project and store the dependencies in Pipfile.lock. Obviously the buildpack understands the Pipfile.lock as it installs the dependencies and everything works okay. As a result I do not use my requirements.txt file. Once I removed it, the build continued to work as expected, however now there is an error thrown:
cp: cannot stat '/tmp/build_a123c0456/requirements.txt': No such file or directory

Is that the expected behavior and should I have a requirements.txt file? If so, what should be it's content?

Hi! It's a known bug in the buildpack that that error occurs when using Pipenv support. Fixing it will require a refactor of the buildpack, however the buildpack is due to be replaced by a CNB version in the future, so it's unlikely that will happen for the old version until it's replaced.

Is there a place where we can subscribe for progress in the migration to Cloud Native Buildpacks?

https://github.com/heroku/heroku-buildpack-python/issues/796#issuecomment-1031512600


Is it possible to have more than one workflow and different shortcuts?

e.g.
set 1: todo-doing-done,(using "cmd+enter" to cycle)
set 2:to read-reading-read, (using "ctrl+enter" to cycle)
set 3:to summarize-to archive-archived, etc. (using "option+enter"to cycle)

The latest release offers this feature. You can configure this in settings.


Tags on unsupported resources are counted as change

Describe the noise
Certain resources do not support tags but you can specify the tags property in the template and the deployment will run fine. We do that to future proof when at some point may be the resource starts supporting tags and because ARM allows it. This is counted as change by What-If unfortunately.
Example:
  ~ Microsoft.Insights/diagnosticSettings/subscriptionLogsToLogAnalytics-vuwqlkipg5ibm [2017-05-01-preview]
    + tags:

        version: "<IP_ADDRESS>"

More information is provided by e-mail.
Resource type (i.e. Microsoft.Storage/storageAccounts)
apiVersion (i.e. 2019-04-01)
Client (PowerShell, Azure CLI, or API)
Relevant ARM Template code (we only need the resource object for the above resourceType and apiVersion, but if it's easier you can include the entire template
Expected response (i.e. "I expected no noise since the template has not been modified since the resources were deployed)
Current (noisy) response (either include a screenshot of the what-if output, or copy/paste the text)
Additional context
Add any other context about the problem here.

We have checked in a fix for this behavior to an internal repo and it is awaiting deployment. If diagnosticSettings or other resource types with similar behavior support tags in the future, what-if will adjust after the behavior change is detected. (I will update this issue once the fix is deployed.)

The fix should be deployed. Please reopen the issue if you still see this noise.

Reported in another e-mail that I still see if for resource
~ Microsoft.OperationalInsights/workspaces/lz-monitoring-core-acceptance-stan34/tables/Perf [2017-04-26-preview]
+ tags:
    version: "<IP_ADDRESS>"

Thanks for letting us know. We will investigate.

I think this is now tracked by https://github.com/Azure/arm-template-whatif/issues/96.


[feature request] Log management

1.Default log folder is inside config directory.
Why not move it to "log" folder inside config directory.
e.g - /home/{username}/.config/flexget/log"
or "/home/{username}/.flexget/log"
I have defined custom log path in my "/etc/default/flexget" file.
So log is stored inside "log" folder.
But once in a while "flexget.log" is created in config directory.(may be when i run with custom log level)
Advantage:
Easier to recognize log files.
I even once deleted old log file along with a part of config (horrible.yml just below flexget.log)
Log level such as verbose or debug will created a lot of log.& old log files.So better to have it's own directory
**2.**I came across with logrotate that manages logs.(although still figuring out how to config it properly)
It seems ideal to store old log in gzip achieve with compression.(debug creates a lot of log)
May be instead of moving old log file to flexget.log.1,flexget.log.2 after 1000KB reached ,we can compress them with gzip

This would be easy by using the system logrotate. It would allow to control how many log files will be crated, the location and even the zipping of the old logs.

cool, open a pr then

pr?

Pull Request

If I undestand it correctly opening a pull request would require from me to know how to add a feature, right?

i assumed you did, you suggested an implementation...

I didn't want to be rude or something.
I just pointed out that logrotate does exactly what Addicted5 and I would like to see as a feature.
If I was somehow overstepping I apologize.
If adding requests or contribution to the discussion is not welcome I'll stop immediately.

i'm sorry if it seem i was being sarcastic, i was genuinely saying it's a good idea and thought that you suggested of doing it :-)
all additions are always welcome, this is just a misunderstanding.

Ok. English is not my primary language, so I'm always concerned that I miss some tone in the discussion...
All clear now, thanks for being straightforward.

Please reopen in feathub


Use last-child in @mixin last() when $num = 1

Good job the library. It is of great use.
While going through the code I observed you didn't use pseudo last-child in mixin last()
Just like mixin first() we can use last-child when $num = 1.
Would love to know why it was avoided.

Hey @narendrashetty, thanks for opening the issue.

:first-child is supported IE9 properly, and IE7 and IE8 sort of (see chart).
:last-child is supported by IE9+ only.

From http://stackoverflow.com/questions/7938521/browser-support-for-css-first-child-and-last-child
But I will probably consider it for a next release.

Thanks for your reply @LukyVj
I would be more than happy to send you a PR for the same


fix: make sidebar img fill container width

Before this commit the sidebar image was not filling it's container,
leaving a small gap between the image and the right hand side.

Current dependencies on/for this PR:

next

PR #308   (this PR)

This comment was auto-generated by Graphite.


cargo chef cook panics in Docker build

Hello!
I'm working on deploying my workspace app with Docker and cargo chef, but I'm getting a panic trying to build it. Not sure what would be useful for you to help me debug it, let me know if I can provide anything.
benwis@Diziet vidette_rust % docker build --tag vidette --file Dockerfile .

[+] Building 126.8s (16/22)
 => [internal] load build definition from Dockerfile                                                              0.0s
 => => transferring dockerfile: 1.23kB                                                                            0.0s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 2B                                                                                0.0s
 => [internal] load metadata for docker.io/library/debian:buster-slim                                             1.6s
 => [internal] load metadata for docker.io/library/rust:1.53.0                                                    1.6s
 => [internal] load metadata for docker.io/lukemathwalker/cargo-chef:latest-rust-1.53.0                           1.6s
 => [planner 1/4] FROM docker.io/lukemathwalker/cargo-chef:latest-rust-1.53.0@sha256:112f5524c4fb257ce9190ed8e74  0.0s
 => [internal] load build context                                                                                0.3s
 => => transferring context: 551.51kB                                                                             0.3s
 => [builder 1/6] FROM docker.io/library/rust:1.53.0@sha256:54b76dd38a95fae4cdd57ce9742cdee01f4cb1ac6b9184b7d2a6  0.0s
 => [runtime 1/4] FROM docker.io/library/debian:buster-slim@sha256:1b138699146ca36569f2f2098c8e22c56756b5776f766  0.0s
 => CACHED [runtime 2/4] WORKDIR /app                                                                             0.0s
 => CACHED [builder 2/6] WORKDIR /app                                                                             0.0s
 => CACHED [planner 2/4] WORKDIR /app                                                                             0.0s
 => [planner 3/4] COPY . .                                                                                3.0s
 => [planner 4/4] RUN cargo chef prepare  --recipe-path recipe.json                                               0.8s
 => CACHED [cacher 3/4] COPY --from=planner /app/recipe.json recipe.json                                          0.0s
 => ERROR [cacher 4/4] RUN RUST_BACKTRACE=1 cargo chef cook --release --recipe-path recipe.json                 121.0s
------
 > [cacher 4/4] RUN RUST_BACKTRACE=1 cargo chef cook --release --recipe-path recipe.json:
#16 2.378     Updating crates.io index
#16 94.21     Updating git repository `https://github.com/async-graphql/async-graphql/`
#16 97.76     Updating git submodule `https://github.com/async-graphql/examples`
#16 98.67     Updating git repository `https://github.com/Keats/jsonwebtoken`
#16 99.71     Updating git repository `https://github.com/launchbadge/sqlx.git`
#16 104.9  Downloading crates ...
#16 106.6   Downloaded actix-utils v3.0.0
#16 106.7   Downloaded block-buffer v0.7.3
#16 106.7   Downloaded bigdecimal v0.2.0
#16 106.7   Downloaded anyhow v1.0.42
#16 106.7   Downloaded byte-tools v0.3.1
#16 106.8   Downloaded bytestring v1.0.0
#16 106.8   Downloaded const_fn v0.4.8
#16 106.8   Downloaded chrono v0.4.19
#16 106.9   Downloaded darling_macro v0.12.4
#16 106.9   Downloaded convert_case v0.4.0
#16 106.9   Downloaded crypto-mac v0.10.1
#16 106.9   Downloaded foreign-types-shared v0.1.1
#16 106.9   Downloaded futures-channel v0.3.16
#16 106.9   Downloaded futures-sink v0.3.16
#16 106.9   Downloaded http-body v0.4.3
#16 106.9   Downloaded ident_case v1.0.1
#16 107.0   Downloaded hyper-rustls v0.22.1
#16 107.0   Downloaded subtle v2.4.1
#16 107.0   Downloaded time v0.1.44
#16 107.0   Downloaded instant v0.1.10
#16 107.0   Downloaded tap v1.0.1
#16 107.0   Downloaded httparse v1.4.1
#16 107.0   Downloaded getrandom v0.2.3
#16 107.0   Downloaded log v0.4.14
#16 107.0   Downloaded miniz_oxide v0.4.4
#16 107.1   Downloaded hyper v0.14.11
#16 107.1   Downloaded fnv v1.0.7
#16 107.1   Downloaded h2 v0.3.3
#16 107.1   Downloaded standback v0.2.17
#16 107.2   Downloaded thiserror v1.0.26
#16 107.2   Downloaded crc32fast v1.2.1
#16 107.2   Downloaded foreign-types v0.3.2
#16 107.2   Downloaded url v2.2.2
#16 107.2   Downloaded lazy_static v1.4.0
#16 107.2   Downloaded jobserver v0.1.23
#16 107.2   Downloaded uuid v0.8.2
#16 107.3   Downloaded idna v0.2.3
#16 107.3   Downloaded time-macros-impl v0.1.2
#16 107.3   Downloaded time-macros v0.1.1
#16 107.3   Downloaded unicode-normalization v0.1.19
#16 107.3   Downloaded language-tags v0.3.2
#16 107.3   Downloaded futures-intrusive v0.4.0
#16 107.4   Downloaded hex v0.4.3
#16 107.4   Downloaded dotenv_codegen v0.15.0
#16 107.4   Downloaded dotenv_codegen_implementation v0.15.0
#16 107.4   Downloaded byteorder v1.4.3
#16 107.4   Downloaded bitflags v1.2.1
#16 107.4   Downloaded ahash v0.7.4
#16 107.4   Downloaded strum v0.21.0
#16 107.4   Downloaded remove_dir_all v0.5.3
#16 107.4   Downloaded reqwest v0.11.4
#16 107.5   Downloaded tinyvec_macros v0.1.0
#16 107.5   Downloaded strum_macros v0.21.1
#16 107.5   Downloaded regex v1.5.4
#16 107.5   Downloaded socket2 v0.4.1
#16 107.6   Downloaded spin v0.9.2
#16 107.6   Downloaded tokio-rustls v0.22.0
#16 107.6   Downloaded lexical-core v0.7.6
#16 107.6   Downloaded http v0.2.4
#16 107.7   Downloaded try-lock v0.2.3
#16 107.7   Downloaded rand v0.8.4
#16 107.7   Downloaded semver-parser v0.10.2
#16 107.7   Downloaded serde_derive v1.0.127
#16 107.7   Downloaded serde v0.8.23
#16 107.7   Downloaded semver v0.11.0
#16 107.7   Downloaded typenum v1.13.0
#16 107.7   Downloaded scopeguard v1.1.0
#16 107.8   Downloaded quote v1.0.9
#16 107.8   Downloaded serde_test v0.8.23
#16 107.8   Downloaded serde-aux v2.2.0
#16 107.8   Downloaded static_assertions v1.1.0
#16 107.8   Downloaded rust-ini v0.13.0
#16 107.8   Downloaded serde_urlencoded v0.7.0
#16 107.8   Downloaded signal-hook-registry v1.4.0
#16 107.8   Downloaded ryu v1.0.5
#16 107.8   Downloaded slab v0.4.4
#16 107.8   Downloaded sha2 v0.9.5
#16 107.8   Downloaded simple_asn1 v0.5.4
#16 107.8   Downloaded tokio-native-tls v0.3.0
#16 107.9   Downloaded spin v0.5.2
#16 107.9   Downloaded rustc_version v0.3.3
#16 107.9   Downloaded regex-syntax v0.6.25
#16 107.9   Downloaded toml v0.5.8
#16 107.9   Downloaded encoding_rs v0.8.28
#16 108.1   Downloaded tracing v0.1.26
#16 108.1   Downloaded twoway v0.2.2
#16 108.1   Downloaded tokio-stream v0.1.7
#16 108.2   Downloaded tokio-macros v1.3.0
#16 108.2   Downloaded serde_json v1.0.66
#16 108.2   Downloaded rustls v0.19.1
#16 108.2   Downloaded sha-1 v0.8.2
#16 108.2   Downloaded radium v0.5.3
#16 108.2   Downloaded serde v1.0.127
#16 108.2   Downloaded proc-macro2 v1.0.28
#16 108.3   Downloaded sct v0.6.1
#16 108.3   Downloaded pin-utils v0.1.0
#16 108.3   Downloaded proc-macro-crate v1.0.0
#16 108.3   Downloaded pin-project-lite v0.2.7
#16 108.3   Downloaded pin-project-internal v1.0.8
#16 108.3   Downloaded serde-hjson v0.9.1
#16 108.3   Downloaded pin-project v1.0.8
#16 108.3   Downloaded tracing-core v0.1.18
#16 108.3   Downloaded rand_chacha v0.3.1
#16 108.3   Downloaded proc-macro-nested v0.1.7
#16 108.4   Downloaded pest_meta v2.1.3
#16 108.4   Downloaded pest_generator v2.1.3
#16 108.4   Downloaded smallvec v1.6.1
#16 108.4   Downloaded indexmap v1.7.0
#16 108.4   Downloaded sha-1 v0.9.7
#16 108.4   Downloaded stringprep v0.1.2
#16 108.4   Downloaded rand_core v0.6.3
#16 108.4   Downloaded ppv-lite86 v0.2.10
#16 108.4   Downloaded pkg-config v0.3.19
#16 108.4   Downloaded actix_derive v0.6.0
#16 108.4   Downloaded actix-web-httpauth v0.6.0-beta.2
#16 108.4   Downloaded actix-web v4.0.0-beta.8
#16 108.5   Downloaded tokio-util v0.6.7
#16 108.5   Downloaded actix-web-actors v4.0.0-beta.6
#16 108.5   Downloaded crc v2.0.0
#16 108.5   Downloaded generic-array v0.14.4
#16 108.5   Downloaded actix-web-codegen v0.5.0-beta.3
#16 108.5   Downloaded futures-util v0.3.16
#16 108.6   Downloaded futures-io v0.3.16
#16 108.6   Downloaded funty v1.1.0
#16 108.6   Downloaded adler v1.0.2
#16 108.6   Downloaded futures-macro v0.3.16
#16 108.6   Downloaded generic-array v0.12.4
#16 108.6   Downloaded ucd-trie v0.1.3
#16 108.6   Downloaded tower-service v0.3.1
#16 108.6   Downloaded time v0.2.27
#16 108.6   Downloaded claim v0.5.0
#16 108.6   Downloaded crc-catalog v1.1.1
#16 108.6   Downloaded block-buffer v0.9.0
#16 108.6   Downloaded syn v1.0.74
#16 108.7   Downloaded dirs v3.0.2
#16 108.7   Downloaded num_cpus v1.13.0
#16 108.7   Downloaded hashbrown v0.11.2
#16 108.7   Downloaded futures-task v0.3.16
#16 108.7   Downloaded unicode-segmentation v1.8.0
#16 108.7   Downloaded unicode-xid v0.2.2
#16 108.7   Downloaded futures-core v0.3.16
#16 108.8   Downloaded fake-simd v0.1.2
#16 108.8   Downloaded crossbeam-channel v0.5.1
#16 108.8   Downloaded cpufeatures v0.1.5
#16 108.8   Downloaded futures v0.3.16
#16 108.8   Downloaded flate2 v1.0.20
#16 108.8   Downloaded darling_core v0.12.4
#16 108.8   Downloaded itoa v0.4.7
#16 108.8   Downloaded hyper-tls v0.5.0
#16 108.9   Downloaded futures-executor v0.3.16
#16 108.9   Downloaded httpdate v1.0.1
#16 108.9   Downloaded heck v0.3.3
#16 108.9   Downloaded dirs-sys v0.3.6
#16 108.9   Downloaded darling v0.12.4
#16 108.9   Downloaded tempfile v3.2.0
#16 108.9   Downloaded sqlformat v0.1.6
#16 108.9   Downloaded opaque-debug v0.3.0
#16 108.9   Downloaded strsim v0.10.0
#16 108.9   Downloaded maplit v1.0.2
#16 108.9   Downloaded hmac v0.10.1
#16 108.9   Downloaded hashlink v0.7.0
#16 108.9   Downloaded futures-timer v3.0.2
#16 108.9   Downloaded derive_more v0.99.16
#16 109.0   Downloaded unicode_categories v0.1.1
#16 109.0   Downloaded version_check v0.9.3
#16 109.0   Downloaded ring v0.16.20
#16 109.5   Downloaded webpki-roots v0.21.1
#16 109.5   Downloaded tinyvec v1.3.1
#16 109.6   Downloaded whoami v1.1.2
#16 109.6   Downloaded unicode-bidi v0.3.5
#16 109.6   Downloaded aho-corasick v0.7.18
#16 109.6   Downloaded actix-codec v0.4.0
#16 109.6   Downloaded autocfg v1.0.1
#16 109.6   Downloaded ipnet v2.3.1
#16 109.6   Downloaded want v0.3.0
#16 109.6   Downloaded wyz v0.2.0
#16 109.6   Downloaded yaml-rust v0.4.5
#16 109.6   Downloaded async-trait v0.1.51
#16 109.7   Downloaded untrusted v0.7.1
#16 109.7   Downloaded arrayvec v0.5.2
#16 109.7   Downloaded async-stream v0.3.2
#16 109.7   Downloaded unchecked-index v0.2.2
#16 109.7   Downloaded webpki v0.21.4
#16 109.7   Downloaded base64ct v1.0.0
#16 109.7   Downloaded argon2 v0.2.2
#16 109.7   Downloaded actix v0.12.0
#16 109.7   Downloaded Inflector v0.11.4
#16 109.7   Downloaded thiserror-impl v1.0.26
#16 109.8   Downloaded crossbeam-queue v0.3.2
#16 109.8   Downloaded cc v1.0.69
#16 109.8   Downloaded form_urlencoded v1.0.1
#16 109.8   Downloaded cookie v0.15.1
#16 109.8   Downloaded either v1.6.1
#16 109.8   Downloaded dotenv v0.15.0
#16 109.8   Downloaded digest v0.9.0
#16 109.8   Downloaded digest v0.8.1
#16 109.8   Downloaded crypto-mac v0.8.0
#16 109.8   Downloaded matches v0.1.8
#16 109.8   Downloaded async-stream-impl v0.3.2
#16 109.8   Downloaded crossbeam-utils v0.8.5
#16 109.8   Downloaded bytes v1.0.1
#16 109.8   Downloaded cfg-if v1.0.0
#16 109.8   Downloaded config v0.10.1
#16 109.9   Downloaded brotli-sys v0.3.2
#16 109.9   Downloaded bitvec v0.19.5
#16 109.9   Downloaded atoi v0.4.0
#16 109.9   Downloaded brotli2 v0.3.2
#16 110.0   Downloaded block-padding v0.1.5
#16 110.0   Downloaded blake2 v0.9.1
#16 110.0   Downloaded actix-router v0.2.7
#16 110.0   Downloaded actix-rt v2.2.0
#16 110.0   Downloaded actix-tls v3.0.0-beta.5
#16 110.0   Downloaded md-5 v0.9.1
#16 110.0   Downloaded mime v0.3.16
#16 110.0   Downloaded local-waker v0.1.1
#16 110.0   Downloaded linked-hash-map v0.5.4
#16 110.0   Downloaded local-channel v0.1.2
#16 110.0   Downloaded linked-hash-map v0.3.0
#16 110.0   Downloaded actix-server v2.0.0-beta.5
#16 110.0   Downloaded base64 v0.13.0
#16 110.0   Downloaded native-tls v0.2.8
#16 110.0   Downloaded lru v0.6.6
#16 110.1   Downloaded actix-service v2.0.0
#16 110.1   Downloaded nom v5.1.2
#16 110.1   Downloaded multer v2.0.1
#16 110.1   Downloaded openssl-probe v0.1.4
#16 110.1   Downloaded once_cell v1.8.0
#16 110.1   Downloaded opaque-debug v0.2.3
#16 110.2   Downloaded num-traits v0.1.43
#16 110.2   Downloaded memchr v2.4.0
#16 110.2   Downloaded pem v0.8.3
#16 110.2   Downloaded password-hash v0.2.2
#16 110.2   Downloaded num-traits v0.2.14
#16 110.2   Downloaded percent-encoding v2.1.0
#16 110.2   Downloaded paste v1.0.5
#16 110.2   Downloaded parking_lot_core v0.8.3
#16 110.2   Downloaded parking_lot v0.11.1
#16 110.3   Downloaded num-integer v0.1.44
#16 110.3   Downloaded num-bigint v0.4.0
#16 110.3   Downloaded nom v6.1.2
#16 110.3   Downloaded pest_derive v2.1.0
#16 110.3   Downloaded validator_types v0.14.0
#16 110.3   Downloaded openssl-sys v0.9.65
#16 110.3   Downloaded pest v2.1.3
#16 110.4   Downloaded mio v0.7.13
#16 110.4   Downloaded tokio v1.9.0
#16 110.5   Downloaded lock_api v0.4.4
#16 110.5   Downloaded zstd-safe v3.1.0+zstd.1.4.9
#16 110.5   Downloaded openssl v0.10.35
#16 110.6   Downloaded zstd v0.7.0+zstd.1.4.9
#16 110.6   Downloaded validator v0.14.0
#16 110.6   Downloaded proc-macro-hack v0.5.19
#16 110.6   Downloaded actix-macros v0.2.1
#16 110.6   Downloaded actix-http v3.0.0-beta.9
#16 110.6   Downloaded num-bigint v0.3.2
#16 110.7   Downloaded libc v0.2.99
#16 110.8   Downloaded zstd-sys v1.5.0+zstd.1.4.9
#16 111.7  Downloading crates ...
#16 111.9   Downloaded jsonpath_lib v0.3.0
#16 111.9  Downloading crates ...
#16 112.1   Downloaded wiremock v0.5.6
#16 112.5    Compiling libc v0.2.99
#16 112.5    Compiling autocfg v1.0.1
#16 112.5    Compiling proc-macro2 v1.0.28
#16 112.5    Compiling syn v1.0.74
#16 120.5 thread 'main' panicked at 'Process terminated by signal', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/cargo-chef-0.1.21/src/recipe.rs:137:21
#16 120.6 stack backtrace:
#16 120.9    0: std::panicking::begin_panic
#16 120.9    1: chef::recipe::Recipe::cook
#16 120.9    2: cargo_chef::_main
#16 120.9 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
------
executor failed running [/bin/sh -c RUST_BACKTRACE=1 cargo chef cook --release --recipe-path recipe.json]: exit code: 101

Cargo.toml for main crate
[package]
name = "vidette"
version = "0.1.0"
edition = "2018"

[lib]
path = "src/lib.rs"

[[bin]]
path = "src/main.rs"
name = "vidette"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
email = {path="../email"}
async-graphql = { git = "https://github.com/async-graphql/async-graphql/", branch="actix-web-v4-beta", features = ["uuid", "chrono", "dataloader"] }
slab = "0.4.2"
uuid = { version = "0.8", features = ["serde", "v4"] }
chrono = {version= "0.4", features=["serde"]}
serde_derive = "1.0"
bigdecimal = {version="0.2", features=["serde"]}
async-trait = "0.1.50"
strum = "0.21.0"
strum_macros = "0.21.1"
anyhow = "1.0"
argon2 = "0.2"
rand_core = { version = "0.6", features = ["std"] }
thiserror = "1.0"
jsonwebtoken = { git = "https://github.com/Keats/jsonwebtoken", branch = "next" }
regex = "1.5"
futures = "0.3"
actix-web = { version = "4.0.0-beta.8" }
dotenv = "0.15.0"
dotenv_codegen = "0.15.0"
time = { version = "0.2", features = ["serde"] }
http = "0.2"
futures-util = "0.3.15"
actix-web-httpauth = "0.6.0-beta.2"
async-graphql-actix-web = { git = "https://github.com/async-graphql/async-graphql/", branch="actix-web-v4-beta" }
config = { version = "0.10.1", features = ["yaml"] }
serde = { version = "1.0.126", features = ["derive"] }
serde_json = "1.0.64"
sqlx = { git = "https://github.com/launchbadge/sqlx.git", features = [ "runtime-actix-native-tls", "macros","bigdecimal", "postgres", "uuid", "json", "chrono", "migrate", "offline"] }
serde-aux = "2.2.0"

[dev-dependencies]
jsonpath_lib = "0.3.0"
wiremock = {version="0.5"}
uuid = { version = "0.8", features = ["serde", "v4"] }
reqwest = { version = "0.11", features = ["json", "rustls-tls"] }
tokio = { version = "1", features = ["full"] }

Cargo.toml for tests crate
[package]
name = "vidette_tests"
version = "0.1.0"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
actix-rt = "2"
vidette = {path="../vidette"}

[dev-dependencies]
jsonpath_lib = "0.3.0"
wiremock = {version="0.5"}
uuid = { version = "0.8", features = ["serde", "v4"] }
tokio = { version = "1", features = ["full"] }
# sqlx = { version = "0.5", features = [ "runtime-actix-native-tls", "macros","bigdecimal", "postgres", "uuid", "json", "chrono", "migrate", "offline"] }
sqlx = { git = "https://github.com/launchbadge/sqlx.git", features = [ "runtime-actix-native-tls", "macros","bigdecimal", "postgres", "uuid", "json", "chrono", "migrate", "offline"] }

futures = "0.3"
serde = { version = "1.0.126", features = ["derive"] }
serde_json = "1.0.64"
actix-web = { version = "4.0.0-beta.8" }
anyhow = "1.0"
reqwest = { version = "0.11",features = ["json", "rustls-tls"] }

Thank you for any help you can provide!

The panic is coming from the cargo build command launched by cargo-chef.
Is the source code of the application public?

Not really. The odd part is that I can run cargo build --release outside of docker and it works or I can create a Dockerfile without cargo chef it and it works as well. Let me put together something to look at for you :)

Hello sorry to add to this; but I'm running into the same issue 😅 ; I too can run cargo build --release outside of Docker (on M1 2020 MacBook Pro); below is the output from running the same inside Docker.
For whatever it's worth I notice that twice in a row now it has failed at the step Compiling proc-macro2 v1.0.32
@ zero2prod [stevenchu]$ docker build --tag zero2prod --file Dockerfile .
[+] Building 110.5s (14/20)
 => [internal] load build definition from Dockerfile                                                                                0.0s
 => => transferring dockerfile: 795B                                                                                0.0s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 34B                                                                                0.0s
 => [internal] load metadata for docker.io/library/debian:bullseye-slim                                                                                1.2s
 => [internal] load metadata for docker.io/lukemathwalker/cargo-chef:latest-rust-1.56.0                                                                                1.3s
 => [auth] lukemathwalker/cargo-chef:pull token for registry-1.docker.io                                                                                0.0s
 => [auth] library/debian:pull token for registry-1.docker.io                                                                                0.0s
 => [runtime 1/5] FROM docker.io/library/debian:bullseye-slim@sha256:a23887a2e830b815955e010f30d4c2430cd5ef82e93c130471024bc9f808d5d3                                                           0.0s
 => [internal] load build context                                                                                0.1s
 => => transferring context: 20.88kB                                                                                0.0s
 => [chef 1/2] FROM docker.io/lukemathwalker/cargo-chef:latest-rust-1.56.0@sha256:94c1c11d7afcf4c26fbeec11bbcdc42079bb7fcf536a92f4e769472373fe8e95                                              0.0s
 => CACHED [chef 2/2] WORKDIR /app                                                                                0.0s
 => CACHED [planner 1/2] COPY . .                                                                                0.0s
 => CACHED [planner 2/2] RUN cargo chef prepare --recipe-path recipe.json                                                                                0.0s
 => CACHED [builder 1/4] COPY --from=planner /app/recipe.json recipe.json                                                                                0.0s
 => ERROR [builder 2/4] RUN RUST_BACKTRACE=full cargo chef cook --release --recipe-path recipe.json                                                                                109.1s
------
 > [builder 2/4] RUN RUST_BACKTRACE=full cargo chef cook --release --recipe-path recipe.json:
#16 2.908     Updating crates.io index
#16 83.51  Downloading crates ...
#16 90.15   Downloaded arrayvec v0.5.2
#16 90.31   Downloaded cpufeatures v0.2.1
#16 90.32   Downloaded crc32fast v1.2.1
...
#16 95.21    Compiling proc-macro2 v1.0.32
#16 108.6 thread 'main' panicked at 'Process terminated by signal', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/cargo-chef-0.1.31/src/recipe.rs:146:21
#16 108.7 stack backtrace:
#16 108.8    0:       0x4000268afc - std::backtrace_rs::backtrace::libunwind::trace::hd3a6cb8e32f9fc43
#16 108.8                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
#16 108.8    1:       0x4000268afc - std::backtrace_rs::backtrace::trace_unsynchronized::h6dcceebcd6a9f2ab
#16 108.8                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
#16 108.8    2:       0x4000268afc - std::sys_common::backtrace::_print_fmt::h4eacf4e9ad977499
#16 108.8                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/sys_common/backtrace.rs:67:5
#16 108.8    3:       0x4000268afc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1e42c22572a7e7b4
#16 108.8                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/sys_common/backtrace.rs:46:22
#16 108.8    4:       0x400028d96c - core::fmt::write::h072b578a8e90aa54
#16 108.8                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/core/src/fmt/mod.rs:1150:17
#16 108.9    5:       0x40002659b5 - std::io::Write::write_fmt::hc32d3cabefff1d24
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/io/mod.rs:1667:15
#16 108.9    6:       0x400026a9d0 - std::sys_common::backtrace::_print::h058b85b6efc15780
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/sys_common/backtrace.rs:49:5
#16 108.9    7:       0x400026a9d0 - std::sys_common::backtrace::print::hdb7de10b704104b4
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/sys_common/backtrace.rs:36:9
#16 108.9    8:       0x400026a9d0 - std::panicking::default_hook::{{closure}}::h5451997d203bda2f
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/panicking.rs:210:50
#16 108.9    9:       0x400026a587 - std::panicking::default_hook::h419b121e68f746a2
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/panicking.rs:227:9
#16 108.9   10:       0x400026b084 - std::panicking::rust_panic_with_hook::h32c44b1364c1c247
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/panicking.rs:624:17
#16 108.9   11:       0x40000bdb55 - std::panicking::begin_panic::{{closure}}::h68dc90ee5ef28ac3
#16 108.9   12:       0x40000bdae6 - std::sys_common::backtrace::__rust_end_short_backtrace::h85efabf3c69d7f31
#16 108.9   13:       0x400003ee21 - std::panicking::begin_panic::hfb38d3ffa2926355
#16 108.9   14:       0x40000bf8f8 - chef::recipe::Recipe::cook::hcca3a1b1f5ee4e17
#16 108.9   15:       0x4000056d31 - cargo_chef::_main::hf6bdbe67bee919d1
#16 108.9   16:       0x4000050fe3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h00bf14c24ead7463
#16 108.9   17:       0x400005af9d - std::rt::lang_start::{{closure}}::hc2ce9ee509d0a1ac
#16 108.9   18:       0x400026b58a - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h97e9d5f21cbee92f
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/core/src/ops/function.rs:259:13
#16 108.9   19:       0x400026b58a - std::panicking::try::do_call::hdfecd950eba8f698
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/panicking.rs:403:40
#16 108.9   20:       0x400026b58a - std::panicking::try::h3c77c8ba3eb0735c
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/panicking.rs:367:19
#16 108.9   21:       0x400026b58a - std::panic::catch_unwind::h8e0d62076d8d837e
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/panic.rs:129:14
#16 108.9   22:       0x400026b58a - std::rt::lang_start_internal::{{closure}}::h647045b4c6a22e67
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/rt.rs:45:48
#16 108.9   23:       0x400026b58a - std::panicking::try::do_call::h905d96e4a757647e
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/panicking.rs:403:40
#16 108.9   24:       0x400026b58a - std::panicking::try::hc113426beb3c908b
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/panicking.rs:367:19
#16 108.9   25:       0x400026b58a - std::panic::catch_unwind::h74f684ea7038ea12
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/panic.rs:129:14
#16 108.9   26:       0x400026b58a - std::rt::lang_start_internal::h5ba185919d396c97
#16 108.9                                at /rustc/09c42c45858d5f3aedfa670698275303a3d19afa/library/std/src/rt.rs:45:20
#16 108.9   27:       0x40000577c2 - main
#16 108.9   28:       0x4001bd2d0a - __libc_start_main
#16 108.9   29:       0x400004aafa - _start
#16 108.9   30:                0x0 - <unknown>
------
executor failed running [/bin/sh -c RUST_BACKTRACE=full cargo chef cook --release --recipe-path recipe.json]: exit code: 101

And my Cargo.toml file
@ zero2prod [stevenchu]$ cat Cargo.toml
[package]
name = "zero2prod"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
path = "src/lib.rs"

[[bin]]
path = "src/main.rs"
name = "zero2prod"

[dependencies]
actix-http = "3.0.0-beta.10"
actix-web = "4.0.0-beta.9"
chrono = "0.4.15"
config = "0.11.0"
log = "0.4"
serde = { version = "1", features = ["derive"]}
tracing = { version = "0.1", features = ["log"] }
tracing-subscriber = { version = "0.2.12", features = ["registry", "env-filter"] }
uuid = { version = "0.8.1", features = ["v4"] }
tracing-bunyan-formatter = "0.1.6"
tracing-log = "0.1.2"
tracing-futures = "0.2.5"
tracing-actix-web = "0.4.0-beta.12"
serde-aux = "3.0.1"

[dependencies.sqlx]
version = "0.5.7"
default-features = false
features = [
    "runtime-actix-rustls",
    "macros",
    "postgres",
    "uuid",
    "chrono",
    "migrate",
    "offline"
]

[dev-dependencies]
actix-rt = "2"
once_cell = "1.8.0"
reqwest = "0.11"
tokio = "1"

It might be related to https://github.com/LukeMathWalker/cargo-chef/issues/95#issuecomment-972057146?

It might be related to #95 (comment)?

oh nice! yeah sounds like it could be the culprit for at least me (since i'm running on the M1 chip); i'll give the theooiry/cargo-chef image a whirl :)

#105 has been merged - can you confirm if the image for cargo-chef 0.1.33 solves your issue? @chusteven

#105 has been merged - can you confirm if the image for cargo-chef 0.1.33 solves your issue? @chusteven

@LukeMathWalker thank you so much! I'm not super familiar with the intricacies of Docker but I suspect there's no image yet available for Rust 1.56? Here's what I see when I search for the tag "rust-1.56.0" : https://hub.docker.com/r/lukemathwalker/cargo-chef/tags?page=1&name=rust-1.56.0
Note that there's no "linux/arm64" to be seen anywhere in the search results 😅

Search for rust-1.56.1 😄


Update Dart docs to alpha.33

How does this look for updating the Dart docs to alpha.33?
The last guide didn't require an update because it doesn't show pubspec.yaml or main.dart.

/cc @rkirov @alexeagle

A couple of typos. LGTM otherwise.

I'll fix these now and submit. Thanks for the review!


Implements white-flag confirmation

This PR implements the white-flag confirmation logic in accordance to RFC https://github.com/iotaledger/protocol-rfcs/blob/master/text/0005-white-flag/0005-white-flag.md

:scam:

Following tasks are still pending

[ ] Mark conflicting tx in the visualizer
[ ] Add conflicting, value and zerovalue tx to the Server Metrics graph

Dashboard fixes will be tracked in #549
Tests will be tracked in #550


chore: wire up runtime.WithStreamErrorHandler

Description
This PR wires up the grpc-gateway runtime handler for streaming error handling. This is to ensure that the streaming endpoints return the same error codes as expected from the unary endpoints.
References

Review Checklist

[ ] I have clicked on "allow edits by maintainers".
[ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[ ] The correct base branch is being used, if not main
[ ] I have added tests to validate that the change in functionality is working as expected

Codecov Report
Base: 80.83% // Head: 80.91% // Increases project coverage by +0.07% :tada:

Coverage data is based on head (55fc728) compared to base (622976a).
Patch coverage: 62.50% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #299      +/-   ##
==========================================
+ Coverage   80.83%   80.91%   +0.07%
==========================================
  Files          86       86
  Lines       11794    11808      +14
==========================================
+ Hits         9534     9554      +20
+ Misses       1846     1844       -2
+ Partials      414      410       -4

Impacted Files
Coverage Δ

server/server.go
30.53% <42.85%> (-0.35%)
:arrow_down:

server/errors/encoded_errors.go
93.33% <77.77%> (-0.76%)
:arrow_down:

storage/mysql/mysql.go
65.56% <0.00%> (+0.55%)
:arrow_up:

storage/postgres/utils.go
89.36% <0.00%> (+0.70%)
:arrow_up:

server/commands/check_utils.go
95.79% <0.00%> (+1.26%)
:arrow_up:

server/commands/check.go
89.47% <0.00%> (+1.66%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

The error responses differ between unary & streaming, is this ok?
2022/10/19 16:32:26 [DEBUG] GET http://localhost:55647/stores
{"code":"unauthenticated","message":"unauthenticated"}
2022/10/19 16:32:26 [DEBUG] POST http://localhost:55647/stores/01GFS9EMKGY23KN2JJQH6WFPRZ/streamed-list-objects
{"error":{"code":16,"message":"unauthenticated","details":[]}}

I don't know a way around that. The response from the grpc streaming endpoint is a *status.Status. It differs with the unary because of the custom HTTPErrorHandler. We have control over the response body of the error with the custom HTTPErrorHandler in the unary case, but not in the streaming RPC case (AFAIK).


Unable to connect RPC server

@evaluationcopy
First of all thanks for this image.
I am trying to to connect Doge within PHP. I am getting the following error:
Fatal error: Uncaught GuzzleHttp\Exception\ConnectException: cURL error 52: Empty reply from server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://<IP_ADDRESS>:22556/ in

Why is it sending an empty response? I had not found a dogecoin.conf  so I created one in the folder /root/.dogecoin with the following content only:
regtest=1
server=1
rpcuser=rpcuser
rpcpassword=regtest=1
rpcport=22556

And I am initiating the container as docker run -p 22556:22556  --name dogecoin_latest evaluationcopy/dogecoin-node:latest
What am I doing wrong here?

Your config file is using port 22556 as the rpc port.  Port 22556 is usually the dogecoin port and port 22555 is usually the rpc port.
My docker image exposes port 22556, but not 22555.  The rocker run command will have to be updated in order to expose port 22555..
Instead of running:
docker run -p 22556:22556 --name dogecoin_latest evaluationcopy/dogecoin-node:latest
Try something like...
docker run -p 22556:22556 -p 22555 --name dogecoin_latest evaluationcopy/dogecoin-node:latest
Of course update the dogecoin.conf to set the rpc port back to 22555.  I'll mention I didn't get the test out the command line above, it's possible more is needed to expose the port as the dockerfile I created exposes port 22556 only.


Swap to using openscm_units

[ ]  #31

Codecov Report

Merging #30 into master will decrease coverage by 0.11%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
- Coverage   98.82%   98.70%   -0.12%
==========================================
  Files           7        7
  Lines         767      697      -70
  Branches      152      141      -11
==========================================
- Hits          758      688      -70
  Misses          9        9

Impacted Files
Coverage Δ

src/scmdata/__init__.py
100.00% <ø> (ø)

src/scmdata/units.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 967e7fc...12fb813. Read the comment docs.