Fix double-execution of modules required with differing relative paths.

I encountered a bug where two calls to require for the same target module, with differing relative paths to that module, resulted in that module's wrapping closure being executed twice. The issue was because cache misses resulted in calling fn, even if the module was already in modules. This change makes sure the absolute path to any module is always in cache.

I tried this patch out but it did not fix the issue for me. Below I will describe my project structure and how I worked around the problem.
Because I am exporting a "namespace" object rather than a simple class, it is important for me that the root module not be executed twice because otherwise some objects end up being added to the wrong namespace object and not correctly exported.
Here is my original structure:
  proj.coffee
  proj/a.coffee
  proj/a/class.coffee
  proj/b.coffee

At the top of each file in proj/ I had either proj = require '../proj' or proj = require '../proj'
That didn't work, but I was able to solve the problem with a simple project restructuring, as follows:
  proj.coffee
  proj/_actual_root.coffee
  proj/root.coffee
  proj/a.coffee
  proj/a/class.coffee
  proj/b.coffee

I moved all code from proj.coffee to proj/_actual_root.coffee, so that is where the root namespace object is created. Then I created proj/root.coffee with just one line:
module.exports = require './_actual_root'

and put the following into proj.coffee:
module.exports = require './proj/root'
require './proj/a'
require './proj/b'

Now in every other file from various relative paths: proj = require './root' or proj = require '../root'. The proj/root.coffee file is still executed multiple times, but it doesn't matter because proj/_actual_root.coffee is only executed once so all files work with the correct namespace object.
I hope that helps someone, or if anyone has a more elegant solution, I'd love to see it.
Cheers,
Darrick

Since posting this patch, I've encountered several other subtle bugs in stitch's current require implementation. Besides the original issue this patch fixes, the issue you've outlined above, there is also an issue with the handling of directory index files and in particular, in handling directories which have both an index and a file named matching the index. I encountered this when I tried to do:
date_time/index.coffee
date_time/date_time.coffee
date_time/other_stuff.coffee

Ultimately, I just gave up trying to fix the Stitch implementation & rewrote the module definition and require path resolution logic myself. Unfortunately, it depends on a bunch of utilities I've written which are deeply intwined with my own project. However, here's the gist of it. Hopefully it's useful:
# Memoizes a module's exports by running initialize (source file body).
load = (module) ->
  return if module.loaded
  {filename} = module
  root = path.dirname(filename)
  require = makeRequire(root)
  try
    module.exports = {}
    module.initialize.call(window, module.exports, require, module)
  catch err
    throw new Error("Error loading '#{filename}': #{err}")
  module.loaded = true
  return

# Returns a require function for use in a given root directory.
makeRequire = (root) -> (name) ->
  filename =
    if name[0] == '.'
      path.join(root, name)
    else
      path.normalize(name)
  module = window.modules[filename]
  unless module
    throw new Error("Cannot find module '#{name}' at '#{filename}'")
  load module
  module.exports

# The global module definition machinery expected by Stitch.
window.require = makeRequire('')
window.require.define = (bundle) ->
  directories = []
  # Create a module for each initialize function in the bundle.
  for filename, initialize of bundle
    window.modules[filename] = {filename, initialize}
    # Note index modules as directories for later.
    if path.basename(filename) == 'index'
      directories.push path.dirname(filename)
  # Reference indexed directories as modules.
  for directory in directories
    if bundle[directory]
      throw new Error("#{directory} matches both a file and a directory")
    window.modules[directory] = window.modules[directory + '/index']

Thanks, good to know about the date_time/date_time.coffee issue. I'll avoid it and hopefully won't have to dig further into stitch's internals!

Any way we can move this forward?


Removed extra entrypoints

karapace/karapace_all.py is the only exposed entrypoint, and that covers the usages from here:
https://github.com/aiven/karapace/blob/f7e88cef6180391b51296ca45d6a0956d8a98561/setup.py#L45-L50

This breaks container images as https://github.com/aiven/karapace/blob/master/container/start.sh uses those endpoints

