altinn-studio icon indicating copy to clipboard operation
altinn-studio copied to clipboard

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

Open matsgm opened this issue 6 years ago • 7 comments

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

  • During click button to build the last commit needs to be fetched from gitea.
  • Consider having an interval check to get the last commit from gitea.

matsgm avatar Nov 27 '19 10:11 matsgm

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)

TheTechArch avatar Feb 18 '20 07:02 TheTechArch

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.

matsgm avatar Feb 18 '20 07:02 matsgm

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)

jeevananthank avatar Feb 18 '20 08:02 jeevananthank

@jeevananthank i assume we still have the same issue?

TheTechArch avatar Feb 18 '22 13:02 TheTechArch

@jeevananthank i assume we still have the same issue?

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

jeevananthank avatar Feb 21 '22 10:02 jeevananthank

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

wrt95 avatar Jul 01 '24 07:07 wrt95

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.

  • Clicking this button shows the form, and fetches the latest commit from master at the time of the button click. This way we at least ensure that we get the latest commit from when the user is ready to build a new version
  • The commit hash could be shown together with the "siste commit til master" text/link. Possibly also with the commit message for reference?

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

nkylstad avatar Jul 01 '24 13:07 nkylstad

I agree, it seems good to have a button if it solves the issue.

It is a bit of an odd placement for such an important interaction. The button is not very visible and might be perceived as a less important action or ignored. We should change several things here, and I will look into a redesign of the publish page in this task.

Or if it is not urgent, can this issue be blocked until design has worked on the new design?

Annikenkbrathen avatar Jul 08 '24 07:07 Annikenkbrathen

Works nicely 👍

Jondyr avatar Jul 18 '24 09:07 Jondyr