content:// URI set with setArtworkUri not displayed in Notification

setArtworkUri(imageUri) for  MediaMetadata.Builder() doesnot render Image In PlayerView and Notification
I am trying to play songs from  Phone Local storage
I am trying to set the Imageuri for MediaMetadata`
This is the code I am using
 val metadata = MediaMetadata.Builder().setAlbumTitle(album).setTitle(title)
            .setArtist(artist).setGenre(genre).setIsBrowsable(isBrowsable).setIsPlayable(isPlayable)
           //   .setArtworkUri(imageUri)
            .setMediaType(mediaType).build()

When I set the setArtworkUri(imageUri) Where ImageUri is
  val albumId = getLong(cursor.getColumnIndexOrThrow(MediaStore.Audio.AudioColumns.ALBUM_ID))
val ImageUri = ContentUris.withAppendedId(                             MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI,                             albumId                         )
The Artwork is not displayed either in the Playerview or the notification
The other code used is from the Demo sessions app only the Mediaitemtree is created using the mediastore from localstorage instead of JSONObject
The question is how can we set the imageUri for the Uri that we get from the local storage
We have lazy column displaying a list of all the mediaitems In order to Maintain consistency we use the mediaMetadata.artworkUri with AsyncImage in coil , If I set the ImageUri   the AsyncImage is able to show the Image but the Playerview and Notification wont show any image
If we don't set the imageuri the asyncimage wont show the image since mediaMetadata.artworkUri is null which is expected behavior`  but the playerview and notification does show it
We want 2 options

set the imageuri using mediastore uri to show in Playerview, notification
if imageuri is not set allow access to the image that is displayed by the notification and playerviw that we can show in Asyncimage

Thanks for reporting!
Rendering the image referenced in the MediaItem in PlayerView isn't supported yet and regarding that this issue is a duplicate of issue #195. The issue is marked as an enhancement.

val ImageUri = ContentUris.withAppendedId( MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI, albumId )

I think this results in a URI with a content://-schema. I'd expect that content://-URI is supported by DataSourceBitmapLoader.
Can you confirm and paste the URI that is the result in ImageUri for confirming?
Did you change the BitmapLoader that can be set with MediaSession.Builder.setBitmapLoader(loader)?
This would help to repro in case this is a bug.
And to avoid another round-trip: can you send a bugreport just after the issue happens, so we can look intot he logs?

if imageuri is not set allow access to the image that is displayed by the notification and playerviw that we
can show in Asyncimage

I don't really understand what this means I'm afraid. If you are refering to the image that is shown by the PlayerView then this is the image that is part of the media you are playing. You can listen to Player.LIstener.onMediaMetadata(MediaMetadata) and check metadata.artworkData. The image that's in the media is merged into the medua metadata by the player.
Please clarify if I misundertood your statement.

Rendering the image referenced in the MediaItem in PlayerView isn't supported yet and regarding that this issue is a duplicate of issue #195. The issue is marked as an enhancement.

You mentioned that Rendering the image referenced in the MediaIteminPlayerViewisn't supported but this works if we don't use .setArtworkUri(imageUri)
So I don't understand why this is being considered even now, I had raised this issue earlier and after testing it later on I thought this issue was resolved here is an example  it works both for notification and Playerview

My question is specific

How can we access this image that is being shown in both playerview and Notification using mediaMetadata.artworkUri or any other way which we can display in the Lazy column using AsyncImage of coil library, this is the case when we don't use .setArtworkUri(imageUri)  while creating the mediaitem

If we use the .setArtworkUri(imageUri)  for mediastore as explained above  the image is not shown in Playerview or Notification how can we address this issue.

Sorry for not being clear.
If you reference an image as artworkUri then the PlayerView doesn't support this. What you see is when the actual bitmap is put into the metadata with artworkData.
When artworkUri is set, then a BitmapLoader is attempting to download the image and puts the resulting bytes into artworkData. From there PlayerView and System UI is reading it. If there isn't an artworkUri then the BitmapLoader isn't doing anything, In case that the media has some metadata with the artwork bitmap, the player merges this into the MediaMetadata.artworkData.

How can we access this image that is being shown in both playerview and Notification using mediaMetadata.artworkUri

You can't. You can use mediaMetadata.artworkData that is filled with the bitmap in the media as soon as the metadata is read. Then the metdata from the media is merged into the MediaMetadata from the MediaItem, onMediaMetadataChanged(MediaMetdata)` is called.

If we use the .setArtworkUri(imageUri) for mediastore as explained above the image is not shown in
Playerview or Notification how can we address this issue.

Like I said:
artworkUri is not supported with PlayerView. Only artworkData is. We have #195 as an enhancement for this.
We need more information as mentioned above:
Can you paste the URI that is the result in ImageUri?
Did you change the BitmapLoader that can be set with MediaSession.Builder.setBitmapLoader(loader)?

the Uri is in the content://-schema
here is the example
For the same song when we use .setArtworkUri(imageUri) check the uri that is displayed below the player
You can see the image is not displayed in the Playerview similar for the Notification

Thanks!
It's expected that the PlayerView doesn't show the image referenced by URI.
I'll try to repro this. If you want me to send a bug report this can speed up investigation for your case. The URI needs to be processed by your content provider. A bug report can help us ruling out that the URI isn't correct and that the content provider works as expected.

The Uri is correct I have tried with multiple files and Uris, I know Playerview doesnot show the image , but notification is expected to show , I will test how we can show metadata.artworkData  in asyncimage in Coil.
thanks for the reply.

I tested this with the ContentProvider that is part of the automotive app. I moved it to the demo session and changed the URIs of the mediat items to a content://-URI:
    <provider
      android:name="BitmapContentProvider"
      android:authorities="androidx.media3"
      android:exported="true" />

URI: content://androidx.media3/artwork/album_kyoto_connection.png
With this I see that the DataSourceBitmapLoader is calling ContentProvider.openFile():
openFile:41, BitmapContentProvider (androidx.media3.demo.session)
openAssetFile:2239, ContentProvider (android.content)
openTypedAssetFile:2417, ContentProvider (android.content)
openTypedAssetFile:2484, ContentProvider (android.content)
openTypedAssetFile:667, ContentProvider$Transport (android.content)
openTypedAssetFileDescriptor:2043, ContentResolver (android.content)
openTypedAssetFileDescriptor:1981, ContentResolver (android.content)
open:85, ContentDataSource (androidx.media3.datasource)
open:275, DefaultDataSource (androidx.media3.datasource)
load:112, DataSourceBitmapLoader (androidx.media3.datasource)
lambda$loadBitmap$2$androidx-media3-datasource-DataSourceBitmapLoader:105, DataSourceBitmapLoader (androidx.media3.datasource)
call:0, DataSourceBitmapLoader$$ExternalSyntheticLambda2 (androidx.media3.datasource)
runInterruptibly:131, TrustedListenableFutureTask$TrustedFutureInterruptibleTask (com.google.common.util.concurrent)
run:76, InterruptibleTask (com.google.common.util.concurrent)
run:82, TrustedListenableFutureTask (com.google.common.util.concurrent)
runWorker:1145, ThreadPoolExecutor (java.util.concurrent)
run:644, ThreadPoolExecutor$Worker (java.util.concurrent)
run:1012, Thread (java.lang)

Can you please check:

Whether you are using DataSourceBitmapLoader
Whether the URI matches the authority in the manifest?
Whether DatasourceBitmapLoader is calling your content provider's openFile method?

In case I forgot to say that a bugreport would be helpful for us for investigation. For now I think this is working as intended from the library side.

I am not using DataSourceBitmapLoader it was simple .setArtworkUri(imageUri) which I expected to show the albumart atleast in the Notification


Can't read model with Construction stage with PTC loads

Saving a struxml file with a stage with post tensioning cables cannot be deserialized by the API.

The problem is due to the case attribute in activated_load_case that can either be a guid or this "ptc_t8" name here.

ActivatedLoadCase (cs_lc_type) have an attribute case (load_case_cs) that can be any of the following types:
guidtype, indexed_guid, lc_ptc_type, lc_pile_type

Was this merged to 21.4.0?

Was this merged to 21.4.0?

Yes!


⚠ Bofrost.lu has degraded performance

In 7bec312, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1518 ms

Resolved: Bofrost.lu performance has improved in 00f3e04 after 6 minutes.


Added role management and acl

Taken care of those 2 points on the todo list :

Map API roles to Narzerus/angular-permission
Permissions on user actions (non-admins cannot access advanced functions)

also I added a module for roles management and select list for user/role attachment on the user edit page.
There a bunch of issues that needs to be taken care of like:

when checking if user role exists using the api using this url HEAD /users/{id}/roles/rel/{fk}
it sends a 404 error when it doesn't exist so I had to comment out those lines here https://github.com/shalkam/loopback-angular-admin/blob/master/client/app/modules/users/config/users.auth.js#L28

the way the user roles are attached in the user boot file : https://github.com/beeman/loopback-angular-admin/blob/master/server/boot/02-load-users.js
doesn't add new rolemapping into the database which is necessary to determine the user role.
When I do a GET /roleMappings I get an empty array.

I don't know how to use angular-toasty in routes when using angular permission

may be there other issues too

@shalkam First of all thanks a lot for your contribution! It's really appreciated and I think this is functionality that a lot of people welcome in this project, myself included!
One of the things that I notice in the PR is that a lot of changes in the files are just changes in whitespace. Can you please make sure that the lines you are committing are only actual changes? This makes it way easier for me to review this.
There is a .editorconfig file in the root of the project that specified 2 spaces for indents, it would be great if you can adhere to this rule.
If the whitespace is fixed I'm happy to review this an polish it so it will fit in the system.
Again, thanks for contributing!

@beeman thanks for pointing out the existence of the _.editorconfig _  I've installed the editor config plugin for my code editor and it should be fixed now.
I've taken a look at the files changed it seems to be showing all the related files, with the exception of some file at the end where square brackets have been changed into curly brackets I don't know why this happened.

@shalkam Thanks a lot for fixing the indents.
the reason that the model files had a change in the methods key from arrays (square brackets) to objects (curly braces) is probably because you ran slc loopback:model to generate the roleMapping model?
I've updated the master branch with this change so it should not appear in your PR again.

because you ran slc loopback:model to generate the roleMapping model?

Yes that is exactly what happened

Hey @shalkam, I finally found some time to test this commit.
The first thing I found is that I can't get it running when I do a git clone, npm install (which triggers bower install) and grunt serve.
I get this error message in my browser console:
angular-permission.js:210 Uncaught TypeError: angular.module(...).decorator is not a function
angular.js:4149 Uncaught Error: [$injector:unpr] Unknown provider: TransitionPropertiesProvider <- TransitionProperties
http://errors.angularjs.org/1.3.12/$injector/unpr?p0=TransitionPropertiesProvider%20%3C-%20TransitionProperties

