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

Updated Swagger version link to include latest release link and latest tag #231

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

andram11
Copy link
Contributor

Description

Not sure this is what was requested by the story but:

  • i added an env variable LATEST_RELEASE with the link to the latest github release
  • i adapted app config & service to use this env variable
  • i read the link from the env and extract the tag version
  • i added the "latest-dev" tag to indicate it's always the latest release

Issue link

Fixes # (https://app.clickup.com/t/86b32rm4d)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature updates / changes
  • Tests
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Manually by checking the docs endpoint

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have updated the change log

@andram11 andram11 marked this pull request as ready for review December 12, 2024 16:43
Copy link

@cherylli, @JoshuaHinman
One business day has passed since the review started. Give priority to reviews as much as possible.

@cherylli cherylli requested review from timDeHof and removed request for JoshuaHinman December 14, 2024 00:14
JoshuaHinman
JoshuaHinman previously approved these changes Dec 14, 2024
Copy link
Contributor

@JoshuaHinman JoshuaHinman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took me a few minutes to figure out what uri to use for LATEST_RELEASE , but I got it working and it displays the version and link in swagger

@timDeHof
Copy link
Contributor

I'm not sure what is request for the user story too. If its the LATEST_RELEASE of the dashboard API, then where do I find it on the git repo? Why couldn't it be added to the package.json instead of with the environment variables? If its the swagger UI then I found this page in the docs

@cherylli
Copy link
Contributor

I also think it would be a better idea to keep track and pull the version from package.json if possible. We have 4 environments now it would be a pain to have to update all of them for each release

this could be useful https://betterstack.com/community/questions/how-to-read-package-version-in-nodejs-code/

timDeHof
timDeHof previously approved these changes Dec 14, 2024
Copy link
Contributor

@timDeHof timDeHof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works with a direct link to the latest github release. But in the future, we may want to automate it.

src/main.ts Show resolved Hide resolved
@andram11 andram11 dismissed stale reviews from timDeHof and JoshuaHinman via 4bb0d6f December 17, 2024 19:49
@cherylli
Copy link
Contributor

@andram11 could you please resolve merge conflicts when you have a chance? Thanks!

@andram11
Copy link
Contributor Author

Updated the conflict and merged dev into local branch

Copy link
Contributor

@cherylli cherylli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works perfectly if I update the version in package.json
image

Is there an automated way to only show (latest dev) on the dev deployment (not the "stable" deployment)?

Otherwise, we could just leave it as it is now, have "latest dev" there, and hardcode to remove it on the stable version (I don't expect to update the stable version very often, at most every 2-3 months)

Prod won't have access to swagger, so it doesn't matter

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

Successfully merging this pull request may close these issues.

4 participants