good caught, I forgot about that. fixing it

@jlprat here is the release: https://github.com/aiven/karapace/releases/tag/3.0.0


[Question] the FIXME in llava_arch.py

Question
Hi， I am curious about the reason you do this fix. I think cur_image_features[0:0] is just an empty tensor.
  #FIXME: this is a hacky fix, for deepspeed zero3 to work
  cur_input_embeds = torch.cat([cur_input_embeds_1, cur_image_features[0:0], cur_input_embeds_2], dim=0)

我也有这个疑问，请问解决了吗


boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c:  Fix typo noted by João Matos.

"fails" should have been "failed"

Why are there all those commits? I've seen that in some (all?) of your PRs.
Has @acassis  been squash committing them or cherry picking the last one?

Hi Abdelatif, Yes it was squashed. Please see the master for reference.

@Ouss4 Yes, my fork has been corrupted.  I create a clean fork tomorrow so that subsequent PRs won't carry the garbage.  I don't know where all of the garbage comes from.  I probably need to --rebase all of the pulls.  But some are these strange changes of gits that don't have any file changes associated with them.
I believe that if I am religious about rebasing vs pulling I can avoid most of these.  Alan and I have been processing numerous PRs per day so our forks will get dirty rather quickly due to the build-up of human errors. We assure that upstream is clean, however.

Yes, it looks like the fork got corrupted.
Because they are squashed, could those commits (especailly those with changes) cause an issue? For insatance if the change gets reverted.
Since there is usually only a few (or just one) relevant commits maybe cherry picking is safer.

It is not really "corrupted".  I overstated that.  Two things to note:  All of the "extra commits" but one are not commits are all, they are just merge points.  I synchronize with upstream like:
git fetch upstream
git pull upstream master
git push origin master
The second step creates the merge point because a change was merged into the fork from upstream.  The merge point does not correspond to any changes to files.  It is just noting where I merged from upstream.
There one other no file commit which I don't understand.  I made some error several days ago
The the change, in this case, was juse remove one character and adding two fails -> failed.  Add if you look at what changed in all of the combine commits.  Is is only those two characters.  No nothing is wrong, nothing is "corrupted", everything is great!  But the comments generated by git stink.
I don't know if a rebase vs the pull from upstream will eliminate the merge point, but I don't think so.  I will experiment.  A better approach my be to not try to keep the fork up-to-date until I need to use.
I synchronize the bitbuck repositories the same way.  Each new commit brings in a new merge point too.  I really don't like that but, as far as I know, it is unavoidable.