I didn't check really deep into it, but it looks like some issue with angular-permission.
Speaking of angular-permission, I have second thoughts on using this library in the front end of the app. As you noted in your comment here https://github.com/beeman/loopback-angular-admin/pull/176/files#diff-1ed3f3562d8ab3a77ce7f8ab947e538dR3 , there is an overlap in the name Role. Additionally, I don't think it adds too much value. I have created a custom AclService at work that does the basic checks, combined with a method on the API that gives a summary of the logged in users permissions. I will have a look to see if I can port those methods to this project.
I've fixed the merge issues and adjusted a small thing in bower.json and pushed it up to this branch https://github.com/beeman/loopback-angular-admin/tree/shalkam-master . Let's continue in that branch for now.

FYI, I've just added the method for getting user information, this can be resolved when the app loads, in order to have a mapping of the roles
https://github.com/beeman/loopback-angular-admin/commit/ad84712bccaec304cce65adc69229eb0c71e8e7d

@beeman Hi, Sorry for the delay ... couldn't get back to you sooner.
I've installed the files from my repository and I saw that it shows the same error you reported I take care of it and get back to you

@shalkam Thanks for your response!
Please not that I have started working on a major update in the develop branch. It completely changes the front end so it might be better to develop against that branch.

@beeman I've got project being developed using the master branch I will finish this one then I will be more than glad to contribute to the develop branch.
I think later on the ng-admin project https://github.com/marmelab/ng-admin should be used as reference and add advanced functions like menu management.

@shalkam thanks a lot for submitting a PR.
I'm closing this PR as I will be pushing out an updated develop branch soon that has ACL's and roles and permissions enabled.


Question: How to pass in search_kwargs dynamically to the chain based on the query input?

If we take the example that is in the docs:
def create_chain():
db = FAISS.load_local(
    folder_path="vector_stores/",
    index_name="langchain-python",
    embeddings=OpenAIEmbeddings(),
)

return RetrievalQAWithSourcesChain.from_chain_type(
    llm=ChatOpenAI(
        temperature=0,
        streaming=True,
    ),
    chain_type="stuff",
    retriever=db.as_retriever(),
    return_source_documents=True,
    verbose=True,
)

app = mount_gradio_app(FastAPI(title="RetrievalQAWithSourcesChainDemo"))
templates = Jinja2Templates(directory="templates")
chain = create_chain()

@app.get("/")
async def get(request: Request):
    return templates.TemplateResponse("index.html", {"request": request})

langchain_router = LangchainRouter(
    langchain_url="/chat", langchain_object=chain, streaming_mode=1
)

I want to be able to pass to the retriever in the chain the search_kwargs so it does some filtering,
But that should be based on the query of the input, for example, we might have another attribute in the input like a list of authorized_documents_codes so that we can pass this list to the retriever and it can filter the documents in the search.
How to do that with Lanarky?
Here is the original code without streaming to have an idea of what I'm talking about that I used for filtering and the goal is to make it in streaming but with filtering for the retriever:
def send_message(question: Question):
    system_template = """Use the following pieces of context to answer the user's question.
    If you don't know the answer, just say that "I don't know", don't try to make up an answer.
    If the context is empty, just say that "I don't know", but always reply in the same language of the user.
    ----------------
    context:
    {summaries}"""

    messages = [
        SystemMessagePromptTemplate.from_template(system_template),
        HumanMessagePromptTemplate.from_template(question.question),
    ]
    prompt = ChatPromptTemplate.from_messages(messages)

    llm = ChatOpenAI(
        model_name=question.model_type,
        temperature=question.temperature,
        max_tokens=question.max_tokens,
    )

    search_kwargs = {"k": question.k}

    if question.authorized_codes:
        if len(question.authorized_codes) > 1:
            or_filter = [
                {"source": {"$eq": code}} for code in question.authorized_codes
            ]
            search_kwargs["filter"] = {"$or": or_filter}
        elif len(question.authorized_codes) == 1:
            search_kwargs["filter"] = {
                "source": {"$eq": question.authorized_codes[0]}
            }

    chain = RetrievalQAWithSourcesChain.from_chain_type(
        llm=llm,
        chain_type="stuff",
        retriever=langchain_db_client.as_retriever(search_kwargs=search_kwargs),
        return_source_documents=True,
        chain_type_kwargs={"prompt": prompt},
    )

    results = chain(question.question)

    return results

@app.post("/query")
def query(body: Question):
    logger.info(f"Received query: {body}")
    response = send_message(body)
    logger.info("Query processed successfully.")
    return response

The problem with Lanarky is that the chain should be passed at the creation of the router, so that makes it not dynamic and susceptible for modifications..

Hi @khaledalarja, the endpoint creation in the examples is an abstraction to create a /chat endpoint for basic use cases. for more complex use cases such as yours, I recommend checking out this example: https://github.com/menloparklab/chatbot-ui/blob/d2d4aa84ebb6351bfacee99429228d091221b60b/backend/app.py#L101-L114
The idea is to use the router instance to manually create a new endpoint. The advantage of using the LangchainRouter over FastAPI's APIRouter is that you get the LLM caching built-in.
You will need to create your own pydantic models for request and response body. You can use the above example for the same.

Hi @ajndkr
Thanks so much for your reply !
I have managed to have some streaming using the example that you gave me, but there is something strange that I noticed,
When I use gpt-3.5-turbo, the streaming is handled sentence by sentence, and when I choose gpt-4 here I lose all the streaming and I will have to wait for the response to complete!
Here is the modified code:
class Prompt(BaseModel):
    query: str
    authorized_codes: Optional[List[constr(regex=r"^\d{2}[A-Z]{3,5}\d{2,5}")]] = None
    temperature: float = 0.0
    max_tokens: int = 1000
    k: int = 6
    model_type: str = "gpt-4"

def create_chain(user_input: Prompt) -> AsyncIterable[str]:
    system_template = """Use the following pieces of context to answer the user's question.
    If you don't know the answer, just say that "I don't know", don't try to make up an answer.
    If the context is empty, just say that "I don't know", but always reply in the same language of the user.
    ----------------
    context:
    {summaries}"""

    messages = [
        SystemMessagePromptTemplate.from_template(system_template),
        HumanMessagePromptTemplate.from_template(user_input.query),
    ]
    prompt = ChatPromptTemplate.from_messages(messages)

    llm = ChatOpenAI(
        model_name=user_input.model_type,
        temperature=user_input.temperature,
        max_tokens=user_input.max_tokens,
        streaming=True,
        verbose=True,
    )

    chain = RetrievalQAWithSourcesChain.from_chain_type(
        llm=llm,
        chain_type="stuff",
        retriever=langchain_db_client.as_retriever(),
        return_source_documents=True,
        chain_type_kwargs={"prompt": prompt}
        )
    return chain

@app.post("/query")
async def query(user_input: Prompt):
    chain = create_chain(user_input)
    return StreamingResponse.from_chain(chain, user_input.query)

hmm. this is a weird error. both gpt-3.5 and gpt-4 use the same callback. So it's likely that the streaming is affected by openai API and not this library. can you try again with a different chain or different system prompt?

closing issue due to user inactivity.
You can check out the new documentation for v0.8: https://lanarky.ajndkr.com/learn/adapters/langchain/
please reopen this issue if you'd like to discuss more.


Using removable Pod instead of Deployment in HPA example

Enhancement for the page Tasks / Run Applications / Horizontal Pod Autoscaler Walkthrough
Using removable Pod instead of Deployment in HPA example.

change is here -> https://deploy-preview-17604--kubernetes-io-master-staging.netlify.com/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#increase-load

/assign @ryanmcginnis

/approve

/lgtm
/approve


Update how-to-authentication-methods-manage.md

Rename phone to voice and add detail about group targeting

Learn Build status updates of commit b57c660:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/active-directory/authentication/how-to-authentication-methods-manage.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

@justinha
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@justinha
Thanks for reviewing! Note that GitHub doesn't support commands made in the diff review UI.
In the future, #sign-off comments should be made separately in the conversation view, or the PR might get overlooked.


Got [ NameError: name 'render_template_to_pdf' is not defined ]

I followed the instruction and set up everything but when I run code to test.
I got this error -> NameError: name 'render_template_to_pdf' is not defined.
Here is my code:
from flask import Flask, render_template, url_for

from flask_wkhtmltopdf import Wkhtmltopdf
import os

app = Flask(__name__)
wkhtmltopdf = Wkhtmltopdf(app)

WKHTMLTOPDF_BIN_PATH = "/usr/local/bin/wkhtmltopdf"
PDF_DIR_PATH =  os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static', 'pdf')

@app.route('/htmltable')
def html_table():
    return render_template_to_pdf('table.html', download=True, save=False)

@app.route('/hello_table.pdf')
def hello_table():
    return render_pdf(url_for('html_table'))

if __name__ == '__main__':
    app.jinja_env.auto_reload = True
    app.config['TEMPLATES_AUTO_RELOAD'] = True
    app.run(host='<IP_ADDRESS>', port=4001, debug=True)

I already checked Wkhtmltopdf which installed correctly in my ubuntu server 18.04 and Wkhtmltopdf's path is same as above in code.
What is the cause of this problem?
best regards,
Sunsern Khantong

have you found a solution for this? I'm having same issue

The issue comes from the fact that the "render_template_to_pdf|" is a method of the class  Wkhtmltopdf.So you will have to initialize it with the class ,or else it will show a not defined error.As shown below:
You initialize  your  flask app’s object to Flask-WkHTMLtoPDF:
from flask_wkhtmltopdf import Wkhtmltopdf
   app = Flask(__name__)
   wkhtmltopdf = Wkhtmltopdf(app)

Then pass the template to the render_template_to_pdf() method initialized alongside with its class:
wkhtmltopdf.render_template_to_pdf('test.html', download=True, save=False, param='hello')
It works fine for me,you can try it out
Let me know if there is an issue,
Best regards,
Ebot Fabien


Add support for Oracle GraalVM

Already available via https://github.com/marketplace/actions/github-action-for-graalvm

Now that Oracle GraalVM is available on oracle.com, shouldn't this plugin also support it?
https://www.oracle.com/java/technologies/downloads/#graalvmjava20
The URL is very similar to the JDK
https://download.oracle.com/java/20/latest/jdk-20_linux-x64_bin.tar.gz
https://download.oracle.com/graalvm/20/latest/graalvm-jdk-20_linux-x64_bin.tar.gz

You may want to take a look at https://github.com/actions/setup-java/pull/501.


