Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange issue with User Defined types + container registry #13254

Closed
slavizh opened this issue Feb 7, 2024 · 5 comments · Fixed by #13278
Closed

Strange issue with User Defined types + container registry #13254

slavizh opened this issue Feb 7, 2024 · 5 comments · Fixed by #13278

Comments

@slavizh
Copy link
Contributor

slavizh commented Feb 7, 2024

Bicep version
Bicep CLI version 0.25.3 (8627085)

Describe the bug
I am storing Bicep templates to container registry. The bicep templates have user defined types (schemas). Often we find some issues with user defined types where for example we have put incorrect type for property/parameter. We store bicep templates with versioning so for solution with name exampl1 we can have the following tags example1:1, example1:1.1, example1:1.1.2. Once we find some issue in the schema we force update tags example1:1 and example1:1.1 and we create a new tag example1:1.1.3. In the bicep parameters file if I reference in using statement example1:1 and I do command in VSC restore bicep modules force, the modules are restored successfully but those changes are not somehow available in VSC. Below you can see issue that flagged in VSC:

image

If I browser the actual file that was downloaded. In my case: C:\Users<user name>.bicep\br<container url><solution name>\1$

I can see that the schema is correct:
image

but the issue stands in VSC. So there must be some other cache that somehow does not validates the schema correctly when there are changes.

Can you figure out where this issue is and why it is happening?

To Reproduce
I think I have described it well

Additional context
Add any other context about the problem here.

@slavizh
Copy link
Contributor Author

slavizh commented Feb 7, 2024

@alex-frankel sorry to bother you but I think this is quite important bug as well.

@anthony-c-martin
Copy link
Member

anthony-c-martin commented Feb 8, 2024

@slavizh some questions:

  • Could you confirm that this is a behavioral change with the latest release (e.g. does this work with the previous release)?
  • Does the issue persist after closing the editor pane for the .bicepparam file and re-opening it?
  • Does the issue persist after restarting VSCode?
  • Do you see similar behavior in .bicep files (e.g. if you use a module reference instead of .bicepparam + using)?

@slavizh
Copy link
Contributor Author

slavizh commented Feb 9, 2024

Answers below

  • Could you confirm that this is a behavioral change with the latest release (e.g. does this work with the previous release)? - Not in latest release, I have noticed it in 0.24 but I was thinking that was issue in our publishing process. After upgrade to 0.25. I had the time to really troubleshoot does why I have logged it yesterday.
    Does the issue persist after closing the editor pane for the .bicepparam file and re-opening it? - Could not just test by just closing that editor as my PC was restarted overnight so I could only test with restart of VSC.
    Does the issue persist after restarting VSCode? - After closing VSC and re-opening everything is behaving properly.
    Do you see similar behavior in .bicep files (e.g. if you use a module reference instead of .bicepparam + using)? - Do not have information on modules as I am not using them and now will be hard to troubleshoot without actually simulating some issue and publishing version to our registry.

@anthony-c-martin
Copy link
Member

Thanks! I have a fix out for it here: #13278

Given the recent type issues, I suspect we're going to want to do a hotfix release, so this may be released soon!

@slavizh
Copy link
Contributor Author

slavizh commented Feb 9, 2024

@anthony-c-martin awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants