Coder Social home page Coder Social logo

Comments (16)

marrobi avatar marrobi commented on June 16, 2024 1

I'm supportive of this, can't think of any reason why an organisation would not want it show.

@martinpeck @tamirkamara @damoodamoo and thoughts? Just want to check I'm not missing anything!

from azuretre.

tamirkamara avatar tamirkamara commented on June 16, 2024
  1. Although I don't have a definite argument of why those are sensitive and/or shouldn't be shown, I think the question to ask is why would a normal user need all these details.
  2. I imagine the GitHub is meant to Git in general. Where is that sourced from? Does it take into account the deployment repo?
    I'm fine either way.

from azuretre.

martinpeck avatar martinpeck commented on June 16, 2024

Do we have all of that information somewhere within the API to be able to surface it in the UI?

My only thoughts on this are how useful it is. For example, we know that the various services in the TRE all have their own version numbers. So, is this the version of the core, the UI, or something else? Could the versions of those other things change independently of the github ref?

Also, as @tamirkamara says, some users are deploying from Azure DevOps repos, or from private repos. The existence of those repos might not be something that should be published.

from azuretre.

martinpeck avatar martinpeck commented on June 16, 2024

Other random thoughts: would branches within those git repos confuse things too? Would a PR branch or a CI branch look different in this UI?

Given the audience (developer and admin...and, maybe, someone in support asking the user to give them some version info) would this be better off as a hidden/separate page in the UI, or simply as an API endpoint that returned the values as JSON? TBH...it will need an API endpoint anyway, so step 1 is probably making sure that we have somewhere that has all the useful version info available to the appropriate user roles.

None of these comments are to suggest it's a bad idea, but I want to make sure it makes sense beyond a manual single-instance deployment, and that it works for situations where dev, test, staging, and prod environments might all have the same repo/hash etc. Other than the URL, would I expect this UI to change?

from azuretre.

marrobi avatar marrobi commented on June 16, 2024

Some of the data is stored in tags so should be relitively straightforward to surface via an API.

Maybe an API endpoint that surfaces tags on a resource group?

from azuretre.

tamirkamara avatar tamirkamara commented on June 16, 2024

Some of the data is stored in tags so should be relatively straightforward to surface via an API.

I'm not sure the API identity has permission for that. Even if it does - it shouldn't :-)

from azuretre.

martinpeck avatar martinpeck commented on June 16, 2024

Presumably you'd want this info to be stored in CosmosDB in some way, so that the API could grab it from there, as some sort of deployment record.

The scripts performing the deployment would be responsible for updating the record (or calling an API to update the record, or to add an additional record into the collection). This would also allow the metadata related to a deployment to be extended.

Do we have anything like that today that could be extended?

from azuretre.

jonnyry avatar jonnyry commented on June 16, 2024

Hi @tamirkamara

  1. Although I don't have a definite argument of why those are sensitive and/or shouldn't be shown, I think the question to ask is why would a normal user need all these details.

It depends on the definition of normal user - a researcher, probably not. But an administrator, developer, engineer - I think its useful to be certain on the version of the TRE running when developing/deploying/troubleshooting.

Perhaps all the fields aren't necessary or they could be combined into a single "build tag" / "product version" (e.g. BUILD_TAG = ORG/REPO + BRANCH/TAG/PR + HASH + DEPLOY_TIME) - essentially what I am trying to capture in the request is the ability to pinpoint back to the code exactly which version is running.

  1. I imagine the GitHub is meant to Git in general. Where is that sourced from? Does it take into account the deployment repo?

Yes, in terms of UI labels, GitHub could be changed for Git instead.

Deployment repo - good question. The deployment repo does complicate things in terms of implementation - having seperate code to determine the correct git metadata when running from the deployment repo - but also whether we also want to surface any of the deployment repo values themselves (given user defined templates are added to the build as part of the deployment repo).

from azuretre.

jonnyry avatar jonnyry commented on June 16, 2024

Hi @martinpeck

My only thoughts on this are how useful it is. For example, we know that the various services in the TRE all have their own version numbers. So, is this the version of the core, the UI, or something else? Could the versions of those other things change independently of the github ref?

The Azure TRE overall product version. This ideally would be a single version, e.g. v0.15.2 - however given deployments can occur from different branches/tags/PRs, and indeed different forks altogether - I ended up with four separate fields.

Also, as @tamirkamara says, some users are deploying from Azure DevOps repos, or from private repos. The existence of those repos might not be something that should be published.

Good point, perhaps the concept needs to be abstracted into something like a single BUILD_TAG field which can be customised/populated based on the source control + CICD platform being used.

from azuretre.

jonnyry avatar jonnyry commented on June 16, 2024

Other random thoughts: would branches within those git repos confuse things too? Would a PR branch or a CI branch look different in this UI?

None of these comments are to suggest it's a bad idea, but I want to make sure it makes sense beyond a manual single-instance deployment, and that it works for situations where dev, test, staging, and prod environments might all have the same repo/hash etc. Other than the URL, would I expect this UI to change?

Agreed. Perhaps adding the environment name in somewhere might be useful also.

Here's an example of a deployment from a feature branch of a (our) fork:

image

from azuretre.

tamirkamara avatar tamirkamara commented on June 16, 2024

Presumably you'd want this info to be stored in CosmosDB in some way, so that the API could grab it from there, as some sort of deployment record.

The scripts performing the deployment would be responsible for updating the record (or calling an API to update the record, or to add an additional record into the collection). This would also allow the metadata related to a deployment to be extended.

Do we have anything like that today that could be extended?

Unfortunately we don't have something like this. It's also tricky to update the DB from the deployment agent as it's vnet approved only...

from azuretre.

jonnyry avatar jonnyry commented on June 16, 2024

Presumably you'd want this info to be stored in CosmosDB in some way, so that the API could grab it from there, as some sort of deployment record.
The scripts performing the deployment would be responsible for updating the record (or calling an API to update the record, or to add an additional record into the collection). This would also allow the metadata related to a deployment to be extended.
Do we have anything like that today that could be extended?

Unfortunately we don't have something like this. It's also tricky to update the DB from the deployment agent as it's vnet approved only...

Rather than making available via the API, could it be injected into the ui/app/src/config.json file as part of the build, similar to the way the existing UI component version is?

from azuretre.

marrobi avatar marrobi commented on June 16, 2024

I think I would do it by adding environment variable(s) on the web app. Can get the repo details and either pass them into the TF or maybe use local exec. Then return them via an API.

from azuretre.

martinpeck avatar martinpeck commented on June 16, 2024

from azuretre.

marrobi avatar marrobi commented on June 16, 2024

@martinpeck like that, maybe could be done as part of this - #2851 in say a customisable footer.

from azuretre.

jonnyry avatar jonnyry commented on June 16, 2024

If you’re going down this route, maybe just allow a custom string to be passed into the build and deployment and display this string in the UI, and allow each customer to decide what they want to put into that string, and how to construct the string? Eg I might simply have “mpeck” while someone else might write their own script to generate the string “main-v123-1.6.0”. This way we can avoid exposing anything that a given customer doesn’t want exposed, avoid having to harvest these values from multiple sources, and it’s a very clear and explicit “opt in”

@martinpeck This sounds ideal.

from azuretre.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.