set metal resource labels - sokol_gfx.h

It would be useful if all the .label strings were passed on to the underlying MTLResource's label property, for easier debugging in the Metal Debugger.

Yes good idea, question is: only in debug mode, or also for release? I tend towards 'only in debug mode'.

Ok, I'll only do it in debug mode. I also implemented sg_push/pop_debug_group(), but only inside a render pass (because in these are MTLCommandEncoder methods in Metal).
In some cases I'm adding a post-fix to the label (where sokol-gfx may create multiple Metal objects for a single sokol-gfx object). For the texcube-sapp it looks like this:

PS: also make sure to run your sokol-gfx frame inside an @autoreleasepool, not sure if I have mentioned that anywhere (sokol_app.h does this automatically).
I'll put the changes into a PR and close this ticket when merged.

PS: https://github.com/floooh/sokol/pull/890

Ok, fixed in a4d1119d09c3f1a54f851d9af32e974ab2a56a2b

Awesome! Thank you! I was also thinking only in debug mode.


BrotliStream quality levels from 5 to 9 don't work on NetCore.

That exception is throwed on Quality levels 5,6,7,8 and 9
System.NullReferenceException: Object reference not set to an instance of an object.
StackTrace:
at BrotliSharpLib.Brotli.ShouldUseComplexStaticContextMap(Byte* input, SizeT start_pos, SizeT length, SizeT mask, Int32 quality, SizeT size_hint, ContextType* literal_context_mode, SizeT* num_literal_contexts, UInt32** literal_context_map)
at BrotliSharpLib.Brotli.DecideOverLiteralContextModeling(Byte* input, SizeT start_pos, SizeT length, SizeT mask, Int32 quality, SizeT size_hint, ContextType* literal_context_mode, SizeT* num_literal_contexts, UInt32** literal_context_map)
at BrotliSharpLib.Brotli.WriteMetaBlockInternal(MemoryManager& m, Byte* data, SizeT mask, UInt64 last_flush_pos, SizeT bytes, Boolean is_last, BrotliEncoderParams* params_, Byte prev_byte, Byte prev_byte2, SizeT num_literals, SizeT num_commands, Command* commands, Int32* saved_dist_cache, Int32* dist_cache, SizeT* storage_ix, Byte* storage)
at BrotliSharpLib.Brotli.EncodeData(BrotliEncoderStateStruct& s, Boolean is_last, Boolean force_flush, SizeT* out_size, Byte** output)
at BrotliSharpLib.Brotli.BrotliEncoderCompressStream(BrotliEncoderStateStruct& s, BrotliEncoderOperation op, SizeT* available_in, Byte** next_in, SizeT* available_out, Byte** next_out, SizeT* total_out)
at BrotliSharpLib.BrotliStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count, BrotliEncoderOperation operation)
at BrotliSharpLib.BrotliStream.FlushCompress(Boolean finish)
at BrotliSharpLib.BrotliStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()

I am unable to reproduce this issue in a .NET Core 1.0 & 1.1 project in VS2017 on Windows 10. What environment are you running this on? Can you provide me with some minimal code and a test file which can reproduce this issue?