Why wouldn't rebasing eliminate the merge point?
It should effectively apply any commit you had on top of master and thus eliminate any merge commit.
But if one had a clean history "just" merge would suffice (provided that fast-forward isn't disabled)
However none of that is a real issue, what I was trying to point out (or understand) is that these "old" commits could apply their changes if they got reverted or the change they had got updated.
Since we are squashing them, they slide unnoticed with the rest of the PR.
I was also trying to suggest cherry picking only the relevant commits. For instance in this PR only the last commit had a relevant change, the others have been merged before.
As a side note:

git fetch upstream
git pull upstream master
git push origin master

Isn't the fetch redundant?


daemon/logger/syslog: refactoring of else clause

There is redundant else clause in s.Log. Also there is no point for checking error nilness. We can just return s.writer.Err(logMessage) for stderr and s.writer.Info(logMessage) otherwise.

I can work on this #dibs


file conversion transcription jsons to paragraphs

not able to see/find function or code that converts health scribe job output transcription jsons into readable texts(paragraph)

Hi @ankitklad,
This useEffect hook does this in LeftPanel.
transcriptMod gives you an object of spoken text that you can parse into paragraphs:
[key: string (segmentId)]: {
  "BeginAudioTime": number,
  "Content": string,
  "EndAudioTime": number,
  "ParticipantDetails": {
    "ParticipantRole": "PATIENT_0" | "CLINICIAN_0" | "PATIENT_1" ... etc
  },
  "SectionDetails": {
    "SectionName": "SMALL_TALK" | "SUBJECTIVE" | "OBJECTIVE" | "ASSESSMENT_AND_PLAN" ...etc
  },
  "SegmentId": string (segmentId),
  "Words": [
    {
      "Alternatives": [
        {
          "Confidence": number,
          "Content": string,
        }
      ],
      "BeginAudioTime": number,
      "EndAudioTime": number,
      "Type": "PRONUNCIATION" | "PUNCTUATION"
    },
    ...
  ]
}

You can get an array of just the conversation with something like:
values(segmentDict).map((d) => `${d.ParticipantDetails.ParticipantRole}: ${d.Content}`)

@ankitklad - please let me know if you have any additional questions

Hi Yuan,
Can you please share complete CloudFormation template for this.
Regards
Ankit Lad
From: Yuan Yao @.>
Sent: Wednesday, June 19, 2024 11:14 PM
To: aws-samples/aws-healthscribe-demo @.>
Cc: Lad, Ankitkumar (Cognizant) @.>; Mention @.>
Subject: Re: [aws-samples/aws-healthscribe-demo] file conversion transcription jsons to paragraphs (Issue #28)
CAUTION: External Email
@ankitkladhttps://github.com/ankitklad - please let me know if you have any additional questions

Reply to this email directly, view it on GitHubhttps://github.com/aws-samples/aws-healthscribe-demo/issues/28#issuecomment-2179232247, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BJCGYRVFVJSZS2G3UJGYGJDZIG7MPAVCNFSM6AAAAABJISVADGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZZGIZTEMRUG4.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.

@ankitklad - this demo uses AWS Amplify to orchestrate the full-stack deployment. If you deploy this in your account, you'll be able to reference the CloudFormation templates this generates.

Thank you for your response.
But I am trying to run same templates but somehow I feel its not complete. I am trying to run it in my organization where we have to add boundary permissions to IAM role, still it keeps on throwing errors. I am using attached CloudFormation templates.
Additional I have replicated git into my own account and tried. But somehow that is also failing.
https://github.com/ankitklad/aws-healthscribe-demo
Regards
Ankit Lad
From: Yuan Yao @.>
Sent: Tuesday, July 2, 2024 7:36 AM
To: aws-samples/aws-healthscribe-demo @.>
Cc: Lad, Ankitkumar (Cognizant) @.>; Mention @.>
Subject: Re: [aws-samples/aws-healthscribe-demo] file conversion transcription jsons to paragraphs (Issue #28)
CAUTION: External Email
@ankitkladhttps://github.com/ankitklad - this demo uses AWS Amplifyhttps://aws.amazon.com/amplify/ to orchestrate the full-stack deployment. If you deploy this in your account, you'll be able to reference the CloudFormation templates this generates.

Reply to this email directly, view it on GitHubhttps://github.com/aws-samples/aws-healthscribe-demo/issues/28#issuecomment-2201675166, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BJCGYRTQSJUA3UNAP4ZDYXDZKIDIVAVCNFSM6AAAAABJISVADGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBRGY3TKMJWGY.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.

To clarify your requirement - all deployed IAM roles must have a permissions boundary attached.  Is this correct? How are you correctly deploying this project?

That is correct. I have tried it in two ways.

Deployment of attached CloudFormation template
Updating IAM roles(with boundary permission) in Gitrepo -https://github.com/ankitklad/aws-healthscribe-demo and deploy it using Amplify.

But both are failing.
Regards
Ankit Lad
From: Yuan Yao @.>
Sent: Tuesday, July 2, 2024 8:06 PM
To: aws-samples/aws-healthscribe-demo @.>
Cc: Lad, Ankitkumar (Cognizant) @.>; Mention @.>
Subject: Re: [aws-samples/aws-healthscribe-demo] file conversion transcription jsons to paragraphs (Issue #28)
CAUTION: External Email
To clarify your requirement - all deployed IAM roles must have a permissions boundary attached. Is this correct? How are you correctly deploying this project?

Reply to this email directly, view it on GitHubhttps://github.com/aws-samples/aws-healthscribe-demo/issues/28#issuecomment-2203388612, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BJCGYRVOMK7OYBFP4Y7IKCDZKK3D7AVCNFSM6AAAAABJISVADGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBTGM4DQNRRGI.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.

Hi Yuan,
Wanted to check if you had time to look into it?
Regards
Ankit Lad
From: Lad, Ankitkumar (Cognizant) @.>
Sent: Wednesday, July 3, 2024 10:37 AM
To: aws-samples/aws-healthscribe-demo @.>; aws-samples/aws-healthscribe-demo @.>
Cc: Mention @.>
Subject: RE: [aws-samples/aws-healthscribe-demo] file conversion transcription jsons to paragraphs (Issue #28)
That is correct. I have tried it in two ways.

Deployment of attached CloudFormation template
Updating IAM roles(with boundary permission) in Gitrepo -https://github.com/ankitklad/aws-healthscribe-demo and deploy it using Amplify.

But both are failing.
Regards
Ankit Lad
From: Yuan Yao<EMAIL_ADDRESS>Sent: Tuesday, July 2, 2024 8:06 PM
To: aws-samples/aws-healthscribe-demo<EMAIL_ADDRESS>Cc: Lad, Ankitkumar (Cognizant<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [aws-samples/aws-healthscribe-demo] file conversion transcription jsons to paragraphs (Issue #28)
CAUTION: External Email
To clarify your requirement - all deployed IAM roles must have a permissions boundary attached. Is this correct? How are you correctly deploying this project?

Reply to this email directly, view it on GitHubhttps://github.com/aws-samples/aws-healthscribe-demo/issues/28#issuecomment-2203388612, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BJCGYRVOMK7OYBFP4Y7IKCDZKK3D7AVCNFSM6AAAAABJISVADGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBTGM4DQNRRGI.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient(s), please reply to the sender and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email, and/or any action taken in reliance on the contents of this e-mail is strictly prohibited and may be unlawful. Where permitted by applicable law, this e-mail and other e-mail communications sent to and from Cognizant e-mail addresses may be monitored.

Amplify supports creating IAM roles with permissions boundaries.
In this scenario, you create a permissions boundary policy, then use the Amplify CLI to apply it to the project. During deployment, all Amplify-created IAM roles will have the permissions boundary applied.
You will still need an IAM role for Amplify to assume in order to deploy the project. This role can have a permissions boundary but it needs things like iam:CreateRole, iam:PassRole, etc.
Does this fit your requirements?


Fix the issue 663 and add two testcases

Fix the issue 663 that JsonPath.read() method with the same path for different json content returns the same result.

#663


Getting a DM even if I comment on an issue that has an older mention of me

I didn't expect to get a DM if I commented last and mention was in one of the older comments:

Actually the issue got moved to a different repo so it looked like a new issue with new mention so I think it's expected to see a DM.  Would be nice to not get DM if I create an issue with mentioning of myself.

That last part makes a lot of sense.
This needs to move to lifecycle-rugs.

Moved to lifecycle-rugs


List _items;

List _items; How to Null Safe This  _items

@MehediHasannOvi, Null Safety has been included a long time back.
Please look at the code once.


Tooltip Showing Multiple LineSeries Values

The tooltip on the datamarkers of a linechart only contains the value of the current series. Is it possible to override this content and provide my own? My goal here is to replicate the behavior of the Blazor.Boatstrap chart datamarker tooltip where the tooltip contains the corresponding value of all other series'.

Shared chart tooltip added with #1651


Is there a way to detect an item is dropped outside of its original scope?

I would like to detect when an item is dropped outside of its original scope in order to remove the item. Is there a way to accomplish this?

@excentris not sure what do u mean by outside of the scope but there are callbacks provided which you can use it to implement custom logics.

Sorry I wasn't clear. I have one div as-sortable with different as-sortable-item items inside it. I would like to detect when one of those items is dragged and dropped outside of the as-sortable. I have tried to use dragEnd but I can only detect if the dest becomes a different as-sortable, because when dropping somewhere else on the page the as-sortable-item returns to the original as-sortable.
Essentially what I am trying to accomplish is making the whole space around the as-sortable some kind of drop-zone to remove the items...


using custom claims

Some oauth providers allow adding custom claims such as auth0
Is it possible to use this claims in match directives and also to inject them as http headers?
example
  transform user {
    exact match  "https://dogfy.com/random_dog" "puppy"
    action add role puppy
  }

{
  security {
    authorization policy mypolicy {
      inject headers with claims
      inject header "X-Picture" from picture
      inject header "X-Dog" from "https://dogfy.com/random_dog"
    }
  }
}

@wnke , please add “extract all from userinfo” and see whether oauth provider data propagates to the token displayed in “/whoami”.
also, please see  https://github.com/greenpau/caddy-security/issues/87#issuecomment-1101015496  , it looks like this is what your are looking for.

Hey @greenpau !
thank for the hint! the extract all from userinfo really helped out!
with that directive enabled this now works
{
  security {
    authorization policy mypolicy {
      inject headers with claims
      inject header "X-Picture" from picture
      inject header "X-Dog" from "userinfo|https://dogfy.com/random_dog"
    }
  }
}

But this still will not:
  transform user {
    exact match "userinfo|https://dogfy.com/random_dog" "puppy"
    action add role puppy
  }

Failing with the error:
caddy_1  | run: loading initial config: loading new config: loading http app module: provision http: server srv0: setting up route handlers: route 0: loading handler modules: position 0: loading module 'subroute': provision http.handlers.subroute: setting up subroutes: route 0: loading handler modules: position 0: loading module 'subroute': provision http.handlers.subroute: setting up subroutes: route 0: loading handler modules: position 0: loading module 'authentication': provision http.handlers.authentication: loading authentication providers: module name 'authorizer': provision http.authentication.providers.authorizer: loading security app module: provision security: invalid rule syntax: invalid condition syntax, failed creating rule condition: exact match userinfo|https://dogfy.com/random_dog puppy

Is the userinfo no available for matches?

But this still will not:
exact match "userinfo|https://dogfy.com/random_dog" "puppy"

@wnke , the "nested" field match is not supported yet. This would be a feature request.

@wnke , btw, the match is based on the same subsystem as authorization ACLs: https://authp.github.io/docs/authorize/acl-rbac#conditions

@wnke , generally speaking, the reason there is no nested matches is ... Your OAuth provider can have any of these four fields: roles, groups, group, roles at the top level of the token it issues. If found, the values from the fields will be added to roles. So ... configure your OAuth provider to send groups or roles field.

Hey @greenpau !
Thank you very much for the tips and the interest in this ticket, it is very appreciated!
Unfortunately, at least for auth0, only namepaced custom claims are allowed making it impossible to add roles. I can only add something like https://dogfy.com/roles, to follow from example above.
From the auth0 docs:
By default, Auth0 always enforces namespacing; any custom claims with non-namespaced identifiers will be silently excluded from tokens and silently ignored in Actions and Rules.
We do allow non-OIDC claims without a namespace for legacy tenants using a non-OIDC-conformant pipeline with the Legacy User Profile enabled; however, we strongly recommend that legacy tenants migrate to an OIDC-conformant flow.

We do allow non-OIDC claims without a namespace for legacy tenants using a non-OIDC-conformant pipeline with the Legacy User Profile enabled; however, we strongly recommend that legacy tenants migrate to an OIDC-conformant flow.

@wnke , I will think how to best resolve it. Perhaps, I would add the following:
extract https://dogfy.com/roles from userinfo as roles

Please paste the token with userinfo field issued by auth portal.

@wnke , the image similar to this one:

That would be great!
Using the extract all from userinfo I got:
{
  "authenticated": true,
  "email"<EMAIL_ADDRESS>  "exp":<PHONE_NUMBER>,
  "expires_at_utc": "Mon May  2 21:22:41 UTC 2022",
  "iat":<PHONE_NUMBER>,
  "iss": "https://example.com/oauth2/generic/",
  "issued_at_utc": "Mon May  2 20:22:41 UTC 2022",
  "jti": "zoGlTMMp83Vc3v41gUj2zhaTWInT4Zby42lNVgy",
  "name": "",
  "nbf":<PHONE_NUMBER>,
  "not_before_utc": "Mon May  2 20:21:41 UTC 2022",
  "origin": "generic",
  "picture": "https://s.gravatar.com/avatar/34b96091d8d838817e08eb08d26e5?s=480\u0026r=pg\u0026d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fsi.png",
  "roles": [
    "authp/guest"
  ],
  "sub": "auth0|626eab8f7170b37661",
  "userinfo": {
    "email"<EMAIL_ADDRESS>    "email_verified": true,
    "https://example.com/roles": [
      "top",
      "best"
    ],
    "name"<EMAIL_ADDRESS>    "nickname": "email",
    "picture": "https://s.gravatar.com/avatar/34b96091d8d8381d408eb08d26e5?s=480\u0026r=pg\u0026d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fsi.png",
    "sub": "auth0|626eab8f7170b37661",
    "updated_at": "2022-05-02T18:52:22.658Z"
  }
}

In this case I got the roles as a list as one user can have several.

That would be great!

@wnke , I will go with extract https://example.com/roles from userinfo as roles list
extract <userInfoFieldName> from userinfo as <topLevelFieldName> [list]

This is fantastic! Thank you so much!

@wnke , I tried many different things and none of them fit nicely into an existing design ... so ... If userinfo map has a key that ends with roles (https://example.com/roles) or groups, I am going to automatically take entries from there and place them into top level roles.

Documentation task: https://github.com/authp/authp.github.io/issues/19


Remove Elasticsearch2 from Docker configs

Now that consumer complaints are being indexed in Elasticsearch 7, we no longer
need to support operations in the unsupported version 2.
This change removes references to Elasticsearch2 from configurations
and stops building ES2 containers.
Testing
To test, you'll need to take down your local cfgov Docker environment and bring it up again.
I tested by removing all containers, networks, etc with docker system prune -af, and starting fresh with this configuration, and it delivered a working set of services minus ES2.
For testing, you should be able to just take your local stack down and up, but be aware that you'll probably have to restore postgres and elasticsearch data after this:
docker-compose down
docker-compose up

Then check docker-compse ps to see that Elasticsearch2 is no longer running:
docker-compose ps

            Name                           Command               State                         Ports
---------------------------------------------------------------------------------------------------------------------------
cfgov-refresh_docs_1            sh /src/consumerfinance.go ...   Up      <IP_ADDRESS>:8888->8888/tcp
cfgov-refresh_elasticsearch_1   /bin/tini -- /usr/local/bi ...   Up      <IP_ADDRESS>:9200->9200/tcp, <IP_ADDRESS>:9300->9300/tcp
cfgov-refresh_kibana_1          /bin/tini -- /usr/local/bi ...   Up      <IP_ADDRESS>:5601->5601/tcp
cfgov-refresh_postgres_1        docker-entrypoint.sh postgres    Up      <IP_ADDRESS>:5432->5432/tcp
cfgov-refresh_python_1          ./docker-entrypoint.sh pyt ...   Up      <IP_ADDRESS>:8000->8000/tcp

:tada: 😌


Error messages should give more detailed information on the item that failed

Trying to deploy a resource group and a number of resources I got this error message returned from New-AzSubscriptionDeploy:
New-AzDeployment: 19:44:39 - The deployment 'TestIt' failed with error(s). Showing 2 out of 2 error(s).
Status Message: The parameter accessPolicies is not specified. (Code:BadRequest)
Status Message: At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details. (Code: DeploymentFailed)
 - {
  "error": {
    "code": "BadRequest",
    "message": "The parameter accessPolicies is not specified."
  }
} (Code:BadRequest)
CorrelationId: 5e9980f0-78a8-4256-8dc1-************

Current Situation
The error message doesn't give any information on which resource is actually missing the accessPolicies property.
Desired Situation
Error messages should give information about which resource is causing the error.

Moreover: accessPolicies apparently seems to be a required parameter for Microsoft.KeyVault/vaults@2021-10-01. It should be added to the required-properties collection.

By chance, we actually have something in progress to add "target" to these errors.
Internal info (for Microsoft employees):

Work item here
This will be rolled out with ARM w32 (or later) build, and will be available in API version 2022-06-01 and later

Thank you for sharing this information!
(I don't have access to msazure.visualstudio.com, though.)
Then, what is it about the accessPolicies missing in the required-properties collection for Microsoft.KeyVault/vaults@2021-10-01? Is this a valid report? If yes, would this issue suffice to have it added on your side?

@SetTrend
It's possible (and recommend) to deploy keyvaults using RBAC instead of access policies.
https://docs.microsoft.com/en-us/azure/templates/microsoft.keyvault/vaults?pivots=deployment-language-bicep#vaultproperties
If you set enableRbacAuthorization to true.
Here is an example.. Where I just pass empty array. I'll have to check with the new api if it can be set to null or not provided.
I have it so the template is backwards compatible.
https://github.com/brwilkinson/AzureDeploymentFramework/blob/main/ADF/bicep/KV-KeyVault.bicep
The risk with using access policies is that you risk overwriting them when you redeploy.
With your error.. Often you can get more information on the error with resolve-azerror
These implementations are provider/api specific... Not specifically Bicep related, however we often track api inaccuracies and forward the info to the specific resource provider teams.

Thanks so much for sharing your very valuable knowledge with me! 👍❤👍

It's possible (and recommend) to deploy keyvaults using RBAC instead of access policies.

That's actually what I was up to. Yet, in the course of learning and testing Bicep for robustness, I deployed my Bicep file that had neither one or the other set (access policies or enableRbacAuthorization).
Shouldn't the Bicep language analyzer show an error when neither properties are set?

Shouldn't the Bicep language analyzer show an error when neither properties are set?

Ideally it should, but we don't have a good solution for this today. It's possible that PSRule checks for some of these things.
Going to close this in the meantime and track with #7292.

Adding Azure PsRule link as well https://github.com/Azure/PSRule.Rules.Azure

Closing and tracking with #7932 and #7933


Set default file manager nowhere to be found

I just downloaded and installed the files v2 app from the Microsoft Store and at the experimental section the setting to make it as a default file manager is nowhere to be found. I attach 2 screen shots, one with the version and another with the menu on experimental tab.

.

#8521

It's only available in the sideload version https://files.community/download/stable


Use uppercase enum keys.

In one of our examples, we have an enumeration for US state abbreviations, which includes Indiana. This results in an entry of the form:
    in = "IN",

which fails to compile because in is a reserved word.
The easiest fix I can imagine is to use upper case.

Good idea! Thank you for the contribution.


Typo in functional.po

In this line "Programção" should be "Programação" I believe. (Sorry for not reporting in Portuguese!)
https://github.com/python/python-docs-pt-br/blob/02a6ea6d87abec52dd1e6ce398020a653357d081/library/functional.po#L29
Originally reported in python/cpython#105206.

Thanks for the heads up. Fixed in Transifex, published docs will be receive the update in a few hours.


feat: add ApiModel and ApiModelProperty decorator

Here is "base" working version of apiModel et ApiModelProperty decorator
We can still manage the model through the old way + the new thanks to a merge on the setDefinition function.
To make the @ApiModel and @ApiModelPropertyWork we need to require the every model file before the swagger build.

I had some problem on vscode for debug cause of the sourcemap (dunno why yet)
You/we should create an editorconfig file at the root of the project to manage code formatting http://editorconfig.org/

Nice man, it was really fast!! I think it will improve a lot this project!