Why does my AWS Codestar application endpoint not show code changes? - aws-codestar

I made my first Codestar project with the web service template for node and lambda.
I pushed code changes and all 3 steps finished green. I even checked Pipeline and the comment from my latest code push showed there. However, when I click on my endpoint in my dashboard (it ends in /Prod), it shows as if nothing happened. I'm still seeing the Hello World output from the project's original code.
Just as a guess, I clicked Release Change after this, and still no change.
It's been hours since I made the change. I am new and totally stumped.
Also, when I use AWS SAM to start a local endpoint, everything works perfectly. My newest changes appear, and all is good.
Why does my AWS Codestar application endpoint not show code changes?

It sounds like it could be that the api is not being deployed. Whenever you make a change to Apigateway you have to re-deploy the api. Codestar should be doing that. You can go to the api itself in Apigateway and take a look at 'Stage'. There the deployed api url is shown.
Also, make sure your browser isn't caching the url.

Related

How to reset content of the developer portal

The Azure APIM developer portal (new one) has been edited and now some of the menues dont work.
Is it possible reset the content ?
I have tried the capture.bat (from another APIM instance) and generate.bat into the broken instance but it didnt appear to work - i even made changes to one of the jpg files in the scripts.v3/media directory but it didnt get changed in the portal when i ran generate.
I find the "run your own hosted developer portal" scenario confusing. I am unclear on:
where is the content held for the unpublished managed portal ?
where is the content held for the published managed portal ?
where is the content held for the unpublished "own hosted" portal ?
ie when running locally (npm start on the Github repo code)
where is the content held for the published "own hosted" portal ?
When developing on a self hosted scenario, ideally i think it would be benefitial to hold the content locally so that it could be placed in source control. Failing that, is it possible to customise such that the "run your own hosted developer portal" content is in an accessible location such as a blob in a container on the same storage account that the code is being published to? That way I could copy content from an unbroken APIM into a storage account and develop with that.
Is it possible reset the content ?
Yes. Have you actually tried the simplest solution?
Open developer portal in edit mode:
Click reset content
where is the content held for the unpublished managed portal ?
where is the content held for the published managed portal ?
Same place - in the APIM resources. When you edit developer portal and you save it,
other users won't see those changes until you click publish.
You can also use developer portal revisions, from REST API or directly from Azure Portal. This will give you an opportunity to go back to previous revisions. So if you are publishing manually, after you edit and save developer portal I recommend to go to the revisions tab in azure portal and publish it from there - this way you will have simple version control.
For managed version, important thing to understand is, "content" consists of:
content types and content items which are just json template files describing your pages on developer portal. Those can be accessed by REST API here and here (this is a parent child relation).
and your uploaded custom media (images, fonts etc.) that can be retrieved from APIM Blob Storage. To get SAS URL for APIM Blob Storage and connect to it, just call your APIM Management API with address POST /portalSettings/mediaContent/listSecrets/ - this URL is not documented but you can call it like any other endpoint.
And that's it. That's all you need - json file and media files. The rest is managed for you. And in fact that's what those scripts from github repository are doing. capture.bat for example is downloading all the media and json from developer portal and saves it to your local folder. So you can for example save it to source control or/and upload to another APIM developer portal instance.
When managed developer portal and online editor is not enough for you and you need more customization, like custom widgets etc., you can go with self hosted version. It gives you more freedom but the downside of course is you are responsible for its upgrades.
where is the content held for the unpublished "own hosted" portal ? ie
when running locally (npm start on the Github repo code)
When you run npm start it just runs locally like when you develop any other webpage. In this case it uses webpack-dev-server to host the page.
where is the content held for the published "own hosted" portal ?
Wherever you feel like it. That's the idea behind the self-hosted version. After you are happy with the changes you've made, just run npm run publish and files will appear in dist folder. Then you can upload them to the resource of your choice. This tutorial shows you how to enable hosting of static websites for your blob storage and host your developer portal there. Everything is explained, just follow the article carefully step by step (don't skip any step, every single one is important in order to successfully configure and deploy your self-hosted developer portal). Good luck.

Enable google maps api key in production environment

I made a flask app and deployed it to a linux server on Linode. It is running and some of my pages are working. For example, the contact page works. However, some of them have an inset google map. Upon loading one of these pages, my map is visible for a split second, then a big gray exclamation! and the map is blocked.
While testing the app using Flask's built in development server in my remote environment, all my functionality worked. When moving to a production environment, I used nginx and gunicorn. And I think I did it correctly. Judging that I do see the google maps working for just a second, it looks like this is not the issue.
Do I need to enable my google maps javascript api key for the production environment somehow?
When I have a look at your source code, I see
https://maps.googleapis.com/maps/api/js?key=None&callback=initMap
So, you did not add the API key, so it cannot work.
Please see https://developers.google.com/maps/documentation/javascript/get-api-key for how to get a key.

Application name on Authorization page didn't change in 3-Legged auth

We changed our production application name and description by forge.autodesk.com/myapps. But on authorization page we still see the old one.
Can we force to refresh it somehow?
Clearing browser cache didn't help. We've been wainting for 2 days but it still doesn't work.
Just got confirmation from Engineering that they've pushed the fix to production.
If you create a new app, the authorization page should show the name of the app properly. If you still want to use any impacted app, please edit and save the app.

Openshift github status result

I've managed to get openshift to download my github commits and fire on a webhook without issue. What I'd love to be able to do though is make use of the Github Status API to be able to mark builds as good or bad.
Has anyone had any success in doing this? If so how do you do it? I was thinking of doing it via the postBuild hook in openshift however I don't think I have access to the SHA nor would I be albe to post on failure.
The OPENSHIFT_BUILD_COMMIT environment variable, along with a few others, will be set in the image and provide details about the remote repo used.
https://docs.openshift.org/3.9/dev_guide/builds/build_output.html#output-image-environment-variables
You should be able to see those from the hook you run in the image as part of the postCommit hook.

How can i do a push notification service with a webservice on Ionic?

Ok, i need some help…
I’m finishing an app but i need some kind of service who looks in my backend and when my JSON changes (this JSON contain some valors who changes if the user get notifications) send to that user a pushmessage to the terminal even the app is off. Something like an ajax call every ‘x’ seconds but doing it in mobile.
I’ve past a few days searching but i’m completly lost and i need some kind of tutorial, example or something.
I’ve searched in the forum but i doesn’t find anything.
Thanks anyway
you can achieve what you want using Events that will be triggered when something changes in your backend (if you're using a modern framework like Laravel you can do it easily)
Inside the event it will see that a change is made and then send a push notification to that device with whatever service you used (acm, pusher,...etc)