I'm unable to reproduce this on my Windows 10 home computer, its an issue I
found at job computer (I don't have remote access), I'm currently on
holidays until next monday.
I could not remember if issues happends on Windows 10 or on Ubuntu 17.04 ,
On Monday I will try to reproduce again and send you more details.
Thank you
El 12/10/2017 1:56, "master131"<EMAIL_ADDRESS>escribió:

I am unable to reproduce this issue in a .NET Core 1.0 & 1.1 project in
VS2017 on Windows 10. What environment are you running this on? Can you
provide me with some minimal code and a test file which can reproduce this
issue?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/master131/BrotliSharpLib/issues/1#issuecomment-335981206,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAwtskSacydCGQ3OehBMUPeHsrrcOue3ks5srVWSgaJpZM4PweIC
.

We just switched our app over to use this Brotli library and 99% of the time it was working perfectly but every so often it would throw an error with the same stack trace as the original comment from @Alfalover. We were using a quality level of 5 and when we bumped it down to 4 it stopped throwing the error.
I don't know if it was just because of the size of the array, The error happens consistently when we are passing in a byte array of length 1115717.
We are using the latest 0.2.1 from Nuget and .Net core 2.0.0

I'll have a look into this when I have time. Due to the sheer complexity of the code it might take some time to debug.

Hello, I ran into this issue as well and did some debugging. This happens in "ShouldUseComplexStaticContextMap", which is only called when compression quality >= MIN_QUALITY_FOR_CONTEXT_MODELING (5) and a size_hint of 2^20 or larger, which is most of the time equivalent to the size of the input data.
So, if you compress a block bigger than 1 MiB with quality 5 or higher, it'll fail.
Luckily, the actual bug is just a copy paste error and can be easily fixed. I have attached a file with a fix, not sure if this is the most C# way to do it, but it is functional.
It would be great if you could update the Nuget package!
Encode.zip

Thanks @Rattenhirn, I've added the fix to the latest build.


Update AudioBufferSourceNode to latest W3C draft

With this PR, the AudioBufferSourceNode WebIDL file is updated to the latest version of the W3C draft at https://webaudio.github.io/web-audio-api/#AudioBufferSourceNode.
Namely, the grain_ prefix from the offset and duration input parameters is removed.
The removed attribute EventHandler onended; can be accessed through the AudioScheduledSourceNode base class.

Replaced by #4020.


clarification of security warning

Hi there
thank you all for your work on this wonderful tool.
a question about what is written in the documentation:

NOTE: It is critical you put better_errors in the development section. Do NOT run better_errors in production, or on Internet facing hosts.

What is meant by "internet facing hosts"? Any clarificaiton would be much appreciated.
rgds
Ben

An "Internet-facing host" is a server that has a public address and is accessible to other hosts over the Internet.


[SPARK-47182][BUILD] Exclude commons-(io|lang3) transitive dependencies from commons-compress and avro*

Why are the changes needed?
This PR aims to exclude commons-(io|lang3) transitive dependencies from commons-compress, avro, and avro-mapred dependencies.
Does this PR introduce any user-facing change?
Apache Spark define and use our own versions. The exclusion of the transitive dependencies will clarify that.
https://github.com/apache/spark/blob/1a408033daf458f1ceebbe14a560355a1a2c0a70/pom.xml#L198
https://github.com/apache/spark/blob/1a408033daf458f1ceebbe14a560355a1a2c0a70/pom.xml#L194
How was this patch tested?
Pass the CIs.
Was this patch authored or co-authored using generative AI tooling?
No.

If the groupId and artifactId are the same, Maven should choose the latest version among multiple versions. What problems could occur if we don't exclude it?

Currently, we are in sync with the latest versions, but the latest version might be different from the Apache Spark's versions. For both Maven and SBT, this PR want to exclude the transitive dependency clearly without depending on the dependency resolution for them, @LuciferYang .

Specifically, the following dependency clarification is the goal of this PR.
BEFORE
$ build/sbt "core/dependencyTree" | grep -C2 commons-compress | tail -n3
Using SPARK_LOCAL_IP=localhost
[info]   +-org.apache.commons:commons-compress:1.26.0
[info]   | +-commons-io:commons-io:2.15.1
[info]   | +-org.apache.commons:commons-lang3:3.14.0

AFTER
$ build/sbt "core/dependencyTree" | grep -C2 commons-compress | tail -n3
Using SPARK_LOCAL_IP=localhost
[info]   +-org.apache.commons:commons-compress:1.26.0
[info]   +-org.apache.commons:commons-crypto:1.1.0
[info]   +-org.apache.commons:commons-lang3:3.14.0

Okay, I understand your intention. So, will there be more similar PRs in the future to explicitly exclude the transitive dependencies declared by Spark?

To give you the context, I'm currently working on this for Apache Spark 4.0.0 preparation, @LuciferYang .

SPARK-47046 Apache Spark 4.0.0 Dependency Audit and Cleanup

https://github.com/apache/spark/security

No, I don't think so if there is no other CVE related stuff bites us again, @LuciferYang .

Okay, I understand your intention. So, will there be more similar PRs in the future to explicitly exclude the transitive dependencies declared by Spark?

To give you the context, I'm currently working on this for Apache Spark 4.0.0 preparation, @LuciferYang .

SPARK-47046 Apache Spark 4.0.0 Dependency Audit and Cleanup

https://github.com/apache/spark/security

Thanks @dongjoon-hyun  This is a great work!!!

Thank you, @LuciferYang . I fully understand your concern and have the same feeling about this kind of tedious code changes which sometimes looks redundant. This is just a way of communication in order to give a clarify of Apache Spark 4.0.0 dependency issues.

Merged to master for Apache Spark 4.0.0.

It seems that we need this transitive dependency clean up in branch-3.5 too. Let me backport this.

Thanks @dongjoon-hyun


Ugly settings background

Hi,
In settings pane, there's a wallpaper with icons which is ugly, can you remove it ? :D
(sorry for all those issues, there's a lot haha)
Thank you

:D Yeah I guess I could, it's actually just the settings icon upscaled and with ~50% opacity. I don't use background images, they're too web 2.0-ish 😂
But yes, consider it gone, I don't like them either😄

The icons are now reverted, I'll take a look into the background color and sections when I have time!


feat: music generation (musicgen/audioldm)

https://replicate.com/meta/musicgen
https://replicate.com/haoheliu/audio-ldm


add tests for filename validation in gdt wizard - summary page

goes together with https://github.com/uberfire/uberfire/pull/376 but is not dependent on it
(part X of moving-tests-to-community series)

+1 to merge.


Azure: Node Pools

Epic User Story
As a user creating multiple clusters, I want to be able to define the individual character of each of these clusters, so I can have multiple clusters use cases in one cluster.
Acceptance Criteria
I can have different node pools in a cluster which:

are spread across different availability zones
have different levels of storage
have different availability zones which I can manage through the UI Happa, GSCTL, API.

Links

Dimensions of Complexity analysis: report

Please view this slide-deck for an overview of the 'AS-IS - TO-BE' design: design

In the face of recent issues we all experienced on Azure, we revised the expected delivery date for the Node Pools functionality from Q2 to Q3.
It took a month to mitigate API throttling (error 429) and protect clusters from its effects. Then we had to focus on replacing CoreOS, which is going EoL, to Flatcar. To make it a non-breaking change with minimal impact on your workloads, we had to invest a significant effort. Although we already started working on Node Pools, these two issues greatly impacted the progress we were able to make so far.


Add benchmark package

Use a hunterized fork.
PR: benchmark#365

Testing:

https://ci.appveyor.com/project/ingenue/hunter/build/1.0.1523
https://travis-ci.org/ingenue/hunter/builds/218438535

Testing

Some toolchains failed. You can exclude broken toolchains by commenting them out from .travis.yml/appveyor.yml configs (send pull request to the pkg.benchmark branch) or investigate problem and do the fixes.

Depends on https://github.com/ingenue/hunter/pull/57

Testing:

https://ci.appveyor.com/project/ingenue/hunter/build/1.0.1566
https://travis-ci.org/ingenue/hunter/builds/220564649

Testing

Some toolchains still not working.

I saw; I'm trying to reproduce the CI configuration on my fork to investigate the issue, without success.
Could you point me why my build fails with error "CMake Error: The source directory "C:/projects/hunter/examples/benchmark" does not exist"?
Thank you.

Could you point me why my build fails with error "CMake Error: The source directory "C:/projects/hunter/examples/benchmark" does not exist"?

I guess because example is not merged (it's in this pull request). So to test your changes you should merge pkg.benchmark and your branch.

If I've understood correctly, it is not possible to merge ruslo/hunter:master directly into ingene/hunter:pkg.benchmark, isn't it?
Since my piribes/hunter:hunter was forked from ruslo/hunter:master, I cannot merge it into piribes/hunter:pkg.benchmark (that is based on ingenue/hunter:pkg.benchmark).
The only option I see is to cherry-pick the commits needed to run the CI, as I made.
Do you suggest a different approach for merging a package into its related testing branch?

Adding package
> git checkout master # switch to branch ruslo/hunter:master
> git checkout -b pr.mypackage # create new branch for pull request
> git add ... # add code
> git commit -m 'Add mypackage package'
> git push my-hunter-fork-remote pr.mypackage

Now you can open pull request to ruslo/hunter:master from myaccount/hunter:pr.mypackage
Excluding broken builds
If some tests not passed and need to be excluded you have to create new pull request for ingenue/hunter:pkg.mypackage:
> git checkout pkg.mypackage # switch to branch ingenue/hunter:pkg.mypackage
> git checkout -b pr.mypackage.excludes
> git add .travis.yml appveyor.yml # never other files here!
> git commit -m 'Exclude broken'
> git push my-hunter-fork-remote pr.mypackage.excludes

Open pull request to ingenue/hunter:pkg.mypackage from myaccount/hunter:pr.mypackage.excludes
Testing pull request on package
Here we are testing changes from pull request (not merged into master yet) on particular package. We need to fetch changes from pull request and merge them with .travis.yml/appveyor.yml testing instructions for package:
> git checkout pkg.mypackage
> git checkout -b pkg.mypackage.pr-N # test pull request N
> git fetch ruslo-hunter-remote refs/pull/N/head:pr-N
> git merge pr-N
> git push my-hunter-fork-remote pkg.mypackage.pr-N

Do you suggest a different approach for merging a package into its related testing branch?

@piribes take a look at last instructions, except you don't need to fetch your own pr-N, just substitute git merge pr-N with the name of your branch with changes you want to test.

Closing inactive pull request.


[BUG] - Inputs don't reset values when we're using formRef.current.reset()

Describe the bug
Inputs components donts reset with formRef.current?.reset()
Your Example Website or App
https://github.com/gustavocadev/nextjs-drizzle-orm-sqlite
Steps to Reproduce the Bug or Issue

Download the projects and follow the README
Add a note, and we'll see the form inputs are not reset

Expected behavior
I was expecting the form.reset() resets the <Input /> components
Screenshots or Videos
No response
Operating System Version
Windows
Browser
Edge

@gustavocadev Are the inputs controlled??

@gustavocadev Are the inputs controlled??

What do you mean?, I don't use any state to control the inputs

Hey @gustavocadev even though we use the native input element under the hood, the implementation is not native, it uses a controlled state that can be set from outside, here's the code https://github.com/nextui-org/nextui/blob/main/packages/components/input/src/use-input.ts#L89-L93
So if you want to clear the input values onSubmit / action you will need to control those values.
Here's an example: https://codesandbox.io/p/sandbox/festive-nova-jfxwcl?file=%2FApp.jsx%3A13%2C4&utm_medium=sandpack
You could also use a library to control the form:
https://react-hook-form.com/
https://formik.org/

Got it! Thx


Review KFP API configuration for KFP VIZ

Description
KFP API charm uses data from KFP VIZ relation to populate workload container configuration through environment variables:
            "ML_PIPELINE_VISUALIZATIONSERVER_SERVICE_HOST": viz["service-name"],
            "ML_PIPELINE_VISUALIZATIONSERVER_SERVICE_PORT": viz["service-port"],

This configuration needs to be reviewed.

These configs are currently set in the charm
We need to look into whether they are used, else we drop them


fix(tx-signing): routes missing, missing sip10 detection

Try out this version of the Hiro Wallet - download extension builds.

Closes #2534
Closes #2537
Thanks for pointing out @friedger. Also updates connect

+1


Arrays of objects

I have something that looks like this:
<input name="foo[0][bar]" value="a"/>
<input name="foo[0][baz]" value="b"/>
<input name="foo[1][bar]" value="c"/>
<input name="foo[1][baz]" value="d"/>

This is being parsed as
{
  "foo": {
    "0": {"bar": "a", "baz": "b"},
    "1": {"bar": "b", "baz": "c"},
  }
}

Since the keys are numbers, I would have expected it to parse it as an array, as so:
{
  "foo": [
   {"bar": "a", "baz": "b"},
   {"bar": "b", "baz": "c"},
  ]
}

I think this is a reasonable setting to use since numeric keys are already used for arrays of strings.
Would a PR for this change be welcome?

Would entertain a PR for this. Also will add that you can post process such objects into arrays in your own code in the event that the default hash behavior is not adequate for your needs. In this case, we had to pick something to support for brackets with a value in them and I think we support array index without additional brackets after (per the readme) but we could make an improvement there.

Yeah, right now I'm post processing the data since I needed it done quickly, but I'll look into it when I have more time next week and get it in so that I won't have to do additional processing for future use cases.

Currently struggling with this same issue.
Not sure I'm up to the task but maybe?  But perhaps @RangerMauve has something brewing.  I'd be very pleased.

@IanRr I've added a post processing hook in my code, and I happen to rely on JSON-Schema so I know which parts of my form needs to be an array of objects.
Sadly I'm a bit too busy to work on this and actually don't need it for my main projects at the moment. From doing a quick review of the code, the change needs to be done around here where you'd need to set the existing key to an array. Might also need to look around here


chore: group dependabot k8s libs bumps

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 13.13%. Comparing base (ea6dcb3) to head (c93e1c5).

:exclamation:  There is a different number of reports uploaded between BASE (ea6dcb3) and HEAD (c93e1c5). Click for more details.
HEAD has 25 uploads less than BASE

Flag
BASE (ea6dcb3)
HEAD (c93e1c5)

integration-test
28
3

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1184       +/-   ##
===========================================
- Coverage   59.65%   13.13%   -46.52%
===========================================
  Files          50       50
  Lines        4080     4080
===========================================
- Hits         2434      536     -1898
- Misses       1333     3468     +2135
+ Partials      313       76      -237

Flag
Coverage Δ

integration-test
13.13% <ø> (-46.52%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Modify some calls of method Collection.toArray

Use method with empty array instead of pre size array.
Because it's more safe and faster.
See also this blog

BTW @PeterAlfredLee - thanks for the ref to https://shipilev.net/blog/2016/arrays-wisdom-ancients/, fun stuff.

I'm glad this helps a little bit. :)


SafeInfinityUi's navigationBarBackground stopped working in 0.2.5

After update to 0.2.5 navigationBarBackground doesn't work anymore.
Widget tree like this:
return SafeInfinityUi(
        navigationBarBackground: Container(
                color: Colors.white,
              ),
            ...

Container is not displayed at all...
Android version is 9.

Also InfinityUi.navigationBarHeight seems to be not always calculated correctly for some reason...
Reverting to 0.2.2 solves both of these issues.

Hi @emvaized , I tested this in many device with different android versions But I did not encounter such a problem. Thank's for report this issue. please share your device name and if you can part of your code with me.

@o4x Thanks for your reply!
Unfortunately, I can't test on a real device for now, so can confirm this happen only on emulator running Android 9.

closed issue accidentally

Ohhh, I really don't know where the this problem comes from. What is your emulator ?

@o4x Okay... Maybe I'm the only one facing this issue.
Here's emulator main specs:

@emvaized Have you encountered this problem with the example that comes with this repository ? I tested with the this version of the emulator and did not encounter any problem. However, this issue will remain open.

@o4x Yeah, I use basically the same layout, but with Container instead of Image...
Okay, thanks for your response anyway! Very cool and rare when such a great libraries are maintained that well. Keep it up :+1:
I guess I'll stuck with 0.2.2 by now, since everything works more stable for me (except Android 10 navbar of course).


unable to navigate the generated HTML coverage report

After executing the zest coverage command, and I get the success message Successfully generated html report at ./target/coverage/html/index.html, opening..., the index.html file does open.
But I am unable to actually navigate around on the listed source code files and directories. To view any of the other report files, I have to manually open each from the file explorer instead of being able to navigate in the automatically opened web browser tab.
Some general info about my system:

zest v0.1.0
operating system: PopOS (Debian linux)
web browser brave

I just tried running the coverage tool on a different linux computer running Ubuntu (also with brave) and the html navigation works as expected. So it is inconsistent between operating systems


latex-envs installation instructions

Related to #598

Add to the installation instructions how to set up Jupyter with latex-envs in order to properly render the examples
Add to HARK.utilities a script that tests whether this installation has been accomplished

May need to add it to requirements also, see:
https://github.com/econ-ark/HARK/pull/598#issuecomment-605089480


Enable override of certificate domains

What does this PR do?
This makes it possible to specify which domains are used with a TLS certificate.
[[tls]]
  [tls.certificate]
   domains = ["one.example.com", "two.example.com"]
   certFile = "/certs/wc.example.com.chain.crt.pem"
   keyFile = "/certs/wc.example.com.key.pem"

Motivation
Had a case where I had two certificates overlapping, and I wanted to be explicit about which one should be used for what domain.
More

[ ] Added/updated tests
[ ] Added/updated documentation

Additional Notes
I'd like some feedback if this is the right approach.

Thanks for your contribution.
I think the problem your want to resolve should be resolve by this proposal #4756 because you will be able to assign a specific certificate to a specific store and then use this store in your router.
That's why I will close this PR, if you think you have a use case not resolve by this proposal, don't hesitate to give feedback on the proposal.

@juliens Ah, yes. #4756 would cover it. Although in my case it would be more configuration (I would end up with a lot of stores), but the proposal is much more flexible and re-usable in other cases.
:thinking: Only feedback I could give about the proposal is that it might be tricky to choose the certificate when the router has other rules than sni host pointing to different certificates stores... so that has to be well understood.


Add e2e tests

There's a lot of code moving around, and the best way to keep the tool stable is via e2e tests.
We should work towards adding e2e test for most (if not all) the commands.
ping @ashetty1 @kadel

client-go has fake package for almost all the code in there, we could leverage that.

client-go has fake package for almost all the code in there, we could leverage that.

but that is not for e2e tests but for unit tests

@containscafeine I haven't pushed many changes yet because I was waiting for a few changes to be merged over last week. Will \be pushing tests for more commands this sprint.

@ashetty1 It will be better if we can add them continuously. As soon as you have something (even a single test) please open PR with it.

@ashetty1 please link all PRs related to e2e tests to this issue so we can keep track of what is happening

Listing the PRs so far merged:
PR #242
PR #268

A complete coverage matrix for e2e tests maintained here: https://github.com/redhat-developer/ocdev/tree/master/tests/e2e

This is going awesome :fire:

This is ongoing work, I guess we can close this


Move the Instana data to a new google/drive account

Done. Added to google-drive under https://drive.google.com/drive/folders/1etnVorTiYDxVY7XWx_0naaUTMUvYFPXo?usp=sharing
User<EMAIL_ADDRESS>Password: ask @Seep-Goel @eranra for details


Explain how list item renditions can be added

The old foundation list component had the option of configuring list item renditions ("displayAs"-property).
The core list component doesn't have that option, so I assume this is something that needs to be added by a developer. It would however be good to document the best practices around implementing this feature.
I can imagine overwriting the "item.html" and putting in some logic to render the list items differently according to a dialog setting, or even according to the list item (Page) that is rendered.

+1 this needs to be documented

I think we actually need something a bit more complex: It would be nice if we can do something like this:

Add list item rendition by defining sub components(?) or similar
List the sub components in the dialog, to allow the author to select the list item rendition to be used
Have the sub component contain an additional dialog, to let the author configure the specifics for that list item rendition (so that we can keep the original List component generic)

Interesting, thank you @henrykuijpers for the feedback, we'll review it next week. But I'd like to push the discussion a bit to better understand your needs.
Currently, the item can be configured to some extent through the dialog, and if more is needed, a developer must extend the core list component to customize the items, and potentially also the dialog to configure the specifics for that item rendition. In case very different renditions are needed that go beyond what can be configured in the dialog, the developer can create multiple components with the different item renditions, meaning that page authors then have different list components to choose from on their pages.
What do you think is missing or not ideal with that model?
What is the benefit for the author to have a "displayAs"-property in their list component vs having different list components to choose from on the pages?

I (hopefully) answered this question cleary in: https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components/issues/57

Now that we additionally have the style system, I think that we have a quite flexible model to provide variations for the list items too. Therefore closing the issue.


googleapi: Error 401: Invalid Credentials, authError

D:\gdrive-windows-x64>gdrive-windows-x64.exe about
Authentication needed
Go to the following url in your browser:
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=xxxxxxxxx

Enter verification code: xxxxxxxxxxxxx
Failed to get about: googleapi: Error 401: Invalid Credentials, authError

D:\gdrive-windows-x64>gdrive-windows-x64.exe about
Failed to get about: googleapi: Error 401: Invalid Credentials, authError

D:\gdrive-windows-x64>

I deleted %appdata%\.gdrive\token_v2.json and revalidate. It still don't work.
It replicated on debian, I tried rm -rf ~/.gdrive/*.json. It show the same error.

Some issue for my google account, not the program.


Provide SARIF output

Aside from the exit code, all of v8r's output is optimised for reading by humans. It would be useful to also provide some kind of machine-readable output (e.g: via a --output json flag, or something)
In #21 @nvuillam suggested SARIF format:

what about SARIF output ? https://sarifweb.azurewebsites.net/
More and more analyzers use this common format, and to be honest it would help me to integrate v8r even better within MegaLinter :)

eslint has a SARIF formatter, already widely used :) ( 50k dl / week )
https://www.npmjs.com/package/@microsoft/eslint-formatter-sarif

Here is an example: there are some standard attributes (not sure any of them is required), and for anything not in the spec you can put it in properties

SARIF example
{
  "runs": [
    {
      "tool": {
        "driver": {
          "name": "Bandit",
          "rules": [
            {
              "id": "B110",
              "name": "try_except_pass",
              "helpUri": "https://bandit.readthedocs.io/en/latest/plugins/b110_try_except_pass.html"
            }
          ]
        }
      },
      "invocations": [
        {
          "executionSuccessful": true,
          "endTimeUtc": "2021-12-05T00:20:06Z"
        }
      ],
      "results": [
        {
          "message": {
            "text": "Try, Except, Pass detected."
          },
          "level": "note",
          "locations": [
            {
              "physicalLocation": {
                "region": {
                  "snippet": {
                    "text": "except:\n"
                  },
                  "startLine": 3
                },
                "artifactLocation": {
                  "uri": "file:///github/workspace/python_bad_1.py"
                },
                "contextRegion": {
                  "snippet": {
                    "text": "    pass\nexcept:\n    pass\n"
                  },
                  "endLine": 4,
                  "startLine": 2
                }
              }
            }
          ],
          "properties": {
            "issue_confidence": "HIGH",
            "issue_severity": "LOW"
          },
          "ruleId": "B110",
          "ruleIndex": 0
        }
      ]
    }
  ],
  "version": "2.1.0",
  "$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.4.json"
}

Would this be a good fit for v8r?

@chris48s FYI I'm currently building a SarifBuilder module package (that I'll use within npm-grovy-lint that requires it ^^)
It will allow to simply build SARIF reports without studying the whole OASIS norm (but also allow purists to build extended ones), so if you were about to start SARIF output for v8r, it may be faster if you wait for my package to be ready :)

@chris48s , FYI node-sarif-builder is available and documented :)
I succeeded to plug it within npm-groovy-lint quite easily , should be ok with v8r too ^^

In order for this to be machine-readable the user will need to be able to suppress any other logging output as well as outputting JSON.
Some tools (trivy springs to mind) output log statements as well as JSON by default and you have to suppress it with --quiet
Another approach would be to auto-suppress other log output when outputting JSON/SARIF format.

I've been having having a bit of a noodle on this.
Having looked at it, there are a few places where I am struggling to bash this square peg into a SARIF-shaped hole which stem from the fact that ajv (and by extension v8r) is a validator, not a code quality tool. They are closely related but not the same thing.
One issue I have is that what we are really validating here is a parsed object rather than a source file. So for example the following source files
{ "foo": { "bar": 5 } }

{
  "foo": {
    "bar": 5
  }
}

# yaml
foo:
  bar: 5

would all parse to the same object. Then when we validate it, ajv will express this as "there's a problem with the bar property" rather than "there's an error on line 4" (or whatever). This is fine, but as far as I can tell, the only way that SARIF allows us to specify the 'location' of an error is startLine / endLine.
The other issue is that there are fairly important things I'd like to communicate as structured data in the machine readable output like "did the file pass or fail validation: yes/no" or "what schema was the file validated against?" that don't map neatly to SARIF constructs. They can be communicated in a "note" result, or included in a property bag but there's definitely a bit of a mismatch of objectives between the result of a validation (pass/fail) and the result of a code quality tool (here's some issues that might require attention).
As much as I'd prefer to lean on an existing standard where possible for interoperability I think I'm leaning towards the main or default JSON output being based on AJV's output with a few additional properties rather than SARIF. I think if I do produce SARIF it would be a secondary option. If I were to shoehorn the result into a less useful but SARIF-formatted output (that doesn't include any line numbers for the errors) as a secondary output, is that actually useful? I don't have the desire to take on maintenance of a feature that doesn't really meet the needs of the one person who would actually care about using it.
I'm slowly churning this one round..

So I can assure you that if you implement SARIF, that won't be just for MegaLinter use, as it became the community format for analysis results ^^

I think the question I'm interested in is not so much "is SARIF a popular format?" but more like "what is the minimum subset of SARIF required for output to be useful to you?"
For example, you mention

(ex: Github that can display errors directly in files in their only pull request UIs)

but if you look at the documentation for the minimum subset of SARIF that integration requires https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning there are definitely fields which are required there that I wouldn't currently be able to populate.
I'm sure I can output some blob of JSON which is valid SARIF but it it doesn't actually communicate information that the one person who currently wants it needs to consume, its a pointless endeavour. Lets not worry about potential future consumers - right now they represent a fictional use-case.

and eventually property name

What construct in the SARIF spec would appropriate to use for communicating the error path? (AJV provides this as a JSON Pointer)

Some other notes:

Some tools (trivy springs to mind) output log statements as well as JSON by default and you have to suppress it with --quiet
Another approach would be to auto-suppress other log output when outputting JSON/SARIF format.

Another solution to this would be to send machine-readable output to stdout and human-readable log messages to stderr. I think I like this one the most.

Conceptually I feel like SARIF output might be best delivered as a separate plugin as opposed to a core feature of v8r, but I wonder if the scaffolding needed to allow it to be a separate plugin is more of a maintenance overhead than the feature itself. It remains an interesting rabbit hole though.

I think that incomplete SARIF is still better than no sarif at all ^^

Sure, but there must be some minimum set of fields megalinter needs/expects for a valid integration.
If you can answer that question it is likely you will get what you want. It seems wierd to be avoiding the question.

I've now shipped v0.13.0 which outputs text/json to stdout and log messages to stderr. Now changing the title of this issue to reflect that the remaining conversation is only about trying to nail down approach to SARIF and add that format.

Hello.
I've just released v8r 4.0.0.
This release introduces a feature relevant to this issue: It is now possible to extend the functionality of v8r by installing or writing plugins. This includes adding alternate output formats, so would be a good fit for this. There is documentation on the plugin system at https://chris48s.github.io/v8r/category/plugins/
I've taken the start I made on a SARIF implementation in https://github.com/chris48s/v8r/pull/217 and re-written that as a v8r plugin compatible with v4 here:
import { createRequire } from "module";
// TODO: once JSON modules is stable these requires could become imports
// https://nodejs.org/api/esm.html#esm_experimental_json_modules
const require = createRequire(import.meta.url);

import path from "path";
import url from "url";

import {
  SarifBuilder,
  SarifRunBuilder,
  SarifResultBuilder,
} from "node-sarif-builder";

import { BasePlugin } from "v8r";

class SarifOutput extends BasePlugin {
  static name = "v8r-plugin-sarif-output";

  registerOutputFormats() {
    return ["sarif"];
  }

  getAllResultsLogMessage(results, format) {
    if (format === "sarif") {
      const v8rMain = require.resolve("v8r");
      const pkg = require(
        path.join(path.parse(v8rMain).dir, "..", "package.json"),
      );

      const sarifBuilder = new SarifBuilder();
      const sarifRunBuilder = new SarifRunBuilder().initSimple({
        toolDriverName: pkg.name,
        toolDriverVersion: pkg.version,
        url: pkg.homepage,
      });
      for (const result of results) {
        if (result.valid) {
          const sarifResultBuilder = new SarifResultBuilder();
          const sarifResultInit = {
            level: "note",
            messageText: "file is valid",
            fileUri: url.pathToFileURL(result.fileLocation).href,
          };
          sarifResultBuilder.initSimple(sarifResultInit);
          sarifRunBuilder.addResult(sarifResultBuilder);
          continue;
        }

        for (const error of result.errors) {
          const sarifResultBuilder = new SarifResultBuilder();
          const sarifResultInit = {
            level: "error",
            ruleId: error.keyword,
            messageText: error.message,
            fileUri: url.pathToFileURL(result.fileLocation).href,
          };
          sarifResultBuilder.initSimple(sarifResultInit);
          sarifRunBuilder.addResult(sarifResultBuilder);
        }
      }
      sarifBuilder.addRun(sarifRunBuilder);
      const sarifJsonString = sarifBuilder.buildSarifJsonString({
        indent: true,
      });
      return sarifJsonString;
    }
  }
}

export default SarifOutput;

That gives you a starting point (or maybe even a good enough implementation? I was never really clear) for a v8r SARIF plugin, although the limitation that we're validating a parsed object rather than a source file stands.
I'm going to close this issue as the plugin system now gives you a way to implement this if you want. That said, if you take this forward I'm happy to field follow up questions if you have them.


Warning: implode(): Invalid arguments passed in G:...\wp-admin\edit-form-blocks.php on line 251

I have only this plugin installed on a multisite setup and get this error
Warning: implode(): Invalid arguments passed in G:\...\wp-admin\edit-form-blocks.php on line 251

Which version of WordPress are you using?
Does the error appear when a default theme such as Twenty Nineteen is in use?
Anything unusual about your network setup?
Can you get a full stack trace for that error?


Where's the code?

I would like to package your software for Homebrew, it would be very nice I you followed http://semver.org guidelines when tagging/releasing over here in GitHub :)

I know that I can find the code over here:
http://www.mccauslandcenter.sc.edu/CRNL/tools/beta
But I would very much prefer to have it hosted here with consistent and package-friendly versioning in the tarball name, instead of just "source.zip":
http://www.mccauslandcenter.sc.edu/CRNL/sw/mricrogl/source.zip

It is all online now. Needed to replace a couple functions that were not open source. Michael Hanke has been able to add this to Debian which should help many Linux users. I personally like distributing the compiled software via NITRC, and am not familiar with the advantages of Homebrew. I would be happy for you to make installation as easy as possible for others.

Great! Happy to hear that. Could you make a release:
https://help.github.com/articles/creating-releases/
And add this practice to your release engineering process? It'll help packaging systems a lot if you tag the releases using semver:
http://semver.org/
Thanks!

Will do, I will make releases at the same time as the NITRC releases. This is a standalone application, not a library, so it does not have an API, so I am less sure regarding the utility of following the semver numbers. The program does have its own internal scripting language, and I think this is pretty mature.

Semver is a general way of version numbering programs, not only libraries.
As long as MRIcroGL has a stable (ascending) versioning scheme on the filename over time it's ok. Otherwise package managers have a hard time distinguising new versions over old ones.

Release published (11 Nov 2015 release is semver 1.0.20151111)


Add encrypted gke credentials to our repo

We'll decrypt them inside .travis.yml so we can start gke clusters inside of tests
Forks of the pachyderm repo will not be able to decrypt these creds, even if they create a pull request against the pachyderm repo and run our tests.
Therefore, a github user needs write access to the pachyderm repo to get our gke creds

This seems reasonable to me. Although I don't really know how people do these things. @sjezewski do you happen to know if this is the standard way people do stuff like this with Travis? I thought maybe they had their own encrypted secrets method or something. Also where's the private key for this encryption stored?

For posterity: the travis docs on encrypting sensitive data are here: https://docs.travis-ci.com/user/encryption-keys/
The way it works is: travis generates a unique public/private key pair for each github repo (that uses travis, I guess) and then encrypts our creds with the pachyderm/pachyderm public key. When it runs our tests, it'll decrypt them with the pachyderm/pachyderm private key.
If a user tries to fork our repo (to say mallory/pachyderm and then modifies our test to print travis-batch-test...json and then sends us a PR to run their tests through CI, travis will try to use the private key for mallory/pachyderm instead of pachyderm/pachyderm to decrypt the creds and fail.
That's where the decryption key is stored, and is also how forks of the repo are unable to decrypt the data


Create new Twitter account

So after a month waiting, Twitter finally sent a response. Unfortunately Twitter will not restore the account. #76

So we will be creating a new Twitter account.
If you're curious about what was the "hateful" content in my profile, here is: https://s3.amazonaws.com/colorslive/jpg_512x512/795676-jY8zhAS-LPAwWVTn.jpg

Why is it still open? @nminaya

@Jadhielv I think it should be closed too xd


Feature request: Live example data

I would love an option that provided live example data in the documentation (similar to Stripe), so that when not specifying an explicit example it would output the latest validated value.
Joi.number().example(5) //example: 5
Joi.number() //example: 5
This would of course not be for production use (obvious security and performance reasons), but would be a great way to increase the usefulness of the documentation. It should probably be specified as a global option that would have to be set explicitly.
Not sure whether this is possible at hapi-swagger level, so please let me know if I should post it as a Joi feature request instead.

Surely the type should be specific enough to make it obvious; if the number needs to be an integer like 5, and not just any number... use integer?
This might just mask issues with the validation from a code side, by providing an overly specific set of instructions.
The Stripe documentation doesn't say example values where it's common sense, the documentation just says its a pagination parameter.
I would imagine the clarity of the API should be easily understood by the output we get from Joi, if its a string, use string, if its a specific set of strings that can be covered by Swagger/Joi too.
Got a more practical use case, as this does interest me.

HI I am not a 100% sure I understand what your use case is for this. Also what you mean by 'live'.
Are you asking for someway to set default example values for each JOI type.  If that is the case I was building something like that for a project which still only half built. It based on the much smaller set of OpenAPI (swagger) types.
https://github.com/glennjones/swagger-exemplar

Maybe I didn't make the use-case clear enough. Let's use Stripe as an example here, where I want to create a customer and later on charge that customer. When I make the initial call to create the customer the documentation shows that exact response here. This means that the documentation can provide way more assistance to me as a developer:

Easily reuse that response data, for example making charges on that customer.
I for one most often don't provide example data explicitly for output data, having this generated automatically would provide more help to developers using the API
Always get a view about what the response object looks like that provides more context than just the data types.
Always get an up-to-date picture about what the response object looks like, example data is easily outdated even when the validation rule in itself is still valid
In cases where we you don't want to validate parts of your data (common when forwarding data from other systems, that have their own validation rules) it's nice to still get a picture of what the data looks like. This does make sense for us when presenting Stripe data, which we might not want to validate in its entirety.

This might be better served as an external plugin that enhances hapi-swagger


Use Ear to play sounds on incoming messages

Closed via commit 80d4e6fa3740b0b33a6aea3db1a77e490e289234
(note ear could use some love, see https://github.com/jhasse/ears/issues/4)


[YBUG.IO] Feedback for Sovryn optimised...

Feedback for Sovryn optimised FastBTC
#1. test.sovryn.app/wallet
(official link provided by Sovryn staff on their social platforms)
System: Windows 10
Browser: Google Chrome (updated and with cache cleaned)
Wallet: Metamask (no other wallets on this browser)
email<EMAIL_ADDRESS>#2. Metamask wallet seems engaged, it is well set on the settings provided by this page
#3. The page however remains unasable due to this notification window\
Source url: https://test.sovryn.app/wallet
Reported by<EMAIL_ADDRESS>Reported at: 27 Apr at 09:08 UTC
Location: IT, Tuscany, Florence
Browser: Chrome 90.0.4430.85
OS: Windows 10.0
Screen: 1366x768
Viewport: 1366x657
Screenshot:

For more details please visit report page on Ybug:
https://ybug.io/dashboard/reports/detail/1wkvtjj0vbp3pfa09dfg

@soulBit hes on testnet with modals for mainnet


cargo test on cargo itself fails spuriously on Windows

Problem
cargo test is failing intermittently for me on Windows.
PS C:\Users\jyn\src\cargo> cargo t --test testsuite warn_on_failure::no_warning_on_bin_failure
    Finished test [unoptimized + debuginfo] target(s) in 0.25s
     Running tests\testsuite\main.rs (target\debug\deps\testsuite-96440e92f452dc25.exe)

running 1 test
test warn_on_failure::no_warning_on_bin_failure ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2811 filtered out; finished in 0.82s

PS C:\Users\jyn\src\cargo> cargo t --test testsuite warn_on_failure::no_warning_on_bin_failure
    Finished test [unoptimized + debuginfo] target(s) in 0.26s
     Running tests\testsuite\main.rs (target\debug\deps\testsuite-96440e92f452dc25.exe)

running 1 test
test warn_on_failure::no_warning_on_bin_failure ... FAILED

failures:

---- warn_on_failure::no_warning_on_bin_failure stdout ----
thread 'warn_on_failure::no_warning_on_bin_failure' panicked at 'failed to remove "C:\\Users\\jyn\\src\\cargo\\target\\tmp\\cit\\t0": Os { code:
5, kind: PermissionDenied, message: "Access is denied." }', crates\cargo-test-support\src\paths.rs:146:17
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/f5559e338256f17ada6d82b429acc2dbd8facc9c/library\std\src\panicking.rs:584
   1: core::panicking::panic_fmt
             at /rustc/f5559e338256f17ada6d82b429acc2dbd8facc9c/library\core\src\panicking.rs:67
   2: cargo_test_support::paths::impl$1::rm_rf
             at .\crates\cargo-test-support\src\paths.rs:146
   3: cargo_test_support::paths::init_root
             at .\crates\cargo-test-support\src\paths.rs:81
   4: testsuite::warn_on_failure::no_warning_on_bin_failure
             at .\tests\testsuite\warn_on_failure.rs:77
   5: testsuite::warn_on_failure::no_warning_on_bin_failure::closure$0
             at .\tests\testsuite\warn_on_failure.rs:77
   6: core::ops::function::FnOnce::call_once<testsuite::warn_on_failure::no_warning_on_bin_failure::closure_env$0,tuple$<> >
             at /rustc/f5559e338256f17ada6d82b429acc2dbd8facc9c\library\core\src\ops\function.rs:250
   7: core::ops::function::FnOnce::call_once
             at /rustc/f5559e338256f17ada6d82b429acc2dbd8facc9c/library\core\src\ops\function.rs:250
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

failures:
    warn_on_failure::no_warning_on_bin_failure

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 2811 filtered out; finished in 0.15s

Steps
Run cargo t --test testsuite warn_on_failure::no_warning_on_bin_failure on windows MSVC until you get a test failure. This usually only takes 2 or 3 run to fail for me, and once it fails once it will continue to fail until I run rm -r -force target\\tmp\\cit\\t0.
I am not sure what -force is doing that CargoPathExt::rm_rf isn't. Without force, rm gives the same error as cargo. https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/remove-item?view=powershell-7.3#example-3-delete-hidden-read-only-files says it might be related to the index being read-only?
Some more info that may or may not be helpful:
PS C:\Users\jyn\src\cargo> rm -r C:\\Users\\jyn\\src\\cargo\\target\\tmp\\cit\\t0
rm : Cannot remove item C:\Users\jyn\src\cargo\target\tmp\cit\t0\home\AppData\Local\Microsoft\Windows\INetCache\IE\NJD6DELP: You do not have
sufficient access rights to perform this operation.
At line:1 char:1
+ rm -r C:\\Users\\jyn\\src\\cargo\\target\\tmp\\cit\\t0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (NJD6DELP:DirectoryInfo) [Remove-Item], IOException
    + FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
rm : Cannot remove item C:\Users\jyn\src\cargo\target\tmp\cit\t0\home\AppData\Local\Microsoft\Windows\INetCache\IE\container.dat: You do not
have sufficient access rights to perform this operation.
At line:1 char:1
+ rm -r C:\\Users\\jyn\\src\\cargo\\target\\tmp\\cit\\t0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (68ce435e0a43416537b0fee6dba5d9f338e038:FileInfo) [Remove-Item], IOException
    + FullyQualifiedErrorId : RemoveFileSystemItemUnAuthorizedAccess,Microsoft.PowerShell.Commands.RemoveItemCommand
rm : Directory C:\Users\jyn\src\cargo\target\tmp\cit\t0\registry\.git\objects\c9 cannot be removed because it is not empty.

Possible Solution(s)
No response
Notes
No response
Version
8bcf8fe77015f9de9ee846f3396668e7e8317233

also, this isn't a bug necessarily, but the tests will fail unless core.symlinks is set to true.

This is the key part: cit\t0\home\AppData\Local\Microsoft\Windows\INetCache\IE\NJD6DELP
I've been having this same problem on my system, but I was thinking it was something unique to my environment.  I'm glad to see it's not just me. 😄
Something is creating this AppData directory in the mock home directory:
./AppData
./AppData/Local
./AppData/Local/Microsoft
./AppData/Local/Microsoft/EdgeBho
./AppData/Local/Microsoft/EdgeBho/IEToEdge
./AppData/Local/Microsoft/Feeds Cache
./AppData/Local/Microsoft/Internet Explorer
./AppData/Local/Microsoft/Internet Explorer/DOMStore
./AppData/Local/Microsoft/Internet Explorer/EmieSiteList
./AppData/Local/Microsoft/Internet Explorer/EmieUserList
./AppData/Local/Microsoft/Windows
./AppData/Local/Microsoft/Windows/History
./AppData/Local/Microsoft/Windows/History/History.IE5
./AppData/Local/Microsoft/Windows/History/History.IE5/MSHist012023032020230327
./AppData/Local/Microsoft/Windows/History/History.IE5/MSHist012023032720230403
./AppData/Local/Microsoft/Windows/History/History.IE5/MSHist012023040320230410
./AppData/Local/Microsoft/Windows/History/History.IE5/MSHist012023041520230416
./AppData/Local/Microsoft/Windows/IECompatCache
./AppData/Local/Microsoft/Windows/IECompatUaCache
./AppData/Local/Microsoft/Windows/IEDownloadHistory
./AppData/Local/Microsoft/Windows/INetCache
./AppData/Local/Microsoft/Windows/INetCache/Content.IE5
./AppData/Local/Microsoft/Windows/INetCache/IE
./AppData/Local/Microsoft/Windows/INetCache/IE/container.dat
./AppData/Local/Microsoft/Windows/INetCache/IE/Z6I2XOZV
./AppData/Local/Microsoft/Windows/INetCache/IE/Z6I2XOZV/dyntelconfig.json[1].cache

I've spent a fairly large amount of time searching on the internet for what could possibly be causing this, but I have not had much luck.
Some of the searches I've had refer to InetCache as being a directory junction.  But AFAICT, mine is not a junction.
There is something funky about these directories. Most tools (like pwsh or cmd or explorer) can't even view the contents of the InetCache folder. Somehow bash is able to read it, and indicates there is a link:
lrwxrwxrwx 1 eric 87 Apr 23 12:16 Content.IE5 -> /d/Proj/rust/cargo/target/tmp/cit/t29/home/AppData/Local/Microsoft/Windows/INetCache/IE/
drwxr-xr-x 1 eric  0 Apr 23 12:16 IE/

I've checked permissions, and I don't see why.  I saw some comments about "Virtual Folders" in some searches, but I'm not sure if that is the case here.
I would love if someone could help figure this out.  I've been hitting this for a very long time, and it has been driving me batty.
The creation of these directories seems semi-random, and I can't find a correlation to what might be causing them.

@jyn514 Can you include the complete version information of cargo -Vv in your report. In particular, the OS info might be relevant.

@ChrisDenton This is using std::fs::remove_dir_all here.

One theory is that it is the VCTIP (VC++ Technology Improvement Program). I tried turning off telemetry, but it didn't seem to fix it. 😦  Maybe I didn't turn it off in the correct place?

Ah I see! My workflow here would be to use Process Monitor to record events while cargo is running and to apply filers for the file/directory names.
My first assumption here would be that something in cargo's tests is loading a dll related to web stuff.

@jyn514 Can you include the complete version information of cargo -Vv in your report. In particular, the OS info might be relevant.

PS C:\Users\jyn\src\cargo> cargo -vV
cargo 1.71.0-nightly (de80432f0 2023-04-21)
release: 1.71.0-nightly
commit-hash: de80432f04da61d98dcbbc1572598071718ccfd2
commit-date: 2023-04-21
host: x86_64-pc-windows-msvc
libgit2: 1.6.3 (sys:0.17.0 vendored)
libcurl: 8.0.1-DEV (sys:0.4.61+curl-8.0.1 vendored ssl:Schannel)
os: Windows 10.0.19045 (Windows 10 Pro) [64-bit]

I can try running process monitor in a bit. Is there a Windows version of strace I can use to see what Remove-Item -Force is doing under the hood? Ideally cargo could just do the same and we wouldn't have to care if these directories get created.

Oh I see, ProcMon is the Windows version of strace. I'll see what I can find.

@ehuss I don't think the version of cargo in my default toolchain is relevant. I can reproduce this just by running target\debug\deps\testsuite-96440e92f452dc25.exe warn_on_failure::no_warning_on_bin_failure twice in a ro.w

Here's the files the test binary touches; as you can see it never creates AppData:
However, if I include other processes, some of them do touch AppData:

I'm not sure why powershell is running at all, or why it's creating these folders.

It might be because powershell is part of the telemetry system.  Do you have VSCode running?  That has a separate telemetry system from Visual Studio.

I do. Let me close everything I have open and see what still pops up.

Now something called VCTIP.exe is creating the directories.

Hmm, I set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VSCommon\17.0\SQM\OptIn to 0 as suggested in https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2017/ide/visual-studio-experience-improvement-program?view=vs-2017, but I'm still seeing the folder created by VCTIP.

Is there a Windows version of strace I can use to see what Remove-Item -Force is doing under the hood? Ideally cargo could just do the same and we wouldn't have to care if these directories get created.

Here's what it's doing on the inner-most file (the last one that doesn't get removed if I don't pass -Force):

Compare that to what it does to a normal file (without -Force):

Those ... look the same to me? Not sure what I'm missing.

ls shows the directory as a "hidden system" file:
PS C:\Users\jyn\src\cargo> ls "C:\Users\jyn\src\cargo\target\tmp\cit\t0\home\AppData\Local\Microsoft\" -h

    Directory: C:\Users\jyn\src\cargo\target\tmp\cit\t0\home\AppData\Local\Microsoft

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d--hs-         4/27/2023   6:20 PM                Feeds Cache

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-7.3#example-1-get-child-items-from-a-file-system-directory

Ok, I'm at a computer now. I'm not sure if these work to disable telemetry completely but on my own machine I have these two environment variables set globally:

Key
Value

VSCMD_SKIP_SENDTELEMETRY
1

VCPKG_KEEP_ENV_VARS
VSCMD_SKIP_SENDTELEMETRY

The directory in question seem to have an explicit "Deny" permission of listing the contents of a directory. It seems our remove_dir_all code is returning immediately on error instead of attempting to just delete the directory. That is definitely something that can and should be fixed.

I confirmed on my system that it is VCTIP as well.
The item that seems to be the most trouble is InetCache\Content.IE5.  In my testing, the important parts are that it is a directory junction, and that its ACL is "Everyone Deny".  I can reproduce that and confirm that Rust's remove_dir_all fails, but powershell rm -Force succeeds.
Unless I'm mistaken, I think PowerShell just uses the facilities defined here. However, I can't quite follow from that what is unique about being a Reparse Point + having a restricted ACL.
(That link also is System+Hidden, but that doesn't seem to matter in my testing.)

Linked above is a fix. If anyone were able to test test it then that would be grand. I did so using the following little app compiled first without the patch (which failed) and then with (which worked):
fn main() {
    let path = std::env::args().nth(1).unwrap();
    println!("deleting {path}");
    std::fs::remove_dir_all(&path).unwrap();
}

I confirmed that rust-lang/rust#110918 works with deleting the troublesome directories.
I'm going to close this issue as this seems to be a combination of external factors (VCTIP creating weird files and fs::remove_dir_all not being able to remove them). Solutions will hopefully be the linked PR, and disabling VCTIP here (I'm not sure if just the registry entry is enough, or if VSCMD_SKIP_SENDTELEMETRY is also required).

BTW, thanks @jyn514 and @ChrisDenton for helping with this, it is greatly appreciated!


[loc][Query][VSCODE] Localizability of strings in vs_workbench

Hi,
please help localization team to answer question from translator.
In case translator is not sure about context/meaning/localizability of string we raise a question to Core team.

Id
File Name Live Page Extended
String Resource ID
Full Source String
Extended Description

50449
vscode-workbench\vs_workbench.xlf
0;   "src/vs/workbench/browser/actions/layoutActions.moveFocusedView.newContainerInPanel"
New Panel Entry
Please provide more context for   this string: is it a new entry or a new panel?

50450
vscode-workbench\vs_workbench.xlf
0;   "src/vs/workbench/browser/parts/views/viewsService.focus view"
Focus on {0} View
Please confirm what the   placeholder replaces in order to translate it properly. Is it a number?

50455
vscode-workbench\vs_workbench.xlf
0;   "src/vs/workbench/browser/parts/notifications/notificationsStatus.notifications_Duplicated34"
{0} New Notifications
what will placeholder be   replaced by?

50457
vscode-workbench\vs_workbench.xlf
0;   "src/vs/workbench/api/browser/mainThreadAuthentication.accountLastUsedDate"
Last used this account {0}
Could you provide more info for   the placeholders?

50532
vscode-workbench\vs_workbench.xlf
0;   "src/vs/workbench/api/browser/mainThreadAuthentication.selectAccount"
The extension '{0}' wants to   access a {1} account
Does placeholder {1} refer to a   type or a name? We assumed a type (of the account) for now, please confirm or   advise.

50534
vscode-workbench\vs_workbench.xlf
0;   "src/vs/workbench/api/browser/viewsExtensionPoint.vscode.extension.contributes.view.contextualTitle"
Human-readable context for when   the view is moved out of its original location. By default, the view's   container name will be used. Will be shown
What does "Will be   shown" mean here exactly? Translated literally for now.

50554
vscode-workbench\vs_workbench.xlf
0;   "src/vs/workbench/electron-browser/actions/developerActions.developer_Duplicated1"
Developer
Is this string localizable? Is   developer referred to a generic developer?

50768
vscode-workbench\vs_workbench.xlf
0;   "src/vs/workbench/browser/parts/notifications/notificationsStatus.notifications_Duplicated34"
{0} New Notifications
Please let us know the   placeholder will be replaced with the number or not.

@sbatten starting with you as the owner of layoutActions.ts

@PDostalek added comments in the above commit.
As for 50534, "Will be shown" indicates that this value when provided by an extension author will be visible to the end user. Other properties like name have this "Will be shown" at the end as well. The translation should be the same.
For the rest I will assign owners.

Also added comments explaining the placeholders.

Thank you


Handle not-logged-in public repos with credsStore

Tested with a docker config that only has a credsStore but without an account for index.docker.io. Previously, this would result in a 401 when requesting the realm URL, but now it succeeds.
{
        "auths": {},
        "credsStore": "devpod"
}

Thanks for the PR. This sounds like non-spec behavior I have never seen a docker credential helper returning empty username and password.

Usually they're used for private repositories, but for devpod it's used for all repositories, including public docker hub ones.

I'd know for sure if there was reference implementations doing the same thing, othewise this sounds like a something non-spec compliant cred helper would do.

Is there a spec for this? If so, I can take it to the devpod repo and ask them to fix it instead. I don't care where I fix this, I just don't want to maintain a patched rules_oci nor a patched devpod.
If there's no spec, and it's just based on implementations, then rules_oci should be resilient to more implementations.

only one that i am aware of is; https://github.com/docker/cli/blob/master/docs/reference/commandline/login.md#credential-helper-protocol

Unfortunately, that doesn't specify what to output when no username is needed/available. Both an empty string vs json with empty values seem like valid guesses based on that page.


Visualizer Added.

Coverage decreased (-14.9%) to 84.829% when pulling 09d8d3b847cacde9df58a2d0f226979d73485cc0 on krmotwani:master into 4b9851fd5b20da7017c82ed8394c88477a6c0ec2 on cs207-group11:master.

Coverage decreased (-14.9%) to 84.829% when pulling fae5c77237bdd13d17d5d7f8a613057714eca5ba on krmotwani:master into 4b9851fd5b20da7017c82ed8394c88477a6c0ec2 on cs207-group11:master.

Visualizer merged.

Coverage decreased (-9.8%) to 89.124% when pulling 9ac302fd8c6357ec948c2dbc6d131115c29a6420 on krmotwani:master into dd1ddfdfb1894cbe9b211edddddde1c643109d11 on cs207-group11:master.


proxy/mock mixed behaviour

User story.
As a backend developer I want to let consumers test against my API Mocks and at the same time record information about structural mismatches with the backend answer.
Is your feature request related to a problem?
It's a workflow improvement to continuously record where structural mismatches exists while the real API is being continuously build.
Describe the solution you'd like
I'd like to run the PRISM in proxy mode pointing to the real API and generating the violation hints. At the same time I'd like PRISM to answer with mock data which would have matched as if it runs in mock mode. It's a proxy/mock mixed behaviour.

Hey,
your use case looks a little bit weird to me. We do not have support for this currently in Prism and I  do not think it's coming anytime soon.
Can you clarify a little bit the specific use case?

@XVincentX this was a feature of prism in Stoplight Classic. You could turn mocking on/off for particular operations in your API spec with extensions, you could also use a before script to control the behavior as well.

Sorry I’m not sure I understand the use case.
If you’re running a mock server, mismatched requests will show up in sl-violations, the same as if you ran the proxy.
The proxy is when you want to talk to a real server. The mock is for when you don’t want to talk to a real server.
Could you describe the use case where you need both?

The basic idea is finding (edge) cases where responses don't match the openapi spec.
It seemed easy to do with the features in prism. But I now realize this should be better done on its own with a tool like https://dredd.org
Sorry to have bothered you two :/

There's a bunch of options: https://apisyouwonthate.com/blog/keeping-documentation-honest
Dredd is not maintained much these days, OpenAPI v3 support only ever hit experimental, and it can be a bit of a pain to set up an effective seed anyway. If you go with it, enable the --sorted option to do all your GETs first and DELETEs at the end - that'll help a lot.
If you're concerned about keeping design and code in sync there's other ways of getting that sorted which don't involve a special test tool. More on this here: https://www.apisyouwonthate.com/blog/api-design-first-vs-code-first/
Got another article coming on that blog which drives the point home even harder but it's 24 hours from being ready. Check back tomorrow :D

Not sure if it's the use case @hottehead suggested, but if i have several (let's say 4) Endpoints, I'd be interested in implementing one, which I can then switch from mock to proxy (for example by using an extenstion in the spec, like x-proxy) while the other 3 Endpoints are still mocked.

Yeah this is something that Prism 2 was offering — we can probably enable it back sometime in the future.


Unable to change the error code if validation fails inside validateGrant method in Grant Hanlder

Describe the issue:
When implementing a grant handler by extending AbstractAuthorizationGrantHandler, if the validation fails inside validateGrant method during a token generation request, it always returns error code - invalid_grant as it is hard-coded in [1].
We identified this issue when implementing token-exchange grant type. According to the spec [2], when certain validation fails, it should return error code as invalid_request or invalid_target. For example:

If the request itself is not valid or if either the "subject_token"
or "actor_token" are invalid for any reason, or are unacceptable
based on policy, the authorization server MUST construct an error
response, as specified in Section 5.2 of [RFC6749].  The value of the
"error" parameter MUST be the "invalid_request" error code.

Even though the relevant error code, propagated from the grant handler, it is overridden with invalid_grant in [1].
[1] https://github.com/wso2-extensions/identity-inbound-auth-oauth/blob/master/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/token/AccessTokenIssuer.java#L279
[2] https://datatracker.ietf.org/doc/html/rfc8693#section-2.2.2
Expected behavior:
It should be able to set the relevant error code from the grant handler according to the requirement.
Environment information (Please complete the following information; remove  any unnecessary fields) :

Product Version: IS 5.11.0

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!


Default action in dialogs

In (at least) some of the dialogs there’s a highlighted OK button. If it’s highlighted I assume it’s the default. But hitting enter/return does nothing. I have to click on the button. See for example, the dialog that comes up when you select Tracks > URL.
Ideal behavior: Initially grey out the ok button until you've entered the URL. Then make it the default.

Default behavior now ok for all the web app dialogs (as of IGV-Web 1.3.0).


Fix issue #2996 and multi-bytes language problem

Fixes #2996
Fixes content may not display while it is multi-bytes language.

Please don't solve multiple unrelated issues in a single PR.  Now I'm forced to either accept both or decline both.
Also, I have no idea what the fix is doing.  Why are you removing the role_id datarow entry?

And #2996 was fixed in https://github.com/the-control-group/voyager/pull/3016.
So I think both concerns of this PR were fixed in other PRs and ways.
Closing.


Videos on some streaming services will not play

Description
Video playback does not work for streaming services such as iPlayer, YouTube and Vimeo. The user will either be presented with a blank frame, endless buffering, or an error message.
More information

Attribute
Value

Version
84.0.4147.141

Build
Release

Platform
Ozone-GBM

Target
chrome

Device
Raspberry Pi 4B (4GB)

OS
Raspbian 10 "buster"

Kernel
5.4.51-v7l+

Steps to reproduce
Open chrome, visit a video streaming service and play a video.
GN arguments
use_ozone = true
ozone_platform_x11 = false
ozone_platform_gbm = true
ozone_platform_headless = false
use_vc4_minigbm = true

ffmpeg_branding = "Chrome"
proprietary_codecs = true
use_v4l2_codec = true
v4l2_decoder_fmt_vp9 = false
v4l2_decoder_backend_stateless = false

target_os = "chromeos"
target_cpu = "arm"
use_sysroot = true
target_sysroot = "//build/linux/debian_sid_arm-sysroot"

google_api_key = "no"
google_default_client_id = "no"
google_default_client_secret = "no"

is_debug = false
is_component_build = false
enable_nacl = false
symbol_level = 0
blink_symbol_level = 0

Command
./chrome --force-system-compositor-mode --vmodule=../../media/*=4 --enable-logging=stderr

Is this related to #13 or #14?

YouTube and iPlayer can play in kernel v5.9.2-v7l+. Suggests it is indeed related to failing VD tests.
Vimeo doesn't play, however. As VideoDecoderTest.FlushAfterInitialize still fails on v5.9, this suggests that YouTube and iPlayer were related to #14 and Vimeo is related to #13.

Using kernel v5.9.2-v7l+ has fixed this bug for iPlayer, i.e. SMP/BUMP. Any bug affecting Vimeo appears to be negligible for our purposes, so this issue is no longer relevant. Any further work to resolve this will be documented on #13.