"You are testing actions that you created in project: [[ another project ]]" - actions-on-google

I'm struggling to get a Google sample working.
I think I'm following the instructions correctly but now, when testing (in project-y), I receive a warning:
You are testing the Actions that you have created in project: project-x
I had previously used project-x but it has since been deleted. I've tried deleting the project and recreating, redeploy etc. but I'm entirely unable to avoid the error.
I'm unable to determine where project-y references project-x and how to correct this.
The only location where project-[x|y] are referenced is in ./sdk/setting/setting.yaml:
defaultLocale: en
localizedSettings:
developerEmail:
developerName:
displayName: Updates sample
fullDescription:
privacyPolicyUrl:
pronunciation: Updates sample
shortDescription:
smallLogoImage:
termsOfServiceUrl:
projectId: project-y
When I gactions push and gactions preview deploy, both commands correctly reference project-y and the generated URLs correctly point to project-y:
gactions push
Pushing files in the project "project-y" to Actions Console. This may take a few minutes.
Sending configuration files...
gactions deploy preview
Deploying files in the project "project-y" to Actions Console for preview. This may take a few minutes.
Sending configuration files...
I've scoured the gactions config and the cloned directory for hidden configuration files but am unable to find any references to project-x.
If I search, the only reference I find is the single reference to project-y in the above YAML.

I have seen the same issue.
In my case, it is because I used the same Display name for project-x and project-y.
I hope you check your project's Display name on Develop tab in Actions Console and solve your issue.

Related

Invalid Argument Error in Google Cloud Build/GitHub

I have been trying to integrate Google Cloud Build with my GitHub account. I have set up working build triggers in the past for other projects on GCP - but with this one, I just can't get it to work reliably. Here is what I did:
Install the Google Cloud Build App on GitHub and link it to my Google Cloud Account.
Connected to my GitHub repository in Google Cloud Build. As source, I selected "GitHub (Cloud Build GitHub App)".
Let Cloud Build create its default trigger for me - just to make sure that the settings are correct.
Now, when manually running the default trigger, I always receive the following error message after selecting my branch: "Failed to trigger build: Request contains an invalid argument." Here is what that looks like:
The trigger also does not work when invoked through a new commit in the GitHub repository. There are two different errors I have spotted through the GitHub UI:
The GitHub Cloud Build Action essentially reports the same error as Cloud Build itself when manually invoking the build and immediately fails:
The GitHub Cloud Build Action is queued/started, but never actually does anything. In this case, Cloud Build does not even seem to know about the build that was triggered by GitHub. The action will remain in this state for hours, even though Cloud Build should usually cancel builds after 10 minutes by default.
Here are some things that I've tried so far to mitigate the issue:
Create all sorts of different trigger variations - none of them seems to work. The error is always the same.
Uninstall the Cloud Build App on Github, unlink my Google Cloud account, and go through the entire setup process again.
When connecting the repository in Cloud Build, instead of selecting the GitHub App as a source, select "GitHub (mirrored)".
At this point, I seem to be stuck and I would be super grateful for any advice/tip that could somehow push me in the right direction.
One more thing that I should note: I have had the triggers working for a while in this project. They stopped working some time after I renamed my master branch on GitHub to "production". I don't know if that has anything to do with my triggers failing though.
I found that this can be caused when you have an "invalid" CloudBuild config file (e.g. cloudbuild.yaml).
This threw me off, because it doesn't necessarily mean it is invalid YAML or JSON, just that it is not what CloudBuild expects.
In my case, I defined a secretEnv value, but had removed the step that utilized it. Apparently, CloudBuild does not allow secretEnv values to go unused, which resulted in the cryptic error message:
Failed to trigger build: Request contains an invalid argument.
In case that isn't clear, here is an example of a config file that will fail:
steps:
- name: "gcr.io/cloud-builders/docker"
entrypoint: "bash"
args: ["-c", "docker login --username=user-name --password=$$PASSWORD"]
secretEnv: ["PASSWORD"]
secrets:
- kmsKeyName: projects/project-id/locations/global/keyRings/keyring-name/cryptoKeys/key-name
secretEnv:
PASSWORD: "encrypted-password"
UNUSED_PASSWORD: "another-encrypted-password"
UNUSED_PASSWORD is never actually used anywhere, so this will fail.
Since this error message is so vague, I assume there are other scenarios that could cause this same problem, so take this as just an example of the type of mistakes to look for.

I am unable to deploy my website to Netlify

