Setting the status name when setting the status on a GitHub commit - github-api

I'm setting the status of commits to block Pull Request merges from an AWS CodeBuild job. I'm using PyGithub. Here's my code:
repo.get_commit(sha=sha).create_status(state=state,description=description)
I've set branch protection to block without success. My issue is that the only status name is default in the search.
Here's a current example of a Pull Request that has been recently approved: https://github.com/kjenney/pulumi-bootstrap/pull/12
How can I set the status name when I post it so that I can customize this name?

Context sets the name of the status.
repo.get_commit(sha=sha).create_status(state=state,description=description,context='codebuild')

Related

The remote name could not be resolved: 'bucket-2.miniomyserverhost.com'

Faced a data copy issue using Azure Fabric Data - minIO
In Azure Fabric Data, I set up a connection to my minIO server, the test connection goes well, I see all the bucket
BUT when I try to access the contents of the cart I get an error
The operation has timed out"
or "The file operation is failed. A WebException with status NameResolutionFailure was thrown. The remote name could not be resolved: 'bucket-2.miniomyserverhost.com' Activity ID: 0794a825-7ba4-dfec4cfc8846"
Judging by the error, I need to adjust the "path style" URLs
But I can't find an example of how to do it right.
Can you suggest
Registered two parameters in the configuration file
MINIO_DOMAIN=(host)domain
MINIO_SERVER_URL=http://(host)domain
Here is my suggestion. To resolve the issue of "The operation has timed out" or:
The file operation is failed. A WebException with status NameResolutionFailure was thrown. The remote name could not be resolved
…while accessing the contents of a bucket in Azure Fabric Data using minIO, you need to set up the "path style" URLs correctly.
You have registered two parameters in the configuration file, MINIO_DOMAIN and MINIO_SERVER_URL. To use path style URLs, set MINIO_SERVER_URL to http://(host):9000.
Here is an example:
MINIO_DOMAIN=myminioserver.com
MINIO_SERVER_URL=http://myminioserver.com:9000
Make sure to replace myminioserver.com with the actual hostname or IP address of your minIO server.

How to solve 'GitRepository not found' error in FluxCD?

I am trying to use Azure kuberenetes cluster and FluxCD to connect to a repository named realtimeapp-infra in Gitlab. I created the source and kustomization .yaml files in another repo training-setup, but getting the following error when I use flux get kustomizations in cmd. I was getting the same error with GitHub also. (I am new to both FluxCD and Kubernetes.)
EDIT: The problem was solved. It was due to no master branch in the repository, and I did not have access to create the master branch. After the owner created it, the issue was resolved.
Did you connected to repository realtimeapp-infra as a GitRepository inside flux with username & credentials? This is a own CRD type coming with flux = kubectl get gitrepository -A

Add-PnPApp : The request message was already sent. Cannot send the same request message multiple times

I'm new to using Azure DevOps. I continue to receive this error "Add-PnPApp : The request message was already sent. Cannot send the same request message multiple times."
Azure DevOps Release fails because of AddPnP error with "...same request".
Build shows version that changes my version (old) to a new version(gulp's version?).
Image of build
I'm told that it could be the version that starts with zero because SharePoint doesn't like it. I can't seem to change the new version to 1.0.0.1 because it seems like it's being changed in the gulp-file.js. Is there something else that I am missing?
image of release
Is it possible that you need the overwrite parameter in the AddPnP command? Or is it possible you would need to iterate the version between each release?
https://learn.microsoft.com/en-us/powershell/module/sharepoint-pnp/add-pnpapp?view=sharepoint-ps
In my case the same message
The request message was already sent. Cannot send the same request message multiple times
was misleading. I tried to update dynamically an .sppkg package (which is in fact a ZIP file) during an automated deployment, but the file _rels/.rels was getting lost in the process (because of the bug Unable to compress hidden files with Compress-Archive) and the resulting package was corrupted.
Once I fixed the package by making sure the file _rels/.rels was kept, the deployment would succeed.

Unable to fetch scan response from dynamodb through a script in gitlab cicd

I have a project in gitlab which has a script called dockerRun.sh that runs in a docker container. This script interacts with dynamodb and fetches data.
Below is the snippet from dockerRun.sh which fetches data from dynamodb table
cycleId=$(aws dynamodb scan --table-name cycle_info --filter-expression "isLatest = :a" --projection-expression 'cycleId' --expression-attribute-values '{":a":{"S":"true"}}')
Results is :
In getCycleId function
retrieving latest AIXM CycleId from dynamodb
None 1 2
CYCLEID 1911.191024
Now, I have another project in gitlab and in this project's cicd pipeline I have added a stage where I am calling the same dockerRun.sh from the previous project mentioned. While I run this pipeline and when the dockerRun.sh gets executed this time dynamodb fetch gives an error which is :
An error occurred (ResourceNotFoundException) when calling the Scan operation: Requested resource not found
I have cross checked that the data is present in the database.
So the summary is both time same script is running but while accessing it from another project it does not fetches result. Can somebody help with this.
Check that the other project has the right AWS credentials to access the account that has the DynamoDB table

Change Foreman UI to ignore Puppet resource 'Notify' messages

We're using Puppet + Foreman to monitor changes in environment by checking custom facts. For example, whenever a custom fact equals 'true' puppet calls the Notify resource with a message sent to the agent log. Puppet includes this message in the agent report and Foreman shows this in UI.
Problem is that whenever a message is thrown, Foreman considers this action as "Applied" and the node status changes to "Active" (blue icon).
We want to keep the node at "No Changes" (Green) plus show the Notify message.
Is that possible in some way? Maybe define a new custom resource type?
Here is the puppet code:
class mymodule::myclass::mysubclass {
if $::fact023 == 'fail' {
notify {'mynotify1':
message => "WARNING: Node ${::fqdn} failed fact023",
loglevel => hiera('warnings_loglevel'),
} } }
See screenshot of Foreman here
Update:
I'll refine the question: Is there a way to use the Notify resource without causing puppet to report that the node has changed? Meaning just print the message to client log (and therefore the message will be visible in report) but without puppet classify the event as an applied configuration?
The reason is that when puppet triggers the Notify resource, Foreman flags the node as being active (changed)
UPDATE #2
I'm thinking about changing Foreman report file so that the UI will ignore Notify events so that the node's status will remain unchanged but still show the message in the report. Can someone point me to the right direction? Thanks!
UPDATE #3
Problem fixed after switching from the "Notify" resource type to custom type "echo" created by some dude in Puppet Forge. Thanks!
It's not completely clear what you are trying to accomplish. One option would be to use the notice function instead of a resource. Functions execute on the puppet master, so you the log will end up in the puppet master's logs instead of the agent report. That also means that it will not count as an applied resource, and the node should appear to be stable.

Resources