Altinn / altinn-studio

Next generation open source Altinn platform and applications.
https://docs.altinn.studio
BSD 3-Clause "New" or "Revised" License
109 stars 73 forks source link

Building App in Studio does not use last commit to master if gitea is updated directly #3181

Open matsgm opened 4 years ago

matsgm commented 4 years ago

Describe the bug

Build app in Altinn Studio does not use last commit to master (as stated). It uses the last commit available during page load.

If a developer pushes code to gitea or updates gitea directly, the commit will not be built.

To build the last commit you have to press pull or push on another page in Altinn Studio for the commit to update.

To Reproduce

Steps to reproduce the behavior:

  1. Create an app in Studio
  2. Go to "deploy page"
  3. Change something in Gitea.
  4. Click build in Studio
  5. The commit that is built is not the last commit.

Expected behavior

TheTechArch commented 4 years ago

I did this two times yesterday. Worked for mye. @jeevananthank i think we should really verify if this is still a problem. (i updated the nuget version in app directly in gitea)

matsgm commented 4 years ago

This was a frontend issue. The frontend fetches the last master commit-ID when the page loads. If someone commits after page load, before someone click release. The last commit will not be built.

jeevananthank commented 4 years ago

Could reproduce the issue as @matsgm says. With Deploy page loaded, and one commits a change directly in gitea and starting a build from Studio does not the use the latest commit, but the last commit when the deploy page is loaded. (a refresh of deploy page would solve this problem)

TheTechArch commented 2 years ago

@jeevananthank i assume we still have the same issue?

jeevananthank commented 2 years ago

@jeevananthank i assume we still have the same issue?

yes, this is still an issue. an refresh of the deploy side solves the issue.

wrt95 commented 4 days ago

When clicking deploy, make sure to get the latest version first 😄

nkylstad commented 4 days ago

Related issue: https://github.com/Altinn/altinn-studio/issues/3181 Perhaps we should show the commit hash as suggested, as a link to the commit in Gitea. That would, at least, make it very clear which commit is being built. However, that means that the suggested approach above might cause a mismatch.

Suggestion: Instead of having the form to build a version directly available, we use the same pattern as we have used other places, with a "+ Lag ny versjon" button.

cc: @Annikenkbrathen

Something like (in concept, please excuse the quality 😂 ):

Image

After clicking the button, we could show the "create version" form as is, possibly with some extra information:

Image