I have been creating this website for a few weeks now (I am fairly new to web-dev) and have just recently made a repo (on Github) for it.
Link:
https://github.com/Lathryx/TopShelf-Recipes
I want to deploy with Netlify however I am unable to. Netlify continuously gives a 404 error on the site(s) that I create. I think it has something to do with the publish directory but I'm not sure. I want it to open to landing.html.
The few times I have tried to deploy now I have tried:
No build command/publish directory.
No build command and the publish directory set to TopShelf Recipes
(have also tried /TopShelf Recipes).
No build command and the publish directory set to TopShelf Recipes/landing.html.
No build command and the publish directory set to /TopShelf Recipes/landing.
Image of Error:
I really don't know what to do. Does anybody know why this is happening?
The netlify/my-first-netlify-deploys demo project shows files with a netlify.toml to adtually generates the files.
Result: https://playwith.netlify.app/
But if there are no generation involved, then said files should be directly at the root folder of the repository, not in a subfolder.
The landing page of your site must be titled index.html (as I’ve found), this fixed it for me. Mine (originally) was titled landing.html.
I will keep this in mind in the future.

Copying files and deploying to Azure without building using Visual Studio Team Services

I'm attempting to deploy a web site to Azure using VSTS. Basically, I commit code to the GIT repo and have it setup to run CI, so it begins building as soon as I commit. However, once it hits the release section, it never copies the code to the Azure web app, rather, it gives me this line:
Info: Updating file ({projectname}\error.txt).
It doesn't copy the files I changed, but rather always just copies this file. I checked and there is indeed an error.txt file in my website directory in Azure, but it is always blank.
This build/deploy process isn't "standard" because the build step only downloads from source code, it doesn't build, because the website isn't a "web application", but rather just a "web site", meaning it doesn't need to be built.
So my build step is as follows:
Get Sources
Run on Agent - this step is empty
so the idea is that it just downloads everything from source control, that's it.
Then, my release step is as follows:
Artefacts are from build step above
deploy to environment 1 (dev)
Azure app service deploy, using "package or folder" as $(System.DefaultWorkingDirectory)/
Any idea what I might be doing wrong here?
So I actually figured this out and will leave this here in case anyone else needs it.
I admit I'm pretty new to the Azure/VSTS world, so maybe someone else is making my mistake as well.
If you don't need to "build" your project, then don't. I resolved it by simply skipping the build step altogether. What I was really after was to just download the files from source control and deploy them as-is.
In your release editor, you can specify which "artifact" you want to use to release, and one of the options is source control, which is what I did.
This would be useful for websites like mine where you don't need to build them (mine is DNN/DotNetNuke, so you don't build it before deploying).

What grunt files to upload to repo vs files to upload when deploying site to production

So, I have a webapp I am creating using the 3 muskateers yeoman, grunt and bower.
My questions are:
What is best practice when it comes to uploading my webapp into a git/mercurial repo? Do I include the entire project? What about directories like 'node_modules' or 'test', etc?
Also, when deploying to live production site: Will my 'dist' folder be what I should be uploading?
With research yielding no results (I could be searching the wrong things?).. I'm a bit new to this process so any feedback is greatly appreciated. Thanks!
You should always commit all of your yeoman, grunt, and bower config files.
There are two schools of thought on committing the output they produce or dependencies they download:
One is, you should upload everything needed for another user to deploy the web app after cloning the repository, without performing any additional operations. The idea is, dependencies may not exist anymore, network connections might be down, etc.
Another is, keep the repository small and don't commit node_modules, etc, since they can be downloaded by the user.
As far as the dist folder goes, yes you'll be uploading it to your server, as it contains all of your minified files. Whether or not you want to commit it to the repository is a separate question. You might let the user build every time, assuming they can get all the dependencies one way or another (from above choice). Or you might want to commit it to tag it with a release version along with your source code.
There's some more discussion on this here: http://addyosmani.com/blog/checking-in-front-end-dependencies/

Private NuGet gallery not publishing

I have set up a NuGet Gallery for use inside my company as per the lengthy instructions at http://docs.nuget.org/docs/contribute/setting-up-a-local-gallery. However I when I push a package to the server it doesn't seem to recognize it even though nuget.exe reports no errors
NuGet.exe push -source http://myserver/NuGet-services/FeedService.svc/ publish\mypackage.0.1.nupkg
Pushing MyPackage 0.1 to 'http://myserver/NuGet-services/FeedService.svc/'...
Pushing: 100%
The API key is set to what my user has listed on its profile page. I have turned up the logging in the service to DEBUG but nothing at all is printed to the log. I have checked that the service has the ability to write to its data directory and to the database. The packages table in the database is empty as is the directory to which the packages look like they should be published (App_Data/Packages). If anybody has a suggestion short of attaching a debugger to this thing I would be most interested in your help.
You're pushing to the wrong url. You don't push to the feedservice.svc. The source should be the root (so http://myserver/NuGet-services/ in your case).